diff --git a/Changelog b/Changelog index 1845c0c85..5a32cf0d5 100644 --- a/Changelog +++ b/Changelog @@ -1,15 +1,25 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. -version 4.4.2: -- fate: update reference files after the recent dash manifest muxer changes -- avformat/webmdashenc: fix on-demand profile string -- Update for FFmpeg 4.4.2 +version 5.0.1: - avcodec/exr: Avoid signed overflow in displayWindow - avcodec/diracdec: avoid signed integer overflow in global mv - avcodec/takdsp: Fix integer overflow in decorrelate_sf() - avcodec/apedec: fix a integer overflow in long_filter_high_3800() +- avdevice/dshow: fix regression - avfilter/vf_subtitles: pass storage size to libass +- avcodec/vp9_superframe_split_bsf: Don't read inexistent data +- avcodec/vp9_superframe_split_bsf: Discard invalid zero-sized frames +- avcodec/vp9_superframe_bsf: Check for existence of data before reading it +- avcodec/vp9_raw_reorder_bsf: Check for existence of data before reading it +- avformat/imf: fix packet pts, dts and muxing +- avformat/imf: open resources only when first needed +- avformat/imf: cosmetics +- avformat/imf_cpl: do not use filesize when reading XML file +- avformat/imfdec: Use proper logcontext +- avformat/imfdec: do not use filesize when reading XML file +- doc/utils: add missing 22.2 layout entry +- avcodec/av1: only set the private context pix_fmt field if get_pixel_format() succeeds - avformat/aqtitledec: Skip unrepresentable durations - avformat/cafdec: Do not store empty keys in read_info_chunk() - avformat/mxfdec: Do not clear array in mxf_read_strong_ref_array() before writing @@ -20,6 +30,8 @@ version 4.4.2: - avformat/matroskadec: Check pre_ns - avcodec/sonic: Use unsigned for predictor_k to avoid undefined behavior - avcodec/libuavs3d: Check ff_set_dimensions() for failure +- avcodec/speexdec: Align some comments +- avcodec/speexdec: Use correct doxygen comments - avcodec/mjpegbdec: Set buf_size - avformat/matroskadec: Use rounded down duration in get_cue_desc() check - avcodec/argo: Check packet size @@ -27,7 +39,9 @@ version 4.4.2: - avformat/avidec: Check height - avformat/rmdec: Better duplicate tags check - avformat/mov: Disallow empty sidx +- avformat/argo_cvg:: Fix order of operations in error check in argo_cvg_write_trailer() - avformat/argo_asf: Fix order of operations in error check in argo_asf_write_trailer() +- avcodec/movtextdec: add () to CMP() macro to avoid unexpected behavior - avformat/matroskadec: Check duration - avformat/mov: Corner case encryption error cleanup in mov_read_senc() - avcodec/jpeglsdec: Fix if( code style @@ -39,271 +53,60 @@ version 4.4.2: - avformat/matroskadec: Check desc_bytes - avformat/utils: Fix invalid NULL pointer operation in ff_parse_key_value() - avformat/matroskadec: Fix infinite loop with bz decompression +- avformat/utils: keep chapter monotonicity on chapter updates - avformat/mov: Check size before subtraction - avcodec/cfhd: Avoid signed integer overflow in coeff -- avcodec/apedec: Fix integer overflows in predictor_update_3930() -- avcodec/apedec: fix integer overflow in 8bit samples -- avformat/flvdec: timestamps cannot use the full int64 range -- avcodec/tiff: Remove messing with jpeg context -- avcodec/tiff: Use ff_set_dimensions() for setting up mjpeg context dimensions -- avcodec/tiff: Pass max_pixels to mjpeg context -- avcodec/vqavideo: reset accounting on error -- avcodec/alacdsp: fix integer overflow in decorrelate_stereo() -- avformat/4xm: Check for duplicate track ids -- avformat/4xm: Consider max_streams on reallocating tracks array -- avformat/mov: Check next offset in mov_read_dref() -- avformat/vivo: Favor setting fps from explicit fractions -- avformat/vivo: Do not use the general expression evaluator for parsing a floating point value -- avformat/mxfdec: Check for duplicate mxf_read_index_entry_array() -- avcodec/apedec: Change avg to uint32_t -- avformat/mxfdec: Check component_depth in mxf_get_color_range() -- avformat/mov: Disallow duplicate smdm -- avformat/mov: Check for EOF in mov_read_glbl() -- avcodec/vp3: Check version in all cases when VP4 code is not built -- avformat/mov: Check channels for mov_parse_stsd_audio() -- avformat/avidec: Check read_odml_index() for failure -- avformat/aiffdec: Use av_rescale() for bitrate -- avformat/aiffdec: sanity check block_align -- avformat/aiffdec: Check sample_rate - avcodec/libdav1d: free the Dav1dData packet on dav1d_send_data() failure -- avcodec/zmbvenc: Fix memleak upon init error -- avcodec/dnxhdenc: Fix segfault when using too many slice threads -- avcodec/wma(dec|enc): Fix memleaks upon allocation error -- avfilter/avfilter: Actually error out on init error -- avcodec/opus_silk: Remove wrong size information in function declaration -- avformat/omadec: Don't output uninitialized values -- avformat/jacosubenc: Fix writing extradata -- avformat/cafenc: Fix memleak when trailer is never written -- avformat/cafenc: Don't segfault upon allocation error -- avformat/cafenc: Fix potential integer overflow -- avformat/movenc: Limit ism_lookahead to a sane value -- avutil/utils: Remove racy check from avutil_version() -- avformat/sccdec: Don't use uninitialized data, fix crash, simplify logic -- avformat/subtitles: Honour ff_subtitles_read_line() documentation -- avformat/tee: Fix leak of FIFO-options dictionary -- avformat/tee: Fix leak of strings -- avcodec/rasc: Fix potential use of uninitialized value -- avfilter/vf_w3fdif: Fix segfault on allocation error -- avfilter/af_surround: Fix memleaks upon allocation error -- avfilter/af_vibrato: Fix segfault upon allocation error -- avfilter/aeval: Fix leak of expressions upon reallocation error -- avdevice/xv: Increase array size -- avfilter/asrc_flite: Fix use-after-frees -- avfilter/asrc_flite: Don't segfault when using list_voices option -- Revert "avfilter/vf_idet: reduce noisyness if the filter has been auto inserted" -- avformat/matroskadec: Don't unnecessarily reduce aspect ratio -- avcodec/h263: Fix global-buffer-overflow with noout flag2 set -- avcodec/vaapi_encode: Fix segfault upon closing uninitialized encoder -- avcodec/movtextenc: Fix infinite loop due to variable truncation -- avcodec/libopenh264dec: Increase array sizes, fix stack-buffer overread -- avcodec/libkvazaar: Increase array size -- avformat/aadec: Don't use the same loop counter in inner and outer loop -- avformat/moflex: Don't use uninitialized timebase for data stream -- lavf/udp: do not return an uninitialized value from udp_open() -- avcodec/nvenc: zero-initialize NV_ENC_REGISTER_RESOURCE struct -- configure: Add missing libshine->mpegaudioheader dependency -- avcodec/Makefile: Add missing entry for ADPCM_IMA_AMV_ENCODER -- avcodec/Makefile: Only compile nvenc.o if needed -- avcodec/av1_vaapi: improve decode quality -- avcodec/av1_vaapi: enable segmentation features -- avcodec/av1_vaapi: setting 2 output surface for film grain -- avcodec/vaapi: increase av1 decode pool size -- avcodec/dxva2_av1: fix global motion params -- avcodec/av1_vaapi: add gm params valid check -- avcodec/av1dec: support setup shear process -- avcodec/av1: extend some definitions in spec section 3 -- cbs_av1: fix incorrect data type -- avcodec/libdav1d: let libdav1d choose optimal max frame delay -- avcodec/libdav1d: pass auto threads value to libdav1d +- avcodec/h264_parser: don't alter decoder private data +- configure: link to libatomic when it's present +- fate/ffmpeg: add missing samples dependency to fate-shortest + + +version 5.0: +- ADPCM IMA Westwood encoder +- Westwood AUD muxer +- ADPCM IMA Acorn Replay decoder +- Argonaut Games CVG demuxer +- Argonaut Games CVG muxer +- Concatf protocol +- afwtdn audio filter +- audio and video segment filters +- Apple Graphics (SMC) encoder +- hsvkey and hsvhold video filters +- adecorrelate audio filter +- atilt audio filter +- grayworld video filter +- AV1 Low overhead bitstream format muxer +- swscale slice threading +- MSN Siren decoder +- scharr video filter +- apsyclip audio filter +- morpho video filter +- amr parser +- (a)latency filters +- GEM Raster image decoder +- asdr audio filter +- speex decoder +- limitdiff video filter +- xcorrelate video filter +- varblur video filter +- huesaturation video filter +- colorspectrum source video filter +- RTP packetizer for uncompressed video (RFC 4175) +- bitpacked encoder +- VideoToolbox VP9 hwaccel +- VideoToolbox ProRes hwaccel +- support loongarch. +- aspectralstats audio filter +- adynamicsmooth audio filter +- libplacebo filter +- vflip_vulkan, hflip_vulkan and flip_vulkan filters +- adynamicequalizer audio filter +- yadif_videotoolbox filter +- VideoToolbox ProRes encoder +- anlmf audio filter +- IMF demuxer (experimental) -version 4.4.1: -- avcodec/flac_parser: Consider AV_INPUT_BUFFER_PADDING_SIZE -- avcodec/ttadsp: Fix integer overflows in tta_filter_process_c() -- avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results -- avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2() -- avformat/matroskadec: Reset state also on failure in matroska_reset_status() -- avformat/wavdec: Check smv_block_size -- avformat/rmdec: Check for multiple audio_stream_info -- avcodec/apedec: Use 64bit to avoid overflow -- avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830() -- oavformat/avidec: Check offset in odml -- avformat/mpegts: use actually read packet size in mpegts_resync special case -- fftools/ffmpeg: Fix crash when flushing non-fully setup output stream -- avfilter/scale_npp: fix non-aligned output frame dimensions -- Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe" -- Changelog: update -- swscale/alphablend: Fix slice handling -- avcodec/apedec: Fix integer overflow in filter_fast_3320() -- avformat/mov: Fix last mfra check -- avcodec/mxpegdec: Check for AVDISCARD_ALL -- avcodec/flicvideo: Check remaining bytes in FLI*COPY -- avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensions -- avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127 -- avcodec/snowdec: Maintain avmv buffer -- avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return -- avcodec/mpegvideo_enc: Limit bitrate tolerance to the representable -- avcodec/apedec: Fix integer overflow in intermediate -- avformat/mvdec: Do not set invalid sample rate -- avformat/sbgdec: Check for t0 overflow in expand_tseq() -- avformat/rmdec: Use 64bit for intermediate for DEINT_ID_INT4 -- avformat/sbgdec: Check opt_duration and start for overflow -- avcodec/exr: Fix undefined integer multiplication -- avformat/mov: Check for duplicate clli -- avformat/utils: Ignore negative duration in codec_info_duration computation -- avformat/jacosubdec: Check for min in t overflow in get_shift() -- avformat/mxfdec: check channel number in mxf_get_d10_aes3_packet() -- (origin/release/4.4) avcodec/wmadec: handle run_level_decode error -- avcodec/wma: Return specific error code -- avcodec/dxva2_av1: fix superres_denom parameter -- avcodec/libdav1d: fix compilation after recent libdav1d API changes -- Changelog: update -- avcodec/utils: don't return negative values in av_get_audio_frame_duration() -- avcodec/jpeg2000dec: Check that atom header is within bytsetream -- avcodec/apedec: Fix 2 integer overflows in filter_3800() -- avcodec/xpmdec: Move allocations down after more error checks -- avcodec/argo: Move U, fix shift -- avformat/mov: Check dts for overflow in mov_read_trun() -- avformat/avidec: Use 64bit for frame number in odml index parsing -- avcodec/mjpegbdec: Skip SOS on AVDISCARD_ALL as does mjpeg -- avcodec/mjpegdec: Check for bits left in mjpeg_decode_scan_progressive_ac() -- avformat/adtsenc: return value check for init_get_bits in adts_decode_extradata -- avcodec/webp: Check available space in loop in decode_entropy_coded_image() -- avcodec/h264dec: use picture parameters in ff_print_debug_info2() -- avcodec/vc1dec: ff_print_debug_info() does not support WMV3 field_mode -- avcodec/frame_thread_encoder: Free AVCodecContext structure on error during init -- avcodec/faxcompr: Check for end of input in cmode == 1 in decode_group3_2d_line() -- avcodec/vc1dec: Disable error concealment for *IMAGE -- avcodec/sbrdsp_fixed: Fix negation overflow in sbr_neg_odd_64_c() -- avcodec/argo: Check for even dimensions -- avformat/wtvdec: Check for EOF before seeking back in parse_media_type() -- avformat/mpc8: Check first keyframe position for overflow -- avcodec/exr: Check ac_count -- avformat/wavdec: Use 64bit in new_pos computation -- avformat/sbgdec: Check for overflow in timestamp preparation -- avformat/dsicin: Check packet size for overflow -- avformat/dsfdec: Change order of operations in bitrate computation -- avformat/bfi: check nframes -- avformat/avidec: fix position overflow in avi_load_index() -- avformat/asfdec_f: Check sizeX against padding -- avformat/aiffdec: Check for size overflow in header parsing -- avcodec/aaccoder: Add minimal bias in search_for_ms() -- avformat/mov: Fix incorrect overflow detection in mov_read_sidx() -- avformat/mov: Avoid undefined overflow in time_offset calculation -- avfilter/af_drmeter: Check that there is data -- avfilter/vf_fftdnoiz: Use lrintf() in export_row8() -- avfilter/vf_mestimate: Check b_count -- avformat/mov: do not ignore errors in mov_metadata_hmmt() -- avformat/mxfdec: Check size for shrinking -- avcodec/dnxhddec: check and propagate function return value -- swscale/slice: Fix wrong return on error -- avcodec/aacdec_template: Avoid some invalid values to be set by decode_audio_specific_config_gb() -- swscale/slice: Check slice for allocation failure -- avformat/matroskadec: Fix handling of huge default durations -- avcodec/lpc: check for zero err in normalization in compute_lpc_coefs() -- avcodec/j2kenc: Check for av_strtok() failure -- avformat/ftp: Check for av_strtok() failure -- tools/cws2fws: Check read() for failure -- avcodec/cpia: Fix missing src_size update -- avcodec/exr: Better size checks -- avcodec/clearvideo: Check tile_size to be not too large -- avcodec/utils: Use 64bit for intermediate in AV_CODEC_ID_ADPCM_THP* duration calculation -- avformat/aaxdec: Check avio_seek() in header reading -- avcodec/hevc_sei: Use get_bits_long() for time_offset_value -- avformat/rmdec: Check old_format len for overflow -- avformat/realtextdec: Check the pts difference before using it for the duration computation -- avformat/qcp: Avoid negative nb_rates -- avformat/pp_bnk: Use 64bit in bitrate computation -- avformat/nutdec: Check tmp_size -- avformat/msf: Check that channels doesnt overflow during extradata construction -- avformat/subtitles: Check pts difference before use -- avformat/mpc8: Check for position overflow in mpc8_handle_chunk() -- avformat/mccdec: Fix overflows in num/den -- avformat/iff: Use 64bit in duration computation -- avformat/dxa: Check fps to be within the supported range more precissely -- avcodec/iff: Only write palette to plane 1 if its PAL8 -- avformat/tta: Check for EOF in index reading loop -- avfilter/vf_scale: set the RGB matrix coefficients in case of RGB -- avfilter/vf_scale: reset color matrix in case of identity & non-RGB -- ffmpeg: fix order between field order autodetection and override -- avcodec/h264_slice: clear old slice POC values on parsing failure -- avfilter/f_metadata: do not return the frame early if there is no metadata -- ffbuild: Avoid using the --preprocessor argument to windres -- avcodec/crystalhd: signal that the decoder sets all output frame properties -- avcodec/cuviddec: signal that the decoder sets all output frame properties -- avcodec/decode: reindent after the previous commit -- avcodec/decode: add an internal codec flag to signal a decoder sets all output frame properties -- avcodec/decode: fetch packets from the pkt_props FIFO on every frame returned -- Update missed irc links -- avformat/rpl: The associative law doesnt hold for signed integers in C -- avcodec/faxcompr: Check available bits in decode_uncompressed() -- avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10 -- avformat/utils: Avoid overflow in codec_info_duration computation for subtitles -- avformat/utils: check dts/duration to be representable before using them -- avcodec/utils: do "calc from frame_bytes, channels, and block_align" in 64bit -- avcodec/ttadata: Add sentinel at the end of ff_tta_shift_1 -- avformat/mov: Check for duplicate mdcv -- avfilter/vf_dctdnoiz: Check threads -- avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black -- avcodec/dpx: fix off by 1 in bits_per_color check -- avformat/rpl: Check for EOF and zero framesize -- avcodec/vc2enc: Check for non negative slice bounds -- avformat/rpl: Use 64bit in bitrate computation and check it -- avcodec/mpegvideo_enc: Reset stuffing bits if they are not supported -- avcodec/svq1enc: Do not print debug RD value before it has been computed -- avcodec/aacpsy: Check bandwidth -- avcodec/aacenc: Do not divide by lambda_count if it is 0 -- avcodec/aacenc: Use FLT_EPSILON for lambda minimum -- avfilter/vf_yadif: Fix handing of tiny images -- avfilter/vf_vmafmotion: Check dimensions -- avformat/movenc: Check pal_size before use -- avcodec/lpc: Avoid floating point division by 0 -- avcodec/aacpsy: Avoid floating point division by 0 of norm_fac -- avcodec/aacenc: Avoid 0 lambda -- avcodec/exr: More strictly check dc_count -- avcodec/exr: x/ymax cannot be INT_MAX -- avformat/avio: Check av_opt_copy() for failure -- avformat/moflex: Remove unneeded format variable -- avformat/fifo: check for flushed packets and timeshift -- avcodec/clearvideo: Check for 0 tile_shift -- avcodec/vc1: Check remaining bits in ff_vc1_parse_frame_header() -- avformat/mov: Ignore duplicate CoLL -- avformat/mov: Limit nb_chapter_tracks to input size -- avformat/utils: Use 64bit earlier in r_frame_rate check -- avcodec/alsdec: Fix decoding error with mono audio files -- avformat/mvdec: Check sample rate in parse_audio_var() -- avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line() -- avcodec/utils: treat PAL8 for jpegs similar to other colorspaces -- avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent -- avformat/asfdec_o: Use ff_get_extradata() -- avformat/id3v2: Check end for overflow in id3v2_parse() -- avformat/mxfdec: Fix file position addition -- avformat/wtvdec: Improve size overflow checks in parse_chunks() -- avcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line() -- avformat/mov: check for pts overflow in mov_read_sidx() -- avcodec/utils: Check ima wav duration for overflow -- avcodec/rv10: Execute whole size check earlier for rv20 -- avformat/cafdec: Check channels -- avcodec/exr: increase vlc depth -- avcodec/dpx: Check bits_per_color earlier -- avformat/mvi: Check audio_data_size to be non negative -- avcodec/nvenc: disable s12m timestamps by default -- aarch64: hevc_idct: Fix overflows in idct_dc -- avcodec/vaapi_av1: pass full buffer size for each tile -- avcodec/videotoolboxenc: #define TARGET_CPU_ARM64 to 0 if not provided by the SDK -- lavc/pngdec: fix updating reference frames for APNG_DISPOSE_OP_BACKGROUND -- ffmpeg: return no chosen output if an uninitialized stream is unavailable -- avcodec/h263, h263data: Move ff_h263_init_rl_inter to h263.c -- configure: Add missing mpegvideo dependency for IPU decoder -- avcodec/ttmlenc: Don't confuse capabilities and caps_internal -- avformat/mpegts: add missing sample_rate value to Opus extradata -- avformat/movenc: fix writing dOps atoms -- avcodec/av1_metadata: don't store the inserted TD OBU in stack -- avcodec/nellymoserenc: Fix segfault when using unsupported channels/rate -- avutil/cpu: Use HW_NCPUONLINE to detect # of online CPUs with OpenBSD -- avcodec/nvenc: fix lossless tuning logic -- avfilter/overlay_cuda: check av_buffer_ref result -- avfilter/overlay_cuda: hold explicit reference to hw_device_ctx -- avformat/matroskaenc: Fix leak when writing attachment without filename version 4.4: - AudioToolbox output device diff --git a/MAINTAINERS b/MAINTAINERS index 3b6cfad4f..c065e9449 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -138,6 +138,7 @@ Codecs: 8bps.c Roberto Togni 8svx.c Jaikrishnan Menon aacenc*, aaccoder.c Rostislav Pehlivanov + adpcm.c Zane van Iperen alacenc.c Jaikrishnan Menon alsdec.c Thilo Borgmann, Umair Khan aptx.c Aurelien Jacobs @@ -225,7 +226,7 @@ Codecs: ptx.c Ivo van Poorten qcelp* Reynaldo H. Verdejo Pinochet qdm2.c, qdm2data.h Roberto Togni - qsv* Mark Thompson, Zhong Li + qsv* Mark Thompson, Zhong Li, Haihao Xiang qtrle.c Mike Melanson ra144.c, ra144.h, ra288.c, ra288.h Roberto Togni resample2.c Michael Niedermayer @@ -273,8 +274,8 @@ Hardware acceleration: dxva2* Hendrik Leppkes, Laurent Aimar, Steve Lhomme d3d11va* Steve Lhomme mediacodec* Matthieu Bouron, Aman Gupta - vaapi* Gwenole Beauchesne - vaapi_encode* Mark Thompson + vaapi* Haihao Xiang + vaapi_encode* Mark Thompson, Haihao Xiang vdpau* Philip Langdale, Carl Eugen Hoyos videotoolbox* Rick Kern, Aman Gupta @@ -398,6 +399,7 @@ Muxers/Demuxers: apngdec.c Benoit Fouet argo_asf.c Zane van Iperen argo_brp.c Zane van Iperen + argo_cvg.c Zane van Iperen ass* Aurelien Jacobs astdec.c Paul B Mahol astenc.c James Almer @@ -609,6 +611,7 @@ Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7 FFmpeg release signing key FCF9 86EA 15E6 E293 A564 4F10 B432 2F04 D676 58D8 Ganesh Ajjanagadde C96A 848E 97C3 CEA2 AB72 5CE4 45F9 6A2D 3C36 FB1B Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4 +Haihao Xiang (haihao) 1F0C 31E8 B4FE F7A4 4DC1 DC99 E0F5 76D4 76FC 437F Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368 James Almer 7751 2E8C FD94 A169 57E6 9A7A 1463 01AD 7376 59E0 Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A diff --git a/Makefile b/Makefile index 7e9d8b08c..2d622ecd9 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ vpath %.v $(SRC_PATH) vpath %.texi $(SRC_PATH) vpath %.cu $(SRC_PATH) vpath %.ptx $(SRC_PATH) +vpath %.metal $(SRC_PATH) vpath %/fate_config.sh.template $(SRC_PATH) TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64 audiomatch @@ -23,7 +24,6 @@ FFLIBS-$(CONFIG_AVDEVICE) += avdevice FFLIBS-$(CONFIG_AVFILTER) += avfilter FFLIBS-$(CONFIG_AVFORMAT) += avformat FFLIBS-$(CONFIG_AVCODEC) += avcodec -FFLIBS-$(CONFIG_AVRESAMPLE) += avresample FFLIBS-$(CONFIG_POSTPROC) += postproc FFLIBS-$(CONFIG_SWRESAMPLE) += swresample FFLIBS-$(CONFIG_SWSCALE) += swscale @@ -65,6 +65,8 @@ tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS) tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/enum_options$(EXESUF): $(FF_DEP_LIBS) +tools/scale_slice_test$(EXESUF): $(FF_DEP_LIBS) +tools/scale_slice_test$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS) tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS) @@ -88,7 +90,8 @@ SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \ ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \ ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \ MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \ - MMI-OBJS OBJS SLIBOBJS HOSTOBJS TESTOBJS + MMI-OBJS LSX-OBJS LASX-OBJS OBJS SLIBOBJS SHLIBOBJS \ + STLIBOBJS HOSTOBJS TESTOBJS define RESET $(1) := diff --git a/README.md b/README.md index 447347c70..f8c23f287 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ such as audio, video, subtitles and related metadata. * `libavcodec` provides implementation of a wider range of codecs. * `libavformat` implements streaming protocols, container formats and basic I/O access. * `libavutil` includes hashers, decompressors and miscellaneous utility functions. -* `libavfilter` provides a mean to alter decoded Audio and Video through chain of filters. +* `libavfilter` provides means to alter decoded audio and video through a directed graph of connected filters. * `libavdevice` provides an abstraction to access capture and playback devices. * `libswresample` implements audio mixing and resampling routines. * `libswscale` implements color conversion and scaling routines. diff --git a/RELEASE b/RELEASE index 1d068c6ec..6b244dcd6 100644 --- a/RELEASE +++ b/RELEASE @@ -1 +1 @@ -4.4.2 +5.0.1 diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 312ec6f21..1df4ace77 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,10 +1,10 @@ - ┌────────────────────────────────────┐ - │ RELEASE NOTES for FFmpeg 4.4 "Rao" │ - └────────────────────────────────────┘ + ┌────────────────────────────────────────┐ + │ RELEASE NOTES for FFmpeg 5.0 "Lorentz" │ + └────────────────────────────────────────┘ - The FFmpeg Project proudly presents FFmpeg 4.4 "Rao", about 10 - months after the release of FFmpeg 4.3. + The FFmpeg Project proudly presents FFmpeg 5.0 "Lorentz", about 9 + months after the release of FFmpeg 4.4. A complete Changelog is available at the root of the project, and the complete Git history on https://git.ffmpeg.org/gitweb/ffmpeg.git diff --git a/VERSION b/VERSION index 1d068c6ec..6b244dcd6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.2 +5.0.1 diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index bb8e6e7e1..28a627bfd 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -96,7 +96,7 @@ do { \ atomic_load(object) #define atomic_exchange(object, desired) \ - InterlockedExchangePointer(object, desired); + InterlockedExchangePointer((PVOID volatile *)object, (PVOID)desired) #define atomic_exchange_explicit(object, desired, order) \ atomic_exchange(object, desired) diff --git a/compat/cuda/cuda_runtime.h b/compat/cuda/cuda_runtime.h index c5450b254..30cd085e4 100644 --- a/compat/cuda/cuda_runtime.h +++ b/compat/cuda/cuda_runtime.h @@ -184,5 +184,6 @@ static inline __device__ double fabs(double a) { return __builtin_fabs(a); } static inline __device__ float __sinf(float a) { return __nvvm_sin_approx_f(a); } static inline __device__ float __cosf(float a) { return __nvvm_cos_approx_f(a); } +static inline __device__ float __expf(float a) { return __nvvm_ex2_approx_f(a * (float)__builtin_log2(__builtin_exp(1))); } #endif /* COMPAT_CUDA_CUDA_RUNTIME_H */ diff --git a/compat/msvcrt/snprintf.c b/compat/msvcrt/snprintf.c index c64653fe8..43f5c3bb3 100644 --- a/compat/msvcrt/snprintf.c +++ b/compat/msvcrt/snprintf.c @@ -59,7 +59,7 @@ int avpriv_vsnprintf(char *s, size_t n, const char *fmt, * recommends to provide _snprintf/_vsnprintf() a buffer size that * is one less than the actual buffer, and zero it before calling * _snprintf/_vsnprintf() to workaround this problem. - * See http://msdn.microsoft.com/en-us/library/1kt27hek(v=vs.80).aspx */ + * See https://web.archive.org/web/20151214111935/http://msdn.microsoft.com/en-us/library/1kt27hek(v=vs.80).aspx */ memset(s, 0, n); va_copy(ap_copy, ap); ret = _vsnprintf(s, n - 1, fmt, ap_copy); diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index c83bdc933..52a94efaf 100644 --- a/compat/w32dlfcn.h +++ b/compat/w32dlfcn.h @@ -42,7 +42,7 @@ static inline HMODULE win32_dlopen(const char *name) DWORD pathlen; if (utf8towchar(name, &name_w)) goto exit; - path = (wchar_t *)av_mallocz_array(MAX_PATH, sizeof(wchar_t)); + path = (wchar_t *)av_calloc(MAX_PATH, sizeof(wchar_t)); // Try local directory first pathlen = GetModuleFileNameW(NULL, path, MAX_PATH); pathlen = wcsrchr(path, '\\') - path; diff --git a/configure b/configure index 6409b94b6..7a62f0c24 100755 --- a/configure +++ b/configure @@ -132,7 +132,6 @@ Component options: --disable-swscale disable libswscale build --disable-postproc disable libpostproc build --disable-avfilter disable libavfilter build - --enable-avresample enable libavresample build (deprecated) [no] --disable-pthreads disable pthreads [autodetect] --disable-w32threads disable Win32 threads [autodetect] --disable-os2threads disable OS/2 threads [autodetect] @@ -263,6 +262,7 @@ External library support: --enable-librsvg enable SVG rasterization via librsvg [no] --enable-librubberband enable rubberband needed for rubberband filter [no] --enable-librtmp enable RTMP[E] support via librtmp [no] + --enable-libshaderc enable GLSL->SPIRV compilation via libshaderc [no] --enable-libshine enable fixed-point MP3 encoding via libshine [no] --enable-libsmbclient enable Samba protocol via libsmbclient [no] --enable-libsnappy enable Snappy compression, needed for hap encoding [no] @@ -298,7 +298,7 @@ External library support: --enable-libxvid enable Xvid encoding via xvidcore, native MPEG-4/Xvid encoder exists [no] --enable-libxml2 enable XML parsing using the C library libxml2, needed - for dash demuxing support [no] + for dash and imf demuxing support [no] --enable-libzimg enable z.lib, needed for zscale filter [no] --enable-libzmq enable message passing via libzmq [no] --enable-libzvbi enable teletext support via libzvbi [no] @@ -309,6 +309,7 @@ External library support: if openssl, gnutls or libtls is not used [no] --enable-mediacodec enable Android MediaCodec support [no] --enable-mediafoundation enable encoding via MediaFoundation [auto] + --disable-metal disable Apple Metal framework [autodetect] --enable-libmysofa enable libmysofa, needed for sofalizer filter [no] --enable-openal enable OpenAL 1.1 capture support [no] --enable-opencl enable OpenCL processing [no] @@ -323,7 +324,7 @@ External library support: --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-vapoursynth enable VapourSynth demuxer [no] - --enable-vulkan enable Vulkan code [no] + --disable-vulkan disable Vulkan code [autodetect] --disable-xlib disable xlib [autodetect] --disable-zlib disable zlib [autodetect] @@ -382,6 +383,8 @@ Toolchain options: --dep-cc=DEPCC use dependency generator DEPCC [$cc_default] --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$nvcc_default] --ld=LD use linker LD [$ld_default] + --metalcc=METALCC use metal compiler METALCC [$metalcc_default] + --metallib=METALLIB use metal linker METALLIB [$metallib_default] --pkg-config=PKGCONFIG use pkg-config tool PKGCONFIG [$pkg_config_default] --pkg-config-flags=FLAGS pass additional flags to pkgconf [] --ranlib=RANLIB use ranlib RANLIB [$ranlib_default] @@ -451,9 +454,10 @@ Optimization options (experts only): --disable-mipsdsp disable MIPS DSP ASE R1 optimizations --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations --disable-msa disable MSA optimizations - --disable-msa2 disable MSA2 optimizations --disable-mipsfpu disable floating point MIPS optimizations - --disable-mmi disable Loongson SIMD optimizations + --disable-mmi disable Loongson MMI optimizations + --disable-lsx disable Loongson LSX optimizations + --disable-lasx disable Loongson LASX optimizations --disable-fast-unaligned consider unaligned accesses slow Developer options (useful when working on FFmpeg itself): @@ -490,7 +494,9 @@ Developer options (useful when working on FFmpeg itself): --ignore-tests=TESTS comma-separated list (without "fate-" prefix in the name) of tests whose result is ignored --enable-linux-perf enable Linux Performance Monitor API + --enable-macos-kperf enable macOS kperf (private) API --disable-large-tests disable tests that use a large amount of memory + --disable-ptx-compression don't compress CUDA PTX code even when possible NOTE: Object files are built at the place where configure is launched. EOF @@ -1446,12 +1452,34 @@ test_pkg_config(){ test_cmd $pkg_config --exists --print-errors $pkg_version || return pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg) pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg) + pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg) check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" && enable $name && set_sanitized "${name}_cflags" $pkg_cflags && + set_sanitized "${name}_incdir" $pkg_incdir && set_sanitized "${name}_extralibs" $pkg_libs } +test_pkg_config_cpp(){ + log test_pkg_config_cpp "$@" + name="$1" + pkg_version="$2" + pkg="${2%% *}" + headers="$3" + cond="$4" + shift 4 + disable $name + test_cmd $pkg_config --exists --print-errors $pkg_version || return + pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg) + pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg) + pkg_incflags=$($pkg_config --cflags-only-I $pkg_config_flags $pkg) + test_cpp_condition "$pkg_incdir/$headers" "$cond" "$@" && + enable $name && + set_sanitized "${name}_cflags" $pkg_cflags && + set_sanitized "${name}_incdir" $pkg_incdir && + set_sanitized "${name}_incflags" $pkg_incflags +} + check_pkg_config(){ log check_pkg_config "$@" name="$1" @@ -1459,6 +1487,20 @@ check_pkg_config(){ eval add_cflags \$${name}_cflags } +check_pkg_config_cpp(){ + log check_pkg_config_cpp "$@" + name="$1" + test_pkg_config_cpp "$@" && + eval add_cflags \$${name}_cflags +} + +check_pkg_config_header_only(){ + log check_pkg_config_cpp "$@" + name="$1" + test_pkg_config_cpp "$@" && + eval add_cflags \$${name}_incflags +} + test_exec(){ test_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; } } @@ -1582,6 +1624,12 @@ require_pkg_config(){ check_pkg_config "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message" } +require_pkg_config_cpp(){ + log require_pkg_config_cpp "$@" + pkg_version="$2" + check_pkg_config_cpp "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message" +} + test_host_cc(){ log test_host_cc "$@" cat > $TMPC @@ -1710,6 +1758,7 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST=" libxcb_xfixes lzma mediafoundation + metal schannel sdl2 securetransport @@ -1735,7 +1784,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" EXTERNAL_LIBRARY_NONFREE_LIST=" decklink libfdk_aac - openssl libtls " @@ -1795,12 +1843,14 @@ EXTERNAL_LIBRARY_LIST=" libopenmpt libopenvino libopus + libplacebo libpulse librabbitmq librav1e librist librsvg librtmp + libshaderc libshine libsmbclient libsnappy @@ -1827,6 +1877,7 @@ EXTERNAL_LIBRARY_LIST=" mediacodec openal opengl + openssl pocketsphinx vapoursynth " @@ -1846,6 +1897,7 @@ HWACCEL_AUTODETECT_LIBRARY_LIST=" vaapi vdpau videotoolbox + vulkan v4l2_m2m xvmc " @@ -1868,7 +1920,6 @@ HWACCEL_LIBRARY_LIST=" mmal omx opencl - vulkan " DOCUMENT_LIST=" @@ -1901,7 +1952,6 @@ LIBRARY_LIST=" avformat avcodec swresample - avresample avutil " @@ -1949,10 +1999,12 @@ CONFIG_LIST=" fontconfig large_tests linux_perf + macos_kperf memory_poisoning neon_clobber_test ossfuzz pic + ptx_compression thumb valgrind_backtrace xmm_clobber_test @@ -1986,12 +2038,16 @@ ARCH_LIST=" avr32_uc bfin ia64 + loongarch + loongarch32 + loongarch64 m68k mips mips64 parisc ppc ppc64 + riscv s390 sh4 sparc @@ -2025,13 +2081,14 @@ ARCH_EXT_LIST_MIPS=" mipsdsp mipsdspr2 msa - msa2 " ARCH_EXT_LIST_LOONGSON=" loongson2 loongson3 mmi + lsx + lasx " ARCH_EXT_LIST_X86_SIMD=" @@ -2291,10 +2348,21 @@ TOOLCHAIN_FEATURES=" TYPES_LIST=" kCMVideoCodecType_HEVC kCMVideoCodecType_HEVCWithAlpha + kCMVideoCodecType_VP9 kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange + kCVPixelFormatType_422YpCbCr8BiPlanarVideoRange + kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange + kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange + kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange + kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange + kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ kCVImageBufferTransferFunction_ITU_R_2100_HLG kCVImageBufferTransferFunction_Linear + kCVImageBufferYCbCrMatrix_ITU_R_2020 + kCVImageBufferColorPrimaries_ITU_R_2020 + kCVImageBufferTransferFunction_ITU_R_2020 + kCVImageBufferTransferFunction_SMPTE_ST_428_1 socklen_t struct_addrinfo struct_group_source_req @@ -2329,6 +2397,7 @@ HAVE_LIST=" $THREADS_LIST $TOOLCHAIN_FEATURES $TYPES_LIST + gzip libdrm_getfb2 makeinfo makeinfo_html @@ -2341,6 +2410,8 @@ HAVE_LIST=" perl pod2man texi2html + xmllint + zlib_gzip " # options emitted with CONFIG_ prefix but not available on the command line @@ -2363,6 +2434,7 @@ CONFIG_EXTRA=" cbs_vp9 dirac_parse dnn + dovi_rpu dvprofile exif faandct @@ -2404,6 +2476,7 @@ CONFIG_EXTRA=" mpegaudio mpegaudiodsp mpegaudioheader + mpeg4audio mpegvideo mpegvideoenc mss34dsp @@ -2497,6 +2570,8 @@ CMDLINE_SET=" ln_s logfile malloc_prefix + metalcc + metallib nm optflags nvcc @@ -2554,6 +2629,10 @@ power8_deps="vsx" loongson2_deps="mips" loongson3_deps="mips" +mmi_deps_any="loongson2 loongson3" +lsx_deps="loongarch" +lasx_deps="lsx" + mips32r2_deps="mips" mips32r5_deps="mips" mips32r6_deps="mips" @@ -2562,9 +2641,7 @@ mips64r6_deps="mips" mipsfpu_deps="mips" mipsdsp_deps="mips" mipsdspr2_deps="mips" -mmi_deps_any="loongson2 loongson3" msa_deps="mipsfpu" -msa2_deps="msa" cpunop_deps="i686" x86_64_select="i686" @@ -2601,7 +2678,7 @@ for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do done aligned_stack_if_any="aarch64 ppc x86" -fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64" +fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64" fast_clz_if_any="aarch64 alpha avr32 mips ppc x86" fast_unaligned_if_any="aarch64 ppc x86" simd_align_16_if_any="altivec neon sse" @@ -2631,8 +2708,9 @@ cbs_mpeg2_select="cbs" cbs_vp9_select="cbs" dct_select="rdft" dirac_parse_select="golomb" +dovi_rpu_select="golomb" dnn_suggest="libtensorflow libopenvino" -dnn_deps="swscale" +dnn_deps="avformat swscale" error_resilience_select="me_cmp" faandct_deps="faan" faandct_select="fdctdsp" @@ -2642,6 +2720,7 @@ h264dsp_select="startcode" hevcparse_select="atsc_a53 golomb" frame_thread_encoder_deps="encoders threads" intrax8_select="blockdsp idctdsp" +iso_media_select="mpeg4audio" mdct_select="fft" mdct15_select="fft" me_cmp_select="fdctdsp idctdsp pixblockdsp" @@ -2654,8 +2733,8 @@ vc1dsp_select="h264chroma qpeldsp startcode" rdft_select="fft" # decoders / encoders -aac_decoder_select="adts_header mdct15 mdct sinewin" -aac_fixed_decoder_select="adts_header mdct" +aac_decoder_select="adts_header mdct15 mdct mpeg4audio sinewin" +aac_fixed_decoder_select="adts_header mdct mpeg4audio" aac_encoder_select="audio_frame_queue iirfilter lpc mdct sinewin" aac_latm_decoder_select="aac_decoder aac_latm_parser" ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert mdct" @@ -2667,7 +2746,7 @@ adpcm_g722_decoder_select="g722dsp" adpcm_g722_encoder_select="g722dsp" aic_decoder_select="golomb idctdsp" alac_encoder_select="lpc" -als_decoder_select="bswapdsp" +als_decoder_select="bswapdsp mpeg4audio" amrnb_decoder_select="lsp" amrwb_decoder_select="lsp" amv_decoder_select="sp5x_decoder exif" @@ -2749,7 +2828,7 @@ h264_decoder_suggest="error_resilience" hap_decoder_select="snappy texturedsp" hap_encoder_deps="libsnappy" hap_encoder_select="texturedspenc" -hevc_decoder_select="atsc_a53 bswapdsp cabac golomb hevcparse videodsp" +hevc_decoder_select="atsc_a53 bswapdsp cabac dovi_rpu golomb hevcparse videodsp" huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp" huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp" hymt_decoder_select="huffyuv_decoder" @@ -2787,8 +2866,8 @@ mp3_decoder_select="mpegaudio" mp3adu_decoder_select="mpegaudio" mp3adufloat_decoder_select="mpegaudio" mp3float_decoder_select="mpegaudio" -mp3on4_decoder_select="mpegaudio" -mp3on4float_decoder_select="mpegaudio" +mp3on4_decoder_select="mpegaudio mpeg4audio" +mp3on4float_decoder_select="mpegaudio mpeg4audio" mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp" mpegvideo_decoder_select="mpegvideo" @@ -2920,9 +2999,10 @@ d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext" dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32" ffnvcodec_deps_any="libdl LoadLibrary" nvdec_deps="ffnvcodec" -vaapi_x11_deps="xlib" +vaapi_x11_deps="xlib_x11" videotoolbox_hwaccel_deps="videotoolbox pthreads" videotoolbox_hwaccel_extralibs="-framework QuartzCore" +vulkan_deps_any="libdl LoadLibrary" xvmc_deps="X11_extensions_XvMClib_h" av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1" @@ -3005,6 +3085,8 @@ mpeg4_vdpau_hwaccel_deps="vdpau" mpeg4_vdpau_hwaccel_select="mpeg4_decoder" mpeg4_videotoolbox_hwaccel_deps="videotoolbox" mpeg4_videotoolbox_hwaccel_select="mpeg4_decoder" +prores_videotoolbox_hwaccel_deps="videotoolbox" +prores_videotoolbox_hwaccel_select="prores_decoder" vc1_d3d11va_hwaccel_deps="d3d11va" vc1_d3d11va_hwaccel_select="vc1_decoder" vc1_d3d11va2_hwaccel_deps="d3d11va" @@ -3033,6 +3115,8 @@ vp9_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferVP9_bit_depth" vp9_vaapi_hwaccel_select="vp9_decoder" vp9_vdpau_hwaccel_deps="vdpau VdpPictureInfoVP9" vp9_vdpau_hwaccel_select="vp9_decoder" +vp9_videotoolbox_hwaccel_deps="videotoolbox" +vp9_videotoolbox_hwaccel_select="vp9_decoder" wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel" wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel" wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" @@ -3054,6 +3138,7 @@ v4l2_m2m_deps="linux_videodev2_h sem_timedwait" hwupload_cuda_filter_deps="ffnvcodec" scale_npp_filter_deps="ffnvcodec libnpp" +scale2ref_npp_filter_deps="ffnvcodec libnpp" scale_cuda_filter_deps="ffnvcodec" scale_cuda_filter_deps_any="cuda_nvcc cuda_llvm" thumbnail_cuda_filter_deps="ffnvcodec" @@ -3061,11 +3146,11 @@ thumbnail_cuda_filter_deps_any="cuda_nvcc cuda_llvm" transpose_npp_filter_deps="ffnvcodec libnpp" overlay_cuda_filter_deps="ffnvcodec" overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm" +sharpen_npp_filter_deps="ffnvcodec libnpp" amf_deps_any="libdl LoadLibrary" nvenc_deps="ffnvcodec" nvenc_deps_any="libdl LoadLibrary" -nvenc_encoder_deps="nvenc" aac_mf_encoder_deps="mediafoundation" ac3_mf_encoder_deps="mediafoundation" @@ -3133,8 +3218,6 @@ mpeg4_omx_encoder_deps="omx" mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m" mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m" msmpeg4_crystalhd_decoder_select="crystalhd" -nvenc_h264_encoder_select="h264_nvenc_encoder" -nvenc_hevc_encoder_select="hevc_nvenc_encoder" vc1_crystalhd_decoder_select="crystalhd" vc1_cuvid_decoder_deps="cuvid" vc1_mmal_decoder_deps="mmal" @@ -3161,7 +3244,7 @@ wmv3_crystalhd_decoder_select="crystalhd" av1_qsv_decoder_select="qsvdec" # parsers -aac_parser_select="adts_header" +aac_parser_select="adts_header mpeg4audio" av1_parser_select="cbs_av1" h264_parser_select="atsc_a53 golomb h264dsp h264parse" hevc_parser_select="hevcparse" @@ -3171,7 +3254,7 @@ mpeg4video_parser_select="h263dsp mpegvideo qpeldsp" vc1_parser_select="vc1dsp" # bitstream_filters -aac_adtstoasc_bsf_select="adts_header" +aac_adtstoasc_bsf_select="adts_header mpeg4audio" av1_frame_merge_bsf_select="cbs_av1" av1_frame_split_bsf_select="cbs_av1" av1_metadata_bsf_select="cbs_av1" @@ -3227,6 +3310,8 @@ h264_videotoolbox_encoder_deps="pthreads" h264_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder" hevc_videotoolbox_encoder_deps="pthreads" hevc_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder" +prores_videotoolbox_encoder_deps="pthreads" +prores_videotoolbox_encoder_select="videotoolbox_encoder" libaom_av1_decoder_deps="libaom" libaom_av1_encoder_deps="libaom" libaom_av1_encoder_select="extract_extradata_bsf" @@ -3289,7 +3374,7 @@ libwebp_anim_encoder_deps="libwebp" libx262_encoder_deps="libx262" libx264_encoder_deps="libx264" libx264_encoder_select="atsc_a53" -libx264rgb_encoder_deps="libx264 x264_csp_bgr" +libx264rgb_encoder_deps="libx264" libx264rgb_encoder_select="libx264_encoder" libx265_encoder_deps="libx265" libxavs_encoder_deps="libxavs" @@ -3304,7 +3389,9 @@ videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrame # demuxers / muxers ac3_demuxer_select="ac3_parser" act_demuxer_select="riffdec" +adts_muxer_select="mpeg4audio" aiff_muxer_select="iso_media" +amv_muxer_select="riffenc" asf_demuxer_select="riffdec" asf_o_demuxer_select="riffdec" asf_muxer_select="riffenc" @@ -3329,18 +3416,21 @@ flac_demuxer_select="flac_parser" flv_muxer_select="aac_adtstoasc_bsf" gxf_muxer_select="pcm_rechunk_bsf" hds_muxer_select="flv_muxer" +hls_demuxer_select="adts_header ac3_parser" hls_muxer_select="mpegts_muxer" hls_muxer_suggest="gcrypt openssl" image2_alias_pix_demuxer_select="image2_demuxer" image2_brender_pix_demuxer_select="image2_demuxer" +imf_demuxer_deps="libxml2" +imf_demuxer_select="mxf_demuxer" ipod_muxer_select="mov_muxer" ismv_muxer_select="mov_muxer" ivf_muxer_select="av1_metadata_bsf vp9_superframe_bsf" -latm_muxer_select="aac_adtstoasc_bsf" +latm_muxer_select="aac_adtstoasc_bsf mpeg4audio" matroska_audio_muxer_select="matroska_muxer" matroska_demuxer_select="riffdec" matroska_demuxer_suggest="bzlib lzo zlib" -matroska_muxer_select="riffenc vp9_superframe_bsf aac_adtstoasc_bsf" +matroska_muxer_select="mpeg4audio riffenc vp9_superframe_bsf aac_adtstoasc_bsf" mlp_demuxer_select="mlp_parser" mmf_muxer_select="riffenc" mov_demuxer_select="iso_media riffdec" @@ -3352,21 +3442,21 @@ mp4_muxer_select="mov_muxer" mpegts_demuxer_select="iso_media" mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf" mpegtsraw_demuxer_select="mpegts_demuxer" -mxf_muxer_select="golomb pcm_rechunk_bsf" +mxf_muxer_select="pcm_rechunk_bsf" mxf_d10_muxer_select="mxf_muxer" mxf_opatom_muxer_select="mxf_muxer" nut_muxer_select="riffenc" nuv_demuxer_select="riffdec" obu_demuxer_select="av1_frame_merge_bsf av1_parser" +obu_muxer_select="av1_metadata_bsf" oga_muxer_select="ogg_muxer" ogg_demuxer_select="dirac_parse" ogv_muxer_select="ogg_muxer" opus_muxer_select="ogg_muxer" psp_muxer_select="mov_muxer" rtp_demuxer_select="sdp_demuxer" -rtp_muxer_select="golomb jpegtables" rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer" -rtpdec_select="asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp" +rtpdec_select="asf_demuxer mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp" rtsp_demuxer_select="http_protocol rtpdec" rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain" sap_demuxer_select="sdp_demuxer" @@ -3387,7 +3477,6 @@ w64_muxer_select="wav_muxer" wav_demuxer_select="riffdec" wav_muxer_select="riffenc" webm_chunk_muxer_select="webm_muxer" -webm_muxer_select="riffenc" webm_dash_manifest_demuxer_select="matroska_demuxer" wtv_demuxer_select="mpegts_demuxer riffdec" wtv_muxer_select="mpegts_muxer riffenc" @@ -3409,6 +3498,7 @@ caca_outdev_deps="libcaca" decklink_deps_any="libdl LoadLibrary" decklink_indev_deps="decklink threads" decklink_indev_extralibs="-lstdc++" +decklink_indev_suggest="libzvbi" decklink_outdev_deps="decklink threads" decklink_outdev_suggest="libklvanc" decklink_outdev_extralibs="-lstdc++" @@ -3443,7 +3533,7 @@ v4l2_outdev_suggest="libv4l2" vfwcap_indev_deps="vfw32 vfwcap_defines" xcbgrab_indev_deps="libxcb" xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes" -xv_outdev_deps="xlib" +xv_outdev_deps="xlib_xv xlib_x11 xlib_xext" # protocols async_protocol_deps="threads" @@ -3512,21 +3602,17 @@ libzmq_protocol_deps="libzmq" libzmq_protocol_select="network" # filters -afftdn_filter_deps="avcodec" -afftdn_filter_select="fft" -afftfilt_filter_deps="avcodec" -afftfilt_filter_select="fft" afir_filter_deps="avcodec" afir_filter_select="rdft" +ametadata_filter_deps="avformat" amovie_filter_deps="avcodec avformat" aresample_filter_deps="swresample" -asoftclip_filter_deps="swresample" asr_filter_deps="pocketsphinx" ass_filter_deps="libass" atempo_filter_deps="avcodec" atempo_filter_select="rdft" avgblur_opencl_filter_deps="opencl" -avgblur_vulkan_filter_deps="vulkan libglslang" +avgblur_vulkan_filter_deps="vulkan spirv_compiler" azmq_filter_deps="libzmq" blackframe_filter_deps="gpl" bm3d_filter_deps="avcodec" @@ -3534,20 +3620,16 @@ bm3d_filter_select="dct" boxblur_filter_deps="gpl" boxblur_opencl_filter_deps="opencl gpl" bs2b_filter_deps="libbs2b" -chromaber_vulkan_filter_deps="vulkan libglslang" +chromaber_vulkan_filter_deps="vulkan spirv_compiler" colorkey_opencl_filter_deps="opencl" colormatrix_filter_deps="gpl" convolution_opencl_filter_deps="opencl" -convolve_filter_deps="avcodec" -convolve_filter_select="fft" coreimage_filter_deps="coreimage appkit" coreimage_filter_extralibs="-framework OpenGL" coreimagesrc_filter_deps="coreimage appkit" coreimagesrc_filter_extralibs="-framework OpenGL" cover_rect_filter_deps="avcodec avformat gpl" cropdetect_filter_deps="gpl" -deconvolve_filter_deps="avcodec" -deconvolve_filter_select="fft" deinterlace_qsv_filter_deps="libmfx" deinterlace_vaapi_filter_deps="vaapi" delogo_filter_deps="gpl" @@ -3556,6 +3638,8 @@ derain_filter_select="dnn" deshake_filter_select="pixelutils" deshake_opencl_filter_deps="opencl" dilation_opencl_filter_deps="opencl" +dnn_classify_filter_select="dnn" +dnn_detect_filter_select="dnn" dnn_processing_filter_select="dnn" drawtext_filter_deps="libfreetype" drawtext_filter_suggest="libfontconfig libfribidi" @@ -3569,21 +3653,26 @@ fftdnoiz_filter_select="fft" find_rect_filter_deps="avcodec avformat gpl" firequalizer_filter_deps="avcodec" firequalizer_filter_select="rdft" +flip_vulkan_filter_deps="vulkan spirv_compiler" flite_filter_deps="libflite" framerate_filter_select="scene_sad" freezedetect_filter_select="scene_sad" -frei0r_filter_deps="frei0r libdl" -frei0r_src_filter_deps="frei0r libdl" +frei0r_deps_any="libdl LoadLibrary" +frei0r_filter_deps="frei0r" +frei0r_src_filter_deps="frei0r" fspp_filter_deps="gpl" -headphone_filter_select="fft" +gblur_vulkan_filter_deps="vulkan spirv_compiler" +hflip_vulkan_filter_deps="vulkan spirv_compiler" histeq_filter_deps="gpl" hqdn3d_filter_deps="gpl" interlace_filter_deps="gpl" kerndeint_filter_deps="gpl" ladspa_filter_deps="ladspa libdl" lensfun_filter_deps="liblensfun version3" +libplacebo_filter_deps="libplacebo vulkan" lv2_filter_deps="lv2" mcdeint_filter_deps="avcodec gpl" +metadata_filter_deps="avformat" movie_filter_deps="avcodec avformat" mpdecimate_filter_deps="gpl" mpdecimate_filter_select="pixelutils" @@ -3598,7 +3687,7 @@ openclsrc_filter_deps="opencl" overlay_opencl_filter_deps="opencl" overlay_qsv_filter_deps="libmfx" overlay_qsv_filter_select="qsvvpp" -overlay_vulkan_filter_deps="vulkan libglslang" +overlay_vulkan_filter_deps="vulkan spirv_compiler" owdenoise_filter_deps="gpl" pad_opencl_filter_deps="opencl" pan_filter_deps="swresample" @@ -3612,7 +3701,6 @@ program_opencl_filter_deps="opencl" pullup_filter_deps="gpl" removelogo_filter_deps="avcodec avformat swscale" repeatfields_filter_deps="gpl" -resample_filter_deps="avresample" roberts_opencl_filter_deps="opencl" rubberband_filter_deps="librubberband" sab_filter_deps="gpl swscale" @@ -3622,24 +3710,16 @@ scale_qsv_filter_deps="libmfx" scdet_filter_select="scene_sad" select_filter_select="scene_sad" sharpness_vaapi_filter_deps="vaapi" -showcqt_filter_deps="avcodec avformat swscale" +showcqt_filter_deps="avformat swscale" showcqt_filter_suggest="libfontconfig libfreetype" -showcqt_filter_select="fft" -showfreqs_filter_deps="avcodec" -showfreqs_filter_select="fft" +showspatial_filter_deps="avcodec" showspatial_filter_select="fft" -showspectrum_filter_deps="avcodec" -showspectrum_filter_select="fft" -showspectrumpic_filter_deps="avcodec" -showspectrumpic_filter_select="fft" signature_filter_deps="gpl avcodec avformat" +sinc_filter_deps="avcodec" sinc_filter_select="rdft" smartblur_filter_deps="gpl swscale" sobel_opencl_filter_deps="opencl" -sofalizer_filter_deps="libmysofa avcodec" -sofalizer_filter_select="fft" -spectrumsynth_filter_deps="avcodec" -spectrumsynth_filter_select="fft" +sofalizer_filter_deps="libmysofa" spp_filter_deps="gpl avcodec" spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp" sr_filter_deps="avformat swscale" @@ -3648,7 +3728,9 @@ stereo3d_filter_deps="gpl" subtitles_filter_deps="avformat avcodec libass" super2xsai_filter_deps="gpl" pixfmts_super2xsai_test_deps="super2xsai_filter" +superequalizer_filter_deps="avcodec" superequalizer_filter_select="rdft" +surround_filter_deps="avcodec" surround_filter_select="rdft" tinterlace_filter_deps="gpl" tinterlace_merge_test_deps="tinterlace_filter" @@ -3658,9 +3740,11 @@ tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping" tonemap_opencl_filter_deps="opencl const_nan" transpose_opencl_filter_deps="opencl" transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags" +transpose_vulkan_filter_deps="vulkan spirv_compiler" unsharp_opencl_filter_deps="opencl" uspp_filter_deps="gpl avcodec" vaguedenoiser_filter_deps="gpl" +vflip_vulkan_filter_deps="vulkan spirv_compiler" vidstabdetect_filter_deps="libvidstab" vidstabtransform_filter_deps="libvidstab" libvmaf_filter_deps="libvmaf pthreads" @@ -3668,12 +3752,13 @@ zmq_filter_deps="libzmq" zoompan_filter_deps="swscale" zscale_filter_deps="libzimg const_nan" scale_vaapi_filter_deps="vaapi" -scale_vulkan_filter_deps="vulkan libglslang" +scale_vulkan_filter_deps="vulkan spirv_compiler" vpp_qsv_filter_deps="libmfx" vpp_qsv_filter_select="qsvvpp" xfade_opencl_filter_deps="opencl" yadif_cuda_filter_deps="ffnvcodec" yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm" +yadif_videotoolbox_filter_deps="metal corevideo videotoolbox" # examples avio_list_dir_deps="avformat avutil" @@ -3706,23 +3791,20 @@ cws2fws_extralibs="zlib_extralibs" # libraries, in any order avcodec_deps="avutil" -avcodec_suggest="libm" -avcodec_select="null_bsf" +avcodec_suggest="libm stdatomic" avdevice_deps="avformat avcodec avutil" -avdevice_suggest="libm" +avdevice_suggest="libm stdatomic" avfilter_deps="avutil" -avfilter_suggest="libm" +avfilter_suggest="libm stdatomic" avformat_deps="avcodec avutil" -avformat_suggest="libm network zlib" -avresample_deps="avutil" -avresample_suggest="libm" -avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt" +avformat_suggest="libm network zlib stdatomic" +avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic" postproc_deps="avutil gpl" -postproc_suggest="libm" +postproc_suggest="libm stdatomic" swresample_deps="avutil" -swresample_suggest="libm libsoxr" +swresample_suggest="libm libsoxr stdatomic" swscale_deps="avutil" -swscale_suggest="libm" +swscale_suggest="libm stdatomic" avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs" avfilter_extralibs="pthreads_extralibs" @@ -3769,6 +3851,8 @@ host_cc_default="gcc" doxygen_default="doxygen" install="install" ln_s_default="ln -s -f" +metalcc_default="xcrun -sdk macosx metal" +metallib_default="xcrun -sdk macosx metallib" nm_default="nm -g" pkg_config_default=pkg-config ranlib_default="ranlib" @@ -3798,7 +3882,7 @@ intrinsics="none" enable $PROGRAM_LIST enable $DOCUMENT_LIST enable $EXAMPLE_LIST -enable $(filter_out avresample $LIBRARY_LIST) +enable $LIBRARY_LIST enable stripping enable asm @@ -3807,6 +3891,7 @@ enable doc enable faan faandct faanidct enable large_tests enable optimizations +enable ptx_compression enable runtime_cpudetect enable safe_bitstream_reader enable static @@ -3907,7 +3992,7 @@ find_things_extern(){ find_filters_extern(){ file=$source_path/$1 - sed -n 's/^extern AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file + sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file } FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c) @@ -4359,8 +4444,16 @@ else NVCC_C="" fi +set_default nvcc + +if enabled cuda_nvcc; then + if $nvcc $nvccflags_default 2>&1 | grep -qi unsupported; then + nvccflags_default="-gencode arch=compute_60,code=sm_60 -O2" + fi +fi + set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - target_exec x86asmexe nvcc + target_exec x86asmexe metalcc metallib enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -4380,7 +4473,7 @@ fi exesuf() { case $1 in - mingw32*|mingw64*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;; + mingw32*|mingw64*|msys*|win32|win64|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;; esac } @@ -4896,6 +4989,9 @@ case "$arch" in arm*|iPad*|iPhone*) arch="arm" ;; + loongarch*) + arch="loongarch" + ;; mips*|IP*) case "$arch" in *el) @@ -4915,6 +5011,9 @@ case "$arch" in "Power Macintosh"|ppc*|powerpc*) arch="ppc" ;; + riscv*) + arch="riscv" + ;; s390|s390x) arch="s390" ;; @@ -4984,9 +5083,11 @@ elif enabled arm; then fi } - [ "$cpu" = generic ] && cpu=$(probe_arm_arch) case $cpu in + generic) + subarch=$(probe_arm_arch | sed 's/[^a-z0-9]//g') + ;; armv*) cpuflags="-march=$cpu" subarch=$(echo $cpu | sed 's/[^a-z0-9]//g') @@ -5038,6 +5139,18 @@ elif enabled bfin; then cpuflags="-mcpu=$cpu" +elif enabled loongarch; then + + enable local_aligned + enable simd_align_32 + enable fast_64bit + enable fast_clz + enable fast_unaligned + case $cpu in + la464) + cpuflags="-march=$cpu" + ;; + esac elif enabled mips; then if [ "$cpu" != "generic" ]; then @@ -5294,6 +5407,11 @@ case "$arch" in aarch64|alpha|ia64) enabled shared && enable_weak pic ;; + loongarch) + check_64bit loongarch32 loongarch64 + enabled loongarch64 && disable loongarch32 + enabled shared && enable_weak pic + ;; mips) check_64bit mips mips64 '_MIPS_SIM > 1' enabled shared && enable_weak pic @@ -5306,6 +5424,10 @@ case "$arch" in check_64bit ppc ppc64 enabled shared && enable_weak pic ;; + riscv) + check_64bit riscv32 riscv64 + enabled shared && enable_weak pic + ;; s390) check_64bit s390 s390x enabled shared && enable_weak pic @@ -5908,9 +6030,8 @@ elif enabled mips; then enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb $t0, $t1, $t2"' '-mdsp' enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb $t0, $t1"' '-mdspr2' - # MSA and MSA2 can be detected at runtime so we supply extra flags here + # MSA can be detected at runtime so we supply extra flags here enabled mipsfpu && enabled msa && check_inline_asm msa '"addvi.b $w0, $w1, 1"' '-mmsa' && append MSAFLAGS '-mmsa' - enabled msa && enabled msa2 && check_inline_asm msa2 '"nxbits.any.b $w0, $w0"' '-mmsa2' && append MSAFLAGS '-mmsa2' # loongson2 have no switch cflag so we can only probe toolchain ability enabled loongson2 && check_inline_asm loongson2 '"dmult.g $8, $9, $10"' && disable loongson3 @@ -5919,7 +6040,7 @@ elif enabled mips; then enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext' # MMI can be detected at runtime too - enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi' + enabled mmi && check_inline_asm mmi '"pxor $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi' if enabled bigendian && enabled msa; then disable msa @@ -6038,6 +6159,9 @@ EOF ;; esac +elif enabled loongarch; then + enabled lsx && check_inline_asm lsx '"vadd.b $vr0, $vr1, $vr2"' '-mlsx' && append LSXFLAGS '-mlsx' + enabled lasx && check_inline_asm lasx '"xvadd.b $xr0, $xr1, $xr2"' '-mlasx' && append LASXFLAGS '-mlasx' fi check_cc intrinsics_neon arm_neon.h "int16x8_t test = vdupq_n_s16(0)" @@ -6091,7 +6215,6 @@ check_builtin MemoryBarrier windows.h "MemoryBarrier()" check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)" check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)" check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)" -check_builtin x264_csp_bgr "stdint.h x264.h" "X264_CSP_BGR" case "$custom_allocator" in jemalloc) @@ -6152,8 +6275,20 @@ check_func_headers windows.h SetDllDirectory check_func_headers windows.h Sleep check_func_headers windows.h VirtualAlloc check_func_headers glob.h glob -enabled xlib && - check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext + +if enabled xlib; then + check_pkg_config xlib_x11 x11 "X11/Xlib.h" XPending || + check_lib xlib_x11 "X11/Xlib.h" XPending -lX11 || + disable xlib + + check_pkg_config xlib_xext xext "X11/Xlib.h X11/extensions/XShm.h" XShmAttach || + check_lib xlib_xext "X11/Xlib.h X11/extensions/XShm.h" XShmAttach -lXext || + disable xlib + + check_pkg_config xlib_xv xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute || + check_lib xlib_xv "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv || + disable xlib +fi check_headers direct.h check_headers dirent.h @@ -6186,7 +6321,14 @@ check_headers asm/types.h # it seems there are versions of clang in some distros that try to use the # gcc headers, which explodes for stdatomic # so we also check that atomics actually work here -check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar" +# +# some configurations also require linking to libatomic, so try +# both with -latomic and without +for LATOMIC in "-latomic" ""; do + check_builtin stdatomic stdatomic.h \ + "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar" \ + $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break +done check_lib advapi32 "windows.h" RegCloseKey -ladvapi32 check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt && @@ -6203,6 +6345,7 @@ enabled appkit && check_apple_framework AppKit enabled audiotoolbox && check_apple_framework AudioToolbox enabled avfoundation && check_apple_framework AVFoundation enabled coreimage && check_apple_framework CoreImage +enabled metal && check_apple_framework Metal enabled videotoolbox && check_apple_framework VideoToolbox check_apple_framework CoreFoundation @@ -6219,12 +6362,25 @@ enabled videotoolbox && { check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString "-framework CoreServices" 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" 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" + check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_422YpCbCr16BiPlanarVideoRange "-framework CoreVideo" + check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr8BiPlanarVideoRange "-framework CoreVideo" + check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr10BiPlanarVideoRange "-framework CoreVideo" + check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_444YpCbCr16BiPlanarVideoRange "-framework CoreVideo" check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ "-framework CoreVideo" check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2100_HLG "-framework CoreVideo" check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_Linear "-framework CoreVideo" + check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferYCbCrMatrix_ITU_R_2020 "-framework CoreVideo" + check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferColorPrimaries_ITU_R_2020 "-framework CoreVideo" + check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2020 "-framework CoreVideo" + check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_428_1 "-framework CoreVideo" } +enabled metal && test_cmd $metalcc -v || disable metal + check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss check_type "windows.h dxva.h" "DXVA_PicParams_AV1" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 @@ -6242,6 +6398,8 @@ if [ -z "$nvccflags" ]; then nvccflags=$nvccflags_default fi +nvccflags="$nvccflags -std=c++11" + if enabled x86_64 || enabled ppc64 || enabled aarch64; then nvccflags="$nvccflags -m64" else @@ -6263,6 +6421,10 @@ if ! disabled ffnvcodec; then check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.11 ffnvcodec < 8.2" "$ffnv_hdr_list" "" fi +if enabled_all libglslang libshaderc; then + die "ERROR: libshaderc and libglslang are mutually exclusive, if in doubt, disable libglslang" +fi + check_cpp_condition winrt windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" if ! disabled w32threads && ! enabled pthreads; then @@ -6310,6 +6472,18 @@ enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma +enabled zlib && test_exec $zlib_extralibs < +int main(void) { + if (zlibCompileFlags() & (1 << 17)) return 1; + return 0; +} +EOF + +[ -x "$(command -v gzip)" ] && enable gzip + +enabled zlib_gzip && enabled gzip || disable ptx_compression + # On some systems dynamic loading requires no extra linker flags check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl @@ -6334,8 +6508,8 @@ enabled avisynth && require_headers "avisynth/avisynth_c.h" enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; } enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint enabled decklink && { require_headers DeckLinkAPI.h && - { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0a0000" || die "ERROR: Decklink API version must be >= 10.10"; } } -enabled frei0r && require_headers "frei0r.h dlfcn.h" + { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } } +enabled frei0r && require_headers "frei0r.h" enabled gmp && require gmp gmp.h mpz_export -lgmp enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; } @@ -6346,7 +6520,7 @@ enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "ar die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 -enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init +enabled libass && require_pkg_config libass "libass >= 0.11.0" ass/ass.h ass_library_init enabled libbluray && require_pkg_config libbluray libbluray libbluray/bluray.h bd_open enabled libbs2b && require_pkg_config libbs2b libbs2b bs2b.h bs2b_open enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && @@ -6367,7 +6541,12 @@ enabled fontconfig && enable libfontconfig enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info -enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ +enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ + -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \ + -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm || + require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ + -lglslang -lOSDependent -lHLSL -lOGLCompiler \ + -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm; } enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu || require libgme gme/gme.h gme_new_emu -lgme -lstdc++; } enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do @@ -6393,8 +6572,8 @@ enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } -enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei || - check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc -lnppidei || +enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei -lnppif || + check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppif -lnppc -lnppidei || die "ERROR: libnpp not found"; } enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb @@ -6415,6 +6594,7 @@ enabled libopus && { require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create } } +enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new @@ -6422,6 +6602,7 @@ enabled librist && require_pkg_config librist "librist >= 0.2" librist enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++" +enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init || require libsmbclient libsmbclient.h smbc_init -lsmbclient; } @@ -6524,7 +6705,10 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } && enable omx enabled omx && require_headers OMX_Core.h -enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || +enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl && + { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } || + { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } || + check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || @@ -6600,6 +6784,7 @@ disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && perl -v > /dev/null 2>&1 && enable perl || disable perl pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout +xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint # check V4L2 codecs available in the API if enabled v4l2_m2m; then @@ -6650,7 +6835,8 @@ enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimesta enabled libjack && require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range -enabled sndio && check_lib sndio sndio.h sio_open -lsndio +enabled sndio && { check_pkg_config sndio sndio "sndio.h" sio_open || + check_lib sndio sndio.h sio_open -lsndio; } if enabled libcdio; then check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open || @@ -6695,7 +6881,7 @@ enabled vaapi && if enabled vaapi; then check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM - if enabled xlib; then + if enabled xlib_x11; then check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay fi @@ -6746,8 +6932,10 @@ enabled vdpau && enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.h" DtsCrystalHDVersion -lcrystalhd -enabled vulkan && - require_pkg_config vulkan "vulkan >= 1.1.97" "vulkan/vulkan.h" vkCreateInstance +if enabled vulkan; then + check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" || + check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 189)" +fi if enabled x86; then case $target_os in @@ -6806,7 +6994,6 @@ check_cflags -Wwrite-strings check_cflags -Wtype-limits check_cflags -Wundef check_cflags -Wmissing-prototypes -check_cflags -Wno-pointer-to-int-cast check_cflags -Wstrict-prototypes check_cflags -Wempty-body @@ -6848,7 +7035,7 @@ EOF # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample +check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic @@ -6857,34 +7044,24 @@ check_stripflags -x enabled neon_clobber_test && check_ldflags -Wl,--wrap,avcodec_open2 \ - -Wl,--wrap,avcodec_decode_audio4 \ - -Wl,--wrap,avcodec_decode_video2 \ -Wl,--wrap,avcodec_decode_subtitle2 \ - -Wl,--wrap,avcodec_encode_audio2 \ - -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ -Wl,--wrap,avcodec_send_packet \ -Wl,--wrap,avcodec_receive_packet \ -Wl,--wrap,avcodec_send_frame \ -Wl,--wrap,avcodec_receive_frame \ - -Wl,--wrap,swr_convert \ - -Wl,--wrap,avresample_convert || + -Wl,--wrap,swr_convert || disable neon_clobber_test enabled xmm_clobber_test && check_ldflags -Wl,--wrap,avcodec_open2 \ - -Wl,--wrap,avcodec_decode_audio4 \ - -Wl,--wrap,avcodec_decode_video2 \ -Wl,--wrap,avcodec_decode_subtitle2 \ - -Wl,--wrap,avcodec_encode_audio2 \ - -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ -Wl,--wrap,avcodec_send_packet \ -Wl,--wrap,avcodec_receive_packet \ -Wl,--wrap,avcodec_send_frame \ -Wl,--wrap,avcodec_receive_frame \ -Wl,--wrap,swr_convert \ - -Wl,--wrap,avresample_convert \ -Wl,--wrap,sws_scale || disable xmm_clobber_test @@ -7095,6 +7272,12 @@ esac enable frame_thread_encoder +# these filters depend on removed avcodec APIs +# they are kept disabled for now, but will be removed if +# nobody updates and re-enables them +disable mcdeint_filter +disable uspp_filter + enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } check_deps $CONFIG_LIST \ @@ -7103,7 +7286,6 @@ check_deps $CONFIG_LIST \ $ALL_COMPONENTS \ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" -enabled avresample && warn "Building with deprecated library libavresample" case $target_os in haiku) @@ -7199,16 +7381,12 @@ done enabled zlib && add_cppflags -DZLIB_CONST # conditional library dependencies, in any order -enabled afftdn_filter && prepend avfilter_deps "avcodec" -enabled afftfilt_filter && prepend avfilter_deps "avcodec" enabled afir_filter && prepend avfilter_deps "avcodec" enabled amovie_filter && prepend avfilter_deps "avformat avcodec" enabled aresample_filter && prepend avfilter_deps "swresample" enabled atempo_filter && prepend avfilter_deps "avcodec" enabled bm3d_filter && prepend avfilter_deps "avcodec" enabled cover_rect_filter && prepend avfilter_deps "avformat avcodec" -enabled convolve_filter && prepend avfilter_deps "avcodec" -enabled deconvolve_filter && prepend avfilter_deps "avcodec" enabled ebur128_filter && enabled swresample && prepend avfilter_deps "swresample" enabled elbg_filter && prepend avfilter_deps "avcodec" enabled fftfilt_filter && prepend avfilter_deps "avcodec" @@ -7219,17 +7397,12 @@ enabled movie_filter && prepend avfilter_deps "avformat avcodec" enabled pan_filter && prepend avfilter_deps "swresample" enabled pp_filter && prepend avfilter_deps "postproc" enabled removelogo_filter && prepend avfilter_deps "avformat avcodec swscale" -enabled resample_filter && prepend avfilter_deps "avresample" enabled sab_filter && prepend avfilter_deps "swscale" enabled scale_filter && prepend avfilter_deps "swscale" enabled scale2ref_filter && prepend avfilter_deps "swscale" -enabled sofalizer_filter && prepend avfilter_deps "avcodec" -enabled showcqt_filter && prepend avfilter_deps "avformat avcodec swscale" -enabled showfreqs_filter && prepend avfilter_deps "avcodec" -enabled showspectrum_filter && prepend avfilter_deps "avcodec" +enabled showcqt_filter && prepend avfilter_deps "avformat swscale" enabled signature_filter && prepend avfilter_deps "avcodec avformat" enabled smartblur_filter && prepend avfilter_deps "swscale" -enabled spectrumsynth_filter && prepend avfilter_deps "avcodec" enabled spp_filter && prepend avfilter_deps "avcodec" enabled sr_filter && prepend avfilter_deps "avformat swscale" enabled subtitles_filter && prepend avfilter_deps "avformat avcodec" @@ -7341,7 +7514,6 @@ if enabled mips; then echo "MIPS DSP R1 enabled ${mipsdsp-no}" echo "MIPS DSP R2 enabled ${mipsdspr2-no}" echo "MIPS MSA enabled ${msa-no}" - echo "MIPS MSA2 enabled ${msa2-no}" echo "LOONGSON MMI enabled ${mmi-no}" fi if enabled ppc; then @@ -7351,6 +7523,10 @@ if enabled ppc; then echo "PPC 4xx optimizations ${ppc4xx-no}" echo "dcbzl available ${dcbzl-no}" fi +if enabled loongarch; then + echo "LSX enabled ${lsx-no}" + echo "LASX enabled ${lasx-no}" +fi echo "debug symbols ${debug-no}" echo "strip symbols ${stripping-no}" echo "optimize for size ${small-no}" @@ -7366,6 +7542,7 @@ echo "perl enabled ${perl-no}" echo "pod2man enabled ${pod2man-no}" echo "makeinfo enabled ${makeinfo-no}" echo "makeinfo supports HTML ${makeinfo_html-no}" +echo "xmllint enabled ${xmllint-no}" test -n "$random_seed" && echo "random seed ${random_seed}" echo @@ -7472,6 +7649,8 @@ ARFLAGS=$arflags AR_O=$ar_o AR_CMD=$ar NM_CMD=$nm +METALCC=$metalcc +METALLIB=$metallib RANLIB=$ranlib STRIP=$strip STRIPTYPE=$striptype @@ -7481,7 +7660,7 @@ LN_S=$ln_s CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS -OBJCFLAGS=$OBJCFLAGS +OBJCCFLAGS=$OBJCFLAGS ASFLAGS=$ASFLAGS NVCCFLAGS=$nvccflags AS_C=$AS_C @@ -7511,6 +7690,8 @@ ASMSTRIPFLAGS=$ASMSTRIPFLAGS X86ASMFLAGS=$X86ASMFLAGS MSAFLAGS=$MSAFLAGS MMIFLAGS=$MMIFLAGS +LSXFLAGS=$LSXFLAGS +LASXFLAGS=$LASXFLAGS BUILDSUF=$build_suffix PROGSSUF=$progs_suffix FULLNAME=$FULLNAME @@ -7529,6 +7710,8 @@ ASDEP_FLAGS=$ASDEP_FLAGS X86ASMDEP=$X86ASMDEP X86ASMDEP_FLAGS=$X86ASMDEP_FLAGS CC_DEPFLAGS=$CC_DEPFLAGS +CXX_DEPFLAGS=$CXX_DEPFLAGS +OBJCC_DEPFLAGS=$OBJC_DEPFLAGS AS_DEPFLAGS=$AS_DEPFLAGS X86ASM_DEPFLAGS=$X86ASM_DEPFLAGS HOSTCC=$host_cc @@ -7584,7 +7767,7 @@ cat > $TMPH <= 1.0 and will be removed in the future. Use the +global option @code{threads} instead. @item tilethreads Set amount of tile threads to use during decoding. The default value is 0 (autodetect). +This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the +global option @code{threads} instead. @item filmgrain Apply film grain to the decoded video if present in the bitstream. Defaults to the internal default of the library. +This option is deprecated and will be removed in the future. See the global option +@code{export_side_data} to export Film Grain parameters instead of applying it. @item oppoint Select an operating point of a scalable AV1 bitstream (0 - 31). Defaults to the @@ -293,6 +299,8 @@ Enabled by default. @table @option @item compute_clut @table @option +@item -2 +Compute clut once if no matching CLUT is in the stream. @item -1 Compute clut if no matching CLUT is in the stream. @item 0 diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 3c15ab9ee..26ae768d7 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -25,6 +25,13 @@ Audible Format 2, 3, and 4 demuxer. This demuxer is used to demux Audible Format 2, 3, and 4 (.aa) files. +@section aac + +Raw Audio Data Transport Stream AAC demuxer. + +This demuxer is used to demux an ADTS input containing a single AAC stream +alongwith any ID3v1/2 or APE tags in it. + @section apng Animated Portable Network Graphics demuxer. @@ -37,12 +44,15 @@ between the last fcTL and IEND chunks. @table @option @item -ignore_loop @var{bool} -Ignore the loop variable in the file if set. +Ignore the loop variable in the file if set. Default is enabled. + @item -max_fps @var{int} -Maximum framerate in frames per second (0 for no limit). +Maximum framerate in frames per second. Default of 0 imposes no limit. + @item -default_fps @var{int} Default framerate in frames per second when none is specified in the file -(0 meaning as fast as possible). +(0 meaning as fast as possible). Default is 15. + @end table @section asf @@ -93,8 +103,7 @@ backslash or single quotes. All subsequent file-related directives apply to that file. @item @code{ffconcat version 1.0} -Identify the script type and version. It also sets the @option{safe} option -to 1 if it was -1. +Identify the script type and version. To make FFmpeg recognize the format automatically, this directive must appear exactly as is (no extra space or byte-order-mark) on the very first @@ -148,6 +157,16 @@ directive) will be reduced based on their specified Out point. Metadata of the packets of the file. The specified metadata will be set for each file packet. You can specify this directive multiple times to add multiple metadata entries. +This directive is deprecated, use @code{file_packet_meta} instead. + +@item @code{file_packet_meta @var{key} @var{value}} +Metadata of the packets of the file. The specified metadata will be set for +each file packet. You can specify this directive multiple times to add multiple +metadata entries. + +@item @code{option @var{key} @var{value}} +Option to access, open and probe the file. +Can be present multiple times. @item @code{stream} Introduce a stream in the virtual file. @@ -165,6 +184,20 @@ subfiles will be used. This is especially useful for MPEG-PS (VOB) files, where the order of the streams is not reliable. +@item @code{stream_meta @var{key} @var{value}} +Metadata for the stream. +Can be present multiple times. + +@item @code{stream_codec @var{value}} +Codec for the stream. + +@item @code{stream_extradata @var{hex_string}} +Extradata for the string, encoded in hexadecimal. + +@item @code{chapter @var{id} @var{start} @var{end}} +Add a chapter. @var{id} is an unique identifier, possibly small and +consecutive. + @end table @subsection Options @@ -174,7 +207,8 @@ This demuxer accepts the following option: @table @option @item safe -If set to 1, reject unsafe file paths. A file path is considered safe if it +If set to 1, reject unsafe file paths and directives. +A file path is considered safe if it does not contain a protocol specification and is relative and all components only contain characters from the portable character set (letters, digits, period, underscore and hyphen) and have no period at the beginning of a @@ -184,9 +218,6 @@ If set to 0, any file name is accepted. The default is 1. --1 is equivalent to 1 if the format was automatically -probed and 0 otherwise. - @item auto_convert If set to 1, try to perform automatic conversions on packet data to make the streams concatenable. @@ -243,11 +274,18 @@ which streams to actually receive. Each stream mirrors the @code{id} and @code{bandwidth} properties from the @code{} as metadata keys named "id" and "variant_bitrate" respectively. -@section flv, live_flv +@section imf + +Interoperable Master Format demuxer. + +This demuxer presents audio and video streams found in an IMF Composition. + +@section flv, live_flv, kux Adobe Flash Video Format demuxer. This demuxer is used to demux FLV files and RTMP network streams. In case of live network streams, if you force format, you may use live_flv option instead of flv to survive timestamp discontinuities. +KUX is a flv variant used on the Youku platform. @example ffmpeg -f flv -i myfile.flv ... @@ -346,6 +384,9 @@ Enabled by default for HTTP/1.1 servers. @item http_seekable Use HTTP partial requests for downloading HTTP segments. 0 = disable, 1 = enable, -1 = auto, Default is auto. + +@item seg_format_options +Set options for the demuxer of media segments using a list of key=value pairs separated by @code{:}. @end table @section image2 @@ -661,6 +702,12 @@ Set mfra timestamps as PTS Don't use mfra box to set timestamps @end table +@item use_tfdt +For fragmented input, set fragment's starting timestamp to @code{baseMediaDecodeTime} from the @code{tfdt} box. +Default is enabled, which will prefer to use the @code{tfdt} box to set DTS. Disable to use the @code{earliest_presentation_time} from the @code{sidx} box. +In either case, the timestamp from the @code{mfra} box will be used if it's available and @code{use_mfra_for} is +set to pts or dts. + @item export_all Export unrecognized boxes within the @var{udta} box as metadata entries. The first four characters of the box type are set as the key. Default is false. @@ -679,6 +726,15 @@ specify. @item decryption_key 16-byte key, in hex, to decrypt files encrypted using ISO Common Encryption (CENC/AES-128 CTR; ISO/IEC 23001-7). + +@item max_stts_delta +Very high sample deltas written in a trak's stts box may occasionally be intended but usually they are written in +error or used to store a negative value for dts correction when treated as signed 32-bit integers. This option lets +the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when +cast to int32 are used to adjust onward dts. + +Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto +a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. @end table @subsection Audible AAX diff --git a/doc/developer.texi b/doc/developer.texi index b33cab0fc..addee0d82 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -494,6 +494,22 @@ patch is inline or attached per mail. You can check @url{https://patchwork.ffmpeg.org}, if your patch does not show up, its mime type likely was wrong. +@subheading Sending patches from email clients +Using @code{git send-email} might not be desirable for everyone. The +following trick allows to send patches via email clients in a safe +way. It has been tested with Outlook and Thunderbird (with X-Unsent +extension) and might work with other applications. + +Create your patch like this: + +@verbatim +git format-patch -s -o "outputfolder" --add-header "X-Unsent: 1" --suffix .eml --to ffmpeg-devel@ffmpeg.org -1 1a2b3c4d +@end verbatim + +Now you'll just need to open the eml file with the email application +and execute 'Send'. + +@subheading Reviews Your patch will be reviewed on the mailing list. You will likely be asked to make some changes and are expected to send in an improved version that incorporates the requests from the review. This process may go through diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh index fe0102b5b..729caa634 100755 --- a/doc/doxy-wrapper.sh +++ b/doc/doxy-wrapper.sh @@ -1,10 +1,13 @@ #!/bin/sh OUT_DIR="${1}" -DOXYFILE="${2}" -DOXYGEN="${3}" +SRC_DIR="${2}" +DOXYFILE="${3}" +DOXYGEN="${4}" -shift 3 +shift 4 + +cd ${SRC_DIR} if [ -e "VERSION" ]; then VERSION=`cat "VERSION"` diff --git a/doc/encoders.texi b/doc/encoders.texi index a92eb0eb2..e3b61de5a 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -53,7 +53,7 @@ Set AAC encoder coding method. Possible values: @table @samp @item twoloop -Two loop searching (TLS) method. +Two loop searching (TLS) method. This is the default method. This method first sets quantizers depending on band thresholds and then tries to find an optimal combination by adding or subtracting a specific value from @@ -75,7 +75,6 @@ Constant quantizer method. Uses a cheaper version of twoloop algorithm that doesn't try to do as many clever adjustments. Worse with low bitrates (less than 64kbps), but is better and much faster at higher bitrates. -This is the default choice for a coder @end table @@ -1268,6 +1267,10 @@ disabled A description of some of the currently available video encoders follows. +@section a64_multi, a64_multi5 + +A64 / Commodore 64 multicolor charset encoder. @code{a64_multi5} is extended with 5th color (colram). + @section GIF GIF image/animation encoder. @@ -1747,12 +1750,30 @@ You need to explicitly configure the build with @code{--enable-libsvtav1}. @table @option @item profile Set the encoding profile. +@table @samp +@item main +@item high +@item professional +@end table @item level -Set the operating point level. +Set the operating point level. For example: '4.0' + +@item hielevel +Set the Hierarchical prediction levels. +@table @samp +@item 3level +@item 4level +This is the default. +@end table @item tier Set the operating point tier. +@table @samp +@item main +This is the default. +@item high +@end table @item rc Set the rate control mode to use. @@ -2639,6 +2660,9 @@ ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv Import closed captions (which must be ATSC compatible format) into output. Only the mpeg2 and h264 decoders provide these. Default is 1 (on). +@item udu_sei @var{boolean} +Import user data unregistered SEI if available into output. Default is 0 (off). + @item x264-params (N.A.) Override the x264 configuration using a :-separated list of key=value parameters. @@ -2720,6 +2744,9 @@ Quantizer curve compression factor Normally, when forcing a I-frame type, the encoder can select any type of I-frame. This option forces it to choose an IDR-frame. +@item udu_sei @var{boolean} +Import user data unregistered SEI if available into output. Default is 0 (off). + @item x265-params Set x265 options using a list of @var{key}=@var{value} couples separated by ":". See @command{x265 --help} for a list of options. @@ -3116,7 +3143,8 @@ also set (the @option{-qscale} ffmpeg option). @option{look_ahead} option is also set. @item -@var{ICQ} -- intelligent constant quality otherwise. +@var{ICQ} -- intelligent constant quality otherwise. For the ICQ modes, global +quality range is 1 to 51, with 1 being the best quality. @end itemize @item diff --git a/doc/examples/demuxing_decoding.c b/doc/examples/demuxing_decoding.c index db5e0cb95..8520d5b66 100644 --- a/doc/examples/demuxing_decoding.c +++ b/doc/examples/demuxing_decoding.c @@ -32,6 +32,7 @@ #include #include #include +#include #include static AVFormatContext *fmt_ctx = NULL; @@ -149,8 +150,7 @@ static int open_codec_context(int *stream_idx, { int ret, stream_index; AVStream *st; - AVCodec *dec = NULL; - AVDictionary *opts = NULL; + const AVCodec *dec = NULL; ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0); if (ret < 0) { @@ -185,7 +185,7 @@ static int open_codec_context(int *stream_idx, } /* Init the decoders */ - if ((ret = avcodec_open2(*dec_ctx, dec, &opts)) < 0) { + if ((ret = avcodec_open2(*dec_ctx, dec, NULL)) < 0) { fprintf(stderr, "Failed to open %s codec\n", av_get_media_type_string(type)); return ret; diff --git a/doc/examples/encode_video.c b/doc/examples/encode_video.c index 908eb203d..939ed6832 100644 --- a/doc/examples/encode_video.c +++ b/doc/examples/encode_video.c @@ -155,12 +155,25 @@ int main(int argc, char **argv) for (i = 0; i < 25; i++) { fflush(stdout); - /* make sure the frame data is writable */ + /* Make sure the frame data is writable. + On the first round, the frame is fresh from av_frame_get_buffer() + and therefore we know it is writable. + But on the next rounds, encode() will have called + avcodec_send_frame(), and the codec may have kept a reference to + the frame in its internal structures, that makes the frame + unwritable. + av_frame_make_writable() checks that and allocates a new buffer + for the frame only if necessary. + */ ret = av_frame_make_writable(frame); if (ret < 0) exit(1); - /* prepare a dummy image */ + /* Prepare a dummy image. + In real code, this is where you would have your own logic for + filling the frame. FFmpeg does not care what you put in the + frame. + */ /* Y */ for (y = 0; y < c->height; y++) { for (x = 0; x < c->width; x++) { @@ -185,7 +198,12 @@ int main(int argc, char **argv) /* flush the encoder */ encode(c, NULL, pkt, f); - /* add sequence end code to have a real MPEG file */ + /* Add sequence end code to have a real MPEG file. + It makes only sense because this tiny examples writes packets + directly. This is called "elementary stream" and only works for some + codecs. To create a valid file, you usually need to write packets + into a proper file format or protocol; see muxing.c. + */ if (codec->id == AV_CODEC_ID_MPEG1VIDEO || codec->id == AV_CODEC_ID_MPEG2VIDEO) fwrite(endcode, 1, sizeof(endcode), f); fclose(f); diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c index de31ccd2b..cc1311da9 100644 --- a/doc/examples/extract_mvs.c +++ b/doc/examples/extract_mvs.c @@ -22,6 +22,7 @@ */ #include +#include #include static AVFormatContext *fmt_ctx = NULL; @@ -78,7 +79,7 @@ static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type) int ret; AVStream *st; AVCodecContext *dec_ctx = NULL; - AVCodec *dec = NULL; + const AVCodec *dec = NULL; AVDictionary *opts = NULL; ret = av_find_best_stream(fmt_ctx, type, -1, -1, &dec, 0); @@ -104,7 +105,9 @@ static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type) /* Init the video decoder */ av_dict_set(&opts, "flags2", "+export_mvs", 0); - if ((ret = avcodec_open2(dec_ctx, dec, &opts)) < 0) { + ret = avcodec_open2(dec_ctx, dec, &opts); + av_dict_free(&opts); + if (ret < 0) { fprintf(stderr, "Failed to open %s codec\n", av_get_media_type_string(type)); return ret; @@ -121,7 +124,7 @@ static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type) int main(int argc, char **argv) { int ret = 0; - AVPacket pkt = { 0 }; + AVPacket *pkt = NULL; if (argc != 2) { fprintf(stderr, "Usage: %s