comparison vp3.c @ 12460:7106d2c8f142 libavcodec

Fix vp3_draw_horiz_band to not produce completely chaotical values that result in overdrawing areas again and again if s->flipped_image is false.
author reimar
date Mon, 06 Sep 2010 19:21:13 +0000
parents b3f8dba49d1f
children 25174028da0a
comparison
equal deleted inserted replaced
12459:b3f8dba49d1f 12460:7106d2c8f142
1320 1320
1321 if(s->avctx->draw_horiz_band==NULL) 1321 if(s->avctx->draw_horiz_band==NULL)
1322 return; 1322 return;
1323 1323
1324 h= y - s->last_slice_end; 1324 h= y - s->last_slice_end;
1325 s->last_slice_end= y;
1325 y -= h; 1326 y -= h;
1326 1327
1327 if (!s->flipped_image) { 1328 if (!s->flipped_image) {
1328 if (y == 0) 1329 if (y == 0)
1329 h -= s->height - s->avctx->height; // account for non-mod16 1330 h -= s->height - s->avctx->height; // account for non-mod16
1336 offset[2] = s->current_frame.linesize[2]*cy; 1337 offset[2] = s->current_frame.linesize[2]*cy;
1337 offset[3] = 0; 1338 offset[3] = 0;
1338 1339
1339 emms_c(); 1340 emms_c();
1340 s->avctx->draw_horiz_band(s->avctx, &s->current_frame, offset, y, 3, h); 1341 s->avctx->draw_horiz_band(s->avctx, &s->current_frame, offset, y, 3, h);
1341 s->last_slice_end= y + h;
1342 } 1342 }
1343 1343
1344 /* 1344 /*
1345 * Perform the final rendering for a particular slice of data. 1345 * Perform the final rendering for a particular slice of data.
1346 * The slice number ranges from 0..(c_superblock_height - 1). 1346 * The slice number ranges from 0..(c_superblock_height - 1).