diff mpeg4videoenc.c @ 10808:55c01e916c08 libavcodec

Explain why the level variable is magically inceased in mpeg4_encode_dc(). It must be in a certain range to avoid DC overflows.
author diego
date Fri, 08 Jan 2010 10:00:56 +0000
parents 4605bd2fdb7f
children 9abebeca7d1b
line wrap: on
line diff
--- a/mpeg4videoenc.c	Fri Jan 08 06:11:56 2010 +0000
+++ b/mpeg4videoenc.c	Fri Jan 08 10:00:56 2010 +0000
@@ -242,6 +242,7 @@
 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 */