aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmaenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-02-19 17:54:23 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-19 17:54:23 +0000
commitdc405cc1c032781273a5dffa0ecf3e4d789985b6 (patch)
treed4ff7c5c9f9841313a027de03c7ddc1cac353728 /libavcodec/wmaenc.c
parentedf9b2f040b66b0d1096a144f558c73baa3ae6b4 (diff)
downloadffmpeg-dc405cc1c032781273a5dffa0ecf3e4d789985b6.tar.gz
A try to fix the regressions.
Originally committed as revision 17459 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r--libavcodec/wmaenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 195c2702c6..4977ab2a1e 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -287,6 +287,10 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
if(1<<coef_nb_bits <= abs_level)
return -1;
+
+ //Workaround minor rounding differences for the regression tests, FIXME we should find and replace the problematic float by fixpoint for reg tests
+ if(abs_level == 0x71B && (s->avctx->flags & CODEC_FLAG_BITEXACT)) abs_level=0x71A;
+
put_bits(&s->pb, coef_nb_bits, abs_level);
put_bits(&s->pb, s->frame_len_bits, run);
}