[FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 14 21:58:31 EEST 2024
On Mon, Oct 14, 2024 at 08:33:50PM +0200, Niklas Haas wrote:
> On Mon, 14 Oct 2024 19:49:21 +0200 Michael Niedermayer <michael at niedermayer.cc> wrote:
> > On Mon, Oct 14, 2024 at 06:39:21PM +0200, Michael Niedermayer wrote:
> > > On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote:
> > > > On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer <michael at niedermayer.cc> wrote:
> > > > > On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote:
> > > > > > From: Niklas Haas <git at haasn.dev>
> > > > > >
> > > > > > And preserve the public SwsContext as separate name. The motivation here
> > > > > > is that I want to turn SwsContext into a public struct, while keeping the
> > > > > > internal implementation hidden. Additionally, I also want to be able to
> > > > > > use multiple internal implementations, e.g. for GPU devices.
> > > > > >
> > > > > > This commit does not include any functional changes. For the most part, it is
> > > > > > a simple rename. The only complications arise from the public facing API
> > > > > > functions, which preserve their current type (and hence require an additional
> > > > > > unwrapping step internally), and the checkasm test framework, which directly
> > > > > > accesses SwsInternal.
> > > > > >
> > > > > > For consistency, the affected functions that need to maintain a distionction
> > > > > > have generally been changed to refer to the SwsContext as *sws, and the
> > > > > > SwsInternal as *c.
> > > > > >
> > > > > > In an upcoming commit, I will provide a backing definition for the public
> > > > > > SwsContext, and update `sws_internal()` to dereference the internal struct
> > > > > > instead of merely casting it.
> > > > > >
> > > > > > Sponsored-by: Sovereign Tech Fund
> > > > > > Signed-off-by: Niklas Haas <git at haasn.dev>
> > > > >
> > > > > does not apply
> > > > >
> > > > >
> > > > > Applying: swscale: rename SwsContext to SwsInternal
> > > > > Using index info to reconstruct a base tree...
> > > > > M libswscale/output.c
> > > > > M libswscale/utils.c
> > > > > Falling back to patching base and 3-way merge...
> > > > > Auto-merging libswscale/utils.c
> > > > > Auto-merging libswscale/output.c
> > > > > CONFLICT (content): Merge conflict in libswscale/output.c
> > > > > error: Failed to merge in the changes.
> > > > > Patch failed at 0001 swscale: rename SwsContext to SwsInternal
> > > > > hint: Use 'git am --show-current-patch=diff' to see the failed patch
> > > > > hint: When you have resolved this problem, run "git am --continue".
> > > > > hint: If you prefer to skip this patch, run "git am --skip" instead.
> > > > > hint: To restore the original branch and stop patching, run "git am --abort".
> > > > > hint: Disable this message with "git config advice.mergeConflict false"
> > > > >
> > > > > thx
> > > >
> > > > I've rebased it here:
> > > >
> > > > https://github.com/haasn/FFmpeg/tree/swscale4
> > >
> > > on x86-32 linux
> > >
> > > make
> > > CC libswscale/alphablend.o
> > > In file included from src/libavutil/internal.h:39:0,
> > > from src/libavutil/common.h:50,
> > > from src/libavutil/avutil.h:301,
> > > from src/libswscale/swscale.h:33,
> > > from src/libswscale/swscale_internal.h:28,
> > > from src/libswscale/alphablend.c:21:
> > > src/libswscale/swscale_internal.h:682:1: error: static assertion failed: "yuv2rgb_y_offset must be updated in x86 asm"
> > > static_assert(offsetof(SwsInternal, yuv2rgb_y_offset) == 40348,
> > > ^
> > > make: *** [src/ffbuild/common.mak:81: libswscale/alphablend.o] Error 1
> >
> > and on qemu-MIPS: (big endian issue maybe)
> >
> > --- src/tests/ref/fate/sws-yuv-colorspace 2024-10-14 18:05:24.495328917 +0200
> > +++ tests/data/fate/sws-yuv-colorspace 2024-10-14 18:41:48.656863487 +0200
> > @@ -3,4 +3,4 @@
> > #codec_id 0: rawvideo
> > #dimensions 0: 352x288
> > #sar 0: 0/1
> > -0, 0, 0, 1, 152064, 0xcbcb97b9
> > +0, 0, 0, 1, 152064, 0x956698d5
> > TEST acodec-pcm-u8
> > Test sws-yuv-colorspace failed. Look at tests/data/fate/sws-yuv-colorspace.err for
>
> Do you have a command line I could copy to reproduce this?
iam not sure what you ask, what i use to cross build ffmpeg to mips and run it
under qemu is below, but this is not the latest qemu or latest compilers. I tend
to only update these when i have to or when something breaks
../configure --target-exec='qemu-mips -cpu 74Kf -L /usr/mips-linux-gnu/ /usr/mips-linux-gnu/lib/ld-2.30.so --inhibit-cache' --samples=fate-suite/ --enable-gpl --cross-prefix=/usr/mips-linux-gnu/bin/ --cc='ccache mips-linux-gnu-gcc-7' --arch=mips --target-os=linux --enable-cross-compile --disable-mipsfpu --disable-iconv --cpu=74Kf
this is on ubuntu
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241014/fa0eaf1f/attachment.sig>
More information about the ffmpeg-devel
mailing list