Michael Niedermayer
646ade7679
sws: Support error diffusion dither for mono output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
70c25c6205
sws: move fillPlane16() to header so it can be used from more than 1 place
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
89d2f014bc
sws_unscaled: drop fill_plane9or10()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
65e0a3ccd8
sws: fix BE/LE handling for fillPlane16()
...
Based on fill_plane9or10() by luca barbato
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
6c87b2be72
swscale_unscaled: remove unused variables
...
Fixes CID739472
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
a805cefd8b
swscale: avoid pointless use of compound literals
...
Some compilers (e.g. old gcc) have trouble with these.
Signed-off-by: Mans Rullgard <mans@mansr.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
015b805d13
sws: drop unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Reimar Döffinger
118bd609f0
Optimized unscaled yuvp9/yuvp10 -> yuvp16 conversion.
...
About 30% faster on 32 bit Atom, 120% faster on 64 bit Phenom2.
This is interesting because supporting P16 is easier in e.g.
OpenGL (can misuse support for any 2-component 8 bit format),
whereas supporting p9/p10 without conversion needs a texture
format with at least 14 bits actual precision.
The shiftonly == 0 case is not optimized since the code is more
complex and the speed gain less obvious.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Paul B Mahol
6b7849e6da
swscale: unscaled rgba64->rgb48
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
b4befca23e
swscale: unscaled rgba64->bgr48
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
9d8eac6899
swscale: simplify unscaled rgb48<->bgr48
...
Using av_bswap16 should be enough.
13 years ago
Michael Niedermayer
21d8255423
sws: handle non native rgb<->rgb convertions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
809d71d650
sws/swscale_unscaled: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
1d69dcb887
swscale: unscaled rgb48 <-> bgr48
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
02827a3c99
swscale: RGBA64LE <-> RGBA64BE support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Hans-Kristian Arntzen
b991b300f2
Unscaled Planar RGB -> RGB support in swscale.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
Michael Niedermayer
1c910d2f11
sws: Fix RGB0->alpha containing formats.
...
Fixes Ticket869
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
234405315f
sws: Fix unscaled >8bit planar chroma handling.
...
Fixes Ticket840
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
657878f76e
sws: fix copy case detection with gray8a.
...
Fixes gray_alpha.png
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
0cc1a86dc3
rgb2rgb: rgb12to15()
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
e7843db3df
swscale: fix invalid conversions and memory problems.
...
Fixes problems where rgbToRgbWrapper() is called even though it doesn't
support this particular conversion (e.g. converting from RGB444 to
anything). Thirdly, fixes issues where rgbToRgbWrapper() is called for
non-native endiannness conversions (e.g. RGB555BE on a LE system).
Fourthly, fixes crashes when converting from e.g. monowhite to
monowhite, which calls planarCopyWrapper() and overwrites/reads because
n_bytes != n_pixels.
13 years ago
Paul B Mahol
f7f3563214
rgb2rgb: rgb12tobgr12()
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
ac7efd3364
sws: fix unscaled LE<->BE rgb<->bgr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
4ad40d6d9f
rgb2rgb: rgb12tobgr12()
13 years ago
Paul B Mahol
277030627d
rgb2rgb: allow conversion for <15 bpp
13 years ago
Paul B Mahol
0b8b3387a9
rgb2rgb: allow conversion for <15 bpp
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Janne Grunau
6e9bb5aa3e
swscale: prevent invalid writes in packed_16bpc_bswap
...
Writes past the end of the destination buffer were occuring when its
stride was smaller than the stride of the source. Fixes Bug #183 .
13 years ago
Nathan Adil Maxson
7b3894bee9
swscale: fix formatting and indentation of unscaled conversion routines.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Janne Grunau
b4dc68803b
swscale: add endian conversion for RGB555 and RGB444 pixel formats
...
Add a macro to shorten the if condition.
13 years ago
Janne Grunau
ed46a3d842
swscale: add rgb565 endianess conversion
13 years ago
Janne Grunau
72cb904453
swscale: add unscaled packed 16 bit per component endianess conversion
13 years ago
Ronald S. Bultje
185655c601
swscale: add support for planar RGB input.
13 years ago
John Stebbins
09d243ddd0
swscale: Fix stack alignment for SSE
...
Although gcc guarantees 16 byte stack alignment, threads under WinXP
don't appear to be guaranteed to start stack aligned. So fix the
alignment.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
6f326b5054
sws: fix:
...
libswscale/swscale_unscaled.c:915:9: warning: new qualifiers in middle of multi-level non-const cast are unsafe
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8c3ab3094b
sws: Fix:
...
libswscale/swscale_unscaled.c:805:5: warning: passing argument 1 of ‘check_image_pointers’ from incompatible pointer type
libswscale/swscale_unscaled.c:774:12: note: expected ‘uint8_t **’ but argument is of type ‘const uint8_t * const*’
libswscale/swscale_unscaled.c:809:5: warning: passing argument 1 of ‘check_image_pointers’ discards qualifiers from pointer target type
libswscale/swscale_unscaled.c:774:12: note: expected ‘uint8_t **’ but argument is of type ‘uint8_t * const*’
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0a3a125fd9
sws: update copyright dates
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b13ba5cb9a
swscale: use isByteRGB() to simplify check for palToRgbWrapper.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
307b650270
swscale: Fix packed rgb check for planarRgbToRgbWrapper.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Themaister
1e79926f9e
Unscaled Planar RGB -> RGB support in swscale.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d3d97d43d5
sws: fix warning: new qualifiers in middle of multi-level non-const cast are unsafe warning.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
cca81e7eb0
sws: gbr24p input support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
abe0b8e9f3
sws: use shift for chroma sample up convertion
...
sws: use shifts for non full range luma sample upconvertion
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
4ce0a94656
lsws: remove deprecated and unused stuff after the 0->1 major bump
13 years ago
Kostya Shishkov
42ba12888b
Do not convert RGB buffer at once when stride does not fit exact samples.
...
When converting RGB format to RGB format with the same bits per sample,
unscaled path performs conversion on the whole buffer at once. For
non-multiple-of-16 BGR24 to RGB24 conversion it means that padding at the
end of line will be converted too. Since it may be of arbitrary length
(e.g. 8 bytes), operating on the whole buffer produces obviously wrong
results.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Ronald S. Bultje
55eda370cb
swscale: clip unscaled colorspace conversion path.
...
Prevents overflows on very bright scenes when adding dither,
which may lead to black dots.
14 years ago
Diego Biurrun
96c1e6d40d
doxygen: Make sure parameter names match between .c and .h files.
14 years ago