comparison svq1.c @ 2153:e0d88f21d864 libavcodec

svq1 mv array size fix
author michael
date Wed, 28 Jul 2004 10:13:45 +0000
parents 79a512d7a347
children de5ed621effc
comparison
equal deleted inserted replaced
2152:2f6518c0e6cc 2153:e0d88f21d864
1106 s->m.pict_type= s->picture.pict_type; 1106 s->m.pict_type= s->picture.pict_type;
1107 s->m.qscale= s->picture.quality/FF_QP2LAMBDA; 1107 s->m.qscale= s->picture.quality/FF_QP2LAMBDA;
1108 s->m.me_method= s->avctx->me_method; 1108 s->m.me_method= s->avctx->me_method;
1109 1109
1110 if(!s->motion_val8[plane]){ 1110 if(!s->motion_val8[plane]){
1111 s->motion_val8 [plane]= av_mallocz(s->m.b8_stride*block_height*2*2*sizeof(int16_t)); 1111 s->motion_val8 [plane]= av_mallocz((s->m.b8_stride*block_height*2 + 2)*2*sizeof(int16_t));
1112 s->motion_val16[plane]= av_mallocz(s->m.mb_stride*block_height*2*sizeof(int16_t)); 1112 s->motion_val16[plane]= av_mallocz((s->m.mb_stride*(block_height + 2) + 1)*2*sizeof(int16_t));
1113 } 1113 }
1114 1114
1115 s->m.mb_type= s->mb_type; 1115 s->m.mb_type= s->mb_type;
1116 1116
1117 //dummies, to avoid segfaults 1117 //dummies, to avoid segfaults
1118 s->m.current_picture.mb_mean= (uint8_t *)s->dummy; 1118 s->m.current_picture.mb_mean= (uint8_t *)s->dummy;
1119 s->m.current_picture.mb_var= (uint16_t*)s->dummy; 1119 s->m.current_picture.mb_var= (uint16_t*)s->dummy;
1120 s->m.current_picture.mc_mb_var= (uint16_t*)s->dummy; 1120 s->m.current_picture.mc_mb_var= (uint16_t*)s->dummy;
1121 s->m.current_picture.mb_type= s->dummy; 1121 s->m.current_picture.mb_type= s->dummy;
1122 1122
1123 s->m.current_picture.motion_val[0]= s->motion_val8[plane]; 1123 s->m.current_picture.motion_val[0]= s->motion_val8[plane] + 2;
1124 s->m.p_mv_table= s->motion_val16[plane]; 1124 s->m.p_mv_table= s->motion_val16[plane] + s->m.mb_stride + 1;
1125 s->m.dsp= s->dsp; //move 1125 s->m.dsp= s->dsp; //move
1126 ff_init_me(&s->m); 1126 ff_init_me(&s->m);
1127 1127
1128 s->m.me.dia_size= s->avctx->dia_size; 1128 s->m.me.dia_size= s->avctx->dia_size;
1129 s->m.first_slice_line=1; 1129 s->m.first_slice_line=1;