summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_onyxc_int.h
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2018-08-27 15:22:24 -0700
committerJingning Han <jingning@google.com>2018-08-27 16:40:45 -0700
commit0d203054b3f51eb42a36895dc70c0b2ce599df90 (patch)
tree525de19e209cc41692c686c2212ef14e1c587af6 /vp9/common/vp9_onyxc_int.h
parentb2f9b627e3ed2db23b6f856f4307e97879f68575 (diff)
downloadlibvpx-0d203054b3f51eb42a36895dc70c0b2ce599df90.tar
libvpx-0d203054b3f51eb42a36895dc70c0b2ce599df90.tar.gz
libvpx-0d203054b3f51eb42a36895dc70c0b2ce599df90.tar.bz2
libvpx-0d203054b3f51eb42a36895dc70c0b2ce599df90.zip
Rework enc/dec mismatch detection
The previous enc/dec mismatch detection assumes the previously reconstructed frame would always stay at frame buffer pool index at 0. It could hence cause certain delay in enc/dec mismatch detection when the immediate reconstruction frame is not yet propagated to index 0 in the buffer map pool. This change always keeps the latest decoded show frame buffer index and directly gets the reconstructed frame from encoder and decoder buffer pools to check for mismatch. Change-Id: If53092cbc42ab78d55af5b83f12a489fc362f3ae
Diffstat (limited to 'vp9/common/vp9_onyxc_int.h')
-rw-r--r--vp9/common/vp9_onyxc_int.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/vp9/common/vp9_onyxc_int.h b/vp9/common/vp9_onyxc_int.h
index e053e2ee0..c72b6e64f 100644
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -128,6 +128,8 @@ typedef struct VP9Common {
int new_fb_idx;
+ int cur_show_frame_fb_idx;
+
#if CONFIG_VP9_POSTPROC
YV12_BUFFER_CONFIG post_proc_buffer;
YV12_BUFFER_CONFIG post_proc_buffer_int;
@@ -260,6 +262,12 @@ typedef struct VP9Common {
int lf_row;
} VP9_COMMON;
+static INLINE YV12_BUFFER_CONFIG *get_buf_frame(VP9_COMMON *cm, int index) {
+ if (index < 0 || index >= FRAME_BUFFERS) return NULL;
+ if (cm->error.error_code != VPX_CODEC_OK) return NULL;
+ return &cm->buffer_pool->frame_bufs[index].buf;
+}
+
static INLINE YV12_BUFFER_CONFIG *get_ref_frame(VP9_COMMON *cm, int index) {
if (index < 0 || index >= REF_FRAMES) return NULL;
if (cm->ref_frame_map[index] < 0) return NULL;