Commit a78c8f5f authored by Debargha Mukherjee's avatar Debargha Mukherjee

Misc fixes to build with CONFIG_LOOP_RESTORATION=0

Change-Id: I1e6a8a74d0ca1e6aa01d2da12bd9b19c8307154e
parent 20f89bd1
......@@ -100,14 +100,13 @@ static INLINE int av1_superres_unscaled(const AV1_COMMON *cm) {
}
#endif // CONFIG_HORZONLY_FRAME_SUPERRES
#if CONFIG_HORZONLY_FRAME_SUPERRES && CONFIG_LOOP_RESTORATION
#if CONFIG_HORZONLY_FRAME_SUPERRES
#define UPSCALE_NORMATIVE_TAPS 8
extern const int16_t av1_resize_filter_normative[1 << RS_SUBPEL_BITS]
[UPSCALE_NORMATIVE_TAPS];
int32_t av1_get_upscale_convolve_step(int in_length, int out_length);
#endif // CONFIG_HORZONLY_FRAME_SUPERRES && CONFIG_LOOP_RESTORATION
#endif // CONFIG_HORZONLY_FRAME_SUPERRES
#ifdef __cplusplus
} // extern "C"
......
......@@ -602,7 +602,6 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
int mi_row, int mi_col, aom_reader *r,
BLOCK_SIZE bsize) {
AV1_COMMON *const cm = &pbi->common;
const int num_planes = av1_num_planes(cm);
const int num_8x8_wh = mi_size_wide[bsize];
const int hbs = num_8x8_wh >> 1;
PARTITION_TYPE partition;
......@@ -617,6 +616,7 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd,
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) return;
#if CONFIG_LOOP_RESTORATION
const int num_planes = av1_num_planes(cm);
for (int plane = 0; plane < num_planes; ++plane) {
int rcol0, rcol1, rrow0, rrow1, tile_tl_idx;
if (av1_loop_restoration_corners_in_sb(cm, plane, mi_row, mi_col, bsize,
......@@ -3567,11 +3567,13 @@ void av1_decode_tg_tiles_and_wrapup(AV1Decoder *pbi, const uint8_t *data,
return;
}
#if CONFIG_LOOP_RESTORATION
if (cm->rst_info[0].frame_restoration_type != RESTORE_NONE ||
cm->rst_info[1].frame_restoration_type != RESTORE_NONE ||
cm->rst_info[2].frame_restoration_type != RESTORE_NONE) {
av1_loop_restoration_save_boundary_lines(&pbi->cur_buf->buf, cm, 0);
}
#endif // CONFIG_LOOP_RESTORATION
if (!cm->skip_loop_filter &&
#if CONFIG_INTRABC
......
......@@ -2028,7 +2028,6 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
const TOKENEXTRA *const tok_end, int mi_row,
int mi_col, BLOCK_SIZE bsize) {
const AV1_COMMON *const cm = &cpi->common;
const int num_planes = av1_num_planes(cm);
MACROBLOCKD *const xd = &cpi->td.mb.e_mbd;
const int hbs = mi_size_wide[bsize] / 2;
#if CONFIG_EXT_PARTITION_TYPES
......@@ -2041,6 +2040,7 @@ static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) return;
#if CONFIG_LOOP_RESTORATION
const int num_planes = av1_num_planes(cm);
for (int plane = 0; plane < num_planes; ++plane) {
int rcol0, rcol1, rrow0, rrow1, tile_tl_idx;
if (av1_loop_restoration_corners_in_sb(cm, plane, mi_row, mi_col, bsize,
......@@ -4608,7 +4608,6 @@ static uint32_t write_tiles_in_tg_obus(AV1_COMP *const cpi, uint8_t *const dst,
int insert_frame_header_obu_flag,
uint8_t obu_extension_header) {
AV1_COMMON *const cm = &cpi->common;
const int num_planes = av1_num_planes(cm);
aom_writer mode_bc;
int tile_row, tile_col;
TOKENEXTRA *(*const tok_buffers)[MAX_TILE_COLS] = cpi->tile_tok;
......@@ -4807,6 +4806,7 @@ static uint32_t write_tiles_in_tg_obus(AV1_COMP *const cpi, uint8_t *const dst,
cpi->td.mb.e_mbd.tile_ctx = &this_tile->tctx;
mode_bc.allow_update_cdf = 1;
#if CONFIG_LOOP_RESTORATION
const int num_planes = av1_num_planes(cm);
av1_reset_loop_restoration(&cpi->td.mb.e_mbd, num_planes);
#endif // CONFIG_LOOP_RESTORATION
......
......@@ -5227,8 +5227,10 @@ static void loopfilter_frame(AV1_COMP *cpi, AV1_COMMON *cm) {
#endif // CONFIG_LOOPFILTER_LEVEL
}
#if CONFIG_LOOP_RESTORATION
if (!no_restoration)
av1_loop_restoration_save_boundary_lines(cm->frame_to_show, cm, 0);
#endif // CONFIG_LOOP_RESTORATION
if (no_cdef) {
cm->cdef_bits = 0;
......
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