Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1833:ba27ce284d07 libavcodec
export DCT coefficients patch by (Wolfgang Hesseler <wolfgang.hesseler at imk dot fraunhofer dot de>)
author | michael |
---|---|
date | Wed, 25 Feb 2004 18:29:17 +0000 |
parents | cd2d7fcfab7a |
children | 41c324b09fcc |
comparison
equal
deleted
inserted
replaced
1832:ac9e8597c2b7 | 1833:ba27ce284d07 |
---|---|
352 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+1) * sizeof(int16_t)*2) //FIXME | 352 CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+1) * sizeof(int16_t)*2) //FIXME |
353 pic->motion_val[i]= pic->motion_val_base[i]+1; | 353 pic->motion_val[i]= pic->motion_val_base[i]+1; |
354 } | 354 } |
355 pic->motion_subsample_log2= 3; | 355 pic->motion_subsample_log2= 3; |
356 } | 356 } |
357 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { | |
358 CHECKED_ALLOCZ(pic->dct_coeff, 64 * mb_array_size * sizeof(DCTELEM)*6) | |
359 } | |
357 pic->qstride= s->mb_stride; | 360 pic->qstride= s->mb_stride; |
358 CHECKED_ALLOCZ(pic->pan_scan , 1 * sizeof(AVPanScan)) | 361 CHECKED_ALLOCZ(pic->pan_scan , 1 * sizeof(AVPanScan)) |
359 } | 362 } |
360 | 363 |
361 //it might be nicer if the application would keep track of these but it would require a API change | 364 //it might be nicer if the application would keep track of these but it would require a API change |
383 av_freep(&pic->mc_mb_var); | 386 av_freep(&pic->mc_mb_var); |
384 av_freep(&pic->mb_mean); | 387 av_freep(&pic->mb_mean); |
385 av_freep(&pic->mbskip_table); | 388 av_freep(&pic->mbskip_table); |
386 av_freep(&pic->qscale_table); | 389 av_freep(&pic->qscale_table); |
387 av_freep(&pic->mb_type_base); | 390 av_freep(&pic->mb_type_base); |
391 av_freep(&pic->dct_coeff); | |
388 av_freep(&pic->pan_scan); | 392 av_freep(&pic->pan_scan); |
389 pic->mb_type= NULL; | 393 pic->mb_type= NULL; |
390 for(i=0; i<2; i++){ | 394 for(i=0; i<2; i++){ |
391 av_freep(&pic->motion_val_base[i]); | 395 av_freep(&pic->motion_val_base[i]); |
392 av_freep(&pic->ref_index[i]); | 396 av_freep(&pic->ref_index[i]); |
3077 } | 3081 } |
3078 #endif | 3082 #endif |
3079 | 3083 |
3080 mb_x = s->mb_x; | 3084 mb_x = s->mb_x; |
3081 mb_y = s->mb_y; | 3085 mb_y = s->mb_y; |
3086 | |
3087 if(s->avctx->debug&FF_DEBUG_DCT_COEFF) { | |
3088 /* save DCT coefficients */ | |
3089 int i,j; | |
3090 DCTELEM *dct = &s->current_picture.dct_coeff[mb_xy*64*6]; | |
3091 for(i=0; i<6; i++) | |
3092 for(j=0; j<64; j++) | |
3093 *dct++ = block[i][s->dsp.idct_permutation[j]]; | |
3094 } | |
3082 | 3095 |
3083 s->current_picture.qscale_table[mb_xy]= s->qscale; | 3096 s->current_picture.qscale_table[mb_xy]= s->qscale; |
3084 | 3097 |
3085 /* update DC predictors for P macroblocks */ | 3098 /* update DC predictors for P macroblocks */ |
3086 if (!s->mb_intra) { | 3099 if (!s->mb_intra) { |