diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-12-17 20:10:15 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-12-17 20:10:15 +0000 |
commit | bb39171beb47fe2982eb099d9ce34a7d39e7364a (patch) | |
tree | af30b1616a8e0d8f29a1db397704ddf18a64eb9a /libavcodec/rv34.c | |
parent | f8c5adaf9c26b6aabfa2d9165e92857171c95fb6 (diff) | |
download | ffmpeg-bb39171beb47fe2982eb099d9ce34a7d39e7364a.tar.gz |
use precalculated mb_pos where available
Originally committed as revision 16194 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index da0e5f4c03..5e2dc03ba5 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1148,13 +1148,13 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) s->qscale = r->si.quant; cbp = cbp2 = rv34_decode_mb_header(r, intra_types); - r->cbp_luma [s->mb_x + s->mb_y * s->mb_stride] = cbp; - r->cbp_chroma[s->mb_x + s->mb_y * s->mb_stride] = cbp >> 16; + r->cbp_luma [mb_pos] = cbp; + r->cbp_chroma[mb_pos] = cbp >> 16; if(s->pict_type == FF_I_TYPE) r->deblock_coefs[mb_pos] = 0xFFFF; else r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos]; - s->current_picture_ptr->qscale_table[s->mb_x + s->mb_y * s->mb_stride] = s->qscale; + s->current_picture_ptr->qscale_table[mb_pos] = s->qscale; if(cbp == -1) return -1; @@ -1188,7 +1188,7 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) rv34_dequant4x4(s->block[blknum] + blkoff, rv34_qscale_tab[rv34_chroma_quant[1][s->qscale]],rv34_qscale_tab[rv34_chroma_quant[0][s->qscale]]); rv34_inv_transform(s->block[blknum] + blkoff); } - if(IS_INTRA(s->current_picture_ptr->mb_type[s->mb_x + s->mb_y*s->mb_stride])) + if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])) rv34_output_macroblock(r, intra_types, cbp2, r->is16); else rv34_apply_differences(r, cbp2); |