From: Simon Horlick Date: Tue, 29 Mar 2011 14:47:04 +0000 (+0100) Subject: MBAFF: Clamp MVDs to 66 instead of 33 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=1f07f3253003ec1ff7ce7059eac7f689c3ec6f49;p=x264.git MBAFF: Clamp MVDs to 66 instead of 33 --- diff --git a/encoder/cabac.c b/encoder/cabac.c index e04f14ba..22c1ce3b 100644 --- a/encoder/cabac.c +++ b/encoder/cabac.c @@ -424,9 +424,9 @@ static ALWAYS_INLINE int x264_cabac_mb_mvd_cpn( x264_t *h, x264_cabac_t *cb, int x264_cabac_encode_bypass( cb, mvd >> 31 ); } #endif - /* Since we don't need to keep track of MVDs larger than 33, just cap the value. + /* Since we don't need to keep track of MVDs larger than 66, just cap the value. * This lets us store MVDs as 8-bit values instead of 16-bit. */ - return X264_MIN( i_abs, 33 ); + return X264_MIN( i_abs, 66 ); } static NOINLINE uint16_t x264_cabac_mb_mvd( x264_t *h, x264_cabac_t *cb, int i_list, int idx, int width ) diff --git a/encoder/me.c b/encoder/me.c index 72e486af..38f27ec4 100644 --- a/encoder/me.c +++ b/encoder/me.c @@ -1226,7 +1226,7 @@ void x264_me_refine_qpel_rd( x264_t *h, x264_me_t *m, int i_lambda2, int i4, int m->mv[0] = bmx; m->mv[1] = bmy; x264_macroblock_cache_mv ( h, block_idx_x[i4], block_idx_y[i4], bw>>2, bh>>2, i_list, pack16to32_mask(bmx, bmy) ); - amvd = pack8to16( X264_MIN(abs(bmx - m->mvp[0]),33), X264_MIN(abs(bmy - m->mvp[1]),33) ); + amvd = pack8to16( X264_MIN(abs(bmx - m->mvp[0]),66), X264_MIN(abs(bmy - m->mvp[1]),66) ); x264_macroblock_cache_mvd( h, block_idx_x[i4], block_idx_y[i4], bw>>2, bh>>2, i_list, amvd ); h->mb.b_skip_mc = 0; }