projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3c0175
)
Explain why the level variable is magically inceased in mpeg4_encode_dc().
author
Diego Biurrun
<diego@biurrun.de>
Fri, 8 Jan 2010 10:00:56 +0000
(10:00 +0000)
committer
Diego Biurrun
<diego@biurrun.de>
Fri, 8 Jan 2010 10:00:56 +0000
(10:00 +0000)
It must be in a certain range to avoid DC overflows.
Originally committed as revision 21087 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/mpeg4videoenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/mpeg4videoenc.c
b/libavcodec/mpeg4videoenc.c
index
64cbecb
..
36dd3c9
100644
(file)
--- 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 */