Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-02swscale/utils: Fix invalid left shifts of negative numbersAndreas Rheinhardt
Affected the FATE-tests vsynth_lena-dv-411, vsynth1-dv-411, vsynth2-dv-411 and hevc-paramchange-yuv420p.yuv420p10. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e2646e23be69bdef1e41d4decee1a4298701b8d1) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-02swscale/x86/swscale: Fix undefined left shifts of negative numbersAndreas Rheinhardt
This affected many FATE-tests: The number of failing tests went down from 663 to 344. (Both numbers exclude tests that failed because of unaligned accesses in code that is inside #if HAVE_FAST_UNALIGNED.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 736c7c20e7819811dc59f43490563789b192eb6e) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01swscale/yuv2rgb: Fix vertical dither offset with slicesMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit be3c29e3795cb2499e3b96335286d6a8423c0bcf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-01swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of ↵Michael Niedermayer
range input Fixes: signed integer overflow: 1169365504 + 981452800 cannot be represented in type 'int' Fixes: ticket8293 Found-by: Suhwan Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e057e83a4ff4c0eeeb78dffe58e21af951c056b6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-01swscale/output: Fix integer overflow in alpha computation in ↵Michael Niedermayer
yuv2gbrp16_full_X_c() Fixes: signed integer overflow: 524280 * 4432 cannot be represented in type 'int' Fixes: ticket8322 Found-by: Suhwan Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 49ba1879add99d3f64d70d34fb0255c8a49d4b28) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-01swscale/input: Fix several invalid shifts related to rgb2yuv constantsMichael Niedermayer
Fixes: Invalid shifts Fixes: #8140 Fixes: #8146 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit d48e510124d0fea24e2ec27271687c92e4428a18) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-01swscale/output: Fix several invalid shifts in yuv2rgb_full_1_c_template()Michael Niedermayer
Fixes: Invalid shifts Fixes: #8320 Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7b7f97532b2ac8836d8d8e3c71dd026e35ae1ca7) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-01swscale/swscale: Fix several invalid shifts related to vChrDropMichael Niedermayer
Fixes: Invalid shifts Fixes: #8166 Fixes: filter-crop_scale_vflip FATE-test Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a6ca22c11834c0ff075592e3f051d41068c407db) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-11swscale/tests/swscale: Lengthen pixfmt name buffer to 21 bytesMichael Niedermayer
Some formats use longer names than 12. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 9d269301f017657c3ae2e95a411317640acd39a8) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-11libswcale: Fix possible string overflow in test.Adam Richter
In libswcale/tests/swcale.c, the function fileTest() calls sscanf in an argument of "%12s" on character srcStr[] and dstStr[], which are only 12 bytes. So, if the input string is 12 characters, a terminating null byte can be written past the end of these arrays. This bug was found by cppcheck. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b8ed4930618b170de57a9086e1e9892216454684) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16Bump minor versions for branching release/4.0Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-03avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm4
PSEUDOPAL pixel formats are not paletted, but carried a palette with the intention of allowing code to treat unpaletted formats as paletted. The palette simply mapped the byte values to the resulting RGB values, making it some sort of LUT for RGB conversion. It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8, GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap formats. The last one, GRAY8, is more common, but its treatment is grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming from typical Y video planes was not mapped to the correct RGB values. This cannot be fixed, because AVFrame.color_range can be freely changed at runtime, and there is nothing to ensure the pseudo palette is updated. Also, nothing actually used the PSEUDOPAL palette data, except xwdenc (trivially changed in the previous commit). All other code had to treat it as a special case, just to ignore or to propagate palette data. In conclusion, this was just a very strange old mechnaism that has no real justification to exist anymore (although it may have been nice and useful in the past). Now it's an artifact that makes the API harder to use: API users who allocate their own pixel data have to be aware that they need to allocate the palette, or FFmpeg will crash on them in _some_ situations. On top of this, there was no API to allocate the pseuo palette outside of av_frame_get_buffer(). This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes the pseudo palette optional. Nothing accesses it anymore, though if it's set, it's propagated. It's still allocated and initialized for compatibility with API users that rely on this feature. But new API users do not need to allocate it. This was an explicit goal of this patch. Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0. Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition, FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation functions manually changed to not allocating a palette.
2018-03-31arm: swscale: Only compile the rgb2yuv asm if .dn aliases are supportedMartin Storsjö
Vanilla clang supports altmacro since clang 5.0, and thus doesn't require gas-preprocessor for building the arm assembly any longer. However, the built-in assembler doesn't support .dn directives. This readds checks that were removed in d7320ca3ed10f0d, when the last usage of .dn directives within libav were removed. Alternatively, the assembly could be rewritten to not use the .dn directive, making it available to clang users. Signed-off-by: Martin Storsjö <martin@martin.st>
2018-03-24swscale/rgb2rgb : cosmetic, move shuffle_bytes func declarationMartin Vignali
move shuffle_bytes_1230, 3012, 3210 with the other shuffle_byte declaration
2018-03-24swscale/rgb : add X86 SIMD (SSSE3), for shuffle_bytes_1230, ↵Martin Vignali
shuffle_bytes_3012, shuffle_bytes_3210
2018-03-24swscale/rgb : move shuffle func shuffle_bytes_1230, shuffle_bytes_3012, ↵Martin Vignali
shuffle_bytes_3210 in order to add SIMD
2018-03-24swscale/rgb : add X86 SIMD (SSSE3) for shuffle_bytes_2103 and shuffle_bytes_0321Martin Vignali
2018-03-04swscale: Introduce a helper to identify semi-planar formatsPhilip Langdale
This cleans up the ever-more-unreadable list of semi-planar exclusions for selecting the planar copy wrapper.
2018-03-03swscale: Add p016 output support and generalise yuv420p1x to p010Philip Langdale
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.
2017-11-13Fix missing used attribute for inline assembly variablesThomas Köppe
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>
2017-11-11Merge commit '29ccc641b17afad058a5c24071ea827865a8b3a9'James Almer
* commit '29ccc641b17afad058a5c24071ea827865a8b3a9': build: Drop check for sys/mman.h in favor of mmap() check Merged-by: James Almer <jamrial@gmail.com>
2017-10-30Merge commit '0fd0d4fd0a518e30ff23972828ad7cf7f35cfb9d'James Almer
* commit '0fd0d4fd0a518e30ff23972828ad7cf7f35cfb9d': swscale-test: const correctness Merged-by: James Almer <jamrial@gmail.com>
2017-10-29lsws/yuv2rgb: Fix yuva2rgb32 on big endian hardware.Carl Eugen Hoyos
2017-10-25swscale: use dithering in DITHER_COPY only if not set -sws_dither noneMateusz
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>
2017-10-24swscale: more accurate DITHER_COPY macro for full and limited rangeMateusz
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-21Merge commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5'James Almer
* commit '07a2b155949eb267cdfc7805f42c7b3375f9c7c5': Bump major versions of all libraries A few API deprecated ~2 years ago or more are also postponed here for varying reasons. FF_API_LOWRES: Since this functionality depends on AVStream->codec, i figure the two can be removed at the same time in the next bump or so. FF_API_AVCTX_TIMEBASE: Couldn't get this one to work. Not just libavcodec but apparently also libavformat and ffmpeg.c expect AVCodecContext->time_base to be set for decoding. Upon removal some tests report a different generic stream time base (like 1/25), and others lose packet duration values. I guess it's somehow tied to the AVStream->codec clusterfuck. It can be dealt with alongside FF_API_LAVF_AVCTX in the next bump. FF_API_OLD_FILTER_OPTS_ERROR: This one is meant to remain after FF_API_OLD_FILTER_OPTS is removed. Its purpose is displaying the corrected command line using the new syntax as a suggestion as part of the error message. Merged-by: James Almer <jamrial@gmail.com>
2017-10-21Merge commit '994c4bc10751e39c7ed9f67ffd0c0dea5223daf2'James Almer
* commit '994c4bc10751e39c7ed9f67ffd0c0dea5223daf2': x86util: Port all macros to cpuflags See d5f8a642f6eb1c6e305c41dabddd0fd36ffb3f77 Merged-by: James Almer <jamrial@gmail.com>
2017-10-11Bump version for master after 3.4 branchpointn3.5-devMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11Bump minor versions for branching 3.4Michael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11build: Drop check for sys/mman.h in favor of mmap() checkDiego Biurrun
We already rely on just mmap() in other places.
2017-09-22Fix several typosLou Logan
"apix_fmts" found by Marc Péchaud. "speedloss" found by Mikhail V. Signed-off-by: Lou Logan <lou@lrcd.com>
2017-08-28swscale: Do not expand a macro with 'defined' in itDerek Buitenhuis
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>
2017-08-25utils: Do not expand a macro with 'defined' in itDerek Buitenhuis
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>
2017-08-24lsws/rgb2rgb: Add unscaled 48bit to 64bit rgb conversion.Carl Eugen Hoyos
Based on b4befca2 and 6b7849e6 by Paul B Mahol. Fixes ticket #6608.
2017-08-07libswscale: add gray9 supportPaul B Mahol
2017-08-06swscale: fix gbrap16 alpha channel issuesJames Cowgill
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>
2017-07-30sws/tests/pixdesc_query: fix use of free() instead of av_free()Clément Bœsch
Fix CID 1415949
2017-07-30sws/tests/pixdesc_query: replace rgb based pix fmts with endianess agnostic ↵Clément Bœsch
names Fixes ticket #6554
2017-07-30sws/tests/pixdesc_query: sort pixel formatsClément Bœsch
2017-07-30sws/tests/pixdesc_query: save every pix fmts in a listClément Bœsch
This will be required for the next commit.
2017-07-10build: Add feature test macros for glibc 2.19+Diego Biurrun
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.
2017-06-21build: Generalize yasm/nasm-related variable namesDiego Biurrun
None of them are specific to the YASM assembler. (Cherry-picked from libav commit 39e208f4d4756367c7cd2d581847e0c1b8a429c1) Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-05Merge commit '92db5083077a8b0f8e1050507671b456fd155125'James Almer
* commit '92db5083077a8b0f8e1050507671b456fd155125': build: Generate pkg-config files from Make and not from configure build: Store library version numbers in .version files Includes cherry-picked commits 8a34f3659371680ca523aecfd9098c28f0f809eb and ee164727dd64c199b87118917e674b17c25e0da3 to fix issues. Changes were also made to retain support for raise_major and build_suffix. Reviewed-by: ubitux Merged-by: James Almer <jamrial@gmail.com>
2017-05-03Merge commit '11a9320de54759340531177c9f2b1e31e6112cc2'Clément Bœsch
* commit '11a9320de54759340531177c9f2b1e31e6112cc2': build: Move build-system-related helper files to a separate subdirectory "ffbuild" directory name is used instead of "avbuild". Merged-by: Clément Bœsch <u@pkh.me>
2017-04-30libswscale/tests/swscale: Fix uninitialized variablesMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-26Merge commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013'Clément Bœsch
* commit 'ea7ee4b4e381e0fa731458de0cbf740430eeb013': ppc: Centralize compiler-specific altivec.h #include handling in one place Merged-by: Clément Bœsch <u@pkh.me>
2017-04-24swscale-test: const correctnessDiego Biurrun
2017-04-15swscale: Convert the check check_image_pointers helper to a macroLuca Barbato
Avoid warnings about types mismatch and make the code a little simpler.
2017-04-15swscale: Do not shift negative values directlyLuca Barbato
It is undefined in C as reported: warning: shifting a negative signed value is undefined
2017-04-15swscale: Add gbrap10 outputMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>