Michael Niedermayer
3662e49dde
sws: move RGB2YUV_SHIFT to swscale_internal.h
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d4956b0bfb
sws/input: replace hardcoded rgb2yuv coefficients by table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
353bd158f5
sws: Fix "warning: comparison of distinct pointer types lacks a cast"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4eb93bed4e
swscale: GBRP output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Michael Niedermayer
61884d1985
sws: GBRP output support
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
89afa635bf
sws: check that dither array is not null before memset
...
Fixes null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8045c0167d
sws: Only reset dither state for bitexact mode
...
the output looks better with a random initial state than
all 0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
646ade7679
sws: Support error diffusion dither for mono output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c77eb4ee90
sws: fix warning: cast from pointer to integer of different size
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
aa9507cc3d
swscale: fix warning: assignment from incompatible pointer type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
511cf612ac
miscellaneous typo fixes
12 years ago
Michael Niedermayer
320ae9fb78
sws_scale: check input against NULL
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4d2f1d8c93
swscale.c:remove fill_plane9or10() use fillPlane16()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
26b5ad2543
swscale: support gray to 9bit and 10bit formats
...
With the input of Kostya and Ronald.
12 years ago
Michael Niedermayer
7a32ab5ed0
sws: get rid of C99 signed overflows try #2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3ee8eefbf2
sws: avoid signed C99 overflows
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
a291345b1e
sws: do not use av_pix_fmt_descriptors directly
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
0a7068fa5d
sws: do not use av_pix_fmt_descriptors directly.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Michael Niedermayer
115e291b53
swscale: move main swscale wraper to swscale.c
...
It never belonged to swscale_unscaled.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
db436b17e9
swscale: change assert() to av_assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0ed0f2e566
sws: revert: "swscale: Remove two bogus asserts"
...
Also change them to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
b9141aa346
swscale: Remove two bogus asserts
12 years ago
Diego Biurrun
1169f0d0af
x86: more specific checks for availability of required assembly capabilities
12 years ago
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
12 years ago
Michael Niedermayer
afe6f337ad
swscale.c: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
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
Ronald S. Bultje
8e5d71d110
swscale: bury one more piece of inline asm under HAVE_INLINE_ASM.
12 years ago
Ronald S. Bultje
3b175384bb
swscale: add missing HAVE_INLINE_ASM check.
...
The function called in this block is under HAVE_INLINE_ASM itself also.
12 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
Diego Biurrun
ef0ee7f657
swscale: K&R formatting cosmetics (part II)
...
Also adjust some comments including wording and typo fixes.
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
491865b57d
swscale: fix underflows in firstline calculations for extreme resizes.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Diego Biurrun
92fed11352
swscale: Remove unused variable alpMmxFilter.
13 years ago
Ronald S. Bultje
c0b87359b2
swscale: handle gray16 as a "planar" YUV format (Y-only, of course).
...
This allows removing any gray16-specific code, which is essentially
identical to the per-plane code in yuv2plane*().
13 years ago
Ronald S. Bultje
9d9c846491
swscale: use yuv2packed1() functions for unscaled chroma also.
13 years ago
Ronald S. Bultje
2144941069
swscale: split C output functions into separate file.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
2dd7a1c030
swscale: Split C input functions into separate file.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Ronald S. Bultje
f5490fbe3b
swscale: remove obsolete comment.
13 years ago
Paul B Mahol
08d8029ea8
swscale: more generic check for planar destination formats with alpha
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Paul B Mahol
762311ff94
swscale: fix conversion into yuva444p from non-alpha formats
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bc11580007
sws: Remove unneeded YUV cliping from yuv2rgb_X_c_template()
...
This should slightly improve speed.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0644cabd7a
sws: Move yuv2rgb clipping into the tables.
...
This fixes some cases where the clipping was entirely missing.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Thanks (for the comments and review) -to: Reimar, beastd, Ronald
13 years ago
Michael Niedermayer
5ab6f0fe5a
Revert "swscale: fix integer overflows in RGB pixel writing."
...
This reverts commit 77d88b872d
.
The revert fixes actual overflows and a segfault as the variables
are signed and can be negative.
Conflicts:
libswscale/swscale.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
5cad970971
swscale: RGB4444 and BGR444 input
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
2ba65879b5
swscale: remove unused U/V arguments from yuv2rgb_write().
...
Also document the function somewhat.
13 years ago
Ronald S. Bultje
6b3995ccd1
swscale: remove obsolete comment.
13 years ago
Ronald S. Bultje
9ea3501d87
swscale: don't show full-chroma-int warning for non-RGB output.
...
Non-RGB output always uses full chroma interpolation.
13 years ago
Ronald S. Bultje
d49352c7cc
swscale: fix overflows in vertical scaling at top/bottom edges.
...
This fixes integer multiplication overflows in RGB48 output
(vertical) scaling as detected by IOC. What happens is that for
certain types of filters (lanczos, spline, bicubic), the
intermediate sum of coefficients in the middle of a filter can
be larger than the fixed-point equivalent of 1.0, even if the
final sum is 1.0. This is fine and we support that.
However, at frame edges, initFilter() will merge the coefficients
for the off-screen pixels into the top or bottom pixel, such as
to emulate edge extension. This means that suddenly, a single
coefficient can be larger than the fixed-point equivalent of
1.0, which the vertical scaling routines do not support.
Therefore, remove the merging of coefficients for edges for
the vertical scaling filter, and instead add edge detection
to the scaler itself so that it copies the pointers (not data)
for the edges (i.e. it uses line[0] for line[-1] as well), so
that a single coefficient is never larger than the fixed-point
equivalent of 1.0.
13 years ago