// normal reference pool.
#define FRAME_BUFFERS (REF_FRAMES + 7)
+#if CONFIG_EXT_REFS
+#define FRAME_CONTEXTS_LOG2 3
+#else
#define FRAME_CONTEXTS_LOG2 2
+#endif
+
#define FRAME_CONTEXTS (1 << FRAME_CONTEXTS_LOG2)
#define NUM_PING_PONG_BUFFERS 2
if (frame_is_intra_only(cm) || cm->error_resilient_mode) {
vp10_setup_past_independence(cm);
} else {
- cm->frame_context_idx = cpi->refresh_alt_ref_frame;
+ if (cpi->refresh_alt_ref_frame)
+ cm->frame_context_idx = ARF_FRAME;
+ else if (cpi->rc.is_src_frame_alt_ref)
+ cm->frame_context_idx = OVERLAY_FRAME;
+ else if (cpi->refresh_golden_frame)
+ cm->frame_context_idx = GLD_FRAME;
+#if CONFIG_EXT_REFS
+ else if (cpi->refresh_bwd_ref_frame)
+ cm->frame_context_idx = BRF_FRAME;
+#endif
+ else
+ cm->frame_context_idx = REGULAR_FRAME;
}
if (cm->frame_type == KEY_FRAME) {
FRAME_CONTEXT fc;
} CODING_CONTEXT;
+typedef enum {
+ // regular inter frame
+ REGULAR_FRAME = 0,
+ // alternate reference frame
+ ARF_FRAME = 1,
+ // overlay frame
+ OVERLAY_FRAME = 2,
+ // golden frame
+ GLD_FRAME = 3,
+#if CONFIG_EXT_REFS
+ // backward reference frame
+ BRF_FRAME = 4,
+#endif
+} FRAME_CONTEXT_INDEX;
+
typedef enum {
// encode_breakout is disabled.
ENCODE_BREAKOUT_DISABLED = 0,