aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* swscale/utils: Fix chrSrcHSubSample for GBRAP16Michael Niedermayer2016-02-241-0/+1
| | | | | | | | | Fixes part of Ticket5264 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 67e5bd0c501f7568fc8d93284d0f7eb40663ab06) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Detect and skip unneeded sws_setColorspaceDetails() callsMichael Niedermayer2016-01-151-4/+18
| | | | | | | | | This avoids running various table inits unnecessarily Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit cc538e9dbd14b61d1ac8c9fa687d83289673fe90) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Use normal bilinear scaler if fast cannot be used due to tiny ↵Michael Niedermayer2016-01-151-0/+6
| | | | | | | | | | | dimensions Fixes Ticket4960 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1edf129cbc897447a289ca8b045853df5df1bab3) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Fix intermediate format for cascaded alpha downscalingMichael Niedermayer2016-01-151-0/+3
| | | | | | | | | Fixes Ticket4926 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b83d8be6bff7d645469a623aee0b380541da15cf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Fix for runtime error: left shift of negative value -1Michael Niedermayer2015-12-061-1/+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> (cherry picked from commit 325b59368dae3c3f2f5cc39873002b4cf133ccbc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: re-enable gammaPedro Arthur2015-09-041-0/+9
| | | | +added gamma conversion to refactored code
* swscale/utils: If cascaded contexts are used forward ↵Michael Niedermayer2015-08-311-3/+6
| | | | | | sws_setColorspaceDetails() to the first context Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/utils: Split scaling if possible and yuv->yuv with different ↵Michael Niedermayer2015-08-311-1/+66
| | | | | | | | | | | 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>
* swscale: refactor horizontal scalingPedro Arthur2015-08-181-1/+2
| | | | | | | + split color conversion from scaling - disabled gamma correction, until it's refactored too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/alphablend: Support chroma subsamplingMichael Niedermayer2015-08-091-15/+15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/alphablend: support packed pixel formatsMichael Niedermayer2015-08-091-11/+11
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: Implement alphablendaway for planar 4:4:4 formatsMichael Niedermayer2015-08-081-0/+101
| | | | | | Fixes Ticket4746 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: Add sws_alloc_set_opts()Michael Niedermayer2015-08-081-4/+19
| | | | | | | This simplifies allocating and initializing swscale contexts with custom options. The function is internal currently but could be moved into the public header Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: ayuv64le output supportPaul B Mahol2015-07-241-1/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* swscale: ayuv64le input supportPaul B Mahol2015-07-241-0/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* swscale/utils: Clear pix buffersMichael Niedermayer2015-07-151-3/+3
| | | | | | | | Fixes use of uninitialized memory Fixes: a96874b9466b6edc660a519c7ad47977_signal_sigsegv_7ffff713351a_744_nc_sample.avi with memlimit 2147483648 Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: implement YA8 outputPaul B Mahol2015-07-021-1/+1
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* swscale/output: Add rgba64/rgb48/bgra64/bgr48 output functions with full ↵Michael Niedermayer2015-06-171-0/+8
| | | | | | chroma interpolation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Mark vectors as NAN instead of dereferencing NULL pointers on malloc failureMichael Niedermayer2015-06-121-0/+38
| | | | | Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale: Assert that pixel format descriptor is not NULLMichael Niedermayer2015-06-121-0/+1
| | | | | | | This may help static analyzers, the pixel format is checked during initialization Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* swscale: add yuv440p10/12 pixfmts.Ronald S. Bultje2015-05-061-0/+4
|
* swscale/swscale: Get rid of the SWS_GAMMA_CORRECT flagMichael Niedermayer2015-04-231-13/+9
| | | | | | This avoids using up a bit of the public flags Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add gamma encodign/decoding before/after scaling in libswscalePedro Arthur2015-04-231-0/+76
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '7ebb3022297aa00afda6800105684b8303f2608e'Michael Niedermayer2015-03-221-8/+14
|\ | | | | | | | | | | | | * commit '7ebb3022297aa00afda6800105684b8303f2608e': swscale: Check memory allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: Check memory allocationFederico Tomassetti2015-03-211-8/+14
| | | | | | | | | | | | | | Bug-Id: CID 1267890 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | swscale/utils: Fix undefined shift in initFilter()Michael Niedermayer2015-03-111-1/+1
| | | | | | | | | | | | Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: clear formatConvBuffer on allocationMichael Niedermayer2015-02-271-1/+1
| | | | | | | | | | | | | | | | Fixes use of uninitialized memory Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: add asserts to check filterposMichael Niedermayer2015-02-241-0/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: More carefully merge and clear coefficients outside the inputMichael Niedermayer2015-02-241-5/+15
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e51f22122d23589e93ac4f0b3e570bb925755915'Michael Niedermayer2015-02-171-0/+9
|\| | | | | | | | | | | | | * commit 'e51f22122d23589e93ac4f0b3e570bb925755915': swscale: Check memory allocations Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: Check memory allocationsFederico Tomassetti2015-02-171-0/+9
| | | | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1267888 / CID 1267890 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | swscale/utils: Limit filter shifting so as not to read from prior the arrayMichael Niedermayer2015-02-051-2/+3
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '928061670e873e816daa14827853b7e11221ff5f'Michael Niedermayer2015-01-151-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '928061670e873e816daa14827853b7e11221ff5f': libswscale: GBRAP input & output and GBRAP16 input support Conflicts: libswscale/input.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c tests/ref/fate/filter-pixdesc-gbrap tests/ref/fate/filter-pixfmts-copy tests/ref/fate/filter-pixfmts-null tests/ref/fate/filter-pixfmts-scale tests/ref/fate/filter-pixfmts-vflip See: 5c057433ccd32f37ddc828d3f82c5b1ad7d3e3db Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libswscale: GBRAP input & output and GBRAP16 input supportPaul B Mahol2015-01-141-0/+3
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | swscale: Pass through chroma positions in sws_getCachedContextKieran Kunhya2014-12-261-0/+13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: support bayer input + scaling, and bayer input + any ↵Michael Niedermayer2014-11-121-0/+25
| | | | | | | | | | | | | | | | supported output Fixes Ticket4053 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: support internal scaler cascadesMichael Niedermayer2014-10-111-11/+43
| | | | | | | | | | | | Fixes Ticket3170 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: remove obsolete FF_API_SWS_FORMAT_NAME cruftJames Almer2014-10-051-11/+0
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | swscale: Allow chroma samples to be above and to the left of luma samplesMichael Niedermayer2014-09-211-1/+1
| | | | | | | | | | Found-by: Kierank Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'bb789016d423d2cfacd2904ac66257bdf7f0964e'Michael Niedermayer2014-08-071-2/+0
|\| | | | | | | | | | | | | | | | | | | * commit 'bb789016d423d2cfacd2904ac66257bdf7f0964e': swscale: Undeprecate sws_getContext() Conflicts: libswscale/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: Undeprecate sws_getContext()Diego Biurrun2014-08-071-2/+0
| | | | | | | | sws_getCachedContext is not a full replacement for the function.
* | Merge commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820'Michael Niedermayer2014-08-041-0/+2
|\| | | | | | | | | | | | | | | | | | | * commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820': swscale: support AV_PIX_FMT_YA16 as input Conflicts: libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * swscale: support AV_PIX_FMT_YA16 as inputVittorio Giovara2014-08-041-0/+2
| | | | | | | | Based on a long debug session with Kostya.
* | Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'Michael Niedermayer2014-08-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5': avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 Conflicts: libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/raw.c libavutil/pixdesc.c libavutil/pixfmt.h libavutil/version.h libswscale/swscale_internal.h libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8Vittorio Giovara2014-08-041-1/+1
| | | | | | | | | | | | | | The rationale is that you have a packed format in form <greyscale sample> <alpha sample> <greyscale sample> <alpha sample> and shortening greyscale to 'G' might make one thing about Greenscale instead. An alias pixel format and color space name are provided for compatibility.
* | swscale/utils: fix rgb -> fullrange yuvMichael Niedermayer2014-07-191-1/+1
| | | | | | | | | | | | Fixes part of Ticket3785 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale/utils: remove unused defineMichael Niedermayer2014-07-191-2/+0
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | sws/x86: split mmxext fast bilinear scaler outMichael Niedermayer2014-07-191-170/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | swscale: Allow the max filter size to be set at compile timeDerek Buitenhuis2014-06-131-1/+1
| | | | | | | | | | | | This can help "extreme" resizes, e.g with some 4k stuff. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | sws: document color range >8bit oddityMichael Niedermayer2014-05-211-0/+2
| |