From: Simon Horlick Date: Tue, 15 Mar 2011 01:39:49 +0000 (+0000) Subject: MBAFF: Use both left macroblocks for ref_idx calculation X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=7da52fa0dc8c93fa39bcd391c76d5a6b67684c6b;p=x264.git MBAFF: Use both left macroblocks for ref_idx calculation --- diff --git a/common/macroblock.c b/common/macroblock.c index 95adbeae..5230190a 100644 --- a/common/macroblock.c +++ b/common/macroblock.c @@ -1177,8 +1177,9 @@ void x264_macroblock_cache_load( x264_t *h, int mb_x, int mb_y ) uint8_t skipbp; x264_macroblock_cache_skip( h, 0, 0, 4, 4, 0 ); skipbp = (h->mb.i_neighbour & MB_LEFT) ? h->mb.skipbp[left[0]] : 0; - h->mb.cache.skip[x264_scan8[0] - 1] = skipbp & 0x2; - h->mb.cache.skip[x264_scan8[8] - 1] = skipbp & 0x8; + h->mb.cache.skip[x264_scan8[0] - 1] = (skipbp >> (1+(left_index_table->mv[0]&~1))) & 1; + skipbp = (h->mb.i_neighbour & MB_LEFT) ? h->mb.skipbp[left[1]] : 0; + h->mb.cache.skip[x264_scan8[8] - 1] = (skipbp >> (1+(left_index_table->mv[2]&~1))) & 1; skipbp = (h->mb.i_neighbour & MB_TOP) ? h->mb.skipbp[top] : 0; h->mb.cache.skip[x264_scan8[0] - 8] = skipbp & 0x4; h->mb.cache.skip[x264_scan8[4] - 8] = skipbp & 0x8;