summaryrefslogtreecommitdiff
path: root/vpx_ports
AgeCommit message (Collapse)Author
2023-07-10support framework for RunTime Cpu DetectionWang Chen
Just add related code about RTCD to setup the framework. Have not support the actual runtime detection, and I have not understood how RTCD works, FIXME. More analysis please refer to https://github.com/aosp-riscv/libvpx/issues/8#issuecomment-1627896402. Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn> Co-authored-by: sun min <sunmin89@outlook.com>
2022-08-18compiler_attributes.h: add VPX_NO_UNSIGNED_SHIFT_CHECKJames Zern
and use it on MD5Transform(); this behavior is well defined and is only a warning with -fsanitize=integer, not -fsanitize=undefined. quiets warnings of the form: md5_utils.c:163:3: runtime error: left shift of 143704723 by 7 places cannot be represented in type 'unsigned int' Bug: b/229626362 Change-Id: I60a384b2c2556f5ce71ad8ebce050329aba0b4e4
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
2022-01-26fix some include guardsJames Zern
Change-Id: I0233d352c134bdda3ca160d41b4671d1c45ab01c
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-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
2021-11-08vp8: fix some implicit signed -> unsigned conv warningsJames Zern
and vice-versa mostly when dealing with bitmasks w/clang-11 -fsanitize=undefined Change-Id: I6d8f676bf87679ba1dad9cb7f55eea172103d9d3
2021-07-26vpx_ports/x86.h: sync with aom_ports/x86.hJames Zern
adds a few comments and makes the file ascii: 854b2766a Replace non-ASCII characters Change-Id: I6c2d76b293158bcad9f1ded7a91a81bda1e700fb
2021-07-26Fix some instances of -Wunused-but-set-variable.Peter Kasting
Bug: chromium:1203071 Change-Id: Ieb628f95d676ba3814b5caf8a02a884330928c77
2020-08-19Refine MMI & MSA detection for mipsjinbo
1.Add compile check to probe the native ability of toolchain to decide whether a feature can be enabled. 2.Add runtime check to probe cpu supported features. MSA will be prefered if MSA and MMI are both supported. 3.You can configure and build as following commands: ./configure --cpu=loongson3a && make -j4 Change-Id: I057553216dbc79cfaba9c691d5f4cdab144e1123
2020-06-29vp8,vpx_dsp:[loongson] fix specification of instruction namejinbo
1.'xor,or,and' to 'pxor,por,pand'. In the case of operating FPR, gcc supports both of them, clang only supports the second type. 2.'dsrl,srl' to 'ssrld,ssrlw'. In the case of operating FPR, gcc supports both of them, clang only supports the second type. Change-Id: I93b47348e7c6580d99f57dc11165b4645236533c
2020-04-13simplify x86_abi_support.asm symbol declarationJohann
Define LIBVPX_{ELF,MACHO} to simplify blocks. Create new globalsym macro and include logic for PRIVATE. BUG=webm:1679 Change-Id: I303ba1492a2813f685de51155ccef7e4831e1881
2020-04-06x86_abi_support: do not decorate coff functionsJohann
:private_extern only applies to macho. Match x86inc.asm logic: %if FORMAT_ELF global %2:function hidden %elif FORMAT_MACHO global %2:private_extern %else global %2 %endif May fix a build issue on windows: vp8/encoder/x86/block_error_sse2.asm:18: error: COFF format does not support any special symbol types BUG=webm:1679 Change-Id: I7e1f4043b064a04752d1cedd030cbe7f5461fe40
2020-04-01x86_abi_support: use correct hidden syntaxJohann
Chromium needs :function hidden and the space between the symbol and the colon removed, at least for nasm. This matches x86inc.asm. BUG=webm:1679 Change-Id: Ie47bb75d44d3130791639cbf4e2ebe019e2d686e
2020-03-31nasm: require 2.14 with -DCHROMIUMJohann
BUG=webm:1679 Change-Id: I75b1f860d111febf0aabe38b89d845ef296728a4
2020-02-19Merge "x86_simd_caps: make mask value unsigned"James Zern
2020-02-14move common attribute defs to compiler_attributes.hJames Zern
BUG=b/148271109 Change-Id: I620e26ff1233fcd34ebe0723cb913e82eb58271c
2020-02-14x86_simd_caps: make mask value unsignedJames Zern
fixes -fsanitize=integer warning: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned) Change-Id: I95d41aade78cea5e4f870a804d3f358c2cf618d7
2020-01-17add static_assert.hJames Zern
unify COMPILE_TIME_ASSERT definitions and rename to VPX_STATIC_ASSERT Change-Id: Id51150c204e0c4eaf355ee45b20915113209d524
2019-11-25fix __has_attribute in visual studioJohann
Similar to __has_feature, __has_attribute needs to be defined away on unsupported platforms. BUG=chromium:1020220,chromium:977230 Change-Id: I803fff0fef2b18b535604f3b7f9f8300e45f7ef8
2019-11-23Disable -ftrivial-auto-var-init= for hot codeVitaly Buka
This helps to improve some benchmarks by 10%, e.g. decode_time PCFullStackTest.VP9SVC_3SL_Low Bug: 1020220, 977230 Change-Id: Ic992f1eec369f46a08e19eb33bc3a7c15c1e7c87
2019-10-17Fix AVX-512 capability detectionBirk Magnussen
When Checking for AVX Support, only the CPU's Capabilities and YMM Register support by the OS were queried. In case of AVX-512, that is insufficient, and ZMM Register support by the OS needs querying, otherwise the OS will raise an Illegal Operation Exception if the CPU is capable of AVX-512 but the OS is not. Change-Id: I3444b19156d5743841de96cecbdaac19cc3f2b3f
2019-09-30namespace ARCH_* definesJames Zern
this prevents redefinition warnings if a toolchain sets one BUG=b/117240165 Change-Id: Ib5d8c303cd05b4dbcc8d42c71ecfcba8f6d7b90c
2019-03-14Enclose macro arguments in parenthesesJerome Jiang
BUG=webm:1606 Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
2019-03-04add -Wmissing-prototypesJohann
clang treats -Wmissing-declarations differently than gcc. This provides similar coverage for clang. Fix vpx_clear_system_state() warning on 32bit builds: note: this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function Change-Id: I5a424bc38d47c0a3dc751d65c1efea5733907785
2019-01-07vpx_clear_system_state: resolve missing declarationJohann
BUG=webm:1584 Change-Id: I0770fc97055b98cdf9ff7bd7a93ae3a5e19b8180
2018-12-21Improve accuracy of benchmarkingelliottk
For small code regions, readtsc can give inaccurate results because it does not account for out-of-order execution. Add x86_tsc_start and x86_tsc_end that account for this, according to the white paper at https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ia-32-ia-64-benchmark-code-execution-paper.pdf Using x86_tsc_start/end will also add in several more instructions; I imagine this is negligible. Change-Id: I54a1c8fa7977c34bf91b422369c96f036c93a08a
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