diff options
author | Ronald S. Bultje <rbultje@google.com> | 2013-05-30 20:58:13 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-05-30 20:58:13 -0700 |
commit | 6ea6f4d2539d907003438f4f60fc6e5bafeefd1f (patch) | |
tree | 92a30d899df214efa5a120a3a58e11b50df48a6d /vp9/encoder | |
parent | 21595f8e38771c283fae6b39fe4a7be3d19d72f3 (diff) | |
parent | 580d29bdbb97c2ba862cadd12a7af093ab87f806 (diff) | |
download | libvpx-6ea6f4d2539d907003438f4f60fc6e5bafeefd1f.tar libvpx-6ea6f4d2539d907003438f4f60fc6e5bafeefd1f.tar.gz libvpx-6ea6f4d2539d907003438f4f60fc6e5bafeefd1f.tar.bz2 libvpx-6ea6f4d2539d907003438f4f60fc6e5bafeefd1f.zip |
Merge "Remove one (unused) entry from mvref tables." into experimental
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 10 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 7 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_int.h | 6 |
3 files changed, 12 insertions, 11 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 718130e56..30d2424aa 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -321,15 +321,15 @@ static void update_refpred_stats(VP9_COMP *cpi) { // The branch counts table is re-populated during the actual pack stage and in // the decoder to facilitate backwards update of the context. static void update_inter_mode_probs(VP9_COMMON *cm, - int mode_context[INTER_MODE_CONTEXTS][4]) { + int mode_context[INTER_MODE_CONTEXTS][VP9_MVREFS - 1]) { int i, j; - unsigned int (*mv_ref_ct)[4][2] = cm->fc.mv_ref_ct; + unsigned int (*mv_ref_ct)[VP9_MVREFS - 1][2] = cm->fc.mv_ref_ct; vpx_memcpy(mode_context, cm->fc.vp9_mode_contexts, sizeof(cm->fc.vp9_mode_contexts)); for (i = 0; i < INTER_MODE_CONTEXTS; i++) { - for (j = 0; j < 4; j++) { + for (j = 0; j < VP9_MVREFS - 1; j++) { int new_prob, old_cost, new_cost; // Work out cost of coding branches with the old and optimal probability @@ -1640,7 +1640,7 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) { // changes in the bitstream. if (pc->frame_type != KEY_FRAME) { int i, j; - int new_context[INTER_MODE_CONTEXTS][4]; + int new_context[INTER_MODE_CONTEXTS][VP9_MVREFS - 1]; if (!cpi->dummy_packing) { update_inter_mode_probs(pc, new_context); } else { @@ -1650,7 +1650,7 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) { } for (i = 0; i < INTER_MODE_CONTEXTS; i++) { - for (j = 0; j < 4; j++) { + for (j = 0; j < VP9_MVREFS - 1; j++) { if (new_context[i][j] != pc->fc.vp9_mode_contexts[i][j]) { vp9_write(&header_bc, 1, 252); vp9_write_prob(&header_bc, new_context[i][j]); diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index f8b84301f..46f0f2df8 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -537,7 +537,7 @@ void vp9_update_mode_context_stats(VP9_COMP *cpi) { // Add in the values for this frame for (i = 0; i < INTER_MODE_CONTEXTS; i++) { - for (j = 0; j < 4; j++) { + for (j = 0; j < VP9_MVREFS - 1; j++) { mv_ref_stats[i][j][0] += (int64_t)mv_ref_ct[i][j][0]; mv_ref_stats[i][j][1] += (int64_t)mv_ref_ct[i][j][1]; } @@ -554,12 +554,13 @@ void print_mode_context(VP9_COMP *cpi) { int i, j; fprintf(f, "#include \"vp9_entropy.h\"\n"); - fprintf(f, "const int vp9_mode_contexts[INTER_MODE_CONTEXTS][4] ="); + fprintf(f, + "const int vp9_mode_contexts[INTER_MODE_CONTEXTS][VP9_MVREFS - 1] ="); fprintf(f, "{\n"); for (j = 0; j < INTER_MODE_CONTEXTS; j++) { fprintf(f, " {/* %d */ ", j); fprintf(f, " "); - for (i = 0; i < 4; i++) { + for (i = 0; i < VP9_MVREFS - 1; i++) { int this_prob; int64_t count = cpi->mv_ref_stats[j][i][0] + cpi->mv_ref_stats[j][i][1]; if (count) diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 754e872f4..460ed93a5 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -88,8 +88,8 @@ typedef struct { vp9_prob switchable_interp_prob[VP9_SWITCHABLE_FILTERS + 1] [VP9_SWITCHABLE_FILTERS - 1]; - int mv_ref_ct[INTER_MODE_CONTEXTS][4][2]; - int vp9_mode_contexts[INTER_MODE_CONTEXTS][4]; + int mv_ref_ct[INTER_MODE_CONTEXTS][VP9_MVREFS - 1][2]; + int vp9_mode_contexts[INTER_MODE_CONTEXTS][VP9_MVREFS - 1]; } CODING_CONTEXT; @@ -615,7 +615,7 @@ typedef struct VP9_COMP { #endif #ifdef ENTROPY_STATS - int64_t mv_ref_stats[INTER_MODE_CONTEXTS][4][2]; + int64_t mv_ref_stats[INTER_MODE_CONTEXTS][VP9_MVREFS - 1][2]; #endif } VP9_COMP; |