summaryrefslogtreecommitdiff
path: root/vpx
diff options
context:
space:
mode:
authorJianhui Dai <jianhui.j.dai@intel.com>2021-12-09 13:38:22 +0800
committerJianhui Dai <jianhui.j.dai@intel.com>2021-12-11 19:11:18 +0800
commite7f33a53cf404bbb3688af9b13375b5c090daae4 (patch)
treea9bce14bcebb2e749030afc8ea8586b24e40d942 /vpx
parent7fbcee49da63a61feee00147746efa33e31087e8 (diff)
downloadlibvpx-e7f33a53cf404bbb3688af9b13375b5c090daae4.tar.gz
Set unused reference frames to first ref
If a reference frame is not referenced, then set the index for that reference to the first one used/referenced instead of unused slot. Unused slot means key frame, as key frame resets all slots with itself. This CL extracts `get_first_ref_frame()` from `reset_fb_idx_unused()` with a typo fixing, and sets all unused reference frames to first ref in vp9 uncompressed header. Bug: webrtc:13442 Change-Id: I99523bc2ceedf27efe376d1113851ff342982181
Diffstat (limited to 'vpx')
-rw-r--r--vpx/vp8cx.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/vpx/vp8cx.h b/vpx/vp8cx.h
index 47c38d3b5..b3c50a9b6 100644
--- a/vpx/vp8cx.h
+++ b/vpx/vp8cx.h
@@ -897,13 +897,16 @@ typedef struct vpx_svc_ref_frame_config {
int alt_fb_idx[VPX_SS_MAX_LAYERS]; /**< Altref buffer index. */
int update_buffer_slot[VPX_SS_MAX_LAYERS]; /**< Update reference frames. */
// TODO(jianj): Remove update_last/golden/alt_ref, these are deprecated.
- int update_last[VPX_SS_MAX_LAYERS]; /**< Update last. */
- int update_golden[VPX_SS_MAX_LAYERS]; /**< Update golden. */
- int update_alt_ref[VPX_SS_MAX_LAYERS]; /**< Update altref. */
- int reference_last[VPX_SS_MAX_LAYERS]; /**< Last as reference. */
- int reference_golden[VPX_SS_MAX_LAYERS]; /**< Golden as reference. */
- int reference_alt_ref[VPX_SS_MAX_LAYERS]; /**< Altref as reference. */
- int64_t duration[VPX_SS_MAX_LAYERS]; /**< Duration per spatial layer. */
+ int update_last[VPX_SS_MAX_LAYERS]; /**< Update last. */
+ int update_golden[VPX_SS_MAX_LAYERS]; /**< Update golden. */
+ int update_alt_ref[VPX_SS_MAX_LAYERS]; /**< Update altref. */
+ int reference_last[VPX_SS_MAX_LAYERS];
+ /**< Last as reference. Use first referenced index if FALSE. */
+ int reference_golden[VPX_SS_MAX_LAYERS];
+ /**< Golden as reference. Use first referenced index if FALSE. */
+ int reference_alt_ref[VPX_SS_MAX_LAYERS];
+ /**< Altref as reference. Use first referenced index if FALSE. */
+ int64_t duration[VPX_SS_MAX_LAYERS]; /**< Duration per spatial layer. */
} vpx_svc_ref_frame_config_t;
/*!\brief VP9 svc frame dropping mode.