Michael Niedermayer
15b4f6449d
swscale: fix mono input for width%8
...
Fixes ticket193
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Janne Grunau
3636e791ec
swscale: use SwsContext for av_log when available
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
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
4e05830205
swscale: remove misplaced comment.
...
The comment should have been placed only in
yuv2rgb48_X_c_template, not yuv2rgb48_1_c_template.
14 years ago
Ronald S. Bultje
9f63211175
swscale: split out RGB48 output functions from yuv2packed[12X]_c().
...
This is part of the Great Evil Plan to simplify swscale. Note that
you'll see some code duplication between the output functions for
different RGB variants, and even between packed-YUV and RGB
variants. This is intentional because it improves readability.
14 years ago
Michael Niedermayer
0af8a71d66
swscale: fix JPEG-range YUV scaling artifacts.
...
YUV planes were marked as uint16_t, but they contained signed data.
Fixes issue 1108 and 675.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
103278f7b0
libavutil/swscale: YUV444P10/YUV444P9 support.
...
Also add missing glue code for recently added YUV422P10 formats
to swscale.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
af2faf2076
swscale: split YUYV output out of yuv2packed[12X]_c().
...
This is part of the Great Evil Plan to simplify swscale.
14 years ago
Ronald S. Bultje
6b105e3ee6
swscale: extract monowhite/black output from yuv2packed[12X]_c().
...
This is part of the Great Evil Plan to simplify swscale.
14 years ago
Ronald S. Bultje
6d4d483eee
swscale: de-macro'ify RGB15/16/32 input functions.
...
Inline functions are easier to read, maintain, modify and test,
which justifies the slightly increased source size. This patch
also adds support for non-native endianness RGB15/16 and fixes
isSupportedOutput() to no longer claim that we support writing
non-native RGB565/555/444.
14 years ago
Ronald S. Bultje
e2babb9b47
swscale: rearrange code.
...
This way the code in the file is less cluttered all-over-the-
place.
14 years ago
Ronald S. Bultje
dbd3183935
swscale: change 48bit RGB input macros to inline functions.
...
Inline functions are slightly larger in source code, but
are easier to handle in source code editors. The binary code
generated is the same.
14 years ago
Ronald S. Bultje
f30ee65700
swscale: change 9/10bit YUV input macros to inline functions.
...
Inline functions are slightly larger in source code, but
are easier to handle in source code editors. The binary code
generated is the same.
14 years ago
Ronald S. Bultje
aa39f5f6d6
swscale: extract gray16 output functions from yuv2packed[12X]().
...
This is part of the Great Evil Plan to simplify swscale.
14 years ago
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
Michael Niedermayer
7a8228c05e
sws: make dither_scale const
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
ba91bf58cd
swscale: override the lack of the accurate rounding flag when needed for dither.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
ec4207c46a
swscale: factor should_dither out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Baptiste Coudurier
5aa70309ad
In libswscale, use all lines when converting from 422p to rgb with mmx, improve quality.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Stefano Sabatini
b932eb1be6
swscale: reintroduce sws_format_name() symbol
...
Reintroduce the internal symbol which was removed in:
commit e1197b9e17
Author: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Date: Sun May 29 17:57:40 2011 +0200
swscale: remove sws_format_name()
Use av_get_pix_fmt_name() instead.
The symbol is used by some external libs (hi libx264!), this gives
time to them to use the recently added av_get_pix_fmt_name() rather
than an internal symbol.
14 years ago
Michael Niedermayer
6713989c23
swscale: dither for planar yuv outputs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
877f76ad33
swscale: Fix use of uninitialized values
...
(bug probably introduced from a marge of libav)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Reimar Döffinger
3c194f390f
Replace "vector const" by "const vector" otherwise gcc 4.6.0 fails.
...
Given that this compiles fine with the Apple compiler that is probably
a gcc bug, but "const vector" is nicer anyway.
14 years ago
Stefano Sabatini
eb5a3ab7b0
swscale: fix compilation of bfin due to missing pixdesc.h header
...
This is required after sws_format_name() was replaced by
av_get_pix_fmt(), which is declared in libavutil/pixdesc.h.
14 years ago
Michael Niedermayer
201549d1a9
swscale: More accurate rounding in YSCALE_YUV_2_PACKEDX_FULL_C()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago