summaryrefslogtreecommitdiff
path: root/vp8/common
AgeCommit message (Collapse)Author
2016-09-22Merge "vp8: remove VP8_SET_DBG* control support"James Zern
2016-09-21Keep vp8 sixtap read within boundsJohann
When filtering it needs 6 pixels: 2 prior to the source, the source, and 3 after the source. When filtering 16 wide, that means 21. To accomplish this the SSE2 reads [-2] to [5], [6] to [13], and [14] to [21], a total of 24 bytes (reading in groups of 8 is easy) The filter then shifts this last set to the top half of the register and uses 'or' to combine it with the previous set. Valgrind detected an issue reading pixels [19], [20] and [21]: Address 0x7f581c2 is 434 bytes inside a block of size 441 alloc'd Note: we only need pixels [16], [17], and [18] as context for [15]. To fix this, it now reads 8 bytes starting at [11], which re-loads [11] through [13], but stops at [18] and does not over-read any values. This is shifted by 5 and 'or'd with xmm1. Although the lower bits are not cleared, they overlap directly with [11] through [13], so 'or' produces the correct results. Change-Id: I0c89c03afa660fc9b0108ac055d7bd403e493320
2016-09-20vp8: remove VP8_SET_DBG* control supportJames Zern
the --enable-postproc-visualizer configure option remains as a no-op as do the control names and values for compatibility + remove the corresponding debug flags from vpxdec: --pp-* Change-Id: I4a001cd9962b59560d7d6bda6272d4ff32b8d37c
2016-09-20Merge changes from topic 'Wshorten'James Zern
* changes: vp8: convert some uses of unsigned long to size_t vp8/encoder: quiet some -Wshorten-64-to-32 warnings
2016-09-20Merge "Enable ssse3 bilinear tests"Johann Koenig
2016-09-19vp8: convert some uses of unsigned long to size_tJames Zern
similar to changes that were done in vp9 for encoded frame size reporting. has the side-effect of quieting a -Wshorten-64-to-32 warning. Change-Id: I89f74cb617fc29334ee351dc8dfaa3b8cfd4e5af
2016-09-16Merge changes from topic 'clang-format'James Zern
* changes: apply clang-format .clang-format: update to 3.8.1
2016-09-15Enable ssse3 bilinear testsJohann
The code only has issues when xoffset == 0 and yoffset == 0 which represents a simple copy. Presumably this case does not need to be handled because the issue has existed since 2010. BUG=webm:1287 Change-Id: Ic47e2653f3b729e99b40e53d8d2d8d1501edaaa9
2016-09-16Merge "Revert "Restore vp8_sixtap_predict4x4_neon""James Zern
2016-09-16Revert "Restore vp8_sixtap_predict4x4_neon"Johann Koenig
This reverts commit d9dce2f48eed1368a44c368fa87a506bd89ffec5. Appears to be failing the SixtapPredict tests in some configurations and possibly test vectors as well. Change-Id: Ica6aa83ebac47d0a76e451846e7da67b1c17a7d7
2016-09-16Merge "Restore vp8_bilinear_predict4x4_neon"Johann Koenig
2016-09-15Restore vp8_bilinear_predict4x4_neonJohann
This function was removed when clang started introducing alignment hints which caused the 32 bit vld1_lane_u32/vst1_lane_u32 to fail: https://llvm.org/bugs/show_bug.cgi?id=24421 The load has been rendered safe with an implementation ~indiscernible performance-wise that uses _u8 and over-reads just a touch. It is still ~5x faster than C in the unaligned case and doing both filters. BUG=webm:892 BUG=webm:1273 Change-Id: Icf7167189391b46202f47233bb585c24c42bcc36
2016-09-16Merge "Restore vp8_sixtap_predict4x4_neon"Johann Koenig
2016-09-16vp8 postproc: expand CONFIG_POSTPROC guardJohann
postproc.c is overloaded and used for both postproc and internal stats. If only --enable-internal-stats is specified there are issues with non-existent struct members and unused functions. Change-Id: I82367f1ffce659c3918c9f964dbce94a716fbb89
2016-09-15apply clang-formatclang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
2016-09-15Restore vp8_sixtap_predict4x4_neonJohann
This function was removed when clang started introducing alignment hints which caused the 32 bit vld1_lane_u32/vst1_lane_u32 to fail: https://llvm.org/bugs/show_bug.cgi?id=24421 The load has been rendered safe with an implementation ~indiscernible performance-wise that uses _u8 and over-reads just a touch. The store, when unaligned, has a version that is ~25% slower but safe when xoffset = 0 (second pass filter only). When the first pass filter (or both) are in play, the new version is almost identical in speed. Worst case performance (both filters, unaligned stores) is roughly 3-4x faster than C. BUG=webm:817 BUG=webm:1273 Change-Id: I1e490e94453e0872151fe0dafb05557463f6247d
2016-09-09cosmetics,vp8: join some lines, fix table formatJames Zern
Change-Id: Idcf3b68f0e59bd74c9d332bbd4a7c1484ddb691a
2016-09-01get_cpu_count: quiet -Wshorten-64-to-32 warningsJames Zern
sysconf returns a long; cast (unsigned) dwNumberOfProcessors to int for good measure Change-Id: I1f181d7bd9a060c0898db41f66a5065394afdc4e
2016-08-31Remove CONFIG_DEBUG guards from assert()Johann
When 'NDEBUG' is set, assert() generates no code. Change-Id: Icf61cfc1a8f6e5f0770b3626d8c73ae968df1108
2016-08-10Align thread entry point stackAleksey Vasenev
_beginthreadex does not align the stack on 16-byte boundary as expected by gcc. On x86 targets, the force_align_arg_pointer attribute may be applied to individual function definitions, generating an alternate prologue and epilogue that realigns the run-time stack if necessary. This supports mixing legacy codes that run with a 4-byte aligned stack with modern codes that keep a 16-byte stack for SSE compatibility. https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html Change-Id: Ie4e4ab32948c238fa87054d5664189972ca6708e Signed-off-by: Aleksey Vasenev <margtu-fivt@ya.ru>
2016-08-04Remove armv6 targetJohann
Change-Id: I1fa81cc9cabf362a185fc3a53f1e58de533a41e5
2016-08-03Pad 'Left' when building under ASanJohann
The neon intrinsics are not able to load just the 4 values that are used. In vpx_dsp/arm/intrapred_neon.c:dc_4x4 it loads 8 values for both the 'above' and 'left' computations, but only uses the sum of the first 4 values. BUG=webm:1268 Change-Id: I937113d7e3a21e25bebde3593de0446bf6b0115a
2016-07-23vp8/postproc.c: disable clang-format for RGB_TO_YUVclang-format
Change-Id: Id2a936301ec1e3d5648b4f8adbf4e6625002589d
2016-07-22vp8/postproc: fix implicit float conversionJames Zern
float->int as reported by -Wfloat-conversion Change-Id: I0089e8847b218c47526bcfbb0fffd9aad7c5adb3
2016-07-21Add back header in threading.hYunqing Wang
Added back the header needed in threading.h Change-Id: I2ce66ad4fe58004997623f6c3f3b8dd11640aa98
2016-07-21Revert "Amend and improve VP8 multithreading implementation"Yunqing Wang
Reverted the patch because of possible performance issue. Change-Id: I49944f827ccd38ed194c9f8d9cb9036fa9bf79e1
2016-07-19vp8: remove extra semicolonsJames Zern
Change-Id: I84e1a293ee033865f82c244e8aaaadfb2fb27e63
2016-07-19vp8: apply clang-tidy google-readability-braces-around-statementsclang-tidy
applied against an x86_64 configure clang-tidy-3.7.1 \ -checks='-*,google-readability-braces-around-statements' \ -header-filter='.*' -fix + clang-format afterward Change-Id: I6694edeaee89b58b8b3082187e6756561136b459
2016-07-18prepend ++ instead of post in for loops.Jim Bankoski
Applied the following regex : search for: (for.*\(.*;.*;) ([a-zA-Z_]*)\+\+\) replace with: \1 ++\2) This misses some for loops: ie : for (mb_col = 0; mb_col < oci->mb_cols; mb_col++, mi++) Change-Id: Icf5f6fb93cced0992e0bb71d2241780f7fb1f0a8
2016-07-15vp8: apply clang-formatclang-format
Change-Id: I7605b6678014a5426ceb45c27b54885e0c4e06ed
2016-07-15addnoise : clear out static size for generated noiseJim Bankoski
Change-Id: I5d4343f2da9cd4b01dd37be7a048d159fec109d1
2016-07-15postproc : fix function parameters for noise functions.Jim Bankoski
Change-Id: I582b6307f28bfc987dcf8910379a52c6f679173c
2016-07-13postproc: noise style fixes.Jim Bankoski
Change-Id: Ifdcb36b8e77b65faeeb10644256e175acb32275d
2016-07-13postproc - move filling of noise buffer to vpx_dsp.Jim Bankoski
Change-Id: I63ba35dc0ae9286c9812367a531e01d79a4c1635
2016-07-12deblock filter : moved from vp8 code branchJim Bankoski
The deblocking filters used in vp8 have been moved to vpx_dsp for use by both vp8 and vp9. Change-Id: I5209d76edafc894b550f751fc76d3aa6799b392d
2016-07-01vp8/common/reconintra4x4.c: add missing includeJames Zern
quiets -Wmissing-prototypes warning BUG=b/29584271 Change-Id: I806e3475ebee579dce0073dd1784a7c2899e7de0
2016-06-27*.asm: normalize label formatJames Zern
add a trailing ':', though it's optional with the tools we support, it's more common to use it to mark a label. this also quiets the orphan-labels warning with nasm/yasm. BUG=b/29583530 Change-Id: I46e95255e12026dd542d9838e2dd3fbddf7b56e2
2016-06-23vp8 machine setup: mark unused variableJohann
When building without multithreading and for a non-arm, non-x86 system, ctx is unused. Cleans up -Wextra warning: unused parameter ‘ctx’ [-Werror=unused-parameter] Change-Id: Ifddff89d2ebd45f7d71e3d415a8f2415dd818957
2016-06-16vp8: correct function return typesJohann
left_above_mv and above_block_mv return as_int as_int is defined as uint32_t in vp8/common/mv.h Cleans up -Wextra warnings: signed and unsigned type in conditional expression this_mv->as_int = col ? d[-1].bmi.mv.as_int : left_block_mv(mic, i); ^ this_mv->as_int = row ? d[-4].bmi.mv.as_int : above_block_mv(mic, i, mis); ^ left_mv.as_int = col ? d[-1].bmi.mv.as_int : ^ Change-Id: Ia043764e4ce93d2152d2269b1c7b28b5d5f814cf
2016-05-22vpx: Add OS/2-specific threading codesKO Myung-Hun
With correction of a type of a thread function for new threading codes. Change-Id: Ic6dc9f530698800d1cfe2da327848e8f8b62e31f
2016-05-06Remove sixtap/bilinear 4x4 neon implementationsJohann
These implementations rely on casting the pointers to load the data. Clang implemented optimizations which automatically add alignment hints to such loads. The 4x4 filters do not guarantee the necessary alignment so the resulting assembly is broken. https://llvm.org/bugs/show_bug.cgi?id=24421 BUG=webm:817 BUG=webm:892 Change-Id: I608885299f1f86ff83653b65e0e40d0ae87fb3fe
2016-05-02Move vpx_add_plane from codec to vpx_dsp and dedup.Jim Bankoski
Change-Id: I12218d8331c0558c0587a66321e3ca46da7e5cc7
2016-02-05vp8: fix build with mingw+pthreadsJames Zern
Change-Id: Icc34a00759c95b7b8ac356cdcc4adae848b61431
2016-01-26vp8: mark intra_prediction_down_copy inlineJames Zern
avoids -Wunused-function warnings when INLINE is set Change-Id: I44d91eaa7efba7bc2427501fb9f63a93f32aaa7f
2016-01-26Fix a clang/win build errorYunqing Wang
Made the definition of THREAD_FUNCTION consistent. Change-Id: I1ac099484e201e359298ed16de0b81ec781075ce
2016-01-20Remove duplicate definitionsYaowu Xu
This fixes the build errors with msvc. Change-Id: Ie2716e4c15a1bacfb00a8d41ec3283d718af88fc
2016-01-08Amend and improve VP8 multithreading implementationYunqing Wang
There are flaws in current implementation of VP8 multithreading encoder and decoder as reported in the following issue: https://code.google.com/p/chromium/issues/detail?id=158922 Although the data race warnings are harmless, and wouldn't cause real problems while encoding and decoding videos, it is better to fix the warnings so that VP8 code could pass the TSan test. To synchronize the thread-shared data access and maintain the speed (i.e. decoding speed), use multiple mutexes based on mb_rows to reduce the number of synchronizations needed, make the reads and writes of the shared data protected, and reduce the number of mb_col writes by nsync times. The decoder speed tests showed < 3% speed loss while using 2 ~ 4 threads. Change-Id: Ie296defffcd86a693188b668270d811964227882
2015-12-03vp8: fix loop filter level clampingJames Zern
the loop filter level is transmitted as 6-bits + sign so needs to be clamped in the delta + absolute case. BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224363 Change-Id: Icbdca4fdbf043466429bd5c9d59dbe913bf153bc
2015-10-16vp10: add extended-intra prediction edges experiment.Ronald S. Bultje
This experiment allows using full above/right edges for all transform sizes whenever available (for d45/d63), and adds bottom/left edges for d207. See issue 1043. Change-Id: I5cf7f345e783e8539bb6b6d2c9972fb1d6d0a78b
2015-10-01vp8: align left pixel array by 16 bytes.Ronald S. Bultje
The x86 simd expects this. Identical alignment can be found in vp9 and vp10 also. Fixes crashes on 32bit x86 systems. Change-Id: I229c88d8f696acbef5337c8fa9503528df4e1c40