Ronald S. Bultje
ef1c785f11
swscale: make yuv2yuv1 use named registers.
13 years ago
Ronald S. Bultje
b7542dd3d7
swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
...
Fixes bug 221.
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
7e4d9d5d45
win64: add a XMM clobber test configure option.
...
This will be useful to test more aggressively for failures to mark XMM
registers as clobbered in Win64 builds, and prevent regressions thereof.
Based on a patch by Ramiro Polla <ramiro.polla@gmail.com>
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
212f161caa
swscale: make rgb24 function macros slightly smaller.
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
Ronald S. Bultje
3b15a6d742
config.asm: change %ifdef directives to %if directives.
...
This allows combining multiple conditionals in a single statement.
13 years ago
Ronald S. Bultje
3c172a4106
swscale: change yuv2yuvX code to use cpuflag().
13 years ago
Ronald S. Bultje
b14fa5572c
swscale: fix crash in fast_bilinear code when compiled with -mred-zone.
...
Additional comments from Måns Rullgard have been integrated
by Reinhard Tartler.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
13 years ago
Oka Motofumi
cd44521625
swscale: specify register type.
...
Fixes a compilation failure on win64.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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
Ronald S. Bultje
6ea64339c5
swscale: split scale.asm.
...
scale.asm keeps horizontal scaling functions, whereas output.asm gets
the vertical scaling/output functions.
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
Ronald S. Bultje
8283f90a52
swscale: handle unaligned buffers in yuv2plane1
...
The issue had been introduced in
c435653627
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
13 years ago
Ronald S. Bultje
c435653627
swscale: write yuv2plane1 MMX/SSE2/SSE4/AVX functions.
13 years ago
Ronald S. Bultje
9e66b892e8
swscale: add missing colons to x86 assembly yuv2planeX.
...
This fixes assembling using "nasm".
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
Kieran Kunhya
34e8d147b3
Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
6aa3cac6bf
swscale: use aligned move for storage into temporary buffer.
...
The intermediate buffer is always aligned.
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
Ronald S. Bultje
3f04ab4fcd
swscale: split hScale() function pointer into h[cy]Scale().
...
This allows using more specific implementations for chroma/luma, e.g.
we can make assumptions on filterSize being constant, thus avoiding
that test at runtime.
13 years ago
Ronald S. Bultje
28c1115a91
swscale: use 15-bit intermediates for 9/10-bit scaling.
13 years ago
Ronald S. Bultje
5c391a161a
swscale: rename uv_off/uv_off2 to uv_off_px/byte.
14 years ago
Ronald S. Bultje
4e3e333a79
swscale: error dithering for 16/9/10-bit to 8-bit.
...
Based on a somewhat similar idea in FFmpeg's swscale copy.
14 years ago
Ronald S. Bultje
42d622fab3
swscale: fix 16-bit scaling when output is 8-bits.
...
We would use the second half of the U plane buffer, rather than the
V plane buffer, to output the V plane pixels.
14 years ago
Ronald S. Bultje
8a8d0ce208
swscale: for >8bit scaling, read in native bit-depth.
...
For 9/10bit, it means we don't have to upscale to 16bit before
actual scaling or pixel format conversion, and thus a performance
gain.
14 years ago
Ronald S. Bultje
ef1ee362b3
swscale: implement >8bit scaling support.
...
This means that precision is retained when scaling between sample
formats with >8 bits per component (48bit RGB, 16bit grayscale,
9/10/16bit YUV).
14 years ago
Ronald S. Bultje
13a099799e
swscale: change prototypes of scaled YUV output functions.
...
Remove unused variables "flags" and "dstFormat" in yuv2packed1,
merge source rows per plane for yuv2packed[12], and make every
source argument int16_t (some where invalidly set to uint16_t).
This prevents stack pollution and is part of the Great Evil Plan
to simplify swscale.
14 years ago
Ronald S. Bultje
0d994b2f45
swscale: don't use planar output functions to write to NV12/21.
...
This prevents a crash when converting to NV12/21 without the bitexact
flags enabled.
14 years ago
Ronald S. Bultje
97535ffb97
swscale: remove unused xInc/srcW arguments from hScale().
14 years ago
Diego Biurrun
a60466dbc3
swscale: Remove HAVE_MMX from files that are only compiled with MMX enabled.
14 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
a27db4c349
swscale: fix function declaration keywords in x86/swscale_template.c.
...
Remove inline keyword for functions that are only called through
their function pointers (and thus cannot be inlined); add av_cold
keyword to init function, and use av_always_inline instead of
inline for functions that must be inlined for performance reasons.
14 years ago
Ronald S. Bultje
9bcbb250e2
swscale: fix types of assembly arguments.
...
This prevents the following compiler warnings: "warning:
initialization from incompatible pointer type". Since the
variables are only ever used in inline assembly, their type
is actually irrelevant (so the part where it was wrong did
not invoke any buggy behaviour).
14 years ago
Ronald S. Bultje
496d95c34c
swscale: move two macros that are only used once into caller.
...
This way, they look like regular code, which is easier to
understand.
14 years ago
Ronald S. Bultje
0fb5193156
swscale: reindent x86 init code.
14 years ago
Ronald S. Bultje
ca364a5b43
swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
14 years ago
Ronald S. Bultje
bda9b20fa4
swscale: un-special-case yuv2yuvX16_c().
...
Make yuv2yuvX16_c a function pointer for yuv2yuvX(), so that the
function pointer becomes bitdepth-independent.
14 years ago
Ronald S. Bultje
983260b0a4
swscale: split out x86/swscale_template.c from swscale.c.
14 years ago
Anton Khirnov
b8e893399f
sws: replace all long with int.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
009f829dde
swscale: fix crash in bilinear scaling.
14 years ago
Diego Biurrun
5a5a0f1613
swscale: Remove unused variables in x86 code.
...
libswscale/x86/swscale_template.c:2072: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2145: warning: unused variable ‘canMMX2BeUsed’
libswscale/x86/swscale_template.c:2209: warning: unused variable ‘chrVPixBuf’
libswscale/x86/swscale_template.c:2237: warning: unused variable ‘chrVSrcPtr’
14 years ago
Ronald S. Bultje
f327bfa6dc
swscale: fix build with --disable-swscale-alpha.
14 years ago
Ronald S. Bultje
9f5d45025e
swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
14 years ago
Ronald S. Bultje
e758573a88
swscale: fix compile on x86-32.
14 years ago
Ronald S. Bultje
b4a224c5e4
swscale: split chroma buffers into separate U/V planes.
...
Preparatory step to implement support for sizes > VOFW.
14 years ago