Commit ea255c9b authored by Jingning Han's avatar Jingning Han

Make frame marker a root experiment

Move functions related to frame index in natural order setup into
a root experiment.

Change-Id: Iebc71514b951dbb658cf0e1c3d42bb2b180d830f
parent 1033ca0a
......@@ -1296,7 +1296,7 @@ void av1_append_sub8x8_mvs_for_idx(const AV1_COMMON *cm, MACROBLOCKD *xd,
}
}
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
void av1_setup_frame_buf_refs(AV1_COMMON *cm) {
cm->cur_frame->cur_frame_offset = cm->frame_offset;
int alt_buf_idx = cm->frame_refs[ALTREF_FRAME - LAST_FRAME].idx;
......@@ -1340,7 +1340,9 @@ void av1_setup_frame_buf_refs(AV1_COMMON *cm) {
cm->buffer_pool->frame_bufs[alt2_buf_idx].cur_frame_offset;
#endif
}
#endif // CONFIG_FRAME_MARKER
#if CONFIG_MFMV
// Although we assign 32 bit integers, all the values are strictly under 14
// bits.
static int div_mult[32] = {
......
......@@ -390,10 +390,12 @@ static INLINE uint8_t av1_drl_ctx(const CANDIDATE_MV *ref_mv_stack,
return 0;
}
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
void av1_setup_frame_buf_refs(AV1_COMMON *cm);
#if CONFIG_MFMV
void av1_setup_motion_field(AV1_COMMON *cm);
#endif
#endif // CONFIG_MFMV
#endif // CONFIG_FRAME_MARKER
typedef void (*find_mv_refs_sync)(void *const data, int mi_row);
void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
......
......@@ -128,7 +128,7 @@ typedef struct {
typedef struct {
int ref_count;
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
int cur_frame_offset;
int lst_frame_offset;
int alt_frame_offset;
......@@ -139,6 +139,9 @@ typedef struct {
int bwd_frame_offset;
int alt2_frame_offset;
#endif
#endif // CONFIG_FRAME_MARKER
#if CONFIG_MFMV
TPL_MV_REF *tpl_mvs;
#endif
MV_REF *mvs;
......@@ -402,7 +405,7 @@ typedef struct AV1Common {
#endif
FRAME_COUNTS counts;
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
unsigned int frame_offset;
#endif
......
......@@ -4903,7 +4903,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
}
}
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
cm->frame_offset = cm->current_video_frame + aom_rb_read_literal(rb, 4);
} else {
......@@ -5514,10 +5514,12 @@ size_t av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
(cm->last_frame_type != KEY_FRAME);
#endif // CONFIG_TEMPMV_SIGNALING
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
av1_setup_frame_buf_refs(cm);
#if CONFIG_MFMV
av1_setup_motion_field(cm);
#endif
#endif // CONFIG_MFMV
#endif // CONFIG_FRAME_MARKER
av1_setup_block_planes(xd, cm->subsampling_x, cm->subsampling_y);
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
......
......@@ -4681,7 +4681,7 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
}
}
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
int arf_offset = AOMMIN(
(MAX_GF_INTERVAL - 1),
......
......@@ -5441,7 +5441,7 @@ static void encode_frame_internal(AV1_COMP *cpi) {
av1_zero(x->blk_skip_drl);
#endif
#if CONFIG_MFMV
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
int arf_offset = AOMMIN(
(MAX_GF_INTERVAL - 1),
......@@ -5456,8 +5456,10 @@ static void encode_frame_internal(AV1_COMP *cpi) {
cm->frame_offset = cm->current_video_frame;
}
av1_setup_frame_buf_refs(cm);
#if CONFIG_MFMV
av1_setup_motion_field(cm);
#endif
#endif // CONFIG_MFMV
#endif // CONFIG_FRAME_MARKER
{
struct aom_usec_timer emr_timer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment