comparison vp3.c @ 12472:9c9be94124f8 libavcodec

Only draw the actually visible area in vp3_draw_horiz_band. Fixes a black line in non-swapped, non-mod-16-height Theora videos when vp3_draw_horiz_band is used.
author reimar
date Wed, 08 Sep 2010 05:51:31 +0000
parents ffb3668ff7af
children
comparison
equal deleted inserted replaced
12471:d821f7c64fc9 12472:9c9be94124f8
1324 h= y - s->last_slice_end; 1324 h= y - s->last_slice_end;
1325 s->last_slice_end= y; 1325 s->last_slice_end= y;
1326 y -= h; 1326 y -= h;
1327 1327
1328 if (!s->flipped_image) { 1328 if (!s->flipped_image) {
1329 if (y == 0) 1329 y = s->avctx->height - y - h;
1330 h -= s->height - s->avctx->height; // account for non-mod16
1331 y = s->height - y - h;
1332 } 1330 }
1333 1331
1334 cy = y >> s->chroma_y_shift; 1332 cy = y >> s->chroma_y_shift;
1335 offset[0] = s->current_frame.linesize[0]*y; 1333 offset[0] = s->current_frame.linesize[0]*y;
1336 offset[1] = s->current_frame.linesize[1]*cy; 1334 offset[1] = s->current_frame.linesize[1]*cy;
1848 // filter the last row 1846 // filter the last row
1849 for (i = 0; i < 3; i++) { 1847 for (i = 0; i < 3; i++) {
1850 int row = (s->height >> (3+(i && s->chroma_y_shift))) - 1; 1848 int row = (s->height >> (3+(i && s->chroma_y_shift))) - 1;
1851 apply_loop_filter(s, i, row, row+1); 1849 apply_loop_filter(s, i, row, row+1);
1852 } 1850 }
1853 vp3_draw_horiz_band(s, s->height); 1851 vp3_draw_horiz_band(s, s->avctx->height);
1854 1852
1855 *data_size=sizeof(AVFrame); 1853 *data_size=sizeof(AVFrame);
1856 *(AVFrame*)data= s->current_frame; 1854 *(AVFrame*)data= s->current_frame;
1857 1855
1858 /* release the last frame, if it is allocated and if it is not the 1856 /* release the last frame, if it is allocated and if it is not the