Martin Vignali
923a324174
swscale/rgb : add X86 SIMD (SSSE3) for shuffle_bytes_2103 and shuffle_bytes_0321
7 years ago
Philip Langdale
dd3f1e3a11
swscale: Introduce a helper to identify semi-planar formats
...
This cleans up the ever-more-unreadable list of semi-planar
exclusions for selecting the planar copy wrapper.
7 years ago
Philip Langdale
9d5aff09a7
swscale: Add p016 output support and generalise yuv420p1x to p010
...
To make the best use of existing code, I generalised the wrapper
that currently does yuv420p10 to p010 to support any mixture of
input and output sizes between 10 and 16 bits. This had the side
effect of yielding a working code path for all yuv420p1x formats
to p01x.
7 years ago
Thomas Köppe
43171a2a73
Fix missing used attribute for inline assembly variables
...
Variables used in inline assembly need to be marked with attribute((used)).
Static constants already were, via the define of DECLARE_ASM_CONST.
But DECLARE_ALIGNED does not add this attribute, and some of the variables
defined with it are const only used in inline assembly, and therefore
appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks
variables as used.
This change makes FFMPEG work with Clang's ThinLTO.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Carl Eugen Hoyos
9b0510a8e3
lsws/yuv2rgb: Fix yuva2rgb32 on big endian hardware.
7 years ago
Mateusz
50ce296026
swscale: use dithering in DITHER_COPY only if not set -sws_dither none
...
This patch uses dithering in DITHER_COPY macro only if
it was not used option '-sws_dither none'.
With option '-sws_dither none' it uses downshift.
For human eye dithering is OK, for video codecs not necessarily.
If user don't want to use dithering, we should respect that.
Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Mateusz
f192f2f061
swscale: more accurate DITHER_COPY macro for full and limited range
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
80154b1b3a
Bump version for master after 3.4 branchpoint
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
e1de9eab3a
Bump minor versions for branching 3.4
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Diego Biurrun
29ccc641b1
build: Drop check for sys/mman.h in favor of mmap() check
...
We already rely on just mmap() in other places.
7 years ago
Lou Logan
183fd30e0f
Fix several typos
...
"apix_fmts" found by Marc Péchaud.
"speedloss" found by Mikhail V.
Signed-off-by: Lou Logan <lou@lrcd.com>
7 years ago
Derek Buitenhuis
5e3f6dc701
swscale: Do not expand a macro with 'defined' in it
...
Fixes:
libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if USE_MMAP
^
libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
#define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
7 years ago
Derek Buitenhuis
add7b3bc3f
utils: Do not expand a macro with 'defined' in it
...
Fixes:
libswscale/utils.c:1632:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
#if USE_MMAP
^
libswscale/utils.c:1577:49: note: expanded from macro 'USE_MMAP'
#define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
^
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
7 years ago
Carl Eugen Hoyos
cb1a3eecac
lsws/rgb2rgb: Add unscaled 48bit to 64bit rgb conversion.
...
Based on b4befca2
and 6b7849e6
by Paul B Mahol.
Fixes ticket #6608 .
7 years ago
Paul B Mahol
de48710c11
libswscale: add gray9 support
7 years ago
James Cowgill
013ec23cbe
swscale: fix gbrap16 alpha channel issues
...
Fixes filter-pixfmts-scale test failing on big-endian systems due to
alpSrc not being cast to (const int32_t**).
Also fixes distortions in the output alpha channel values by copying the
alpha channel code from the rgba64 case found elsewhere in output.c.
Fixes ticket 6555.
Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Clément Bœsch
797c232ef8
sws/tests/pixdesc_query: fix use of free() instead of av_free()
...
Fix CID 1415949
7 years ago
Clément Bœsch
4158fba3cd
sws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic names
...
Fixes ticket #6554
7 years ago
Clément Bœsch
d2c70fc887
sws/tests/pixdesc_query: sort pixel formats
7 years ago
Clément Bœsch
ca23d3491d
sws/tests/pixdesc_query: save every pix fmts in a list
...
This will be required for the next commit.
7 years ago
Diego Biurrun
825e463a17
build: Add feature test macros for glibc 2.19+
...
glibc introduced _DEFAULT_SOURCE in version 2.19 to replace _BSD_SOURCE and
_SVID_SOURCE, which were deprecated in version 2.20. Add _DEFAULT_SOURCE
where the latter two are used to be forwards-compatible and avoid warnings
about the use of deprecated definitions.
7 years ago
Diego Biurrun
fd502f4f5f
build: Generalize yasm/nasm-related variable names
...
None of them are specific to the YASM assembler.
(Cherry-picked from libav commit 39e208f4d4
)
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Michael Niedermayer
7796f29065
libswscale/tests/swscale: Fix uninitialized variables
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Diego Biurrun
0fd0d4fd0a
swscale-test: const correctness
8 years ago
Luca Barbato
37f573543c
swscale: Convert the check check_image_pointers helper to a macro
...
Avoid warnings about types mismatch and make the code a little simpler.
8 years ago
Luca Barbato
f56fa95cd1
swscale: Do not shift negative values directly
...
It is undefined in C as reported:
warning: shifting a negative signed value is undefined
8 years ago
Michael Niedermayer
ac29b82ec5
swscale: Add gbrap10 output
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years ago
Paul B Mahol
f6a9c20a52
swscale: Add input support for gbrap10 pixel format
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Carl Eugen Hoyos
c1616b454d
lsws/utils: Make gray10 and gray12 full-scale like gray8 and gray16.
8 years ago
Michael Niedermayer
22b0daa1b3
Bump versions for master after 3.3
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
e1cc7f83df
Bump minor for 3.3
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
58b867a7cf
Bump minor versions for master after release/3.3 branchpoint
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
fc332f3e29
Bump minor versions for staring release/3.3 branch
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Clément Bœsch
99dd6fe62c
sws/tests/pixdesc_query: remove func wrappers
8 years ago
Clément Bœsch
bc7308aae8
sws: make is{RGB,BGR}inInt functions
8 years ago
Vittorio Giovara
07a2b15594
Bump major versions of all libraries
...
This disables everything that was deprecated at least 18 months ago.
Readjust the minimum API version as needed, postponing any
API-incompatible changes until the next bump.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Clément Bœsch
e811f84a2e
swscale: cosmetics in is{RGB,BGR}inInt
...
Reduce diff with Libav.
8 years ago
Clément Bœsch
d6635daded
swscale: remove unused is{RGB,BGR}inBytes
8 years ago
Clément Bœsch
ff6bc16c5a
swscale: use a (more correct) function for isPacked
8 years ago
Clément Bœsch
2b9a52bcca
swscale: use a function for isAnyRGB
8 years ago
Clément Bœsch
c30875e8b2
swscale: use a function for isBayer
8 years ago
Clément Bœsch
f052b1b40f
swscale: use a function for isGray
8 years ago
Clément Bœsch
08e1376d81
fate: add fate-sws-pixdesc-query
...
Test the pixel format querying within libswscale.
8 years ago
Diego Biurrun
994c4bc107
x86util: Port all macros to cpuflags
...
Also do some small cosmetic changes: Drop pointless _MMX suffix from ABSD2
macro name, drop pointless check for MMX support, we always assume MMX is
available in our SIMD code, fix spelling.
8 years ago
Carl Eugen Hoyos
851f4255e0
lsws/slice: Move a misplaced const.
...
Fixes a gcc warning:
libswscale/slice.c:178:56: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
8 years ago
Carl Eugen Hoyos
a9c20598b5
lsws/input: Do not define unused functions.
...
Fixes warnings like the following:
libswscale/input.c:951:13: warning: ‘planar_rgb14be_to_a’ defined but not used
8 years ago
Diego Biurrun
39e208f4d4
build: Generalize yasm/nasm-related variable names
...
None of them are specific to the YASM assembler.
8 years ago
Philip Langdale
4c2176d45b
swscale: add P016 input support
8 years ago
Diego Biurrun
5c0e2b13eb
swscale-test: const correctness for pointer variable
...
libswscale/swscale-test.c:369:20: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [-Wincompatible-pointer-types]
libswscale/swscale.h:207:5: note: expected ‘const uint8_t * const* {aka const unsigned char * const*}’ but argument is of type ‘uint8_t ** {aka unsigned char **}’
8 years ago
Michael Niedermayer
03ce71e4a1
swscale/swscale: Fix dereference of stride array before null check
...
Fixes: CID1396263
Fixes: CID1396271
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago