summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-02-09 04:21:08 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-02-09 04:21:08 -0800
commite4f949b55a87f530e26e64528e5bd3d6335a6742 (patch)
tree372934639e623e7b63c02e102b2474092990f186 /vp9/encoder/vp9_bitstream.c
parentdc836109e4b8013ee28f4f36b4a48fd18ca209e4 (diff)
parentbbede82f24dbe8233f5d5a9d1d2565b5a34efb4e (diff)
downloadlibvpx-e4f949b55a87f530e26e64528e5bd3d6335a6742.tar
libvpx-e4f949b55a87f530e26e64528e5bd3d6335a6742.tar.gz
libvpx-e4f949b55a87f530e26e64528e5bd3d6335a6742.tar.bz2
libvpx-e4f949b55a87f530e26e64528e5bd3d6335a6742.zip
Merge "Nearest / Zero Mv default entropy tweak." into experimental
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r--vp9/encoder/vp9_bitstream.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c
index eec83a0a8..a3c407865 100644
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -221,8 +221,8 @@ 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_mode_probs(VP9_COMMON *cm,
- int mode_context[INTER_MODE_CONTEXTS][4]) {
+static void update_inter_mode_probs(VP9_COMMON *cm,
+ int mode_context[INTER_MODE_CONTEXTS][4]) {
int i, j;
unsigned int (*mv_ref_ct)[4][2];
@@ -813,7 +813,7 @@ static void pack_inter_mode_mvs(VP9_COMP *cpi, MODE_INFO *m,
active_section = 3;
#endif
- // Is segment skip is not enabled code the mode.
+ // If segment skip is not enabled code the mode.
if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
if (mi->sb_type) {
write_sb_mv_ref(bc, mode, mv_ref_p);
@@ -1872,7 +1872,13 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
if (pc->frame_type != KEY_FRAME) {
int i, j;
int new_context[INTER_MODE_CONTEXTS][4];
- update_mode_probs(pc, new_context);
+ if (!cpi->dummy_packing) {
+ update_inter_mode_probs(pc, new_context);
+ } else {
+ // In dummy pack assume context unchanged.
+ vpx_memcpy(new_context, pc->fc.vp9_mode_contexts,
+ sizeof(pc->fc.vp9_mode_contexts));
+ }
for (i = 0; i < INTER_MODE_CONTEXTS; i++) {
for (j = 0; j < 4; j++) {