Cap avg_frame_bandwidth at INT_MAX
authorJerome Jiang <jianj@google.com>
Mon, 16 Oct 2023 20:26:18 +0000 (16:26 -0400)
committerJerome Jiang <jianj@google.com>
Tue, 17 Oct 2023 21:06:28 +0000 (17:06 -0400)
commite4db6c3aacb3fbcbb939f132915234988f8617c1
treed5402df3424aebee9ecd2f3adb26c75360a7399e
parent0129e64a65594a2af81df5df2ad474dd168a1519
Cap avg_frame_bandwidth at INT_MAX

avg_frame_bandwidth = target_bandwidth / framerate

If target_bandwidth is too big and/or framerate is too small (< 1),
avg_frame_bandwidth could be overflow

Bug: chromium:1492864
Change-Id: I32314da1414b472ae4bf2acdcd81b8a948286146
test/encode_api_test.cc
vp9/encoder/vp9_ratectrl.c
vp9/encoder/vp9_svc_layercontext.c