comparison mpegvideo.c @ 1885:6588eda7d107 libavcodec

alignment fix
author michael
date Sun, 14 Mar 2004 17:55:50 +0000
parents de6a0d995ca7
children 5ac49e7a1b8f
comparison
equal deleted inserted replaced
1884:de6a0d995ca7 1885:6588eda7d107
338 CHECKED_ALLOCZ(pic->qscale_table , mb_array_size * sizeof(uint8_t)) 338 CHECKED_ALLOCZ(pic->qscale_table , mb_array_size * sizeof(uint8_t))
339 CHECKED_ALLOCZ(pic->mb_type_base , big_mb_num * sizeof(uint32_t)) 339 CHECKED_ALLOCZ(pic->mb_type_base , big_mb_num * sizeof(uint32_t))
340 pic->mb_type= pic->mb_type_base + s->mb_stride+1; 340 pic->mb_type= pic->mb_type_base + s->mb_stride+1;
341 if(s->out_format == FMT_H264){ 341 if(s->out_format == FMT_H264){
342 for(i=0; i<2; i++){ 342 for(i=0; i<2; i++){
343 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+1) * sizeof(int16_t)) 343 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+2) * sizeof(int16_t))
344 pic->motion_val[i]= pic->motion_val_base[i]+1; 344 pic->motion_val[i]= pic->motion_val_base[i]+2;
345 CHECKED_ALLOCZ(pic->ref_index[i] , b8_array_size * sizeof(uint8_t)) 345 CHECKED_ALLOCZ(pic->ref_index[i] , b8_array_size * sizeof(uint8_t))
346 } 346 }
347 pic->motion_subsample_log2= 2; 347 pic->motion_subsample_log2= 2;
348 }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){ 348 }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){
349 for(i=0; i<2; i++){ 349 for(i=0; i<2; i++){
350 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+1) * sizeof(int16_t)*2) //FIXME 350 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+2) * sizeof(int16_t)*2) //FIXME
351 pic->motion_val[i]= pic->motion_val_base[i]+1; 351 pic->motion_val[i]= pic->motion_val_base[i]+2;
352 } 352 }
353 pic->motion_subsample_log2= 3; 353 pic->motion_subsample_log2= 3;
354 } 354 }
355 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { 355 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) {
356 CHECKED_ALLOCZ(pic->dct_coeff, 64 * mb_array_size * sizeof(DCTELEM)*6) 356 CHECKED_ALLOCZ(pic->dct_coeff, 64 * mb_array_size * sizeof(DCTELEM)*6)