diff --git a/anda/multimedia/ffmpeg/.gitignore b/anda/multimedia/ffmpeg/.gitignore new file mode 100644 index 0000000000..5505c91bc5 --- /dev/null +++ b/anda/multimedia/ffmpeg/.gitignore @@ -0,0 +1,3 @@ +# FFmpeg keys +ffmpeg-devel.asc +ffmpeg.keyring diff --git a/anda/multimedia/ffmpeg/anda.hcl b/anda/multimedia/ffmpeg/anda.hcl index 523cae0329..7799575744 100644 --- a/anda/multimedia/ffmpeg/anda.hcl +++ b/anda/multimedia/ffmpeg/anda.hcl @@ -2,7 +2,7 @@ project pkg { arches = ["x86_64", "aarch64", "i386"] rpm { spec = "ffmpeg.spec" - extra_repos = ["https://repos.fyralabs.com/terra\\$releasever-nvidia", "https://repos.fyralabs.com/terra\\$releasever-multimedia"] + extra_repos = ["https://repos.fyralabs.com/terra\\$releasever-multimedia"] } labels { updbranch = 1 diff --git a/anda/multimedia/ffmpeg/enable_decoders b/anda/multimedia/ffmpeg/enable_decoders new file mode 100644 index 0000000000..b03967c46d --- /dev/null +++ b/anda/multimedia/ffmpeg/enable_decoders @@ -0,0 +1,479 @@ +## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review) +aac +aasc +libfdk_aac # fdk-aac-free +ac3 +acelp_kelvin +adpcm_4xm +adpcm_adx +adpcm_afc +adpcm_agm +adpcm_aica +adpcm_argo +adpcm_ct +adpcm_dtk +adpcm_ea +adpcm_ea_maxis_xa +adpcm_ea_r1 +adpcm_ea_r2 +adpcm_ea_r3 +adpcm_ea_xas +adpcm_g722 +adpcm_g726 +adpcm_g726le +adpcm_ima_acorn +adpcm_ima_alp +adpcm_ima_amv +adpcm_ima_apc +adpcm_ima_apm +adpcm_ima_cunning +adpcm_ima_dat4 +adpcm_ima_dk3 +adpcm_ima_dk4 +adpcm_ima_ea_eacs +adpcm_ima_ea_sead +adpcm_ima_iss +adpcm_ima_moflex +adpcm_ima_mtf +adpcm_ima_oki +adpcm_ima_qt +adpcm_ima_rad +adpcm_ima_smjpeg +adpcm_ima_ssi +adpcm_ima_wav +adpcm_ima_ws +adpcm_ms +adpcm_mtaf +adpcm_psx +adpcm_sbpro_2 +adpcm_sbpro_3 +adpcm_sbpro_4 +adpcm_swf +adpcm_thp +adpcm_thp_le +adpcm_vima +adpcm_xa +adpcm_xmd +adpcm_yamaha +adpcm_zork +aic +alac +alias_pix +amrnb +amrwb +amv +anm +ansi # trivial +anull +apac +ape +apng # animated png +apv +arbc +argo +ass # trivial +asv1 +asv2 +atrac1 +atrac3 +atrac3al +atrac3p +atrac3pal +aura +aura2 +av1 # libaom +av1_qsv # libaom +bethsoftvid # trivial +bfi # trivial +bink +binkaudio_dct +binkaudio_rdft +bintext +bitpacked # trivial +bmp # trivial +bmv_audio +bmv_video +bonk +brender_pix +c93 +cbd2_dpcm +ccaption +cdgraphics +cdtoons +cdxl +cinepak +clearvideo +cljr +cook +cpia +cscd +cyuv +dca +dds +derf_dpcm +dfa +dfpwm +dirac # dirac +dnxhd +dnxhr +dolby_e +dpx +dsd_lsbf +dsd_msbf +dsicinaudio +dsicinvideo +dss_sp +dvaudio +dvbsub +dvdsub +dvvideo +dxa +dxtory +eacmv +eamad +eatgq +eatgv +eatqi +eightbps +eightsvx_exp +eightsvx_fib +escape124 +escape130 +evrc +exr # openEXR +ffv1 # ffmpeg +ffvhuff # ffmpeg +ffwavesynth # pseudo +fits +flac # libFLAC +flashsv +flashsv2 +flic +flv +fmvc +fourxm +ftr # fdk-aac +g723_1 +g729 +gdv +gem +gif # libpng +gremlin_dpcm +gsm # libgsm +gsm_ms +h261 +h263 +h263_v4l2m2m # hardware +h263i +h263p +hap +hca +hcom +hdr +hnm4_video +hq_hqa +hqx +huffyuv # trivial+zlib +hymt # huffyuv-mt +iac +idcin +idf +iff_ilbm +ilbc # ilbc +imc +indeo2 +indeo3 +indeo4 +indeo5 +interplay_acm +interplay_dpcm +interplay_video +ipu +jacosub +jpeg2000 # openjpeg2 +jpegls +jv +kgv1 +kmvc +lagarith +libaribb24 # aribb24 +libaribcaption # libaribcaption +libaom # libaom +libaom_av1 # libaom +libcodec2 # codec2 +libdav1d # av1 +libgsm # libgsm +libgsm_ms # libgsm +libilbc # ilbc +libjxl # libjxl +liblc3 # liblc3 +libopencore_amrnb # opencore-amr +libopencore_amrwb # opencore-amr +libopenh264 # openh264 +libopenjpeg # openjpeg +libopus # opus +librsvg # librsvg +libschroedinger # schroedinger +libspeex # speex +libvorbis # libvorbis +libvpx_vp8 # libvpx +libvpx_vp9 # libvpx +libxevd +libzvbi_teletext # zvbi +loco +lscr +m101 +mace3 +mace6 +mdec +media100 +metasound +microdvd +mimic +misc4 +mjpeg # mjpegtools +mjpeg_qsv # mjpegtools +mjpegb +mlp +mmvideo +motionpixels +movtext +mp1 # twolame/lame +mp1float # twolame/lame +mp2 # twolame +mp2float # twolame +mp3 # lame +mp3adu +mp3adufloat +mp3float # lame +mp3on4 +mp3on4float +mpc7 +mpc8 +mpeg1_v4l2m2m +mpeg1video +mpeg2_qsv +mpeg2_v4l2m2m +mpeg2video +mpeg4 +mpeg4_v4l2m2m # hardware +mpegvideo +mpl2 +msa1 +mscc +msmpeg4v1 +msmpeg4v2 +msmpeg4v3 +msnsiren +msp2 +msrle +mss1 +msvideo1 +mszh +mts2 +mv30 +mvc1 +mvc2 +mvdv +mvha +mwsc +mxpeg +nellymoser +nuv +on2avc +opus # libopus +paf_audio +paf_video +pam # trivial +pbm # trivial +pcm_alaw # trivial +pcm_bluray +pcm_dvd +pcm_f16le # trivial +pcm_f24le # trivial +pcm_f32be # trivial +pcm_f32le # trivial +pcm_f64be # trivial +pcm_f64le # trivial +pcm_lxf # trivial +pcm_mulaw # trivial +pcm_s16be # trivial +pcm_s16be_planar # trivial +pcm_s16le # trivial +pcm_s16le_planar # trivial +pcm_s24be # trivial +pcm_s24daud # trivial +pcm_s24le # trivial +pcm_s24le_planar # trivial +pcm_s32be # trivial +pcm_s32le # trivial +pcm_s32le_planar # trivial +pcm_s64be # trivial +pcm_s64le # trivial +pcm_s8 # trivial +pcm_s8_planar # trivial +pcm_sga # trivial +pcm_u16be # trivial +pcm_u16le # trivial +pcm_u24be # trivial +pcm_u24le # trivial +pcm_u32be # trivial +pcm_u32le # trivial +pcm_u8 # trivial +pcm_vidc # trivial +pcx +pfm # trivial +pgm # trivial +pgmyuv # trivial +pgssub # mkvtoolnix +pgx +phm # trivial +photocd +pictor +pjs +png # libpng +ppm # trivial +prores +prores_raw +prosumer +psd +ptx +qcelp +qdm2 +qdmc +qdraw +qoa +qoi +qpeg +qtrle +r10k +r210 +ra_144 +ra_288 +rasc +rawvideo # trivial +realtext +rka +rl2 +roq +roq_dpcm +rpza +rscc +rv10 +rv20 +s302m +sami +sanm +sbc +screenpresso +sdx2_dpcm +sgi # trivial +sgirle # trivial +shorten +simbiosis_imx +sipr +siren +smackaud +smacker +smc +smvjpeg +snow +sol_dpcm +sonic +sp5x +speedhq +speex +srgc +srt # trivial +ssa # trivial +stl +subrip +subviewer +subviewer1 +sunrast # trivial +svq1 +svq3 +tak +targa # trivial +targa_y216 +tdsc +text # trivial +theora # libtheora +thp +tiertexseqvideo +tiff # libtiff +tmv +truehd +truemotion1 +truemotion2 +truemotion2rt +truespeech +tscc +tscc2 +tta +twinvq +txd +ulti +utvideo +v210 # trivial +v210x # trivial +v308 # trivial +v408 # trivial +v410 # trivial +vb +vble +vcr1 +vmdaudio +vmdvideo +vmnc +vnull +vorbis # libvorbis +vp3 # libav +vp4 # libav +vp5 # libav +vp6 # libav +vp6a # libav +vp6f # libav +vp7 # libav +vp8 # libvpx +vp8_qsv # libvpx +vp8_v4l2m2m # libvpx +vp9 # libvpx +vp9_qsv # libvpx +vp9_v4l2m2m # libvpx +vplayer +vqa +vqc +wady_dpcm +wavarc +wavpack +wbmp +wcmv +webp # libwebp +webvtt # trivial +wmav1 +wmav2 +wmavoice +wmv1 +wmv2 +wnv1 +wrapped_avframe # passthrough +ws_snd1 +xan_dpcm +xan_wc3 +xan_wc4 +xbin +xbm # trivial +xface +xl +xpm +xsub +xwd # xwd +y41p # trivial +ylc +yop +yuv4 # trivial +zero12v +zerocodec +zlib # zlib +zmbv # dosbox diff --git a/anda/multimedia/ffmpeg/enable_encoders b/anda/multimedia/ffmpeg/enable_encoders new file mode 100644 index 0000000000..d49e1a9514 --- /dev/null +++ b/anda/multimedia/ffmpeg/enable_encoders @@ -0,0 +1,216 @@ +## module name # reason for enablement in ffmpeg (usually there is another package that already got legal review) +a64multi +a64multi5 +aac +libfdk_aac # fdk-aac-free +ac3 +adpcm_adx +adpcm_argo +adpcm_g722 +adpcm_g726 +adpcm_g726le +adpcm_ima_alp +adpcm_ima_amv +adpcm_ima_apm +adpcm_ima_qt +adpcm_ima_ssi +adpcm_ima_wav +adpcm_ima_ws +adpcm_ms +adpcm_swf +adpcm_yamaha +alac +alias_pix +amv +anull +apng # libpng +ass # trivial +asv1 +asv2 +av1_amf +av1_nvenc +av1_qsv +av1_vaapi +bitpacked # trivial +bmp # trivial +cinepak +cljr +dca +dfpwm +dnxhd +dnxhr +dpx +dvbsub +dvdsub +dvvideo +exr +ffv1 +ffvhuff # trivial+zlib +flac # libFLAC +flashsv +flashsv2 +flv +g723_1 +gif # libpng +h261 +h263 +h263_v4l2m2m # hardware +h263p +h264_amf # hardware +h264_nvenc # hardware +h264_qsv # hardware +h264_v4l2m2m # hardware +h264_vaapi # hardware +hap +hdr +hevc_amf # hardware +hevc_nvenc # hardware +hevc_qsv # hardware +hevc_v4l2m2m # hardware +hevc_vaapi # hardware +huffyuv # trivial+zlib +ilbc # ilbc +jpeg2000 +jpegls +libaom +libaom_av1 # libaom +libcodec2 # codec2 +libgsm # libgsm +libgsm_ms # libgsm +libilbc # ilbc +libjxl # libjxl +liblc3 # liblc3 +libmp3lame # lame +liboapv +libopencore_amrnb +libopenh264 # openh264 +libopenjpeg # openjpeg +libopus # opus +librav1e # rav1e +libspeex # speex +libsvtav1 +libtheora # libtheora +libtwolame # twolame +libvo_amrwbenc +libvorbis # libvorbis +libvpx_vp8 # libvpx +libvpx_vp9 # libvpx +libwebp # libwebp +libwebp_anim # libwebp +libxeve +libxvid # xvidcore +mjpeg # mjpegtools +mjpeg_qsv # mjpegtools +mjpeg_vaapi # mjpegtools +mlp +movtext +mp2 # twolame +mp2fixed # twolame +mpeg1video +mpeg2_qsv +mpeg2_vaapi +mpeg2video +mpeg4 +mpeg4_v4l2m2m # hardware +msmpeg4v2 +msmpeg4v3 +msvideo1 +nellymoser +opus # opus +pam +pbm # trivial +pcm_alaw # trivial +pcm_f32be # trivial +pcm_f32le # trivial +pcm_f64be # trivial +pcm_f64le # trivial +pcm_mulaw # trivial +pcm_s16be # trivial +pcm_s16be_planar # trivial +pcm_s16le # trivial +pcm_s16le_planar # trivial +pcm_s24be # trivial +pcm_s24le # trivial +pcm_s24le_planar # trivial +pcm_s32be # trivial +pcm_s32le # trivial +pcm_s32le_planar # trivial +pcm_s8 # trivial +pcm_s8_planar # trivial +pcm_u16be # trivial +pcm_u16le # trivial +pcm_u24be # trivial +pcm_u24le # trivial +pcm_u32be # trivial +pcm_u32le # trivial +pcm_u8 # trivial +pcx +pgm # trivial +pgmyuv # trivial +phm # trivial +png # libpng +ppm # trivial +prores +prores_aw +prores_ks +qoi +qtrle +r10k # trivial +r210 # trivial +ra_144 +rawvideo # trivial +roq +roq_dpcm +rpza +rv10 +rv20 +s302m +sbc +sgi # trivial +smc +snow +sonic +sonic_ls +speedhq +srt # trivial +ssa # trivial +subrip # trivial +sunrast # trivial +svq1 +targa # trivial +text # trivial +tiff # libtiff +truehd +tta +ttml +utvideo +v210 # trivial +v308 # trivial +v408 # trivial +v410 # trivial +vc1_qsv # hardware +vc1_v4l2m2m # hardware +vc2 # dirac +vnull +vorbis # libvorbis +vp8_qsv # libvpx +vp8_v4l2m2m # libvpx +vp8_vaapi # libvpx +vp9_qsv # libvpx +vp9_vaapi # libvpx +wavpack +wbmp +webvtt # trivial +wmav1 +wmav2 +wmv1 +wmv2 +wrapped_avframe # passthrough +xbm # (X11) +xface +xsub +xwd # xwd +y41p # trivial +yuv4 # trivial +zlib # zlib +zmbv # dosbox diff --git a/anda/multimedia/ffmpeg/ffmpeg-CVE-2025-22921.patch b/anda/multimedia/ffmpeg/ffmpeg-CVE-2025-22921.patch new file mode 100644 index 0000000000..3a522c8fd8 --- /dev/null +++ b/anda/multimedia/ffmpeg/ffmpeg-CVE-2025-22921.patch @@ -0,0 +1,29 @@ +From 7f9c7f9849a2155224711f0ff57ecdac6e4bfb57 Mon Sep 17 00:00:00 2001 +From: James Almer +Date: Wed, 1 Jan 2025 23:58:39 -0300 +Subject: [PATCH] avcodec/jpeg2000dec: clear array length when freeing it + +Fixes NULL pointer dereferences. +Fixes ticket #11393. + +Reviewed-by: Michael Niedermayer +Signed-off-by: James Almer +--- + libavcodec/jpeg2000dec.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c +index e5e897a29f..b82d85d5ee 100644 +--- a/libavcodec/jpeg2000dec.c ++++ b/libavcodec/jpeg2000dec.c +@@ -1521,6 +1521,7 @@ static int jpeg2000_decode_packet(Jpeg2000DecoderContext *s, Jpeg2000Tile *tile, + } + } + av_freep(&cblk->lengthinc); ++ cblk->nb_lengthinc = 0; + } + } + // Save state of stream +-- +2.48.1 + diff --git a/anda/multimedia/ffmpeg/ffmpeg-HandBrake.patch b/anda/multimedia/ffmpeg/ffmpeg-HandBrake.patch index e34c256b10..68d3f4fc7e 100644 --- a/anda/multimedia/ffmpeg/ffmpeg-HandBrake.patch +++ b/anda/multimedia/ffmpeg/ffmpeg-HandBrake.patch @@ -1,7 +1,54 @@ -diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure ---- ffmpeg-7.1.2.old/configure 2025-10-27 10:07:02.407490033 +0100 -+++ ffmpeg-7.1.2/configure 2025-10-27 10:07:02.458434476 +0100 -@@ -2466,6 +2466,7 @@ +From c4abce42f746dd95e79d7498b1a45789ecb0e61f Mon Sep 17 00:00:00 2001 +From: Terra Packaging Team +Date: Mon, 1 Jun 2026 23:18:31 -0500 +Subject: [PATCH] Patch for HandBrake + +Patch based off a very similar patch by Negativo17 but formatted as a Git patch. + +See: https://github.com/HandBrake/HandBrake/tree/2f464fcf93d411ebdd969b39d67739ed658c5e58 +--- + configure | 5 + + libavcodec/Makefile | 1 + + libavcodec/allcodecs.c | 1 + + libavcodec/amfenc.c | 154 +++++++- + libavcodec/amfenc.h | 3 + + libavcodec/amfenc_av1.c | 17 +- + libavcodec/amfenc_h264.c | 11 +- + libavcodec/amfenc_hevc.c | 16 +- + libavcodec/av1dec.c | 36 +- + libavcodec/av1dec.h | 3 +- + libavcodec/bsf/hevc_mp4toannexb.c | 6 +- + libavcodec/ccaption_dec.c | 9 +- + libavcodec/dvdsubdec.c | 43 ++- + libavcodec/hwaccels.h | 1 + + libavcodec/libdav1d.c | 14 + + libavcodec/mf_utils.c | 2 + + libavcodec/mf_utils.h | 1 + + libavcodec/mfenc.c | 1 + + libavcodec/pgssubdec.c | 554 ++++++++++++++++++----------- + libavcodec/qsvenc.c | 49 +++ + libavcodec/qsvenc.h | 8 +- + libavcodec/qsvenc_av1.c | 4 + + libavcodec/videotoolbox.c | 56 ++- + libavcodec/videotoolbox_av1.c | 105 ++++++ + libavcodec/vt_internal.h | 4 + + libavfilter/vf_vpp_qsv.c | 6 +- + libavformat/isom.h | 3 + + libavformat/matroskaenc.c | 10 + + libavformat/mov.c | 229 +++++++++++- + libavformat/movenc.c | 213 ++++++++--- + libavutil/frame.c | 1 + + libavutil/frame.h | 6 + + libavutil/hwcontext_videotoolbox.c | 12 +- + libswscale/swscale_unscaled.c | 6 +- + 34 files changed, 1276 insertions(+), 314 deletions(-) + create mode 100644 libavcodec/videotoolbox_av1.c + +diff --git a/configure b/configure +index 1652b0d..3a47be0 100755 +--- a/configure ++++ b/configure +@@ -2464,6 +2464,7 @@ TYPES_LIST=" kCMVideoCodecType_HEVC kCMVideoCodecType_HEVCWithAlpha kCMVideoCodecType_VP9 @@ -9,7 +56,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange -@@ -3172,6 +3173,8 @@ +@@ -3170,6 +3171,8 @@ av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx" av1_vaapi_hwaccel_select="av1_decoder" av1_vdpau_hwaccel_deps="vdpau VdpPictureInfoAV1" av1_vdpau_hwaccel_select="av1_decoder" @@ -18,7 +65,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure av1_vulkan_hwaccel_deps="vulkan" av1_vulkan_hwaccel_select="av1_decoder" h263_vaapi_hwaccel_deps="vaapi" -@@ -3342,6 +3345,7 @@ +@@ -3340,6 +3343,7 @@ av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS" av1_mediacodec_decoder_deps="mediacodec" av1_mediacodec_encoder_deps="mediacodec" av1_mediacodec_encoder_select="extract_extradata_bsf" @@ -26,7 +73,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure av1_nvenc_encoder_deps="nvenc NV_ENC_PIC_PARAMS_AV1" av1_nvenc_encoder_select="atsc_a53" av1_qsv_decoder_select="qsvdec" -@@ -6724,6 +6728,7 @@ +@@ -6718,6 +6722,7 @@ enabled videotoolbox && { check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia" check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVCWithAlpha "-framework CoreMedia" check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_VP9 "-framework CoreMedia" @@ -34,454 +81,23 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo" check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange "-framework CoreVideo" check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange "-framework CoreVideo" -diff -Naur ffmpeg-7.1.2.old/libavcodec/ac3dec.c ffmpeg-7.1.2/libavcodec/ac3dec.c ---- ffmpeg-7.1.2.old/libavcodec/ac3dec.c 2025-10-27 10:07:00.254471036 +0100 -+++ ffmpeg-7.1.2/libavcodec/ac3dec.c 2025-10-27 10:07:02.463169316 +0100 -@@ -253,72 +253,6 @@ - } - - /** -- * Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream. -- * GetBitContext within AC3DecodeContext must point to -- * the start of the synchronized AC-3 bitstream. -- */ --static int ac3_parse_header(AC3DecodeContext *s) --{ -- GetBitContext *gbc = &s->gbc; -- int i; -- -- /* read the rest of the bsi. read twice for dual mono mode. */ -- i = !s->channel_mode; -- do { -- s->dialog_normalization[(!s->channel_mode)-i] = -get_bits(gbc, 5); -- if (s->dialog_normalization[(!s->channel_mode)-i] == 0) { -- s->dialog_normalization[(!s->channel_mode)-i] = -31; -- } -- if (s->target_level != 0) { -- s->level_gain[(!s->channel_mode)-i] = powf(2.0f, -- (float)(s->target_level - -- s->dialog_normalization[(!s->channel_mode)-i])/6.0f); -- } -- if (s->compression_exists[(!s->channel_mode)-i] = get_bits1(gbc)) { -- s->heavy_dynamic_range[(!s->channel_mode)-i] = -- AC3_HEAVY_RANGE(get_bits(gbc, 8)); -- } -- if (get_bits1(gbc)) -- skip_bits(gbc, 8); //skip language code -- if (get_bits1(gbc)) -- skip_bits(gbc, 7); //skip audio production information -- } while (i--); -- -- skip_bits(gbc, 2); //skip copyright bit and original bitstream bit -- -- /* skip the timecodes or parse the Alternate Bit Stream Syntax */ -- if (s->bitstream_id != 6) { -- if (get_bits1(gbc)) -- skip_bits(gbc, 14); //skip timecode1 -- if (get_bits1(gbc)) -- skip_bits(gbc, 14); //skip timecode2 -- } else { -- if (get_bits1(gbc)) { -- s->preferred_downmix = get_bits(gbc, 2); -- s->center_mix_level_ltrt = get_bits(gbc, 3); -- s->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7); -- s->center_mix_level = get_bits(gbc, 3); -- s->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7); -- } -- if (get_bits1(gbc)) { -- s->dolby_surround_ex_mode = get_bits(gbc, 2); -- s->dolby_headphone_mode = get_bits(gbc, 2); -- skip_bits(gbc, 10); // skip adconvtyp (1), xbsi2 (8), encinfo (1) -- } -- } -- -- /* skip additional bitstream info */ -- if (get_bits1(gbc)) { -- i = get_bits(gbc, 6); -- do { -- skip_bits(gbc, 8); -- } while (i--); -- } -- -- return 0; --} -- --/** - * Common function to parse AC-3 or E-AC-3 frame header - */ - static int parse_frame_header(AC3DecodeContext *s) -@@ -375,10 +309,25 @@ - s->dba_syntax = 1; - s->skip_syntax = 1; - memset(s->channel_uses_aht, 0, sizeof(s->channel_uses_aht)); -- return ac3_parse_header(s); -+ /* volume control params */ -+ for (int i = 0; i < (s->channel_mode ? 1 : 2); i++) { -+ s->dialog_normalization[i] = hdr.dialog_normalization[i]; -+ if (s->dialog_normalization[i] == 0) { -+ s->dialog_normalization[i] = -31; -+ } -+ if (s->target_level != 0) { -+ s->level_gain[i] = powf(2.0f, -+ (float)(s->target_level - s->dialog_normalization[i])/6.0f); -+ } -+ s->compression_exists[i] = hdr.compression_exists[i]; -+ if (s->compression_exists[i]) { -+ s->heavy_dynamic_range[i] = AC3_HEAVY_RANGE(hdr.heavy_dynamic_range[i]); -+ } -+ } -+ return 0; - } else if (CONFIG_EAC3_DECODER) { - s->eac3 = 1; -- return ff_eac3_parse_header(s); -+ return ff_eac3_parse_header(s, &hdr); - } else { - av_log(s->avctx, AV_LOG_ERROR, "E-AC-3 support not compiled in\n"); - return AVERROR(ENOSYS); -@@ -1562,6 +1511,9 @@ - av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); - } - break; -+ case AC3_PARSE_ERROR_CHANNEL_MAP: -+ av_log(avctx, AV_LOG_ERROR, "invalid channel map\n"); -+ return AVERROR_INVALIDDATA; - case AC3_PARSE_ERROR_CRC: - break; - default: // Normal AVERROR do not try to recover. -diff -Naur ffmpeg-7.1.2.old/libavcodec/ac3dec.h ffmpeg-7.1.2/libavcodec/ac3dec.h ---- ffmpeg-7.1.2.old/libavcodec/ac3dec.h 2025-10-27 10:07:00.587473974 +0100 -+++ ffmpeg-7.1.2/libavcodec/ac3dec.h 2025-10-27 10:07:02.463287298 +0100 -@@ -255,11 +255,12 @@ - AVChannelLayout downmix_layout; - } AC3DecodeContext; - -+struct AC3HeaderInfo; - /** - * Parse the E-AC-3 frame header. - * This parses both the bit stream info and audio frame header. - */ --static int ff_eac3_parse_header(AC3DecodeContext *s); -+static int ff_eac3_parse_header(AC3DecodeContext *s, const struct AC3HeaderInfo *hdr); - - /** - * Decode mantissas in a single channel for the entire frame. -diff -Naur ffmpeg-7.1.2.old/libavcodec/ac3defs.h ffmpeg-7.1.2/libavcodec/ac3defs.h ---- ffmpeg-7.1.2.old/libavcodec/ac3defs.h 2025-10-27 10:07:00.586473965 +0100 -+++ ffmpeg-7.1.2/libavcodec/ac3defs.h 2025-10-27 10:07:02.463340118 +0100 -@@ -34,6 +34,8 @@ - #define AC3_CRITICAL_BANDS 50 - #define AC3_MAX_CPL_BANDS 18 - -+#define EAC3_SR_CODE_REDUCED 3 -+ - /* exponent encoding strategy */ - #define EXP_REUSE 0 - #define EXP_NEW 1 -diff -Naur ffmpeg-7.1.2.old/libavcodec/ac3_parser.c ffmpeg-7.1.2/libavcodec/ac3_parser.c ---- ffmpeg-7.1.2.old/libavcodec/ac3_parser.c 2025-10-27 10:07:00.290471354 +0100 -+++ ffmpeg-7.1.2/libavcodec/ac3_parser.c 2025-10-27 10:07:02.462962336 +0100 -@@ -73,6 +73,217 @@ - return i; - } - -+/** -+ * Parse the 'sync info' and 'bit stream info' from the AC-3 bitstream. -+ * GetBitContext within AC3DecodeContext must point to -+ * the start of the synchronized AC-3 bitstream. -+ */ -+static int ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) -+{ -+ /* read the rest of the bsi. read twice for dual mono mode. */ -+ for (int i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -+ hdr->dialog_normalization[i] = -get_bits(gbc, 5); -+ hdr->compression_exists[i] = get_bits1(gbc); -+ if (hdr->compression_exists[i]) -+ hdr->heavy_dynamic_range[i] = get_bits(gbc, 8); -+ if (get_bits1(gbc)) -+ skip_bits(gbc, 8); //skip language code -+ if (get_bits1(gbc)) -+ skip_bits(gbc, 7); //skip audio production information -+ } -+ -+ skip_bits(gbc, 2); //skip copyright bit and original bitstream bit -+ -+ /* skip the timecodes or parse the Alternate Bit Stream Syntax */ -+ if (hdr->bitstream_id != 6) { -+ if (get_bits1(gbc)) -+ skip_bits(gbc, 14); //skip timecode1 -+ if (get_bits1(gbc)) -+ skip_bits(gbc, 14); //skip timecode2 -+ } else { -+ if (get_bits1(gbc)) { -+ hdr->preferred_downmix = get_bits(gbc, 2); -+ hdr->center_mix_level_ltrt = get_bits(gbc, 3); -+ hdr->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7); -+ hdr->center_mix_level = get_bits(gbc, 3); -+ hdr->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7); -+ } -+ if (get_bits1(gbc)) { -+ hdr->dolby_surround_ex_mode = get_bits(gbc, 2); -+ hdr->dolby_headphone_mode = get_bits(gbc, 2); -+ skip_bits(gbc, 10); // skip adconvtyp (1), xbsi2 (8), encinfo (1) -+ } -+ } -+ -+ /* skip additional bitstream info */ -+ if (get_bits1(gbc)) { -+ int i = get_bits(gbc, 6); -+ do { -+ skip_bits(gbc, 8); -+ } while (i--); -+ } -+ -+ return 0; -+} -+ -+static int eac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) -+{ -+ if (hdr->frame_type == EAC3_FRAME_TYPE_RESERVED) -+ return AC3_PARSE_ERROR_FRAME_TYPE; -+ if (hdr->substreamid) -+ return AC3_PARSE_ERROR_FRAME_TYPE; -+ -+ skip_bits(gbc, 5); // skip bitstream id -+ -+ /* volume control params */ -+ for (int i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -+ hdr->dialog_normalization[i] = -get_bits(gbc, 5); -+ hdr->compression_exists[i] = get_bits1(gbc); -+ if (hdr->compression_exists[i]) -+ hdr->heavy_dynamic_range[i] = get_bits(gbc, 8); -+ } -+ -+ /* dependent stream channel map */ -+ if (hdr->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { -+ hdr->channel_map_present = get_bits1(gbc); -+ if (hdr->channel_map_present) { -+ int64_t channel_layout = 0; -+ int channel_map = get_bits(gbc, 16); -+ -+ for (int i = 0; i < 16; i++) -+ if (channel_map & (1 << (EAC3_MAX_CHANNELS - i - 1))) -+ channel_layout |= ff_eac3_custom_channel_map_locations[i][1]; -+ -+ if (av_popcount64(channel_layout) > EAC3_MAX_CHANNELS) { -+ return AC3_PARSE_ERROR_CHANNEL_MAP; -+ } -+ hdr->channel_map = channel_map; -+ } -+ } -+ -+ /* mixing metadata */ -+ if (get_bits1(gbc)) { -+ /* center and surround mix levels */ -+ if (hdr->channel_mode > AC3_CHMODE_STEREO) { -+ hdr->preferred_downmix = get_bits(gbc, 2); -+ if (hdr->channel_mode & 1) { -+ /* if three front channels exist */ -+ hdr->center_mix_level_ltrt = get_bits(gbc, 3); -+ hdr->center_mix_level = get_bits(gbc, 3); -+ } -+ if (hdr->channel_mode & 4) { -+ /* if a surround channel exists */ -+ hdr->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7); -+ hdr->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7); -+ } -+ } -+ -+ /* lfe mix level */ -+ if (hdr->lfe_on && (hdr->lfe_mix_level_exists = get_bits1(gbc))) { -+ hdr->lfe_mix_level = get_bits(gbc, 5); -+ } -+ -+ /* info for mixing with other streams and substreams */ -+ if (hdr->frame_type == EAC3_FRAME_TYPE_INDEPENDENT) { -+ for (int i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -+ // TODO: apply program scale factor -+ if (get_bits1(gbc)) { -+ skip_bits(gbc, 6); // skip program scale factor -+ } -+ } -+ if (get_bits1(gbc)) { -+ skip_bits(gbc, 6); // skip external program scale factor -+ } -+ /* skip mixing parameter data */ -+ switch(get_bits(gbc, 2)) { -+ case 1: skip_bits(gbc, 5); break; -+ case 2: skip_bits(gbc, 12); break; -+ case 3: { -+ int mix_data_size = (get_bits(gbc, 5) + 2) << 3; -+ skip_bits_long(gbc, mix_data_size); -+ break; -+ } -+ } -+ /* skip pan information for mono or dual mono source */ -+ if (hdr->channel_mode < AC3_CHMODE_STEREO) { -+ for (int i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -+ if (get_bits1(gbc)) { -+ /* note: this is not in the ATSC A/52B specification -+ reference: ETSI TS 102 366 V1.1.1 -+ section: E.1.3.1.25 */ -+ skip_bits(gbc, 8); // skip pan mean direction index -+ skip_bits(gbc, 6); // skip reserved paninfo bits -+ } -+ } -+ } -+ /* skip mixing configuration information */ -+ if (get_bits1(gbc)) { -+ for (int i = 0; i < hdr->num_blocks; i++) { -+ if (hdr->num_blocks == 1 || get_bits1(gbc)) { -+ skip_bits(gbc, 5); -+ } -+ } -+ } -+ } -+ } -+ -+ /* informational metadata */ -+ if (get_bits1(gbc)) { -+ hdr->bitstream_mode = get_bits(gbc, 3); -+ skip_bits(gbc, 2); // skip copyright bit and original bitstream bit -+ if (hdr->channel_mode == AC3_CHMODE_STEREO) { -+ hdr->dolby_surround_mode = get_bits(gbc, 2); -+ hdr->dolby_headphone_mode = get_bits(gbc, 2); -+ } -+ if (hdr->channel_mode >= AC3_CHMODE_2F2R) { -+ hdr->dolby_surround_ex_mode = get_bits(gbc, 2); -+ } -+ for (int i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -+ if (get_bits1(gbc)) { -+ skip_bits(gbc, 8); // skip mix level, room type, and A/D converter type -+ } -+ } -+ if (hdr->sr_code != EAC3_SR_CODE_REDUCED) { -+ skip_bits1(gbc); // skip source sample rate code -+ } -+ } -+ -+ /* converter synchronization flag -+ If frames are less than six blocks, this bit should be turned on -+ once every 6 blocks to indicate the start of a frame set. -+ reference: RFC 4598, Section 2.1.3 Frame Sets */ -+ if (hdr->frame_type == EAC3_FRAME_TYPE_INDEPENDENT && hdr->num_blocks != 6) { -+ skip_bits1(gbc); // skip converter synchronization flag -+ } -+ -+ /* original frame size code if this stream was converted from AC-3 */ -+ if (hdr->frame_type == EAC3_FRAME_TYPE_AC3_CONVERT && -+ (hdr->num_blocks == 6 || get_bits1(gbc))) { -+ skip_bits(gbc, 6); // skip frame size code -+ } -+ -+ /* additional bitstream info */ -+ if (get_bits1(gbc)) { -+ int addbsil = get_bits(gbc, 6); -+ for (int i = 0; i < addbsil + 1; i++) { -+ if (i == 0) { -+ /* In this 8 bit chunk, the LSB is equal to flag_ec3_extension_type_a -+ which can be used to detect Atmos presence */ -+ skip_bits(gbc, 7); -+ hdr->eac3_extension_type_a = get_bits1(gbc); -+ if (hdr->eac3_extension_type_a) { -+ hdr->complexity_index_type_a = get_bits(gbc, 8); -+ i++; -+ } -+ } else { -+ skip_bits(gbc, 8); // skip additional bit stream info -+ } -+ } -+ } -+ -+ return 0; -+} -+ - int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) - { - int frame_size_code; -@@ -133,6 +344,10 @@ - hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2; - hdr->frame_type = EAC3_FRAME_TYPE_AC3_CONVERT; //EAC3_FRAME_TYPE_INDEPENDENT; - hdr->substreamid = 0; -+ -+ int ret = ac3_parse_header(gbc, hdr); -+ if (ret < 0) -+ return ret; - } else { - /* Enhanced AC-3 */ - hdr->crc1 = 0; -@@ -165,6 +380,10 @@ - hdr->bit_rate = 8LL * hdr->frame_size * hdr->sample_rate / - (hdr->num_blocks * 256); - hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on; -+ -+ int ret = eac3_parse_header(gbc, hdr); -+ if (ret < 0) -+ return ret; - } - hdr->channel_layout = ff_ac3_channel_layout_tab[hdr->channel_mode]; - if (hdr->lfe_on) -@@ -202,9 +421,13 @@ - { - GetBitContext gb; - AC3HeaderInfo hdr; -+ uint8_t tmp[32 + AV_INPUT_BUFFER_PADDING_SIZE]; - int err; - -- err = init_get_bits8(&gb, buf, size); -+ size = FFMIN(32, size); -+ memcpy(tmp, buf, size); -+ memset(tmp + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); -+ err = init_get_bits8(&gb, tmp, size); - if (err < 0) - return AVERROR_INVALIDDATA; - err = ff_ac3_parse_header(&gb, &hdr); -diff -Naur ffmpeg-7.1.2.old/libavcodec/ac3_parser_internal.h ffmpeg-7.1.2/libavcodec/ac3_parser_internal.h ---- ffmpeg-7.1.2.old/libavcodec/ac3_parser_internal.h 2025-10-27 10:07:00.519473374 +0100 -+++ ffmpeg-7.1.2/libavcodec/ac3_parser_internal.h 2025-10-27 10:07:02.463059088 +0100 -@@ -46,6 +46,7 @@ - int substreamid; ///< substream identification - int center_mix_level; ///< Center mix level index - int surround_mix_level; ///< Surround mix level index -+ uint8_t channel_map_present; - uint16_t channel_map; - int num_blocks; ///< number of audio blocks - int dolby_surround_mode; -@@ -62,6 +63,23 @@ - uint64_t channel_layout; - int8_t ac3_bit_rate_code; - /** @} */ -+ -+ /** @name enhanced eac3 extension coded elements -+ * @{ -+ */ -+ int8_t dialog_normalization[2]; -+ uint8_t compression_exists[2]; -+ uint8_t heavy_dynamic_range[2]; -+ uint8_t center_mix_level_ltrt; ///< Center mix level index -+ uint8_t surround_mix_level_ltrt; ///< Surround mix level index -+ uint8_t dolby_headphone_mode; -+ uint8_t dolby_surround_ex_mode; -+ uint8_t lfe_mix_level_exists; -+ uint8_t lfe_mix_level; -+ uint8_t preferred_downmix; -+ uint8_t eac3_extension_type_a; -+ uint8_t complexity_index_type_a; -+ /** @} */ - } AC3HeaderInfo; - - typedef enum { -@@ -71,6 +89,7 @@ - AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a, - AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a, - AC3_PARSE_ERROR_CRC = -0x6030c0a, -+ AC3_PARSE_ERROR_CHANNEL_MAP = -0x7030c0a, - } AC3ParseError; - - /** -diff -Naur ffmpeg-7.1.2.old/libavcodec/allcodecs.c ffmpeg-7.1.2/libavcodec/allcodecs.c ---- ffmpeg-7.1.2.old/libavcodec/allcodecs.c 2025-10-27 10:07:01.864539025 +0100 -+++ ffmpeg-7.1.2/libavcodec/allcodecs.c 2025-10-27 10:07:02.458796899 +0100 -@@ -839,6 +839,7 @@ +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index 9d1c1fc..c94be5e 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1008,6 +1008,7 @@ OBJS-$(CONFIG_AV1_D3D12VA_HWACCEL) += dxva2_av1.o d3d12va_av1.o + OBJS-$(CONFIG_AV1_NVDEC_HWACCEL) += nvdec_av1.o + OBJS-$(CONFIG_AV1_VAAPI_HWACCEL) += vaapi_av1.o + OBJS-$(CONFIG_AV1_VDPAU_HWACCEL) += vdpau_av1.o ++OBJS-$(CONFIG_AV1_VIDEOTOOLBOX_HWACCEL) += videotoolbox_av1.o + OBJS-$(CONFIG_AV1_VULKAN_HWACCEL) += vulkan_decode.o vulkan_av1.o + OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o + OBJS-$(CONFIG_H263_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o +diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c +index aa0fc47..f531761 100644 +--- a/libavcodec/allcodecs.c ++++ b/libavcodec/allcodecs.c +@@ -838,6 +838,7 @@ extern const FFCodec ff_av1_nvenc_encoder; extern const FFCodec ff_av1_qsv_decoder; extern const FFCodec ff_av1_qsv_encoder; extern const FFCodec ff_av1_amf_encoder; @@ -489,59 +105,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/allcodecs.c ffmpeg-7.1.2/libavcodec/allco extern const FFCodec ff_av1_vaapi_encoder; extern const FFCodec ff_libopenh264_encoder; extern const FFCodec ff_libopenh264_decoder; -diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_av1.c ffmpeg-7.1.2/libavcodec/amfenc_av1.c ---- ffmpeg-7.1.2.old/libavcodec/amfenc_av1.c 2025-10-27 10:07:00.536473524 +0100 -+++ ffmpeg-7.1.2/libavcodec/amfenc_av1.c 2025-10-27 10:07:02.440481173 +0100 -@@ -116,6 +116,7 @@ - { "none", "no adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_AQ_MODE_NONE }, 0, 0, VE, .unit = "adaptive_quantisation_mode" }, - { "caq", "context adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_AQ_MODE_CAQ }, 0, 0, VE, .unit = "adaptive_quantisation_mode" }, - -+ { "forced_idr", "Force I frames to be IDR frames", OFFSET(forced_idr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, - - { "align", "alignment mode", OFFSET(align), AV_OPT_TYPE_INT, {.i64 = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS }, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS, VE, .unit = "align" }, - { "64x16", "", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY }, 0, 0, VE, .unit = "align" }, -@@ -186,6 +187,8 @@ - AMFRate framerate; - AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); - amf_int64 color_depth; -+ amf_int64 color_primaries; -+ amf_int64 transfer_characteristic; - amf_int64 color_profile; - enum AVPixelFormat pix_fmt; - -@@ -238,7 +241,11 @@ - } - - /// Color profile -+ color_primaries = ff_amf_get_color_primaries(avctx); -+ transfer_characteristic = ff_amf_get_transfer_characteristic(avctx); - color_profile = ff_amf_get_color_profile(avctx); -+ AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, color_primaries); -+ AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, transfer_characteristic); - AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PROFILE, color_profile); - - /// Color Depth -@@ -250,16 +257,6 @@ - } - - AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH, color_depth); -- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PROFILE, color_profile); -- if (color_depth == AMF_COLOR_BIT_DEPTH_8) { -- /// Color Transfer Characteristics (AMF matches ISO/IEC) -- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, AMF_COLOR_TRANSFER_CHARACTERISTIC_BT709); -- /// Color Primaries (AMF matches ISO/IEC) -- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, AMF_COLOR_PRIMARIES_BT709); -- } else { -- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, AMF_COLOR_TRANSFER_CHARACTERISTIC_SMPTE2084); -- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, AMF_COLOR_PRIMARIES_BT2020); -- } - - profile_level = avctx->level; - if (profile_level == AV_LEVEL_UNKNOWN) { -diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.c ffmpeg-7.1.2/libavcodec/amfenc.c ---- ffmpeg-7.1.2.old/libavcodec/amfenc.c 2025-10-27 10:07:00.387472209 +0100 -+++ ffmpeg-7.1.2/libavcodec/amfenc.c 2025-10-27 10:07:02.445244447 +0100 -@@ -415,10 +415,6 @@ +diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c +index a47aea6..95fce9a 100644 +--- a/libavcodec/amfenc.c ++++ b/libavcodec/amfenc.c +@@ -415,10 +415,6 @@ static int amf_init_encoder(AVCodecContext *avctx) else pix_fmt = avctx->pix_fmt; @@ -552,7 +120,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.c ffmpeg-7.1.2/libavcodec/amfenc.c ctx->format = amf_av_to_amf_format(pix_fmt); AMF_RETURN_IF_FALSE(ctx, ctx->format != AMF_SURFACE_UNKNOWN, AVERROR(EINVAL), "Format %s is not supported\n", av_get_pix_fmt_name(pix_fmt)); -@@ -766,11 +762,50 @@ +@@ -766,11 +762,50 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) switch (avctx->codec->id) { case AV_CODEC_ID_H264: AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_INSERT_AUD, !!ctx->aud); @@ -604,7 +172,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.c ffmpeg-7.1.2/libavcodec/amfenc.c default: break; } -@@ -878,6 +913,115 @@ +@@ -878,6 +913,115 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt) return ret; } @@ -720,10 +288,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.c ffmpeg-7.1.2/libavcodec/amfenc.c int ff_amf_get_color_profile(AVCodecContext *avctx) { amf_int64 color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN; -diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.h ffmpeg-7.1.2/libavcodec/amfenc.h ---- ffmpeg-7.1.2.old/libavcodec/amfenc.h 2025-10-27 10:07:00.322471636 +0100 -+++ ffmpeg-7.1.2/libavcodec/amfenc.h 2025-10-27 10:07:02.440421671 +0100 -@@ -114,6 +114,7 @@ +diff --git a/libavcodec/amfenc.h b/libavcodec/amfenc.h +index d985d01..0c0624e 100644 +--- a/libavcodec/amfenc.h ++++ b/libavcodec/amfenc.h +@@ -114,6 +114,7 @@ typedef struct AmfContext { int max_b_frames; int qvbr_quality_level; int hw_high_motion_quality_boost; @@ -731,7 +300,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.h ffmpeg-7.1.2/libavcodec/amfenc.h // HEVC - specific options -@@ -173,6 +174,8 @@ +@@ -173,6 +174,8 @@ int ff_amf_receive_packet(AVCodecContext *avctx, AVPacket *avpkt); */ extern const enum AVPixelFormat ff_amf_pix_fmts[]; @@ -740,10 +309,61 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc.h ffmpeg-7.1.2/libavcodec/amfenc.h int ff_amf_get_color_profile(AVCodecContext *avctx); /** -diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c ffmpeg-7.1.2/libavcodec/amfenc_h264.c ---- ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c 2025-10-27 10:07:00.604474124 +0100 -+++ ffmpeg-7.1.2/libavcodec/amfenc_h264.c 2025-10-27 10:07:02.440571423 +0100 -@@ -133,6 +133,7 @@ +diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c +index 2a7a782..a947c1d 100644 +--- a/libavcodec/amfenc_av1.c ++++ b/libavcodec/amfenc_av1.c +@@ -116,6 +116,7 @@ static const AVOption options[] = { + { "none", "no adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_AQ_MODE_NONE }, 0, 0, VE, .unit = "adaptive_quantisation_mode" }, + { "caq", "context adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_AQ_MODE_CAQ }, 0, 0, VE, .unit = "adaptive_quantisation_mode" }, + ++ { "forced_idr", "Force I frames to be IDR frames", OFFSET(forced_idr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + + { "align", "alignment mode", OFFSET(align), AV_OPT_TYPE_INT, {.i64 = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS }, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY, AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_NO_RESTRICTIONS, VE, .unit = "align" }, + { "64x16", "", 0, AV_OPT_TYPE_CONST, {.i64 = AMF_VIDEO_ENCODER_AV1_ALIGNMENT_MODE_64X16_ONLY }, 0, 0, VE, .unit = "align" }, +@@ -186,6 +187,8 @@ static av_cold int amf_encode_init_av1(AVCodecContext* avctx) + AMFRate framerate; + AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); + amf_int64 color_depth; ++ amf_int64 color_primaries; ++ amf_int64 transfer_characteristic; + amf_int64 color_profile; + enum AVPixelFormat pix_fmt; + +@@ -238,7 +241,11 @@ FF_ENABLE_DEPRECATION_WARNINGS + } + + /// Color profile ++ color_primaries = ff_amf_get_color_primaries(avctx); ++ transfer_characteristic = ff_amf_get_transfer_characteristic(avctx); + color_profile = ff_amf_get_color_profile(avctx); ++ AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, color_primaries); ++ AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, transfer_characteristic); + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PROFILE, color_profile); + + /// Color Depth +@@ -250,16 +257,6 @@ FF_ENABLE_DEPRECATION_WARNINGS + } + + AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_COLOR_BIT_DEPTH, color_depth); +- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PROFILE, color_profile); +- if (color_depth == AMF_COLOR_BIT_DEPTH_8) { +- /// Color Transfer Characteristics (AMF matches ISO/IEC) +- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, AMF_COLOR_TRANSFER_CHARACTERISTIC_BT709); +- /// Color Primaries (AMF matches ISO/IEC) +- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, AMF_COLOR_PRIMARIES_BT709); +- } else { +- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_TRANSFER_CHARACTERISTIC, AMF_COLOR_TRANSFER_CHARACTERISTIC_SMPTE2084); +- AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_OUTPUT_COLOR_PRIMARIES, AMF_COLOR_PRIMARIES_BT2020); +- } + + profile_level = avctx->level; + if (profile_level == AV_LEVEL_UNKNOWN) { +diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c +index 8edd39c..2406f74 100644 +--- a/libavcodec/amfenc_h264.c ++++ b/libavcodec/amfenc_h264.c +@@ -133,6 +133,7 @@ static const AVOption options[] = { { "me_half_pel", "Enable ME Half Pixel", OFFSET(me_half_pel), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, { "me_quarter_pel", "Enable ME Quarter Pixel", OFFSET(me_quarter_pel),AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, @@ -751,7 +371,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c ffmpeg-7.1.2/libavcodec/amf { "aud", "Inserts AU Delimiter NAL unit", OFFSET(aud) , AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, -@@ -201,6 +202,8 @@ +@@ -201,6 +202,8 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) AMFRate framerate; AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); int deblocking_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; @@ -760,7 +380,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c ffmpeg-7.1.2/libavcodec/amf amf_int64 color_profile; enum AVPixelFormat pix_fmt; -@@ -273,7 +276,11 @@ +@@ -273,7 +276,11 @@ FF_ENABLE_DEPRECATION_WARNINGS AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, AMF_VIDEO_ENCODER_ASPECT_RATIO, ratio); } @@ -772,7 +392,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c ffmpeg-7.1.2/libavcodec/amf AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_OUTPUT_COLOR_PROFILE, color_profile); /// Color Range (Support for older Drivers) -@@ -287,10 +294,6 @@ +@@ -287,10 +294,6 @@ FF_ENABLE_DEPRECATION_WARNINGS AMF_RETURN_IF_FALSE(ctx, pix_fmt != AV_PIX_FMT_P010, AVERROR_INVALIDDATA, "10-bit input video is not supported by AMF H264 encoder\n"); AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_COLOR_BIT_DEPTH, AMF_COLOR_BIT_DEPTH_8); @@ -783,10 +403,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_h264.c ffmpeg-7.1.2/libavcodec/amf // autodetect rate control method if (ctx->rate_control_mode == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN) { -diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c ffmpeg-7.1.2/libavcodec/amfenc_hevc.c ---- ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c 2025-10-27 10:07:00.324471654 +0100 -+++ ffmpeg-7.1.2/libavcodec/amfenc_hevc.c 2025-10-27 10:07:02.440657756 +0100 -@@ -100,6 +100,7 @@ +diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c +index 4898824..9d3604d 100644 +--- a/libavcodec/amfenc_hevc.c ++++ b/libavcodec/amfenc_hevc.c +@@ -100,6 +100,7 @@ static const AVOption options[] = { { "me_half_pel", "Enable ME Half Pixel", OFFSET(me_half_pel), AV_OPT_TYPE_BOOL,{ .i64 = -1 }, -1, 1, VE }, { "me_quarter_pel", "Enable ME Quarter Pixel ", OFFSET(me_quarter_pel),AV_OPT_TYPE_BOOL,{ .i64 = -1 }, -1, 1, VE }, @@ -794,7 +415,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c ffmpeg-7.1.2/libavcodec/amf { "aud", "Inserts AU Delimiter NAL unit", OFFSET(aud) ,AV_OPT_TYPE_BOOL,{ .i64 = -1 }, -1, 1, VE }, -@@ -167,6 +168,8 @@ +@@ -167,6 +168,8 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) AMFSize framesize = AMFConstructSize(avctx->width, avctx->height); int deblocking_filter = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0; amf_int64 color_depth; @@ -803,7 +424,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c ffmpeg-7.1.2/libavcodec/amf amf_int64 color_profile; enum AVPixelFormat pix_fmt; -@@ -241,7 +244,11 @@ +@@ -241,7 +244,11 @@ FF_ENABLE_DEPRECATION_WARNINGS AMF_ASSIGN_PROPERTY_RATIO(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_ASPECT_RATIO, ratio); } @@ -815,7 +436,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c ffmpeg-7.1.2/libavcodec/amf AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_OUTPUT_COLOR_PROFILE, color_profile); /// Color Range (Support for older Drivers) AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_NOMINAL_RANGE, !!(avctx->color_range == AVCOL_RANGE_JPEG)); -@@ -253,15 +260,6 @@ +@@ -253,15 +260,6 @@ FF_ENABLE_DEPRECATION_WARNINGS color_depth = AMF_COLOR_BIT_DEPTH_10; } AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_COLOR_BIT_DEPTH, color_depth); @@ -831,10 +452,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/amfenc_hevc.c ffmpeg-7.1.2/libavcodec/amf // Picture control properties AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_NUM_GOPS_PER_IDR, ctx->gops_per_idr); -diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c ---- ffmpeg-7.1.2.old/libavcodec/av1dec.c 2025-10-27 10:07:00.478473013 +0100 -+++ ffmpeg-7.1.2/libavcodec/av1dec.c 2025-10-27 10:07:02.454638605 +0100 -@@ -541,6 +541,7 @@ +diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c +index d921def..86cc007 100644 +--- a/libavcodec/av1dec.c ++++ b/libavcodec/av1dec.c +@@ -542,6 +542,7 @@ static int get_pixel_format(AVCodecContext *avctx) CONFIG_AV1_NVDEC_HWACCEL + \ CONFIG_AV1_VAAPI_HWACCEL + \ CONFIG_AV1_VDPAU_HWACCEL + \ @@ -842,7 +464,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c CONFIG_AV1_VULKAN_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; -@@ -568,6 +569,9 @@ +@@ -569,6 +570,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VDPAU_HWACCEL *fmtp++ = AV_PIX_FMT_VDPAU; #endif @@ -852,7 +474,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c #if CONFIG_AV1_VULKAN_HWACCEL *fmtp++ = AV_PIX_FMT_VULKAN; #endif -@@ -592,6 +596,9 @@ +@@ -593,6 +597,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VDPAU_HWACCEL *fmtp++ = AV_PIX_FMT_VDPAU; #endif @@ -862,7 +484,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c #if CONFIG_AV1_VULKAN_HWACCEL *fmtp++ = AV_PIX_FMT_VULKAN; #endif -@@ -1002,6 +1009,8 @@ +@@ -1003,6 +1010,8 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, break; } case ITU_T_T35_PROVIDER_CODE_DOLBY: { @@ -871,7 +493,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c int provider_oriented_code = bytestream2_get_be32(&gb); if (itut_t35->itu_t_t35_country_code != ITU_T_T35_COUNTRY_CODE_US || provider_oriented_code != 0x800) -@@ -1014,6 +1023,18 @@ +@@ -1015,6 +1024,18 @@ static int export_itut_t35(AVCodecContext *avctx, AVFrame *frame, break; // ignore } @@ -890,7 +512,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c ret = ff_dovi_attach_side_data(&s->dovi, frame); if (ret < 0) return ret; -@@ -1439,6 +1460,10 @@ +@@ -1447,6 +1468,10 @@ static int av1_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) if (raw_tile_group && (s->tile_num == raw_tile_group->tg_end + 1)) { int show_frame = s->raw_frame_header->show_frame; @@ -901,7 +523,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c if (avctx->hwaccel && s->cur_frame.f) { ret = FF_HW_SIMPLE_CALL(avctx, end_frame); if (ret < 0) { -@@ -1449,6 +1474,8 @@ +@@ -1457,6 +1482,8 @@ static int av1_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) update_reference_list(avctx); @@ -910,7 +532,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c raw_tile_group = NULL; s->raw_frame_header = NULL; -@@ -1478,7 +1505,7 @@ +@@ -1486,7 +1513,7 @@ end: s->raw_frame_header = NULL; av_packet_unref(s->pkt); ff_cbs_fragment_reset(&s->current_obu); @@ -919,7 +541,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c } if (!ret && !frame->buf[0]) ret = AVERROR(EAGAIN); -@@ -1505,7 +1532,7 @@ +@@ -1513,7 +1540,7 @@ static int av1_receive_frame(AVCodecContext *avctx, AVFrame *frame) return ret; } @@ -928,7 +550,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c av_log(avctx, AV_LOG_DEBUG, "Total OBUs on this packet: %d.\n", s->current_obu.nb_units); } -@@ -1526,7 +1553,7 @@ +@@ -1534,7 +1561,7 @@ static void av1_decode_flush(AVCodecContext *avctx) av1_frame_unref(&s->cur_frame); s->operating_point_idc = 0; @@ -937,7 +559,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c s->raw_frame_header = NULL; s->raw_seq = NULL; s->cll = NULL; -@@ -1594,6 +1621,9 @@ +@@ -1602,6 +1629,9 @@ const FFCodec ff_av1_decoder = { #if CONFIG_AV1_VDPAU_HWACCEL HWACCEL_VDPAU(av1), #endif @@ -947,10 +569,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.c ffmpeg-7.1.2/libavcodec/av1dec.c #if CONFIG_AV1_VULKAN_HWACCEL HWACCEL_VULKAN(av1), #endif -diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.h ffmpeg-7.1.2/libavcodec/av1dec.h ---- ffmpeg-7.1.2.old/libavcodec/av1dec.h 2025-10-27 10:07:00.402472342 +0100 -+++ ffmpeg-7.1.2/libavcodec/av1dec.h 2025-10-27 10:07:02.454762738 +0100 -@@ -114,7 +114,8 @@ +diff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h +index 8b2a7b0..10c807f 100644 +--- a/libavcodec/av1dec.h ++++ b/libavcodec/av1dec.h +@@ -114,7 +114,8 @@ typedef struct AV1DecContext { AV1Frame ref[AV1_NUM_REF_FRAMES]; AV1Frame cur_frame; @@ -960,10 +583,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/av1dec.h ffmpeg-7.1.2/libavcodec/av1dec.h // AVOptions int operating_point; -diff -Naur ffmpeg-7.1.2.old/libavcodec/bsf/hevc_mp4toannexb.c ffmpeg-7.1.2/libavcodec/bsf/hevc_mp4toannexb.c ---- ffmpeg-7.1.2.old/libavcodec/bsf/hevc_mp4toannexb.c 2025-10-27 10:07:00.449472757 +0100 -+++ ffmpeg-7.1.2/libavcodec/bsf/hevc_mp4toannexb.c 2025-10-27 10:07:02.435022530 +0100 -@@ -125,6 +125,7 @@ +diff --git a/libavcodec/bsf/hevc_mp4toannexb.c b/libavcodec/bsf/hevc_mp4toannexb.c +index f281185..241fa07 100644 +--- a/libavcodec/bsf/hevc_mp4toannexb.c ++++ b/libavcodec/bsf/hevc_mp4toannexb.c +@@ -125,6 +125,7 @@ static int hevc_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out) AVPacket *in; GetByteContext gb; @@ -971,7 +595,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/bsf/hevc_mp4toannexb.c ffmpeg-7.1.2/libav int got_irap = 0; int i, ret = 0; -@@ -158,11 +159,14 @@ +@@ -158,11 +159,14 @@ static int hevc_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out) } nalu_type = (bytestream2_peek_byte(&gb) >> 1) & 0x3f; @@ -987,10 +611,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/bsf/hevc_mp4toannexb.c ffmpeg-7.1.2/libav extra_size = add_extradata * ctx->par_out->extradata_size; got_irap |= is_irap; -diff -Naur ffmpeg-7.1.2.old/libavcodec/ccaption_dec.c ffmpeg-7.1.2/libavcodec/ccaption_dec.c ---- ffmpeg-7.1.2.old/libavcodec/ccaption_dec.c 2025-10-27 10:07:00.593474027 +0100 -+++ ffmpeg-7.1.2/libavcodec/ccaption_dec.c 2025-10-27 10:07:02.429490227 +0100 -@@ -889,12 +889,13 @@ +diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c +index d8b992b..4a38664 100644 +--- a/libavcodec/ccaption_dec.c ++++ b/libavcodec/ccaption_dec.c +@@ -889,12 +889,13 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub, if (ctx->buffer[bidx].str[0] || ctx->real_time) { ff_dlog(ctx, "cdp writing data (%s)\n", ctx->buffer[bidx].str); @@ -1008,10 +633,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/ccaption_dec.c ffmpeg-7.1.2/libavcodec/cc else sub->end_display_time = -1; ret = ff_ass_add_rect2(sub, ctx->buffer[bidx].str, ctx->readorder++, 0, NULL, NULL, &nb_rect_allocated); -diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsubdec.c ---- ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c 2025-10-27 10:07:00.303471468 +0100 -+++ ffmpeg-7.1.2/libavcodec/dvdsubdec.c 2025-10-27 10:07:02.428490218 +0100 -@@ -45,6 +45,8 @@ +diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c +index f876935..bd32b7d 100644 +--- a/libavcodec/dvdsubdec.c ++++ b/libavcodec/dvdsubdec.c +@@ -45,6 +45,8 @@ typedef struct DVDSubContext int buf_size; int forced_subs_only; uint8_t used_color[256]; @@ -1020,7 +646,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu } DVDSubContext; static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *rgba, int num_values) -@@ -230,7 +232,10 @@ +@@ -230,7 +232,10 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, uint32_t size; int64_t offset1, offset2; @@ -1032,7 +658,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu return -1; if (AV_RB16(buf) == 0) { /* HD subpicture with 4-byte offsets */ -@@ -243,15 +248,22 @@ +@@ -243,15 +248,22 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, cmd_pos = 2; } @@ -1061,7 +687,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu } while (cmd_pos > 0 && cmd_pos < buf_size - 2 - offset_size) { -@@ -524,10 +536,13 @@ +@@ -524,10 +536,13 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub, int appended = 0; int is_menu; @@ -1075,7 +701,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu return ret; } buf = ctx->buf; -@@ -538,7 +553,12 @@ +@@ -538,7 +553,12 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub, is_menu = decode_dvd_subtitles(ctx, sub, buf, buf_size); if (is_menu == AVERROR(EAGAIN)) { *data_size = 0; @@ -1089,7 +715,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu } if (is_menu < 0) { -@@ -547,9 +567,10 @@ +@@ -547,9 +567,10 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub, reset_rects(sub); *data_size = 0; @@ -1101,7 +727,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu goto no_subtitle; if (ctx->forced_subs_only && !(sub->rects[0]->flags & AV_SUBTITLE_FLAG_FORCED)) -@@ -557,6 +578,8 @@ +@@ -557,6 +578,8 @@ static int dvdsub_decode(AVCodecContext *avctx, AVSubtitle *sub, ctx->buf_size = 0; *data_size = 1; @@ -1110,7 +736,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu return buf_size; } -@@ -682,6 +705,7 @@ +@@ -682,6 +705,7 @@ static av_cold int dvdsub_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, " 0x%06"PRIx32, ctx->palette[i]); av_log(avctx, AV_LOG_DEBUG, "\n"); } @@ -1118,7 +744,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu return 1; } -@@ -698,6 +722,7 @@ +@@ -698,6 +722,7 @@ static const AVOption options[] = { { "palette", "set the global palette", OFFSET(palette_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD }, { "ifo_palette", "obtain the global palette from .IFO file", OFFSET(ifo_str), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD }, { "forced_subs_only", "Only show forced subtitles", OFFSET(forced_subs_only), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, SD}, @@ -1126,207 +752,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/dvdsubdec.c ffmpeg-7.1.2/libavcodec/dvdsu { NULL } }; static const AVClass dvdsub_class = { -diff -Naur ffmpeg-7.1.2.old/libavcodec/eac3dec.c ffmpeg-7.1.2/libavcodec/eac3dec.c ---- ffmpeg-7.1.2.old/libavcodec/eac3dec.c 2025-10-27 10:07:00.490473118 +0100 -+++ ffmpeg-7.1.2/libavcodec/eac3dec.c 2025-10-27 10:07:02.463392296 +0100 -@@ -53,8 +53,6 @@ - EAC3_GAQ_124 - } EAC3GaqMode; - --#define EAC3_SR_CODE_REDUCED 3 -- - static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s) - { - int bin, bnd, ch, i; -@@ -287,7 +285,7 @@ - } - } - --static int ff_eac3_parse_header(AC3DecodeContext *s) -+static int ff_eac3_parse_header(AC3DecodeContext *s, const AC3HeaderInfo *hdr) - { - int i, blk, ch; - int ac3_exponent_strategy, parse_aht_info, parse_spx_atten_data; -@@ -323,11 +321,10 @@ - avpriv_request_sample(s->avctx, "Reduced sampling rate"); - return AVERROR_PATCHWELCOME; - } -- skip_bits(gbc, 5); // skip bitstream id - - /* volume control params */ - for (i = 0; i < (s->channel_mode ? 1 : 2); i++) { -- s->dialog_normalization[i] = -get_bits(gbc, 5); -+ s->dialog_normalization[i] = hdr->dialog_normalization[i]; - if (s->dialog_normalization[i] == 0) { - s->dialog_normalization[i] = -31; - } -@@ -335,147 +332,30 @@ - s->level_gain[i] = powf(2.0f, - (float)(s->target_level - s->dialog_normalization[i])/6.0f); - } -- s->compression_exists[i] = get_bits1(gbc); -- if (s->compression_exists[i]) { -- s->heavy_dynamic_range[i] = AC3_HEAVY_RANGE(get_bits(gbc, 8)); -+ if (hdr->compression_exists[i]) { -+ s->heavy_dynamic_range[i] = AC3_HEAVY_RANGE(hdr->heavy_dynamic_range[i]); - } - } - -- /* dependent stream channel map */ -- if (s->frame_type == EAC3_FRAME_TYPE_DEPENDENT) { -- if (get_bits1(gbc)) { -- int64_t channel_layout = 0; -- int channel_map = get_bits(gbc, 16); -- av_log(s->avctx, AV_LOG_DEBUG, "channel_map: %0X\n", channel_map); -- -- for (i = 0; i < 16; i++) -- if (channel_map & (1 << (EAC3_MAX_CHANNELS - i - 1))) -- channel_layout |= ff_eac3_custom_channel_map_locations[i][1]; -- -- if (av_popcount64(channel_layout) > EAC3_MAX_CHANNELS) { -- return AVERROR_INVALIDDATA; -- } -- s->channel_map = channel_map; -- } -- } -+ s->channel_map = hdr->channel_map; - - /* mixing metadata */ -- if (get_bits1(gbc)) { -- /* center and surround mix levels */ -- if (s->channel_mode > AC3_CHMODE_STEREO) { -- s->preferred_downmix = get_bits(gbc, 2); -- if (s->channel_mode & 1) { -- /* if three front channels exist */ -- s->center_mix_level_ltrt = get_bits(gbc, 3); -- s->center_mix_level = get_bits(gbc, 3); -- } -- if (s->channel_mode & 4) { -- /* if a surround channel exists */ -- s->surround_mix_level_ltrt = av_clip(get_bits(gbc, 3), 3, 7); -- s->surround_mix_level = av_clip(get_bits(gbc, 3), 3, 7); -- } -- } -- -- /* lfe mix level */ -- if (s->lfe_on && (s->lfe_mix_level_exists = get_bits1(gbc))) { -- s->lfe_mix_level = get_bits(gbc, 5); -- } -- -- /* info for mixing with other streams and substreams */ -- if (s->frame_type == EAC3_FRAME_TYPE_INDEPENDENT) { -- for (i = 0; i < (s->channel_mode ? 1 : 2); i++) { -- // TODO: apply program scale factor -- if (get_bits1(gbc)) { -- skip_bits(gbc, 6); // skip program scale factor -- } -- } -- if (get_bits1(gbc)) { -- skip_bits(gbc, 6); // skip external program scale factor -- } -- /* skip mixing parameter data */ -- switch(get_bits(gbc, 2)) { -- case 1: skip_bits(gbc, 5); break; -- case 2: skip_bits(gbc, 12); break; -- case 3: { -- int mix_data_size = (get_bits(gbc, 5) + 2) << 3; -- skip_bits_long(gbc, mix_data_size); -- break; -- } -- } -- /* skip pan information for mono or dual mono source */ -- if (s->channel_mode < AC3_CHMODE_STEREO) { -- for (i = 0; i < (s->channel_mode ? 1 : 2); i++) { -- if (get_bits1(gbc)) { -- /* note: this is not in the ATSC A/52B specification -- reference: ETSI TS 102 366 V1.1.1 -- section: E.1.3.1.25 */ -- skip_bits(gbc, 8); // skip pan mean direction index -- skip_bits(gbc, 6); // skip reserved paninfo bits -- } -- } -- } -- /* skip mixing configuration information */ -- if (get_bits1(gbc)) { -- for (blk = 0; blk < s->num_blocks; blk++) { -- if (s->num_blocks == 1 || get_bits1(gbc)) { -- skip_bits(gbc, 5); -- } -- } -- } -- } -- } -+ s->preferred_downmix = hdr->preferred_downmix; -+ s->center_mix_level_ltrt = hdr->center_mix_level_ltrt; -+ s->center_mix_level = hdr->center_mix_level; -+ s->surround_mix_level_ltrt = hdr->surround_mix_level_ltrt; -+ s->surround_mix_level = hdr->surround_mix_level; -+ s->lfe_mix_level_exists = hdr->lfe_mix_level_exists; -+ s->lfe_mix_level = hdr->lfe_mix_level; -+ s->dolby_surround_mode = hdr->dolby_surround_mode; -+ s->dolby_headphone_mode = hdr->dolby_headphone_mode; -+ s->dolby_surround_ex_mode = hdr->dolby_surround_ex_mode; - - /* informational metadata */ -- if (get_bits1(gbc)) { -- s->bitstream_mode = get_bits(gbc, 3); -- skip_bits(gbc, 2); // skip copyright bit and original bitstream bit -- if (s->channel_mode == AC3_CHMODE_STEREO) { -- s->dolby_surround_mode = get_bits(gbc, 2); -- s->dolby_headphone_mode = get_bits(gbc, 2); -- } -- if (s->channel_mode >= AC3_CHMODE_2F2R) { -- s->dolby_surround_ex_mode = get_bits(gbc, 2); -- } -- for (i = 0; i < (s->channel_mode ? 1 : 2); i++) { -- if (get_bits1(gbc)) { -- skip_bits(gbc, 8); // skip mix level, room type, and A/D converter type -- } -- } -- if (s->bit_alloc_params.sr_code != EAC3_SR_CODE_REDUCED) { -- skip_bits1(gbc); // skip source sample rate code -- } -- } -- -- /* converter synchronization flag -- If frames are less than six blocks, this bit should be turned on -- once every 6 blocks to indicate the start of a frame set. -- reference: RFC 4598, Section 2.1.3 Frame Sets */ -- if (s->frame_type == EAC3_FRAME_TYPE_INDEPENDENT && s->num_blocks != 6) { -- skip_bits1(gbc); // skip converter synchronization flag -- } -- -- /* original frame size code if this stream was converted from AC-3 */ -- if (s->frame_type == EAC3_FRAME_TYPE_AC3_CONVERT && -- (s->num_blocks == 6 || get_bits1(gbc))) { -- skip_bits(gbc, 6); // skip frame size code -- } -+ s->bitstream_mode = hdr->bitstream_mode; - - /* additional bitstream info */ -- if (get_bits1(gbc)) { -- int addbsil = get_bits(gbc, 6); -- for (i = 0; i < addbsil + 1; i++) { -- if (i == 0) { -- /* In this 8 bit chunk, the LSB is equal to flag_ec3_extension_type_a -- which can be used to detect Atmos presence */ -- skip_bits(gbc, 7); -- if (get_bits1(gbc)) { -- s->eac3_extension_type_a = 1; -- } -- } else { -- skip_bits(gbc, 8); // skip additional bit stream info -- } -- } -- } -+ s->eac3_extension_type_a = hdr->eac3_extension_type_a; - - /* audio frame syntax flags, strategy data, and per-frame data */ - -diff -Naur ffmpeg-7.1.2.old/libavcodec/hwaccels.h ffmpeg-7.1.2/libavcodec/hwaccels.h ---- ffmpeg-7.1.2.old/libavcodec/hwaccels.h 2025-10-27 10:07:00.251471009 +0100 -+++ ffmpeg-7.1.2/libavcodec/hwaccels.h 2025-10-27 10:07:02.454807062 +0100 -@@ -26,6 +26,7 @@ +diff --git a/libavcodec/hwaccels.h b/libavcodec/hwaccels.h +index 5171e4c..2b9bdc8 100644 +--- a/libavcodec/hwaccels.h ++++ b/libavcodec/hwaccels.h +@@ -26,6 +26,7 @@ extern const struct FFHWAccel ff_av1_dxva2_hwaccel; extern const struct FFHWAccel ff_av1_nvdec_hwaccel; extern const struct FFHWAccel ff_av1_vaapi_hwaccel; extern const struct FFHWAccel ff_av1_vdpau_hwaccel; @@ -1334,10 +764,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/hwaccels.h ffmpeg-7.1.2/libavcodec/hwacce extern const struct FFHWAccel ff_av1_vulkan_hwaccel; extern const struct FFHWAccel ff_h263_vaapi_hwaccel; extern const struct FFHWAccel ff_h263_videotoolbox_hwaccel; -diff -Naur ffmpeg-7.1.2.old/libavcodec/libdav1d.c ffmpeg-7.1.2/libavcodec/libdav1d.c ---- ffmpeg-7.1.2.old/libavcodec/libdav1d.c 2025-10-27 10:07:00.474472977 +0100 -+++ ffmpeg-7.1.2/libavcodec/libdav1d.c 2025-10-27 10:07:02.436286040 +0100 -@@ -563,6 +563,8 @@ +diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c +index ff67f44..354e9b7 100644 +--- a/libavcodec/libdav1d.c ++++ b/libavcodec/libdav1d.c +@@ -563,6 +563,8 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) break; } case ITU_T_T35_PROVIDER_CODE_DOLBY: { @@ -1346,7 +777,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/libdav1d.c ffmpeg-7.1.2/libavcodec/libdav int provider_oriented_code = bytestream2_get_be32(&gb); if (itut_t35->country_code != ITU_T_T35_COUNTRY_CODE_US || provider_oriented_code != 0x800) -@@ -575,6 +577,18 @@ +@@ -575,6 +577,18 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame) break; // ignore } @@ -1365,29 +796,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/libdav1d.c ffmpeg-7.1.2/libavcodec/libdav res = ff_dovi_attach_side_data(&dav1d->dovi, frame); if (res < 0) goto fail; -diff -Naur ffmpeg-7.1.2.old/libavcodec/Makefile ffmpeg-7.1.2/libavcodec/Makefile ---- ffmpeg-7.1.2.old/libavcodec/Makefile 2025-10-27 10:07:01.865180885 +0100 -+++ ffmpeg-7.1.2/libavcodec/Makefile 2025-10-27 10:07:02.454516424 +0100 -@@ -1008,6 +1008,7 @@ - OBJS-$(CONFIG_AV1_NVDEC_HWACCEL) += nvdec_av1.o - OBJS-$(CONFIG_AV1_VAAPI_HWACCEL) += vaapi_av1.o - OBJS-$(CONFIG_AV1_VDPAU_HWACCEL) += vdpau_av1.o -+OBJS-$(CONFIG_AV1_VIDEOTOOLBOX_HWACCEL) += videotoolbox_av1.o - OBJS-$(CONFIG_AV1_VULKAN_HWACCEL) += vulkan_decode.o vulkan_av1.o - OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o - OBJS-$(CONFIG_H263_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o -diff -Naur ffmpeg-7.1.2.old/libavcodec/mfenc.c ffmpeg-7.1.2/libavcodec/mfenc.c ---- ffmpeg-7.1.2.old/libavcodec/mfenc.c 2025-10-27 10:07:00.524473418 +0100 -+++ ffmpeg-7.1.2/libavcodec/mfenc.c 2025-10-27 10:07:02.459027162 +0100 -@@ -1315,3 +1315,4 @@ - - MF_ENCODER(VIDEO, h264, H264, venc_opts, VFMTS, VCAPS, defaults); - MF_ENCODER(VIDEO, hevc, HEVC, venc_opts, VFMTS, VCAPS, defaults); -+MF_ENCODER(VIDEO, av1, AV1, venc_opts, VFMTS, VCAPS, defaults); -diff -Naur ffmpeg-7.1.2.old/libavcodec/mf_utils.c ffmpeg-7.1.2/libavcodec/mf_utils.c ---- ffmpeg-7.1.2.old/libavcodec/mf_utils.c 2025-10-27 10:07:00.467472915 +0100 -+++ ffmpeg-7.1.2/libavcodec/mf_utils.c 2025-10-27 10:07:02.458887429 +0100 -@@ -240,6 +240,7 @@ +diff --git a/libavcodec/mf_utils.c b/libavcodec/mf_utils.c +index 48e3a63..ff44130 100644 +--- a/libavcodec/mf_utils.c ++++ b/libavcodec/mf_utils.c +@@ -240,6 +240,7 @@ static struct GUID_Entry guid_names[] = { GUID_ENTRY(MFMediaType_Video), GUID_ENTRY(MFAudioFormat_PCM), GUID_ENTRY(MFAudioFormat_Float), @@ -1395,7 +808,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/mf_utils.c ffmpeg-7.1.2/libavcodec/mf_uti GUID_ENTRY(MFVideoFormat_H264), GUID_ENTRY(MFVideoFormat_H264_ES), GUID_ENTRY(ff_MFVideoFormat_HEVC), -@@ -507,6 +508,7 @@ +@@ -507,6 +508,7 @@ void ff_media_type_dump(void *log, IMFMediaType *type) const CLSID *ff_codec_to_mf_subtype(enum AVCodecID codec) { switch (codec) { @@ -1403,10 +816,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/mf_utils.c ffmpeg-7.1.2/libavcodec/mf_uti case AV_CODEC_ID_H264: return &MFVideoFormat_H264; case AV_CODEC_ID_HEVC: return &ff_MFVideoFormat_HEVC; case AV_CODEC_ID_AC3: return &MFAudioFormat_Dolby_AC3; -diff -Naur ffmpeg-7.1.2.old/libavcodec/mf_utils.h ffmpeg-7.1.2/libavcodec/mf_utils.h ---- ffmpeg-7.1.2.old/libavcodec/mf_utils.h 2025-10-27 10:07:00.429472580 +0100 -+++ ffmpeg-7.1.2/libavcodec/mf_utils.h 2025-10-27 10:07:02.458955668 +0100 -@@ -113,6 +113,7 @@ +diff --git a/libavcodec/mf_utils.h b/libavcodec/mf_utils.h +index 387c005..a59b36d 100644 +--- a/libavcodec/mf_utils.h ++++ b/libavcodec/mf_utils.h +@@ -113,6 +113,7 @@ DEFINE_GUID(ff_MF_SA_MINIMUM_OUTPUT_SAMPLE_COUNT_PROGRESSIVE, 0xf5523a5, 0x1cb2, DEFINE_MEDIATYPE_GUID(ff_MFVideoFormat_HEVC, 0x43564548); // FCC('HEVC') DEFINE_MEDIATYPE_GUID(ff_MFVideoFormat_HEVC_ES, 0x53564548); // FCC('HEVS') @@ -1414,9 +828,19 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/mf_utils.h ffmpeg-7.1.2/libavcodec/mf_uti // This enum is missing from mingw-w64's codecapi.h by v7.0.0. -diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssubdec.c ---- ffmpeg-7.1.2.old/libavcodec/pgssubdec.c 2025-10-27 10:07:00.318471601 +0100 -+++ ffmpeg-7.1.2/libavcodec/pgssubdec.c 2025-10-27 10:07:02.446191090 +0100 +diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c +index b8f8a25..c062d87 100644 +--- a/libavcodec/mfenc.c ++++ b/libavcodec/mfenc.c +@@ -1315,3 +1315,4 @@ static const FFCodecDefault defaults[] = { + + MF_ENCODER(VIDEO, h264, H264, venc_opts, VFMTS, VCAPS, defaults); + MF_ENCODER(VIDEO, hevc, HEVC, venc_opts, VFMTS, VCAPS, defaults); ++MF_ENCODER(VIDEO, av1, AV1, venc_opts, VFMTS, VCAPS, defaults); +diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c +index d93bcf1..9e2e8bf 100644 +--- a/libavcodec/pgssubdec.c ++++ b/libavcodec/pgssubdec.c @@ -35,9 +35,11 @@ #include "libavutil/opt.h" @@ -1432,7 +856,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu enum SegmentType { PALETTE_SEGMENT = 0x14, -@@ -48,57 +50,80 @@ +@@ -48,57 +50,80 @@ enum SegmentType { }; typedef struct PGSSubObjectRef { @@ -1536,7 +960,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu static void flush_cache(AVCodecContext *avctx) { PGSSubContext *ctx = avctx->priv_data; -@@ -106,8 +131,11 @@ +@@ -106,8 +131,11 @@ static void flush_cache(AVCodecContext *avctx) for (i = 0; i < ctx->objects.count; i++) { av_freep(&ctx->objects.object[i].rle); @@ -1549,7 +973,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu } ctx->objects.count = 0; ctx->palettes.count = 0; -@@ -144,6 +172,7 @@ +@@ -144,6 +172,7 @@ static av_cold int init_decoder(AVCodecContext *avctx) static av_cold int close_decoder(AVCodecContext *avctx) { @@ -1557,7 +981,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu flush_cache(avctx); return 0; -@@ -159,48 +188,51 @@ +@@ -159,48 +188,51 @@ static av_cold int close_decoder(AVCodecContext *avctx) * @param buf pointer to the RLE data to process * @param buf_size size of the RLE data to process */ @@ -1626,7 +1050,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu if (avctx->err_recognition & AV_EF_EXPLODE) { return AVERROR_INVALIDDATA; } -@@ -209,13 +241,11 @@ +@@ -209,13 +241,11 @@ static int decode_rle(AVCodecContext *avctx, AVSubtitleRect *rect, } } @@ -1643,7 +1067,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu return 0; } -@@ -237,7 +267,7 @@ +@@ -237,7 +267,7 @@ static int parse_object_segment(AVCodecContext *avctx, uint8_t sequence_desc; unsigned int rle_bitmap_len, width, height; @@ -1652,7 +1076,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu if (buf_size <= 4) return AVERROR_INVALIDDATA; -@@ -260,57 +290,71 @@ +@@ -260,57 +290,71 @@ static int parse_object_segment(AVCodecContext *avctx, /* Read the Sequence Description to determine if start of RLE data or appended to previous RLE */ sequence_desc = bytestream_get_byte(&buf); @@ -1696,17 +1120,16 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + /* Get bitmap dimensions from data */ + width = bytestream_get_be16(&buf); + height = bytestream_get_be16(&buf); -+ + +- /* Get bitmap dimensions from data */ +- width = bytestream_get_be16(&buf); +- height = bytestream_get_be16(&buf); + /* Make sure the bitmap is not too large */ + if (MAX_OBJECT_WH < width || MAX_OBJECT_WH < height || !width || !height) { + av_log(avctx, AV_LOG_ERROR, "Bitmap dimensions (%dx%d) invalid.\n", width, height); + return AVERROR_INVALIDDATA; + } -- /* Get bitmap dimensions from data */ -- width = bytestream_get_be16(&buf); -- height = bytestream_get_be16(&buf); -- - /* Make sure the bitmap is not too large */ - if (avctx->width < width || avctx->height < height || !width || !height) { - av_log(avctx, AV_LOG_ERROR, "Bitmap dimensions (%dx%d) invalid.\n", width, height); @@ -1738,14 +1161,10 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu - object->rle_remaining_len = 0; - return AVERROR(ENOMEM); + memcpy(object->rle + object->rle_data_len, buf, buf_size); - } ++ } + object->rle_data_len += buf_size; + object->rle_remaining_len -= buf_size; - -- memcpy(object->rle, buf, buf_size); -- object->rle_data_len = buf_size; -- object->rle_remaining_len = rle_bitmap_len - buf_size; -- ++ + /* Last in sequence object definition (can be both first and last) */ + if (sequence_desc & 0x40) { + /* Attempt decoding if data is valid */ @@ -1761,11 +1180,16 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + if (avctx->err_recognition & AV_EF_EXPLODE) + return AVERROR_INVALIDDATA; + } -+ } + } +- +- memcpy(object->rle, buf, buf_size); +- object->rle_data_len = buf_size; +- object->rle_remaining_len = rle_bitmap_len - buf_size; +- return 0; } -@@ -318,7 +362,7 @@ +@@ -318,7 +362,7 @@ static int parse_object_segment(AVCodecContext *avctx, * Parse the palette segment packet. * * The palette segment contains details of the palette, @@ -1774,7 +1198,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu * * @param avctx contains the current codec context * @param buf pointer to the packet to process -@@ -391,13 +435,17 @@ +@@ -391,13 +435,17 @@ static int parse_presentation_segment(AVCodecContext *avctx, int64_t pts) { PGSSubContext *ctx = avctx->priv_data; @@ -1793,7 +1217,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu ctx->presentation.pts = pts; ff_dlog(avctx, "Video Dimensions %dx%d\n", -@@ -406,88 +454,121 @@ +@@ -406,88 +454,121 @@ static int parse_presentation_segment(AVCodecContext *avctx, if (ret < 0) return ret; @@ -1863,50 +1287,29 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu - for (i = 0; i < ctx->presentation.object_count; i++) - { - PGSSubObjectRef *const object = &ctx->presentation.objects[i]; -- ++ if (buf_end - buf < 8) { ++ av_log(avctx, AV_LOG_ERROR, "Insufficent space for object\n"); ++ ctx->presentation.object_count = i; ++ return AVERROR_INVALIDDATA; ++ } + - if (buf_end - buf < 8) { - av_log(avctx, AV_LOG_ERROR, "Insufficent space for object\n"); - ctx->presentation.object_count = i; - return AVERROR_INVALIDDATA; - } -- -- object->id = bytestream_get_be16(&buf); -- object->window_id = bytestream_get_byte(&buf); -- object->composition_flag = bytestream_get_byte(&buf); -- -- object->x = bytestream_get_be16(&buf); -- object->y = bytestream_get_be16(&buf); -- -- // If cropping -- if (object->composition_flag & 0x80) { -- object->crop_x = bytestream_get_be16(&buf); -- object->crop_y = bytestream_get_be16(&buf); -- object->crop_w = bytestream_get_be16(&buf); -- object->crop_h = bytestream_get_be16(&buf); -- } -- -- ff_dlog(avctx, "Subtitle Placement x=%d, y=%d\n", -- object->x, object->y); -- -- if (object->x > avctx->width || object->y > avctx->height) { -- av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", -- object->x, object->y, -- avctx->width, avctx->height); -- object->y = object->x = 0; -- if (avctx->err_recognition & AV_EF_EXPLODE) { -+ if (buf_end - buf < 8) { -+ av_log(avctx, AV_LOG_ERROR, "Insufficent space for object\n"); -+ ctx->presentation.object_count = i; - return AVERROR_INVALIDDATA; - } -+ + object->id = bytestream_get_be16(&buf); + object->window_id = bytestream_get_byte(&buf); + object->composition_flag = bytestream_get_byte(&buf); -+ + +- object->id = bytestream_get_be16(&buf); +- object->window_id = bytestream_get_byte(&buf); +- object->composition_flag = bytestream_get_byte(&buf); + object->x = bytestream_get_be16(&buf); + object->y = bytestream_get_be16(&buf); -+ + +- object->x = bytestream_get_be16(&buf); +- object->y = bytestream_get_be16(&buf); + // If cropping + if (object->composition_flag & 0x80) { + object->crop_x = bytestream_get_be16(&buf); @@ -1914,15 +1317,23 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + object->crop_w = bytestream_get_be16(&buf); + object->crop_h = bytestream_get_be16(&buf); + } -+ + +- // If cropping +- if (object->composition_flag & 0x80) { +- object->crop_x = bytestream_get_be16(&buf); +- object->crop_y = bytestream_get_be16(&buf); +- object->crop_w = bytestream_get_be16(&buf); +- object->crop_h = bytestream_get_be16(&buf); + /* Placement is checked at decode after cropping. */ + ff_dlog(avctx, "Subtitle Placement x=%d, y=%d\n", + object->x, object->y); } - } ++ } + return 0; +} -+ + +- ff_dlog(avctx, "Subtitle Placement x=%d, y=%d\n", +- object->x, object->y); +/** + * Parse the window segment packet. + * @@ -1935,12 +1346,21 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + int buf_size) +{ + PGSSubContext *ctx = (PGSSubContext *)avctx->priv_data; -+ + +- if (object->x > avctx->width || object->y > avctx->height) { +- av_log(avctx, AV_LOG_ERROR, "Subtitle out of video bounds. x = %d, y = %d, video width = %d, video height = %d.\n", +- object->x, object->y, +- avctx->width, avctx->height); +- object->y = object->x = 0; +- if (avctx->err_recognition & AV_EF_EXPLODE) { +- return AVERROR_INVALIDDATA; +- } +- } + // 1 byte: number of windows defined + if (bytestream_get_byte(&buf) > MAX_OBJECT_REFS) { + av_log(avctx, AV_LOG_ERROR, "Too many windows defined.\n"); + return AVERROR_INVALIDDATA; -+ } + } + /* TODO: mask objects with windows when transfering to the graphic plane + * Window Segment Structure @@ -1968,7 +1388,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu * * @param avctx contains the current codec context * @param data pointer to the data pertaining the subtitle to display -@@ -500,26 +581,33 @@ +@@ -500,26 +581,33 @@ static int display_end_segment(AVCodecContext *avctx, AVSubtitle *sub, PGSSubContext *ctx = avctx->priv_data; int64_t pts; PGSSubPalette *palette; @@ -2010,7 +1430,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu palette = find_palette(ctx->presentation.palette_id, &ctx->palettes); if (!palette) { // Missing palette. Should only happen with damaged streams. -@@ -528,57 +616,128 @@ +@@ -528,57 +616,128 @@ static int display_end_segment(AVCodecContext *avctx, AVSubtitle *sub, avsubtitle_free(sub); return AVERROR_INVALIDDATA; } @@ -2022,6 +1442,20 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu - return AVERROR(ENOMEM); - sub->rects[sub->num_rects++] = rect; - rect->type = SUBTITLE_BITMAP; +- +- /* Process bitmap */ +- object = find_object(ctx->presentation.objects[i].id, &ctx->objects); +- if (!object) { +- // Missing object. Should only happen with damaged streams. +- av_log(avctx, AV_LOG_ERROR, "Invalid object id %d\n", +- ctx->presentation.objects[i].id); +- if (avctx->err_recognition & AV_EF_EXPLODE) +- return AVERROR_INVALIDDATA; +- // Leaves rect empty with 0 width and height. +- continue; +- } +- if (ctx->presentation.objects[i].composition_flag & 0x40) +- rect->flags |= AV_SUBTITLE_FLAG_FORCED; + for (i = 0; i < ctx->plane.count; i++) { + const PGSSubObjectRef *sub_object = &ctx->presentation.objects[i]; + AVSubtitleRect *const gp_rect = &ctx->plane.visible_rect[i]; @@ -2044,25 +1478,10 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + } + if (sub_object->composition_flag & 0x40) + gp_rect->flags |= AV_SUBTITLE_FLAG_FORCED; - -- /* Process bitmap */ -- object = find_object(ctx->presentation.objects[i].id, &ctx->objects); -- if (!object) { -- // Missing object. Should only happen with damaged streams. -- av_log(avctx, AV_LOG_ERROR, "Invalid object id %d\n", -- ctx->presentation.objects[i].id); -- if (avctx->err_recognition & AV_EF_EXPLODE) -- return AVERROR_INVALIDDATA; -- // Leaves rect empty with 0 width and height. -- continue; -- } -- if (ctx->presentation.objects[i].composition_flag & 0x40) -- rect->flags |= AV_SUBTITLE_FLAG_FORCED; ++ + gp_rect->x = sub_object->x; + gp_rect->y = sub_object->y; - -- rect->x = ctx->presentation.objects[i].x; -- rect->y = ctx->presentation.objects[i].y; ++ + if (object->rle) { + int out_of_picture = 0; + gp_rect->w = object->w; @@ -2099,10 +1518,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + gp_rect->linesize[0] = sub_object->crop_w; + } + } - -- if (object->rle) { -- rect->w = object->w; -- rect->h = object->h; ++ + /* Make sure the subtitle is not out of picture. */ + if (avctx->width < gp_rect->x + gp_rect->w || !gp_rect->w) + out_of_picture = 1; @@ -2120,13 +1536,26 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu + continue; + } -- rect->linesize[0] = object->w; +- rect->x = ctx->presentation.objects[i].x; +- rect->y = ctx->presentation.objects[i].y; + if (!object->bitmap_size || object->rle_remaining_len) { + gp_rect->w = 0; + gp_rect->h = 0; + continue; + } +- if (object->rle) { +- rect->w = object->w; +- rect->h = object->h; ++ gp_rect->data[0] = av_malloc_array(gp_rect->w, gp_rect->h); ++ if (!gp_rect->data[0]) ++ return AVERROR(ENOMEM); + +- rect->linesize[0] = object->w; ++ if (sub_object->composition_flag & 0x80) { ++ /* Copy cropped bitmap. */ ++ int y; + - if (object->rle_remaining_len) { - av_log(avctx, AV_LOG_ERROR, "RLE data length %u is %u bytes shorter than expected\n", - object->rle_data_len, object->rle_remaining_len); @@ -2138,14 +1567,6 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu - if ((avctx->err_recognition & AV_EF_EXPLODE) || - ret == AVERROR(ENOMEM)) { - return ret; -+ gp_rect->data[0] = av_malloc_array(gp_rect->w, gp_rect->h); -+ if (!gp_rect->data[0]) -+ return AVERROR(ENOMEM); -+ -+ if (sub_object->composition_flag & 0x80) { -+ /* Copy cropped bitmap. */ -+ int y; -+ + for (y = 0; y < sub_object->crop_h; y++) { + memcpy(&gp_rect->data[0][y * sub_object->crop_w], + &object->bitmap[(sub_object->crop_y + y) * @@ -2181,7 +1602,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu rect->data[1] = av_mallocz(AVPALETTE_SIZE); if (!rect->data[1]) return AVERROR(ENOMEM); -@@ -641,14 +800,7 @@ +@@ -641,14 +800,7 @@ static int decode(AVCodecContext *avctx, AVSubtitle *sub, ret = parse_presentation_segment(avctx, buf, segment_length, sub->pts); break; case WINDOW_SEGMENT: @@ -2197,24 +1618,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/pgssubdec.c ffmpeg-7.1.2/libavcodec/pgssu break; case DISPLAY_SEGMENT: if (*got_sub_ptr) { -diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc_av1.c ffmpeg-7.1.2/libavcodec/qsvenc_av1.c ---- ffmpeg-7.1.2.old/libavcodec/qsvenc_av1.c 2025-10-27 10:07:00.531473480 +0100 -+++ ffmpeg-7.1.2/libavcodec/qsvenc_av1.c 2025-10-27 10:07:02.443863055 +0100 -@@ -189,6 +189,10 @@ - { "tile_cols", "Number of columns for tiled encoding", OFFSET(qsv.tile_cols), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE }, - { "tile_rows", "Number of rows for tiled encoding", OFFSET(qsv.tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE }, - { "look_ahead_depth", "Depth of look ahead in number frames, available when extbrc option is enabled", OFFSET(qsv.look_ahead_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, VE }, -+#if QSV_HAVE_EXT_AV1_SCC -+ { "palette_mode", "Enable palette mode of Screen Content Tool for encoding", OFFSET(qsv.palette_mode), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE}, -+ { "intrabc", "Enable intra block copy of Screen Content Tool for encoding", OFFSET(qsv.intrabc), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE}, -+#endif - { NULL }, - }; - -diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c ---- ffmpeg-7.1.2.old/libavcodec/qsvenc.c 2025-10-27 10:07:00.592474018 +0100 -+++ ffmpeg-7.1.2/libavcodec/qsvenc.c 2025-10-27 10:07:02.443621469 +0100 -@@ -494,6 +494,9 @@ +diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c +index 8200a14..284b608 100644 +--- a/libavcodec/qsvenc.c ++++ b/libavcodec/qsvenc.c +@@ -494,6 +494,9 @@ static void dump_video_av1_param(AVCodecContext *avctx, QSVEncContext *q, mfxExtAV1BitstreamParam *av1_bs_param = (mfxExtAV1BitstreamParam *)coding_opts[1]; mfxExtCodingOption2 *co2 = (mfxExtCodingOption2*)coding_opts[2]; mfxExtCodingOption3 *co3 = (mfxExtCodingOption3*)coding_opts[3]; @@ -2224,7 +1632,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c av_log(avctx, AV_LOG_VERBOSE, "profile: %s; level: %"PRIu16"\n", print_profile(avctx->codec_id, info->CodecProfile), info->CodecLevel); -@@ -566,6 +569,13 @@ +@@ -566,6 +569,13 @@ static void dump_video_av1_param(AVCodecContext *avctx, QSVEncContext *q, print_threestate(av1_bs_param->WriteIVFHeaders)); av_log(avctx, AV_LOG_VERBOSE, "LowDelayBRC: %s\n", print_threestate(co3->LowDelayBRC)); av_log(avctx, AV_LOG_VERBOSE, "MaxFrameSize: %d;\n", co2->MaxFrameSize); @@ -2238,7 +1646,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c } #endif -@@ -1282,6 +1292,28 @@ +@@ -1282,6 +1292,28 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) } #endif @@ -2267,7 +1675,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c if (!check_enc_param(avctx,q)) { av_log(avctx, AV_LOG_ERROR, "some encoding parameters are not supported by the QSV " -@@ -1389,11 +1421,21 @@ +@@ -1389,11 +1421,21 @@ static int qsv_retrieve_enc_av1_params(AVCodecContext *avctx, QSVEncContext *q) .Header.BufferSz = sizeof(co3), }; @@ -2289,7 +1697,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c }; if (!QSV_RUNTIME_VERSION_ATLEAST(q->ver, 2, 5)) { -@@ -1842,6 +1884,13 @@ +@@ -1842,6 +1884,13 @@ int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q) return ret; } @@ -2303,9 +1711,10 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.c ffmpeg-7.1.2/libavcodec/qsvenc.c q->avctx = avctx; return 0; -diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.h ffmpeg-7.1.2/libavcodec/qsvenc.h ---- ffmpeg-7.1.2.old/libavcodec/qsvenc.h 2025-10-27 10:07:00.282471283 +0100 -+++ ffmpeg-7.1.2/libavcodec/qsvenc.h 2025-10-27 10:07:02.443799916 +0100 +diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h +index 4bc77f2..2e0a19b 100644 +--- a/libavcodec/qsvenc.h ++++ b/libavcodec/qsvenc.h @@ -38,6 +38,7 @@ #define QSV_HAVE_EXT_VP9_TILES QSV_VERSION_ATLEAST(1, 29) @@ -2314,7 +1723,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.h ffmpeg-7.1.2/libavcodec/qsvenc.h #if defined(_WIN32) || defined(__CYGWIN__) #define QSV_HAVE_AVBR 1 -@@ -188,10 +189,13 @@ +@@ -188,10 +189,13 @@ typedef struct QSVEncContext { mfxFrameSurface1 **opaque_surfaces; AVBufferRef *opaque_alloc_buf; #endif @@ -2329,7 +1738,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.h ffmpeg-7.1.2/libavcodec/qsvenc.h int nb_extparam_internal; mfxExtBuffer **extparam_str; -@@ -319,6 +323,8 @@ +@@ -319,6 +323,8 @@ typedef struct QSVEncContext { int dual_gfx; AVDictionary *qsv_params; @@ -2338,9 +1747,132 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/qsvenc.h ffmpeg-7.1.2/libavcodec/qsvenc.h } QSVEncContext; int ff_qsv_enc_init(AVCodecContext *avctx, QSVEncContext *q); -diff -Naur ffmpeg-7.1.2.old/libavcodec/videotoolbox_av1.c ffmpeg-7.1.2/libavcodec/videotoolbox_av1.c ---- ffmpeg-7.1.2.old/libavcodec/videotoolbox_av1.c 1970-01-01 01:00:00.000000000 +0100 -+++ ffmpeg-7.1.2/libavcodec/videotoolbox_av1.c 2025-10-27 10:07:02.455024552 +0100 +diff --git a/libavcodec/qsvenc_av1.c b/libavcodec/qsvenc_av1.c +index a86b409..4f035f3 100644 +--- a/libavcodec/qsvenc_av1.c ++++ b/libavcodec/qsvenc_av1.c +@@ -189,6 +189,10 @@ static const AVOption options[] = { + { "tile_cols", "Number of columns for tiled encoding", OFFSET(qsv.tile_cols), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE }, + { "tile_rows", "Number of rows for tiled encoding", OFFSET(qsv.tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE }, + { "look_ahead_depth", "Depth of look ahead in number frames, available when extbrc option is enabled", OFFSET(qsv.look_ahead_depth), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 100, VE }, ++#if QSV_HAVE_EXT_AV1_SCC ++ { "palette_mode", "Enable palette mode of Screen Content Tool for encoding", OFFSET(qsv.palette_mode), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE}, ++ { "intrabc", "Enable intra block copy of Screen Content Tool for encoding", OFFSET(qsv.intrabc), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE}, ++#endif + { NULL }, + }; + +diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c +index 505483e..04195c4 100644 +--- a/libavcodec/videotoolbox.c ++++ b/libavcodec/videotoolbox.c +@@ -56,6 +56,10 @@ enum { kCMVideoCodecType_HEVC = 'hvc1' }; + enum { kCMVideoCodecType_VP9 = 'vp09' }; + #endif + ++#if !HAVE_KCMVIDEOCODECTYPE_AV1 ++enum { kCMVideoCodecType_AV1 = 'av01' }; ++#endif ++ + #define VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING 12 + + typedef struct VTHWFrame { +@@ -92,6 +96,26 @@ int ff_videotoolbox_buffer_copy(VTContext *vtctx, + return 0; + } + ++int ff_videotoolbox_buffer_append(VTContext *vtctx, ++ const uint8_t *buffer, ++ uint32_t size) ++{ ++ void *tmp; ++ ++ tmp = av_fast_realloc(vtctx->bitstream, ++ &vtctx->allocated_size, ++ vtctx->bitstream_size + size); ++ ++ if (!tmp) ++ return AVERROR(ENOMEM); ++ ++ vtctx->bitstream = tmp; ++ memcpy(vtctx->bitstream + vtctx->bitstream_size, buffer, size); ++ vtctx->bitstream_size += size; ++ ++ return 0; ++} ++ + static int videotoolbox_postproc_frame(void *avctx, AVFrame *frame) + { + int ret; +@@ -108,9 +132,6 @@ static int videotoolbox_postproc_frame(void *avctx, AVFrame *frame) + frame->crop_top = 0; + frame->crop_bottom = 0; + +- if ((ret = av_vt_pixbuf_set_attachments(avctx, ref->pixbuf, frame)) < 0) +- return ret; +- + frame->data[3] = (uint8_t*)ref->pixbuf; + + if (ref->hw_frames_ctx) { +@@ -790,7 +811,7 @@ static CFDictionaryRef videotoolbox_buffer_attributes_create(int width, + #if TARGET_OS_IPHONE + CFDictionarySetValue(buffer_attributes, kCVPixelBufferOpenGLESCompatibilityKey, kCFBooleanTrue); + #else +- CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue); ++ CFDictionarySetValue(buffer_attributes, kCVPixelBufferMetalCompatibilityKey, kCFBooleanTrue); + #endif + + CFRelease(io_surface_properties); +@@ -846,6 +867,13 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec + if (data) + CFDictionarySetValue(avc_info, CFSTR("vpcC"), data); + break; ++#endif ++#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL ++ case kCMVideoCodecType_AV1 : ++ data = ff_videotoolbox_av1c_extradata_create(avctx); ++ if (data) ++ CFDictionarySetValue(avc_info, CFSTR("av1C"), data); ++ break; + #endif + default: + break; +@@ -912,10 +940,30 @@ static int videotoolbox_start(AVCodecContext *avctx) + case AV_CODEC_ID_VP9 : + videotoolbox->cm_codec_type = kCMVideoCodecType_VP9; + break; ++ case AV_CODEC_ID_AV1 : ++ videotoolbox->cm_codec_type = kCMVideoCodecType_AV1; ++ break; + default : + break; + } + ++#if ARCH_X86_64 ++ if (avctx->codec_id == AV_CODEC_ID_H264 && ++ avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10) ++ { ++ // 10-bit H.264 is not supported on x86_64 ++ return AVERROR(ENOSYS); ++ } ++#endif ++ ++ if (avctx->codec_id == AV_CODEC_ID_H264 && ++ (avctx->level == 61 || avctx->level == 62)) ++ { ++ // H.264 Level 6.1 and 6.2 can't be ++ // decoded properly ++ return AVERROR(ENOSYS); ++ } ++ + #if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) && AV_HAS_BUILTIN(__builtin_available) + if (avctx->codec_id == AV_CODEC_ID_PRORES) { + if (__builtin_available(macOS 10.9, *)) { +diff --git a/libavcodec/videotoolbox_av1.c b/libavcodec/videotoolbox_av1.c +new file mode 100644 +index 0000000..b4d3919 +--- /dev/null ++++ b/libavcodec/videotoolbox_av1.c @@ -0,0 +1,105 @@ +/* + * Videotoolbox hardware acceleration for AV1 @@ -2447,115 +1979,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/videotoolbox_av1.c ffmpeg-7.1.2/libavcode + .uninit = ff_videotoolbox_uninit, + .priv_data_size = sizeof(VTContext), +}; -diff -Naur ffmpeg-7.1.2.old/libavcodec/videotoolbox.c ffmpeg-7.1.2/libavcodec/videotoolbox.c ---- ffmpeg-7.1.2.old/libavcodec/videotoolbox.c 2025-10-27 10:07:00.379472139 +0100 -+++ ffmpeg-7.1.2/libavcodec/videotoolbox.c 2025-10-27 10:07:02.456490466 +0100 -@@ -56,6 +56,10 @@ - enum { kCMVideoCodecType_VP9 = 'vp09' }; - #endif - -+#if !HAVE_KCMVIDEOCODECTYPE_AV1 -+enum { kCMVideoCodecType_AV1 = 'av01' }; -+#endif -+ - #define VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING 12 - - typedef struct VTHWFrame { -@@ -92,6 +96,26 @@ - return 0; - } - -+int ff_videotoolbox_buffer_append(VTContext *vtctx, -+ const uint8_t *buffer, -+ uint32_t size) -+{ -+ void *tmp; -+ -+ tmp = av_fast_realloc(vtctx->bitstream, -+ &vtctx->allocated_size, -+ vtctx->bitstream_size + size); -+ -+ if (!tmp) -+ return AVERROR(ENOMEM); -+ -+ vtctx->bitstream = tmp; -+ memcpy(vtctx->bitstream + vtctx->bitstream_size, buffer, size); -+ vtctx->bitstream_size += size; -+ -+ return 0; -+} -+ - static int videotoolbox_postproc_frame(void *avctx, AVFrame *frame) - { - int ret; -@@ -108,9 +132,6 @@ - frame->crop_top = 0; - frame->crop_bottom = 0; - -- if ((ret = av_vt_pixbuf_set_attachments(avctx, ref->pixbuf, frame)) < 0) -- return ret; -- - frame->data[3] = (uint8_t*)ref->pixbuf; - - if (ref->hw_frames_ctx) { -@@ -790,7 +811,7 @@ - #if TARGET_OS_IPHONE - CFDictionarySetValue(buffer_attributes, kCVPixelBufferOpenGLESCompatibilityKey, kCFBooleanTrue); - #else -- CFDictionarySetValue(buffer_attributes, kCVPixelBufferIOSurfaceOpenGLTextureCompatibilityKey, kCFBooleanTrue); -+ CFDictionarySetValue(buffer_attributes, kCVPixelBufferMetalCompatibilityKey, kCFBooleanTrue); - #endif - - CFRelease(io_surface_properties); -@@ -847,6 +868,13 @@ - CFDictionarySetValue(avc_info, CFSTR("vpcC"), data); - break; - #endif -+#if CONFIG_AV1_VIDEOTOOLBOX_HWACCEL -+ case kCMVideoCodecType_AV1 : -+ data = ff_videotoolbox_av1c_extradata_create(avctx); -+ if (data) -+ CFDictionarySetValue(avc_info, CFSTR("av1C"), data); -+ break; -+#endif - default: - break; - } -@@ -912,10 +940,30 @@ - case AV_CODEC_ID_VP9 : - videotoolbox->cm_codec_type = kCMVideoCodecType_VP9; - break; -+ case AV_CODEC_ID_AV1 : -+ videotoolbox->cm_codec_type = kCMVideoCodecType_AV1; -+ break; - default : - break; - } - -+#if ARCH_X86_64 -+ if (avctx->codec_id == AV_CODEC_ID_H264 && -+ avctx->sw_pix_fmt == AV_PIX_FMT_YUV420P10) -+ { -+ // 10-bit H.264 is not supported on x86_64 -+ return AVERROR(ENOSYS); -+ } -+#endif -+ -+ if (avctx->codec_id == AV_CODEC_ID_H264 && -+ (avctx->level == 61 || avctx->level == 62)) -+ { -+ // H.264 Level 6.1 and 6.2 can't be -+ // decoded properly -+ return AVERROR(ENOSYS); -+ } -+ - #if defined(MAC_OS_X_VERSION_10_9) && !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9) && AV_HAS_BUILTIN(__builtin_available) - if (avctx->codec_id == AV_CODEC_ID_PRORES) { - if (__builtin_available(macOS 10.9, *)) { -diff -Naur ffmpeg-7.1.2.old/libavcodec/vt_internal.h ffmpeg-7.1.2/libavcodec/vt_internal.h ---- ffmpeg-7.1.2.old/libavcodec/vt_internal.h 2025-10-27 10:07:00.531473480 +0100 -+++ ffmpeg-7.1.2/libavcodec/vt_internal.h 2025-10-27 10:07:02.455086969 +0100 -@@ -56,6 +56,9 @@ +diff --git a/libavcodec/vt_internal.h b/libavcodec/vt_internal.h +index 9502d7c..effa96f 100644 +--- a/libavcodec/vt_internal.h ++++ b/libavcodec/vt_internal.h +@@ -56,6 +56,9 @@ int ff_videotoolbox_frame_params(AVCodecContext *avctx, int ff_videotoolbox_buffer_copy(VTContext *vtctx, const uint8_t *buffer, uint32_t size); @@ -2565,7 +1993,7 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/vt_internal.h ffmpeg-7.1.2/libavcodec/vt_ int ff_videotoolbox_uninit(AVCodecContext *avctx); int ff_videotoolbox_h264_start_frame(AVCodecContext *avctx, const uint8_t *buffer, -@@ -64,6 +67,7 @@ +@@ -64,6 +67,7 @@ int ff_videotoolbox_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size); int ff_videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame); @@ -2573,10 +2001,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/vt_internal.h ffmpeg-7.1.2/libavcodec/vt_ CFDataRef ff_videotoolbox_avcc_extradata_create(AVCodecContext *avctx); CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx); CFDataRef ff_videotoolbox_vpcc_extradata_create(AVCodecContext *avctx); -diff -Naur ffmpeg-7.1.2.old/libavfilter/vf_vpp_qsv.c ffmpeg-7.1.2/libavfilter/vf_vpp_qsv.c ---- ffmpeg-7.1.2.old/libavfilter/vf_vpp_qsv.c 2025-10-27 10:07:00.764475536 +0100 -+++ ffmpeg-7.1.2/libavfilter/vf_vpp_qsv.c 2025-10-27 10:07:02.461658339 +0100 -@@ -494,9 +494,9 @@ +diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c +index 7f05f1f..223e919 100644 +--- a/libavfilter/vf_vpp_qsv.c ++++ b/libavfilter/vf_vpp_qsv.c +@@ -494,9 +494,9 @@ static int vpp_set_frame_ext_params(AVFilterContext *ctx, const AVFrame *in, AVF outvsi_conf.Header.BufferId = MFX_EXTBUFF_VIDEO_SIGNAL_INFO_OUT; outvsi_conf.Header.BufferSz = sizeof(mfxExtVideoSignalInfo); outvsi_conf.VideoFullRange = (out->color_range == AVCOL_RANGE_JPEG); @@ -2589,10 +2018,11 @@ diff -Naur ffmpeg-7.1.2.old/libavfilter/vf_vpp_qsv.c ffmpeg-7.1.2/libavfilter/vf outvsi_conf.ColourDescriptionPresent = 1; if (memcmp(&vpp->invsi_conf, &invsi_conf, sizeof(mfxExtVideoSignalInfo)) || -diff -Naur ffmpeg-7.1.2.old/libavformat/isom.h ffmpeg-7.1.2/libavformat/isom.h ---- ffmpeg-7.1.2.old/libavformat/isom.h 2025-10-27 10:07:00.909476815 +0100 -+++ ffmpeg-7.1.2/libavformat/isom.h 2025-10-27 10:07:02.422783282 +0100 -@@ -272,6 +272,9 @@ +diff --git a/libavformat/isom.h b/libavformat/isom.h +index f18fe54..02f8f49 100644 +--- a/libavformat/isom.h ++++ b/libavformat/isom.h +@@ -272,6 +272,9 @@ typedef struct MOVStreamContext { MOVEncryptionIndex *encryption_index; } cenc; @@ -2600,12 +2030,13 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/isom.h ffmpeg-7.1.2/libavformat/isom.h + int fallback; + struct IAMFDemuxContext *iamf; + int iamf_stream_offset; } MOVStreamContext; - -diff -Naur ffmpeg-7.1.2.old/libavformat/matroskaenc.c ffmpeg-7.1.2/libavformat/matroskaenc.c ---- ffmpeg-7.1.2.old/libavformat/matroskaenc.c 2025-10-27 10:07:00.955477221 +0100 -+++ ffmpeg-7.1.2/libavformat/matroskaenc.c 2025-10-27 10:07:02.430490236 +0100 -@@ -2933,6 +2933,16 @@ +diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c +index 5d00b26..888e868 100644 +--- a/libavformat/matroskaenc.c ++++ b/libavformat/matroskaenc.c +@@ -2933,6 +2933,16 @@ static int mkv_check_new_extra_data(AVFormatContext *s, const AVPacket *pkt) case AV_CODEC_ID_AAC: if (side_data_size && mkv->track.bc) { int output_sample_rate = 0; @@ -2622,9 +2053,10 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/matroskaenc.c ffmpeg-7.1.2/libavformat/m ret = get_aac_sample_rates(s, mkv, side_data, side_data_size, &track->sample_rate, &output_sample_rate); if (ret < 0) -diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c ---- ffmpeg-7.1.2.old/libavformat/mov.c 2025-10-27 10:07:00.889476639 +0100 -+++ ffmpeg-7.1.2/libavformat/mov.c 2025-10-27 10:07:02.447584145 +0100 +diff --git a/libavformat/mov.c b/libavformat/mov.c +index eb9b4ac..9657975 100644 +--- a/libavformat/mov.c ++++ b/libavformat/mov.c @@ -56,6 +56,7 @@ #include "libavcodec/mpegaudiodecheader.h" #include "libavcodec/mlp_parse.h" @@ -2633,7 +2065,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c #include "internal.h" #include "avio_internal.h" #include "demux.h" -@@ -131,6 +132,33 @@ +@@ -131,6 +132,33 @@ static int mov_metadata_int8_no_padding(MOVContext *c, AVIOContext *pb, return 0; } @@ -2667,7 +2099,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c static int mov_metadata_gnre(MOVContext *c, AVIOContext *pb, unsigned len, const char *key) { -@@ -342,6 +370,73 @@ +@@ -342,6 +370,73 @@ static int mov_metadata_hmmt(MOVContext *c, AVIOContext *pb, unsigned len) return 0; } @@ -2741,7 +2173,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) { char tmp_key[AV_FOURCC_MAX_STRING_SIZE] = {0}; -@@ -354,6 +449,7 @@ +@@ -354,6 +449,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL; int raw = 0; int num = 0; @@ -2749,7 +2181,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c switch (atom.type) { case MKTAG( '@','P','R','M'): key = "premiere_version"; raw = 1; break; -@@ -364,35 +460,71 @@ +@@ -364,35 +460,71 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) case MKTAG( 'a','k','I','D'): key = "account_type"; parse = mov_metadata_int8_no_padding; break; case MKTAG( 'a','p','I','D'): key = "account_id"; break; @@ -2824,7 +2256,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c case MKTAG( 's','o','a','a'): key = "sort_album_artist"; break; case MKTAG( 's','o','a','l'): key = "sort_album"; break; case MKTAG( 's','o','a','r'): key = "sort_artist"; break; -@@ -401,6 +533,8 @@ +@@ -401,6 +533,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) case MKTAG( 's','o','s','n'): key = "sort_show"; break; case MKTAG( 's','t','i','k'): key = "media_type"; parse = mov_metadata_int8_no_padding; break; @@ -2833,7 +2265,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c case MKTAG( 't','r','k','n'): key = "track"; parse = mov_metadata_track_or_disc_number; break; case MKTAG( 't','v','e','n'): key = "episode_id"; break; -@@ -410,17 +544,23 @@ +@@ -410,17 +544,23 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) case MKTAG( 't','v','s','h'): key = "show"; break; case MKTAG( 't','v','s','n'): key = "season_number"; parse = mov_metadata_int8_bypass_padding; break; @@ -2858,7 +2290,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c case MKTAG(0xa9,'e','d','1'): key = "edit_date"; break; case MKTAG(0xa9,'e','n','c'): key = "encoder"; break; case MKTAG(0xa9,'f','m','t'): key = "original_format"; break; -@@ -428,23 +568,45 @@ +@@ -428,23 +568,45 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) case MKTAG(0xa9,'g','r','p'): key = "grouping"; break; case MKTAG(0xa9,'h','s','t'): key = "host_computer"; break; case MKTAG(0xa9,'i','n','f'): key = "comment"; break; @@ -2904,7 +2336,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c } retry: if (c->itunes_metadata && atom.size > 8) { -@@ -571,17 +733,23 @@ +@@ -571,17 +733,23 @@ retry: } str[str_size] = 0; } @@ -2937,7 +2369,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c } } -@@ -9088,6 +9256,23 @@ +@@ -9122,6 +9290,23 @@ fail: return ret; } @@ -2961,7 +2393,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('A','C','L','R'), mov_read_aclr }, { MKTAG('A','P','R','G'), mov_read_avid }, -@@ -9190,6 +9375,7 @@ +@@ -9224,6 +9409,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('v','p','c','C'), mov_read_vpcc }, { MKTAG('m','d','c','v'), mov_read_mdcv }, { MKTAG('c','l','l','i'), mov_read_clli }, @@ -2969,7 +2401,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c { MKTAG('d','v','c','C'), mov_read_dvcc_dvvc }, { MKTAG('d','v','v','C'), mov_read_dvcc_dvvc }, { MKTAG('d','v','w','C'), mov_read_dvcc_dvvc }, -@@ -10374,6 +10560,23 @@ +@@ -10446,6 +10632,23 @@ static int mov_read_header(AVFormatContext *s) err = ff_replaygain_export(st, s->metadata); if (err < 0) return err; @@ -2993,9 +2425,10 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/mov.c ffmpeg-7.1.2/libavformat/mov.c break; case AVMEDIA_TYPE_VIDEO: if (sc->display_matrix) { -diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc.c ---- ffmpeg-7.1.2.old/libavformat/movenc.c 2025-10-27 10:07:00.933477027 +0100 -+++ ffmpeg-7.1.2/libavformat/movenc.c 2025-10-27 10:07:02.463726465 +0100 +diff --git a/libavformat/movenc.c b/libavformat/movenc.c +index 83ce396..e038d12 100644 +--- a/libavformat/movenc.c ++++ b/libavformat/movenc.c @@ -28,6 +28,7 @@ #include "movenc.h" @@ -3004,78 +2437,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc #include "avio_internal.h" #include "dovi_isom.h" #include "riff.h" -@@ -393,6 +394,8 @@ - uint16_t chan_loc; - /* if there is no dependent substream, then one bit reserved instead */ - } substream[1]; /* TODO: support 8 independent substreams */ -+ /* indicates the decoding complexity, 8 bits */ -+ uint8_t complexity_index_type_a; - }; - - static int mov_write_ac3_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track) -@@ -474,6 +477,8 @@ - info->data_rate = FFMAX(info->data_rate, hdr->bit_rate / 1000); - info->ac3_bit_rate_code = FFMAX(info->ac3_bit_rate_code, - hdr->ac3_bit_rate_code); -+ info->complexity_index_type_a = hdr->complexity_index_type_a; -+ - num_blocks = hdr->num_blocks; - - if (!info->ec3_done) { -@@ -532,8 +537,6 @@ - int parent = hdr->substreamid; - - while (cumul_size != pkt->size) { -- GetBitContext gbc; -- int i; - ret = avpriv_ac3_parse_header(&hdr, pkt->data + cumul_size, pkt->size - cumul_size); - if (ret < 0) - goto end; -@@ -544,20 +547,9 @@ - info->substream[parent].num_dep_sub++; - ret /= 8; - -- /* header is parsed up to lfeon, but custom channel map may be needed */ -- init_get_bits8(&gbc, pkt->data + cumul_size + ret, pkt->size - cumul_size - ret); -- /* skip bsid */ -- skip_bits(&gbc, 5); -- /* skip volume control params */ -- for (i = 0; i < (hdr->channel_mode ? 1 : 2); i++) { -- skip_bits(&gbc, 5); // skip dialog normalization -- if (get_bits1(&gbc)) { -- skip_bits(&gbc, 8); // skip compression gain word -- } -- } - /* get the dependent stream channel map, if exists */ -- if (get_bits1(&gbc)) -- info->substream[parent].chan_loc |= (get_bits(&gbc, 16) >> 5) & 0x1f; -+ if (hdr->channel_map_present) -+ info->substream[parent].chan_loc |= (hdr->channel_map >> 5) & 0x1f; - else - info->substream[parent].chan_loc |= hdr->channel_mode; - cumul_size += hdr->frame_size; -@@ -614,7 +606,7 @@ - } - - info = track->eac3_priv; -- size = 2 + ((32 * (info->num_ind_sub + 1) + 7) >> 3); -+ size = 2 + (4 * (info->num_ind_sub + 1)) + (2 * !!info->complexity_index_type_a); - buf = av_malloc(size); - if (!buf) { - return AVERROR(ENOMEM); -@@ -639,6 +631,11 @@ - put_bits(&pbc, 9, info->substream[i].chan_loc); - } - } -+ if (info->complexity_index_type_a) { -+ put_bits(&pbc, 7, 0); /* reserved */ -+ put_bits(&pbc, 1, 1); // flag_eac3_extension_type_a -+ put_bits(&pbc, 8, info->complexity_index_type_a); -+ } - flush_put_bits(&pbc); - size = put_bytes_output(&pbc); - -@@ -4055,6 +4052,41 @@ +@@ -4055,6 +4056,41 @@ static int mov_write_udta_sdp(AVIOContext *pb, MOVTrack *track) return len + 24; } @@ -3117,7 +2479,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc static int mov_write_track_metadata(AVIOContext *pb, AVStream *st, const char *tag, const char *str) { -@@ -4129,8 +4161,23 @@ +@@ -4129,8 +4165,23 @@ static int mov_write_track_udta_tag(AVIOContext *pb, MOVMuxContext *mov, if (ret < 0) return ret; @@ -3142,7 +2504,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc if (mov->mode & MODE_MP4) { if ((ret = mov_write_track_kinds(pb_buf, st)) < 0) -@@ -4505,20 +4552,66 @@ +@@ -4505,20 +4556,66 @@ static int mov_write_trkn_tag(AVIOContext *pb, MOVMuxContext *mov, return size; } @@ -3212,7 +2574,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc avio_wb32(pb, size); ffio_wfourcc(pb, name); -@@ -4526,7 +4619,9 @@ +@@ -4526,7 +4623,9 @@ static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb, ffio_wfourcc(pb, "data"); avio_wb32(pb, 0x15); avio_wb32(pb, 0); @@ -3223,7 +2585,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc else avio_w8 (pb, num); return size; -@@ -4582,6 +4677,8 @@ +@@ -4582,6 +4681,8 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov, mov_write_string_metadata(s, pb, "\251lyr", "lyrics" , 1); mov_write_string_metadata(s, pb, "desc", "description",1); mov_write_string_metadata(s, pb, "ldes", "synopsis" , 1); @@ -3232,7 +2594,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc mov_write_string_metadata(s, pb, "tvsh", "show" , 1); mov_write_string_metadata(s, pb, "tven", "episode_id",1); mov_write_string_metadata(s, pb, "tvnn", "network" , 1); -@@ -4592,10 +4689,67 @@ +@@ -4592,10 +4693,67 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov, mov_write_int8_metadata (s, pb, "hdvd", "hd_video", 1); mov_write_int8_metadata (s, pb, "pgap", "gapless_playback",1); mov_write_int8_metadata (s, pb, "cpil", "compilation", 1); @@ -3300,7 +2662,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc return update_size(pb, pos); } -@@ -4727,35 +4881,6 @@ +@@ -4727,35 +4885,6 @@ static int ascii_to_wc(AVIOContext *pb, const uint8_t *b) return 0; } @@ -3336,7 +2698,7 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc static int mov_write_chpl_tag(AVIOContext *pb, AVFormatContext *s) { int64_t pos = avio_tell(pb); -@@ -4794,14 +4919,14 @@ +@@ -4794,14 +4923,14 @@ static int mov_write_udta_tag(AVIOContext *pb, MOVMuxContext *mov, return ret; if (mov->mode & MODE_3GP) { @@ -3359,10 +2721,11 @@ diff -Naur ffmpeg-7.1.2.old/libavformat/movenc.c ffmpeg-7.1.2/libavformat/movenc mov_write_loci_tag(s, pb_buf); } else if (mov->mode == MODE_MOV && !(mov->flags & FF_MOV_FLAG_USE_MDTA)) { // the title field breaks gtkpod with mp4 and my suspicion is that stuff is not valid in mp4 mov_write_string_metadata(s, pb_buf, "\251ART", "artist", 0); -diff -Naur ffmpeg-7.1.2.old/libavutil/frame.c ffmpeg-7.1.2/libavutil/frame.c ---- ffmpeg-7.1.2.old/libavutil/frame.c 2025-10-27 10:07:00.804475889 +0100 -+++ ffmpeg-7.1.2/libavutil/frame.c 2025-10-27 10:07:02.436386459 +0100 -@@ -45,6 +45,7 @@ +diff --git a/libavutil/frame.c b/libavutil/frame.c +index f0a0dba..ab48eaa 100644 +--- a/libavutil/frame.c ++++ b/libavutil/frame.c +@@ -45,6 +45,7 @@ static const AVSideDataDescriptor sd_props[] = { [AV_FRAME_DATA_FILM_GRAIN_PARAMS] = { "Film grain parameters" }, [AV_FRAME_DATA_DETECTION_BBOXES] = { "Bounding boxes for object detection and classification" }, [AV_FRAME_DATA_DOVI_RPU_BUFFER] = { "Dolby Vision RPU Data" }, @@ -3370,26 +2733,28 @@ diff -Naur ffmpeg-7.1.2.old/libavutil/frame.c ffmpeg-7.1.2/libavutil/frame.c [AV_FRAME_DATA_DOVI_METADATA] = { "Dolby Vision Metadata" }, [AV_FRAME_DATA_LCEVC] = { "LCEVC NAL data" }, [AV_FRAME_DATA_VIEW_ID] = { "View ID" }, -diff -Naur ffmpeg-7.1.2.old/libavutil/frame.h ffmpeg-7.1.2/libavutil/frame.h ---- ffmpeg-7.1.2.old/libavutil/frame.h 2025-10-27 10:07:00.786475730 +0100 -+++ ffmpeg-7.1.2/libavutil/frame.h 2025-10-27 10:07:02.436480126 +0100 -@@ -201,6 +201,12 @@ +diff --git a/libavutil/frame.h b/libavutil/frame.h +index f780656..8f2bbfd 100644 +--- a/libavutil/frame.h ++++ b/libavutil/frame.h +@@ -200,6 +200,12 @@ enum AVFrameSideDataType { + */ AV_FRAME_DATA_DOVI_RPU_BUFFER, - /** ++ /** + * Dolby Vision RPU ITU T35 raw data, suitable for passing to SVT-AV1 + * or other libraries. Array of uint8_t. + */ + AV_FRAME_DATA_DOVI_RPU_BUFFER_T35, + -+ /** + /** * Parsed Dolby Vision metadata, suitable for passing to a software * implementation. The payload is the AVDOVIMetadata struct defined in - * libavutil/dovi_meta.h. -diff -Naur ffmpeg-7.1.2.old/libavutil/hwcontext_videotoolbox.c ffmpeg-7.1.2/libavutil/hwcontext_videotoolbox.c ---- ffmpeg-7.1.2.old/libavutil/hwcontext_videotoolbox.c 2025-10-27 10:07:00.813475968 +0100 -+++ ffmpeg-7.1.2/libavutil/hwcontext_videotoolbox.c 2025-10-27 10:07:02.457067390 +0100 -@@ -183,7 +183,8 @@ +diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c +index 122a61d..04e0f0c 100644 +--- a/libavutil/hwcontext_videotoolbox.c ++++ b/libavutil/hwcontext_videotoolbox.c +@@ -183,7 +183,8 @@ static int vt_pool_alloc(AVHWFramesContext *ctx) VTFramesContext *fctx = ctx->hwctx; AVVTFramesContext *hw_ctx = &fctx->p; CVReturn err; @@ -3399,7 +2764,7 @@ diff -Naur ffmpeg-7.1.2.old/libavutil/hwcontext_videotoolbox.c ffmpeg-7.1.2/liba uint32_t cv_pixfmt; CFMutableDictionaryRef attributes, iosurface_properties; -@@ -216,6 +217,15 @@ +@@ -216,6 +217,15 @@ static int vt_pool_alloc(AVHWFramesContext *ctx) CFRelease(w); CFRelease(h); @@ -3415,10 +2780,11 @@ diff -Naur ffmpeg-7.1.2.old/libavutil/hwcontext_videotoolbox.c ffmpeg-7.1.2/liba err = CVPixelBufferPoolCreate( NULL, NULL, -diff -Naur ffmpeg-7.1.2.old/libswscale/swscale_unscaled.c ffmpeg-7.1.2/libswscale/swscale_unscaled.c ---- ffmpeg-7.1.2.old/libswscale/swscale_unscaled.c 2025-10-27 10:07:00.644474477 +0100 -+++ ffmpeg-7.1.2/libswscale/swscale_unscaled.c 2025-10-27 10:07:02.433490262 +0100 -@@ -341,7 +341,7 @@ +diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c +index 587483d..e7d7671 100644 +--- a/libswscale/swscale_unscaled.c ++++ b/libswscale/swscale_unscaled.c +@@ -345,7 +345,7 @@ static int planar8ToP01xleWrapper(SwsContext *c, const uint8_t *src[], const uint8_t *tsrc0 = src[0]; for (x = c->srcW; x > 0; x--) { t = *tsrc0++; @@ -3427,7 +2793,7 @@ diff -Naur ffmpeg-7.1.2.old/libswscale/swscale_unscaled.c ffmpeg-7.1.2/libswscal } src[0] += srcStride[0]; dstY += dstStride[0] / 2; -@@ -352,9 +352,9 @@ +@@ -356,9 +356,9 @@ static int planar8ToP01xleWrapper(SwsContext *c, const uint8_t *src[], const uint8_t *tsrc2 = src[2]; for (x = c->srcW / 2; x > 0; x--) { t = *tsrc1++; @@ -3439,3 +2805,6 @@ diff -Naur ffmpeg-7.1.2.old/libswscale/swscale_unscaled.c ffmpeg-7.1.2/libswscal } src[1] += srcStride[1]; src[2] += srcStride[2]; +-- +2.54.0 + diff --git a/anda/multimedia/ffmpeg/ffmpeg-LCEVCdec-4.patch b/anda/multimedia/ffmpeg/ffmpeg-LCEVCdec-4.patch deleted file mode 100644 index ae0aa51e88..0000000000 --- a/anda/multimedia/ffmpeg/ffmpeg-LCEVCdec-4.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Naur ffmpeg-7.1.2.old/libavcodec/lcevcdec.c ffmpeg-7.1.2/libavcodec/lcevcdec.c ---- ffmpeg-7.1.2.old/libavcodec/lcevcdec.c 2025-10-27 10:07:00.369472051 +0100 -+++ ffmpeg-7.1.2/libavcodec/lcevcdec.c 2025-10-27 10:07:01.223246583 +0100 -@@ -139,7 +139,7 @@ - if (!sd) - return 1; - -- res = LCEVC_SendDecoderEnhancementData(lcevc->decoder, in->pts, 0, sd->data, sd->size); -+ res = LCEVC_SendDecoderEnhancementData(lcevc->decoder, (uint64_t) in->pts, sd->data, sd->size); - if (res != LCEVC_Success) - return AVERROR_EXTERNAL; - -@@ -147,7 +147,7 @@ - if (ret < 0) - return ret; - -- res = LCEVC_SendDecoderBase(lcevc->decoder, in->pts, 0, picture, -1, NULL); -+ res = LCEVC_SendDecoderBase(lcevc->decoder, (uint64_t) in->pts, picture, -1, NULL); - if (res != LCEVC_Success) - return AVERROR_EXTERNAL; - -diff -Naur ffmpeg-7.1.2.old/libavfilter/vf_lcevc.c ffmpeg-7.1.2/libavfilter/vf_lcevc.c ---- ffmpeg-7.1.2.old/libavfilter/vf_lcevc.c 2025-10-27 10:07:00.732521928 +0100 -+++ ffmpeg-7.1.2/libavfilter/vf_lcevc.c 2025-10-27 10:07:01.223846623 +0100 -@@ -139,7 +139,7 @@ - return ret; - - if (sd) { -- res = LCEVC_SendDecoderEnhancementData(lcevc->decoder, in->pts, 0, sd->data, sd->size); -+ res = LCEVC_SendDecoderEnhancementData(lcevc->decoder, (uint64_t) in->pts, sd->data, sd->size); - if (res == LCEVC_Again) - return AVERROR(EAGAIN); - else if (res != LCEVC_Success) { -@@ -148,7 +148,7 @@ - } - } - -- res = LCEVC_SendDecoderBase(lcevc->decoder, in->pts, 0, picture, -1, in); -+ res = LCEVC_SendDecoderBase(lcevc->decoder, (uint64_t) in->pts, picture, -1, in); - if (res != LCEVC_Success) { - av_log(ctx, AV_LOG_ERROR, "LCEVC_SendDecoderBase failed\n"); - LCEVC_FreePicture(lcevc->decoder, picture); diff --git a/anda/multimedia/ffmpeg/ffmpeg-allow-fdk-aac-free.patch b/anda/multimedia/ffmpeg/ffmpeg-allow-fdk-aac-free.patch new file mode 100644 index 0000000000..11e1a3ca37 --- /dev/null +++ b/anda/multimedia/ffmpeg/ffmpeg-allow-fdk-aac-free.patch @@ -0,0 +1,27 @@ +From: Andreas Schneider + +fdk-aac-free-devel is GPL compatible + +See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112 + +Index: ffmpeg-7.0/configure +=================================================================== +--- ffmpeg-7.0.orig/configure 2022-02-09 20:07:49.490888877 +0100 ++++ ffmpeg-7.0/configure 2022-02-09 20:08:30.102854308 +0100 +@@ -1872,7 +1872,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" + + EXTERNAL_LIBRARY_NONFREE_LIST=" + decklink +- libfdk_aac + libtls + " + +@@ -1912,6 +1911,7 @@ EXTERNAL_LIBRARY_LIST=" + libcodec2 + libdav1d + libdc1394 ++ libfdk_aac + libflite + libfontconfig + libfreetype + diff --git a/anda/multimedia/ffmpeg/ffmpeg-chromium.patch b/anda/multimedia/ffmpeg/ffmpeg-chromium.patch index 5c8c6cbfd9..9872622869 100644 --- a/anda/multimedia/ffmpeg/ffmpeg-chromium.patch +++ b/anda/multimedia/ffmpeg/ffmpeg-chromium.patch @@ -1,31 +1,46 @@ -diff -Naur ffmpeg-7.1.2.old/libavformat/avformat.h ffmpeg-7.1.2/libavformat/avformat.h ---- ffmpeg-7.1.2.old/libavformat/avformat.h 2025-10-27 10:07:00.895476692 +0100 -+++ ffmpeg-7.1.2/libavformat/avformat.h 2025-10-27 10:07:01.866348795 +0100 -@@ -1202,6 +1202,10 @@ - +From d32aacab65a322b66d6a1b48f6cdb03e42bde0f9 Mon Sep 17 00:00:00 2001 +From: Frank Liberato +Date: Wed, 7 Jul 2021 19:01:22 -0700 +Subject: [PATCH] Add av_stream_get_first_dts for Chromium + +--- + libavformat/avformat.h | 4 ++++ + libavformat/utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 1916aa2dc5..e6682849fa 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup { + struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); - + +// Chromium: We use the internal field first_dts vvv +int64_t av_stream_get_first_dts(const AVStream *st); +// Chromium: We use the internal field first_dts ^^^ + #define AV_PROGRAM_RUNNING 1 - + /** -diff -Naur ffmpeg-7.1.2.old/libavformat/utils.c ffmpeg-7.1.2/libavformat/utils.c ---- ffmpeg-7.1.2.old/libavformat/utils.c 2025-10-27 10:07:00.899476727 +0100 -+++ ffmpeg-7.1.2/libavformat/utils.c 2025-10-27 10:07:01.866992658 +0100 -@@ -44,6 +44,13 @@ +diff --git a/libavformat/utils.c b/libavformat/utils.c +index cf4d68bff9..7d750abf88 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -56,6 +56,13 @@ int ff_unlock_avformat(void) * various utility functions for use within FFmpeg */ +// Chromium: We use the internal field first_dts vvv +int64_t av_stream_get_first_dts(const AVStream *st) +{ -+ return cffstream(st)->first_dts; ++ return cffstream(st)->first_dts; +} +// Chromium: We use the internal field first_dts ^^^ + /* an arbitrarily chosen "sane" max packet size -- 50M */ #define SANE_CHUNK_SIZE (50000000) - + +-- +2.41.0 + diff --git a/anda/multimedia/ffmpeg/ffmpeg-codec-choice.patch b/anda/multimedia/ffmpeg/ffmpeg-codec-choice.patch new file mode 100644 index 0000000000..f6a4ead570 --- /dev/null +++ b/anda/multimedia/ffmpeg/ffmpeg-codec-choice.patch @@ -0,0 +1,58 @@ +From: Jan Engelhardt + +Edit the default codec selection such that + + ffmpeg -i youtube.blah.webm foobar.mkv + +without any further arguments can produce a result even on a +reduced codec selection list. + +--- + libavformat/matroskaenc.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +Index: ffmpeg-7.0/libavformat/matroskaenc.c +=================================================================== +--- ffmpeg-7.0.orig/libavformat/matroskaenc.c ++++ ffmpeg-7.0/libavformat/matroskaenc.c +@@ -3540,16 +3540,25 @@ static int mkv_query_codec(enum AVCodecI + return 0; + } + ++#define PREFAUDIO \ ++ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \ ++ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \ ++ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \ ++ AV_CODEC_ID_AC3 ++ + const FFOutputFormat ff_matroska_muxer = { + .p.name = "matroska", + .p.long_name = NULL_IF_CONFIG_SMALL("Matroska"), + .p.mime_type = "video/x-matroska", + .p.extensions = "mkv", + .priv_data_size = sizeof(MatroskaMuxContext), +- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ? +- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3, +- .p.video_codec = CONFIG_LIBX264_ENCODER ? +- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4, ++ .p.audio_codec = PREFAUDIO, ++ .p.video_codec = ++ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \ ++ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \ ++ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \ ++ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \ ++ AV_CODEC_ID_THEORA, + .init = mkv_init, + .deinit = mkv_deinit, + .write_header = mkv_write_header, +@@ -3617,8 +3626,7 @@ const FFOutputFormat ff_matroska_audio_m + .p.mime_type = "audio/x-matroska", + .p.extensions = "mka", + .priv_data_size = sizeof(MatroskaMuxContext), +- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ? +- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3, ++ .p.audio_codec = PREFAUDIO, + .p.video_codec = AV_CODEC_ID_NONE, + .init = mkv_init, + .deinit = mkv_deinit, + diff --git a/anda/multimedia/ffmpeg/ffmpeg-cuda-13.patch b/anda/multimedia/ffmpeg/ffmpeg-cuda-13.patch deleted file mode 100644 index 28bba4a1a7..0000000000 --- a/anda/multimedia/ffmpeg/ffmpeg-cuda-13.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure ---- ffmpeg-7.1.2.old/configure 2025-10-27 10:07:02.273543997 +0100 -+++ ffmpeg-7.1.2/configure 2025-10-27 10:07:02.276510125 +0100 -@@ -4710,6 +4710,9 @@ - if $nvcc $nvccflags_default 2>&1 | grep -qi unsupported; then - nvccflags_default="-gencode arch=compute_60,code=sm_60 -O2" - fi -+ if $nvcc $nvccflags_default 2>&1 | grep -qi unsupported; then -+ nvccflags_default="-gencode arch=compute_75,code=sm_75 -O2" -+ fi - fi - - set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ diff --git a/anda/multimedia/ffmpeg/ffmpeg-decklink-14.patch b/anda/multimedia/ffmpeg/ffmpeg-decklink-14.patch deleted file mode 100644 index 779e398257..0000000000 --- a/anda/multimedia/ffmpeg/ffmpeg-decklink-14.patch +++ /dev/null @@ -1,454 +0,0 @@ -diff -Naur ffmpeg-7.1.2.old/doc/outdevs.texi ffmpeg-7.1.2/doc/outdevs.texi ---- ffmpeg-7.1.2.old/doc/outdevs.texi 2025-10-27 10:07:00.979477433 +0100 -+++ ffmpeg-7.1.2/doc/outdevs.texi 2025-10-27 10:07:02.002148270 +0100 -@@ -240,6 +240,10 @@ - outgoing VANC data will be dropped. - Defaults to @samp{1048576}. - -+@item block_until_available -+Retries output if device appears unavailable. Retry rate is 60 times a second. -+Defaults to @option{0}. -+ - @end table - - @subsection Examples -diff -Naur ffmpeg-7.1.2.old/fftools/ffmpeg_sched.c ffmpeg-7.1.2/fftools/ffmpeg_sched.c ---- ffmpeg-7.1.2.old/fftools/ffmpeg_sched.c 2025-10-27 10:07:01.220479559 +0100 -+++ ffmpeg-7.1.2/fftools/ffmpeg_sched.c 2025-10-27 10:07:02.002549025 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - #include "cmdutils.h" - #include "ffmpeg_sched.h" -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_common_c.h ffmpeg-7.1.2/libavdevice/decklink_common_c.h ---- ffmpeg-7.1.2.old/libavdevice/decklink_common_c.h 2025-10-27 10:07:00.829476109 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_common_c.h 2025-10-27 10:07:02.003002589 +0100 -@@ -74,6 +74,7 @@ - int64_t timestamp_align; - int timing_offset; - int wait_for_tc; -+ int block_until_available; - DecklinkSignalLossAction signal_loss_action; - }; - -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_common.cpp ffmpeg-7.1.2/libavdevice/decklink_common.cpp ---- ffmpeg-7.1.2.old/libavdevice/decklink_common.cpp 2025-10-27 10:07:00.828476101 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_common.cpp 2025-10-27 10:07:02.003115933 +0100 -@@ -25,7 +25,7 @@ - #include "libavformat/internal.h" - } - --#include -+#include - #ifdef _WIN32 - #include - #else -@@ -53,6 +53,7 @@ - - #include "decklink_common.h" - -+ - static IDeckLinkIterator *decklink_create_iterator(AVFormatContext *avctx) - { - IDeckLinkIterator *iter; -@@ -512,8 +513,8 @@ - return AVERROR(EIO); - - while (ret == 0 && iter->Next(&dl) == S_OK) { -- IDeckLinkOutput *output_config; -- IDeckLinkInput *input_config; -+ IDeckLinkOutput_v14_2_1 *output_config; -+ IDeckLinkInput_v14_2_1 *input_config; - const char *display_name = NULL; - const char *unique_name = NULL; - AVDeviceInfo *new_device = NULL; -@@ -527,14 +528,14 @@ - goto next; - - if (show_outputs) { -- if (dl->QueryInterface(IID_IDeckLinkOutput, (void **)&output_config) == S_OK) { -+ if (dl->QueryInterface(IID_IDeckLinkOutput_v14_2_1, (void **)&output_config) == S_OK) { - output_config->Release(); - add = 1; - } - } - - if (show_inputs) { -- if (dl->QueryInterface(IID_IDeckLinkInput, (void **)&input_config) == S_OK) { -+ if (dl->QueryInterface(IID_IDeckLinkInput_v14_2_1, (void **)&input_config) == S_OK) { - input_config->Release(); - add = 1; - } -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_common.h ffmpeg-7.1.2/libavdevice/decklink_common.h ---- ffmpeg-7.1.2.old/libavdevice/decklink_common.h 2025-10-27 10:07:00.831476127 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_common.h 2025-10-27 10:07:02.003408083 +0100 -@@ -93,8 +93,8 @@ - struct decklink_ctx { - /* DeckLink SDK interfaces */ - IDeckLink *dl; -- IDeckLinkOutput *dlo; -- IDeckLinkInput *dli; -+ IDeckLinkOutput_v14_2_1 *dlo; -+ IDeckLinkInput_v14_2_1 *dli; - IDeckLinkConfiguration *cfg; - IDeckLinkProfileAttributes *attr; - decklink_output_callback *output_callback; -@@ -134,7 +134,6 @@ - AVStream *klv_st; - AVStream *teletext_st; - uint16_t cdp_sequence_num; -- - /* Options */ - int list_devices; - int list_formats; -@@ -149,13 +148,16 @@ - BMDPixelFormat raw_format; - DecklinkSignalLossAction signal_loss_action; - -+ - int frames_preroll; - int frames_buffer; - - pthread_mutex_t mutex; - pthread_cond_t cond; - int frames_buffer_available_spots; -+ int outstanding_frames; - int autodetect; -+ int block_until_available; - - #if CONFIG_LIBKLVANC - struct klvanc_context_s *vanc_ctx; -@@ -249,3 +251,4 @@ - int64_t ff_decklink_packet_queue_peekpts(DecklinkPacketQueue *q); - - #endif /* AVDEVICE_DECKLINK_COMMON_H */ -+ -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_dec.cpp ffmpeg-7.1.2/libavdevice/decklink_dec.cpp ---- ffmpeg-7.1.2.old/libavdevice/decklink_dec.cpp 2025-10-27 10:07:00.828476101 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_dec.cpp 2025-10-27 10:07:02.003669356 +0100 -@@ -31,7 +31,7 @@ - #include "libavformat/internal.h" - } - --#include -+#include - - extern "C" { - #include "config.h" -@@ -56,6 +56,7 @@ - #include "decklink_common.h" - #include "decklink_dec.h" - -+extern bool operator==(const REFIID& me, const REFIID& other); - #define MAX_WIDTH_VANC 1920 - const BMDDisplayMode AUTODETECT_DEFAULT_MODE = bmdModeNTSC; - -@@ -105,13 +106,13 @@ - {bmdModeUnknown, 0, -1, -1, -1} - }; - --class decklink_allocator : public IDeckLinkMemoryAllocator -+class decklink_allocator : public IDeckLinkMemoryAllocator_v14_2_1 - { - public: - decklink_allocator(): _refs(1) { } - virtual ~decklink_allocator() { } - -- // IDeckLinkMemoryAllocator methods -+ // IDeckLinkMemoryAllocator_v14_2_1 methods - virtual HRESULT STDMETHODCALLTYPE AllocateBuffer(unsigned int bufferSize, void* *allocatedBuffer) - { - void *buf = av_malloc(bufferSize + AV_INPUT_BUFFER_PADDING_SIZE); -@@ -129,7 +130,15 @@ - virtual HRESULT STDMETHODCALLTYPE Decommit() { return S_OK; } - - // IUnknown methods -- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; } -+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) -+ { -+ if (iid == IID_IDeckLinkMemoryAllocator_v14_2_1) { -+ *ppv = (IDeckLinkMemoryAllocator_v14_2_1*)this; -+ AddRef(); -+ return S_OK; -+ } -+ return E_NOINTERFACE; -+ } - virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++_refs; } - virtual ULONG STDMETHODCALLTYPE Release(void) - { -@@ -472,7 +481,7 @@ - } - - --static void handle_klv(AVFormatContext *avctx, decklink_ctx *ctx, IDeckLinkVideoInputFrame *videoFrame, int64_t pts) -+static void handle_klv(AVFormatContext *avctx, decklink_ctx *ctx, IDeckLinkVideoInputFrame_v14_2_1 *videoFrame, int64_t pts) - { - const uint8_t KLV_DID = 0x44; - const uint8_t KLV_IN_VANC_SDID = 0x04; -@@ -574,17 +583,25 @@ - } - } - --class decklink_input_callback : public IDeckLinkInputCallback -+class decklink_input_callback : public IDeckLinkInputCallback_v14_2_1 - { - public: - explicit decklink_input_callback(AVFormatContext *_avctx); - ~decklink_input_callback(); - -- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; } -+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) -+ { -+ if (iid == IID_IDeckLinkInputCallback_v14_2_1) { -+ *ppv = (IDeckLinkInputCallback_v14_2_1*)this; -+ AddRef(); -+ return S_OK; -+ } -+ return E_NOINTERFACE; -+ } - virtual ULONG STDMETHODCALLTYPE AddRef(void); - virtual ULONG STDMETHODCALLTYPE Release(void); - virtual HRESULT STDMETHODCALLTYPE VideoInputFormatChanged(BMDVideoInputFormatChangedEvents, IDeckLinkDisplayMode*, BMDDetectedVideoInputFormatFlags); -- virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame*, IDeckLinkAudioInputPacket*); -+ virtual HRESULT STDMETHODCALLTYPE VideoInputFrameArrived(IDeckLinkVideoInputFrame_v14_2_1*, IDeckLinkAudioInputPacket*); - - private: - std::atomic _refs; -@@ -593,7 +610,7 @@ - int no_video; - int64_t initial_video_pts; - int64_t initial_audio_pts; -- IDeckLinkVideoInputFrame* last_video_frame; -+ IDeckLinkVideoInputFrame_v14_2_1* last_video_frame; - }; - - decklink_input_callback::decklink_input_callback(AVFormatContext *_avctx) : _refs(1) -@@ -625,7 +642,7 @@ - return ret; - } - --static int64_t get_pkt_pts(IDeckLinkVideoInputFrame *videoFrame, -+static int64_t get_pkt_pts(IDeckLinkVideoInputFrame_v14_2_1 *videoFrame, - IDeckLinkAudioInputPacket *audioFrame, - int64_t wallclock, - int64_t abs_wallclock, -@@ -679,7 +696,7 @@ - return pts; - } - --static int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame) -+static int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame_v14_2_1 *videoFrame) - { - IDeckLinkTimecode *timecode; - int ret = AVERROR(ENOENT); -@@ -701,7 +718,7 @@ - return ret; - } - --static int get_frame_timecode(AVFormatContext *avctx, decklink_ctx *ctx, AVTimecode *tc, IDeckLinkVideoInputFrame *videoFrame) -+static int get_frame_timecode(AVFormatContext *avctx, decklink_ctx *ctx, AVTimecode *tc, IDeckLinkVideoInputFrame_v14_2_1 *videoFrame) - { - AVRational frame_rate = ctx->video_st->r_frame_rate; - int ret; -@@ -726,7 +743,7 @@ - } - - HRESULT decklink_input_callback::VideoInputFrameArrived( -- IDeckLinkVideoInputFrame *videoFrame, IDeckLinkAudioInputPacket *audioFrame) -+ IDeckLinkVideoInputFrame_v14_2_1 *videoFrame, IDeckLinkAudioInputPacket *audioFrame) - { - void *frameBytes; - void *audioFrameBytes; -@@ -1141,7 +1158,7 @@ - goto error; - - /* Get input device. */ -- if (ctx->dl->QueryInterface(IID_IDeckLinkInput, (void **) &ctx->dli) != S_OK) { -+ if (ctx->dl->QueryInterface(IID_IDeckLinkInput_v14_2_1, (void **) &ctx->dli) != S_OK) { - av_log(avctx, AV_LOG_ERROR, "Could not open input device from '%s'\n", - avctx->url); - ret = AVERROR(EIO); -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_enc_c.c ffmpeg-7.1.2/libavdevice/decklink_enc_c.c ---- ffmpeg-7.1.2.old/libavdevice/decklink_enc_c.c 2025-10-27 10:07:00.833476145 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_enc_c.c 2025-10-27 10:07:02.004050964 +0100 -@@ -32,6 +32,7 @@ - { "list_devices", "use ffmpeg -sinks decklink instead", OFFSET(list_devices), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC | AV_OPT_FLAG_DEPRECATED}, - { "list_formats", "list supported formats" , OFFSET(list_formats), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 1, ENC }, - { "preroll" , "video preroll in seconds", OFFSET(preroll ), AV_OPT_TYPE_DOUBLE, { .dbl = 0.5 }, 0, 5, ENC }, -+ { "block_until_available", "wait for device to become available instead of raising error", OFFSET(block_until_available), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC }, - { "vanc_queue_size", "VANC queue buffer size", OFFSET(vanc_queue_size), AV_OPT_TYPE_INT64, { .i64 = (1024 * 1024)}, 0, INT64_MAX, ENC }, - #if BLACKMAGIC_DECKLINK_API_VERSION >= 0x0b000000 - { "duplex_mode" , "duplex mode" , OFFSET(duplex_mode ), AV_OPT_TYPE_INT , { .i64 = 0 }, 0, 5, ENC, .unit = "duplex_mode"}, -diff -Naur ffmpeg-7.1.2.old/libavdevice/decklink_enc.cpp ffmpeg-7.1.2/libavdevice/decklink_enc.cpp ---- ffmpeg-7.1.2.old/libavdevice/decklink_enc.cpp 2025-10-27 10:07:00.832476136 +0100 -+++ ffmpeg-7.1.2/libavdevice/decklink_enc.cpp 2025-10-27 10:07:02.004296918 +0100 -@@ -20,6 +20,8 @@ - */ - - #include -+#include -+ - using std::atomic; - - /* Include internal.h first to avoid conflict between winsock.h (used by -@@ -28,7 +30,7 @@ - #include "libavformat/internal.h" - } - --#include -+#include - - extern "C" { - #include "libavformat/avformat.h" -@@ -47,8 +49,26 @@ - #include "libklvanc/pixels.h" - #endif - -+extern bool operator==(const REFIID& me, const REFIID& other){ -+ return me.byte0 == other.byte0 && -+ me.byte1 == other.byte1 && -+ me.byte2 == other.byte2 && -+ me.byte3 == other.byte3 && -+ me.byte4 == other.byte4 && -+ me.byte5 == other.byte5 && -+ me.byte6 == other.byte6 && -+ me.byte7 == other.byte7 && -+ me.byte8 == other.byte8 && -+ me.byte9 == other.byte9 && -+ me.byte10 == other.byte10 && -+ me.byte11 == other.byte11 && -+ me.byte12 == other.byte12 && -+ me.byte13 == other.byte13 && -+ me.byte14 == other.byte14 && -+ me.byte15 == other.byte15; -+} - /* DeckLink callback class declaration */ --class decklink_frame : public IDeckLinkVideoFrame -+class decklink_frame : public IDeckLinkVideoFrame_v14_2_1 - { - public: - decklink_frame(struct decklink_ctx *ctx, AVFrame *avframe, AVCodecID codec_id, int height, int width) : -@@ -111,7 +131,16 @@ - _ancillary->AddRef(); - return S_OK; - } -- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; } -+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) -+ { -+ if (iid == IID_IDeckLinkVideoFrame_v14_2_1) -+ { -+ *ppv = (IDeckLinkVideoFrame_v14_2_1*)this; -+ AddRef(); -+ return S_OK; -+ } -+ return E_NOINTERFACE; -+ } - virtual ULONG STDMETHODCALLTYPE AddRef(void) { return ++_refs; } - virtual ULONG STDMETHODCALLTYPE Release(void) - { -@@ -138,10 +167,10 @@ - std::atomic _refs; - }; - --class decklink_output_callback : public IDeckLinkVideoOutputCallback -+class decklink_output_callback : public IDeckLinkVideoOutputCallback_v14_2_1 - { - public: -- virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame *_frame, BMDOutputFrameCompletionResult result) -+ virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame_v14_2_1 *_frame, BMDOutputFrameCompletionResult result) - { - decklink_frame *frame = static_cast(_frame); - struct decklink_ctx *ctx = frame->_ctx; -@@ -155,11 +184,22 @@ - ctx->frames_buffer_available_spots++; - pthread_cond_broadcast(&ctx->cond); - pthread_mutex_unlock(&ctx->mutex); -- -+ pthread_mutex_lock(&ctx->mutex); -+ ctx->outstanding_frames--; -+ pthread_mutex_unlock(&ctx->mutex); - return S_OK; - } - virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped(void) { return S_OK; } -- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) { return E_NOINTERFACE; } -+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) -+ { -+ if (iid == IID_IDeckLinkVideoOutputCallback_v14_2_1) -+ { -+ *ppv = (IDeckLinkVideoOutputCallback_v14_2_1*)this; -+ AddRef(); -+ return S_OK; -+ } -+ return E_NOINTERFACE; -+ } - virtual ULONG STDMETHODCALLTYPE AddRef(void) { return 1; } - virtual ULONG STDMETHODCALLTYPE Release(void) { return 1; } - }; -@@ -204,9 +244,14 @@ - av_log(avctx, AV_LOG_WARNING, "Could not enable video output with VANC! Trying without...\n"); - ctx->supports_vanc = 0; - } -- if (!ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputFlagDefault) != S_OK) { -- av_log(avctx, AV_LOG_ERROR, "Could not enable video output!\n"); -- return -1; -+ while (!ctx->supports_vanc && ctx->dlo->EnableVideoOutput(ctx->bmd_mode, bmdVideoOutputFlagDefault) != S_OK) { -+ if (!ctx->block_until_available) { -+ av_log(avctx, AV_LOG_ERROR, "Could not enable video output!\n"); -+ return -1; -+ }; -+ av_log(avctx, AV_LOG_WARNING, "Could not enable video output, waiting for device...\n"); -+ usleep(1000000 / 60); -+ continue; - } - - /* Set callback. */ -@@ -370,6 +415,10 @@ - struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data; - struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; - -+ av_log(avctx, AV_LOG_DEBUG, "Wating for %d outstanding frames to return their results\n", ctx->outstanding_frames); -+ while (ctx->outstanding_frames > 0){ -+ usleep(1); -+ } - if (ctx->playback_started) { - BMDTimeValue actual; - ctx->dlo->StopScheduledPlayback(ctx->last_pts * ctx->bmd_tb_num, -@@ -739,7 +788,7 @@ - ctx->first_pts = pkt->pts; - - /* Schedule frame for playback. */ -- hr = ctx->dlo->ScheduleVideoFrame((class IDeckLinkVideoFrame *) frame, -+ hr = ctx->dlo->ScheduleVideoFrame((class IDeckLinkVideoFrame_v14_2_1 *) frame, - pkt->pts * ctx->bmd_tb_num, - ctx->bmd_tb_num, ctx->bmd_tb_den); - /* Pass ownership to DeckLink, or release on failure */ -@@ -750,6 +799,9 @@ - return AVERROR(EIO); - } - -+ pthread_mutex_lock(&ctx->mutex); -+ ctx->outstanding_frames++; -+ pthread_mutex_unlock(&ctx->mutex); - ctx->dlo->GetBufferedVideoFrameCount(&buffered); - av_log(avctx, AV_LOG_DEBUG, "Buffered video frames: %d.\n", (int) buffered); - if (pkt->pts > 2 && buffered <= 2) -@@ -850,6 +902,7 @@ - ctx->list_devices = cctx->list_devices; - ctx->list_formats = cctx->list_formats; - ctx->preroll = cctx->preroll; -+ ctx->block_until_available = cctx->block_until_available; - ctx->duplex_mode = cctx->duplex_mode; - ctx->first_pts = AV_NOPTS_VALUE; - if (cctx->link > 0 && (unsigned int)cctx->link < FF_ARRAY_ELEMS(decklink_link_conf_map)) -@@ -874,7 +927,7 @@ - return ret; - - /* Get output device. */ -- if (ctx->dl->QueryInterface(IID_IDeckLinkOutput, (void **) &ctx->dlo) != S_OK) { -+ if (ctx->dl->QueryInterface(IID_IDeckLinkOutput_v14_2_1, (void **) &ctx->dlo) != S_OK) { - av_log(avctx, AV_LOG_ERROR, "Could not open output device from '%s'\n", - avctx->url); - ret = AVERROR(EIO); diff --git a/anda/multimedia/ffmpeg/ffmpeg-nvcc.patch b/anda/multimedia/ffmpeg/ffmpeg-nvcc.patch deleted file mode 100644 index 7dcf2259c3..0000000000 --- a/anda/multimedia/ffmpeg/ffmpeg-nvcc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure ---- ffmpeg-7.1.2.old/configure 2025-10-27 10:07:01.862821941 +0100 -+++ ffmpeg-7.1.2/configure 2025-10-27 10:07:02.140469997 +0100 -@@ -6766,7 +6766,7 @@ - nvccflags=$nvccflags_default - fi - --nvccflags="$nvccflags -std=c++11" -+nvccflags="$nvccflags -std=c++14" - - if enabled x86_64 || enabled ppc64 || enabled aarch64; then - nvccflags="$nvccflags -m64" diff --git a/anda/multimedia/ffmpeg/ffmpeg-support-evc-base-libraries.patch b/anda/multimedia/ffmpeg/ffmpeg-support-evc-base-libraries.patch new file mode 100644 index 0000000000..add444f0fe --- /dev/null +++ b/anda/multimedia/ffmpeg/ffmpeg-support-evc-base-libraries.patch @@ -0,0 +1,73 @@ +From 80bf83e3099652a3e7f8d1e8b6d902fea1ce4db9 Mon Sep 17 00:00:00 2001 +From: James Almer +Date: Sun, 24 Aug 2025 15:57:16 -0300 +Subject: [PATCH] configure: support linking to base profile libxev{d,e} + +Addresses issue #20328. + +Signed-off-by: James Almer +--- + configure | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index aa41b2a7b3..5386ae8b9a 100755 +--- a/configure ++++ b/configure +@@ -299,7 +299,9 @@ External library support: + --enable-libx264 enable H.264 encoding via x264 [no] + --enable-libx265 enable HEVC encoding via x265 [no] + --enable-libxeve enable EVC encoding via libxeve [no] ++ --enable-libxeveb enable EVC encoding via libxeve (Base profile) [no] + --enable-libxevd enable EVC decoding via libxevd [no] ++ --enable-libxevdb enable EVC decoding via libxevd (Base profile) [no] + --enable-libxavs enable AVS encoding via xavs [no] + --enable-libxavs2 enable AVS2 encoding via xavs2 [no] + --enable-libxcb enable X11 grabbing using XCB [autodetect] +@@ -1992,7 +1994,9 @@ EXTERNAL_LIBRARY_LIST=" + libvvenc + libwebp + libxevd ++ libxevdb + libxeve ++ libxeveb + libxml2 + libzimg + libzmq +@@ -3669,8 +3673,8 @@ libx265_encoder_deps="libx265" + libx265_encoder_select="atsc_a53 dovi_rpuenc" + libxavs_encoder_deps="libxavs" + libxavs2_encoder_deps="libxavs2" +-libxevd_decoder_deps="libxevd" +-libxeve_encoder_deps="libxeve" ++libxevd_decoder_deps_any="libxevd libxevdb" ++libxeve_encoder_deps_any="libxeve libxeveb" + libxvid_encoder_deps="libxvid" + libzvbi_teletext_decoder_deps="libzvbi" + vapoursynth_demuxer_deps="vapoursynth" +@@ -4615,6 +4619,12 @@ enabled_all gnutls mbedtls && + enabled_all openssl mbedtls && + die "OpenSSL and mbedTLS must not be enabled at the same time." + ++enabled_all libxevd libxevdb && ++ die "libxevd and libxevdb must not be enabled at the same time." ++ ++enabled_all libxeve libxeveb && ++ die "libxeve and libxevdb must not be enabled at the same time." ++ + # Disable all the library-specific components if the library itself + # is disabled, see AVCODEC_LIST and following _LIST variables. + +@@ -7204,7 +7214,9 @@ enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get + enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" + enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get + enabled libxevd && require_pkg_config libxevd "xevd >= 0.4.1" "xevd.h" xevd_decode ++enabled libxevdb && require_pkg_config libxevdb "xevdb >= 0.4.1" "xevd.h" xevd_decode + enabled libxeve && require_pkg_config libxeve "xeve >= 0.5.1" "xeve.h" xeve_encode ++enabled libxeveb && require_pkg_config libxeveb "xeveb >= 0.5.1" "xeve.h" xeve_encode + enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore + enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version + enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h zmq_ctx_new +-- +2.49.1 + diff --git a/anda/multimedia/ffmpeg/ffmpeg-svt-vp9.patch b/anda/multimedia/ffmpeg/ffmpeg-svt-vp9.patch index 6bdae213ed..d7f8ddf98d 100644 --- a/anda/multimedia/ffmpeg/ffmpeg-svt-vp9.patch +++ b/anda/multimedia/ffmpeg/ffmpeg-svt-vp9.patch @@ -1,7 +1,22 @@ -diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure ---- ffmpeg-7.1.2.old/configure 2025-10-27 10:07:00.645474486 +0100 -+++ ffmpeg-7.1.2/configure 2025-10-27 10:07:01.726484024 +0100 -@@ -278,6 +278,7 @@ +From 2dd4df3802a487d67db4592fefce89854d97838b Mon Sep 17 00:00:00 2001 +From: Terra Packaging Team +Date: Mon, 1 Jun 2026 23:15:55 -0500 +Subject: [PATCH] Patch for SVT-VP9 plugin + +See: https://github.com/OpenVisualCloud/SVT-VP9/tree/master/ffmpeg_plugin +--- + configure | 4 + + libavcodec/Makefile | 1 + + libavcodec/allcodecs.c | 1 + + libavcodec/libsvt_vp9.c | 701 ++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 707 insertions(+) + create mode 100644 libavcodec/libsvt_vp9.c + +diff --git a/configure b/configure +index 1652b0d..f96f83a 100755 +--- a/configure ++++ b/configure +@@ -278,6 +278,7 @@ External library support: --enable-libsrt enable Haivision SRT protocol via libsrt [no] --enable-libssh enable SFTP protocol via libssh [no] --enable-libsvtav1 enable AV1 encoding via SVT [no] @@ -9,7 +24,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure --enable-libtensorflow enable TensorFlow as a DNN module backend for DNN based filters like sr [no] --enable-libtesseract enable Tesseract, needed for ocr filter [no] -@@ -1955,6 +1956,7 @@ +@@ -1955,6 +1956,7 @@ EXTERNAL_LIBRARY_LIST=" libshaderc libshine libsmbclient @@ -17,7 +32,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure libsnappy libsoxr libspeex -@@ -3579,6 +3581,7 @@ +@@ -3579,6 +3581,7 @@ libvpx_vp8_decoder_deps="libvpx" libvpx_vp8_encoder_deps="libvpx" libvpx_vp9_decoder_deps="libvpx" libvpx_vp9_encoder_deps="libvpx" @@ -25,7 +40,7 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure libvvenc_encoder_deps="libvvenc" libwebp_encoder_deps="libwebp" libwebp_anim_encoder_deps="libwebp" -@@ -7028,6 +7031,7 @@ +@@ -7032,6 +7035,7 @@ enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; } enabled libuavs3d && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl @@ -33,10 +48,23 @@ diff -Naur ffmpeg-7.1.2.old/configure ffmpeg-7.1.2/configure enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 2.0.0" libvmaf.h vmaf_init enabled libvmaf && check_pkg_config libvmaf_cuda "libvmaf >= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init -diff -Naur ffmpeg-7.1.2.old/libavcodec/allcodecs.c ffmpeg-7.1.2/libavcodec/allcodecs.c ---- ffmpeg-7.1.2.old/libavcodec/allcodecs.c 2025-10-27 10:07:00.517473357 +0100 -+++ ffmpeg-7.1.2/libavcodec/allcodecs.c 2025-10-27 10:07:01.728697010 +0100 -@@ -796,6 +796,7 @@ +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index 9d1c1fc..eda3cb0 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1157,6 +1157,7 @@ OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o + OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o + OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbisenc.o \ + vorbis_data.o ++OBJS-$(CONFIG_LIBSVT_VP9_ENCODER) += libsvt_vp9.o + OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o + OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o + OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o +diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c +index aa0fc47..b9d7f0f 100644 +--- a/libavcodec/allcodecs.c ++++ b/libavcodec/allcodecs.c +@@ -796,6 +796,7 @@ extern const FFCodec ff_libuavs3d_decoder; extern const FFCodec ff_libvo_amrwbenc_encoder; extern const FFCodec ff_libvorbis_encoder; extern const FFCodec ff_libvorbis_decoder; @@ -44,9 +72,11 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/allcodecs.c ffmpeg-7.1.2/libavcodec/allco extern const FFCodec ff_libvpx_vp8_encoder; extern const FFCodec ff_libvpx_vp8_decoder; extern FFCodec ff_libvpx_vp9_encoder; -diff -Naur ffmpeg-7.1.2.old/libavcodec/libsvt_vp9.c ffmpeg-7.1.2/libavcodec/libsvt_vp9.c ---- ffmpeg-7.1.2.old/libavcodec/libsvt_vp9.c 1970-01-01 01:00:00.000000000 +0100 -+++ ffmpeg-7.1.2/libavcodec/libsvt_vp9.c 2025-10-27 10:07:01.729099438 +0100 +diff --git a/libavcodec/libsvt_vp9.c b/libavcodec/libsvt_vp9.c +new file mode 100644 +index 0000000..90ed5cb +--- /dev/null ++++ b/libavcodec/libsvt_vp9.c @@ -0,0 +1,701 @@ +/* +* Scalable Video Technology for VP9 encoder library plugin @@ -749,14 +779,6 @@ diff -Naur ffmpeg-7.1.2.old/libavcodec/libsvt_vp9.c ffmpeg-7.1.2/libavcodec/libs + .defaults = eb_enc_defaults, + .p.wrapper_name = "libsvt_vp9", +}; -diff -Naur ffmpeg-7.1.2.old/libavcodec/Makefile ffmpeg-7.1.2/libavcodec/Makefile ---- ffmpeg-7.1.2.old/libavcodec/Makefile 2025-10-27 10:07:00.259471080 +0100 -+++ ffmpeg-7.1.2/libavcodec/Makefile 2025-10-27 10:07:01.729297932 +0100 -@@ -1157,6 +1157,7 @@ - OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o - OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbisenc.o \ - vorbis_data.o -+OBJS-$(CONFIG_LIBSVT_VP9_ENCODER) += libsvt_vp9.o - OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o - OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o - OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o +-- +2.54.0 + diff --git a/anda/multimedia/ffmpeg/ffmpeg-vapoursynth-script-soname.patch b/anda/multimedia/ffmpeg/ffmpeg-vapoursynth-script-soname.patch new file mode 100644 index 0000000000..4c10196fda --- /dev/null +++ b/anda/multimedia/ffmpeg/ffmpeg-vapoursynth-script-soname.patch @@ -0,0 +1,26 @@ +From 8551dd3f2914cda19cfe4389b1167f45ddbf8190 Mon Sep 17 00:00:00 2001 +From: Terra Packaging Team +Date: Mon, 1 Jun 2026 23:19:47 -0500 +Subject: [PATCH] Fix VapourSynth dlopen + +See: https://bugzilla.redhat.com/show_bug.cgi?id=2345698 +--- + libavformat/vapoursynth.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavformat/vapoursynth.c b/libavformat/vapoursynth.c +index 0fa5aff..e6ac20b 100644 +--- a/libavformat/vapoursynth.c ++++ b/libavformat/vapoursynth.c +@@ -49,7 +49,7 @@ + #else + #include + #define VSSCRIPT_NAME "libvapoursynth-script" +- #define VSSCRIPT_LIB VSSCRIPT_NAME SLIBSUF ++ #define VSSCRIPT_LIB VSSCRIPT_NAME SLIBSUF ".0" + #endif + + struct VSState { +-- +2.54.0 + diff --git a/anda/multimedia/ffmpeg/ffmpeg.spec b/anda/multimedia/ffmpeg/ffmpeg.spec index 1c23797b59..3d9b10fe68 100644 --- a/anda/multimedia/ffmpeg/ffmpeg.spec +++ b/anda/multimedia/ffmpeg/ffmpeg.spec @@ -1,432 +1,779 @@ -%bcond bootstrap 1 +# For a complete build enable this +%bcond all_codecs 1 -%if %{with bootstrap} -%bcond chromaprint 0 -%bcond lcevcdec 0 -%else -%bcond chromaprint 1 -%bcond lcevcdec 1 +# Break dependency cycles by disabling certain optional dependencies. +%bcond bootstrap 0 + +# If building with all codecs, then set the pkg_suffix to %%nil. +# We can't handle this with a conditional, as srpm +# generation would not take it into account. +%global pkg_suffix %{!?with_all_codecs:-free}%{?with_all_codecs:%{nil}} + +# For alternative builds (do not enable in Fedora!) +%bcond freeworld_lavc 0 + +%if %{with freeworld_lavc} +# Freeworld builds enable all codecs +%global with_all_codecs 1 +# Freeworld builds do not need a package suffix +%global pkg_suffix %{nil} +%global basepkg_suffix -free %endif -%global _lto_cflags %{nil} +# Fails due to asm issue +%ifarch %{ix86} %{arm} +%bcond lto 0 +# relocations in .text from nasm-compiled code on i686 only +# https://bugzilla.redhat.com/show_bug.cgi?id=2428281 +%global _pkg_extra_ldflags "-Wl,-z,notext" +%else +%bcond lto 1 +%endif -%global avcodec_soversion 61 -%global avdevice_soversion 61 -%global avfilter_soversion 10 -%global avformat_soversion 61 -%global avutil_soversion 59 +%ifarch x86_64 +%bcond vpl 1 +%bcond vmaf 1 +%else +%bcond vpl 0 +%bcond vmaf 0 +%endif + +%ifarch s390 s390x riscv64 +%bcond dc1394 0 +%bcond ffnvcodec 0 +%else +%bcond dc1394 1 +%bcond ffnvcodec 1 +%endif + +%if 0%{?rhel} +# Disable dependencies not available or wanted on RHEL/EPEL +%bcond chromaprint 0 +%bcond flite 0 +%else +# Break chromaprint dependency cycle (Fedora-only): +# ffmpeg (libavcodec-free) → chromaprint → ffmpeg +%bcond chromaprint %{without boostrap} +%bcond flite 1 +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 9 +# Disable some features because RHEL 9 packages are too old +%bcond lcms2 0 +%bcond placebo 0 +%else +%bcond lcms2 1 +%bcond placebo 1 +%endif + +%if 0%{?el10} +# Disable temporarily while we want for liblc3 to be upgraded +# Cf. https://issues.redhat.com/browse/RHEL-127169 +%bcond lc3 0 +%else +%bcond lc3 1 +%endif + +# For using an alternative build of EVC codecs +%bcond evc_main 0 + +%if %{with all_codecs} +%bcond rtmp 1 +%bcond vvc 1 +%bcond x264 1 +%bcond x265 1 +%else +%bcond rtmp 0 +%bcond vvc 0 +%bcond x264 0 +%bcond x265 0 +%endif + +%if %{without lto} +%global _lto_cflags %{nil} +%endif + +# FIXME: GCC says there's incompatible pointer casts going on in libavdevice... +%global build_type_safety_c 2 + + +%global av_codec_soversion 61 +%global av_device_soversion 61 +%global av_filter_soversion 10 +%global av_format_soversion 61 +%global av_util_soversion 59 %global postproc_soversion 58 %global swresample_soversion 5 %global swscale_soversion 8 -Summary: A complete solution to record, convert and stream audio and video Name: ffmpeg +%global pkg_name %{name}%{?pkg_suffix} + Version: 7.1.4 -Release: 3%{?dist} -License: LGPLv3+ -URL: http://%{name}.org/ +Release: 1%{?dist} Epoch: 1 +Summary: A complete solution to record, convert and stream audio and video +License: GPL-3.0-or-later +URL: https://ffmpeg.org/ +Source0: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz +Source1: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz.asc +# https://ffmpeg.org/ffmpeg-devel.asc +# gpg2 --import --import-options import-export,import-minimal ffmpeg-devel.asc > ./ffmpeg.keyring +Source2: ffmpeg.keyring +Source20: enable_decoders +Source21: enable_encoders -Source0: http://%{name}.org/releases/%{name}-%{version}.tar.xz - -# https://github.com/OpenVisualCloud/SVT-VP9/tree/master/ffmpeg_plugin -Patch0: %{name}-svt-vp9.patch -# https://github.com/HandBrake/HandBrake/tree/8902805364f00e0d420c4d4b33053a31d27045ab -Patch1: %{name}-HandBrake.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=2240127 -# Reference: https://crbug.com/1306560 -Patch2: %{name}-chromium.patch -# Fix build with recent NVCC: -Patch3: %{name}-nvcc.patch -# https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/f8a300c6739ea2ca648579d7faf3ae9811b9f19a -Patch4: %{name}-cuda-13.patch -# Support LCEVCdec 4.0+: -Patch5: https://aur.archlinux.org/cgit/aur.git/plain/080-ffmpeg-lcevcdec4.0.0-fix.patch?h=ffmpeg-full#/%{name}-LCEVCdec-4.patch -# https://github.com/magarnicle/FFmpeg/commits/DeckLink_SDK_14_4/ -Patch6: %{name}-decklink-14.patch - -BuildRequires: AMF-devel >= 1.4.28 -BuildRequires: bzip2-devel -BuildRequires: codec2-devel -BuildRequires: decklink-devel >= 14.2 -BuildRequires: doxygen -BuildRequires: frei0r-devel -BuildRequires: gmp-devel -BuildRequires: gsm-devel -BuildRequires: ilbc-devel -BuildRequires: lame-devel >= 3.98.3 -BuildRequires: ladspa-devel -BuildRequires: libavc1394-devel -%if %{with chromaprint} -BuildRequires: libchromaprint-devel +%if %{without all_codecs} +# Fixes for reduced codec selection on free build +Patch1: ffmpeg-codec-choice.patch %endif -BuildRequires: libgcrypt-devel -BuildRequires: libiec61883-devel -BuildRequires: libklvanc-devel -BuildRequires: libtheora-devel -BuildRequires: libvdpau-devel -BuildRequires: libxavs-devel -BuildRequires: mesa-libGL-devel -BuildRequires: nasm -BuildRequires: ocl-icd-devel -BuildRequires: openal-soft-devel -BuildRequires: opencore-amr-devel -BuildRequires: perl(Pod::Man) -BuildRequires: snappy-devel -BuildRequires: soxr-devel -BuildRequires: subversion -BuildRequires: texinfo -BuildRequires: twolame-devel >= 0.3.10 -BuildRequires: vo-amrwbenc-devel -BuildRequires: xvidcore-devel -BuildRequires: xz-devel +# Allow to build with fdk-aac-free +# See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112 +Patch2: ffmpeg-allow-fdk-aac-free.patch +# Support building with EVC base profile libraries +Patch3: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20329.patch + +# HandBrake patches +Patch5: ffmpeg-svt-vp9.patch +Patch6: ffmpeg-HandBrake.patch + +# Backport fix for CVE-2025-22921 +Patch7: https://git.ffmpeg.org/gitweb/ffmpeg.git/patch/7f9c7f9849a2155224711f0ff57ecdac6e4bfb57#/ffmpeg-CVE-2025-22921.patch + +# Add first_dts getter to libavformat for Chromium +# See: https://bugzilla.redhat.com/show_bug.cgi?id=2240127 +# Reference: https://crbug.com/1306560 +Patch1002: ffmpeg-chromium.patch + + +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavdevice%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}%{_isa} = %{version}-%{release} + +BuildRequires: AMF-devel +# NOTE: This MUST be done otherwise the binary is NOT REDISTRIBUTABLE. +# Even though FDK itself may be redistributable. +# See: https://ffmpeg.org/doxygen/4.4/md_LICENSE.html +# DO NOT change this to pkgconfig(fdk-aac). +BuildRequires: fdk-aac-free-devel +%if %{with flite} +BuildRequires: flite-devel >= 2.2 +%endif +BuildRequires: game-music-emu-devel +BuildRequires: gcc +BuildRequires: git-core +BuildRequires: gnupg2 +BuildRequires: gsm-devel +BuildRequires: ladspa-devel +BuildRequires: lame-devel +BuildRequires: libgcrypt-devel +BuildRequires: libklvanc-devel +BuildRequires: libmysofa-devel +BuildRequires: libX11-devel +BuildRequires: libXext-devel +BuildRequires: libXv-devel +BuildRequires: make +BuildRequires: nasm +BuildRequires: perl(Pod::Man) BuildRequires: pkgconfig(alsa) -BuildRequires: pkgconfig(aom) >= 1.0.0 +BuildRequires: pkgconfig(aom) BuildRequires: pkgconfig(aribb24) >= 1.0.3 +BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(caca) -BuildRequires: pkgconfig(dav1d) >= 0.5.0 -BuildRequires: pkgconfig(davs2) >= 1.6.0 -BuildRequires: pkgconfig(dvdnav) >= 6.1.1 -BuildRequires: pkgconfig(fdk-aac) +BuildRequires: pkgconfig(codec2) +BuildRequires: pkgconfig(dav1d) +BuildRequires: pkgconfig(dvdnav) +BuildRequires: pkgconfig(dvdread) +BuildRequires: pkgconfig(ffnvcodec) +BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(frei0r) BuildRequires: pkgconfig(fribidi) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(gnutls) BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(libilbc) BuildRequires: pkgconfig(jack) -BuildRequires: pkgconfig(kvazaar) >= 0.8.1 +%if %{with lc3} BuildRequires: pkgconfig(lc3) >= 1.1.0 +%endif +%if %{with lcms2} BuildRequires: pkgconfig(lcms2) >= 2.13 -%if %{with lcevcdec} -BuildRequires: pkgconfig(lcevc_dec) >= 2.0.0 %endif BuildRequires: pkgconfig(libaribcaption) >= 1.1.1 -BuildRequires: pkgconfig(libass) >= 0.11.0 +BuildRequires: pkgconfig(libass) BuildRequires: pkgconfig(libbluray) BuildRequires: pkgconfig(libbs2b) +BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio_paranoia) -BuildRequires: pkgconfig(libdc1394-2) +%if %{with chromaprint} +BuildRequires: pkgconfig(libchromaprint) +%endif BuildRequires: pkgconfig(libdrm) -BuildRequires: pkgconfig(libgme) BuildRequires: pkgconfig(libjxl) >= 0.7.0 -#BuildRequires: pkgconfig(lensfun) > 0.3.95 BuildRequires: pkgconfig(libmodplug) -BuildRequires: pkgconfig(libmysofa) -BuildRequires: pkgconfig(libopenjp2) >= 2.1.0 -BuildRequires: pkgconfig(libopenmpt) >= 0.2.6557 +BuildRequires: pkgconfig(libopenjp2) +BuildRequires: pkgconfig(libopenmpt) +%if %{with placebo} BuildRequires: pkgconfig(libplacebo) >= 4.192.0 +%endif BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libqrencode) -#BuildRequires: pkgconfig(libquirc) -BuildRequires: pkgconfig(librabbitmq) >= 0.7.1 -BuildRequires: pkgconfig(librist) >= 0.2.7 -BuildRequires: pkgconfig(librtmp) +BuildRequires: pkgconfig(librabbitmq) +BuildRequires: pkgconfig(librist) BuildRequires: pkgconfig(librsvg-2.0) BuildRequires: pkgconfig(libssh) -BuildRequires: pkgconfig(libtcmalloc) -BuildRequires: pkgconfig(libva) >= 0.35.0 +BuildRequires: pkgconfig(libv4l2) +BuildRequires: pkgconfig(libva) BuildRequires: pkgconfig(libva-drm) BuildRequires: pkgconfig(libva-x11) -BuildRequires: pkgconfig(libv4l2) -BuildRequires: pkgconfig(libvvenc) >= 1.11.0 BuildRequires: pkgconfig(libwebp) -BuildRequires: pkgconfig(libwebpmux) >= 0.4.0 BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: pkgconfig(libzmq) >= 4.2.1 +BuildRequires: pkgconfig(libzmq) BuildRequires: pkgconfig(lilv-0) BuildRequires: pkgconfig(lv2) -#BuildRequires: pkgconfig(OpenCL) -#BuildRequires: pkgconfig(opencv) +BuildRequires: pkgconfig(oapv) +BuildRequires: pkgconfig(ogg) +BuildRequires: pkgconfig(openal) +BuildRequires: pkgconfig(opencore-amrnb) +BuildRequires: pkgconfig(OpenCL) BuildRequires: pkgconfig(openh264) -BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(opus) -BuildRequires: pkgconfig(rav1e) >= 0.4.0 -BuildRequires: pkgconfig(rubberband) >= 1.8.1 +BuildRequires: pkgconfig(rav1e) +BuildRequires: pkgconfig(rubberband) BuildRequires: pkgconfig(sdl2) BuildRequires: pkgconfig(shaderc) >= 2019.1 -#BuildRequires: pkgconfig(shine) BuildRequires: pkgconfig(smbclient) +BuildRequires: pkgconfig(snappy) +BuildRequires: pkgconfig(soxr) BuildRequires: pkgconfig(speex) -BuildRequires: pkgconfig(srt) >= 1.3.0 +BuildRequires: pkgconfig(srt) BuildRequires: pkgconfig(SvtAv1Enc) >= 0.9.0 BuildRequires: pkgconfig(tesseract) -BuildRequires: pkgconfig(uavs3d) >= 1.1.41 -BuildRequires: pkgconfig(vapoursynth-script) >= 42 -BuildRequires: pkgconfig(vidstab) >= 0.98 +BuildRequires: pkgconfig(theora) +BuildRequires: pkgconfig(twolame) +BuildRequires: pkgconfig(vapoursynth) +BuildRequires: pkgconfig(vdpau) +BuildRequires: pkgconfig(vidstab) BuildRequires: pkgconfig(vorbis) -BuildRequires: pkgconfig(vorbisenc) -BuildRequires: pkgconfig(vpx) >= 1.4.0 -BuildRequires: pkgconfig(vulkan) >= 1.3.277 -BuildRequires: pkgconfig(xavs2) >= 1.3.0 -BuildRequires: pkgconfig(xcb) >= 1.4 +BuildRequires: pkgconfig(vo-amrwbenc) +BuildRequires: pkgconfig(vpx) +BuildRequires: pkgconfig(vulkan) >= 1.3.255 +BuildRequires: pkgconfig(wavpack) +BuildRequires: pkgconfig(xcb) +BuildRequires: pkgconfig(xcb-render) BuildRequires: pkgconfig(xcb-shape) BuildRequires: pkgconfig(xcb-shm) BuildRequires: pkgconfig(xcb-xfixes) -BuildRequires: pkgconfig(xevd) >= 0.4.1 -BuildRequires: pkgconfig(xeve) >= 0.4.3 -BuildRequires: pkgconfig(xext) -BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(x264) -BuildRequires: pkgconfig(x265) -BuildRequires: pkgconfig(xv) -BuildRequires: pkgconfig(zimg) >= 2.7.0 +BuildRequires: pkgconfig(zimg) BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(zvbi-0.2) >= 0.2.28 +BuildRequires: pkgconfig(zvbi-0.2) +BuildRequires: texinfo +BuildRequires: xvidcore-devel -%ifarch x86_64 aarch64 -BuildRequires: cuda-cudart-devel -BuildRequires: cuda-nvcc -BuildRequires: pkgconfig(ffnvcodec) >= 12.0.16.0 +%if %{with dc1394} +BuildRequires: pkgconfig(libavc1394) +BuildRequires: pkgconfig(libdc1394-2) +BuildRequires: pkgconfig(libiec61883) %endif - -%ifarch x86_64 -BuildRequires: pkgconfig(libmfx) -BuildRequires: pkgconfig(libvmaf) >= 2.0.0 -BuildRequires: pkgconfig(SvtVp9Enc) +%if %{with rtmp} +BuildRequires: librtmp-devel +%endif +%if %{with vpl} BuildRequires: pkgconfig(vpl) >= 2.6 %endif +%if %{with evc_main} +BuildRequires: pkgconfig(xevd) +BuildRequires: pkgconfig(xeve) +%else +BuildRequires: pkgconfig(xevdb) +BuildRequires: pkgconfig(xeveb) +%endif +%if %{with x264} +BuildRequires: pkgconfig(x264) +%endif +%if %{with x265} +BuildRequires: pkgconfig(x265) +%endif +%if %{with vmaf} +BuildRequires: pkgconfig(libvmaf) +%endif +# Prevent build from pulling full FDK-AAC builds. +# WARNING: This MUST be ensured otherwise the binary is NOT REDISTRIBUTABLE. +# Even though FDK itself may be redistributable. +# See: https://ffmpeg.org/doxygen/4.4/md_LICENSE.html +# DO NOT remove this. +BuildConflicts: fdk-aac-devel -Obsoletes: %{name}-free < %{epoch}:%{version}-%{release} -Provides: %{name}-free = %{epoch}:%{version}-%{release} +Packager: Terra Packaging Team %description -FFmpeg is a complete and free Internet live audio and video -broadcasting solution for Linux/Unix. It also includes a digital -VCR. It can encode in real time in many formats including MPEG1 audio -and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash. +FFmpeg is a leading multimedia framework, able to decode, encode, transcode, +mux, demux, stream, filter and play pretty much anything that humans and +machines have created. It supports the most obscure ancient formats up to the +cutting edge. No matter if they were designed by some standards committee, the +community or a corporation. -%package libs -Summary: Metapackage for %{name} libraries -Requires: libavcodec%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavdevice%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavfilter%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavformat%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libpostproc%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswresample%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswscale%{?_isa} = %{epoch}:%{version}-%{release} +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif -%description libs -FFmpeg is a complete and free Internet live audio and video -broadcasting solution for Linux/Unix. It also includes a digital -VCR. It can encode in real time in many formats including MPEG1 audio -and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash. -This metapackage pulls in all the %{name} libraries. +%dnl -------------------------------------------------------------------------------- -%package devel -Summary: Metapackage for %{name} development files -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +%if ! %{with freeworld_lavc} + +%if "x%{?pkg_suffix}" != "x" +%package -n %{pkg_name} +Summary: A complete solution to record, convert and stream audio and video +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavdevice%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}%{_isa} = %{version}-%{release} + + +%description -n %{pkg_name} +FFmpeg is a leading multimedia framework, able to decode, encode, transcode, +mux, demux, stream, filter and play pretty much anything that humans and +machines have created. It supports the most obscure ancient formats up to the +cutting edge. No matter if they were designed by some standards committee, the +community or a corporation. + +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif + +#/ "x%%{?pkg_suffix}" != "x" +%endif + +%files -n %{pkg_name} +%doc CREDITS README.md +%{_bindir}/ffmpeg +%{_bindir}/ffplay +%{_bindir}/ffprobe +%{_mandir}/man1/ff*.1* +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/ffprobe.xsd +%{_datadir}/%{name}/libvpx-*.ffpreset + +%dnl -------------------------------------------------------------------------------- + +%package -n %{pkg_name}-devel +Summary: Development package for %{name} +Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavdevice%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} Requires: pkgconfig -%description devel -FFmpeg is a complete and free Internet live audio and video broadcasting -solution for Linux/Unix. It also includes a digital VCR. It can encode in real -time in many formats. This package contains development files for %{name}. +%description -n %{pkg_name}-devel +FFmpeg is a leading multimedia framework, able to decode, encode, transcode, +mux, demux, stream, filter and play pretty much anything that humans and +machines have created. It supports the most obscure ancient formats up to the +cutting edge. No matter if they were designed by some standards committee, the +community or a corporation. -%package -n libavcodec +%files -n %{pkg_name}-devel +%doc MAINTAINERS doc/APIchanges doc/*.txt +%doc _doc/examples + +%dnl -------------------------------------------------------------------------------- + +%package -n libavcodec%{?pkg_suffix} Summary: FFmpeg codec library -Obsoletes: libavcodec-free < %{epoch}:%{version}-%{release} -Provides: libavcodec-free = %{epoch}:%{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release} +# We require libopenh264 library, which has a dummy implementation and a real one +# In the event that this is being installed, we want to prefer openh264 if available +Suggests: openh264%{_isa} -%description -n libavcodec -The libavcodec library provides a generic encoding/decoding framework and -contains multiple decoders and encoders for audio, video and subtitle streams, -and several bitstream filters. +%description -n libavcodec%{?pkg_suffix} +The libavcodec library provides a generic encoding/decoding framework +and contains multiple decoders and encoders for audio, video and +subtitle streams, and several bitstream filters. -%package -n libavcodec-devel +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif + +%files -n libavcodec%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavcodec.so.%{av_codec_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libavcodec%{?pkg_suffix}-devel Summary: Development files for FFmpeg's codec library -Requires: libavcodec%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} Requires: pkgconfig -Obsoletes: libavcodec-free-devel < %{epoch}:%{version}-%{release} -Provides: libavcodec-free-devel = %{epoch}:%{version}-%{release} -%description -n libavcodec-devel -The libavcodec library provides a generic encoding/decoding framework and -contains multiple decoders and encoders for audio, video and subtitle streams, -and several bitstream filters. +%description -n libavcodec%{?pkg_suffix}-devel +The libavcodec library provides a generic encoding/decoding framework +and contains multiple decoders and encoders for audio, video and +subtitle streams, and several bitstream filters. This subpackage contains the headers for FFmpeg libavcodec. -%package -n libavdevice -Summary: FFMpeg devices muxing/demuxing library -Obsoletes: libavdevice-free < %{epoch}:%{version}-%{release} -Provides: libavdevice-free = %{epoch}:%{version}-%{release} +%files -n libavcodec%{?pkg_suffix}-devel +%{_includedir}/%{name}/libavcodec +%{_libdir}/pkgconfig/libavcodec.pc +%{_libdir}/libavcodec.so +%{_mandir}/man3/libavcodec.3* -%description -n libavdevice -Libavdevice is a complementary library to libavf "libavformat". It provides -various "special" platform-specific muxers and demuxers, e.g. for grabbing -devices, audio capture and playback etc. +%dnl -------------------------------------------------------------------------------- -%package -n libavdevice-devel -Summary: Development files for FFMpeg devices muxing/demuxing library -Requires: libavcodec-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavdevice%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavfilter-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavformat-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} +%package -n libavdevice%{?pkg_suffix} +Summary: FFmpeg device library +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libavdevice%{?pkg_suffix} +The libavdevice library provides a generic framework for grabbing from +and rendering to many common multimedia input/output devices, and +supports several input and output devices, including Video4Linux2, VfW, +DShow, and ALSA. + +%files -n libavdevice%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavdevice.so.%{av_device_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libavdevice%{?pkg_suffix}-devel +Summary: Development files for FFmpeg's device library +Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavdevice%{?pkg_suffix}%{_isa} = %{version}-%{release} Requires: pkgconfig -Obsoletes: libavdevice-free-devel < %{epoch}:%{version}-%{release} -Provides: libavdevice-free-devel = %{epoch}:%{version}-%{release} -%description -n libavdevice-devel +%description -n libavdevice%{?pkg_suffix}-devel +The libavdevice library provides a generic framework for grabbing from +and rendering to many common multimedia input/output devices, and +supports several input and output devices, including Video4Linux2, VfW, +DShow, and ALSA. + This subpackage contains the headers for FFmpeg libavdevice. -%package -n libavfilter +%files -n libavdevice%{?pkg_suffix}-devel +%{_includedir}/%{name}/libavdevice +%{_libdir}/pkgconfig/libavdevice.pc +%{_libdir}/libavdevice.so +%{_mandir}/man3/libavdevice.3* + +%dnl -------------------------------------------------------------------------------- + +%package -n libavfilter%{?pkg_suffix} Summary: FFmpeg audio and video filtering library -Requires: libavcodec%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavformat%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libpostproc%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswresample%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswscale%{?_isa} = %{epoch}:%{version}-%{release} -Obsoletes: libavfilter-free < %{epoch}:%{version}-%{release} -Provides: libavfilter-free = %{epoch}:%{version}-%{release} +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}%{_isa} = %{version}-%{release} -%description -n libavfilter -The libavfilter library provides a generic audio/video filtering framework -containing several filters, sources and sinks. +%description -n libavfilter%{?pkg_suffix} +The libavfilter library provides a generic audio/video filtering +framework containing several filters, sources and sinks. -%package -n libavfilter-devel +%files -n libavfilter%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavfilter.so.%{av_filter_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libavfilter%{?pkg_suffix}-devel Summary: Development files for FFmpeg's audio/video filter library -Requires: libavcodec-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavfilter%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavformat-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libpostproc-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswresample-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswscale-devel%{?_isa} = %{epoch}:%{version}-%{release} +Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavfilter%{?pkg_suffix} = %{version}-%{release} Requires: pkgconfig -Obsoletes: libavfilter-free-devel < %{epoch}:%{version}-%{release} -Provides: libavfilter-free-devel = %{epoch}:%{version}-%{release} -%description -n libavfilter-devel +%description -n libavfilter%{?pkg_suffix}-devel +The libavfilter library provides a generic audio/video filtering +framework containing several filters, sources and sinks. + This subpackage contains the headers for FFmpeg libavfilter. -%package -n libavformat +%files -n libavfilter%{?pkg_suffix}-devel +%{_includedir}/%{name}/libavfilter +%{_libdir}/pkgconfig/libavfilter.pc +%{_libdir}/libavfilter.so +%{_mandir}/man3/libavfilter.3* + +%dnl -------------------------------------------------------------------------------- + +%package -n libavformat%{?pkg_suffix} Summary: FFmpeg's stream format library -Obsoletes: libavformat-free < %{epoch}:%{version}-%{release} -Provides: libavformat-free = %{epoch}:%{version}-%{release} +Requires: libavcodec%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} -%description -n libavformat -The libavformat library provides a generic framework for multiplexing and -demultiplexing (muxing and demuxing) audio, video and subtitle streams. -It encompasses multiple muxers and demuxers for multimedia container formats. +%description -n libavformat%{?pkg_suffix} +The libavformat library provides a generic framework for multiplexing +and demultiplexing (muxing and demuxing) audio, video and subtitle +streams. It encompasses multiple muxers and demuxers for multimedia +container formats. -%package -n libavformat-devel +%if %{without all_codecs} +This build of ffmpeg is limited in the number of codecs supported. +%endif + +%files -n libavformat%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavformat.so.%{av_format_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libavformat%{?pkg_suffix}-devel Summary: Development files for FFmpeg's stream format library -Requires: libavcodec-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavformat%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswresample-devel%{?_isa} = %{epoch}:%{version}-%{release} +Requires: libavcodec%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libavformat%{?pkg_suffix}%{_isa} = %{version}-%{release} Requires: pkgconfig -Obsoletes: libavformat-free-devel < %{epoch}:%{version}-%{release} -Provides: libavformat-free-devel = %{epoch}:%{version}-%{release} -%description -n libavformat-devel +%description -n libavformat%{?pkg_suffix}-devel +The libavformat library provides a generic framework for multiplexing +and demultiplexing (muxing and demuxing) audio, video and subtitle +streams. It encompasses multiple muxers and demuxers for multimedia +container formats. + This subpackage contains the headers for FFmpeg libavformat. -%package -n libavutil -Summary: FFmpeg's utility library -Obsoletes: libavutil-free < %{epoch}:%{version}-%{release} -Provides: libavutil-free = %{epoch}:%{version}-%{release} +%files -n libavformat%{?pkg_suffix}-devel +%{_includedir}/%{name}/libavformat +%{_libdir}/pkgconfig/libavformat.pc +%{_libdir}/libavformat.so +%{_mandir}/man3/libavformat.3* -%description -n libavutil +%dnl -------------------------------------------------------------------------------- + +%package -n libavutil%{?pkg_suffix} +Summary: FFmpeg's utility library +Group: System/Libraries + +%description -n libavutil%{?pkg_suffix} The libavutil library is a utility library to aid portable multimedia programming. It contains safe portable string functions, random number generators, data structures, additional mathematics functions, cryptography and multimedia related functionality (like enumerations for pixel and sample formats). -%package -n libavutil-devel -Summary: Development files for FFmpeg's utility library -Requires: libavutil%{?_isa} = %{epoch}:%{version}-%{release} -Requires: pkgconfig -Obsoletes: libavutil-free-devel < %{epoch}:%{version}-%{release} -Provides: libavutil-free-devel = %{epoch}:%{version}-%{release} +%files -n libavutil%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libavutil.so.%{av_util_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libavutil%{?pkg_suffix}-devel +Summary: Development files for FFmpeg's utility library +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n libavutil%{?pkg_suffix}-devel +The libavutil library is a utility library to aid portable multimedia +programming. It contains safe portable string functions, random +number generators, data structures, additional mathematics functions, +cryptography and multimedia related functionality (like enumerations +for pixel and sample formats). -%description -n libavutil-devel This subpackage contains the headers for FFmpeg libavutil. -%package -n libpostproc -Summary: FFmpeg post-processing library -Obsoletes: libpostproc-free < %{epoch}:%{version}-%{release} -Provides: libpostproc-free = %{epoch}:%{version}-%{release} +%files -n libavutil%{?pkg_suffix}-devel +%{_includedir}/%{name}/libavutil +%{_libdir}/pkgconfig/libavutil.pc +%{_libdir}/libavutil.so +%{_mandir}/man3/libavutil.3* -%description -n libpostproc +%dnl -------------------------------------------------------------------------------- + +%package -n libpostproc%{?pkg_suffix} +Summary: FFmpeg post-processing library +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libpostproc%{?pkg_suffix} A library with video postprocessing filters, such as deblocking and deringing filters, noise reduction, automatic contrast and brightness correction, linear/cubic interpolating deinterlacing. -%package -n libpostproc-devel -Summary: Development files for the FFmpeg post-processing library -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libpostproc%{?_isa} = %{epoch}:%{version}-%{release} -Requires: pkgconfig -Obsoletes: libpostproc-free-devel < %{epoch}:%{version}-%{release} -Provides: libpostproc-free-devel = %{epoch}:%{version}-%{release} +%files -n libpostproc%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libpostproc.so.%{postproc_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libpostproc%{?pkg_suffix}-devel +Summary: Development files for the FFmpeg post-processing library +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libpostproc%{?pkg_suffix}%{_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n libpostproc%{?pkg_suffix}-devel +A library with video postprocessing filters, such as deblocking and +deringing filters, noise reduction, automatic contrast and brightness +correction, linear/cubic interpolating deinterlacing. -%description -n libpostproc-devel This subpackage contains the headers for FFmpeg libpostproc. -%package -n libswresample -Summary: FFmpeg software resampling library -Requires: libavutil%{?_isa} = %{epoch}:%{version}-%{release} -Obsoletes: libavresemple < %{epoch}:%{version}-%{release} -Provides: libavresemple = %{epoch}:%{version}-%{release} -Obsoletes: libswresample-free < %{epoch}:%{version}-%{release} -Provides: libswresample-free = %{epoch}:%{version}-%{release} +%files -n libpostproc%{?pkg_suffix}-devel +%{_includedir}/%{name}/libpostproc +%{_libdir}/pkgconfig/libpostproc.pc +%{_libdir}/libpostproc.so -%description -n libswresample +%dnl -------------------------------------------------------------------------------- + +%package -n libswresample%{?pkg_suffix} +Summary: FFmpeg software resampling library +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libswresample%{?pkg_suffix} The libswresample library performs audio conversion between different sample rates, channel layout and channel formats. -%package -n libswresample-devel -Summary: Development files for the FFmpeg software resampling library -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswresample%{?_isa} = %{epoch}:%{version}-%{release} -Obsoletes: libavresemple-devel < %{epoch}:%{version}-%{release} -Provides: libavresemple-devel = %{epoch}:%{version}-%{release} -Obsoletes: libswresample-free-devel < %{epoch}:%{version}-%{release} -Provides: libswresample-free-devel = %{epoch}:%{version}-%{release} +%files -n libswresample%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libswresample.so.%{swresample_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libswresample%{?pkg_suffix}-devel +Summary: Development files for the FFmpeg software resampling library +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libswresample%{?pkg_suffix}-devel +The libswresample library performs audio conversion between different +sample rates, channel layout and channel formats. -%description -n libswresample-devel This subpackage contains the headers for FFmpeg libswresample. -%package -n libswscale -Summary: FFmpeg image scaling and colorspace/pixel conversion library -Obsoletes: libswscale-free < %{epoch}:%{version}-%{release} -Provides: libswscale-free = %{epoch}:%{version}-%{release} +%files -n libswresample%{?pkg_suffix}-devel +%{_includedir}/%{name}/libswresample +%{_libdir}/pkgconfig/libswresample.pc +%{_libdir}/libswresample.so +%{_mandir}/man3/libswresample.3* -%description -n libswscale +%dnl -------------------------------------------------------------------------------- + +%package -n libswscale%{?pkg_suffix} +Summary: FFmpeg image scaling and colorspace/pixel conversion library +Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libswscale%{?pkg_suffix} The libswscale library performs image scaling and colorspace and pixel format conversion operations. -%package -n libswscale-devel -Summary: Development files for FFmpeg's image scaling and colorspace library -Requires: libavutil-devel%{?_isa} = %{epoch}:%{version}-%{release} -Requires: libswscale%{?_isa} = %{epoch}:%{version}-%{release} -Obsoletes: libswscale-free-devel < %{epoch}:%{version}-%{release} -Provides: libswscale-free-devel = %{epoch}:%{version}-%{release} +%files -n libswscale%{?pkg_suffix} +%license COPYING.GPLv2 LICENSE.md +%{_libdir}/libswscale.so.%{swscale_soversion}{,.*} + +%dnl -------------------------------------------------------------------------------- + +%package -n libswscale%{?pkg_suffix}-devel +Summary: Development files for FFmpeg's image scaling and colorspace library +Provides: libswscale%{?pkg_suffix}-devel = %{version}-%{release} +Conflicts: libswscale%{?pkg_suffix}-devel < %{version}-%{release} +Requires: libavutil%{?pkg_suffix}-devel = %{version}-%{release} +Requires: libswscale%{?pkg_suffix}%{_isa} = %{version}-%{release} + +%description -n libswscale%{?pkg_suffix}-devel +The libswscale library performs image scaling and colorspace and +pixel format conversion operations. -%description -n libswscale-devel This subpackage contains the headers for FFmpeg libswscale. +%files -n libswscale%{?pkg_suffix}-devel +%{_includedir}/%{name}/libswscale +%{_libdir}/pkgconfig/libswscale.pc +%{_libdir}/libswscale.so +%{_mandir}/man3/libswscale.3* + +%endif +# freeworld_lavc bcond + +%dnl -------------------------------------------------------------------------------- + +%if %{with freeworld_lavc} +%package -n libavcodec-freeworld +Summary: FFmpeg codec library - freeworld overlay +Requires: libavutil%{?basepkg_suffix}%{_isa} >= %{version}-%{release} +Requires: libswresample%{?basepkg_suffix}%{_isa} >= %{version}-%{release} +Supplements: libavcodec%{?basepkg_suffix}%{_isa} >= %{version}-%{release} +# We require libopenh264 library, which has a dummy implementation and a real one +# In the event that this is being installed, we want to install this version +Requires: openh264%{_isa} + +%description -n libavcodec-freeworld +The libavcodec library provides a generic encoding/decoding framework +and contains multiple decoders and encoders for audio, video and +subtitle streams, and several bitstream filters. + +This build includes the full range of codecs offered by ffmpeg. + +%files -n libavcodec-freeworld +%{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf +%{_libdir}/%{name}/libavcodec.so.%{av_codec_soversion}{,.*} + +# Re-enable ldconfig_scriptlets macros +%{!?ldconfig:%global ldconfig /sbin/ldconfig} +%ldconfig_scriptlets -n libavcodec-freeworld + +%endif + +%dnl -------------------------------------------------------------------------------- + %prep -%autosetup -p1 +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -# Uncomment to enable debugging while configuring -#sed -i -e 's|#!/bin/sh|#!/bin/sh -x|g' configure +%autosetup -S git_am +install -m 0644 %{SOURCE20} enable_decoders +install -m 0644 %{SOURCE21} enable_encoders +# fix -O3 -g in host_cflags +sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure +install -m0755 -d _doc/examples +cp -a doc/examples/{*.c,Makefile,README} _doc/examples/ -%build +%conf %set_build_flags +# This is not a normal configure script, don't use %%configure ./configure \ - --arch=%{_target_cpu} \ + --prefix=%{_prefix} \ --bindir=%{_bindir} \ --datadir=%{_datadir}/%{name} \ + --docdir=%{_docdir}/%{name} \ + --incdir=%{_includedir}/%{name} \ + --libdir=%{_libdir} \ + --mandir=%{_mandir} \ + --arch=%{_target_cpu} \ + --optflags="%{build_cflags}" \ + --extra-ldflags="%{build_ldflags}" \ + --disable-htmlpages \ --disable-static \ --disable-stripping \ + --enable-pic \ + --enable-shared \ + --enable-gpl \ + --enable-version3 \ --enable-amf \ --enable-avcodec \ --enable-avdevice \ @@ -439,15 +786,21 @@ This subpackage contains the headers for FFmpeg libswscale. %else --disable-chromaprint \ %endif - --enable-decklink \ + --disable-cuda-nvcc \ +%if %{with ffnvcodec} + --enable-cuvid \ +%endif + --disable-decklink \ --enable-frei0r \ --enable-gcrypt \ --enable-gmp \ - --enable-gpl \ + --enable-gnutls \ --enable-gray \ --enable-iconv \ --enable-ladspa \ +%if %{with lcms2} --enable-lcms2 \ +%endif --enable-libaom \ --enable-libaribb24 \ --enable-libaribcaption \ @@ -458,30 +811,33 @@ This subpackage contains the headers for FFmpeg libswscale. --enable-libcdio \ --enable-libcodec2 \ --enable-libdav1d \ - --enable-libdavs2 \ + --disable-libdavs2 \ +%if %{with dc1394} --enable-libdc1394 \ - --enable-libdrm \ +%endif --enable-libdvdnav \ --enable-libdvdread \ --enable-libfdk-aac \ +%if %{with flite} + --enable-libflite \ +%endif --enable-libfontconfig \ --enable-libfreetype \ --enable-libfribidi \ --enable-libgme \ - --enable-libgsm \ --enable-libharfbuzz \ + --enable-libgsm \ +%if %{with dc1394} --enable-libiec61883 \ +%endif --enable-libilbc \ --enable-libjack \ --enable-libjxl \ --enable-libklvanc \ - --enable-libkvazaar \ - --enable-liblc3 \ --disable-liblensfun \ -%if %{with lcevcdec} - --enable-liblcevc-dec \ -%else --disable-liblcevc-dec \ +%if %{with lc3} + --enable-liblc3 \ %endif --enable-libmodplug \ --enable-libmp3lame \ @@ -494,7 +850,9 @@ This subpackage contains the headers for FFmpeg libswscale. --enable-libopenjpeg \ --enable-libopenmpt \ --enable-libopus \ +%if %{with placebo} --enable-libplacebo \ +%endif --enable-libpulse \ --enable-libqrencode \ --disable-libquirc \ @@ -502,7 +860,9 @@ This subpackage contains the headers for FFmpeg libswscale. --enable-librav1e \ --enable-librist \ --enable-librsvg \ +%if %{with librtmp} --enable-librtmp \ +%endif --enable-librubberband \ --enable-libshaderc \ --disable-libshine \ @@ -517,39 +877,57 @@ This subpackage contains the headers for FFmpeg libswscale. --enable-libtesseract \ --enable-libtheora \ --disable-libtorch \ + --disable-libuavs3d \ --enable-libtwolame \ - --enable-libuavs3d \ --enable-libv4l2 \ --enable-libvidstab \ +%if %{with vmaf} + --enable-libvmaf \ +%endif --enable-libvo-amrwbenc \ --enable-libvorbis \ +%if %{with vpl} + --enable-libvpl \ +%endif --enable-libvpx \ - --enable-libvvenc \ --enable-libwebp \ +%if %{with x264} --enable-libx264 \ +%endif +%if %{with x265} --enable-libx265 \ - --enable-libxavs2 \ - --enable-libxavs \ +%endif + --disable-libxavs2 \ + --disable-libxavs \ --enable-libxcb \ --enable-libxcb-shape \ --enable-libxcb-shm \ --enable-libxcb-xfixes \ - --enable-libxevd \ +%if %{with evc_main} --enable-libxeve \ + --enable-libxevd \ +%else + --enable-libxeveb \ + --enable-libxevdb \ +%endif --enable-libxml2 \ --enable-libxvid \ --enable-libzimg \ --enable-libzmq \ --enable-libzvbi \ +%if %{with lto} + --enable-lto \ +%endif --enable-lv2 \ --enable-lzma \ - --enable-nonfree \ --enable-manpages \ +%if %{with ffnvcodec} + --enable-nvdec \ + --enable-nvenc \ +%endif --enable-openal \ - --enable-opencl \ - --enable-opengl \ - --enable-openssl \ - --enable-postproc \ + --disable-openssl \ + --enable-pthreads \ --enable-sdl2 \ --enable-shared \ --enable-swresample \ @@ -557,140 +935,460 @@ This subpackage contains the headers for FFmpeg libswscale. --enable-v4l2-m2m \ --enable-vaapi \ --enable-vapoursynth \ - --enable-version3 \ --enable-vdpau \ --enable-vulkan \ --enable-xlib \ --enable-zlib \ - --extra-ldflags="%{build_ldflags}" \ - --incdir=%{_includedir} \ - --libdir=%{_libdir} \ - --mandir=%{_mandir} \ - --optflags="%{build_cflags}" \ - --prefix=%{_prefix} \ - --shlibdir=%{_libdir} \ -%ifarch x86_64 aarch64 - --enable-cuda-llvm \ - --enable-cuda-nvcc \ - --enable-cuvid \ - --enable-ffnvcodec \ - --enable-nvdec \ - --enable-nvenc \ - --extra-cflags="-I%{_includedir}/cuda" \ +%if %{without all_codecs} + --enable-muxers \ + --enable-demuxers \ + --enable-hwaccels \ + --disable-encoders \ + --disable-decoders \ + --disable-decoder="h264,hevc,vc1,vvc" \ + --enable-encoder="$(perl -pe 's{^(\w*).*}{$1,}gs' %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf +cp -pa %{buildroot}%{_libdir}/libavcodec.so.%{av_codec_soversion}{,.*} %{buildroot}%{_libdir}/%{name} +# Drop unneeded stuff +rm -f %{buildroot}%{_libdir}/*.* +rm -rf %{buildroot}%{_libdir}/pkgconfig +rm -rf %{buildroot}%{_includedir} +rm -rf %{buildroot}%{_bindir} +rm -rf %{buildroot}%{_datadir} +%endif -%files devel -%doc doc/APIchanges doc/*.txt -%doc doc/html doc/examples - -%files -n libavcodec -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libavcodec.so.%{avcodec_soversion}* - -%files -n libavcodec-devel -%{_includedir}/libavcodec -%{_libdir}/pkgconfig/libavcodec.pc -%{_libdir}/libavcodec.so -%{_mandir}/man3/libavcodec.3* - -%files -n libavdevice -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libavdevice.so.%{avdevice_soversion}* - -%files -n libavdevice-devel -%{_includedir}/libavdevice -%{_libdir}/pkgconfig/libavdevice.pc -%{_libdir}/libavdevice.so -%{_mandir}/man3/libavdevice.3* - -%files -n libavfilter -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libavfilter.so.%{avfilter_soversion}* - -%files -n libavfilter-devel -%{_includedir}/libavfilter -%{_libdir}/pkgconfig/libavfilter.pc -%{_libdir}/libavfilter.so -%{_mandir}/man3/libavfilter.3* - -%files -n libavformat -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libavformat.so.%{avformat_soversion}* - -%files -n libavformat-devel -%{_includedir}/libavformat -%{_libdir}/pkgconfig/libavformat.pc -%{_libdir}/libavformat.so -%{_mandir}/man3/libavformat.3* - -%files -n libavutil -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libavutil.so.%{avutil_soversion}* - -%files -n libavutil-devel -%{_includedir}/libavutil -%{_libdir}/pkgconfig/libavutil.pc -%{_libdir}/libavutil.so -%{_mandir}/man3/libavutil.3* - -%files -n libpostproc -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libpostproc.so.%{postproc_soversion}* - -%files -n libpostproc-devel -%{_includedir}/libpostproc -%{_libdir}/pkgconfig/libpostproc.pc -%{_libdir}/libpostproc.so - -%files -n libswresample -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libswresample.so.%{swresample_soversion}* - -%files -n libswresample-devel -%{_includedir}/libswresample -%{_libdir}/pkgconfig/libswresample.pc -%{_libdir}/libswresample.so -%{_mandir}/man3/libswresample.3* - -%files -n libswscale -%license COPYING.GPLv2 LICENSE.md -%{_libdir}/libswscale.so.%{swscale_soversion}* - -%files -n libswscale-devel -%{_includedir}/libswscale -%{_libdir}/pkgconfig/libswscale.pc -%{_libdir}/libswscale.so -%{_mandir}/man3/libswscale.3* %changelog -%autochangelog +* Sun May 31 2026 Gilver E. - 1:7.1.4-1 +- Rebased build onto Fedora spec with full redistributable codec support +- Ported to Terra with permission + +* Thu May 07 2026 Dominik Mierzejewski - 7.1.4-1 +- Update to 7.1.4. + +* Thu Dec 04 2025 Marcin Juszkiewicz - 7.1.2-4 +- disable dc1394 and ffnvcodec on risc-v + +* Sun Nov 02 2025 Dominik Mierzejewski - 7.1.2-3 +- Re-enable openal support (dropped by accident in commit 5917b714, resolves rhbz#2404091) + +* Thu Oct 02 2025 Robert-André Mauchin - 7.1.2-2 +- Rebuild for svt-av1 soname bump + +* Wed Sep 24 2025 Simone Caronni - 7.1.2-1 +- Update to 7.1.2. +- Enable VANC processing for SDI. +- Explicitly list all implicitly enabled/disabled options. + +* Tue Aug 26 2025 Neal Gompa - 7.1.1-10 +- Disable all subpackages except libavcodec-freeworld with the freeworld bcond + +* Mon Aug 25 2025 Neal Gompa - 7.1.1-9 +- Enable support for MPEG-5/EVC + +* Thu Aug 21 2025 Neal Gompa - 7.1.1-8 +- Reorganize spec to group subpackage definitions together +- Add freeworld conditional for third-party builds +- Drop unneeded scriptlets + +* Fri Aug 01 2025 Neal Gompa - 7.1.1-7 +- Always verify sources + +* Tue Jul 29 2025 Nicolas Chauvet - 7.1.1-6 +- Rebuilt for libplacebo + +* Wed Jul 23 2025 Fedora Release Engineering - 7.1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jun 13 2025 Neal Gompa - 7.1.1-4 +- Switch to regular upstream sources for package build +- Enable more codecs + +* Sat Mar 22 2025 Songsong Zhang - 7.1.1-3 +- Add missing source files for riscv64 + +* Thu Mar 13 2025 Fabio Valentini - 7.1.1-2 +- Rebuild for noopenh264 2.6.0 + +* Thu Mar 06 2025 Dominik Mierzejewski - 7.1.1-1 +- Update to 7.1.1 (resolves rhbz#2349351) +- Enable LC3 codec via liblc3 +- Backport fix for CVE-2025-22921 (resolves rhbz#2346558) + +* Fri Feb 07 2025 Yaakov Selkowitz - 7.1-1 +- Rebase to 7.1 (rhbz#2273572) + +* Wed Feb 05 2025 Robert-André Mauchin - 7.0.2-13 +- Rebuilt for aom 3.11.0 + +* Sun Feb 02 2025 Sérgio Basto - 7.0.2-12 +- Rebuild for jpegxl (libjxl) 0.11.1 + +* Wed Jan 29 2025 Simone Caronni - 7.0.2-11 +- Rebuild for updated VapourSynth. + +* Thu Jan 16 2025 Fedora Release Engineering - 7.0.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jan 09 2025 Michel Lind - 7.0.2-9 +- Rebuilt for rubberband 4 + +* Tue Nov 12 2024 Sandro Mani - 7.0.2-8 +- Rebuild (tesseract) + +* Mon Oct 07 2024 Yaakov Selkowitz - 7.0.2-7 +- Properly enable aribb24/libaribcaption +- Disable VANC dependency as it depends on decklink + +* Mon Oct 07 2024 Neal Gompa - 7.0.2-6 +- Enable SDI data processing (Kernel Labs VANC) processing +- Enable Japanese DVD subtitles/teletext (aribb24/libaribcaption) + +* Mon Oct 07 2024 Yaakov Selkowitz - 7.0.2-5 +- Properly enable noopenh264 + +* Wed Oct 02 2024 Neal Gompa - 7.0.2-4 +- Fix chromaprint bcond + +* Wed Sep 25 2024 Michel Lind - 7.0.2-3 +- Disable omxil completely, it's now retired +- Rebuild for tesseract-5.4.1-3 (soversion change from 5.4.1 to just 5.4) + +* Fri Sep 20 2024 Neal Gompa - 7.0.2-2 +- Rebuild for newer ffnvcodec + +* Fri Sep 06 2024 Neal Gompa - 7.0.2-1 +- Rebase to 7.0.2 (rhbz#2273572) +- Drop OpenH264 dlopen headers as we use noopenh264 now +- Use modern bconds + +* Sat Aug 24 2024 Fabio Valentini - 6.1.2-1 +- Update to 6.1.2 + +* Sat Jul 20 2024 Neal Gompa - 6.1.1-19 +- Backport fixes for Mesa 24.0.6+ / 21.1.4+ changes for VA-API + +* Wed Jul 17 2024 Fedora Release Engineering - 6.1.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jul 16 2024 Nicolas Chauvet - 6.1.1-17 +- Rebuilt for libplacebo/vmaf + +* Wed Jun 19 2024 Dominik Mierzejewski - 6.1.1-16 +- Backport fix for CVE-2023-49528 + +* Thu Jun 13 2024 Sandro Mani - 6.1.1-15 +- Rebuild for tesseract-5.4.1 + +* Wed May 29 2024 Robert-André Mauchin - 6.1.1-14 +- Rebuild for svt-av1 2.1.0 + +* Wed May 22 2024 Simone Caronni - 6.1.1-13 +- Rebuild for updated VapourSynth. + +* Tue Apr 23 2024 Kalev Lember - 6.1.1-12 +- Stop using bundled openh264 headers in F40+ and build against noopenh264 +- Backport a fix to build with Vulkan headers >= 1.3.280.0 + +* Wed Mar 13 2024 Sérgio Basto - 6.1.1-11 +- Rebuild for jpegxl (libjxl) 0.10.2 + +* Tue Mar 12 2024 Dominik Mierzejewski - 6.1.1-10 +- Enable drawtext filter (requires libharfbuzz) + +* Wed Feb 14 2024 Sérgio Basto - 6.1.1-9 +- Rebuild for jpegxl (libjxl) 0.9.2 with soname bump + +* Wed Feb 07 2024 Pete Walter - 6.1.1-8 +- Rebuild for libvpx 1.14.x + +* Sun Jan 28 2024 Sandro Mani - 6.1.1-7 +- Rebuild (tesseract) + +* Wed Jan 24 2024 Fedora Release Engineering - 6.1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 6.1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 15 2024 Neal Gompa - 6.1.1-4 +- Add missing files for some of the libraries to fix riscv64 builds + +* Fri Jan 12 2024 Fabio Valentini - 6.1.1-3 +- Rebuild for dav1d 1.3.0 + +* Fri Jan 05 2024 Florian Weimer - 6.1.1-2 +- Backport upstream patch to fix C compatibility issues + +* Thu Jan 04 2024 Neal Gompa - 6.1.1-1 +- Update to 6.1.1 + +* Thu Jan 04 2024 Neal Gompa - 6.1-1 +- Rebase to 6.1 + +* Wed Dec 06 2023 Kalev Lember - 6.0.1-2 +- Prefer openh264 over noopenh264 +- Backport upstream patch to drop openh264 runtime version checks + +* Sat Nov 11 2023 Neal Gompa - 6.0.1-1 +- Update to 6.0.1 +- Add ffmpeg chromium support patch (#2240127) +- Use git to apply patches + +* Fri Nov 10 2023 Neal Gompa - 6.0-16 +- Add patches to support enhanced RTMP and AV1 encoding through VA-API +- Force AAC decoding through fdk-aac-free + +* Sun Oct 08 2023 Dominik Mierzejewski - 6.0-15 +- Backport upstream patch to fix segfault when passing non-existent filter + option (rfbz#6773) + +* Sat Oct 07 2023 Sandro Mani - 6.0-14 +- Rebuild (tesseract) + +* Fri Sep 29 2023 Nicolas Chauvet - 6.0-13 +- Rebuilt for libplacebo + +* Fri Aug 25 2023 Dominik Mierzejewski - 6.0-12 +- Backport upstream patch to fix assembly with binutils 2.41. + +* Sat Aug 05 2023 Richard Shaw - 6.0-11 +- Rebuild for codec2. + +* Fri Jul 28 2023 Dominik Mierzejewski - 6.0-10 +- Rebuild for libplacebo + +* Wed Jul 19 2023 Fedora Release Engineering - 6.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jul 14 2023 Sandro Mani - 6.0-8 +- Rebuild (tesseract) + +* Sun Jun 18 2023 Sérgio Basto - 6.0-7 +- Mass rebuild for jpegxl-0.8.1 + +* Mon Jun 12 2023 Dominik Mierzejewski - 6.0-6 +- Rebuild for libdc1394 + +* Thu Apr 06 2023 Adam Williamson - 6.0-5 +- Rebuild (tesseract) again + +* Mon Apr 03 2023 Neal Gompa - 6.0-4 +- Include RISC-V support sources in the tarball + +* Mon Apr 03 2023 Sandro Mani - 6.0-3 +- Rebuild (tesseract) + +* Wed Mar 22 2023 Nicolas Chauvet - 6.0-2 +- Backport upstream patches for libplacebo support + +* Sun Mar 12 2023 Neal Gompa - 6.0-1 +- Rebase to version 6.0 +- Enable SVT-AV1 on all architectures +- Use oneVPL for QSV +- Switch to SPDX license identifiers + +* Wed Feb 15 2023 Neal Gompa - 5.1.2-12 +- Enable support for the RIST protocol through librist + +* Wed Feb 15 2023 Tom Callaway - 5.1.2-11 +- bootstrap off + +* Wed Feb 15 2023 Tom Callaway - 5.1.2-10 +- rebuild for libvpx (bootstrap) + +* Mon Feb 13 2023 Yaakov Selkowitz - 5.1.2-9 +- Enable lcms2, lv2, placebo, rabbitmq, xv + +* Mon Feb 13 2023 Neal Gompa - 5.1.2-8 +- Disable flite for RHEL 9 as flite is too old + +* Fri Feb 03 2023 Yaakov Selkowitz - 5.1.2-7 +- Properly enable caca, flite, gme, iec61883 + +* Mon Jan 30 2023 Neal Gompa - 5.1.2-6 +- Enable more approved codecs + +* Thu Jan 19 2023 Fedora Release Engineering - 5.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sun Jan 15 2023 Yaakov Selkowitz - 5.1.2-4 +- Properly enable libzvbi_teletext decoder + +* Fri Dec 23 2022 Sandro Mani - 5.1.2-3 +- Rebuild (tesseract) + +* Wed Nov 09 2022 Neal Gompa - 5.1.2-2 +- Unconditionally enable Vulkan + +* Wed Oct 12 2022 Neal Gompa - 5.1.2-1 +- Update to version 5.1.2 +- Refresh dlopen headers and patch for OpenH264 2.3.1 + +* Sun Sep 04 2022 Neal Gompa - 5.1.1-1 +- Update to version 5.1.1 +- Refresh dlopen headers for OpenH264 2.3.0 +- Disable omxil and crystalhd for RHEL + +* Wed Aug 24 2022 Neal Gompa - 5.1-1 +- Rebase to version 5.1 + +* Thu Jul 21 2022 Fedora Release Engineering - 5.0.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jul 09 2022 Richard Shaw - 5.0.1-15 +- Rebuild for codec2 1.0.4. + +* Fri Jul 08 2022 Sandro Mani - 5.0.1-14 +- Rebuild (tesseract) + +* Wed Jun 22 2022 Robert-André Mauchin - 5.0.1-13 +- Rebuilt for new aom, dav1d, rav1e and svt-av1 + +* Fri Jun 17 2022 Mamoru TASAKA - 5.0.1-12 +- Rebuild for new srt + +* Thu Jun 09 2022 Neal Gompa - 5.0.1-11 +- Ensure libavdevice-devel is pulled in with devel metapackage + +* Sun Jun 05 2022 Neal Gompa - 5.0.1-10 +- Update for OpenH264 2.2.0 + +* Tue May 31 2022 Neal Gompa - 5.0.1-9 +- Rebuild for ilbc-3.0.4 + +* Thu May 26 2022 Benjamin A. Beasley - 5.0.1-9 +- Rebuild for ilbc-3.0.4 (bootstrap) + +* Sat May 21 2022 Sandro Mani - 5.0.1-8 +- Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 + +* Fri May 20 2022 Sandro Mani - 5.0.1-7 +- Rebuild for gdal-3.5.0 and/or openjpeg-2.5.0 + +* Sun Apr 24 2022 Neal Gompa - 5.0.1-6 +- Add VAAPI encoders for mjpeg, mpeg2, vp8, and vp9 +- Ensure hwaccels for enabled codecs are turned on + +* Tue Apr 19 2022 Neal Gompa - 5.0.1-5 +- Drop unused enca build dependency + +* Tue Apr 19 2022 Neal Gompa - 5.0.1-4 +- Use shaderc for Vulkan support + +* Mon Apr 18 2022 Neal Gompa - 5.0.1-3 +- Fix codec2 support enablement + +* Mon Apr 18 2022 Dominik Mierzejewski - 5.0.1-2 +- Properly enable decoding and encoding ilbc + +* Tue Apr 12 2022 Neal Gompa - 5.0.1-1 +- Update to 5.0.1 to fix crashes with muxing MP4 video (#2073980) + +* Tue Apr 05 2022 Dominik Mierzejewski - 5.0-11 +- Enable OpenCL acceleration +- be explicit about enabled external features in configure +- enable gcrypt +- drop duplicate CFLAGS and use Fedora LDFLAGS + +* Thu Mar 10 2022 Sandro Mani - 5.0-10 +- Rebuild for tesseract 5.1.0 + +* Tue Mar 08 2022 Neal Gompa - 5.0-9 +- Drop ffmpeg chromium support patch (#2061392) + +* Fri Feb 18 2022 Neal Gompa - 5.0-8 +- Add patch to return correct AVERROR with bad OpenH264 versions + +* Fri Feb 18 2022 Neal Gompa - 5.0-7 +- Update OpenH264 dlopen patch to split dlopen code into c and h files + +* Thu Feb 17 2022 Neal Gompa - 5.0-6 +- Update OpenH264 dlopen patch to use AVERROR return codes correctly + +* Tue Feb 15 2022 Neal Gompa - 5.0-5 +- Disable hardware decoders due to broken failure modes + +* Tue Feb 15 2022 Neal Gompa - 5.0-4 +- Add support for dlopening OpenH264 +- Add tarball scripts as sources + +* Sun Feb 13 2022 Neal Gompa - 5.0-3 +- Enable more QSV and V4L2M2M codecs + +* Sun Feb 13 2022 Neal Gompa - 5.0-2 +- Enable support for more hardware codecs + +* Fri Feb 11 2022 Andreas Schneider - 5.0-1 +- Initial import (fedora#2051008) diff --git a/anda/multimedia/ffmpeg/pre.rhai b/anda/multimedia/ffmpeg/pre.rhai new file mode 100644 index 0000000000..474b0ed137 --- /dev/null +++ b/anda/multimedia/ffmpeg/pre.rhai @@ -0,0 +1,5 @@ +let key = get("https://ffmpeg.org/ffmpeg-devel.asc"); +let dir = sub(`/[^/]+$`, "", __script_path); + +open_file(`${dir}/ffmpeg-devel.asc`, "w").write(key); +sh(`gpg2 --import --import-options import-export,import-minimal ffmpeg-devel.asc > ./ffmpeg.keyring`, #{ "cwd": dir });