Mercurial > libavcodec.hg
changeset 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 | 4578f774a775 |
children | 35ced8a13d7d |
files | mpeg4videoenc.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
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 */