summaryrefslogtreecommitdiff
path: root/vp8
AgeCommit message (Collapse)Author
2018-04-09vpx_image: remove unused image formatsJames Zern
libvpx only emits: VPX_IMG_FMT_{I420,I422,I440,I444,I42016,I42216,I44016,I44416} and additionally supports YV12 as input. interleaved yuv, rgb and alpha formats are unused. Change-Id: Ie2ab1099e950c6e696f475d46882f5c47a174042
2018-03-22Fix implicit-fallthrough warningsLinfeng Zhang
Compiler -- gcc (Debian 7.3.0-5) 7.3.0 Change-Id: Ied91c7ef3d25c3ef44a1f667656176e2709b4f44
2018-03-20vp9-svc: Improve frame dropper for spatial layers.Marco Paniconi
SVC frame dropper: modify the logic to allow for individual spatial layers to drop. This removes the constraint that all upper spatial layers must drop when a given spatial layer drops. Add a flag to the pkt to indicate whether a spatial layer is encoded or dropped. This is needed for applications that enable this feature (frame dropping for SVC). For a current spatial layer, if its previous spatial layer is dropped, then disable certain features for that layer: inter-layer prediction, base_mv, partition_reuse, copy partition. Also add the constraint to never drop a spatial layer if its base layer is a key frame. Updates to sample encoder (vp9_spatial_svc_encoder) and the SVC datarate unittests to properly handle frame dropping. Bump up ABI version. Change-Id: I7d14ccf67b8d014a7abfce5ba3989fc623e94067
2018-03-17VP8: Fix out of range index for mvcost.Jerome Jiang
Clamp index between 0 and MVvals. Bit exact for speed -8, -6 and -4 on RTC set. BUG=b/72510002 Change-Id: I61bdb02a0924e157b3c1980f74fbbfe5ce51bc44
2018-03-15vp9-svc: Frame dropper for SVC.Marco Paniconi
If a given spatial layer decides to drop, due to the buffer/overshoot conditions for that layer, then drop that current spatial layer and all spatial layers above. In the current implementation the svc frame counter (and hence the pattern for the non-flexible SVC case) are updated on frame drops. Also add last spatial layer encoded to the pkt. This is useful for RTC applications that enable frame dropping for SVC. Update to the SVC datarate tests: enabled frame dropper on all SVC datarate tests, and made a fix to properly set the temporal_layer_id, which works now even on frame drops. Change-Id: If828c193f3cb6b1839803fd52fe9fbbda5b5a039
2018-03-14vp8 rdopt.c: zero rd.[rate_uv|distortion_uv]Johann
These values are not consistently set before calling update_best_mode. In vp9_rdopt.c they are individual values instead of a struct and are zero'd at declaration. Clears a static analysis warning: warning: The right operand of '-' is a garbage value RDCOST(x->rdmult, x->rddiv, (rd->rate2 - rd->rate_uv - other_cost), warning: The right operand of '-' is a garbage value (rd->distortion2 - rd->distortion_uv)); Change-Id: I19895d062e7c0ac67937126ebc5dcb0afd3a2931
2018-03-14vp8 mfqe: zero map[]Johann
The loop appears to set map[i] with the intention of running the 'j' loop up to that point. However, without zero'ing map[] first the behavior is unpredictable. Fixes a static analysis warning: warning: Branch condition evaluates to a garbage value for (j = 0; j < 4 && map[j]; ++j) { Change-Id: Ifa39353d8aa5cc47b467a7d3d8cdd3b5319fd997
2018-03-12vp8 temporal_filter: ignore return valueJohann
Clears up static clang analysis warning regarding a dead store. Change-Id: I6a90e6fd5f2775d933c46c7553811635bd2def21
2018-03-04move vp8 encodeopt to block_error_sse2Johann
The file contains sse2 implementations related to various block error functions. Update the .mk file to include it only when sse2 is requested. BUG=webm:1500 Change-Id: I67b766faed425fd7a96db8541b13c69670b65fec
2018-02-20remove deprecated 'register' keywordJohann
Will be removed in C++17: http://en.cppreference.com/w/cpp/language/storage_duration Change-Id: Iadce5e2b974c707799fa939f3ff1c420fb79a871
2018-02-02Merge "Fix issue for 0 target bitrate in multi-res build."Jerome Jiang
2018-02-01Fix issue for 0 target bitrate in multi-res build.Jerome Jiang
For encoding with --enable-multi-res-encoding, with 1 layer, when the target bitrate is set 0, under these conditions null pointer will be de-referenced. Fix is to check cpi->oxcf.mr_total_resolutions > 1. Also added NULL pointer check. This issue causes crash for asan build in chromium clusterfuzz. BUG=805863 Change-Id: I9cd25af631395bc9fede3a12fb68af4021eb15f8
2018-01-30vp8 bool: verify buffer sizeJohann
In the process of fixing a ubsan warning: commit 738b829b8cdf079a5fa48c74a28a177c9567d212 Fix incorrect size reading the inferred check of start < end was removed. This causes fuzzed files to get a little further and segfault in vp8dx_start_decode. Change-Id: I316e23058753ba42dbcc46d27eb575f51c8a9e9a
2018-01-26Fix incorrect size readingJohann
Cherry pick from vp9: commit 85770264ac891505730dcd5092d1993a62c74060 Guard against incorrect size values moving *data past data_end. Check read length against the difference of the buffers. Change-Id: I5e8679ddd447c4d73deb80be5ec94841a92c5fcd
2018-01-24Merge "Fix frame sizes in pkt to support spatial layers."Jerome Jiang
2018-01-23vp8: [loongson] fix bug of type conflict.Shiyou Yin
In commit 577d4fa79, int8_t was used to replace char. This will result in a compilation error, for int8_t was typedefined to signed char, but not char. Change-Id: I5c9837e01b0b58688a7741f5c9a99a76ca887e4a
2018-01-22Fix frame sizes in pkt to support spatial layers.Jerome Jiang
Add test for svc frame sizes in pkt. BUG=webm:1485 Change-Id: I983dc229e526d72d22360d7f3016d8358d6beae7
2018-01-22Merge changes from topic "clang-format"Johann Koenig
* changes: clang-format v5.0.0 vp9/ remove spurious comments clang-format v5.0.0 vp8/ clang-format v5.0.0 vpx_dsp/ clang-format v5.0.0 mem_ops.h clang-format v5.0.0 vpx_util/vpx_atomic.h clang-format v5.0.0 y4minput.c clang-format v5.0.0 vpxenc.c clang-format v5.0.0 examples/ clang-format v5.0.0 test/
2018-01-18remove spurious commentsJohann
These don't appear to make any sense given their context. The commit log also does not reveal anything. Discovered due to spurious clang-format indenting: https://bugs.llvm.org/show_bug.cgi?id=35930 Change-Id: I732a66056ba4c05e3e132a2f236fe10f7a282900
2018-01-18clang-format v5.0.0 vp8/Johann
Allow*OnASingleLine appears to no longer apply to typedef structs. Adjust closing parenthesis/opening brace on functions. Remove trailing commas to keep multiple elements on one line. Change-Id: I6e535a8ddb15c9b3de8216ce8ddb2a18241af46c
2018-01-18vp8: Fix to multi-res-encoder for skipping streams.Marco
For the vp8 simulcast/multi-res-encoder: Add flags to keep track of the disabling/skipping of streams for the multi-res-encoder. And if the lower spatial stream is skipped for a given stream, disable the motion vector reuse for that stream. Also remove the condition of forcing same frame type across all streams. This fix allows for the skipping/disabling of the base or middle layer streams. Change-Id: Idfa94b32b6d2256932f6602cde19579b8e50a8bd
2018-01-11adopt some clang 5.0.0 formattingJohann
At least the changes that don't conflict with 4.0.1 Change-Id: I9b6a7c14dadc0738cd0f628a10ece90fc7ee89fd
2017-12-15vp8: [loongson] optimize loopfilter v2.Shiyou Yin
Optimize function vp8_mbloop_filter_vertical_edge_mmi and function vp8_mbloop_filter_horizontal_edge_mmi. Make full use of memory loading delay slot and reduce unnecessary instructions. Change-Id: I61da2c3a44c06044225461f46bf487d83cba6c16
2017-12-15Merge "vp8: [loongson] optimize sixtab predict v2."Shiyou Yin
2017-12-14add copyright to rtcd filesJohann
Allows them to pass the license check in chromium. BUG=chromium:98319 Change-Id: Iefc1706152a549d8c4ae774c917596bf1c9492d8
2017-12-14vp8: [loongson] optimize sixtab predict v2.Shiyou Yin
1. Delete unnecessary zero setting process. 2. Optimize the method of calculating SSE in vpx_varianceWxH. Change-Id: I8bab801416e7f4958c28c6d080e3cf785a50f82b
2017-12-11Merge "Fix build warnings for gcc 6.3"Jerome Jiang
2017-12-07Fix build warnings for gcc 6.3Jerome Jiang
Clean up some alias. BUG=webm:1465 Change-Id: I99e186162db9f9e15375fef01564692434eda619
2017-12-06Merge "Add frame width & height to frame pkt. Add test."Jerome Jiang
2017-12-06Add frame width & height to frame pkt. Add test.Jerome Jiang
Used to return correct frame width and height when dynamic resizing happens. BUG=webm:1474 Change-Id: Ia2043f7e1635b3821848a67b9b134f47f14b0f3a
2017-12-01explicitly label .text sectionsJohann
nasm should infer .text but does not for windows: https://bugzilla.nasm.us/show_bug.cgi?id=3392451 Change-Id: Ib195465e5f33405f5ff61c4cf88aa2a72640cacb
2017-11-29vp8: [loongson] optimize regular quantize v2.Shiyou Yin
1. Optimize the memset with mmi. 2. Optimize macro REGULAR_SELECT_EOB. Change-Id: Icd9c866b0e6aef08874b2f123e9b0e09919445ff
2017-11-29vp8: [loongson] optimize vp8_short_fdct4x4_mmi v2.Shiyou Yin
Optimize the calculate process of a,b,c,d. Change-Id: I81717e47bc988ace1412d478513e7dd3cb6b0cc9
2017-11-08CVBR command line option.paulwilkins
Added command line control of Corpus VBR. The new corpus vbr mode is a variant of standard VBR (end-usage=0) where the complexity distribution mid point is passed in rather than calculated for a specific clip or chunk. The new variant is enabled by setting a new command line parameter --corpus-complexity to a zero value. Omitting this parameter or setting it to 0 will cause the codec to use standard vbr mode. The correct value for a given corpus needs to be derived experimentally using a training set such that the average rate for the corpus is close to the target value. For example our using our low res test set with upper and lower vbr limits of 50%-150% and a corpus complexity value of 650 gives a similar average data rate across the set to using standard vbr. However, with the corpus mode easier clips will be allocated fewer bits and harder clips more bits rather than having the same rate target for all. Change-Id: I03f0fc8c6fb0ee32dc03720fea6a3f1949118589
2017-10-27vp8: correct if/else '{' placementJames Zern
swap '{' and c-style comments removing a few redundant ones along the way; covers most leftovers from the clang-tidy run against an x86_64-linux config. Change-Id: I67a45596f80a12389faca49c5be440875092a7df
2017-10-18Merge "vp8: Enable use of ROI map."Jerome Jiang
2017-10-17vp8: Enable use of ROI map.Jerome Jiang
Disable cyclic refresh if ROI is used and add flag to properly handle the static_thresh deltas. Remove the ROI test for cyclic refresh (it's allowed but disabled if ROI is used). Add an example in vpx_temporal_svc_encoder.c. Turned off by default. BUG=webm:1470 Change-Id: Ief9ba1d7f967bc00511b412b491c3f70943bfbda
2017-10-17vp8: [loongson] optimize idct with mmiShiyou Yin
1. vp8_dequant_idct_add_y_block_mmi 2. vp8_dequant_idct_add_uv_block_mmi Change-Id: I9987147be2685ac79d4b045d1d56f6709ee1223c
2017-10-12vp8: [loongson] optimize dct with mmiShiyou Yin
1. vp8_short_fdct4x4_mmi 2. vp8_short_fdct8x4_mmi 3. vp8_short_walsh4x4_mmi Change-Id: I89a7df25cfd09fae309fac257ad8b6a3dc1c8acb
2017-10-11vp8: [loongson] optimize quantize with mmiShiyou Yin
1. vp8_fast_quantize_b_mmi 2. vp8_regular_quantize_b_mmi Change-Id: Ic6e21593075f92c1004acd67184602d2aa5d5646
2017-09-26vp8: [loongson] optimize copymen with mmiShiyou Yin
1. vp8_copy_mem16x16_mmi 2. vp8_copy_mem8x8_mmi 3. vp8_copy_mem8x4_mmi Change-Id: I3de29a11fa7402df0e48bbb944440b1e66498a65
2017-09-19temporal_filter_apply_sse2.asm: add ':' to labelJames Zern
quiets nasm warning: label alone on a line without a colon might be in error BUG=webm:1462 Change-Id: I660407ca60e8c9a810dba9d76afb65852029a29c
2017-09-14vp8: [loongson] optimize dequantize with mmiShiyou Yin
1. vp8_dequantize_b_mmi 2. vp8_dequant_idct_add_mmi Change-Id: I505f8afb7a444173392b325906e6a4f420f00709
2017-09-14vp8: [loongson] optimize idctllm with mmiShiyou Yin
1. vp8_short_idct4x4llm_mmi 2. vp8_short_inv_walsh4x4_mmi 3. vp8_dc_only_idct_add_mmi Change-Id: I616923681e79d78607a4988608fc39df77b093f4
2017-09-11vp8: [loongson] optimize loopfilter with mmiShiyou Yin
1. vp8_loop_filter_horizontal_edge_mmi 2. vp8_loop_filter_vertical_edge_mmi 3. vp8_mbloop_filter_horizontal_edge_mmi 4. vp8_mbloop_filter_vertical_edge_mmi 5. vp8_loop_filter_simple_horizontal_edge_mmi 6. vp8_loop_filter_simple_vertical_edge_mmi Change-Id: Ie34bbff3a16cff64e39a50798afd2b7dac9bcdc3
2017-09-02vp8: [loongson] optimize sixtap predict with mmiShiyou Yin
1. vp8_sixtap_predict16x16_mmi 2. vp8_sixtap_predict8x8_mmi 3. vp8_sixtap_predict8x4_mmi 4. vp8_sixtap_predict4x4_mmi Change-Id: I186669d1a1d998a0f3ba3a548e25eee8b52c251b
2017-09-01apply clang-formatclang-format
Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c
2017-08-31Prevent data race from low-pass filter.Peter Boström
Makes main thread wait for the filter level to be picked to avoid a race between the LPF thread and update_reference_frames(). This also re-enables the failing tests under thread_sanitizer where this data race was detected. BUG=webm:1460 Change-Id: I7f5797142ea0200394309842ce3e91a480be4fbc
2017-08-31Add atomics to vp8 synchronization primitives.Peter Boström
Fixes issue on iPad Pro 10.5 (and probably other places) where threads are not properly synchronized. On x86 this data race was benign as load and store instructions are atomic, they were being atomic in practice as the program hasn't been observed to be miscompiled. Such guarantees are not made outside x86, and real problems manifested where libvpx reliably reproduced a broken bitstream for even just the initial keyframe. This was detected in WebRTC where this device started using multithreading (as its CPU count is higher than earlier devices, where the problem did not manifest as single-threading was used in practice). This issue was not detected under thread-sanitizer bots as mutexes were conditionally used under this platform to simulate the protected read and write semantics that were in practice provided on x86 platforms. This change also removes several mutexes, so encoder/decoder state is lighter-weight after this change and we do not need to initialize so many mutexes (this was done even on non-thread-sanitizer platforms where they were unused). Change-Id: If41fcb0d99944f7bbc8ec40877cdc34d672ae72a
2017-08-15Clean up writing YUV files for debug purpose.Jerome Jiang
Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files. Delete some flags that can be enabled during build. To enable writing denoised YUV, use the following command line: CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure --enable-vp9-temporal-denoising For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP' Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528