aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/vscale.c
Commit message (Collapse)AuthorAgeFilesLines
* swscale/internal: group user-facing options togetherNiklas Haas2024-11-211-5/+5
| | | | | | | | This is a preliminary step to separating these into a new struct. This commit contains no functional changes, it is a pure search-and-replace. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* swscale: rename SwsContext to SwsInternalNiklas Haas2024-10-241-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | And preserve the public SwsContext as separate name. The motivation here is that I want to turn SwsContext into a public struct, while keeping the internal implementation hidden. Additionally, I also want to be able to use multiple internal implementations, e.g. for GPU devices. This commit does not include any functional changes. For the most part, it is a simple rename. The only complications arise from the public facing API functions, which preserve their current type (and hence require an additional unwrapping step internally), and the checkasm test framework, which directly accesses SwsInternal. For consistency, the affected functions that need to maintain a distionction have generally been changed to refer to the SwsContext as *sws, and the SwsInternal as *c. In an upcoming commit, I will provide a backing definition for the public SwsContext, and update `sws_internal()` to dereference the internal struct instead of merely casting it. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
* avutil/common: Don't auto-include mem.hAndreas Rheinhardt2024-03-311-0/+1
| | | | | | | | | | | There are lots of files that don't need it: The number of object files that actually need it went down from 2011 to 884 here. Keep it for external users in order to not cause breakages. Also improve the other headers a bit while just at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* 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