summaryrefslogtreecommitdiff
path: root/vpx_ports
AgeCommit message (Collapse)Author
2018-09-15cosmetics: normalize include guardsJames Zern
use the recommended format [1] of: <PROJECT>_<PATH>_<FILE>_H_ [1] https://google.github.io/styleguide/cppguide.html#The__define_Guard "All header files should have #define guards to prevent multiple inclusion. The format of the symbol name should be <PROJECT>_<PATH>_<FILE>_H_." Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037
2018-05-21remove unused vpx_ports/config.hJames Zern
references were earlier removed in: 1a7d25a48 Replace vpx_ports/config.h with vpx_config.h Change-Id: I1824cd71e970f5c7550c3978e0c63ce36a9644e4
2018-03-23Restore emms usage on x86_64 after 726b021a12c1bMartin Storsjo
Even on x86_64, emms has to be called if the x87 state has been clobbered - the calling code (either within libvpx or in a caller outside of libvpx) may be using the x87 instructions, even though use of them isn't all that common on x86_64. This fixes builds with clang for mingw/x86_64. Change-Id: I1f6072835590b862bad156f17331ba65c813ddd9
2018-03-23Revert "remove fldcw/fstcw from Win64 builds"Johann Koenig
This reverts commit 60a3cb9ad840377d46286bfd703c30a4a4ee56e2. Reason for revert: x87 instruction usage might not be as clear cut as I would like. At the very least, llvm mingw builds appear to having issues with emms. Original change's description: > remove fldcw/fstcw from Win64 builds > > _MCW_PC (Precision control) is not supported on x64: > https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/control87-controlfp-control87-2 > > The x87 FPU is not used on Win64 or ARM so setting the x87 control word > is not necessary. The SSE/SSE2 and ARM FPUs don't have a precision > control - the precision is embedded in each instruction - so the need to > set the control word is also gone. BUG=webm:1500 Change-Id: I25bcfa96bc9c860f6c7e03315d75fa6fd1d88ec5
2018-03-23remove fldcw/fstcw from Win64 buildsJohann
_MCW_PC (Precision control) is not supported on x64: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/control87-controlfp-control87-2 The x87 FPU is not used on Win64 or ARM so setting the x87 control word is not necessary. The SSE/SSE2 and ARM FPUs don't have a precision control - the precision is embedded in each instruction - so the need to set the control word is also gone. BUG=webm:1500 Change-Id: I014513282a7dc320d1cdeaec48249d98a66bf09f
2018-03-19reland "use intrinsics for 'emms'"Johann
Only target 32bit builds. Visual Studio does not define _mm_empty for 64bit configurations. Rename emms.asm and remove from 32 bit builds to avoid empty file warnings. Don't check register state on 64bit builds. BUG=webm:1500 This reverts commit 60beb781c140b61c1957abd2a6717d2e9a831933. Change-Id: I5ac4cf6c67249ff24f7da19792144de20527bfce
2018-03-14Revert "use intrinsics for 'emms'"Johann Koenig
This reverts commit 118a57045bf5b49ab7c2f7f930543b9217fd422e. Reason for revert: Fails on Visual Studio builds: vpxmdd.lib(vpx_ports_emms_mmx.obj) : error LNK2019: unresolved external symbol _m_empty referenced in function vpx_clear_system_state Original change's description: > use intrinsics for 'emms' > > BUG=webm:1500 > > Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2 Change-Id: Ia9c40bc103c57cced83353249c55218eaf2f0b0c
2018-03-13use intrinsics for 'emms'Johann
BUG=webm:1500 Change-Id: I3235d8c2abc01dd3a35e14c5cbcfe20283ff8fb2
2018-01-12clang-format v5.0.0 mem_ops.hJohann
Remove trailing empty line to keep the comment from being indented. https://bugs.llvm.org/show_bug.cgi?id=35930 Change-Id: I6c51f7afb4cc47f03a190b4c90e29e4ff1e0c689
2017-11-03Support building AVX-512 and implement sadx4 for AVX-512Kyle Siefring
The added AVX-512 support requires the subset of AVX-512 added in Skylake-X. Change-Id: I39666b00d10bf96d06c709823663eb09b89265b7
2017-08-25vpx_dsp:loongson optimize vpx_varianceWxH_c,vpx_sub_pixel_varianceWxH_c and ↵Shiyou Yin
vpx_sub_pixel_avg_varianceWxH_c with mmi. Change-Id: Ia576a721df6312329b599c31cfe1fb1267a9f174
2017-08-18vpx_dsp:loongson optimize vpx_subtract_block_c (case 4x4,8x8,16x16) with mmi.Shiyou Yin
Change-Id: Ia120ad1064d0b6106d9685cf075bdab373eef19e
2017-05-16Revert "Add visibility="protected" attribute for global variables referenced ↵Johann Koenig
in asm files." This reverts commit 0d88e15454b632d92404dd6a7181c58d9985e2a2. Reason for revert: chromium builds are failing to locate vpx_rv during dlopen() dlopen failed: cannot locate symbol "vpx_rv" referenced by "libstandalonelibwebviewchromium.so" Original change's description: > Add visibility="protected" attribute for global variables referenced in asm files. > > During aosp builds with binutils-2.27, we're seeing linker error > messages of this form: > libvpx.a(subpixel_mmx.o): relocation R_386_GOTOFF against preemptible > symbol vp8_bilinear_filters_x86_8 cannot be used when making a shared > object > > subpixel_mmx.o is assembled from "vp8/common/x86/subpixel_mmx.asm". > Other messages refer to symbol references from deblock_sse2.o and > subpixel_sse2.o, also assembled from asm files. > > This change marks such symbols as having "protected" visibility. This > satisfies the linker as the symbols are not preemptible from outside > the shared library now, which I think is the original intent anyway. > > Change-Id: I2817f7a5f43041533d65ebf41aefd63f8581a452 > TBR=jzern@google.com,johannkoenig@google.com,rahulchaudhry@chromium.org,builds@webmproject.org Change-Id: I0c2ea375aa7ef5fda15b9d9e23e654bb315c941b
2017-05-15'protected' visibility unsupported on machoJohann
Mac builds must not specify 'protected' visibility. Then only support 'default' and 'hidden'. https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/Articles/SymbolVisibility.html Change-Id: I94eccfaa29af0ddcc4a5c1c0e14cf63ef7146462
2017-05-12Add visibility="protected" attribute for global variables referenced in asm ↵Rahul Chaudhry
files. During aosp builds with binutils-2.27, we're seeing linker error messages of this form: libvpx.a(subpixel_mmx.o): relocation R_386_GOTOFF against preemptible symbol vp8_bilinear_filters_x86_8 cannot be used when making a shared object subpixel_mmx.o is assembled from "vp8/common/x86/subpixel_mmx.asm". Other messages refer to symbol references from deblock_sse2.o and subpixel_sse2.o, also assembled from asm files. This change marks such symbols as having "protected" visibility. This satisfies the linker as the symbols are not preemptible from outside the shared library now, which I think is the original intent anyway. Change-Id: I2817f7a5f43041533d65ebf41aefd63f8581a452
2017-04-18Create CAST_TO_BYTEPTR/SHORTPTRLinfeng Zhang
They will replace CONVERT_TO_BYTEPTR/SHORTPTR module by module. BUG=webm:1388 Change-Id: Ie47c8cd4897696481b9cbbf9e2d439dc22dc85ec
2017-03-08Add support for POWER8/VSXRafael de Lucena Valle
Add ppc, ppc64 and ppc64le on all_platforms and ARCH_LIST Add VSX flags and check for -mvsx Define empty setup_rtcd_internal Add Altivec detection based on: http://freevec.org/function/altivec_runtime_detection_linux Detect VSX at runtime when enabled Change-Id: I304f4d8c5fee0ff19b6483cd2e9cc50d6ddec472 Signed-off-by: Rafael de Lucena Valle <rafaeldelucena@gmail.com>
2017-02-14Merge "Remove UNINITIALIZED_IS_SAFE"Johann Koenig
2017-02-14Remove UNINITIALIZED_IS_SAFEJohann
Where clang static analysis or gcc -Wmaybe-uninitialized warns of uninitialized values, assign 0 to ints, MB_MODE_COUNT to MB_PREDICTION_MODE, and B_MODE_COUNT to B_PREDICTION_MODE. Assert that the modes have been changed from the invalid value by the end of the function. Change-Id: Ib11e1ffb08f0a6fe4b6c6729dc93b83b1c4b6350
2017-02-09vpx_usec_timer_elapsed: use 64-bit mathJames Zern
this prevents a rollover when tv_sec is a long: signed integer overflow: 2776 * 1000000 cannot be represented in type 'long' Change-Id: I03dc4476ee122b02e2856dad28358a20cf16a9f8
2016-11-22avoid redefining WIN32_LEAN_AND_MEANJames Zern
fixes redef errors when the macro is supplied elsewhere, e.g., the command line Change-Id: Ic15726817a43e30595d50562ef1f077060c193cf
2016-11-15vpx_timer.h,x86.h: define NOMINMAX for windows.hJames Zern
avoids the definition of min/max macros in headers that may appear in c++ unit tests. the codebase uses VPXMIN/MAX for this purpose in any case Change-Id: I2b679b045d64fb34fd8780f704e3caf10a758d82
2016-09-15apply clang-formatclang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
2016-08-31Fix -Wundef warning for __SANITIZE_ADDRESS__Johann
BUG=webm:1069 Change-Id: Iad8811939a910a8f31cf5788220712a255ddf36a
2016-08-04Remove armv6 targetJohann
Change-Id: I1fa81cc9cabf362a185fc3a53f1e58de533a41e5
2016-08-04Merge "Pad 'Left' when building under ASan"Johann Koenig
2016-08-03Fix msvc compiler warningsYaowu Xu
MSVC 2013 complained about using 32 shift where 64 bit shift should be used. Change-Id: I7a2b165d1a92d3c0a91dd4511b27aba7709b5e55
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-25vpx_ports: apply clang-formatclang-format
Change-Id: Ice343335a40238fd21490bce0ce2972bdcb87055
2016-06-28remove visual studio < 2010 workaroundsJames Zern
BUG=b/29583530 Change-Id: Iafd05637eb65f4da54a9c857e79204a77646858a
2016-06-24Port metric computation changes from nextgenv2Yaowu Xu
Change-Id: I4aceffcdf7af59ffeb51984f0345c3a4c7e76a9f
2016-06-22win: Include <intrin.h> instead of manually declaring intrinsics.Nico Weber
This helps clang-cl. BUG=chromium:592745 Change-Id: I49f9b6928c91b2b43567f4336520ba4f1010d3ad
2016-05-27vpx_ports/mem_ops.h: cast the lhs of bitwise shifts of 24.Tom Finegan
C does not allow for shifting into the sign bit of a signed integer, and the two instances here become signed ints via promotion. Explcitly cast them to unsigned MEM_VALUE_T to avoid the problem. BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=614648 Change-Id: I51165361a8c6cbb5c378cf7e4e0f4b80b3ad9a6e
2016-05-26Convert to unsigned int before left shiftYaowu Xu
This is to fix overflow when 128 is left shifted by 24. Change-Id: Ibb5f6813536d985afa003a9848c0c3dd358955a7
2016-04-27x86.h,x86_simd_caps: add an explicit cast w/strtolJames Zern
+ use strtoul as mask is unsigned quiets a -Wshorten-64-to-32 warning Change-Id: Ia1c24679302100a252da7a45d3bb871f591f1888
2016-04-22Add the 64-bit CPU cycle count utility functionYi Luo
Change-Id: Ie87245bbdf5735bc9729199eeb07899d81dbf267
2016-03-30vpx_ports/mem_ops.h: clear some -Wconversion warningsJames Zern
not strictly necessary, but allows projects using '-Wconversion -Wno-sign-conversion' to reuse these headers. Change-Id: Id1398d726c90173ccba9aea66798fcef6f20fa23
2015-12-10Minor cleanupYunqing Wang
Removed unused GET_GOT_SAVE_ARG. Change-Id: I0ae41c2d0dcd6d7d1c8dda05062fcdb737fd917d
2015-11-13Use Interlocked calls in win32 once() implementation.Ralph Giles
This is simpler than the previous scheme, which tried to allocate the CRITICAL_SECTION struct in a thread-safe manner before it could use it to run the wrapped function in a thread-safe manner. Change-Id: I172e5544e5f16403a3a0e5e2b9104b1292a0d786
2015-09-22Restrict get_msb inputsJohann
Add a warning and assert that inputs for get_msb must not be zero. Change-Id: I8c6f289ff13248f6e3a8bc24aab3712ed33022a6
2015-08-10Move vp9_systemdependent.h to vpx_ports bitops.h and system_state.hAlex Converse
Use system_state.h in vpx_dsp and remove unneeded includes of vp9_systemdependent.h. Change-Id: I92557ec6dd5aa790160b4f31fe7967db0d7ec3c4
2015-08-08vpx_ports/msvc.h: include math.h for ceil/floorJames Zern
fixes visual studio build errors Change-Id: I5d24f91c74572a75dfa77b9384d6614de231dc50
2015-08-08vpx_ports/x86.h: fix visual studio build warningJames Zern
test for WINAPI_FAMILY_PARTITION before using it Change-Id: I6b7a7b1ccd3332b31c73b733f88c997e30b22de8
2015-08-07Move the msvc round() replacement to msvc.hAlex Converse
Change-Id: If470411c3c62a27f52261f4ece2c5054b71789c7
2015-08-05Support build with Visual Studio 14.Ghislain MARY
Change-Id: Id0d7c19857e29b66c652c8cc1ab56b64e4fc0fa3
2015-05-27Don't #define snprintf in VS 2015 or higher.Johann
In VS 2015 and higher snprintf is supplied and therefore vsnprintf doesn't need to be defined. This also avoids problems caused by _snprintf being different from snprintf. This fixes a build break with VS 2015 and improves security. Originally submitted via chromium by brucedawson@chromium.org https://codereview.chromium.org/1055603003 Additionally break this MSVC-specific tweak to a new file, which will become the home of all such MSVC-specific things. This requires adding a dependency on msvc.h to every example which uses args.c and tools_common.h Change-Id: I35b5f8e7ea00f6627403aabc9ea79b0412557a99
2015-05-14Merge "Remove the BUILD_LIBVPX variable from the build system."Tom Finegan
2015-05-14Remove the BUILD_LIBVPX variable from the build system.Tom Finegan
Replace it with it's value (yes), which is constant. Change-Id: Ifb0c0408a53ecadf81156da6a64fa583b2ada746
2015-05-13Relocate memory operations for common codeJohann
With the sad functions, and hopefully the variance functions soon, moving to the vpx_dsp location, place the defines used in the reference C code in a common location. Change-Id: I4c8ce7778eb38a0a3ee674d2f1c488eda01cfeca
2015-05-07replace DECLARE_ALIGNED_ARRAY w/DECLARE_ALIGNEDJames Zern
this macro was used inconsistently and only differs in behavior from DECLARE_ALIGNED when an alignment attribute is unavailable. this macro is used with calls to assembly, while generic c-code doesn't rely on it, so in a c-only build without an alignment attribute the code will function as expected. Change-Id: Ie9d06d4028c0de17c63b3a27e6c1b0491cc4ea79