Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-09 07:55:40 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-09 08:02:34 +0400
commit1e83e6ad7a8b5d6994c50f531c30f25f787f0c0e (patch)
treef94b7aa63b03cf43ee7029f38a45a066cf1e0b6a /libavcodec/ra144.c
parent03f5043f5d13446f3a8af4a838a4e614190d2a51 (diff)
ra144: fix code with ftrapv.
A better solution is welcome! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r--libavcodec/ra144.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index aa683785c9..3b24740b97 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -1567,8 +1567,14 @@ int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx)
b = -2;
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;
+ }
if ((unsigned) bp1[i] + 0x1000 > 0x1fff)
return 1;