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>
12 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
Michael Niedermayer
fa36f33422
sws: support 12&14 bit planar colorspaces
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
557519189f
swscale: yuv2planeX 8bit >=sse2 functions need aligned stack on x86-32.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
2254b559cb
swscale: make filterPos 32bit.
...
Fixes overflows for large image sizes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
1d8c4af396
swscale: take first/lastline over/underflows into account for MMX.
...
Fixes crashes for extremely large resizes (several 100-fold).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
b18f8cbf3d
Revert two swscale commits.
...
Revert "swscale: update context offsets after removal of AlpMmxFilter."
(commit a95e3fa90b
)
and
Revert "swscale: Remove some write-only variables related to alpha handling."
(commit 9d03cb9fc5
).
They broke alpha handling - it's the evil inline asm that still uses that
variable, so it's not truely write-only.
13 years ago
Michael Niedermayer
e7dbfa59f2
swscale: enable some more SIMD functions.
...
They no longer just segfault.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
9d03cb9fc5
swscale: Remove some write-only variables related to alpha handling.
13 years ago
Ronald S. Bultje
de53b9068a
swscale: implement MMX, SSE2 and AVX functions for RGB32 input.
13 years ago
Ronald S. Bultje
378c5ef9ae
swscale: enable dithering in MMX functions.
...
This was accidently disabled.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
b5d08c27c3
swscale: convert rgb/bgr24ToY/UV_mmx functions from inline asm to yasm.
...
Also implement sse2/ssse3/avx versions.
13 years ago
Carl Eugen Hoyos
ef3a19d595
Fix compilation with yasm-0.6.2
13 years ago
Ronald S. Bultje
2170a0e6ad
swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.
...
Also implement SSE2/AVX variants.
13 years ago
Diego Biurrun
3c62a71486
swscale_mmx: drop no longer required parameters from VSCALEX macros
13 years ago
Diego Biurrun
52de07e1f1
swscale: Mark yuv2planeX_8_mmx as MMX2; it contains MMX2 instructions.
13 years ago
Mans Rullgard
373211d828
Remove extraneous semicolons
...
These semicolons cause invalid empty top-level declarations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
3fd4fe0e03
swscale_mmx: Fix cast qualifier warnings:
...
libswscale/x86/swscale_mmx.c:131:36: warning: to be safe all intermediate pointers in cast from ‘int16_t **’ to ‘const int16_t **’ must be ‘const’ qualified [-Wcast-qual]
libswscale/x86/swscale_mmx.c:132:37: warning: to be safe all intermediate pointers in cast from ‘int16_t **’ to ‘const int16_t **’ must be ‘const’ qualified [-Wcast-qual]
libswscale/x86/swscale_mmx.c:133:74: warning: to be safe all intermediate pointers in cast from ‘int16_t **’ to ‘const int16_t **’ must be ‘const’ qualified [-Wcast-qual]
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0a3a125fd9
sws: update copyright dates
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7437db84a9
sws: Fix compilation with disabled MMX2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
c435653627
swscale: write yuv2plane1 MMX/SSE2/SSE4/AVX functions.
13 years ago
Michael Niedermayer
e484b64ce3
sws: fallback to mmx2 when yuv2yuvX_sse3() cannot be used.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9eb867e117
sws: add yuv2yuvX_sse3()
...
Code is about 2x as fast as previous
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1ac5b51203
swscale: disable functions that do not yet work
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
6cacecdca3
swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware.
...
Also implement MMX/MMX2 versions and SSE4 versions.
13 years ago
Kieran Kunhya
7fbbf95293
yuv2planeX10 SIMD
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
1eb8014b49
swscale: add 14bit support to the "MMX/SSE2/SSSE3/SSE4 versions for horizontal scaling"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
e0c3e07387
sws: implement MMX/SSE2/SSSE3/SSE4 versions for horizontal scaling.
...
Speed: from 3.9x to 9.6x speed improvement over C, and some small
(up to 15%) speed improvements over existing MMX code (particularly
for bigger filters).
13 years ago
Diego Biurrun
97e057ff81
swscale: Fix compilation with --disable-mmx2.
...
Some MMX2 functions were being referenced without proper #ifdefs.
14 years ago
Ronald S. Bultje
983260b0a4
swscale: split out x86/swscale_template.c from swscale.c.
14 years ago