Andreas Rheinhardt
4618f36a24
avcodec/x86/h264dsp_init: Remove obsolete MMX(EXT) functions
...
x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2 years ago
Andreas Rheinhardt
afc95a10ac
avcodec/h264dsp, h264idct: Fix lengths of array parameters
...
Fixes many -Warray-parameter warnings from GCC 11.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
James Almer
d5d699ab6e
avcodec/h264dsp: change loop filter stride argument to ptrdiff_t
6 years ago
Diego Biurrun
fd502f4f5f
build: Generalize yasm/nasm-related variable names
...
None of them are specific to the YASM assembler.
(Cherry-picked from libav commit 39e208f4d4
)
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
James Darnley
7aa90b4e94
avcodec/h264: add sse2 versions of previous idct functions
...
Kaby Lake Pentium:
- ff_h264_idct_add_8_sse2: ~1.18x faster than mmxext
- ff_h264_idct_dc_add_8_sse2: ~1.07x faster than mmxext
8 years ago
James Darnley
27460dfebc
avcodec/h264: add avx 8-bit h264_idct_dc_add
...
Haswell:
- 1.02x faster (405±0.7 vs. 397±0.8 decicycles) compared with mmxext
Skylake-U:
- 1.06x faster (498±1.8 vs. 470±1.3 decicycles) compared with mmxext
8 years ago
James Darnley
f61d454ca1
avcodec/h264: add avx 8-bit h264_idct_add
...
Haswell:
- 1.11x faster (522±0.4 vs. 469±1.8 decicycles) compared with mmxext
Skylake-U:
- 1.21x faster (671±5.5 vs. 555±1.4 decicycles) compared with mmxext
8 years ago
James Darnley
33de0fee2c
avcodec/h264: enable sse2 chroma deblock/loop filter functions
...
Between 1.00 and 1.16 times faster on Intel Yorkfield Core 2 Quad.
Between 1.11 and 1.39 times faster on Intel Kaby Lake Pentium.
8 years ago
James Darnley
cd893b9307
avcodec/h264: add avx 8-bit 4:2:2 chroma h intra deblock/loop filter
...
~1.37x faster (147 vs. 108 cycles) compared to mmxext function
8 years ago
James Darnley
0e16b3e2be
avcodec/h264: add avx 8-bit 4:2:0 chroma h intra deblock/loop filter
...
~1.10x faster (69 vs. 63 cycles) compared to mmxext function
8 years ago
James Darnley
987ffe4b8d
avcodec/h264: add avx 8-bit chroma v intra deblock/loop filter
...
~1.14x faster (90 vs 78 cycles) compared with mmxext
8 years ago
James Darnley
88307b3eec
avcodec/h264: add avx 8-bit 4:2:2 chroma h deblock/loop filter
...
~1.21x faster (68 vs. 56 cycles) compared with mmxext function
8 years ago
James Darnley
ac096fc82d
avcodec/h264: add avx 8-bit 4:2:0 chroma h deblock/loop filter
...
~1.14x faster (93 vs. 81 cycles) compared with mmxext function
8 years ago
James Darnley
5c56758843
avcodec/h264: add avx 8-bit chroma v deblock/loop filter
...
~1.24x faster (101 vs. 81 cycles) compared with mmxext function
8 years ago
James Darnley
5336887867
avcodec/h264: sse2, avx h luma mbaff deblock/loop filter
...
x86-64 only
Yorkfield:
- sse2: ~2.17x (434 vs. 200 cycles)
Nehalem:
- sse2: ~2.94x (409 vs. 139 cycles)
Skylake:
- sse2: ~3.10x (370 vs. 119 cycles)
- avx: ~3.29x (370 vs. 112 cycles)
8 years ago
James Darnley
728651df06
avcodec/h264: mmx2, sse2, avx 10-bit 4:2:2 h chroma deblock/loop filter
...
Yorkfield:
- mmx2: 2.53x (504 vs. 199 cycles)
- sse2: 3.83x (504 vs. 131 cycles)
Nehalem:
- mmx2: 2.42x (365 vs. 151 cycles)
- sse2: 3.56x (365 vs. 103 cycles)
Skylake:
- mmx2: 1.81x (308 vs. 170 cycles)
- sse2: 2.84x (308 vs. 108 cycles)
- avx: 2.93x (308 vs. 105 cycles)
8 years ago
James Darnley
add21d0bb3
avcodec/h264: mmx2, sse2, avx 10-bit h chroma deblock/loop filter
...
Yorkfield:
- mmx2: 2.45x (279 vs. 114 cycles)
- sse2: 3.36x (279 vs. 83 cycles)
Nehalem:
- mmx2: 2.10x (192 vs. 92 cycles)
- sse2: 2.84x (192 vs. 68 cycles)
Skylake:
- mmx2: 1.75x (170 vs. 97 cycles)
- sse2: 2.47x (170 vs. 69 cycles)
- avx: 2.47x (170 vs. 69 cycles)
8 years ago
James Darnley
58ca2ef62e
whitespace changes after last commit
8 years ago
James Darnley
f33714a694
avcodec/h264: clean up and expand x86 function definitions
8 years ago
James Darnley
13d71c28cc
avcodec/h264: sse2 and avx 4:2:2 idct add8 10-bit functions
...
Yorkfield:
- sse2:
- complex: 4.13x faster (1514 vs. 367 cycles)
- simple: 4.38x faster (1836 vs. 419 cycles)
Skylake:
- sse2:
- complex: 3.61x faster ( 936 vs. 260 cycles)
- simple: 3.97x faster (1126 vs. 284 cycles)
- avx (versus sse2):
- complex: 1.07x faster (260 vs. 244 cycles)
- simple: 1.03x faster (284 vs. 274 cycles)
8 years ago
James Darnley
1dae7ffa0b
avcodec/h264: mmx 4:2:2 idct add8 function
...
2.87 times faster (1830 vs. 638 cycles)
8 years ago
James Darnley
815ea8c6cc
avcodec/h264: mmxext 4:2:2 chroma intra deblock/loop filter
...
2.1 times faster (401 vs. 194 cycles)
8 years ago
Michael Niedermayer
bc26fe8927
avcodec/h264: Use ptrdiff_t for (bi)weight functions
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
James Darnley
7042a55c55
avcodec/h264: mmxext 4:2:2 chroma deblock/loop filter
...
2.6 times faster (366 vs. 142 cycles)
9 years ago
Diego Biurrun
5ab03e41e5
x86: h264dsp: Fix link failure with optimizations disabled
...
With optimzations disabled compilers have trouble doing dead code
elimination on 'if (foo && 0)' expressions, while 'if (0 && foo)'
still works, so use the latter to avoid problems.
Bug-Id: 707
11 years ago
Diego Biurrun
b42f49e42f
x86: dsputil: Eliminate some unnecessary dsputil_x86.h #includes
11 years ago
Anton Khirnov
a03a642d5c
h264: do not use 422 functions for monochrome
...
Fixes invalid memory access.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
11 years ago
Diego Biurrun
e998b56362
x86: avcodec: Consistently structure CPU extension initialization
11 years ago
Diego Biurrun
3ac7fa81b2
Consistently use "cpu_flags" as variable/parameter name for CPU flags
12 years ago
Diego Biurrun
1399931d07
x86: dsputil: Rename dsputil_mmx.h --> dsputil_x86.h
...
The header is not (anymore) MMX-specific.
12 years ago
Diego Biurrun
f2e9d44a57
x86: Drop unnecessary ff_ name prefixes from static functions
12 years ago
Diego Biurrun
c9f933b5b6
Add av_cold attributes to arch-specific init functions
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Ronald S. Bultje
ce58642ed0
x86inc: support stack mem allocation and re-alignment in PROLOGUE.
...
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
6f40e9f070
x86inc: support stack mem allocation and re-alignment in PROLOGUE
...
Use this in VP8/H264-8bit loopfilter functions so they can be used if
there is no aligned stack (e.g. MSVC 32bit or ICC 10.x).
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Diego Biurrun
89145fbbfe
x86: h264dsp: Fix linking with yasm and optimizations disabled
...
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
12 years ago
Diego Biurrun
26301caaa1
x86: mmx2 ---> mmxext in asm constructs
12 years ago
Diego Biurrun
d8eda37080
x86: mmx2 ---> mmxext in function names
12 years ago
Michael Niedermayer
6add8eb2ce
x86/h264dsp_init: put a HAVE_YASM back
...
Should fix compilation on open solaris
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
e0c6cce447
x86: Replace checks for CPU extensions and flags by convenience macros
...
This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.
12 years ago
Diego Biurrun
a84ac7a860
x86: h264dsp: drop some unnecessary ifdefs around prototype declarations
12 years ago
Carl Eugen Hoyos
a26789cf9f
Fix compilation with yasm-0.6.2.
12 years ago
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
12 years ago
Diego Biurrun
29cfdd3767
x86: avcodec: Appropriately name files containing only init functions
12 years ago
Mans Rullgard
c318626ce2
x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
...
This puts x86-specific things in the x86/ subdirectory where they
belong.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Diego Biurrun
239fdf1b4a
x86: build: replace mmx2 by mmxext
...
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
12 years ago
Diego Biurrun
81905088a1
x86: h264dsp: K&R formatting cosmetics
12 years ago
Diego Biurrun
6376a3ad24
x86: h264dsp: Remove unused variable ff_pb_3_1
12 years ago
Diego Biurrun
8728b381cb
x86: h264dsp: Adjust YASM #ifdefs
...
This fixes compilation with YASM disabled.
12 years ago
Ronald S. Bultje
b829b4ce29
h264: convert loop filter strength dsp function to yasm.
...
This completes the conversion of h264dsp to yasm; note that h264 also
uses some dsputil functions, most notably qpel. Performance-wise, the
yasm-version is ~10 cycles faster (182->172) on x86-64, and ~8 cycles
faster (201->193) on x86-32.
12 years ago