[FFmpeg-cvslog] snow: fix 32x32 encoding

Michael Niedermayer git at videolan.org
Sat May 12 03:44:57 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 12 03:35:19 2012 +0200| [3b5632479e4e2f83f1a398161819e5c859e08dfe] | committer: Michael Niedermayer

snow: fix 32x32 encoding

Fixes ticket1083

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b5632479e4e2f83f1a398161819e5c859e08dfe
---

 libavcodec/snowenc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index ea66d5f..7091960 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1712,6 +1712,10 @@ redo_frame:
     else
         s->spatial_decomposition_count= 5;
 
+    while(   !(width >>(s->chroma_h_shift + s->spatial_decomposition_count))
+          || !(height>>(s->chroma_v_shift + s->spatial_decomposition_count)))
+        s->spatial_decomposition_count--;
+
     s->m.pict_type = pic->pict_type;
     s->qbias = pic->pict_type == AV_PICTURE_TYPE_P ? 2 : 0;
 



More information about the ffmpeg-cvslog mailing list