Clear a first pass motion search corner case This is a port from libvpx and speculative fix for b/476473849. A repro has not been found yet. dca6330a24 Clear a first pass motion search corner case When setting the motion search parameters, align the frame size to be same or above a coding block size for consistency with other related use cases in the encoder. Bug: 476473849 Change-Id: Ib6de89c41f9e8e1569916a3167b5d1c5a63c8f1d
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c index a49db4a..0c66d7f 100644 --- a/av1/encoder/firstpass.c +++ b/av1/encoder/firstpass.c
@@ -256,7 +256,8 @@ // for first pass test. static int get_search_range(int width, int height) { int sr = 0; - const int dim = AOMMIN(width, height); + int dim = AOMMIN(width, height); + dim = AOMMAX(dim, MI_SIZE); while ((dim << sr) < MAX_FULL_PEL_VAL) ++sr; return sr;