Michael Niedermayer
705a2f70ee
swscale/slice: Fix indention
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8feeffc1d7
swscale/slice: Fix doc typo
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
e06403331c
swscale: Move Contexts used only in hscale.c into it
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
7b6e6895f2
swscale: Move VScalerContext into vscale.c
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
cc538e9dbd
swscale/utils: Detect and skip unneeded sws_setColorspaceDetails() calls
...
This avoids running various table inits unnecessarily
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8f3a9a8c27
swscale/yuv2rgb: Increase YUV2RGB table headroom
...
This makes SWS more robust
Fixes: 07650a772d98aa63b0fed6370dc89037/asan_heap-oob_27ddeaf_2657_2c81ff264dee5d9712cb3251fb9c3bbb.264
Fixes: out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
5e5f82a287
swscale/yuv2rgb: Factor YUVRGB_TABLE_LUMA_HEADROOM out
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
e8bc642202
lavu: add AV_CEIL_RSHIFT and use it in various places
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
1edf129cbc
swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny dimensions
...
Fixes Ticket4960
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Matthieu Bouron
e4e9b9454e
swscale/arm/yuv2rgb: add ff_yuv422p_to_{argb,rgba,abgr,bgra}_neon_{16,32}
9 years ago
Matthieu Bouron
44913d1945
swscale/arm/yuv2rgb: fix typo
9 years ago
Michael Niedermayer
b83d8be6bf
swscale/utils: Fix intermediate format for cascaded alpha downscaling
...
Fixes Ticket4926
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Matthieu Bouron
b32a42295a
swscale/arm/yuv2rgb: add ff_yuv420p_to_{argb,rgba,abgr,bgra}_neon_{16,32}
9 years ago
Matthieu Bouron
e0dc22b99e
swscale/arm/yuv2rgb: disable neon if accurate_rnd is enabled
...
This disables the 32bit precision neon code path in favor of the
default C one and avoids breaking fate.
9 years ago
Matthieu Bouron
c2ad248321
swscale/arm/yuv2rgb: simplify process_16px_* macro call
9 years ago
Clément Bœsch
91b4afd58d
swscale/arm/yuv2rgb: fix slicing
9 years ago
Michael Niedermayer
a066ff89bc
swscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment is insufficient for SSE*
...
This also as a sideeffect fixes the non aligned case
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
80bfce35cc
swscale/x86/rgb2rgb_template: Do not crash on misaligend stride
...
Fixes Ticket5013
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
c8905e0d67
swscale/utils: replace pow by exp2
...
exp2 is a faster function.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Matthieu Bouron
5aca33c2cf
swscale/arm: add ff_nv{12,21}_to_{argb,rgba,abgr,bgra}_neon_16
9 years ago
Michael Niedermayer
325b59368d
swscale/utils: Fix for runtime error: left shift of negative value -1
...
Fixes: c106b36fa36db8ff8f3ed0c82be7bea2/asan_heap-oob_32699f0_6321_467b9a1d7e03d7cfd310b7e65dc53bcc.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
010caed261
swscale: use AV_OPT_TYPE_BOOL for {src,dst}_range options
9 years ago
Matthieu Bouron
46feb66972
swscale/arm: add ff_nv{12,21}_to_{argb,rgba,abgr,bgra}_neon
...
Signed-off-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
Signed-off-by: Clément Bœsch <clement@stupeflix.com>
9 years ago
Andreas Cadhalpun
e8c3716064
swscale: rename sws_rgb2rgb_init to ff_sws_rgb2rgb_init
...
It is an internal swscale function and thus should not be exported.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Andreas Cadhalpun
8bfbc8c5e5
swscale: rename sws_context_class to ff_sws_context_class
...
It is an internal swscale symbol and thus should not be exported.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Ganesh Ajjanagadde
cd8a0a9a9a
swscale/swscale: add av_warn_unused_result to sws_init_context
...
This should not trigger any warnings; but adds robustness.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Pedro Arthur
5bd62a1b3c
swscale: fix ticket #4881
...
When scaling only a slice of a frame the output was written always
in the first lines leaving the rest of the frame black.
9 years ago
Ganesh Ajjanagadde
3b2000c2bf
doc/scaler, swscale/options: use proper capitalization
...
Proper names should be capitalized in all user facing API as far as
possible. The option names themselves have not been changed since:
1. We consistently keep option names in lower case.
2. Changing them would break existing scripts.
The converse is also true: improper names should not be capitalized
generally.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
26e8895b73
all: add _DEFAULT_SOURCE locally wherever needed
...
Glibc 2.20 onwards generates a deprecation warning for usage of _BSD_SOURCE and _SVID_SOURCE.
The solution from man feature_test_macros is to define both _DEFAULT_SOURCE and the old macros.
This solution is on the lines of the one in commit af1818276e
.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
9 years ago
Pedro Arthur
a8602dde5e
swscale: fix ticket #4877
9 years ago
Pedro Arthur
77367f61b3
swscale: fix ticket 4850
9 years ago
Ganesh Ajjanagadde
7cf22c7970
swscale/output: fix undefined left shifts of negative numbers
...
This fixes -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7 .
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
b4cb597900
libswscale/swscale: fix -Wunused-function
...
hyscale, hcscale are only used in old filter code, hence place
header guard to silence -Wunused-function.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
80d23d9d32
swscale/swscale: silence unused function warning
...
gamma_convert is only used with the old code. Thus, it is
placed under a header guard. This patch silences a -Wunused-function
observed on GCC 5.2.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Michael Niedermayer
0ae40c5a70
swscale/swscale: Fix "unused variable" warning
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d730dd8c53
swscale: Forward colorspace updates to the 2nd cascaded context in case of alphablend
...
The first just does the blending and wouldnt do anything with the colorspace values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
21c7272859
swscale/utils: Forward luma range to the cascaded context for alphablending
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
319898bba2
swscale/utils: handle gray+alpha formats like gray for luma ranges
...
Its illogic to handle gray differently depending on the existence of an alpha channel
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
816cf5181e
swscale/utils: If the source has no alpha then disable alpha blendaway
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
c97cd1169c
swscale: use AV_OPT_TYPE_BOOL
9 years ago
Hendrik Leppkes
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
9 years ago
Vittorio Giovara
2268db2cd0
lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
...
The new fields can be accessed directly and are more intelligible.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Pedro Arthur
3059562aa1
swscale: re-enable gamma
...
+added gamma conversion to refactored code
9 years ago
Pedro Arthur
f67aff3ad7
swscale: added proper error check for ff_init_filters
9 years ago
Michael Niedermayer
1acd6311a1
swscale/utils: If cascaded contexts are used forward sws_setColorspaceDetails() to the first context
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
8e05f9217a
swscale/utils: Split scaling if possible and yuv->yuv with different matrixes is requested
...
This uses a RGB intermediate, a more optimal solution would be to perform the rematrixing
directly in subsampled YUV, this is quite a bit more complicated though
Fixes Ticket4805
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
e88103a7f9
Bump major versions of all libraries
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
9d58639e27
sws: Drop deprecated SWS_CPU_CAPS defines
...
Deprecated in 07/2012.
9 years ago
Timothy Gu
68a9c8ac77
swscale: Silence an unused variable warning
...
Also remove a pair of extraneous ifdeffery.
9 years ago
Ganesh Ajjanagadde
eb3cfa7dd3
swscale/alphablend: fix pointer cast
...
Commit 7c72a4bbd3
was slightly wrong
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago