diff mbox series

[FFmpeg-devel,14/19] swscale/internal: expose sws_init_single_context() internally

Message ID 20241010222750.582921-15-ffmpeg@haasn.xyz
State New
Headers show
Series swscale: major API refactor and new graph dispatch | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Niklas Haas Oct. 10, 2024, 10:27 p.m. UTC
From: Niklas Haas <git@haasn.dev>

Used by the graph API swscale wrapper, for now.

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Niklas Haas <git@haasn.dev>
---
 libswscale/swscale_internal.h | 4 ++++
 libswscale/utils.c            | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 470a9636bb..21d8113e5a 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -955,6 +955,10 @@  extern const int32_t ff_yuv2rgb_coeffs[11][4];
 
 extern const AVClass ff_sws_context_class;
 
+/* Assumes c->opts is already initialized */
+int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter,
+                            SwsFilter *dstFilter);
+
 /**
  * Set c->convert_unscaled to an unscaled converter if one exists for the
  * specific source and destination formats, bit depths, flags, etc.
diff --git a/libswscale/utils.c b/libswscale/utils.c
index d01ab0efc0..04d3f99970 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1320,8 +1320,8 @@  static enum AVPixelFormat alphaless_fmt(enum AVPixelFormat fmt)
 }
 
 /* Assumes c->opts is already initialized */
-static av_cold int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter,
-                                           SwsFilter *dstFilter)
+av_cold int sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter,
+                                    SwsFilter *dstFilter)
 {
     int i;
     int usesVFilter, usesHFilter;