Ronald S. Bultje
ef1c785f11
swscale: make yuv2yuv1 use named registers.
2012-02-07 11:38:13 -08:00
Ronald S. Bultje
b7542dd3d7
swscale: fix V plane memory location in bilinear/unscaled RGB/YUYV case.
...
Fixes bug 221.
CC: libav-stable@libav.org
2012-02-07 11:33:20 -08:00
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>
2012-02-02 12:00:48 -08:00
Ronald S. Bultje
de53b9068a
swscale: implement MMX, SSE2 and AVX functions for RGB32 input.
2012-02-01 21:55:32 -08:00
Ronald S. Bultje
378c5ef9ae
swscale: enable dithering in MMX functions.
...
This was accidently disabled.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-01 09:33:29 -08:00
Ronald S. Bultje
212f161caa
swscale: make rgb24 function macros slightly smaller.
2012-02-01 09:33:13 -08:00
Ronald S. Bultje
b5d08c27c3
swscale: convert rgb/bgr24ToY/UV_mmx functions from inline asm to yasm.
...
Also implement sse2/ssse3/avx versions.
2012-01-27 11:00:30 +08:00
Ronald S. Bultje
3b15a6d742
config.asm: change %ifdef directives to %if directives.
...
This allows combining multiple conditionals in a single statement.
2012-01-27 10:19:57 +08:00
Ronald S. Bultje
3c172a4106
swscale: change yuv2yuvX code to use cpuflag().
2012-01-13 16:57:01 -08:00
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>
2012-01-10 18:20:37 +01:00
Oka Motofumi
cd44521625
swscale: specify register type.
...
Fixes a compilation failure on win64.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-10 09:17:37 -08:00
Ronald S. Bultje
2170a0e6ad
swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.
...
Also implement SSE2/AVX variants.
2012-01-08 16:37:43 -08:00
Ronald S. Bultje
6ea64339c5
swscale: split scale.asm.
...
scale.asm keeps horizontal scaling functions, whereas output.asm gets
the vertical scaling/output functions.
2012-01-03 20:02:07 -08:00
Diego Biurrun
3c62a71486
swscale_mmx: drop no longer required parameters from VSCALEX macros
2011-12-14 12:00:44 +01:00
Diego Biurrun
52de07e1f1
swscale: Mark yuv2planeX_8_mmx as MMX2; it contains MMX2 instructions.
2011-12-14 11:58:46 +01:00
Mans Rullgard
373211d828
Remove extraneous semicolons
...
These semicolons cause invalid empty top-level declarations.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-11 17:23:24 +00:00
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>
2011-11-13 08:27:20 +01:00
Ronald S. Bultje
c435653627
swscale: write yuv2plane1 MMX/SSE2/SSE4/AVX functions.
2011-11-05 20:48:14 -07:00
Ronald S. Bultje
9e66b892e8
swscale: add missing colons to x86 assembly yuv2planeX.
...
This fixes assembling using "nasm".
2011-10-23 09:44:03 -07:00
Ronald S. Bultje
6cacecdca3
swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware.
...
Also implement MMX/MMX2 versions and SSE4 versions.
2011-10-22 10:35:14 -07:00
Kieran Kunhya
7fbbf95293
yuv2planeX10 SIMD
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-22 10:35:14 -07:00
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>
2011-10-22 10:35:13 -07:00
Ronald S. Bultje
6aa3cac6bf
swscale: use aligned move for storage into temporary buffer.
...
The intermediate buffer is always aligned.
2011-10-11 07:50:48 -07:00
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).
2011-09-13 09:53:42 -07:00
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.
2011-08-17 20:56:06 -07:00
Ronald S. Bultje
28c1115a91
swscale: use 15-bit intermediates for 9/10-bit scaling.
2011-08-12 11:54:25 -07:00
Ronald S. Bultje
5c391a161a
swscale: rename uv_off/uv_off2 to uv_off_px/byte.
2011-07-08 15:15:31 -07:00
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.
2011-07-08 15:15:30 -07:00
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.
2011-07-08 15:15:30 -07:00
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.
2011-07-01 09:08:26 -07:00
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).
2011-06-29 09:45:52 -07:00
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.
2011-06-27 21:24:44 -07:00
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.
2011-06-27 17:15:41 -07:00
Ronald S. Bultje
97535ffb97
swscale: remove unused xInc/srcW arguments from hScale().
2011-06-26 14:41:44 -07:00
Diego Biurrun
a60466dbc3
swscale: Remove HAVE_MMX from files that are only compiled with MMX enabled.
2011-06-15 01:18:10 +02:00
Diego Biurrun
97e057ff81
swscale: Fix compilation with --disable-mmx2.
...
Some MMX2 functions were being referenced without proper #ifdefs.
2011-06-15 01:17:59 +02:00
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.
2011-06-09 09:25:59 -04:00
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).
2011-06-08 11:39:26 -04:00
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.
2011-06-08 11:33:46 -04:00
Ronald S. Bultje
0fb5193156
swscale: reindent x86 init code.
2011-06-07 10:05:50 -04:00
Ronald S. Bultje
ca364a5b43
swscale: extract SWS_FULL_CHR_H_INT conditional into init code.
2011-06-07 10:03:47 -04:00
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.
2011-06-07 10:03:12 -04:00
Ronald S. Bultje
983260b0a4
swscale: split out x86/swscale_template.c from swscale.c.
2011-06-03 09:52:09 -07:00
Anton Khirnov
b8e893399f
sws: replace all long with int.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-05-28 10:03:37 -04:00
Ronald S. Bultje
009f829dde
swscale: fix crash in bilinear scaling.
2011-05-28 08:59:56 -04:00
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’
2011-05-27 21:25:57 +02:00
Ronald S. Bultje
f327bfa6dc
swscale: fix build with --disable-swscale-alpha.
2011-05-27 13:22:27 -04:00
Ronald S. Bultje
9f5d45025e
swscale: fix non-bitexact yuv2yuv[X2]() MMX/MMX2 functions.
2011-05-27 09:41:48 -04:00
Ronald S. Bultje
e758573a88
swscale: fix compile on x86-32.
2011-05-26 10:41:27 -04:00
Ronald S. Bultje
b4a224c5e4
swscale: split chroma buffers into separate U/V planes.
...
Preparatory step to implement support for sizes > VOFW.
2011-05-26 09:31:27 -04:00
Ronald S. Bultje
522d65ba25
rgb2rgb: remove duplicate mmx/mmx2/3dnow/sse2 functions.
...
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
2011-05-26 09:31:02 -04:00
Ronald S. Bultje
836b82e3c9
swscale: reindent h[cy]scale_fast() and updateDitherTables().
2011-05-26 09:31:02 -04:00
Ronald S. Bultje
e2bad983b5
swscale: reformat x86/swscale_template.c.
...
Interleave macros and code so that it's easier to find the
actual code that belongs to a function. Also reindent where
appropriate and remove dead code.
2011-05-26 09:30:15 -04:00
Ronald S. Bultje
71d9c33c86
swscale: remove duplicate mmx/mmx2 functions if they are identical.
2011-05-26 09:30:15 -04:00
Ronald S. Bultje
acb96bc268
swscale: remove if (c->dstFormat) branch from yuv2packed[12X]().
...
This allows cutting up the function in much smaller and easier-
to-maintain chunks.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje
b6cac9b3bf
swscale: remove if(full_chr_int) from yuv2packed1().
...
If that flag is set, swScale() already proxies the call to
yuv2rgbXinC_full(). Therefore, this flag is never set when
yuv2packed1() is called.
2011-05-26 09:30:14 -04:00
Ronald S. Bultje
2159a24573
swscale: remove if(accurate_rnd) branch from functions.
2011-05-26 09:30:14 -04:00
Diego Biurrun
0093199184
swscale: Remove commented-out printf cruft.
2011-05-26 03:45:58 +02:00
Michael Niedermayer
7dc303a60e
swscale: Eliminate rgb24toyv12_c() duplication.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-05-26 00:56:06 +02:00
Ronald S. Bultje
1bb0f0c925
swscale: remove if(bitexact) branch from functions.
...
Instead, only set the function pointers if bitexact flag is
not set during initialization. Since a change in flags triggers
a re-init anyway, this doesn't situations where flag values
change during runtime.
2011-05-24 14:50:20 -04:00
Ronald S. Bultje
566b5fbbb3
swscale: remove if(canMMX2BeUsed) conditional.
...
Instead, set function pointers conditionally during init. This
patch also reveals a whole branch of dead assembly code that is
therefore also removed.
2011-05-24 14:50:19 -04:00
Ronald S. Bultje
aaca69c130
swscale: remove swScale_{c,MMX,MMX2} duplication.
2011-05-24 14:50:15 -04:00
Ronald S. Bultje
c4fd283a46
swscale: use emms_c().
2011-05-24 14:48:49 -04:00
Ronald S. Bultje
b9eb2136af
swscale: remove dead macro WRITEBGR24OLD.
2011-05-24 10:46:40 -04:00
Ronald S. Bultje
1dd4f4be5a
swscale: remove AMD3DNOW "optimizations".
...
The functions are identical to their MMX counterparts. Thus,
pretending that swscale is highly optimized for AMD3DNOW
extensions is a poorly executed practical joke at best.
2011-05-24 10:19:41 -04:00
Ronald S. Bultje
11ffefefdb
swscale: remove duplicated x86/ functions.
2011-05-24 10:11:26 -04:00
Ronald S. Bultje
e66149e714
swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*.
2011-05-24 10:03:26 -04:00
Ronald S. Bultje
c8f487deae
swscale: fix YUV420P 9/10bit support.
...
Fix handling of input if not in native endianness, and add support for
9/10-bit output. This allows us to force endianness of YUV420P 9/10bit
in the H264/10bit fate tests, which should fix them on big-endian
systems.
2011-05-11 19:15:14 -04:00
Janne Grunau
7f2ae5c7af
swscale: fix compilation with --enable-runtime-cpudetect
2011-04-15 09:07:37 +02:00
Luca Barbato
6216fc70b7
swscale: simplify rgb2rgb templating
...
MMX is always built. Drop the ifdefs
2011-04-14 22:16:47 +02:00
Josh Allmann
735bf19511
swscale: further cleanup swscale.c
...
Move x86-specific constants out of swscale.c
2011-04-14 22:16:47 +02:00
Luca Barbato
86330b4c92
swscale: partially move the arch specific code left
...
PPC and x86 code is split off from swscale_template.c. Lots of code is
still duplicated and should be removed later.
Again uniformize the init system to be more similar to the dsputil one.
Unset h*scale_fast in the x86 init in order to make the output
consistent with the previous status. Thanks to Josh for spotting it.
2011-04-14 22:16:47 +02:00
Luca Barbato
c003832883
swscale: move away x86 specific code from rgb2rgb
...
Keep only the plain C code in the main rgb2rgb.c and move the x86
specific optimizations to x86/rgb2rgb.c
Change the initialization pattern a little so some of it can be
factorized to behave more like dsputils.
2011-04-14 22:16:47 +02:00
Diego Biurrun
db46be01ec
Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().
...
When HAVE_7REGS was not defined these functions had an empty body
causing the following warnings during compilation.
In file included from libswscale/x86/yuv2rgb_mmx.c:58:
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in function returning non-void
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in function returning non-void
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-11 14:18:48 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Janne Grunau
2c3589bfda
consolidate .gitignore patters into a single file
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Janne Grunau
348b8218f7
convert svn:ignore properties to .gitignore files
...
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Diego Biurrun
870a6f4044
Rename yuv2rgb_template2.c --> yuv2rgb_template.c now that the other is gone.
...
Originally committed as revision 31279 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-30 08:44:05 +00:00
Diego Biurrun
531f97b0c3
Remove GPL-licensed YUV to RGB MMX routines.
...
We now have an LGPL replacement that is at least equally fast.
Originally committed as revision 31278 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-30 08:31:23 +00:00
Loren Merritt
8a26b2c665
13% faster yuv420 to rgb15 mmx.
...
It is now faster than the old gpl version on conroe.
Originally committed as revision 31181 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 13:31:11 +00:00
Loren Merritt
bffc36e084
40% faster yuv420 to rgb24 mmx.
...
It is now faster than the old gpl version on conroe.
Originally committed as revision 31180 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-19 08:21:56 +00:00
Diego Biurrun
f4ea7c8911
alternative LGPL-licensed, MMX-optimized YUV to RGB conversion routines
...
written by Kostya Shishkov
Originally committed as revision 31135 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-05-04 09:11:01 +00:00
Zuxy Meng
a959e24780
Const correctness for src pointer. Remove all constness related warnings in
...
libswscale.
Originally committed as revision 30306 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-15 08:51:51 +00:00
David Conrad
28b2866f45
/nop is illegal with Apple's older version of gas, this was fixed elsewhere
...
but not here since it was unused before now.
Originally committed as revision 30289 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-12 19:03:09 +00:00
Zuxy Meng
845e37e770
Make sure that sfence is used after any non temporal stores.
...
Originally committed as revision 30287 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-12 02:34:33 +00:00
Zuxy Meng
52c0fcaf52
Avoid redefinition of RGB_PLANAR2PACKED24 as the template is included for
...
multiple times.
Originally committed as revision 30273 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-11 08:21:31 +00:00
Zuxy Meng
23b0072ad7
MMX(2) accelerated yuv420->rgb24 routine, trivial as essentially as it just
...
swaps R and B inputs for the existing yuv420->bgr24 routine.
Originally committed as revision 30254 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-09 17:20:49 +00:00
Zuxy Meng
bb34acd8a4
Remove const to avoid a bunch of GCC warnings against discarded qualifiers and
...
incompatible pointer type.
Originally committed as revision 30234 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2010-01-07 07:13:18 +00:00
Ramiro Polla
dd68318cee
Cosmetics:
...
- Place curly brackets in the same line as while/for/if/switch/else/do;
- Place curly brackets at column 0 in the next line starting a function.
Originally committed as revision 29523 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-16 21:11:28 +00:00
Peter Schlaile
562f685307
BGR32 MMX special convertor.
...
Patch by Peter Schlaile < peter at schlaile dot de >
Originally committed as revision 29515 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-08-14 02:15:28 +00:00
Ramiro Polla
befa8e665c
Move yuv2rgb code to subdirs.
...
Originally committed as revision 29063 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
2009-03-26 01:30:10 +00:00