comparison mpegvideo.c @ 2570:682c57163e60 libavcodec

alignment fix
author michael
date Sat, 19 Mar 2005 13:10:09 +0000
parents 9a7770ebed14
children e237d9bd0f8c
comparison
equal deleted inserted replaced
2569:980f66959698 2570:682c57163e60
383 CHECKED_ALLOCZ(pic->qscale_table , mb_array_size * sizeof(uint8_t)) 383 CHECKED_ALLOCZ(pic->qscale_table , mb_array_size * sizeof(uint8_t))
384 CHECKED_ALLOCZ(pic->mb_type_base , big_mb_num * sizeof(uint32_t)) 384 CHECKED_ALLOCZ(pic->mb_type_base , big_mb_num * sizeof(uint32_t))
385 pic->mb_type= pic->mb_type_base + s->mb_stride+1; 385 pic->mb_type= pic->mb_type_base + s->mb_stride+1;
386 if(s->out_format == FMT_H264){ 386 if(s->out_format == FMT_H264){
387 for(i=0; i<2; i++){ 387 for(i=0; i<2; i++){
388 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+2) * sizeof(int16_t)) 388 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+4) * sizeof(int16_t))
389 pic->motion_val[i]= pic->motion_val_base[i]+2; 389 pic->motion_val[i]= pic->motion_val_base[i]+4;
390 CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) 390 CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t))
391 } 391 }
392 pic->motion_subsample_log2= 2; 392 pic->motion_subsample_log2= 2;
393 }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){ 393 }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){
394 for(i=0; i<2; i++){ 394 for(i=0; i<2; i++){
395 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+2) * sizeof(int16_t)) 395 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+4) * sizeof(int16_t))
396 pic->motion_val[i]= pic->motion_val_base[i]+2; 396 pic->motion_val[i]= pic->motion_val_base[i]+4;
397 CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) 397 CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t))
398 } 398 }
399 pic->motion_subsample_log2= 3; 399 pic->motion_subsample_log2= 3;
400 } 400 }
401 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { 401 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) {