From 7c4dcf81658103b9506adcbf848bd23efe3b0b4e Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 28 Jun 2010 13:50:55 +0000 Subject: Optimize split MC, so we don't always do 4x4 blocks of 4x4pixels each, but we apply them as 16x8/8x16/8x8 subblocks where possible. Since this allows us to use width=8/16 instead of width=4 MC functions, we can now take more advantage of SSE2/SSSE3 optimizations, leading to a total speedup for splitMV filter of about 10%. Originally committed as revision 23853 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/vp8data.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'libavcodec/vp8data.h') diff --git a/libavcodec/vp8data.h b/libavcodec/vp8data.h index 0cd29ed571..5c9dc6e9ba 100644 --- a/libavcodec/vp8data.h +++ b/libavcodec/vp8data.h @@ -62,6 +62,13 @@ enum inter_submvmode { VP8_SUBMVMODE_NEW4X4 }; +enum inter_splitmvmode { + VP8_SPLITMVMODE_16x8 = 0, ///< 2 16x8 blocks (vertical) + VP8_SPLITMVMODE_8x16, ///< 2 8x16 blocks (horizontal) + VP8_SPLITMVMODE_8x8, ///< 2x2 blocks of 8x8px each + VP8_SPLITMVMODE_4x4, ///< 4x4 blocks of 4x4px each +}; + static const uint8_t vp8_pred4x4_mode[] = { [DC_PRED8x8] = DC_PRED, @@ -130,10 +137,10 @@ static const uint8_t vp8_mbfirstidx[4][16] = { }; static const int8_t vp8_mbsplit_tree[3][2] = { - { -3, 1 }, // '0' - 16 individual MVs - { -2, 2 }, // '10' - quarter-based MVs - { -0, -1 } // '110' - top/bottom MVs, - // '111' - left/right MVs + { -VP8_SPLITMVMODE_4x4, 1 }, // '0' - 16 individual MVs + { -VP8_SPLITMVMODE_8x8, 2 }, // '10' - quarter-based MVs + { -VP8_SPLITMVMODE_16x8, // '110' - top/bottom MVs + -VP8_SPLITMVMODE_8x16 } // '111' - left/right MVs }; static const uint8_t vp8_mbsplit_count[4] = { 2, 2, 4, 16 }; static const uint8_t vp8_mbsplit_prob[3] = { 110, 111, 150 }; -- cgit v1.2.3