summaryrefslogtreecommitdiff
path: root/vp8
AgeCommit message (Collapse)Author
2023-08-10RISC-V: optimize vp8_copy_mem with RVVriscv64_android_optimizationYuuta Liang
Test environment: 8c 1804Mhz i5-1140G7 RVV Impl: % CROSS=riscv64-unknown-linux-gnu- configure --target=riscv64-linux-gcc \ --enable-debug --enable-gprof && make -j % time qemu-riscv64 -cpu rv64,v=true,zba=true,vlen=128 -L /path/to/sysroot/ \ ./vpxenc --codec=vp8 -w 352 -h 288 -o akiyol.vpx ./akiyo_cif.yuv Pass 1/1 frame 300/300 314977B 8399b/f 251981b/s 92226 ms (3.25 fps) user 1m30.108s % gprof -abp ./vpxenc ./gmon.out | grep vp8_copy_mem 1.36 53.09 1.04 1025863 0.00 0.00 vp8_copy_mem16x16_rvv 0.72 59.01 0.55 1641368 0.00 0.00 vp8_copy_mem8x8_rvv 0.05 65.95 0.04 764377 0.00 0.00 vp8_copy_mem8x4_rvv C Impl: % CROSS=riscv64-unknown-linux-gnu- configure --target=generic-gnu --enable-debug \ --enable-gprof && make -j % time qemu-riscv64 -cpu rv64,v=true,zba=true,vlen=128 -L /path/to/sysroot/ \ ./vpxenc --codec=vp8 -w 352 -h 288 -o akiyol.vpx ./akiyo_cif.yuv Pass 1/1 frame 300/300 314977B 8399b/f 251981b/s 98417 ms (3.05 fps) user 1m36.146s % gprof -abp ./vpxenc ./gmon.out | grep vp8_copy_mem 0.38 63.96 0.31 vp8_copy_mem8x4_c 0.04 70.61 0.03 204336 0.00 0.00 vp8_copy_mem16x16_c Signed-off-by: Yuuta Liang <yuuta@yuuta.moe>
2023-07-10add example how to use rtcdWang Chen
Just use vp8_sixtap_predict as example but have not implemented it actually. Test: $ CROSS=riscv64-unknown-linux-gnu- ../libvpx/configure --target=riscv64-linux-gcc $ make Check if vp8_sixtap_predict functions have been replaced with those suffixed with "_rvv": $ riscv64-unknown-linux-gnu-nm ./vp8/decoder/decodeframe.c.o | grep vp8_sixtap_predict16x16 U vp8_sixtap_predict16x16_rvv Check if vp8_sixtap_predictMxN_rvv work. $ qemu-riscv64 -L $SYSROOT_RV64 ./build-test/test_libvpx --gtest_filter="RVV/SixtapPredictTest.TestWithPresetData/*" You should see print log output such as: "--> vp8_sixtap_predict4x4_rvv" "FAILED" is expected due to we have not implemented the actual algorithm. Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn> Co-authored-by: sun min <sunmin89@outlook.com>
2023-06-07Fix more typos (n/n)Jerome Jiang
impace -> impact taget -> target prediciton -> prediction addtion -> addition the the -> the Bug: webm:1803 Change-Id: I759c9d930a037ca69662164fcd6be160ed707d77
2023-06-07Fix more typos (3/n)Jerome Jiang
Propogation -> Propagation propogate -> propagate cant -> can't upto -> up to canddiates -> candidates refernce -> reference USEAGE -> USAGE Change-Id: Iadaf2dffd86b54e04411910f667e8c2dfc6c4c77
2023-06-07Fix more typos (2/n)Jerome Jiang
kernal -> kernel e.g -> e.g. paritioning -> partitioning partioning -> partitioning coefficents -> coefficients i.e, -> i.e., equivalend -> equivalent recive -> receive resoultions -> resolutions Bug: webm:1803 Change-Id: I1d6176202ee5daee7a64bf59114e8b304aeb4db7
2023-06-07Fix more typos (1/n)Jerome Jiang
Dont -> Don't setings -> settings thresold -> thresh thresold -> threshold becasue -> because itterations -> iterations its a -> it's a an constant -> a constant Bug: webm:1803 Change-Id: I1e019393939ed25c59c898c88d4941ec360b026d
2023-06-07Fix a few typosJerome Jiang
segement -> segment dont -> don't useage -> usage devide -> divide Bug: webm:1803 Change-Id: I0153380b0003825c4b62cf323d4f2bc837c8a264
2023-05-09Merge "vp8_macros_msa.h: clear -Wshadow warnings" into mainJames Zern
2023-05-08vp8_macros_msa.h: clear -Wshadow warningsJames Zern
Bug: webm:1793 Change-Id: Ia940b06bd23a915a050432e03bb630567e891d8d
2023-05-08Merge changes Ie165d410,I6d9bb8da,I6858e574 into mainJames Zern
* changes: vp8_[cd]x_iface: clear setjmp flag on function exit vp9_decodeframe,tile_worker_hook: relocate setjmp=1 vp9,encoder_set_config: set setjmp flag after setjmp()
2023-05-08Unify implementation of CHECK_MEM_ERRORJerome Jiang
There were multiple implementations of CHECK_MEM_ERROR across the library that take different arguments and used in different places. This CL will unify them and have only one implementation that takes vpx_internal_error_info. Change-Id: I2c568639473815bc00b1fc2b72be56e5ccba1a35
2023-05-05sixtap_filter_msa.c: clear -Wshadow warningsJames Zern
Bug: webm:1793 Change-Id: I5f9c09f31b06fecc123c6a9d01f5fbed39142356
2023-05-05vp8_[cd]x_iface: clear setjmp flag on function exitJames Zern
in vp8e_encode, also move setting the setjmp() call closer to setting the flag. Change-Id: Ie165d4100b84776f9c34eddcf64657bd78cce4f5
2023-05-03s/__aarch64__/VPX_ARCH_AARCH64/James Zern
This allows AArch64 to be correctly detected when building with Visual Studio (cl.exe) and fixes a crash in vp9_diamond_search_sad_neon.c. There are still test failures, however. Microsoft's compiler doesn't define __ARM_FEATURE_*. To use those paths we may need to rely on _M_ARM64_EXTENSION. Bug: webm:1788 Bug: b/277255076 Change-Id: I4d26f5f84dbd0cbcd1cdf0d7d932ebcf109febe5
2023-04-19onyx_if,encode_frame_to_data_rate: rm unused varJames Zern
quiets -Wunused-but-set-variable with clang-17 Change-Id: Ia819beac84cbd57f4eeca6174c785fd320bc40c6
2023-04-18Merge "mr_dissim: clear -Wshadow warning" into mainJames Zern
2023-04-17mr_dissim: clear -Wshadow warningJames Zern
Bug: webm:1793 Change-Id: I73ced43aba45215264134f917fd69ab0b1f10d01
2023-04-17onyx_if: clear -Wshadow warningJames Zern
with --enable-internal-stats Bug: webm:1793 Change-Id: I9d375e4cb45f78b82afe455f2c7ad2b56e217f7d
2023-04-13Add VP8RateControlRTC::GetLoopfilterLevelJerome Jiang
New linear model to calculate loopfilter level from frame qp. Linear regression was done on qvga, vga, and hd clips. Bug: b/275304642 Change-Id: I552b312212bb4de21b53b762d139aa9588c64ae2
2023-03-22Merge "Change UpdateRateControl() to return bool" into mainWan-Teh Chang
2023-03-20sixtappredict_neon.c: remove redundant returnsJames Zern
Change-Id: I650b305c2599fc32353daba030e6241d330796a7
2023-03-20sixtappredict_neon.c,cosmetics: fix a typoJames Zern
Change-Id: If3e4cf372fc6ed076f0d42c435a72262494aab68
2023-03-20vp8_sixtap_predict16x16_neon: fix overreadJames Zern
Shift the final read from the source by 3 to avoid breaking the assumption that the 6-tap filter needs only 5 pixels outside of the macroblock; this matches the sse2 and ssse3 implementations. It's possible this restriction could be removed if the source buffers are assumed to be padded. Bug: webm:1795 Change-Id: I4c791e3a214898a503c78f4cedca154c75cdbaef Fixed: webm:1795
2023-03-16Change UpdateRateControl() to return boolWan-Teh Chang
Change the VP9RateControlRtcConfig constructor to initialize ss_number_layers (to 1). Change UpdateRateControl() to return bool so that it can report failure (due to invalid configuration). Also change InitRateControl() to return bool to propagate the return value of UpdateRateControl(). Note: This is a port of the libaom CL https://aomedia-review.googlesource.com/c/aom/+/172042. Change-Id: I90b60353b5f15692dba5d89e7b1a9c81bb2fdd89
2023-03-03disable vp8_sixtap_predict16x16_neonJames Zern
This causes various buffer overflows in the tests: [ RUN ] NEON/SixtapPredictTest.TestWithPresetData/0 ================================================================= ==22346==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000012b4a5b at pc 0x000000df0f60 bp 0xffffcf6e64b0 sp 0xffffcf6e64a8 READ of size 8 at 0x0000012b4a5b thread T0 #0 0xdf0f5c in vp8_sixtap_predict16x16_neon vp8/common/arm/neon/sixtappredict_neon.c:1507:13 #1 0x8819e4 in (anonymous namespace)::SixtapPredictTest_TestWithPresetData_Test::TestBody() test/predict_test.cc:293:3 ... 0x0000012b4a5b is located 2 bytes to the right of global variable 'kTestData' defined in '../test/predict_test.cc:237:24' (0x12b48a0) of size 441 [ RUN ] NEON/SixtapPredictTest.TestWithRandomData/0 ================================================================= ==22338==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xffff8b5321fb at pc 0x000000df0f60 bp 0xfffff7e0cf30 sp 0xfffff7e0cf28 READ of size 8 at 0xffff8b5321fb thread T0 #0 0xdf0f5c in vp8_sixtap_predict16x16_neon vp8/common/arm/neon/sixtappredict_neon.c:1507:13 #1 0x87d4c0 in (anonymous namespace)::PredictTestBase::TestWithRandomData(void (*)(unsigned char*, int, int, int, unsigned char*, int)) test/predict_test.cc:170:9 ... 0xffff8b5321fb is located 2 bytes to the right of 441-byte region [0xffff8b532040,0xffff8b5321f9) allocated by thread T0 here: #0 0x5fd4f0 in operator new[](unsigned long) (test_libvpx+0x5fd4f0) #1 0x87c2e0 in (anonymous namespace)::PredictTestBase::SetUp() test/predict_test.cc:47:12 #2 0x87d074 in non-virtual thunk to (anonymous namespace)::PredictTestBase::SetUp() test/predict_test.cc ... Bug: webm:1795 Change-Id: I32213a381eef91547d00f88acf90f1cf2ec2ea75
2023-02-09Remove onyx_int.h from vp8 rc headerJerome Jiang
Also move the FRAME_TYPE declaration to common.h Bug: webm:1766 Change-Id: Ic3016bd16548a5d2e0ae828a7fd7ad8adda8b8f6
2023-02-06Remove duplicated VPX_SCALING declarationJerome Jiang
Use VPX_SCALING_MODE instead Change-Id: Iab9d29f20838703e00bd9f7641035d8ebd69af53
2022-10-18Fix to VP8 external RC for buffer levelsMarco Paniconi
On a dynamic change of temporal layers: starting/maimum/optimal were being set twice, causing incorrect large values. Bug: b/253927937 Change-Id: I204e885cff92530336a9ed9a4363c486c5bf80ae
2022-10-14Fix to VP8 external RC for dynamic update of layersMarco Paniconi
On change/update of rc_cfg: when number of temporal layers change call vp8_reset_temporal_layer_change(), which in turn will call vp8_init_temporal_layer_context() only for the new layers. Bug:b/249644737 Change-Id: Ib20d746c7eacd10b78806ca6a5362c750d9ca0b3
2022-09-12CHECK_MEM_ERROR: add an assert for a valid jmp targetJames Zern
callers of CHECK_MEM_ERROR() expect failures to not return tested with: configure --enable-debug --enable-vp9-postproc --enable-postproc \ --enable-multi-res-encoding --enable-vp9-temporal-denoising \ --enable-error-concealment --enable-internal-stats has unrelated assertion failures currently Change-Id: Ic12073b1ae80a6f434f14d24f652e64d30f63eea
2022-09-07vp8_decode: declare 2 variables volatileJames Zern
fixes -Wclobbered warnings with gcc 12.1.0: vp8/vp8_dx_iface.c|278 col 16| warning: variable 'w' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] vp8/vp8_dx_iface.c|278 col 19| warning: variable 'h' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] Change-Id: Ib2c606a3450188d7869c066cacaf5615d9746181
2022-08-23.clang-format: update to clang-format-11clang-format
only store the deltas from --style Google in the file and reapply using Debian clang-format version 11.1.0-6+build1 Bug: b/229626362 Change-Id: I3e18a2e7c17a90a48405b3cf1b37ebc652aba0db
2022-08-18use VPX_NO_UNSIGNED_SHIFT_CHECK with entropy functionsJames Zern
these shift values off the most significant bit as part of the process; vp8_regular_quantize_b_sse4_1 is included here for a special case of mask creation quiets warnings of the form: vp8/decoder/dboolhuff.h:81:11: runtime error: left shift of 2373679303235599696 by 3 places cannot be represented in type 'VP8_BD_VALUE' (aka 'unsigned long') vp8/encoder/bitstream.c:257:18: runtime error: left shift of 2147493041 by 1 places cannot be represented in type 'unsigned int' vp8/encoder/x86/quantize_sse4.c:114:18: runtime error: left shift of 4294967294 by 1 places cannot be represented in type 'unsigned int' vp9/encoder/vp9_pickmode.c:1632:41: runtime error: left shift of 4294967295 by 1 places cannot be represented in type 'unsigned int' Bug: b/229626362 Change-Id: Iabed118b2a094232783e5ad0e586596d874103ca
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-07-27x86: normalize type with _mm_cvtsi128_si32James Zern
prefer int in most cases w/clang -fsanitize=integer fixes warnings of the form: implicit conversion from type 'int' of value -809931979 (32-bit, signed) to type 'uint32_t' (aka 'unsigned int') changed the value to 3485035317 (32-bit, unsigned) Bug: b/229626362 Change-Id: I0c6604efc188f2660c531eddfc7aa10060637813
2022-07-27vp8,read_mb_modes_mv: fix implicit conversion warningsJames Zern
w/clang -fsanitize=integer fixes warnings of the form: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4294443008 (32-bit, unsigned) to type 'int' changed the value to -524288 (32-bit, signed) Bug: b/229626362 Change-Id: Ic7c0a2e7b64a1dd6fd5cc64adcd5765318c2a956
2022-07-27vp8_find_near_mvs: fix implicit conversion warningsJames Zern
unsigned -> int and vice versa reported by clang -fsanitize=integer vp8/common/findnearmv.c:108:11: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4294443008 (32-bit, unsigned) to type 'int' changed the value to -524288 (32-bit, signed) vp8/common/findnearmv.c:110:33: runtime error: implicit conversion from type 'int' of value -524288 (32-bit, signed) to type 'uint32_t' (aka 'unsigned int') changed the value to 4294443008 (32-bit, unsigned) Bug: b/229626362 Change-Id: Ic7ce0fd98255ccf9307ac73e9fb6a8189b268214
2022-07-09vp8_macros_msa.h: avoid shadowing variables in definesJames Zern
this avoids a warning with certain versions of gcc; observed with: mipsisa32r6el-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110 Change-Id: I8999f487a79a9d53133816d572054b2423330bcf
2022-06-28Add vp8_ prefix for quantize_lsx.cJerome Jiang
Duplicate name as vpx_dsp/loongarch/quantize_lsx.c Chromium update script fails. Bug: webm:1755 Change-Id: Ifb956c2292d909496eb2b9e1833993f1b021b07e
2022-05-31vp8e_set_config: setjmp before calling vp8_change_configJames Zern
vp8_change_config may call vp8_alloc_compressor_data which expects failures detected by CHECK_MEM_ERROR to not return. Change-Id: Ib7fbf4af904bd9b539402bb61c8f87855eef2ad6
2022-05-25loongarch: Remove redundant codeyuanhecai
Simplify architecture support code and remove redundant code to improve efficiency. Bug: webm:1755 Change-Id: I03bc251aca115b0379fe19907abd165e0876355b
2022-05-20loongarch: Modify the representation of macrosyuanhecai
Some macros have been changed to "#define do {...} While (0)", change the rest to "static INLINE ..." Bug: webm:1755 Change-Id: I445ac0c543f12df38f086b479394b111058367d0
2022-05-17vp8[loongarch]: Optimize vp8_sixtap_predict4x4yuanhecai
1. vp8_sixtap_predict4x4 Bug: webm:1755 Change-Id: If7d844496ef2cfe2252f2ef12bb7cded63ad03dd
2022-05-17vp8[loongarch]: Optimize fdct8x4/diamond_search_sadyuanhecai
1. vp8_short_fdct8x4_lsx 2. vp8_diamond_search_sad_lsx 3. vpx_sad8x8_lsx Bug: webm:1755 Change-Id: Ic9df84ead2d4fc07ec58e9730d6a12ac2b2d31c1
2022-05-17vp8[loongarch]: Optimize vp8 encoding partial functionHao Chen
1. vp8_short_fdct4x4 2. vp8_regular_quantize_b 3. vp8_block_error 4. vp8_mbblock_error 5. vpx_subtract_block Bug: webm:1755 Change-Id: I3dbfc7e3937af74090fc53fb4c9664e6cdda29ef
2022-04-19vp8_decode: free mt buffers early on resolution changeJames Zern
this avoids a desynchronization of mb_rows if an allocation prior to vp8mt_alloc_temp_buffers() fails and the decoder is then destroyed Bug: webm:1759 Change-Id: I75457ef9ceb24c8a8fd213c3690e7c1cf0ec425f
2022-04-15vp8,get_sub_mv_ref_prob: change arguments to uint32_tJames Zern
this matches the call with int_mv::as_int and fixes a warning with clang-13 -fsanitize=integer: vp8/decoder/decodemv.c:240:32: runtime error: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 4282515456 (32-bit, unsigned) to type 'int' changed the value to -12451840 (32-bit, signed) Bug: webm:1759 Change-Id: I7c0aa72baa45421929afac26566e149adc6669d7
2022-04-15vp8: fix some implicit unsigned -> int conversionsJames Zern
fixes some warnings with clang-13 -fsanitize=integer: vp8/decoder/threading.c:77:27: 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) these bitmask constants were missed in: 1676cddaa vp8: fix some implicit signed -> unsigned conv warnings Bug: webm:1759 Change-Id: I5d894d08fd41e32b91b56a4d91276837b3415ee4
2022-04-15Merge "Fix int overflow in intermediate calculation" into mainJerome Jiang
2022-04-14Fix int overflow in intermediate calculationJerome Jiang
This is not a complete fix to webm:1751. Bug: webm:1751 Change-Id: Ieed6c823744f5f0625d529db3746cfe4f549c8c0