rtc-screen: Increase horiz search in estimate_scroll_motion
Scroll detection occurs in two places:
1) at the frame level in estimate_scroll_motion(). This is only done under certain conditions and only for a few superblocks.
2) at the superblock level in the variance partitioning, this is done on every frame.
This change only increases the horiz/col search window (makes it equal to the vert/row motion for high frame_source_sad) in the estimate_scroll_motion(), to avoid speed slowdown for now.
Reduces artifacts in the issue below for horiz scrolling.
Stats changed for speed 11 rtc_screen:
negligible change in speed/IC.
Bug: b:383306740
Change-Id: I54f329cff424299252cf5bd46d1329eb68009f59
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c
index 102f596..aadc0ec 100644
--- a/av1/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -3088,13 +3088,9 @@
const int full_search = 1;
// Keep border a multiple of 16.
const int border = (cpi->oxcf.border_in_pixels >> 4) << 4;
- // Make search_size_height larger to capture more common vertical scroll.
- // Increase the search if last two frames were dropped.
// Values set based on screen test set.
- int search_size_width = 160;
- int search_size_height = (cpi->rc.drop_count_consec > 1)
- ? (cpi->rc.frame_source_sad > 20000) ? 512 : 224
- : 192;
+ int search_size_height = (cpi->rc.frame_source_sad > 20000) ? 512 : 192;
+ int search_size_width = (cpi->rc.frame_source_sad > 20000) ? 512 : 160;
// Adjust based on boundary.
if ((pos_col - search_size_width < -border) ||
(pos_col + search_size_width > cm->width + border))