|
|
|
@ -307,7 +307,7 @@ static void copy_picture_attributes(MpegEncContext *s, AVFrame *dst, AVFrame *sr |
|
|
|
|
memcpy(dst->motion_val[i], src->motion_val[i], 2*stride*height*sizeof(int16_t)); |
|
|
|
|
} |
|
|
|
|
if(src->ref_index[i] && src->ref_index[i] != dst->ref_index[i]){ |
|
|
|
|
memcpy(dst->ref_index[i], src->ref_index[i], s->mb_stride*s->mb_height*sizeof(int8_t)); //FIXME init this too
|
|
|
|
|
memcpy(dst->ref_index[i], src->ref_index[i], s->b8_stride*2*s->mb_height*sizeof(int8_t)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -369,14 +369,14 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){ |
|
|
|
|
for(i=0; i<2; i++){ |
|
|
|
|
CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+2) * sizeof(int16_t)) |
|
|
|
|
pic->motion_val[i]= pic->motion_val_base[i]+2; |
|
|
|
|
CHECKED_ALLOCZ(pic->ref_index[i] , b8_array_size * sizeof(uint8_t)) |
|
|
|
|
CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) |
|
|
|
|
} |
|
|
|
|
pic->motion_subsample_log2= 2; |
|
|
|
|
}else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){ |
|
|
|
|
for(i=0; i<2; i++){ |
|
|
|
|
CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+2) * sizeof(int16_t)) |
|
|
|
|
pic->motion_val[i]= pic->motion_val_base[i]+2; |
|
|
|
|
CHECKED_ALLOCZ(pic->ref_index[i], mb_array_size * sizeof(int8_t)) |
|
|
|
|
CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) |
|
|
|
|
} |
|
|
|
|
pic->motion_subsample_log2= 3; |
|
|
|
|
} |
|
|
|
|