summaryrefslogtreecommitdiff
path: root/libavcodec/cavs.c
diff options
context:
space:
mode:
authorStefan Gehrer <stefan.gehrer@gmx.de>2009-02-10 22:38:02 +0000
committerStefan Gehrer <stefan.gehrer@gmx.de>2009-02-10 22:38:02 +0000
commit6847ab437516fd6f845c4672a789c0c3e219bd22 (patch)
tree43f2ed0a31a1c754a807c3b161270b2b8cbc32ec /libavcodec/cavs.c
parentb9fce052053b230745c7a4dd097e93b03f94af71 (diff)
introduce a macroblock index to avoid a few x*width+y calculations
Originally committed as revision 17138 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cavs.c')
-rw-r--r--libavcodec/cavs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 61f24f72cc..f7338c6878 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -567,8 +567,6 @@ void ff_cavs_init_mb(AVSContext *h) {
h->mv[MV_FWD_D3] = ff_cavs_un_mv;
h->mv[MV_BWD_D3] = ff_cavs_un_mv;
}
- /* set pointer for co-located macroblock type */
- h->col_type = &h->col_type_base[h->mby*h->mb_width + h->mbx];
}
/**
@@ -592,6 +590,7 @@ int ff_cavs_next_mb(AVSContext *h) {
h->top_mv[1][h->mbx*2+0] = h->mv[MV_BWD_X2];
h->top_mv[1][h->mbx*2+1] = h->mv[MV_BWD_X3];
/* next MB address */
+ h->mbidx++;
h->mbx++;
if(h->mbx == h->mb_width) { //new mb line
h->flags = B_AVAIL|C_AVAIL;
@@ -637,7 +636,7 @@ void ff_cavs_init_pic(AVSContext *h) {
h->c_stride = h->picture.linesize[1];
h->luma_scan[2] = 8*h->l_stride;
h->luma_scan[3] = 8*h->l_stride+8;
- h->mbx = h->mby = 0;
+ h->mbx = h->mby = h->mbidx = 0;
h->flags = 0;
}