On Sun, Aug 29, 2021 at 06:40:47PM +0200, Anton Khirnov wrote: > --- > Updated to conform to the slice alignment requirements > --- > libswscale/options.c | 3 ++ > libswscale/swscale.c | 59 +++++++++++++++++++++++++ > libswscale/swscale_internal.h | 14 ++++++ > libswscale/utils.c | 82 +++++++++++++++++++++++++++++++++++ > 4 files changed, 158 insertions(+) > > diff --git a/libswscale/options.c b/libswscale/options.c > index 7eb2752543..4b71a23e37 100644 > --- a/libswscale/options.c > +++ b/libswscale/options.c > @@ -81,6 +81,9 @@ static const AVOption swscale_options[] = { > { "uniform_color", "blend onto a uniform color", 0, > AV_OPT_TYPE_CONST, { .i64 = SWS_ALPHA_BLEND_UNIFORM},INT_MIN, INT_MAX, > VE, "alphablend" }, > { "checkerboard", "blend onto a checkerboard", 0, > AV_OPT_TYPE_CONST, { .i64 = SWS_ALPHA_BLEND_CHECKERBOARD},INT_MIN, INT_MAX, > VE, "alphablend" }, > > + { "threads", "number of threads", > OFFSET(nb_threads), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, INT_MAX, VE, "threads" > }, > + { "auto", NULL, 0, > AV_OPT_TYPE_CONST, {.i64 = 0 }, .flags = VE, "threads" }, > + > { NULL } > }; > > diff --git a/libswscale/swscale.c b/libswscale/swscale.c > index ca5c612b18..c233818dcf 100644 > --- a/libswscale/swscale.c > +++ b/libswscale/swscale.c > @@ -1113,6 +1113,9 @@ int sws_send_slice(struct SwsContext *c, unsigned int > slice_start, > > unsigned int sws_receive_slice_alignment(const struct SwsContext *c) > { > + if (c->slice_ctx) > + return c->slice_ctx[0]->dst_slice_align; > + > return c->dst_slice_align; > } > > @@ -1136,6 +1139,27 @@ int sws_receive_slice(struct SwsContext *c, unsigned > int slice_start, > return AVERROR(EINVAL); > } > > + if (c->slicethread) {
> + int nb_jobs = c->slice_ctx[0]->dither == SWS_DITHER_ED ? 1 : > c->nb_slice_ctx; This may merrit some sort of info/debug av_log() explaining why only 1 job is used so a user knows why scaling is slower [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The day soldiers stop bringing you their problems is the day you have stopped leading them. They have either lost confidence that you can help or concluded you do not care. Either case is a failure of leadership. - Colin Powell
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".