[FFmpeg-devel] [PATCH v3 13/18] swscale/internal: expose sws_init_single_context() internally

Niklas Haas ffmpeg at haasn.xyz
Sun Oct 20 23:05:22 EEST 2024


From: Niklas Haas <git at haasn.dev>

Used by the graph API swscale wrapper, for now.

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

diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 1f95966bd1..f1a31775d5 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -957,6 +957,9 @@ extern const int32_t ff_yuv2rgb_coeffs[11][4];
 
 extern const AVClass ff_sws_context_class;
 
+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 49387694cd..b8d478b104 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1325,8 +1325,8 @@ static enum AVPixelFormat alphaless_fmt(enum AVPixelFormat fmt)
     }
 }
 
-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;
-- 
2.46.1



More information about the ffmpeg-devel mailing list