summaryrefslogtreecommitdiff
path: root/vp8/common/entropymode.c
diff options
context:
space:
mode:
Diffstat (limited to 'vp8/common/entropymode.c')
-rw-r--r--vp8/common/entropymode.c50
1 files changed, 47 insertions, 3 deletions
diff --git a/vp8/common/entropymode.c b/vp8/common/entropymode.c
index e48df3b36..4500e9c11 100644
--- a/vp8/common/entropymode.c
+++ b/vp8/common/entropymode.c
@@ -9,10 +9,8 @@
*/
+#include "onyxc_int.h"
#include "modecont.h"
-#include "entropymode.h"
-#include "entropymv.h"
-#include "entropy.h"
#include "vpx_mem/vpx_mem.h"
@@ -286,6 +284,10 @@ void vp8_init_mbmode_probs(VP8_COMMON *x) {
vpx_memcpy(x->fc.sub_mv_ref_prob, vp8_sub_mv_ref_prob2, sizeof(vp8_sub_mv_ref_prob2));
vpx_memcpy(x->fc.mbsplit_prob, vp8_mbsplit_probs, sizeof(vp8_mbsplit_probs));
+#if CONFIG_SWITCHABLE_INTERP
+ vpx_memcpy(x->fc.switchable_interp_prob, vp8_switchable_interp_prob,
+ sizeof(vp8_switchable_interp_prob));
+#endif
}
@@ -323,6 +325,44 @@ void vp8_kf_default_bmode_probs(vp8_prob p [VP8_BINTRAMODES] [VP8_BINTRAMODES] [
} while (++i < VP8_BINTRAMODES);
}
+#if CONFIG_SWITCHABLE_INTERP
+#if VP8_SWITCHABLE_FILTERS == 3
+const vp8_tree_index vp8_switchable_interp_tree[VP8_SWITCHABLE_FILTERS*2-2] = {
+ -0, 2,
+ -1, -2
+};
+struct vp8_token_struct vp8_switchable_interp_encodings[VP8_SWITCHABLE_FILTERS];
+const INTERPOLATIONFILTERTYPE vp8_switchable_interp[VP8_SWITCHABLE_FILTERS] = {
+ EIGHTTAP, SIXTAP, EIGHTTAP_SHARP};
+const int vp8_switchable_interp_map[SWITCHABLE+1] = {1, -1, 0, 2, -1};
+const vp8_prob vp8_switchable_interp_prob [VP8_SWITCHABLE_FILTERS+1]
+ [VP8_SWITCHABLE_FILTERS-1] = {
+ {248, 192}, { 32, 248}, { 32, 32}, {192, 160}
+};
+#elif VP8_SWITCHABLE_FILTERS == 2
+const vp8_tree_index vp8_switchable_interp_tree[VP8_SWITCHABLE_FILTERS*2-2] = {
+ -0, -1,
+};
+struct vp8_token_struct vp8_switchable_interp_encodings[VP8_SWITCHABLE_FILTERS];
+const vp8_prob vp8_switchable_interp_prob [VP8_SWITCHABLE_FILTERS+1]
+ [VP8_SWITCHABLE_FILTERS-1] = {
+ {248},
+ { 64},
+ {192},
+};
+//#define SWITCHABLE_86
+#ifdef SWITCHABLE_86
+const INTERPOLATIONFILTERTYPE vp8_switchable_interp[VP8_SWITCHABLE_FILTERS] = {
+ EIGHTTAP, SIXTAP};
+const int vp8_switchable_interp_map[SWITCHABLE+1] = {1, -1, 0, -1, -1}; //8, 6
+#else
+const INTERPOLATIONFILTERTYPE vp8_switchable_interp[VP8_SWITCHABLE_FILTERS] = {
+ EIGHTTAP, EIGHTTAP_SHARP};
+const int vp8_switchable_interp_map[SWITCHABLE+1] = {-1, -1, 0, 1, -1}; //8, 8s
+#endif
+#endif
+#endif
+
void vp8_entropy_mode_init() {
vp8_tokens_from_tree(vp8_bmode_encodings, vp8_bmode_tree);
@@ -331,6 +371,10 @@ void vp8_entropy_mode_init() {
vp8_tokens_from_tree(vp8_uv_mode_encodings, vp8_uv_mode_tree);
vp8_tokens_from_tree(vp8_i8x8_mode_encodings, vp8_i8x8_mode_tree);
vp8_tokens_from_tree(vp8_mbsplit_encodings, vp8_mbsplit_tree);
+#if CONFIG_SWITCHABLE_INTERP
+ vp8_tokens_from_tree(vp8_switchable_interp_encodings,
+ vp8_switchable_interp_tree);
+#endif
vp8_tokens_from_tree_offset(vp8_mv_ref_encoding_array,
vp8_mv_ref_tree, NEARESTMV);