From 6847ab437516fd6f845c4672a789c0c3e219bd22 Mon Sep 17 00:00:00 2001 From: Stefan Gehrer Date: Tue, 10 Feb 2009 22:38:02 +0000 Subject: introduce a macroblock index to avoid a few x*width+y calculations Originally committed as revision 17138 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/cavs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libavcodec/cavs.h') diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h index 8d07aed0ac..5ae664dd33 100644 --- a/libavcodec/cavs.h +++ b/libavcodec/cavs.h @@ -166,7 +166,7 @@ typedef struct { int loop_filter_disable; int alpha_offset, beta_offset; int ref_flag; - int mbx, mby; ///< macroblock coordinates + int mbx, mby, mbidx; ///< macroblock coordinates int flags; ///< availability flags of neighbouring macroblocks int stc; ///< last start code uint8_t *cy, *cu, *cv; ///< current MB sample pointers @@ -212,7 +212,6 @@ typedef struct { void (*intra_pred_l[8])(uint8_t *d,uint8_t *top,uint8_t *left,int stride); void (*intra_pred_c[7])(uint8_t *d,uint8_t *top,uint8_t *left,int stride); uint8_t *col_type_base; - uint8_t *col_type; /* scaling factors for MV prediction */ int sym_factor; ///< for scaling in symmetrical B block @@ -272,7 +271,7 @@ static inline void set_mv_intra(AVSContext *h) { h->mv[MV_BWD_X0] = ff_cavs_intra_mv; set_mvs(&h->mv[MV_BWD_X0], BLK_16X16); if(h->pic_type != FF_B_TYPE) - *h->col_type = I_8X8; + h->col_type_base[h->mbidx] = I_8X8; } static inline int dequant(AVSContext *h, DCTELEM *level_buf, uint8_t *run_buf, -- cgit v1.2.3