Mercurial > libavcodec.hg
changeset 5241:74b6423a5a0d libavcodec
setting special motion vectors in intra macroblocks
is now in its own inline function
author | stefang |
---|---|
date | Sat, 07 Jul 2007 06:34:30 +0000 |
parents | 1701ce572fed |
children | deb5b8213d4e |
files | cavs.c cavs.h |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/cavs.c Sat Jul 07 06:27:44 2007 +0000 +++ b/cavs.c Sat Jul 07 06:34:30 2007 +0000 @@ -645,15 +645,7 @@ decode_residual_chroma(h); filter_mb(h,I_8X8); - - /* mark motion vectors as intra */ - h->mv[MV_FWD_X0] = ff_cavs_intra_mv; - set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); - 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; - + set_mv_intra(h); return 0; }
--- a/cavs.h Sat Jul 07 06:27:44 2007 +0000 +++ b/cavs.h Sat Jul 07 06:34:30 2007 +0000 @@ -228,6 +228,7 @@ extern const int_fast8_t ff_top_modifier_l[8]; extern const int_fast8_t ff_left_modifier_c[7]; extern const int_fast8_t ff_top_modifier_c[7]; +extern const vector_t ff_cavs_intra_mv; extern const vector_t ff_cavs_un_mv; static inline void load_intra_pred_luma(AVSContext *h, uint8_t *top, @@ -344,6 +345,16 @@ } } +static inline void set_mv_intra(AVSContext *h) { + h->mv[MV_FWD_X0] = ff_cavs_intra_mv; + set_mvs(&h->mv[MV_FWD_X0], BLK_16X16); + 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; +} + + /** * initialise predictors for motion vectors and intra prediction */