summaryrefslogtreecommitdiff
path: root/libswscale
Commit message (Collapse)AuthorAgeFilesLines
* swscale: aarch64: Fix yuv2rgb with negative stridesrelease/3.2Martin Storsjö2022-11-041-4/+4
| | | | | | | | | | | | | | | | Treat the 32 bit stride registers as signed. Alternatively, we could make the stride arguments ptrdiff_t instead of int, and changing all of the assembly to operate on these registers with their full 64 bit width, but that's a much larger and more intrusive change (and risks missing some operation, which would clamp the intermediates to 32 bit still). Fixes: https://trac.ffmpeg.org/ticket/9985 Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit cb803a0072cb98945dcd3f1660bd2a975650ce42) Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale/alphablend: Fix slice handlingMichael Niedermayer2021-10-091-15/+17
| | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 06d67265881249566f385309e2fb5a9449720b6e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/slice: Fix wrong return on errorMichael Niedermayer2021-10-091-1/+3
| | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7874d40f10cca922797a8da14189a53ee52f0156) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/slice: Check slice for allocation failureMichael Niedermayer2021-10-091-1/+2
| | | | | | | | | | Fixes: null pointer dereference Fixes: alloc_slice.mp4 Found-by: Rafael Dutra <rafael.dutra@cispa.de> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 997f9cfc1295769be8d3180860ceebbc16f59069) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Fix invalid left shifts of negative numbersAndreas Rheinhardt2020-07-031-1/+1
| | | | | | | | | | 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>
* swscale/x86/swscale: Fix undefined left shifts of negative numbersAndreas Rheinhardt2020-07-031-2/+2
| | | | | | | | | | | 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>
* swscale/yuv2rgb: Fix vertical dither offset with slicesMichael Niedermayer2020-07-011-21/+22
| | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit be3c29e3795cb2499e3b96335286d6a8423c0bcf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of ↵Michael Niedermayer2020-07-011-3/+3
| | | | | | | | | | | | 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>
* swscale/input: Fix several invalid shifts related to rgb2yuv constantsMichael Niedermayer2020-07-011-4/+4
| | | | | | | | | | 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>
* swscale/output: Fix several invalid shifts in yuv2rgb_full_1_c_template()Michael Niedermayer2020-07-011-4/+4
| | | | | | | | | | 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>
* swscale/swscale: Fix several invalid shifts related to vChrDropMichael Niedermayer2020-07-011-2/+2
| | | | | | | | | | | 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>
* libswcale: Fix possible string overflow in test.Adam Richter2019-05-131-2/+2
| | | | | | | | | | | | | 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>
* libswscale/tests/swscale: Fix uninitialized variablesMichael Niedermayer2017-05-141-2/+2
| | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 7796f290653349a4126f2d448d11bb4440b9f257) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: save ebx register when it is not availableAndreas Cadhalpun2017-01-261-10/+10
| | | | | | | | | | | | | | | | Configure checks if the ebx register can be used for asm and it has to be saved if and only if this is not the case. Without this the build fails when configuring with --toolchain=hardened --disable-pic on i386 using gcc 4.8: error: PIC register clobbered by '%ebx' in 'asm' In that case gcc 4.8 reserves the ebx register for the GOT needed for PIE, so it can't be used in asm directly. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit 319438e2f206036ee0cddf401dd50f3b2a3ae117) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* swscale/swscale: Fix dereference of stride array before null checkMichael Niedermayer2017-01-261-4/+7
| | | | | | | | | Fixes: CID1396263 Fixes: CID1396271 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 03ce71e4a1187340720e1569ac96c285c145a1f7) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "Bump minor versions after 3.2 branchpoint to seperate release"Michael Niedermayer2016-10-261-1/+1
| | | | | | this should only have been on master This reverts commit 1609935b6cbe3fb77f27257cabefbee3f7118dc3.
* Bump minor versions after 3.2 branchpoint to seperate releaseMichael Niedermayer2016-10-261-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions for 3.2Michael Niedermayer2016-10-261-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: fix for sliced scaling artifactsPedro Arthur2016-09-161-2/+2
| | | | Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* swscale: Fix "warning: ISO C90 forbids mixed declarations and code"Michael Niedermayer2016-09-071-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add unscaled conversion from yuv420p to p010Timo Rothenpieler2016-09-061-0/+57
|
* swscale/swscale_unscaled: Try to fix bayer_to_yv12_wrapper() with slicesMichael Niedermayer2016-09-031-4/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale_unscaled: Try to fix Rgb16ToPlanarRgb16Wrapper() with slicesMichael Niedermayer2016-09-031-0/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add unscaled copy from yuv420p10 to p010Timo Rothenpieler2016-09-031-0/+44
|
* swscale/swscale_unscaled: Fix packed_16bpc_bswap() with slicesMichael Niedermayer2016-09-021-0/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale: Try to fix rgb48Toxyz12() with slicesMichael Niedermayer2016-09-021-1/+7
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale: Factor bottom to top handlingMichael Niedermayer2016-09-021-32/+19
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/tests/swscale: add cpuflags optionMichael Niedermayer2016-09-021-0/+9
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: add support for P010LE/BE outputTimo Rothenpieler2016-08-313-5/+101
|
* swscale/output: Fix rounding offset in yuv2gbrp_full_X_c()Michael Niedermayer2016-08-231-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doxygen: Standardize root-level modulesTimothy Gu2016-08-021-1/+3
|
* Revert "PPC64: Add versions of functions in libswscale/input.c optimized for ↵Ronald S. Bultje2016-07-114-442/+0
| | | | | | | POWER8 VSX SIMD." This reverts commit 1df908f33f658979b32599489ca6f1a39821013c. The expected performance improvements are essentially non-existent.
* PPC64: Add versions of functions in libswscale/input.c optimized for POWER8 ↵Dan Parrot2016-06-304-0/+442
| | | | | | | | | | VSX SIMD. This patch addresses Trac ticket #5570. The optimized functions are in file libswscale/ppc/input_vsx.c. Each optimized function name is a concatenation of the corresponding name in libswscale/input.c with suffix _vsx. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '535a742c2695a9e0c586b50d7fa76e318232ff24'Matthieu Bouron2016-06-271-3/+6
|\ | | | | | | | | | | | | * commit '535a742c2695a9e0c586b50d7fa76e318232ff24': build: Change structure of the linker version script templates Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
| * build: Change structure of the linker version script templatesDiego Biurrun2016-05-291-3/+6
| | | | | | | | | | | | Split version files into one line per symbol/directive to allow compatibility with the Solaris linker without preprocessing and eliminate $ from version file templates to simplify the postprocessing shell command.
| * asm: FF_-prefix internal macros used in inline assemblyDiego Biurrun2016-05-283-447/+447
| | | | | | | | | | These warnings conflict with system macros on Solaris, producing truckloads of warnings about macro redefinition.
* | asm: FF_-prefix internal macros used in inline assemblyMatthieu Bouron2016-06-274-493/+493
| | | | | | | | See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
* | Merge commit 'dc40a70c5755bccfb1a1349639943e1f408bea50'Hendrik Leppkes2016-06-262-2/+0
|\ \ | |/ | | | | | | | | | | * commit 'dc40a70c5755bccfb1a1349639943e1f408bea50': Drop unnecessary libavutil/x86/asm.h #includes Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * Drop unnecessary libavutil/x86/asm.h #includesDiego Biurrun2016-05-282-2/+0
| |
* | Merge commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196'Clément Bœsch2016-06-223-3/+7
|\ \ | |/ | | | | | | | | | | * commit 'a6a750c7ef240b72ce01e9653343a0ddf247d196': tests: Move all test programs to a subdirectory Merged-by: Clément Bœsch <clement@stupeflix.com>
| * tests: Move all test programs to a subdirectoryDiego Biurrun2016-05-133-3/+7
| |
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-215-71/+71
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-046-72/+72
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '0f40c9098498ad90dbbd2380eb4269015e84bde4'Clément Bœsch2016-06-211-1/+0
|\ \ | |/ | | | | | | | | | | * commit '0f40c9098498ad90dbbd2380eb4269015e84bde4': Drop pointless assert.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Drop pointless assert.h #includesDiego Biurrun2016-05-033-3/+0
| |
* | swscale: add input support for gbrap10 pixel formatPaul B Mahol2016-06-102-0/+12
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | swscale: fix ring buffer size when scaling slices of a framePedro Arthur2016-06-102-6/+51
| | | | | | | | | | The ring buffer size should be able to store input lines when there is not enough lines to output a single line.
* | swscale: fix crash with swscale-test when using slicesPedro Arthur2016-06-101-2/+2
| |
* | Merge commit '01621202aad7e27b2a05c71d9ad7a19dfcbe17ec'Derek Buitenhuis2016-05-091-3/+3
|\ \ | |/ | | | | | | | | | | * commit '01621202aad7e27b2a05c71d9ad7a19dfcbe17ec': build: miscellaneous cosmetics Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * build: miscellaneous cosmeticsDiego Biurrun2016-04-071-8/+8
| | | | | | | | | | | | Restore alphabetical order in lists, break overly long lines, do some prettyprinting, add some explanatory section comments, group parts together that belong together logically.