dsp_math.c 495 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. int L_saturate(double dVar1) {
  3. if( dVar1 > (double)0x7FFFFFFF ) {
  4. return 0x7FFFFFFF;
  5. } else if( dVar1 < (double)0x80000000){
  6. return (int)0x80000000;
  7. } else {
  8. return (int)dVar1;
  9. }
  10. }
  11. int L_deposit_l(short var1) {
  12. return (int)var1;
  13. }
  14. int L_deposit_h(short var1) {
  15. int lvar;
  16. lvar = (int ) var1 << 16;
  17. return lvar;
  18. }
  19. short extract_l(short L_var1) {
  20. return (short) (0x0000ffffL & L_var1);
  21. }
  22. short extract_h(int L_var1) {
  23. return (short) (0x0000ffffL & (L_var1 >> 16));
  24. }
  25. */