diff options
author | Niklas Haas <git@haasn.dev> | 2024-10-09 19:44:33 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-10-24 22:50:00 +0200 |
commit | 67adb303228a5d8e2abe860b7748004cc83ca65f (patch) | |
tree | 5b987107804eb246b68414da8e43789658594c7c /libswscale/loongarch/swscale_loongarch.h | |
parent | 153a6dc8faafc4de263a493484ffc1dc2b5b26b2 (diff) | |
download | ffmpeg-67adb303228a5d8e2abe860b7748004cc83ca65f.tar.gz |
swscale: rename SwsContext to SwsInternal
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>
Diffstat (limited to 'libswscale/loongarch/swscale_loongarch.h')
-rw-r--r-- | libswscale/loongarch/swscale_loongarch.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/libswscale/loongarch/swscale_loongarch.h b/libswscale/loongarch/swscale_loongarch.h index a8f2a3214f..15aa983f20 100644 --- a/libswscale/loongarch/swscale_loongarch.h +++ b/libswscale/loongarch/swscale_loongarch.h @@ -26,27 +26,27 @@ #include "libswscale/swscale_internal.h" #include "config.h" -void ff_hscale_8_to_15_lsx(SwsContext *c, int16_t *dst, int dstW, +void ff_hscale_8_to_15_lsx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_8_to_19_lsx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_8_to_19_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_16_to_15_lsx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_16_to_15_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_16_to_15_sub_lsx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_16_to_15_sub_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize, int sh); -void ff_hscale_16_to_19_lsx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_16_to_19_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_16_to_19_sub_lsx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_16_to_19_sub_lsx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize, int sh); @@ -89,9 +89,9 @@ void abgrToA_lsx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, void rgbaToA_lsx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused, void *opq); -av_cold void ff_sws_init_input_lsx(SwsContext *c); +av_cold void ff_sws_init_input_lsx(SwsInternal *c); -av_cold void ff_sws_init_output_lsx(SwsContext *c, +av_cold void ff_sws_init_output_lsx(SwsInternal *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, @@ -100,38 +100,38 @@ av_cold void ff_sws_init_output_lsx(SwsContext *c, yuv2packedX_fn *yuv2packedX, yuv2anyX_fn *yuv2anyX); -int yuv420_rgb24_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_rgb24_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_bgr24_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_bgr24_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_rgba32_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_rgba32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_bgra32_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_bgra32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_argb32_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_argb32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_abgr32_lsx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_abgr32_lsx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); #if HAVE_LASX -void ff_hscale_8_to_15_lasx(SwsContext *c, int16_t *dst, int dstW, +void ff_hscale_8_to_15_lasx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_8_to_19_lasx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_8_to_19_lasx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_16_to_19_lasx(SwsContext *c, int16_t *_dst, int dstW, +void ff_hscale_16_to_19_lasx(SwsInternal *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize); -void ff_hscale_16_to_15_lasx(SwsContext *c, int16_t *dst, int dstW, +void ff_hscale_16_to_15_lasx(SwsInternal *c, int16_t *dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize); @@ -146,22 +146,22 @@ void planar_rgb_to_uv_lasx(uint8_t *_dstU, uint8_t *_dstV, const uint8_t *src[4] void planar_rgb_to_y_lasx(uint8_t *_dst, const uint8_t *src[4], int width, int32_t *rgb2yuv, void *opq); -int yuv420_rgb24_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_rgb24_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_bgr24_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_bgr24_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_rgba32_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_rgba32_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_bgra32_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_bgra32_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_argb32_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_argb32_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); -int yuv420_abgr32_lasx(SwsContext *c, const uint8_t *const src[], const int srcStride[], +int yuv420_abgr32_lasx(SwsInternal *c, const uint8_t *const src[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); void ff_interleave_bytes_lasx(const uint8_t *src1, const uint8_t *src2, @@ -196,9 +196,9 @@ void abgrToA_lasx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, void rgbaToA_lasx(uint8_t *_dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width, uint32_t *unused, void *opq); -av_cold void ff_sws_init_input_lasx(SwsContext *c); +av_cold void ff_sws_init_input_lasx(SwsInternal *c); -av_cold void ff_sws_init_output_lasx(SwsContext *c, +av_cold void ff_sws_init_output_lasx(SwsInternal *c, yuv2planar1_fn *yuv2plane1, yuv2planarX_fn *yuv2planeX, yuv2interleavedX_fn *yuv2nv12cX, |