Mercurial > libavcodec.hg
changeset 5491:d847cbc8756b libavcodec
Fix deinterlacing for odd height
author | reimar |
---|---|
date | Sun, 05 Aug 2007 12:11:28 +0000 |
parents | 12d77ed34985 |
children | 922a668222f0 |
files | xsubdec.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/xsubdec.c Sun Aug 05 12:11:26 2007 +0000 +++ b/xsubdec.c Sun Aug 05 12:11:28 2007 +0000 @@ -84,7 +84,7 @@ 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));