From 759001c534287a96dc96d1e274665feb7059145d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 21 Nov 2012 21:34:46 +0100 Subject: lavc decoders: work with refcounted frames. --- libavcodec/mpeg4videoenc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/mpeg4videoenc.c') diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 9bb1f9a0bc..fb4d7a8743 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -126,7 +126,7 @@ static inline int decide_ac_pred(MpegEncContext * s, int16_t block[6][64], const { int score= 0; int i, n; - int8_t * const qscale_table = s->current_picture.f.qscale_table; + int8_t * const qscale_table = s->current_picture.qscale_table; memcpy(zigzag_last_index, s->block_last_index, sizeof(int)*6); @@ -203,7 +203,7 @@ static inline int decide_ac_pred(MpegEncContext * s, int16_t block[6][64], const */ void ff_clean_mpeg4_qscales(MpegEncContext *s){ int i; - int8_t * const qscale_table = s->current_picture.f.qscale_table; + int8_t * const qscale_table = s->current_picture.qscale_table; ff_clean_h263_qscales(s); @@ -499,7 +499,7 @@ void ff_mpeg4_encode_mb(MpegEncContext * s, assert(mb_type>=0); /* nothing to do if this MB was skipped in the next P Frame */ - if (s->next_picture.f.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { //FIXME avoid DCT & ... + if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) { //FIXME avoid DCT & ... s->skip_count++; s->mv[0][0][0]= s->mv[0][0][1]= @@ -643,7 +643,7 @@ void ff_mpeg4_encode_mb(MpegEncContext * s, break; b_pic = pic->f.data[0] + offset; - if (pic->f.type != FF_BUFFER_TYPE_SHARED) + if (!pic->shared) b_pic+= INPLACE_OFFSET; diff= s->dsp.sad[0](NULL, p_pic, b_pic, s->linesize, 16); if(diff>s->qscale*70){ //FIXME check that 70 is optimal @@ -747,8 +747,8 @@ void ff_mpeg4_encode_mb(MpegEncContext * s, /* motion vectors: 8x8 mode*/ ff_h263_pred_motion(s, i, 0, &pred_x, &pred_y); - ff_h263_encode_motion_vector(s, s->current_picture.f.motion_val[0][ s->block_index[i] ][0] - pred_x, - s->current_picture.f.motion_val[0][ s->block_index[i] ][1] - pred_y, s->f_code); + ff_h263_encode_motion_vector(s, s->current_picture.motion_val[0][ s->block_index[i] ][0] - pred_x, + s->current_picture.motion_val[0][ s->block_index[i] ][1] - pred_y, s->f_code); } } -- cgit v1.2.3