summaryrefslogtreecommitdiff
path: root/libavcodec/vp8data.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-06-28 13:50:55 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-06-28 13:50:55 +0000
commit7c4dcf81658103b9506adcbf848bd23efe3b0b4e (patch)
treef04ecb6acdd8e925caaebc856f50c42c3aeeabb3 /libavcodec/vp8data.h
parent4332bfbff865c41d27d09eaf73409eac544e1350 (diff)
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
Diffstat (limited to 'libavcodec/vp8data.h')
-rw-r--r--libavcodec/vp8data.h15
1 files changed, 11 insertions, 4 deletions
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 };