Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Jingning Han | 54d66ef | 2015-08-06 21:14:07 -0700 | [diff] [blame] | 11 | #include "vp10/common/onyxc_int.h" |
| 12 | #include "vp10/common/entropymv.h" |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 13 | |
| 14 | // Integer pel reference mv threshold for use of high-precision 1/8 mv |
| 15 | #define COMPANDED_MVREF_THRESH 8 |
| 16 | |
| 17 | const vpx_tree_index vp10_mv_joint_tree[TREE_SIZE(MV_JOINTS)] = { |
| 18 | -MV_JOINT_ZERO, 2, |
| 19 | -MV_JOINT_HNZVZ, 4, |
| 20 | -MV_JOINT_HZVNZ, -MV_JOINT_HNZVNZ |
| 21 | }; |
| 22 | |
| 23 | const vpx_tree_index vp10_mv_class_tree[TREE_SIZE(MV_CLASSES)] = { |
| 24 | -MV_CLASS_0, 2, |
| 25 | -MV_CLASS_1, 4, |
| 26 | 6, 8, |
| 27 | -MV_CLASS_2, -MV_CLASS_3, |
| 28 | 10, 12, |
| 29 | -MV_CLASS_4, -MV_CLASS_5, |
| 30 | -MV_CLASS_6, 14, |
| 31 | 16, 18, |
| 32 | -MV_CLASS_7, -MV_CLASS_8, |
| 33 | -MV_CLASS_9, -MV_CLASS_10, |
| 34 | }; |
| 35 | |
| 36 | const vpx_tree_index vp10_mv_class0_tree[TREE_SIZE(CLASS0_SIZE)] = { |
| 37 | -0, -1, |
| 38 | }; |
| 39 | |
| 40 | const vpx_tree_index vp10_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { |
| 41 | -0, 2, |
| 42 | -1, 4, |
| 43 | -2, -3 |
| 44 | }; |
| 45 | |
| 46 | static const nmv_context default_nmv_context = { |
Jingning Han | ec2ffda | 2016-04-14 12:37:10 -0700 | [diff] [blame] | 47 | #if CONFIG_REF_MV |
| 48 | {1, 64, 96}, |
| 49 | 128, |
| 50 | #else |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 51 | {32, 64, 96}, |
Jingning Han | ec2ffda | 2016-04-14 12:37:10 -0700 | [diff] [blame] | 52 | #endif |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 53 | { |
| 54 | { // Vertical component |
| 55 | 128, // sign |
| 56 | {224, 144, 192, 168, 192, 176, 192, 198, 198, 245}, // class |
| 57 | {216}, // class0 |
| 58 | {136, 140, 148, 160, 176, 192, 224, 234, 234, 240}, // bits |
| 59 | {{128, 128, 64}, {96, 112, 64}}, // class0_fp |
| 60 | {64, 96, 64}, // fp |
| 61 | 160, // class0_hp bit |
| 62 | 128, // hp |
| 63 | }, |
| 64 | { // Horizontal component |
| 65 | 128, // sign |
| 66 | {216, 128, 176, 160, 176, 176, 192, 198, 198, 208}, // class |
| 67 | {208}, // class0 |
| 68 | {136, 140, 148, 160, 176, 192, 224, 234, 234, 240}, // bits |
| 69 | {{128, 128, 64}, {96, 112, 64}}, // class0_fp |
| 70 | {64, 96, 64}, // fp |
| 71 | 160, // class0_hp bit |
| 72 | 128, // hp |
| 73 | } |
| 74 | }, |
| 75 | }; |
| 76 | |
| 77 | static const uint8_t log_in_base_2[] = { |
| 78 | 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, |
| 79 | 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, |
| 80 | 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5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, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, |
| 120 | 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10 |
| 121 | }; |
| 122 | |
| 123 | static INLINE int mv_class_base(MV_CLASS_TYPE c) { |
| 124 | return c ? CLASS0_SIZE << (c + 2) : 0; |
| 125 | } |
| 126 | |
| 127 | MV_CLASS_TYPE vp10_get_mv_class(int z, int *offset) { |
| 128 | const MV_CLASS_TYPE c = (z >= CLASS0_SIZE * 4096) ? |
| 129 | MV_CLASS_10 : (MV_CLASS_TYPE)log_in_base_2[z >> 3]; |
| 130 | if (offset) |
| 131 | *offset = z - mv_class_base(c); |
| 132 | return c; |
| 133 | } |
| 134 | |
| 135 | int vp10_use_mv_hp(const MV *ref) { |
Ronald S. Bultje | 194c0a5 | 2015-10-21 15:20:22 -0400 | [diff] [blame] | 136 | #if CONFIG_MISC_FIXES |
Ronald S. Bultje | fa8ba20 | 2015-10-12 17:57:43 -0400 | [diff] [blame] | 137 | (void) ref; |
Ronald S. Bultje | 1799f2f | 2015-10-02 15:07:04 -0400 | [diff] [blame] | 138 | return 1; |
| 139 | #else |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 140 | return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH && |
| 141 | (abs(ref->col) >> 3) < COMPANDED_MVREF_THRESH; |
Ronald S. Bultje | 1799f2f | 2015-10-02 15:07:04 -0400 | [diff] [blame] | 142 | #endif |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 143 | } |
| 144 | |
| 145 | static void inc_mv_component(int v, nmv_component_counts *comp_counts, |
| 146 | int incr, int usehp) { |
| 147 | int s, z, c, o, d, e, f; |
| 148 | assert(v != 0); /* should not be zero */ |
| 149 | s = v < 0; |
| 150 | comp_counts->sign[s] += incr; |
| 151 | z = (s ? -v : v) - 1; /* magnitude - 1 */ |
| 152 | |
| 153 | c = vp10_get_mv_class(z, &o); |
| 154 | comp_counts->classes[c] += incr; |
| 155 | |
| 156 | d = (o >> 3); /* int mv data */ |
| 157 | f = (o >> 1) & 3; /* fractional pel mv data */ |
| 158 | e = (o & 1); /* high precision mv data */ |
| 159 | |
| 160 | if (c == MV_CLASS_0) { |
| 161 | comp_counts->class0[d] += incr; |
| 162 | comp_counts->class0_fp[d][f] += incr; |
| 163 | comp_counts->class0_hp[e] += usehp * incr; |
| 164 | } else { |
| 165 | int i; |
| 166 | int b = c + CLASS0_BITS - 1; // number of bits |
| 167 | for (i = 0; i < b; ++i) |
| 168 | comp_counts->bits[i][((d >> i) & 1)] += incr; |
| 169 | comp_counts->fp[f] += incr; |
| 170 | comp_counts->hp[e] += usehp * incr; |
| 171 | } |
| 172 | } |
| 173 | |
Ronald S. Bultje | 1e9e9ce | 2015-09-07 14:32:28 -0400 | [diff] [blame] | 174 | void vp10_inc_mv(const MV *mv, nmv_context_counts *counts, const int usehp) { |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 175 | if (counts != NULL) { |
| 176 | const MV_JOINT_TYPE j = vp10_get_mv_joint(mv); |
Jingning Han | ec2ffda | 2016-04-14 12:37:10 -0700 | [diff] [blame] | 177 | |
| 178 | #if CONFIG_REF_MV |
| 179 | ++counts->zero_rmv[j == MV_JOINT_ZERO]; |
| 180 | if (j == MV_JOINT_ZERO) |
| 181 | return; |
| 182 | #endif |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 183 | ++counts->joints[j]; |
| 184 | |
| 185 | if (mv_joint_vertical(j)) { |
Ronald S. Bultje | 1e9e9ce | 2015-09-07 14:32:28 -0400 | [diff] [blame] | 186 | inc_mv_component(mv->row, &counts->comps[0], 1, |
| 187 | !CONFIG_MISC_FIXES || usehp); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | if (mv_joint_horizontal(j)) { |
Ronald S. Bultje | 1e9e9ce | 2015-09-07 14:32:28 -0400 | [diff] [blame] | 191 | inc_mv_component(mv->col, &counts->comps[1], 1, |
| 192 | !CONFIG_MISC_FIXES || usehp); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
Yaowu Xu | fc7cbd1 | 2015-08-13 09:36:53 -0700 | [diff] [blame] | 197 | void vp10_adapt_mv_probs(VP10_COMMON *cm, int allow_hp) { |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 198 | int i, j; |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 199 | #if CONFIG_REF_MV |
| 200 | int idx; |
| 201 | for (idx = 0; idx < NMV_CONTEXTS; ++idx) { |
| 202 | nmv_context *fc = &cm->fc->nmvc[idx]; |
| 203 | const nmv_context *pre_fc = |
| 204 | &cm->frame_contexts[cm->frame_context_idx].nmvc[idx]; |
| 205 | const nmv_context_counts *counts = &cm->counts.mv[idx]; |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 206 | |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 207 | vpx_tree_merge_probs(vp10_mv_joint_tree, pre_fc->joints, counts->joints, |
| 208 | fc->joints); |
Jingning Han | ec2ffda | 2016-04-14 12:37:10 -0700 | [diff] [blame] | 209 | #if CONFIG_REF_MV |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 210 | fc->zero_rmv = vp10_mode_mv_merge_probs(pre_fc->zero_rmv, counts->zero_rmv); |
Jingning Han | ec2ffda | 2016-04-14 12:37:10 -0700 | [diff] [blame] | 211 | #endif |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 212 | |
| 213 | for (i = 0; i < 2; ++i) { |
| 214 | nmv_component *comp = &fc->comps[i]; |
| 215 | const nmv_component *pre_comp = &pre_fc->comps[i]; |
| 216 | const nmv_component_counts *c = &counts->comps[i]; |
| 217 | |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 218 | comp->sign = vp10_mode_mv_merge_probs(pre_comp->sign, c->sign); |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 219 | vpx_tree_merge_probs(vp10_mv_class_tree, pre_comp->classes, c->classes, |
| 220 | comp->classes); |
| 221 | vpx_tree_merge_probs(vp10_mv_class0_tree, pre_comp->class0, c->class0, |
| 222 | comp->class0); |
| 223 | |
| 224 | for (j = 0; j < MV_OFFSET_BITS; ++j) |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 225 | comp->bits[j] = vp10_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]); |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 226 | |
| 227 | for (j = 0; j < CLASS0_SIZE; ++j) |
| 228 | vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->class0_fp[j], |
| 229 | c->class0_fp[j], comp->class0_fp[j]); |
| 230 | |
| 231 | vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->fp, c->fp, comp->fp); |
| 232 | |
| 233 | if (allow_hp) { |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 234 | comp->class0_hp = vp10_mode_mv_merge_probs(pre_comp->class0_hp, |
| 235 | c->class0_hp); |
| 236 | comp->hp = vp10_mode_mv_merge_probs(pre_comp->hp, c->hp); |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 237 | } |
| 238 | } |
| 239 | } |
| 240 | #else |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 241 | nmv_context *fc = &cm->fc->nmvc; |
| 242 | const nmv_context *pre_fc = &cm->frame_contexts[cm->frame_context_idx].nmvc; |
| 243 | const nmv_context_counts *counts = &cm->counts.mv; |
| 244 | |
| 245 | vpx_tree_merge_probs(vp10_mv_joint_tree, pre_fc->joints, counts->joints, |
| 246 | fc->joints); |
| 247 | |
| 248 | for (i = 0; i < 2; ++i) { |
| 249 | nmv_component *comp = &fc->comps[i]; |
| 250 | const nmv_component *pre_comp = &pre_fc->comps[i]; |
| 251 | const nmv_component_counts *c = &counts->comps[i]; |
| 252 | |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 253 | comp->sign = vp10_mode_mv_merge_probs(pre_comp->sign, c->sign); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 254 | vpx_tree_merge_probs(vp10_mv_class_tree, pre_comp->classes, c->classes, |
| 255 | comp->classes); |
| 256 | vpx_tree_merge_probs(vp10_mv_class0_tree, pre_comp->class0, c->class0, |
| 257 | comp->class0); |
| 258 | |
| 259 | for (j = 0; j < MV_OFFSET_BITS; ++j) |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 260 | comp->bits[j] = vp10_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 261 | |
| 262 | for (j = 0; j < CLASS0_SIZE; ++j) |
| 263 | vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->class0_fp[j], |
| 264 | c->class0_fp[j], comp->class0_fp[j]); |
| 265 | |
| 266 | vpx_tree_merge_probs(vp10_mv_fp_tree, pre_comp->fp, c->fp, comp->fp); |
| 267 | |
| 268 | if (allow_hp) { |
Debargha Mukherjee | e4bf50b | 2016-04-26 15:04:19 -0700 | [diff] [blame^] | 269 | comp->class0_hp = vp10_mode_mv_merge_probs( |
| 270 | pre_comp->class0_hp, c->class0_hp); |
| 271 | comp->hp = vp10_mode_mv_merge_probs(pre_comp->hp, c->hp); |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 272 | } |
| 273 | } |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 274 | #endif |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 275 | } |
| 276 | |
Yaowu Xu | fc7cbd1 | 2015-08-13 09:36:53 -0700 | [diff] [blame] | 277 | void vp10_init_mv_probs(VP10_COMMON *cm) { |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 278 | #if CONFIG_REF_MV |
| 279 | int i; |
| 280 | for (i = 0; i < NMV_CONTEXTS; ++i) |
| 281 | cm->fc->nmvc[i] = default_nmv_context; |
| 282 | #else |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 283 | cm->fc->nmvc = default_nmv_context; |
Jingning Han | df59bb8 | 2016-02-18 11:57:44 -0800 | [diff] [blame] | 284 | #endif |
Jingning Han | 3ee6db6 | 2015-08-05 19:00:31 -0700 | [diff] [blame] | 285 | } |