diff options
author | Diego Biurrun <diego@biurrun.de> | 2010-01-08 10:00:56 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2010-01-08 10:00:56 +0000 |
commit | 49d2d1c35cc0438747dd8ef111163cb341f8f9fe (patch) | |
tree | 6d4acf3c5e2062ac0e14f97fa08ed62681a20f07 /libavcodec/mpeg4videoenc.c | |
parent | d3c01751a36d8bd7a4b9381d8e59a790b80e5040 (diff) | |
download | ffmpeg-49d2d1c35cc0438747dd8ef111163cb341f8f9fe.tar.gz |
Explain why the level variable is magically inceased in mpeg4_encode_dc().
It must be in a certain range to avoid DC overflows.
Originally committed as revision 21087 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r-- | libavcodec/mpeg4videoenc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 64cbecba9a..36dd3c90a2 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -242,6 +242,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s){ static inline void mpeg4_encode_dc(PutBitContext * s, int level, int n) { #if 1 + /* DC will overflow if level is outside the [-255,255] range. */ level+=256; if (n < 4) { /* luminance */ |