Ronald S. Bultje
f1e0b90c64
swscale: use standard clipping functions.
...
This generates better code on some non-x86 architectures.
14 years ago
Ronald S. Bultje
e458b53605
swscale: merge macros that are used only once.
...
This reduces source code size without affecting the binary.
14 years ago
Ronald S. Bultje
6e5a8d3c9a
swscale: fix function declarations in swscale.c.
...
Remove inline keyword from functions that are never inlined.
Use av_always_inline for functions that should be force-inlined
for performance reasons. Use av_cold for init functions.
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
9d84dfce93
swscale: remove unused function.
...
Use of this wrapper was removed in a previous patch, but I
forgot to actually remove the function itself.
14 years ago
Ronald S. Bultje
edeb56fa31
swscale: remove duplicate conversion routine in swScale().
14 years ago
Ronald S. Bultje
b73fe70025
swscale: add yuv2planar/packed function typedefs.
14 years ago
Ronald S. Bultje
df91d09174
swscale: integrate yuv2nv12X_C into yuv2yuvX() function pointers.
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
b3b28b080f
swscale: cosmetics.
14 years ago
Ronald S. Bultje
ea28175312
swscale: remove alp/chr/lumSrcOffset.
...
They are hacks added to reuse the same scaling function for
different formats and they may cause problems when SIMD
implementation of the same functions are used along with pure
C functions.
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
6af2801088
swscale: split swscale.c in unscaled and generic conversion routines.
...
This duplicates the function fillPlane().
14 years ago
Ronald S. Bultje
2762ee3034
swscale: cosmetics.
...
Remove duplicate "inC" and "_c" functions that do the same thing;
give each function that handles data and acts as a function pointer
a "_c" suffix; remove "_c" suffix from functions that are inherently
not optimizable. Remove inline keyword from functions that are only
used through function pointers.
14 years ago
Ronald S. Bultje
1674bd2abe
swscale: integrate (literally) swscale_template.c in swscale.c.
14 years ago
Ronald S. Bultje
983260b0a4
swscale: split out x86/swscale_template.c from swscale.c.
14 years ago
Ronald S. Bultje
075d0ae72c
swscale: enable hScale_altivec_real.
14 years ago
Ronald S. Bultje
67d80a5421
swscale: split out ppc _template.c files from main swscale.c.
14 years ago
Ronald S. Bultje
a3e9bb5dee
swscale: remove indirections in ppc/swscale_template.c.
14 years ago
Ronald S. Bultje
0e5d31b16b
swscale: split out unscaled altivec YUV converters in their own file.
14 years ago
Ronald S. Bultje
0d793db1b0
swscale: remove unused COMPILE_TEMPLATE_ALTIVEC.
14 years ago
Ronald S. Bultje
808d8ff6bb
swscale: allocate larger buffer to handle altivec overreads.
...
Altivec sws code intentionally overreads buffers for better performance,
so we need to allocate larger buffers to handle that.
14 years ago
Diego Biurrun
f635a233e3
swscale: Remove unused variable.
14 years ago
Diego Biurrun
06b5facd4b
swscale: Remove disabled code.
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
389e2000eb
swscale: delay allocation of formatConvBuffer().
...
That means it won't be allocated when not needed. Alongside
this, it fixes valgrind/fate-detected memory leaks.
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
93681fbd50
swscale: fix compile on ppc.
14 years ago
Ronald S. Bultje
e758573a88
swscale: fix compile on x86-32.
14 years ago
Ronald S. Bultje
48520772d9
swscale: use av_clip_uint8() in yuv2yuv1_c().
14 years ago
Ronald S. Bultje
0f4eb8b043
swscale: remove VOF/VOFW.
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
Ronald S. Bultje
69645c021a
swscale: replace formatConvBuffer[VOF] by allocated array.
...
This allows to convert between formats of arbitrary width,
regardless of the value of VOF/VOFW.
14 years ago
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.
14 years ago
Ronald S. Bultje
836b82e3c9
swscale: reindent h[cy]scale_fast() and updateDitherTables().
14 years ago
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.
14 years ago
Ronald S. Bultje
71d9c33c86
swscale: remove duplicate mmx/mmx2 functions if they are identical.
14 years ago
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.
14 years ago
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.
14 years ago
Ronald S. Bultje
2159a24573
swscale: remove if(accurate_rnd) branch from functions.
14 years ago
Anton Khirnov
c7a973e44a
swscale: revive SWS_CPU_CAPS until next major bump.
14 years ago
Diego Biurrun
0093199184
swscale: Remove commented-out printf cruft.
14 years ago
Diego Biurrun
6f7a280ead
swscale: Remove orphaned, commented-out function declaration.
14 years ago
Michael Niedermayer
7dc303a60e
swscale: Eliminate rgb24toyv12_c() duplication.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago