[FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes
Tomas Härdin
git at haerdin.se
Mon Sep 26 17:44:28 EEST 2022
mån 2022-09-26 klockan 16:28 +0200 skrev Andreas Rheinhardt:
> Tomas Härdin:
> > mån 2022-09-26 klockan 15:58 +0200 skrev Andreas Rheinhardt:
> > > Tomas Härdin:
> > > > diff --git a/libswscale/swscale_internal.h
> > > > b/libswscale/swscale_internal.h
> > > > index abeebbb002..50e73c86fa 100644
> > > > --- a/libswscale/swscale_internal.h
> > > > +++ b/libswscale/swscale_internal.h
> > > > @@ -306,7 +306,7 @@ typedef struct SwsContext {
> > > >
> > > > AVSliceThread *slicethread;
> > > > struct SwsContext **slice_ctx;
> > > > - int *slice_err;
> > > > + attribute_deprecated int *slice_err; ///< @deprecated Not
> > > > used
> > > > any more. Removing it would require a bunch of asm to be
> > > > rewritten.
> > > > int nb_slice_ctx;
> > > >
> > > > // values passed to current sws_receive_slice() call
> > >
> > > What asm would need to be rewritten?
> >
> > swscale.c:
> > /* yuv2gbrp uses the SwsContext for yuv coefficients
> > if struct offsets change the asm needs to be updated too
> > */
> > av_assert0(offsetof(SwsContext, yuv2rgb_y_offset) ==
> > 40292);
> >
> >
> > > Anyway, we don't deprecate internal fields; if we have to keep
> > > them
> > > around for ABI compatibility, we wrap them in #if
> > > LIBFOO_VERSION_MAJOR <
> > > BAR.
> >
> > It's not actually an API/ABI issue but an asm issue
> >
>
> It seems to me that this is the only such issue that affects this
> patch.
> If you modified line 583 of libswscale/x86/output.asm as well as the
> assert, you could remove slice_err. (But let James confirm this.)
Here's a yet further updated patch with this change implemented. Passes
FATE.
/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-avpriv_slicethread_create2-and-avpriv_slicethrea.patch
Type: text/x-patch
Size: 23322 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220926/e13f2b87/attachment.bin>
More information about the ffmpeg-devel
mailing list