Fix a bug in frame scaling
authorYunqing Wang <yunqingwang@google.com>
Tue, 5 Dec 2023 01:32:51 +0000 (17:32 -0800)
committerJerome Jiang <jianj@google.com>
Wed, 6 Dec 2023 21:22:35 +0000 (16:22 -0500)
commitebca0ab6fa7862d3e511bf579446c5bc6f70bf4f
treecef7c2ff77c177795159aeeb98ebaeaa89a45bfc
parentffd533161ab3e95333351c977325ca615f9690c9
Fix a bug in frame scaling

This change fixed a corner case bug reealed by b/311394513.
During the frame scaling, vpx_highbd_convolve8() and vpx_scaled_2d()
requires both x_step_q4 and y_step_q4 are less than or equal to a
defined value. Otherwise, it needs to call vp9_scale_and_extend_
frame_nonnormative() that supports arbitrary scaling.

The fix was done in LBD and HBD funnctions.

Bug: b/311394513
Change-Id: Id0d34e7910ec98859030ef968ac19331488046d4
(cherry picked from commit 8bf3649d410cd68076e532e697f34dcec3f87ce7)
test/encode_api_test.cc
vp9/encoder/vp9_encoder.c
vp9/encoder/vp9_encoder.h
vp9/encoder/vp9_frame_scale.c