Commit 57ddc51a authored by Frederic Barbier's avatar Frederic Barbier Committed by Frédéric BARBIER

Move encoder-specific function out of decoder

Change-Id: I5ae45abe5145dedf9751adbeb81a111a49df7eb5
parent 8251736b
......@@ -428,21 +428,6 @@ static INLINE int av1_refs_are_one_sided(const AV1_COMMON *cm) {
return one_sided_refs;
}
#if CONFIG_EXT_SKIP
static INLINE void get_skip_mode_ref_offsets(const AV1_COMMON *cm,
int ref_offset[2]) {
ref_offset[0] = ref_offset[1] = 0;
if (!cm->is_skip_mode_allowed) return;
const int buf_idx_0 = cm->frame_refs[cm->ref_frame_idx_0].idx;
const int buf_idx_1 = cm->frame_refs[cm->ref_frame_idx_1].idx;
assert(buf_idx_0 != INVALID_IDX && buf_idx_1 != INVALID_IDX);
ref_offset[0] = cm->buffer_pool->frame_bufs[buf_idx_0].cur_frame_offset;
ref_offset[1] = cm->buffer_pool->frame_bufs[buf_idx_1].cur_frame_offset;
}
#endif // CONFIG_EXT_SKIP
void av1_setup_frame_buf_refs(AV1_COMMON *cm);
#if CONFIG_FRAME_SIGN_BIAS
void av1_setup_frame_sign_bias(AV1_COMMON *cm);
......
......@@ -3694,6 +3694,19 @@ 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,
int ref_offset[2]) {
ref_offset[0] = ref_offset[1] = 0;
if (!cm->is_skip_mode_allowed) return;
const int buf_idx_0 = cm->frame_refs[cm->ref_frame_idx_0].idx;
const int buf_idx_1 = cm->frame_refs[cm->ref_frame_idx_1].idx;
assert(buf_idx_0 != INVALID_IDX && buf_idx_1 != INVALID_IDX);
ref_offset[0] = cm->buffer_pool->frame_bufs[buf_idx_0].cur_frame_offset;
ref_offset[1] = cm->buffer_pool->frame_bufs[buf_idx_1].cur_frame_offset;
}
static int check_skip_mode_enabled(AV1_COMP *const cpi) {
AV1_COMMON *const cm = &cpi->common;
......
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