Mercurial > libavcodec.hg
diff vp8data.h @ 11989:176c5deb6756 libavcodec
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%.
author | rbultje |
---|---|
date | Mon, 28 Jun 2010 13:50:55 +0000 |
parents | 1e8556438209 |
children | 3c51d7ac41c9 |
line wrap: on
line diff
--- a/vp8data.h Mon Jun 28 10:56:16 2010 +0000 +++ b/vp8data.h Mon Jun 28 13:50:55 2010 +0000 @@ -62,6 +62,13 @@ 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 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 };