Paul B Mahol
5c057433cc
libswscale: GBRAP input & output and GBRAP16 input support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
41ebb64511
swscale/output: fix alpha scale in the new functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a4b5e45e2b
sws/output: add yuv2rgb_full_1_c_template()
...
7500->4500 cycles on sandybridge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9204a7dc8e
sws/output: add +yuv2rgb_full_2_c_template()
...
8100 cycles -> 5800 cycles on sandybridge
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
662664551c
sws/output: factor yuv2rgb_write_full() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d6d5ef5534
sws: GBRP9, GBRP10, and GBRP16 output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
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
e4033d89f1
sws: GBRP9, GBRP10 GBRP12 GBRP14 output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
5c42078b99
sws: fix ED mono dither black level
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ca447592b1
sws: rgb/bgr 4/8 error diffusion dither
...
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
822d10e7c5
swscale: fix 12 and 14 bit YUV planar output with scaling.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
14de55784d
sws/output: use unsigned variables where harmless overflows are expected.
...
signed overflow is undefined in C ...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
5a6e3c039c
swscale: Mark all init functions as av_cold
13 years ago
Michael Niedermayer
22a279539e
yuv2rgb: implement 15/16bit ordered dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bdf28d14f2
sws: extend dither tables by 1 line so simpler arithmetic can be used to address the next line
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
3be0c86b97
sws: remove cliping in yuv2rgb code.
...
This code should not be needed and it slows things down.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
7f77e9041a
swscale: clip before assigning tables in RGB output functions.
13 years ago
Ronald S. Bultje
4860625236
swscale: fix off-by-one in second coefficient in bilinear filters.
...
If coefficient A is 12-bits xixed-point number "X", then the other
coefficient is (1 << 12) - X, not (1 << 12) - X - 1.
13 years ago
Ronald S. Bultje
9206ac80a5
swscale: handle last pixel if lines have an odd width.
...
Fixes bug 270.
13 years ago
Ronald S. Bultje
bc0bdda77b
swscale: handle complete dimensions for monoblack/white.
...
Fixes bug 269.
13 years ago
Ronald S. Bultje
9487fb4dea
swscale: clip unscaled output intermediates.
...
Fixes bug 240, as well as several integer overflows (visible as glitches)
in other scaling output routines, e.g. YUV422.
13 years ago
Michael Niedermayer
4a9f466b99
Fix alpha overflow when converting from RGBA64 to RGBA.
...
Fixes converting the sample from ticket #503 to 32bit RGB.
13 years ago
Ronald S. Bultje
25c42234a9
swscale: make monowhite/black RGB-independent.
...
Disadvantage is that it no longer allows modifying brightness through
adjustment of the RGB lookup table. Advantage is that now monowhite/black
no longer need to be identified as a RGB format.
13 years ago
Michael Niedermayer
94bc672489
swscale: yuv2422_2_c_template() add cliping.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f03a029939
swscale: Add cliping to yuv2422_1_c_template()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ef96bf294d
swscale: Fix rounding in yuv2mono_1_c_template()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c0c32a3704
swscale: Fix rounding in yuv2rgb_1_c_template()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2bc610ddc5
swscale: yuv2422_1_c_template: fix rounding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
7331b6e718
Drop some completely unnecessary av_unused attributes.
13 years ago
Ronald S. Bultje
3cac475655
swscale: move YUV2PACKED16WRAPPER() macro down to where it is used.
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
d63b7d8c37
swscale: fix incorrect chroma bias in yuv2rgb48_1_c().
13 years ago
Ronald S. Bultje
1ca7dc60d2
swscale: fix invalid memory accesses in yuvpacked1() functions.
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