Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
11988:e382860b855f | 11989:176c5deb6756 |
---|---|
60 VP8_SUBMVMODE_TOP4X4, | 60 VP8_SUBMVMODE_TOP4X4, |
61 VP8_SUBMVMODE_ZERO4X4, | 61 VP8_SUBMVMODE_ZERO4X4, |
62 VP8_SUBMVMODE_NEW4X4 | 62 VP8_SUBMVMODE_NEW4X4 |
63 }; | 63 }; |
64 | 64 |
65 enum inter_splitmvmode { | |
66 VP8_SPLITMVMODE_16x8 = 0, ///< 2 16x8 blocks (vertical) | |
67 VP8_SPLITMVMODE_8x16, ///< 2 8x16 blocks (horizontal) | |
68 VP8_SPLITMVMODE_8x8, ///< 2x2 blocks of 8x8px each | |
69 VP8_SPLITMVMODE_4x4, ///< 4x4 blocks of 4x4px each | |
70 }; | |
71 | |
65 static const uint8_t vp8_pred4x4_mode[] = | 72 static const uint8_t vp8_pred4x4_mode[] = |
66 { | 73 { |
67 [DC_PRED8x8] = DC_PRED, | 74 [DC_PRED8x8] = DC_PRED, |
68 [VERT_PRED8x8] = VERT_PRED, | 75 [VERT_PRED8x8] = VERT_PRED, |
69 [HOR_PRED8x8] = HOR_PRED, | 76 [HOR_PRED8x8] = HOR_PRED, |
128 { 0, 1, 2, 3, 4, 5, 6, 7, | 135 { 0, 1, 2, 3, 4, 5, 6, 7, |
129 8, 9, 10, 11, 12, 13, 14, 15 } | 136 8, 9, 10, 11, 12, 13, 14, 15 } |
130 }; | 137 }; |
131 | 138 |
132 static const int8_t vp8_mbsplit_tree[3][2] = { | 139 static const int8_t vp8_mbsplit_tree[3][2] = { |
133 { -3, 1 }, // '0' - 16 individual MVs | 140 { -VP8_SPLITMVMODE_4x4, 1 }, // '0' - 16 individual MVs |
134 { -2, 2 }, // '10' - quarter-based MVs | 141 { -VP8_SPLITMVMODE_8x8, 2 }, // '10' - quarter-based MVs |
135 { -0, -1 } // '110' - top/bottom MVs, | 142 { -VP8_SPLITMVMODE_16x8, // '110' - top/bottom MVs |
136 // '111' - left/right MVs | 143 -VP8_SPLITMVMODE_8x16 } // '111' - left/right MVs |
137 }; | 144 }; |
138 static const uint8_t vp8_mbsplit_count[4] = { 2, 2, 4, 16 }; | 145 static const uint8_t vp8_mbsplit_count[4] = { 2, 2, 4, 16 }; |
139 static const uint8_t vp8_mbsplit_prob[3] = { 110, 111, 150 }; | 146 static const uint8_t vp8_mbsplit_prob[3] = { 110, 111, 150 }; |
140 | 147 |
141 static const uint8_t vp8_submv_prob[5][3] = { | 148 static const uint8_t vp8_submv_prob[5][3] = { |