m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.51k stars 262 forks source link

something has broken or incompatible code ? what is jxl ? #2466

Closed hydra3333 closed 1 year ago

hydra3333 commented 1 year ago
├ Compiling FFmpeg with Vapoursynth R61
├ FFmpeg will need vapoursynth.dll and vsscript.dll to run using vapoursynth demuxers!
  Running git update for ffmpeg...
┌ ffmpeg git  ............................................ [Updates found]
├ Changing options to comply to nonfree...
CUDA_PATH environment variable not set or directory does not exist.
├ Compiling static FFmpeg...
├ Running configure...
├ Running make...
Likely error (tail of the failed operation logfile):
C:/MABS/local64/include/jxl/decode.h:723:50: note: expected 'JxlColorProfileTarget' but argument is of type 'JxlPixelFormat *'
  723 |     const JxlDecoder* dec, JxlColorProfileTarget target,
      |                            ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
src/libavcodec/libjxldec.c:261:20: error: too many arguments to function 'JxlDecoderGetColorAsEncodedProfile'
  261 |             jret = JxlDecoderGetColorAsEncodedProfile(ctx->decoder, &ctx->jxl_pixfmt, JXL_COLOR_PROFILE_TARGET_DATA, &jxl_color);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/MABS/local64/include/jxl/decode.h:722:29: note: declared here
  722 | JXL_EXPORT JxlDecoderStatus JxlDecoderGetColorAsEncodedProfile(
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [/build/ffmpeg-git/ffbuild/common.mak:81: libavcodec/libjxldec.o] Error 1
make failed. Check C:/MABS/build/ffmpeg-git/build-static-64bit/ab-suite.make.log
This is required for other packages, so this script will exit.
  Creating diagnostics file...

Attach C:\MABS\build\logs.zip to the GitHub issue.
Make sure the suite is up-to-date before reporting an issue. It might've been fixed already.

Try running the build again at a later time.
Biswa96 commented 1 year ago

what is jxl ?

JPEG XL is a royalty-free raster-graphics file format that supports both lossy and lossless compression. See https://jpeg.org/jpegxl/

something has broken or incompatible code ?

Projects change rapidly. So, broken code is expected. It may be possible to disable libjxl requirement in ffmpeg. The commit https://github.com/libjxl/libjxl/commit/b08a704978d5aeaf6fd1e2aee3ae5907a89e1f96 says

the signature of JxlDecoderGetColorAsEncodedProfile, JxlDecoderGetICCProfileSize, and JxlDecoderGetColorAsICCProfile changed: a deprecated unused argument was removed.

hydra3333 commented 1 year ago

It may be possible to disable libjxl requirement in ffmpeg

Thanks, did that and ffmpeg built fine.

hydra3333 commented 1 year ago

The response:

You'll need to update your code, the API has changed in b08a704

hydra3333 commented 1 year ago

There has been some activity in ffmpeg recently, I wonder if this has been resolved - does anyone know ?

Biswa96 commented 1 year ago

Please try to rebuild ffmpeg. A patch has been added here https://github.com/m-ab-s/media-autobuild_suite/commit/28f9bb3ce7b1de232f6ebfb10ac2ea0a6e732bdb

GyanD commented 1 year ago

Has anyone submitted a patch to ffmpeg upstream?

1480c1 commented 1 year ago

I have not yet, as I could not find any easy way to detect the new API changes. A simple patch is at https://github.com/m-ab-s/mabs-patches/blob/master/ffmpeg/0001-libjxldec-remove-deprecated-fields.patch, but as mentioned, it has no version bumps nor macro checks.

GyanD commented 1 year ago

Unfortunately, looks like the API changes weren't accompanied with a version bump.