summaryrefslogtreecommitdiff
path: root/vp8
AgeCommit message (Collapse)Author
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
2022-04-13vp8,define_gf_group: remove unused variableJames Zern
this clears a warning under clang-13: vp8/encoder/firstpass.c:1634:10: warning: variable 'mod_err_per_mb_accumulator' set but not used [-Wunused-but-set-variable] Change-Id: I694a99d56724be89090e01c45559237c0fda147a
2022-04-05Merge changes I0b6520be,I1f006daa,I7ee8e367 into mainJames Zern
* changes: vp9[loongarch]: Optimize vpx_convolve8_avg_horiz_c vp8[loongarch]: Optimize dequant_idct_add_y/uv_block loongarch: Fix bugs
2022-03-31vp8[loongarch]: Optimize dequant_idct_add_y/uv_blockyuanhecai
1. vp8_dequant_idct_add_uv_block_lsx 2. vp8_dequant_idct_add_y_block_lsx Bug: webm:1755 Change-Id: I1f006daaefb2075b422bc72a3f69c5abee776e2e
2022-03-31loongarch: Fix bugsyuanhecai
Fix bugs from loopfilter_filters_lsx.c, vpx_convolve8_avg_lsx.c Bug: webm:1755 Change-Id: I7ee8e367d66a49f3be10d7e417837d3b6ef50bdb
2022-03-31remove unused vp8_encode_intra parameterJohann
Follow it up and also remove it from other functions. BUG=webm:1612 Change-Id: I9d3cb785ab0d68c6fcae185043c896d8a135e284
2022-03-29remove sad x3,x8 specializationsJohann
These would compute the sum of absolute differences (sad) for a group of 3 or 8 references. This was used as part of an exhaustive search. vp8 only uses these functions in speed 0 and best quality. For vp9 this is only used with the --enable-non-greedy-mv experiment. This removes the 3- and 8-at-a-time optimized functions and uses the fall back code which will process 1 or 4 (vpx_sadMxNx4d) at a time. For configure --target=x86_64-linux-gcc --enable-realtime-only: libvpx.a before: 3002424 after: 2937622 delta: 64802 after 'strip libvpx.a' before: 2116998 after: 2073090 delta: 43908 Change-Id: I566d06e027c327b3bede68649dd551bba81a848e
2022-03-17vp8[loongarch]: Optimize idct_add, filter_bv/bhyuanhecai
1. vp8_dc_only_idct_add_lsx 2. vp8_loop_filter_bh_lsx 3. vp8_loop_filter_bv_lsx Bug: webm:1755 Change-Id: I9b629767e2a4e9db8cbb3ee2369186502dc6eb00
2022-02-08vp8[loongarch]: Optimize vp8_loop/sixtap, vpx_dc with LSX.Lu Wang
1. vp8_loop_filter_mbh, vp8_loop_filter_mbv 2. vp8_sixtap_predict16x16, vp8_sixtap_predict8x8 3. vpx_dc_predictor_16x16, vpx_dc_predictor_8x8 ./vpxdec --progress -o YUV_1920X1080.yuv original_1200f/VP8_1920X1080.webm before: 37.77fps after : 220.90fps Bug: webm:1755 Change-Id: I1a3ce16f0c872261d813b6531cfdf25bd59bb774
2022-01-28libvpx[loongarch]: Add loongarch support.Jin Bo
LSX and LASX are enabled by default if compiler supports them. Bug: webm:1754 Change-Id: Ic36b113bc4313c50e9d2bbab91199b3aa46d00dc
2021-12-09vp[89]_initalize_enc(): protect against multiple invocationsJames Zern
this removes the burden from callers; the rtcd functions are left with a mostly redundant (outside of tests) once() as top-level functions should ensure their constraints are met Change-Id: I5bdbcfa4671c6a1492cfe9c7d886c361c26caaa9
2021-12-02clear -Wextra-semi/-Wextra-semi-stmt warningsJames Zern
Bug: chromium:1257449 Change-Id: Ia9aafccc09b611521d4a7aedfe3723393a840c62
2021-11-18Merge "replaced bsr() with get_msb() from bitops.h" into mainJohann Koenig
2021-11-18replaced bsr() with get_msb() from bitops.hIlya Kurdyukov
The modified line should now compile into two instructions instead of four. Change-Id: Ie2eb6b13ff1e29b3107cb9e76f37ff9065504316
2021-11-17faster vp8_regular_quantize_b_sse4_1Ilya Kurdyukov
Gives 10% faster VP8 encoding in simple tests. This patch requires testing on wider datasets and encoder settings to see if this speedup is achieved on most data. Change-Id: If8e04819623e78fff126c413db66c964c0b4c11a