The motion estimation code only uses block_index[0..3], so only initialize that (just like estimate_motion_thread() in mpegvideo_enc.c).
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -290,8 +290,6 @@ static void init_block_index(MpegEncContext *const s) · 289 unmodified lines | |||
| 290 | s->block_index[1]= s->b8_stride*(s->mb_y*2 ) + 1 + s->mb_x*2; | 290 | s->block_index[1]= s->b8_stride*(s->mb_y*2 ) + 1 + s->mb_x*2; |
| 291 | s->block_index[2]= s->b8_stride*(s->mb_y*2 + 1) + s->mb_x*2; | 291 | s->block_index[2]= s->b8_stride*(s->mb_y*2 + 1) + s->mb_x*2; |
| 292 | s->block_index[3]= s->b8_stride*(s->mb_y*2 + 1) + 1 + s->mb_x*2; | 292 | s->block_index[3]= s->b8_stride*(s->mb_y*2 + 1) + 1 + s->mb_x*2; |
| 293 | s->block_index[4]= s->mb_stride*(s->mb_y + 1) + s->b8_stride*s->mb_height*2 + s->mb_x; | ||
| 294 | s->block_index[5]= s->mb_stride*(s->mb_y + s->mb_height + 2) + s->b8_stride*s->mb_height*2 + s->mb_x; | ||
| 295 | } | 293 | } |
| 296 | 294 | ||
| 297 | static int svq1_encode_plane(SVQ1EncContext *s, int plane, | 295 | static int svq1_encode_plane(SVQ1EncContext *s, int plane, |