Anton Khirnov
e15371061d
lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
...
They are not properly namespaced and not intended for public use.
4 years ago
Nelson Gomez
bc01337db4
swscale/x86/output: add AVX2 version of yuv2nv12cX
...
256 bits is just wide enough to fit all the operands needed to vectorize
the software implementation, but AVX2 is needed to for a couple of
instructions like cross-lane permutation.
Output is bit-for-bit identical to C.
Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
4 years ago
Ruiling Song
4700f7d6fc
swscale/swscale: remove useless code
...
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Ting Fu
e934194b6a
libswscale/x86/yuv2rgb: Change inline assembly into nasm code
...
The original inline assembly and nasm code have the same fps when called by command.
NASM code almost has no impact on the perfromance.
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Andreas Rheinhardt
736c7c20e7
swscale/x86/swscale: Fix undefined left shifts of negative numbers
...
This affected many FATE-tests: The number of failing tests went down
from 663 to 344. (Both numbers exclude tests that failed because of
unaligned accesses in code that is inside #if HAVE_FAST_UNALIGNED.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Thomas Köppe
43171a2a73
Fix missing used attribute for inline assembly variables
...
Variables used in inline assembly need to be marked with attribute((used)).
Static constants already were, via the define of DECLARE_ASM_CONST.
But DECLARE_ALIGNED does not add this attribute, and some of the variables
defined with it are const only used in inline assembly, and therefore
appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks
variables as used.
This change makes FFMPEG work with Clang's ThinLTO.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
f59750641a
swscale: x86: Add some forgotten 12-bit planar YUV cases
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Michael Niedermayer
328ea6a9a5
swscale: Add input support for 12-bit formats
...
Implemented for AV_PIX_FMT_GBRP12.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Luca Barbato
e87a501e7d
swscale: Update bitdepth range check
...
Make sure the scaling functions for the 9-15bits are used for
9-15bits bit depths correctly.
8 years ago
Timo Rothenpieler
99882d05a6
swscale: add support for P010LE/BE output
8 years ago
Matthieu Bouron
9eb3da2f99
asm: FF_-prefix internal macros used in inline assembly
...
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
9 years ago
Diego Biurrun
dc40a70c57
Drop unnecessary libavutil/x86/asm.h #includes
9 years ago
Pedro Arthur
6de58b4903
swscale: cleanup unused code
...
Removed previous swscale code under '#ifndef NEW_FILTER'
and removed unused fields of SwsContext
9 years ago
Hendrik Leppkes
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
9 years ago
Pedro Arthur
62d176de12
swscale: refactor vertical scaler
9 years ago
Pedro Arthur
ed80dec621
swscale: fixed compiler warnings
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Pedro Arthur
e0a3173a94
swscale: refactor horizontal scaling
...
+ split color conversion from scaling
- disabled gamma correction, until it's refactored too
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
54e64eaf68
swscale/x86/swscale: Fix warning about loosing significant bits in cast
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ae20682f6b
swscale: Add prefix to updateMMXDitherTables()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Kieran Kunhya
b546023b93
swscale: fix yuv2yuvX_8 assembly on x86
...
use_mmx_vfilter check/fix by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vitor Sessak
55d11d277b
swscale/x86: do not expect registers to be preserved across inline ASM blocks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
e96c3b81ca
avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8
...
The rationale is that you have a packed format in form
<greyscale sample> <alpha sample> <greyscale sample> <alpha sample>
and shortening greyscale to 'G' might make one thing about Greenscale instead.
An alias pixel format and color space name are provided for compatibility.
10 years ago
Carl Eugen Hoyos
891307b4d1
s86/scale: Do not return the result of a (void) function from a void function.
...
Fixes compilation with Sun C 5.12.
Reported by Bradley Mitchell in ticket #3649 .
11 years ago
Michael Niedermayer
2f955d572b
swscale/x86/swscale: remove unused constants
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6c47a4e972
swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
46bacb5cc6
x86: Consistently use cpu flag detection macros in places that still miss it
11 years ago
Diego Biurrun
c16bfb147d
swscale: x86: Consistently use lowercase function name suffixes
11 years ago
Diego Biurrun
a519583991
swscale: x86: Hide arch-specific initialization details
...
Also give consistent names to init functions.
11 years ago
Michael Niedermayer
920dd84bf1
sws/x86: remove 8bit rgb2yuv coefficient case for rgb24toyv12 special converter
...
This simplifies the code and improves quality at the expense of a slight
slowdown of a rarely used function (no fate test uses it).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
b6649ab503
cosmetics: Remove unnecessary extern keywords from function declarations
12 years ago
Michael Niedermayer
5e947aeb59
sws/x86: improve rounding for yuv2yuvX
...
This tries to compensate for the errors introduced by
the rounding of pmulhw
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Diego Biurrun
652f518594
x86: mmx2 ---> mmxext in comments and messages
12 years ago
Hendrik Leppkes
79393a8363
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Clément Bœsch
178ecfc257
swscale: fix To{Y,UV} extern prototypes.
...
This fix a bunch of "assignment from incompatible pointer type" warnings
with GCC.
12 years ago
Michael Niedermayer
ef912134f0
x86/swscale: use unsigned to build SIMD values to avoid signed overflow
...
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
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
a886b279a0
x86: cosmetics: Comment some #endifs for better readability
12 years ago
XhmikosR
08bd8c8ab3
rename the remaining instances of HAVE_MMX2 to HAVE_MMXEXT
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
5a6e3c039c
swscale: Mark all init functions as av_cold
12 years ago
Diego Biurrun
16d2a1a51c
swscale: x86: Drop pointless _mmx suffix from filenames
...
The files do not contain only MMX code.
12 years ago
Ronald S. Bultje
b2668c85e9
x86: swscale: Place inline assembly code under appropriate #ifdefs
...
Fixes compilation for compilers that do not support gcc inline assembly.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
9b2b57681c
sws/x86: add av_assert() to ensure 16bit code is used with 16bit data
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a32032b508
sws/x86: add some forgotten 12bit planar yuv cases
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago