diff options
author | James Zern <jzern@google.com> | 2022-08-22 19:33:26 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-08-22 19:33:26 -0700 |
commit | a689fe68a3e304df7f6ee3f711de108282da636f (patch) | |
tree | 800c604fbc5fc54b8e98fa53c234b20d5e1527be /test | |
parent | f88dae639c540a325570f818ef872391d8bd1e14 (diff) | |
download | libvpx-a689fe68a3e304df7f6ee3f711de108282da636f.tar libvpx-a689fe68a3e304df7f6ee3f711de108282da636f.tar.gz libvpx-a689fe68a3e304df7f6ee3f711de108282da636f.tar.bz2 libvpx-a689fe68a3e304df7f6ee3f711de108282da636f.zip |
vp9_ratectrl_rtc_test: initialize loopfilter_ctrl[]
this was added in:
7beafefd1 vp9: Allow for disabling loopfilter per spatial layer
but the test doesn't zero initialize its svc_params_ member.
fixes the use of an uninitialized value, reported by valgrind and
integer sanitizer:
[ RUN ] VP9/RcInterfaceSvcTest.Svc/0
==1064682== Conditional jump or move depends on uninitialised value(s)
==1064682== at 0x1C5624: loopfilter_frame (vp9_encoder.c:3285)
==1064682== by 0x1C9B54: encode_frame_to_data_rate (vp9_encoder.c:5595)
==1064682== by 0x1CA2EE: SvcEncode (vp9_encoder.c:5789)
==1064682== by 0x1CEA01: vp9_get_compressed_data (vp9_encoder.c:7891)
==1064682== by 0x185F0E: encoder_encode (vp9_cx_iface.c:1437)
==1064682== by 0x1503BB: vpx_codec_encode (vpx_encoder.c:208)
vp9/encoder/vp9_svc_layercontext.c:362:26: runtime error: implicit
conversion from type 'int' of value -1 (32-bit, signed) to type
'LOOPFILTER_CONTROL' changed the value to 4294967295 (32-bit, unsigned)
#0 0x558925f45377 in vp9_restore_layer_context vp9/encoder/vp9_svc_layercontext.c:362:26
#1 0x558925ef89fd in vp9_get_compressed_data vp9/encoder/vp9_encoder.c:7781:5
#2 0x558925e3ef3e in encoder_encode vp9/vp9_cx_iface.c:1437:20
Bug: b/229626362
Change-Id: I33d244be7752c68b71efa9c62ca45d6b202ec761
Diffstat (limited to 'test')
-rw-r--r-- | test/vp9_ratectrl_rtc_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/vp9_ratectrl_rtc_test.cc b/test/vp9_ratectrl_rtc_test.cc index b09a45bb7..03a58fa92 100644 --- a/test/vp9_ratectrl_rtc_test.cc +++ b/test/vp9_ratectrl_rtc_test.cc @@ -271,6 +271,7 @@ class RcInterfaceSvcTest : public ::libvpx_test::EncoderTest, svc_params_.max_quantizers[i] = 56; svc_params_.min_quantizers[i] = 2; svc_params_.speed_per_layer[i] = 7; + svc_params_.loopfilter_ctrl[i] = LOOPFILTER_ALL; } cfg_.rc_end_usage = VPX_CBR; cfg_.g_lag_in_frames = 0; |