[SCM] libav/experimental: Fix deinterlacing for odd height

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:04:52 UTC 2013


The following commit has been merged in the experimental branch:
commit e3c90129a4a58907f3ece48ac3dbb24a84f65eb4
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Sun Aug 5 12:11:28 2007 +0000

    Fix deinterlacing for odd height
    
    Originally committed as revision 9942 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 9a90bf4..752c237 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -84,7 +84,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     bitmap = sub->rects[0].bitmap;
     for (y = 0; y < h; y++) {
         // interlaced: do odd lines
-        if (y == h / 2) bitmap = sub->rects[0].bitmap + w;
+        if (y == (h + 1) / 2) bitmap = sub->rects[0].bitmap + w;
         for (x = 0; x < w; ) {
             int log2 = ff_log2_tab[show_bits(&gb, 8)];
             int run = get_bits(&gb, 14 - 4 * (log2 >> 1));

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list