From 7da52fa0dc8c93fa39bcd391c76d5a6b67684c6b Mon Sep 17 00:00:00 2001 From: Simon Horlick Date: Tue, 15 Mar 2011 01:39:49 +0000 Subject: [PATCH] MBAFF: Use both left macroblocks for ref_idx calculation --- common/macroblock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.47.3