diff options
author | Deb Mukherjee <debargha@google.com> | 2012-08-03 12:17:18 -0700 |
---|---|---|
committer | Deb Mukherjee <debargha@google.com> | 2012-08-03 13:38:49 -0700 |
commit | 2af5473a90306b993d145ef64faad6ad1ed21a4d (patch) | |
tree | 6ca204f45bb96af6425a870bd206a8357737e951 /vp8/common | |
parent | fcbff9ee04f5b67ce79fd329333c8b1970d9318d (diff) | |
download | libvpx-2af5473a90306b993d145ef64faad6ad1ed21a4d.tar libvpx-2af5473a90306b993d145ef64faad6ad1ed21a4d.tar.gz libvpx-2af5473a90306b993d145ef64faad6ad1ed21a4d.tar.bz2 libvpx-2af5473a90306b993d145ef64faad6ad1ed21a4d.zip |
Merging in high_precision_mv experiment
Merged in the high_precision_mv experiment to make it easier
to work on new mv encoding strategies. Also removed
coef_update_probs3().
Change-Id: I82d3b0bb642419fe05dba82528bc9ba010e90924
Diffstat (limited to 'vp8/common')
-rw-r--r-- | vp8/common/blockd.h | 2 | ||||
-rw-r--r-- | vp8/common/entropy.h | 2 | ||||
-rw-r--r-- | vp8/common/entropymv.c | 12 | ||||
-rw-r--r-- | vp8/common/entropymv.h | 5 | ||||
-rw-r--r-- | vp8/common/findnearmv.c | 2 | ||||
-rw-r--r-- | vp8/common/onyxc_int.h | 6 |
6 files changed, 1 insertions, 28 deletions
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h index 3c43a1e9a..2932fd497 100644 --- a/vp8/common/blockd.h +++ b/vp8/common/blockd.h @@ -404,9 +404,7 @@ typedef struct MacroBlockD { vp8_subpix_fn_t subpixel_predict_avg8x4; vp8_subpix_fn_t subpixel_predict_avg8x8; vp8_subpix_fn_t subpixel_predict_avg16x16; -#if CONFIG_HIGH_PRECISION_MV int allow_high_precision_mv; -#endif /* CONFIG_HIGH_PRECISION_MV */ void *current_bc; diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h index 190221c16..a435448e6 100644 --- a/vp8/common/entropy.h +++ b/vp8/common/entropy.h @@ -100,7 +100,7 @@ extern DECLARE_ALIGNED(16, const int, vp8_coef_bands_16x16[256]); #define SUBEXP_PARAM 4 /* Subexponential code parameter */ #define MODULUS_PARAM 13 /* Modulus parameter */ -#define COEFUPDATETYPE 1 /* coef update type to use (1/2/3) */ +#define COEFUPDATETYPE 1 /* coef update type to use (1/2) */ extern DECLARE_ALIGNED(16, const unsigned char, vp8_prev_token_class[MAX_ENTROPY_TOKENS]); diff --git a/vp8/common/entropymv.c b/vp8/common/entropymv.c index c1ea62d27..e04922f05 100644 --- a/vp8/common/entropymv.c +++ b/vp8/common/entropymv.c @@ -12,7 +12,6 @@ #include "onyxc_int.h" #include "entropymv.h" -#if CONFIG_HIGH_PRECISION_MV const MV_CONTEXT_HP vp8_mv_update_probs_hp[2] = { {{ 237, @@ -47,7 +46,6 @@ const MV_CONTEXT_HP vp8_default_mv_context_hp[2] = { } } }; -#endif /* CONFIG_HIGH_PRECISION_MV */ const MV_CONTEXT vp8_mv_update_probs[2] = { {{ @@ -84,7 +82,6 @@ const MV_CONTEXT vp8_default_mv_context[2] = { } }; -#if CONFIG_HIGH_PRECISION_MV const vp8_tree_index vp8_small_mvtree_hp [30] = { 2, 16, 4, 10, @@ -103,7 +100,6 @@ const vp8_tree_index vp8_small_mvtree_hp [30] = { -14, -15 }; struct vp8_token_struct vp8_small_mvencodings_hp [16]; -#endif /* CONFIG_HIGH_PRECISION_MV */ const vp8_tree_index vp8_small_mvtree [14] = { 2, 8, @@ -196,7 +192,6 @@ static void compute_component_probs( } } -#if CONFIG_HIGH_PRECISION_MV static void compute_component_probs_hp( const unsigned int events [MVvals_hp], vp8_prob Pnew [MVPcount_hp], @@ -268,13 +263,10 @@ static void compute_component_probs_hp( while (++j < mvlong_width_hp); } } -#endif /* CONFIG_HIGH_PRECISION_MV */ void vp8_entropy_mv_init() { vp8_tokens_from_tree(vp8_small_mvencodings, vp8_small_mvtree); -#if CONFIG_HIGH_PRECISION_MV vp8_tokens_from_tree(vp8_small_mvencodings_hp, vp8_small_mvtree_hp); -#endif } // #define MV_COUNT_TESTING @@ -293,7 +285,6 @@ void vp8_adapt_mv_probs(VP8_COMMON *cm) { printf("},\n"); } printf("};\n"); -#if CONFIG_HIGH_PRECISION_MV printf("static const unsigned int\nMVcount_hp[2][MVvals_hp]={\n"); for (i = 0; i < 2; ++i) { printf(" { "); @@ -304,7 +295,6 @@ void vp8_adapt_mv_probs(VP8_COMMON *cm) { printf("},\n"); } printf("};\n"); -#endif #endif /* MV_COUNT_TESTING */ for (i = 0; i < 2; ++i) { @@ -357,7 +347,6 @@ void vp8_adapt_mv_probs(VP8_COMMON *cm) { else cm->fc.mvc[i].prob[MVPbits + t] = prob; } } -#if CONFIG_HIGH_PRECISION_MV for (i = 0; i < 2; ++i) { int prob; unsigned int is_short_ct[2]; @@ -408,5 +397,4 @@ void vp8_adapt_mv_probs(VP8_COMMON *cm) { else cm->fc.mvc_hp[i].prob[MVPbits_hp + t] = prob; } } -#endif } diff --git a/vp8/common/entropymv.h b/vp8/common/entropymv.h index 9141c2bce..535d9b8ac 100644 --- a/vp8/common/entropymv.h +++ b/vp8/common/entropymv.h @@ -42,7 +42,6 @@ typedef struct mv_context { extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2]; -#if CONFIG_HIGH_PRECISION_MV enum { mv_max_hp = 2047, /* max absolute value of a MV component */ MVvals_hp = (2 * mv_max_hp) + 1, /* # possible values "" */ @@ -69,14 +68,10 @@ typedef struct mv_context_hp { extern const MV_CONTEXT_HP vp8_mv_update_probs_hp[2], vp8_default_mv_context_hp[2]; -#endif /* CONFIG_HIGH_PRECISION_MV */ - extern const vp8_tree_index vp8_small_mvtree[]; extern struct vp8_token_struct vp8_small_mvencodings [8]; -#if CONFIG_HIGH_PRECISION_MV extern const vp8_tree_index vp8_small_mvtree_hp[]; extern struct vp8_token_struct vp8_small_mvencodings_hp [16]; -#endif void vp8_entropy_mv_init(); struct VP8Common; diff --git a/vp8/common/findnearmv.c b/vp8/common/findnearmv.c index 8a67162bd..d35e2c4d4 100644 --- a/vp8/common/findnearmv.c +++ b/vp8/common/findnearmv.c @@ -133,7 +133,6 @@ void vp8_find_near_mvs /* Make sure that the 1/8th bits of the Mvs are zero if high_precision * is not being used, by truncating the last bit towards 0 */ -#if CONFIG_HIGH_PRECISION_MV if (!xd->allow_high_precision_mv) { if (best_mv->as_mv.row & 1) best_mv->as_mv.row += (best_mv->as_mv.row > 0 ? -1 : 1); @@ -148,7 +147,6 @@ void vp8_find_near_mvs if (nearby->as_mv.col & 1) nearby->as_mv.col += (nearby->as_mv.col > 0 ? -1 : 1); } -#endif // TODO: move clamp outside findnearmv vp8_clamp_mv2(nearest, xd); diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h index 89d437ba5..a36347dca 100644 --- a/vp8/common/onyxc_int.h +++ b/vp8/common/onyxc_int.h @@ -56,13 +56,9 @@ typedef struct frame_contexts { vp8_prob coef_probs_16x16 [BLOCK_TYPES_16X16] [COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES]; #endif MV_CONTEXT mvc[2]; -#if CONFIG_HIGH_PRECISION_MV MV_CONTEXT_HP mvc_hp[2]; -#endif MV_CONTEXT pre_mvc[2]; -#if CONFIG_HIGH_PRECISION_MV MV_CONTEXT_HP pre_mvc_hp[2]; -#endif vp8_prob pre_bmode_prob [VP8_BINTRAMODES - 1]; vp8_prob pre_ymode_prob [VP8_YMODES - 1]; /* interframe intra mode probs */ vp8_prob pre_uv_mode_prob [VP8_YMODES][VP8_UV_MODES - 1]; @@ -93,9 +89,7 @@ typedef struct frame_contexts { [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS]; #endif unsigned int MVcount [2] [MVvals]; -#if CONFIG_HIGH_PRECISION_MV unsigned int MVcount_hp [2] [MVvals_hp]; -#endif #if CONFIG_SWITCHABLE_INTERP vp8_prob switchable_interp_prob[VP8_SWITCHABLE_FILTERS+1] [VP8_SWITCHABLE_FILTERS-1]; |