summaryrefslogtreecommitdiff
path: root/libswscale/vscale.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt2021-09-201-1/+1
| | | | | | | They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* swscale: make yuv2interleavedX more asm-friendlyNelson Gomez2020-06-141-1/+1
| | | | | | | | | Extracting information from SwsContext in assembly is difficult, and rearranging SwsContext just for asm access didn't look good. These functions only need a couple of fields from it anyway, so just make them parameters in their own right. Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
* swscale/vscale: Increase type strictnessAndreas Rheinhardt2020-04-271-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | libswscale/vscale.c makes extensive use of function pointers and in doing so it converts these function pointers to and from a pointer to void. Yet this is actually against the C standard: C90 only guarantees that one can convert a pointer to any incomplete type or object type to void* and back with the result comparing equal to the original which makes pointers to void generic pointers to incomplete or object type. Yet C90 lacks a generic function pointer type. C99 additionally guarantees that a pointer to a function of one type may be converted to a pointer to a function of another type with the result and the original comparing equal when converting back. This makes any function pointer type a generic function pointer type. Yet even this does not make pointers to void generic function pointers. Both GCC and Clang emit warnings for this when in pedantic mode. This commit fixes this by using a union that can hold one member of any of the required function pointer types to store the function pointer. This works even for C90. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* swscale: cleanup unused codePedro Arthur2016-03-311-2/+2
| | | | | Removed previous swscale code under '#ifndef NEW_FILTER' and removed unused fields of SwsContext
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-271-1/+1
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* swscale/vscale: Use matching sliceY/chrSliceY for luma/chromaMichael Niedermayer2016-01-141-7/+7
| | | | | | No case known where that makes a difference Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/vscale: Check that 2 tap filters are bilinear before using bilinear codeMichael Niedermayer2016-01-141-7/+25
| | | | | | | | Fixes: out of array reads Fixes: 07e8b9c5d348ccdf7add0f37de20cf6c/asan_heap-oob_27e8df7_6849_e56653f768070ec8cb52f587048444c2.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/vscale: Add fixme comment to "ugly" codeMichael Niedermayer2016-01-141-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: Move VScalerContext into vscale.cMichael Niedermayer2016-01-141-0/+10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale: re-enable gammaPedro Arthur2015-09-041-1/+1
| | | | +added gamma conversion to refactored code
* swscale: refactor vertical scalerPedro Arthur2015-08-191-0/+287