On Thu, 21 Nov 2024 02:22:26 +0100 Michael Niedermayer <mich...@niedermayer.cc> wrote: > On Sat, Nov 16, 2024 at 12:25:06PM +0100, Niklas Haas wrote: > > From: Niklas Haas <g...@haasn.dev> > > > > With the ability to set the thread count as well. This benchmark includes > > the constant overhead of context initialization. > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Niklas Haas <g...@haasn.dev> > > --- > > libswscale/tests/swscale.c | 93 ++++++++++++++++++++++++++++---------- > > 1 file changed, 68 insertions(+), 25 deletions(-) > > [...] > > > @@ -131,23 +130,28 @@ static int scale_legacy(AVFrame *dst, const AVFrame > > *src, struct mode mode) > > sws_legacy->dst_format = dst->format; > > sws_legacy->flags = mode.flags; > > sws_legacy->dither = mode.dither; > > + sws_legacy->threads = opts.threads; > > + > > + if ((ret = sws_init_context(sws_legacy, NULL, NULL)) < 0) > > + goto error; > > > > - ret = sws_init_context(sws_legacy, NULL, NULL); > > - if (!ret) > > > + for (int i = 0; i < opts.iters; i++) > > ret = sws_scale_frame(sws_legacy, dst, src); > > what if the first iteration of the loop has an error ? > teh 2nd would overwrite ret
Fixed. > > otherwise ok > > thx > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > If you fake or manipulate statistics in a paper in physics you will never > get a job again. > If you fake or manipulate statistics in a paper in medicin you will get > a job for life at the pharma industry. > _______________________________________________ > 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". _______________________________________________ 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".