Mercurial > libavcodec.hg
comparison dsputil.c @ 6218:dfdff1ca78a7 libavcodec
consts
I have underestimated this a little, and these are just some ...
| author | michael |
|---|---|
| date | Fri, 01 Feb 2008 03:26:31 +0000 |
| parents | 558c1fd0ee72 |
| children | 2799f65a24de |
comparison
equal
deleted
inserted
replaced
| 6217:f838213ca91b | 6218:dfdff1ca78a7 |
|---|---|
| 3783 } | 3783 } |
| 3784 | 3784 |
| 3785 void ff_float_to_int16_c(int16_t *dst, const float *src, int len){ | 3785 void ff_float_to_int16_c(int16_t *dst, const float *src, int len){ |
| 3786 int i; | 3786 int i; |
| 3787 for(i=0; i<len; i++) { | 3787 for(i=0; i<len; i++) { |
| 3788 int_fast32_t tmp = ((int32_t*)src)[i]; | 3788 int_fast32_t tmp = ((const int32_t*)src)[i]; |
| 3789 if(tmp & 0xf0000){ | 3789 if(tmp & 0xf0000){ |
| 3790 tmp = (0x43c0ffff - tmp)>>31; | 3790 tmp = (0x43c0ffff - tmp)>>31; |
| 3791 // is this faster on some gcc/cpu combinations? | 3791 // is this faster on some gcc/cpu combinations? |
| 3792 // if(tmp > 0x43c0ffff) tmp = 0xFFFF; | 3792 // if(tmp > 0x43c0ffff) tmp = 0xFFFF; |
| 3793 // else tmp = 0; | 3793 // else tmp = 0; |
