Mercurial > libavcodec.hg
diff cavs.c @ 8796:c6dd98bff427 libavcodec
introduce a macroblock index to avoid a few x*width+y calculations
author | stefang |
---|---|
date | Tue, 10 Feb 2009 22:38:02 +0000 |
parents | e18df4791658 |
children | 0dce4fe6e6f3 |
line wrap: on
line diff
--- a/cavs.c Tue Feb 10 20:51:35 2009 +0000 +++ b/cavs.c Tue Feb 10 22:38:02 2009 +0000 @@ -567,8 +567,6 @@ 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 @@ 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 @@ 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; }