Mercurial > libavcodec.hg
changeset 5235:5e6c54a13769 libavcodec
make vector constants global
author | stefang |
---|---|
date | Sat, 07 Jul 2007 04:54:05 +0000 |
parents | c94c4aa7d25f |
children | 1e80bd238744 |
files | cavs.c cavsdata.h |
diffstat | 2 files changed, 22 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/cavs.c Fri Jul 06 15:24:08 2007 +0000 +++ b/cavs.c Sat Jul 07 04:54:05 2007 +0000 @@ -592,7 +592,7 @@ ((mvA->ref == NOT_AVAIL) || (mvB->ref == NOT_AVAIL) || ((mvA->x | mvA->y | mvA->ref) == 0) || ((mvB->x | mvB->y | mvB->ref) == 0) )) { - mvP2 = &un_mv; + mvP2 = &ff_cavs_un_mv; /* if there is only one suitable candidate, take it */ } else if((mvA->ref >= 0) && (mvB->ref < 0) && (mvC->ref < 0)) { mvP2= mvA; @@ -746,10 +746,10 @@ h->pred_mode_Y[2] = h->top_pred_Y[h->mbx*2+1]; /* clear top predictors if MB B is not available */ if(!(h->flags & B_AVAIL)) { - h->mv[MV_FWD_B2] = un_mv; - h->mv[MV_FWD_B3] = un_mv; - h->mv[MV_BWD_B2] = un_mv; - h->mv[MV_BWD_B3] = un_mv; + h->mv[MV_FWD_B2] = ff_cavs_un_mv; + h->mv[MV_FWD_B3] = ff_cavs_un_mv; + h->mv[MV_BWD_B2] = ff_cavs_un_mv; + h->mv[MV_BWD_B3] = ff_cavs_un_mv; h->pred_mode_Y[1] = h->pred_mode_Y[2] = NOT_AVAIL; h->flags &= ~(C_AVAIL|D_AVAIL); } else if(h->mbx) { @@ -759,13 +759,13 @@ h->flags &= ~C_AVAIL; /* clear top-right predictors if MB C is not available */ if(!(h->flags & C_AVAIL)) { - h->mv[MV_FWD_C2] = un_mv; - h->mv[MV_BWD_C2] = un_mv; + h->mv[MV_FWD_C2] = ff_cavs_un_mv; + h->mv[MV_BWD_C2] = ff_cavs_un_mv; } /* clear top-left predictors if MB D is not available */ if(!(h->flags & D_AVAIL)) { - h->mv[MV_FWD_D3] = un_mv; - h->mv[MV_BWD_D3] = un_mv; + 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]; @@ -801,7 +801,7 @@ h->pred_mode_Y[3] = h->pred_mode_Y[6] = NOT_AVAIL; /* clear left mv predictors */ for(i=0;i<=20;i+=4) - h->mv[i] = un_mv; + h->mv[i] = ff_cavs_un_mv; h->mbx = 0; h->mby++; /* re-calculate sample pointers */ @@ -911,9 +911,9 @@ filter_mb(h,I_8X8); /* mark motion vectors as intra */ - h->mv[MV_FWD_X0] = intra_mv; + h->mv[MV_FWD_X0] = ff_cavs_intra_mv; set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); - h->mv[MV_BWD_X0] = intra_mv; + 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; @@ -972,9 +972,9 @@ init_mb(h); /* reset all MVs */ - h->mv[MV_FWD_X0] = dir_mv; + h->mv[MV_FWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); - h->mv[MV_BWD_X0] = dir_mv; + h->mv[MV_BWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_BWD_X0], BLK_16X16); switch(mb_type) { case B_SKIP: @@ -1116,10 +1116,10 @@ /* clear some predictors */ for(i=0;i<=20;i+=4) - h->mv[i] = un_mv; - h->mv[MV_BWD_X0] = dir_mv; + h->mv[i] = ff_cavs_un_mv; + h->mv[MV_BWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_BWD_X0], BLK_16X16); - h->mv[MV_FWD_X0] = dir_mv; + h->mv[MV_FWD_X0] = ff_cavs_dir_mv; set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); h->pred_mode_Y[3] = h->pred_mode_Y[6] = NOT_AVAIL; h->cy = h->picture.data[0]; @@ -1424,8 +1424,8 @@ h->intra_pred_c[ INTRA_C_LP_LEFT] = intra_pred_lp_left; h->intra_pred_c[ INTRA_C_LP_TOP] = intra_pred_lp_top; h->intra_pred_c[ INTRA_C_DC_128] = intra_pred_dc_128; - h->mv[ 7] = un_mv; - h->mv[19] = un_mv; + h->mv[ 7] = ff_cavs_un_mv; + h->mv[19] = ff_cavs_un_mv; return 0; }
--- a/cavsdata.h Fri Jul 06 15:24:08 2007 +0000 +++ b/cavsdata.h Sat Jul 07 04:54:05 2007 +0000 @@ -106,14 +106,14 @@ /** marks block as unavailable, i.e. out of picture or not yet decoded */ -static const vector_t un_mv = {0,0,1,NOT_AVAIL}; +const vector_t ff_cavs_un_mv = {0,0,1,NOT_AVAIL}; /** marks block as "no prediction from this direction" e.g. forward motion vector in BWD partition */ -static const vector_t dir_mv = {0,0,1,REF_DIR}; +const vector_t ff_cavs_dir_mv = {0,0,1,REF_DIR}; /** marks block as using intra prediction */ -static const vector_t intra_mv = {0,0,1,REF_INTRA}; +const vector_t ff_cavs_intra_mv = {0,0,1,REF_INTRA}; #define EOB 0,0,0