summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-08-31test/*,cosmetics: normalize void parameter listsJames Zern
replace (void) with (); use of this synonym is more common in C++ code. Change-Id: I9813e82234dc9caa7115918a0491b0040f6afaf4
2022-08-26Merge "[NEON] Add highbd *variance* functions" into mainJames Zern
2022-08-25[NEON] Add highbd *variance* functionsKonstantinos Margaritis
Total gain for 12-bit encoding: * ~7.2% for best profile * ~5.8% for rt profile Change-Id: I5b70415fb89d1bbb02a0c139eb317ba6b08adede
2022-08-24vp8_ratectrl_rtc_test.cc: ensure frame_type is initializedJames Zern
this fixes a valgrind failure: ==1095597== Conditional jump or move depends on uninitialised value(s) ==1095597== at 0x12E0CC: (anonymous namespace)::Vp8RcInterfaceTest::PreEncodeFrameHook(libvpx_test::VideoSource*, libvpx_test:: > Encoder*) (vp8_ratectrl_rtc_test.cc:131) ==1095597== by 0x1255A9: libvpx_test::EncoderTest::RunLoop(libvpx_test::VideoSource*) (encode_test_driver.cc:205) Bug: webm:1776 Change-Id: Id3b40f62573ee513e79c74b6315c71b6ecd22c9a Fixed: webm:1776
2022-08-22vp9_ratectrl_rtc_test: initialize loopfilter_ctrl[]James Zern
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
2022-08-22[NEON] Added vpx_highbd_sad* functionsKonstantinos Margaritis
Total gain for 12-bit encoding: * ~7.8% for best profile * ~10% for rt profile Change-Id: I89eda5c4372a5b628c9df84cdeb4c8486fc44789
2022-08-22Merge "[NEON] Added vpx_highbd_quantize_b* functions" into mainJames Zern
2022-08-22Merge "Fix TEST_P(SADx4Test, DISABLED_Speed)" into mainScott LaVarnway
2022-08-20[NEON] Added vpx_highbd_quantize_b* functionsKonstantinos Margaritis
Total gain for 12-bit encoding: * ~4.8% for best profile * ~6.2% for rt profile Change-Id: I61e646ab7aedf06a25db1365d6d1cf7b05101c21
2022-08-18Merge changes Icfc59932,I3d1ca618,Id3966912,I56f74981,Ia9a5dc5e, ... into mainJames Zern
* changes: vpx_encoder.h: make flag constants unsigned vp8,VP8_COMP: normalize segment_encode_breakout type webmdec,WebmInputContext: make timestamp_ns signed highbd_quantize_intrin_sse2: quiet int sanitizer warnings load_unaligned_u32: use an int w/_mm_cvtsi32_si128 variance_sse2.c: add some missing casts
2022-08-18Fix TEST_P(SADx4Test, DISABLED_Speed)Scott LaVarnway
The reference code was being timed instead of the optimized code. Change-Id: I67eb08dcda80e20eaa075dc2c91b7e8ef5c0cdfb
2022-08-16vp8,VP8_COMP: normalize segment_encode_breakout typeJames Zern
use unsigned int as the API value is of this type; this quiets some integer sanitizer warnings of the form: implicit conversion from type 'unsigned int' of value 2147483648 (32-bit, unsigned) to type 'int' changed the value to -2147483648 (32-bit, signed) Bug: b/229626362 Change-Id: I3d1ca618bf1b3cd57a5dca65a3067f351c1473f8
2022-08-16Add vp9_highbd_quantize_fp_32x32_neon().Scott LaVarnway
Up to 2.6x faster than vp9_highbd_quantize_fp_32x32_c() for full calculations. Bug: b/237714063 Change-Id: Icfeff2ad4dcd57d0ceb47fe04789710807b9cbad
2022-08-15VPX: Add vp9_highbd_quantize_fp_neon().Scott LaVarnway
Up to 4.1x faster than vp9_highbd_quantize_fp_c() for full calculations. ~1.3% overall encoder improvement for the test clip used. Bug: b/237714063 Change-Id: I8c6466bdbcf1c398b1d8b03cab4165c1d8556b0c
2022-08-08Use level defined min gf intervalCheng Chen
Assume the level definition of min_gf_interval is the minimum allowed gf_interval. We take this level comformant min_gf_interval instead of +1. Change-Id: I9c7e62f210c95b356e9716579ee4c19638de8e35
2022-08-08L2E: Add target level in GOP unit testsCheng Chen
Change-Id: Icecc3031e1052bb5a94f6c5957ec5190aae990ba
2022-08-05VPX: Add vpx_subtract_block_avx2().Scott LaVarnway
~1.3x faster than vpx_subtract_block_sse2(). Based on aom_subtract_block_avx2(). Bug: b/241580104 Change-Id: I17da036363f213d53c6546c3e858e4c3cba44a5b
2022-08-03VPX: Add vp9_highbd_quantize_fp_32x32_avx2().Scott LaVarnway
~4x faster than vp9_highbd_quantize_fp_32x32_c() for full calculations. Bug: b/237714063 Change-Id: Iff2182b8e7b1ac79811e33080d1f6cac6679382d
2022-08-03VPX: Add vp9_highbd_quantize_fp_avx2().Scott LaVarnway
Up to 5.37x faster than vp9_highbd_quantize_fp_c() for full calculations. ~1.6% overall encoder improvement for the test clip used. Bug: b/237714063 Change-Id: I584fd1f60a3e02f1ded092de98970725fc66c5b8
2022-08-02Merge "VPX: Add vp9_quantize_fp_32x32_avx2()." into mainScott LaVarnway
2022-08-01VPX: Add vp9_quantize_fp_32x32_avx2().Scott LaVarnway
Up to 1.80x faster than vp9_quantize_fp_32x32_ssse3() for full calculations. Bug: b/237714063 Change-Id: Ic4ae4724fce7ac85c7a089535b16a999e02f0a10
2022-07-29Merge changes I0c6604ef,Id7e13b3d,I7291d9bd,Ic7c0a2e7,Ic7ce0fd9, ... into mainJames Zern
* changes: x86: normalize type with _mm_cvtsi128_si32 vp9_filter_block_plane_non420: fix implicit conversion warnings variance_avx2.c: fix implicit conversion warnings vp8,read_mb_modes_mv: fix implicit conversion warnings vp8_find_near_mvs: fix implicit conversion warnings encode_test_driver: normalize frame_flags type vp9,decoder_decode: fix ubsan null/zero offset warning y4m_input_fetch_frame: fix ubsan null/zero offset warning
2022-07-27encode_test_driver: normalize frame_flags typeJames Zern
use vpx_enc_frame_flags_t; this avoids int -> unsigned conversion warnings; reported w/clang -fsanitize=integer: test/error_resilience_test.cc:95:9: runtime error: implicit conversion from type 'int' of value -12845057 (32-bit, signed) to type 'unsigned long' changed the value to 4282122239 (32-bit, unsigned) Bug: b/229626362 Change-Id: I0fc1dbe44a258f397cf1a05347d8cb86ee70b1b8
2022-07-27VPX: vp9_quantize_fp_avx2() cleanup.Scott LaVarnway
No change in performance. Bug: b/237714063 Change-Id: I8ea42759cc4dc57be6a29c23784997cb90ad4090
2022-07-26VPX: Add vpx_highbd_quantize_b_32x32_avx2().Scott LaVarnway
Up to 11.78x faster than vpx_quantize_b_32x32_sse2() for full calculations. ~1.7% overall encoder improvement for the test clip used. Bug: b/237714063 Change-Id: Ib759056db94d3487239cb2748ffef1184a89ae18
2022-07-25VPX: Add vpx_highbd_quantize_b_avx2().Scott LaVarnway
Up to 3.61x faster than vpx_highbd_quantize_b_sse2() for full calculations. ~2.3% overall encoder improvement for the test clip used. Bug: b/237714063 Change-Id: I23f88d2a7f96aaa4103778372f4f552207f73cee
2022-07-25Merge "VPX: Add vpx_quantize_b_32x32_avx2()." into mainScott LaVarnway
2022-07-22Merge "L2E: Add more unit tests for GOP API" into mainCheng Chen
2022-07-21L2E: Add more unit tests for GOP APICheng Chen
Add unit tests for a 4 frame video, which could be considered as a corner case. Three different GOP settings are tested and verified as valid. (1). The first GOP has 3 coding frames, no alt ref. The second GOP has 1 coding frame, no alt ref. The numer of coding frames is 4. Their frame types are: keyframe, inter_frame, inter_frame, golden_frame. (2). The first GOP has 4 coding frames, use alt ref. The second GOP has 1 coding frame, which is the overlay of the first GOP's alt ref frame. The numer of coding frames is 5. Their types are: keyframe, alt_ref, inter_frame, inter_frame, overlay_frame. (3). Only one GOP with 4 coding frames, do not use alt ref. The numer of coding frames is 4. Their types are: keyframe, inter_frame, inter_frame, inter_frame. Change-Id: I4079ff5065da79834b363b1e1976f65efed3f91f
2022-07-20pp_filter_test: quiet static analysis warningJames Zern
in CheckLowFilterOutput(); use std::unique_ptr to avoid spurious memory leak warning: test/pp_filter_test.cc|466 col 3| warning: Potential leak of memory pointed to by 'expected_output' [cplusplus.NewDeleteLeaks] ASSERT_NE(expected_output, nullptr); Bug: b/229626362 Change-Id: Ie9e06c9b9442ffa134e514d2aee70841d19c8ecb
2022-07-19encode_api_test: quiet static analysis warningJames Zern
in ConfigChangeThreadCount(); initialize cfg as the static analyzer can assume AlwaysTrue() within EXPECT_NO_FATAL_FAILURE may return false causing InitCodec() not to be called. test/encode_api_test.cc|321 col 3| warning: 1st function call argument is an uninitialized value [core.CallAndMessage] video.SetSize(cfg.g_w, cfg.g_h); Bug: b/229626362 Change-Id: I54899ed0a207ca685416bed3a0e9c9644668e163
2022-07-19VPX: Add vpx_quantize_b_32x32_avx2().Scott LaVarnway
Up to 1.36x faster than vpx_quantize_b_32x32_avx() for full calculations. Up to 1.29x faster for VP9_HIGHBITDEPTH builds. Bug: b/237714063 Change-Id: I97aa6a18d4dc2f3187b76800f91bbba7be447ef1
2022-07-11VPX: Add vpx_quantize_b_avx2().Scott LaVarnway
Up to 1.58x faster than vpx_quantize_b_avx() depending on the size. Bug: b/237714063 Change-Id: I595a6bb32ebee63f69f27b5a15322fdeae1bf70e
2022-07-07VPX: Add quantize speed test for ref vs opt.Scott LaVarnway
Bug: b/237714063 Change-Id: I4304ba8d976fed3613e28442983b04a9cfc15b79
2022-06-29rtc: Add svc test for profile 2 10/12 bitMarco Paniconi
Add TODO to fix the superframe parser for 10/12 bit. Change-Id: Ib76c4daa0ff2f516510829ead6a397c89abba2f3
2022-06-28rtc-svc: Fix to make SVC work for Profile 1Marco Paniconi
Added datarate unittest for 4:4:4 and 4:2:2 input, for spatial and temporal layers. Fix is needed in vp9_set_literal_size(): the sampling_x/y should be passed into update_inital_width(), othewise sampling_x/y = 1/1 (4:2:0) was forced. vp9_set_literal_size() is only called by the svc and on dynamic resize. Fix issue with the normative optimized scaler: UV width/height was assumed to be 1/2 of Y, for the ssse and neon code. Also fix to assert for the scaled width/height: in case scaled width/height is odd it should be incremented by 1 (make it even). Change-Id: I3a2e40effa53c505f44ef05aaa3132e1b7f57dd5
2022-06-27L2E: Distinguish fixed and active gf_intervalCheng Chen
min/max_gf_interval is fixed and can be passed from the command line. It must satisfy the level constraints. active_min/max_gf_interval might be changing based on min/max_gf_interval. It is determined per GOP. Change-Id: If456c691c97a8b4c946859c05cedd39ca7defa9c
2022-06-17vp9_cx_iface: set default cpu_used=5 w/CONFIG_REALTIME_ONLYJames Zern
this avoids a crash if cpu-used is not explicitly set as there are some (unnecessary) checks against use_nonrd_pick_mode which would cause encoding to be skipped if the old default of 0 were used Bug: webm:1773 Change-Id: I62fba5fb51d8afa422689b7de3f03e8f7570e50b Fixed: webm:1773
2022-06-14Merge "vp9,encoder: fix some integer sanitizer warnings" into mainJames Zern
2022-06-10Convert EncoderTest::last_pts_ to a local variableWan-Teh Chang
Convert the data member EncoderTest::last_pts_ to a local variable in the EncoderTest::RunLoop() and VP9FrameSizeTestsLarge::RunLoop() methods. EncoderTest::last_pts_ is only used in these two methods, and these two methods first set EncoderTest::last_pts_ to 0 before using it. So EncoderTest::last_pts_ is effectively a local variable in these two methods. Note that several subclasses of EncoderTest declare their own last_pts_ data member and use it to calculate the data rate. Apparently their own last_pts_ data member hides the same-named data member in the base class. Although this is allowed by C++, this is very confusing. Change-Id: I55ce1cf8cc62e07333d8a902d65b46343a3d5881
2022-06-07L2E: Use libvpx's default q in case of invalid external valueCheng Chen
If the external model recommends an invalid q value, we use the default q selected by libvpx's rate control strategy. We update the test so that when the external model wants to control GOP decision, it could get per frame information and just recommend an invalid q. Change-Id: I69be4b0ee0800e7ab0706d305242bb87f001b1f7
2022-06-06L2E: rename 'gop_index' to 'gop_global_index'Cheng Chen
'gop_index' has already been used in vpx_rc_encodeframe_info_t, which represents the frame index inside the current group of picture (gop). We therefore use 'gop_global_index' to represent the index of the current gop to avoid duplicate names. Change-Id: I3eb8987dd878f650649b013e0036e23d0846b5f0
2022-06-02Merge "L2E: Return error when GOP model is not set" into mainCheng Chen
2022-06-01L2E: Return error when GOP model is not setCheng Chen
- Return error instead of OK when GOP model is not set. - Update descriptions for a few variables. Change-Id: I213f6b7085c487507c3935e7ce615e807f4474cc
2022-06-01vp9,encoder: fix some integer sanitizer warningsJames Zern
the issues fixed in this change are related to implicit conversions between int / unsigned int: vp9/encoder/vp9_segmentation.c:42:36: runtime error: implicit conversion from type 'int' of value -9 (32-bit, signed) to type 'unsigned int' changed the value to 4294967287 (32-bit, unsigned) vpx_dsp/x86/sum_squares_sse2.c:36:52: runtime error: implicit conversion from type 'unsigned int' of value 4294967295 (32-bit, unsigned) to type 'int' changed the value to -1 (32-bit, signed) vpx_dsp/x86/sum_squares_sse2.c:36:67: runtime error: implicit conversion from type 'unsigned int' of value 4294967295 (32-bit, unsigned) to type 'int' changed the value to -1 (32-bit, signed) vp9/encoder/x86/vp9_diamond_search_sad_avx.c:81:45: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4290576316 (32-bit, unsigned) to type 'int' changed the value to -4390980 (32-bit, signed) vp9/encoder/vp9_rdopt.c:3472:31: runtime error: implicit conversion from type 'int' of value -1024 (32-bit, signed) to type 'uint16_t' (aka 'unsigned short') changed the value to 64512 (16-bit, unsigned) unsigned is forced for masks and int is used with intel intrinsics Bug: webm:1767 Change-Id: Icfa4179e13bc98a36ac29586b60d65819d3ce9ee Fixed: webm:1767
2022-05-31resize_test: add TODO for ResizeTest instantiation for VP9James Zern
this should match VP8 and use ONE_PASS_TEST_MODES, but currently the code will produce integer sanitizer warnings and may segfault under certain conditions Bug: webm:1767,webm:1768 Change-Id: I6482ff1862f19716fde3d57522591bc61d76a84f
2022-05-31resize_test: add TODO for test failureJames Zern
DISABLED_TestExternalResizeSmallerWidthBiggerSize was added for webm:1642, but never fixed Bug: webm:1642 Change-Id: I0fa368a44dda550241ea997068c58eaff551233c
2022-05-31Merge "L2E: Add vp9 GOP decision helper function" into mainCheng Chen
2022-05-31Merge "L2E: Add control type for the external rate control API" into mainCheng Chen
2022-05-27test/*: normalize use of nullptrJames Zern
this is preferred over NULL in C++11 Change-Id: Ic48ddcc6dfb8975a57f6713549ad04d93db21415