ffmpeg | branch: master | Niklas Haas <g...@haasn.dev> | Thu Oct 10 23:24:31 2024 +0200| [c461dcf2910bd5062f4cfad6bfa3e240c9cc9a3c] | committer: Niklas Haas
swscale/internal: expose sws_init_single_context() internally Used by the graph API swscale wrapper, for now. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <g...@haasn.dev> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c461dcf2910bd5062f4cfad6bfa3e240c9cc9a3c --- libswscale/swscale_internal.h | 3 +++ libswscale/utils.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 5218ab0921..195b853586 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -958,6 +958,9 @@ extern const int32_t ff_yuv2rgb_coeffs[11][4]; extern const AVClass ff_sws_context_class; +int ff_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 a01138d11b..63c7df5c8c 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1312,8 +1312,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 ff_sws_init_single_context(SwsContext *sws, SwsFilter *srcFilter, + SwsFilter *dstFilter) { int i; int usesVFilter, usesHFilter; @@ -2064,7 +2064,7 @@ static int context_init_threaded(SwsContext *sws, return ret; slice->threads = 1; - ret = sws_init_single_context(slice, src_filter, dst_filter); + ret = ff_sws_init_single_context(slice, src_filter, dst_filter); if (ret < 0) return ret; @@ -2109,7 +2109,7 @@ av_cold int sws_init_context(SwsContext *sws, SwsFilter *srcFilter, // threading disabled in this build, init as single-threaded } - return sws_init_single_context(sws, srcFilter, dstFilter); + return ff_sws_init_single_context(sws, srcFilter, dstFilter); } SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".