Commit 648bf581 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Remove CONFIG_FRAME_MARKER flag

Change-Id: I1d7f33546053615a334b67b75147bd5e027a545b
parent 2e7bb933
......@@ -75,10 +75,8 @@ extern "C" {
// Minimum number of colors in a palette.
#define PALETTE_MIN_SIZE 2
#if CONFIG_FRAME_MARKER
#define FRAME_OFFSET_BITS 5
#define MAX_FRAME_DISTANCE ((1 << FRAME_OFFSET_BITS) - 1)
#endif
#if CONFIG_LOOPFILTER_LEVEL
// 4 frame filter levels: y plane vertical, y plane horizontal,
......
......@@ -1287,7 +1287,6 @@ void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv,
*near_mv = mvlist[1];
}
#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;
......@@ -1344,7 +1343,6 @@ void av1_setup_frame_sign_bias(AV1_COMMON *cm) {
}
}
#endif // CONFIG_FRAME_SIGN_BIAS
#endif // CONFIG_FRAME_MARKER
#if CONFIG_MFMV
#define MAX_OFFSET_WIDTH 64
......
......@@ -113,7 +113,6 @@ static const int idx_n_column_to_subblock[4][2] = {
#define MV_BORDER (8 << 3) // Allow 8 pels in 1/8th pel units
#endif // CONFIG_EXT_PARTITION
#if CONFIG_FRAME_MARKER
// Get the number of frames between the current frame and a reference frame
static INLINE int get_ref_frame_dist(const AV1_COMMON *cm,
MV_REFERENCE_FRAME ref) {
......@@ -126,7 +125,6 @@ static INLINE int get_ref_frame_dist(const AV1_COMMON *cm,
cm->buffer_pool->frame_bufs[ref_buf_idx].cur_frame_offset;
return cur_frame_offset - ref_frame_offset;
}
#endif // CONFIG_FRAME_MARKER
static INLINE void clamp_mv_ref(MV *mv, int bw, int bh, const MACROBLOCKD *xd) {
clamp_mv(mv, xd->mb_to_left_edge - bw * 8 - MV_BORDER,
......@@ -378,7 +376,6 @@ static INLINE uint8_t av1_drl_ctx(const CANDIDATE_MV *ref_mv_stack,
static INLINE int av1_is_compound_reference_allowed(const AV1_COMMON *cm) {
if (frame_is_intra_only(cm)) return 0;
#if CONFIG_FRAME_MARKER
// Check whether two different reference frames exist.
int ref, ref_offset0;
int is_comp_allowed = 0;
......@@ -403,12 +400,8 @@ static INLINE int av1_is_compound_reference_allowed(const AV1_COMMON *cm) {
}
return is_comp_allowed;
#else
return 1;
#endif // CONFIG_FRAME_MARKER
}
#if CONFIG_FRAME_MARKER
static INLINE int av1_refs_are_one_sided(const AV1_COMMON *cm) {
assert(!frame_is_intra_only(cm));
......@@ -437,7 +430,6 @@ void av1_setup_skip_mode_allowed(AV1_COMMON *cm);
#if CONFIG_MFMV
void av1_setup_motion_field(AV1_COMMON *cm);
#endif // CONFIG_MFMV
#endif // CONFIG_FRAME_MARKER
static INLINE void av1_collect_neighbors_ref_counts(MACROBLOCKD *const xd) {
av1_zero(xd->neighbors_ref_counts);
......
......@@ -137,7 +137,6 @@ typedef struct {
typedef struct {
int ref_count;
#if CONFIG_FRAME_MARKER
unsigned int cur_frame_offset;
unsigned int lst_frame_offset;
unsigned int alt_frame_offset;
......@@ -146,7 +145,6 @@ typedef struct {
unsigned int lst3_frame_offset;
unsigned int bwd_frame_offset;
unsigned int alt2_frame_offset;
#endif // CONFIG_FRAME_MARKER
MV_REF *mvs;
#if CONFIG_SEGMENT_PRED_LAST
......@@ -470,9 +468,7 @@ typedef struct AV1Common {
#endif
FRAME_COUNTS counts;
#if CONFIG_FRAME_MARKER
unsigned int frame_offset;
#endif
unsigned int current_video_frame;
BITSTREAM_PROFILE profile;
......
......@@ -2982,7 +2982,6 @@ static int read_uncompressed_header(AV1Decoder *pbi,
}
}
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
cm->frame_offset =
cm->current_video_frame + aom_rb_read_literal(rb, FRAME_OFFSET_BITS);
......@@ -2997,7 +2996,6 @@ static int read_uncompressed_header(AV1Decoder *pbi,
#endif // CONFIG_OBU
av1_setup_frame_sign_bias(cm);
#endif // CONFIG_FRAME_SIGN_BIAS
#endif // CONFIG_FRAME_MARKER
#if CONFIG_TEMPMV_SIGNALING
cm->cur_frame->intra_only = cm->frame_type == KEY_FRAME || cm->intra_only;
......
......@@ -3781,7 +3781,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
}
}
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
int arf_offset = AOMMIN(
(MAX_GF_INTERVAL - 1),
......@@ -3792,7 +3791,6 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
arf_offset = AOMMIN((MAX_GF_INTERVAL - 1), arf_offset + brf_offset);
aom_wb_write_literal(wb, arf_offset, FRAME_OFFSET_BITS);
}
#endif // CONFIG_FRAME_MARKER
#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
......@@ -4174,7 +4172,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
#endif
}
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
int arf_offset = AOMMIN(
(MAX_GF_INTERVAL - 1),
......@@ -4185,7 +4182,6 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
arf_offset = AOMMIN((MAX_GF_INTERVAL - 1), arf_offset + brf_offset);
aom_wb_write_literal(wb, arf_offset, FRAME_OFFSET_BITS);
}
#endif // CONFIG_FRAME_MARKER
#if CONFIG_REFERENCE_BUFFER
if (cm->seq_params.frame_id_numbers_present_flag) {
......
......@@ -4031,7 +4031,6 @@ static int is_screen_content(const uint8_t *src, int use_hbd, int bd,
return counts * blk_h * blk_w * 10 > width * height;
}
#if CONFIG_FRAME_MARKER
// Enforce the number of references for each arbitrary frame limited to
// (INTER_REFS_PER_FRAME - 1)
static void enforce_max_ref_frames(AV1_COMP *cpi) {
......@@ -4140,7 +4139,6 @@ static void enforce_max_ref_frames(AV1_COMP *cpi) {
}
}
}
#endif // CONFIG_FRAME_MARKER
#if CONFIG_EXT_SKIP
static INLINE void get_skip_mode_ref_offsets(const AV1_COMMON *cm,
......@@ -4518,10 +4516,8 @@ static void encode_frame_internal(AV1_COMP *cpi) {
av1_setup_motion_field(cm);
#endif // CONFIG_MFMV
#if CONFIG_FRAME_MARKER
cpi->all_one_sided_refs =
frame_is_intra_only(cm) ? 0 : av1_refs_are_one_sided(cm);
#endif // CONFIG_FRAME_MARKER
#if CONFIG_EXT_SKIP
cm->skip_mode_flag = check_skip_mode_enabled(cpi);
......@@ -4583,7 +4579,6 @@ void av1_encode_frame(AV1_COMP *cpi) {
}
#endif // CONFIG_NEW_QUANT
#if CONFIG_FRAME_MARKER
if (cm->show_frame == 0) {
int arf_offset = AOMMIN(
(MAX_GF_INTERVAL - 1),
......@@ -4600,7 +4595,6 @@ void av1_encode_frame(AV1_COMP *cpi) {
#if CONFIG_FRAME_SIGN_BIAS
av1_setup_frame_sign_bias(cm);
#endif // CONFIG_FRAME_SIGN_BIAS
#endif // CONFIG_FRAME_MARKER
#if CONFIG_MISMATCH_DEBUG
mismatch_reset_frame(num_planes);
......
......@@ -5737,7 +5737,6 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) {
return;
}
#if CONFIG_FRAME_MARKER
static const int flag_list[TOTAL_REFS_PER_FRAME] = { 0,
AOM_LAST_FLAG,
AOM_LAST2_FLAG,
......@@ -5765,7 +5764,6 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) {
(buf_idx >= 0) ? rate_factor_deltas[cpi->frame_rf_level[buf_idx]] : -1);
}
printf(" ]\n");
#endif // CONFIG_FRAME_MARKER
if (!cm->show_frame) {
printf("Frame %d is a no show frame, so no image dump.\n",
......@@ -5788,7 +5786,6 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) {
return;
}
}
#if CONFIG_FRAME_MARKER
printf(
"\nFrame=%5d, encode_update_type[%5d]=%1d, frame_offset=%d, "
"show_frame=%d, show_existing_frame=%d, source_alt_ref_active=%d, "
......@@ -5800,19 +5797,6 @@ static void dump_filtered_recon_frames(AV1_COMP *cpi) {
cpi->rc.source_alt_ref_active, cpi->refresh_alt_ref_frame,
cpi->twopass.gf_group.rf_level[cpi->twopass.gf_group.index],
recon_buf->y_stride, recon_buf->uv_stride, cm->width, cm->height);
#else
printf(
"\nFrame=%5d, encode_update_type[%5d]=%1d, "
"show_frame=%d, show_existing_frame=%d, source_alt_ref_active=%d, "
"refresh_alt_ref_frame=%d, rf_level=%d, "
"y_stride=%4d, uv_stride=%4d, cm->width=%4d, cm->height=%4d\n\n",
cm->current_video_frame, cpi->twopass.gf_group.index,
cpi->twopass.gf_group.update_type[cpi->twopass.gf_group.index],
cm->show_frame, cm->show_existing_frame, cpi->rc.source_alt_ref_active,
cpi->refresh_alt_ref_frame,
cpi->twopass.gf_group.rf_level[cpi->twopass.gf_group.index],
recon_buf->y_stride, recon_buf->uv_stride, cm->width, cm->height);
#endif // CONFIG_FRAME_MARKER
#if 0
int ref_frame;
printf("get_ref_frame_map_idx: [");
......@@ -5927,11 +5911,9 @@ static int encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size, uint8_t *dest,
// Set up frame to show to get ready for stats collection.
cm->frame_to_show = get_frame_new_buffer(cm);
#if CONFIG_FRAME_MARKER
// Update current frame offset.
cm->frame_offset =
cm->buffer_pool->frame_bufs[cm->new_fb_idx].cur_frame_offset;
#endif // CONFIG_FRAME_MARKER
#if DUMP_RECON_FRAMES == 1
// NOTE(zoeliu): For debug - Output the filtered reconstructed video.
......@@ -7010,11 +6992,9 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags,
if (cm->new_fb_idx == INVALID_IDX) return -1;
#if CONFIG_FRAME_MARKER
// Retain the RF_LEVEL for the current newly coded frame.
cpi->frame_rf_level[cm->new_fb_idx] =
cpi->twopass.gf_group.rf_level[cpi->twopass.gf_group.index];
#endif // CONFIG_FRAME_MARKER
cm->cur_frame = &pool->frame_bufs[cm->new_fb_idx];
cm->cur_frame->buf.buf_8bit_valid = 0;
......
......@@ -487,9 +487,7 @@ typedef struct AV1_COMP {
int static_mb_pct; // % forced skip mbs by segmentation
int ref_frame_flags;
int ext_ref_frame_flags;
#if CONFIG_FRAME_MARKER
RATE_FACTOR_LEVEL frame_rf_level[FRAME_BUFFERS];
#endif // CONFIG_FRAME_MARKER
SPEED_FEATURES sf;
......@@ -497,9 +495,7 @@ typedef struct AV1_COMP {
int mv_step_param;
int allow_comp_inter_inter;
#if CONFIG_FRAME_MARKER
int all_one_sided_refs;
#endif // CONFIG_FARME_MARKER
uint8_t *segmentation_map;
......
......@@ -9717,7 +9717,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
mbmi->interintra_mode = (INTERINTRA_MODE)(II_DC_PRED - 1);
#if CONFIG_FRAME_MARKER
if (sf->selective_ref_frame) {
if (sf->selective_ref_frame == 2 || x->cb_partition_scan) {
if (mbmi->ref_frame[0] == ALTREF2_FRAME ||
......@@ -9751,7 +9750,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
ref_offsets[1] > cm->frame_offset))
continue;
}
#endif // CONFIG_FRAME_MARKER
if (ref_frame == INTRA_FRAME) {
RD_STATS rd_stats_y;
......
......@@ -117,7 +117,6 @@ set(CONFIG_FAST_SGR 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FILM_GRAIN 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FILTER_INTRA 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FP_MB_STATS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_MARKER 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_SIGN_BIAS 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FRAME_SIZE 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_FWD_KF 0 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -53,24 +53,6 @@ macro (fix_experiment_configs)
endif ()
endif ()
if (CONFIG_EXT_SKIP)
if (NOT CONFIG_FRAME_MARKER)
change_config_and_warn(CONFIG_FRAME_MARKER 1 CONFIG_EXT_SKIP)
endif ()
endif ()
if (CONFIG_FRAME_SIGN_BIAS)
if (NOT CONFIG_FRAME_MARKER)
change_config_and_warn(CONFIG_FRAME_MARKER 1 CONFIG_FRAME_SIGN_BIAS)
endif ()
endif ()
if (CONFIG_JNT_COMP)
if (NOT CONFIG_FRAME_MARKER)
change_config_and_warn(CONFIG_FRAME_MARKER 1 CONFIG_JNT_COMP)
endif ()
endif ()
if (CONFIG_LOOPFILTER_LEVEL)
if (NOT CONFIG_EXT_DELTA_Q)
change_config_and_warn(CONFIG_EXT_DELTA_Q 1 CONFIG_LOOPFILTER_LEVEL)
......@@ -80,12 +62,6 @@ macro (fix_experiment_configs)
endif ()
endif ()
if (CONFIG_MFMV)
if (NOT CONFIG_FRAME_MARKER)
change_config_and_warn(CONFIG_FRAME_MARKER 1 CONFIG_MFMV)
endif ()
endif ()
if (CONFIG_TXK_SEL)
if (NOT CONFIG_LV_MAP)
change_config_and_warn(CONFIG_LV_MAP 1 CONFIG_TXK_SEL)
......
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