[FFmpeg-cvslog] r21087 - trunk/libavcodec/mpeg4videoenc.c
diego
subversion
Fri Jan 8 11:00:57 CET 2010
Author: diego
Date: Fri Jan 8 11:00:56 2010
New Revision: 21087
Log:
Explain why the level variable is magically inceased in mpeg4_encode_dc().
It must be in a certain range to avoid DC overflows.
Modified:
trunk/libavcodec/mpeg4videoenc.c
Modified: trunk/libavcodec/mpeg4videoenc.c
==============================================================================
--- trunk/libavcodec/mpeg4videoenc.c Fri Jan 8 09:19:18 2010 (r21086)
+++ trunk/libavcodec/mpeg4videoenc.c Fri Jan 8 11:00:56 2010 (r21087)
@@ -242,6 +242,7 @@ void ff_clean_mpeg4_qscales(MpegEncConte
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 */
More information about the ffmpeg-cvslog
mailing list