1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ra144: fix code with ftrapv.

A better solution is welcome!

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-09 05:55:40 +02:00
parent 03f5043f5d
commit 1e83e6ad7a

View File

@ -1567,8 +1567,14 @@ int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx)
b = -2; b = -2;
b = 0x1000000 / b; b = 0x1000000 / b;
for (j=0; j <= i; j++) for (j=0; j <= i; j++) {
#if CONFIG_FTRAPV
int a = bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12);
if((int)(a*(unsigned)b) != a*(int64_t)b)
return 1;
#endif
bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * b) >> 12; bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * b) >> 12;
}
if ((unsigned) bp1[i] + 0x1000 > 0x1fff) if ((unsigned) bp1[i] + 0x1000 > 0x1fff)
return 1; return 1;