From 771811710499607198e5af2f60da1df65f145c56 Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Tue, 29 Sep 2015 05:20:49 -0700 Subject: VP9: move loopfilter build masks to decode loop The loopfilter masks are now built in the decode loop. This is done so we can eventually reduce the number of MODE_INFO structs required by the decoder. The encoder builds the masks for the entire frame prior to calling the loopfilter. Change-Id: Ia2146b07e0acb8c50203e586dfae0c4c5b316f11 --- vp9/decoder/vp9_decodeframe.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vp9/decoder') diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index ba8c8ddc4..4e216121e 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -896,6 +896,10 @@ static void decode_block(VP9Decoder *const pbi, MACROBLOCKD *const xd, } xd->corrupted |= vpx_reader_has_error(r); + + if (cm->lf.filter_level) { + vp9_build_mask(cm, mbmi, mi_row, mi_col, bw, bh); + } } static INLINE int dec_partition_plane_context(const MACROBLOCKD *xd, @@ -1464,6 +1468,8 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi, memset(cm->above_seg_context, 0, sizeof(*cm->above_seg_context) * aligned_cols); + vp9_reset_lfm(cm); + get_tile_buffers(pbi, data, data_end, tile_cols, tile_rows, tile_buffers); if (pbi->tile_data == NULL || @@ -1662,6 +1668,8 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi, memset(cm->above_seg_context, 0, sizeof(*cm->above_seg_context) * aligned_mi_cols); + vp9_reset_lfm(cm); + // Load tile data into tile_buffers get_tile_buffers(pbi, data, data_end, tile_cols, tile_rows, tile_buffers); -- cgit v1.2.3