https://github.com/FFmpeg/FFmpeg/commit/1f801dfdb5066aadf0ade9cb5e94d620f33eacdc " lavc/libx265: unbreak build for X265_BUILD >= 210 x265 added support for alpha starting with build 210. While doing so, x265_encoder_encode() changed its fifth arg to an array of pointers to x265_picture. This broke building lavc/libx265.c This patch simply unbreaks the build and maintains existing single-layer non-alpha encoding support." Let's backport the fix.
Created attachment 901880 [details] build.log gzipped x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -I. -Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avcodec -march=native -mtune=native -O2 -pipe -march=amdfam10 -std=c11 -fPIC -pthread -I/usr/include/lilv-0 -I/usr/include/sratom-0 -I/usr/include/sord-0 -I/usr/include/serd-0 -I/usr/include/zix-0 -I/usr/include/fribidi -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libdrm -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DHWY_SHARED_DEFINE -I/usr/include/openh264 -I/usr/include/openjpeg-2.5 -I/usr/include/opus -I/usr/include/opus -D_REENTRANT -I/usr/include/librsvg-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/lib/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/webp -I/usr/include/webp -DX264_API_IMPORTS -I/usr/include/AL -I/usr/include/libdrm -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -march=native -mtune=native -O2 -pipe -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized -I/usr/include/SDL2 -D_REENTRANT -MMD -MF libavcodec/libx265.d -MT libavcodec/libx265.o -c -o libavcodec/libx265.o src/libavcodec/libx265.c src/libavcodec/libx265.c: In function ‘libx265_encode_frame’: src/libavcodec/libx265.c:708:59: error: passing argument 5 of ‘ctx->api->encoder_encode’ from incompatible pointer type [-Wincompatible-pointer-types] 708 | pic ? &x265pic : NULL, &x265pic_out); | ^~~~~~~~~~~~ | | | x265_picture * src/libavcodec/libx265.c:708:59: note: expected ‘x265_picture **’ but argument is of type ‘x265_picture *’ make: *** [/var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/ffbuild/common.mak:81: libavcodec/libx265.o] Error 1 make: *** Waiting for unfinished jobs.... * ERROR: media-video/ffmpeg-6.1.2::gentoo failed (compile phase): * emake failed
Created attachment 901881 [details] emerge -pvtD1 ffmpeg;emerge --info
patching file libavcodec/libx265.c Hunk #1 succeeded at 581 (offset -80 lines). Hunk #2 succeeded at 710 with fuzz 1 (offset -94 lines). Hunk #3 succeeded at 749 (offset -94 lines). Hunk #4 succeeded at 776 with fuzz 1 (offset -94 lines). [ ok ] * User patches applied Completed (1 of 1) media-video/ffmpeg-6.1.2::gentoo
https://github.com/FFmpeg/FFmpeg/commit/f749aaf108696fcfc2be6a9f6c1059415474caf3 Upstream also added it to 6.1 branch so it will be in next 6.1.x release (6.1.3)
for complete madness: https://github.com/FFmpeg/FFmpeg/commit/099f88b8641dfc299f3896d17d9addc5b9ae7799 "avcodec/libx265: unbreak build for X265_BUILD >= 213 Earlier, x265 made an API change to support alpha and other multiple layer pictures. We added guards to accommodate that in 1f801df They have now reverted that API change in https://bitbucket.org/multicoreware/x265_git/commits/78e5b703b1 Updated our wrapper guards to unbreak build again."