summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2019-03-08 21:00:48 -0800
committerMarco Paniconi <marpan@google.com>2019-03-10 18:43:54 -0700
commit855a71dfda9fb2620ae5567a5bb0897aa4fc0d47 (patch)
treeeb26e7aa96c73108c7ba4d8879624ada28536101 /vp9/encoder
parenta7b84619926c51a7bb3a8fd77f7fe98f85be50e4 (diff)
downloadlibvpx-855a71dfda9fb2620ae5567a5bb0897aa4fc0d47.tar
libvpx-855a71dfda9fb2620ae5567a5bb0897aa4fc0d47.tar.gz
libvpx-855a71dfda9fb2620ae5567a5bb0897aa4fc0d47.tar.bz2
libvpx-855a71dfda9fb2620ae5567a5bb0897aa4fc0d47.zip
vp9-screen: Rework the mode skip logic for screen
Don't force skip of zero-golden reference when zero_temp_sad_source = 0, as it be may the inter-layer reference. And remove the flatness conditon when superblock is static. Change-Id: I6b4b6eac0f6a2abc862c23d0e5467c7cf61995ef
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_pickmode.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 558210c60..ac9816263 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -2029,16 +2029,24 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
if (!(cpi->ref_frame_flags & flag_list[ref_frame])) continue;
- // For screen content on flat blocks: skip non-zero motion check for
- // stationary blocks, only skip zero motion check for non-stationary blocks.
- if (cpi->oxcf.content == VP9E_CONTENT_SCREEN &&
- sf->short_circuit_flat_blocks && x->source_variance == 0 &&
- cpi->compute_source_sad_onepass && cpi->sf.use_source_sad &&
- ((frame_mv[this_mode][ref_frame].as_int != 0 &&
- x->zero_temp_sad_source) ||
- (frame_mv[this_mode][ref_frame].as_int == 0 &&
- !x->zero_temp_sad_source))) {
- continue;
+ // For screen content. If zero_temp_sad source is computed: skip
+ // non-zero motion check for stationary blocks. If the superblock is
+ // non-stationary then for flat blocks skip the zero last check (keep golden
+ // as it may be inter-layer reference). Otherwise (if zero_temp_sad_source
+ // is not computed) skip non-zero motion check for flat blocks.
+ // TODO(marpan): Compute zero_temp_sad_source per coding block.
+ if (cpi->oxcf.content == VP9E_CONTENT_SCREEN) {
+ if (cpi->compute_source_sad_onepass && cpi->sf.use_source_sad) {
+ if ((frame_mv[this_mode][ref_frame].as_int != 0 &&
+ x->zero_temp_sad_source) ||
+ (frame_mv[this_mode][ref_frame].as_int == 0 &&
+ x->source_variance == 0 && ref_frame == LAST_FRAME &&
+ !x->zero_temp_sad_source))
+ continue;
+ } else if (frame_mv[this_mode][ref_frame].as_int != 0 &&
+ x->source_variance == 0) {
+ continue;
+ }
}
if (!(cpi->sf.inter_mode_mask[bsize] & (1 << this_mode))) continue;