Compare commits

..

2 Commits

Author SHA1 Message Date
luoye 090993d599 bug fix encoder=libmp3lame 1 year ago
luoye 52d61e49f2 add so 2 years ago
  1. 47
      output/include/arm64-v8a/config.h
  2. 311
      output/include/arm64-v8a/libavcodec/avcodec.h
  3. 4
      output/include/arm64-v8a/libavcodec/bsf.h
  4. 34
      output/include/arm64-v8a/libavcodec/codec.h
  5. 27
      output/include/arm64-v8a/libavcodec/codec_id.h
  6. 9
      output/include/arm64-v8a/libavcodec/codec_par.h
  7. 22
      output/include/arm64-v8a/libavcodec/defs.h
  8. 8
      output/include/arm64-v8a/libavcodec/mediacodec.h
  9. 2
      output/include/arm64-v8a/libavcodec/packet.h
  10. 4
      output/include/arm64-v8a/libavcodec/qsv.h
  11. 2
      output/include/arm64-v8a/libavcodec/vdpau.h
  12. 2
      output/include/arm64-v8a/libavcodec/version.h
  13. 26
      output/include/arm64-v8a/libavcodec/version_major.h
  14. 29
      output/include/arm64-v8a/libavcodec/videotoolbox.h
  15. 355
      output/include/arm64-v8a/libavfilter/avfilter.h
  16. 36
      output/include/arm64-v8a/libavfilter/buffersink.h
  17. 2
      output/include/arm64-v8a/libavfilter/version.h
  18. 6
      output/include/arm64-v8a/libavfilter/version_major.h
  19. 253
      output/include/arm64-v8a/libavformat/avformat.h
  20. 15
      output/include/arm64-v8a/libavformat/avio.h
  21. 2
      output/include/arm64-v8a/libavformat/version.h
  22. 11
      output/include/arm64-v8a/libavformat/version_major.h
  23. 7
      output/include/arm64-v8a/libavutil/aes.h
  24. 12
      output/include/arm64-v8a/libavutil/aes_ctr.h
  25. 72
      output/include/arm64-v8a/libavutil/ambient_viewing_environment.h
  26. 10
      output/include/arm64-v8a/libavutil/avstring.h
  27. 64
      output/include/arm64-v8a/libavutil/bprint.h
  28. 2
      output/include/arm64-v8a/libavutil/bswap.h
  29. 2
      output/include/arm64-v8a/libavutil/camellia.h
  30. 50
      output/include/arm64-v8a/libavutil/channel_layout.h
  31. 10
      output/include/arm64-v8a/libavutil/cpu.h
  32. 3
      output/include/arm64-v8a/libavutil/crc.h
  33. 46
      output/include/arm64-v8a/libavutil/csp.h
  34. 8
      output/include/arm64-v8a/libavutil/des.h
  35. 1
      output/include/arm64-v8a/libavutil/detection_bbox.h
  36. 111
      output/include/arm64-v8a/libavutil/dict.h
  37. 18
      output/include/arm64-v8a/libavutil/display.h
  38. 5
      output/include/arm64-v8a/libavutil/eval.h
  39. 2
      output/include/arm64-v8a/libavutil/ffversion.h
  40. 28
      output/include/arm64-v8a/libavutil/fifo.h
  41. 8
      output/include/arm64-v8a/libavutil/file.h
  42. 37
      output/include/arm64-v8a/libavutil/frame.h
  43. 3
      output/include/arm64-v8a/libavutil/hwcontext.h
  44. 25
      output/include/arm64-v8a/libavutil/hwcontext_mediacodec.h
  45. 13
      output/include/arm64-v8a/libavutil/hwcontext_qsv.h
  46. 1
      output/include/arm64-v8a/libavutil/hwcontext_videotoolbox.h
  47. 20
      output/include/arm64-v8a/libavutil/imgutils.h
  48. 5
      output/include/arm64-v8a/libavutil/lfg.h
  49. 6
      output/include/arm64-v8a/libavutil/mathematics.h
  50. 91
      output/include/arm64-v8a/libavutil/mem.h
  51. 24
      output/include/arm64-v8a/libavutil/parseutils.h
  52. 25
      output/include/arm64-v8a/libavutil/pixdesc.h
  53. 62
      output/include/arm64-v8a/libavutil/pixfmt.h
  54. 3
      output/include/arm64-v8a/libavutil/rational.h
  55. 3
      output/include/arm64-v8a/libavutil/rc4.h
  56. 1
      output/include/arm64-v8a/libavutil/samplefmt.h
  57. 13
      output/include/arm64-v8a/libavutil/spherical.h
  58. 16
      output/include/arm64-v8a/libavutil/stereo3d.h
  59. 2
      output/include/arm64-v8a/libavutil/twofish.h
  60. 23
      output/include/arm64-v8a/libavutil/tx.h
  61. 1
      output/include/arm64-v8a/libavutil/uuid.h
  62. 21
      output/include/arm64-v8a/libavutil/version.h
  63. 14
      output/include/arm64-v8a/libswresample/swresample.h
  64. 2
      output/include/arm64-v8a/libswresample/version.h
  65. 25
      output/include/arm64-v8a/libswscale/swscale.h
  66. 2
      output/include/arm64-v8a/libswscale/version.h
  67. 2
      output/include/arm64-v8a/libswscale/version_major.h
  68. 47
      output/include/armeabi-v7a/config.h
  69. 311
      output/include/armeabi-v7a/libavcodec/avcodec.h
  70. 4
      output/include/armeabi-v7a/libavcodec/bsf.h
  71. 34
      output/include/armeabi-v7a/libavcodec/codec.h
  72. 27
      output/include/armeabi-v7a/libavcodec/codec_id.h
  73. 9
      output/include/armeabi-v7a/libavcodec/codec_par.h
  74. 22
      output/include/armeabi-v7a/libavcodec/defs.h
  75. 8
      output/include/armeabi-v7a/libavcodec/mediacodec.h
  76. 2
      output/include/armeabi-v7a/libavcodec/packet.h
  77. 4
      output/include/armeabi-v7a/libavcodec/qsv.h
  78. 2
      output/include/armeabi-v7a/libavcodec/vdpau.h
  79. 2
      output/include/armeabi-v7a/libavcodec/version.h
  80. 26
      output/include/armeabi-v7a/libavcodec/version_major.h
  81. 29
      output/include/armeabi-v7a/libavcodec/videotoolbox.h
  82. 355
      output/include/armeabi-v7a/libavfilter/avfilter.h
  83. 36
      output/include/armeabi-v7a/libavfilter/buffersink.h
  84. 2
      output/include/armeabi-v7a/libavfilter/version.h
  85. 6
      output/include/armeabi-v7a/libavfilter/version_major.h
  86. 253
      output/include/armeabi-v7a/libavformat/avformat.h
  87. 15
      output/include/armeabi-v7a/libavformat/avio.h
  88. 2
      output/include/armeabi-v7a/libavformat/version.h
  89. 11
      output/include/armeabi-v7a/libavformat/version_major.h
  90. 7
      output/include/armeabi-v7a/libavutil/aes.h
  91. 12
      output/include/armeabi-v7a/libavutil/aes_ctr.h
  92. 72
      output/include/armeabi-v7a/libavutil/ambient_viewing_environment.h
  93. 10
      output/include/armeabi-v7a/libavutil/avstring.h
  94. 64
      output/include/armeabi-v7a/libavutil/bprint.h
  95. 2
      output/include/armeabi-v7a/libavutil/bswap.h
  96. 2
      output/include/armeabi-v7a/libavutil/camellia.h
  97. 50
      output/include/armeabi-v7a/libavutil/channel_layout.h
  98. 10
      output/include/armeabi-v7a/libavutil/cpu.h
  99. 3
      output/include/armeabi-v7a/libavutil/crc.h
  100. 46
      output/include/armeabi-v7a/libavutil/csp.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,9 +1,9 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
#define FFMPEG_CONFIGURATION "--prefix=/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/arm64-v8a --enable-cross-compile --enable-small --target-os=android --arch=aarch64 --sysroot=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --cxx=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ --ld=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --ar=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --nm=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -lm -lz -landroid -I/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/arm64-v8a/include' --extra-ldflags='-L/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/arm64-v8a/lib ' --disable-shared --enable-static --disable-vulkan --disable-symver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-ffplay --disable-ffmpeg --disable-ffprobe --disable-avdevice --disable-bsfs --disable-devices --disable-protocols --disable-postproc --enable-protocol=file --enable-protocol=concat --disable-parsers --disable-demuxers --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=image2 --enable-demuxer=gif --enable-demuxer=wav --enable-demuxer=asf --enable-demuxer=flv --enable-demuxer=avi --enable-demuxer=webm_dash_manifest --enable-demuxer=matroska --enable-demuxer=mpegts --disable-decoders --enable-decoder=aac --enable-decoder=png --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mjpeg --enable-decoder=mpeg4 --enable-decoder=gif --enable-decoder=pcm_s16le --enable-decoder=hevc --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=flv --enable-decoder=adpcm_swf --enable-decoder=ac3 --enable-decoder=vp8 --enable-decoder=vorbis --enable-decoder=mpeg2video --enable-decoder=mp2 --enable-decoder=indeo4 --enable-decoder=amrnb --disable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=image2 --enable-muxer=mp3 --enable-muxer=ipod --enable-muxer=gif --disable-encoders --enable-encoder=aac --enable-encoder=png --enable-encoder=mjpeg --enable-encoder=gif --enable-swscale --disable-filters --enable-filter=crop --enable-filter=scale --enable-filter=afade --enable-filter=atempo --enable-filter=copy --enable-filter=aformat --enable-filter=overlay --enable-filter=vflip --enable-filter=hflip --enable-filter=transpose --enable-filter=volume --enable-filter=rotate --enable-filter=apad --enable-filter=amerge --enable-filter=aresample --enable-filter=setpts --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=trim --enable-filter=null --enable-filter=overlay --enable-filter=format --enable-filter=atrim --enable-filter=split --enable-filter=amix --enable-filter=anull --enable-filter=adelay --enable-zlib --enable-jni --enable-nonfree --enable-mediacodec --enable-decoder=h264_mediacodec --enable-decoder=hevc_mediacodec --enable-encoder=h264_mediacodec --enable-encoder=hevc_mediacodec --enable-version3 --pkg-config=/usr/bin/pkg-config --enable-neon --disable-asm --enable-inline-asm --enable-gpl --enable-libmp3lame --enable-encoder=libmp3lame --enable-libx264 --enable-encoder=libx264"
#define FFMPEG_CONFIGURATION "--prefix=/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/arm64-v8a --enable-cross-compile --enable-small --target-os=android --arch=aarch64 --sysroot=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --cxx=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++ --ld=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --ar=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang --nm=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -lm -lz -landroid -I/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/arm64-v8a/include' --extra-ldflags='-L/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/arm64-v8a/lib ' --disable-shared --enable-static --disable-vulkan --disable-symver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-ffplay --disable-ffmpeg --disable-ffprobe --disable-avdevice --disable-bsfs --disable-devices --disable-protocols --disable-postproc --enable-protocol=file --enable-protocol=concat --disable-parsers --disable-demuxers --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=image2 --enable-demuxer=gif --enable-demuxer=wav --enable-demuxer=asf --enable-demuxer=flv --enable-demuxer=avi --enable-demuxer=webm_dash_manifest --enable-demuxer=matroska --enable-demuxer=mpegts --disable-decoders --enable-decoder=aac --enable-decoder=png --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mjpeg --enable-decoder=mpeg4 --enable-decoder=gif --enable-decoder=pcm_s16le --enable-decoder=hevc --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=flv --enable-decoder=adpcm_swf --enable-decoder=ac3 --enable-decoder=vp8 --enable-decoder=vorbis --enable-decoder=mpeg2video --enable-decoder=mp2 --enable-decoder=indeo4 --enable-decoder=amrnb --disable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=image2 --enable-muxer=mp3 --enable-muxer=ipod --enable-muxer=gif --disable-encoders --enable-encoder=aac --enable-encoder=png --enable-encoder=mjpeg --enable-encoder=gif --enable-swscale --disable-filters --enable-filter=crop --enable-filter=scale --enable-filter=afade --enable-filter=atempo --enable-filter=copy --enable-filter=aformat --enable-filter=overlay --enable-filter=vflip --enable-filter=hflip --enable-filter=transpose --enable-filter=volume --enable-filter=rotate --enable-filter=apad --enable-filter=amerge --enable-filter=aresample --enable-filter=setpts --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=trim --enable-filter=null --enable-filter=overlay --enable-filter=format --enable-filter=atrim --enable-filter=split --enable-filter=amix --enable-filter=anull --enable-filter=adelay --enable-zlib --enable-jni --enable-nonfree --enable-mediacodec --enable-version3 --pkg-config=/usr/bin/pkg-config --enable-neon --disable-asm --enable-inline-asm --enable-gpl --enable-libmp3lame --enable-encoder=libmp3lame --enable-libx264 --enable-encoder=libx264"
#define FFMPEG_LICENSE "nonfree and unredistributable"
#define CONFIG_THIS_YEAR 2023
#define CONFIG_THIS_YEAR 2022
#define FFMPEG_DATADIR "/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/arm64-v8a/share/ffmpeg"
#define AVCONV_DATADIR "/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/arm64-v8a/share/ffmpeg"
#define CC_IDENT "Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)"
@ -57,7 +57,6 @@
#define HAVE_POWER8 0
#define HAVE_PPC4XX 0
#define HAVE_VSX 0
#define HAVE_RVV 0
#define HAVE_AESNI 0
#define HAVE_AMD3DNOW 0
#define HAVE_AMD3DNOWEXT 0
@ -106,7 +105,6 @@
#define HAVE_POWER8_EXTERNAL 0
#define HAVE_PPC4XX_EXTERNAL 0
#define HAVE_VSX_EXTERNAL 0
#define HAVE_RVV_EXTERNAL 0
#define HAVE_AESNI_EXTERNAL 0
#define HAVE_AMD3DNOW_EXTERNAL 0
#define HAVE_AMD3DNOWEXT_EXTERNAL 0
@ -155,7 +153,6 @@
#define HAVE_POWER8_INLINE 0
#define HAVE_PPC4XX_INLINE 0
#define HAVE_VSX_INLINE 0
#define HAVE_RVV_INLINE 0
#define HAVE_AESNI_INLINE 0
#define HAVE_AMD3DNOW_INLINE 0
#define HAVE_AMD3DNOWEXT_INLINE 0
@ -194,7 +191,6 @@
#define HAVE_FAST_64BIT 0
#define HAVE_FAST_CLZ 0
#define HAVE_FAST_CMOV 0
#define HAVE_FAST_FLOAT16 1
#define HAVE_LOCAL_ALIGNED 0
#define HAVE_SIMD_ALIGN_16 0
#define HAVE_SIMD_ALIGN_32 0
@ -206,6 +202,8 @@
#define HAVE_RDTSC 0
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
#define HAVE_CABS 0
#define HAVE_CEXP 0
#define HAVE_INLINE_ASM 1
#define HAVE_SYMVER 0
#define HAVE_X86ASM 0
@ -325,7 +323,6 @@
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_PRCTL 1
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@ -371,8 +368,6 @@
#define HAVE_VFP_ARGS 0
#define HAVE_XFORM_ASM 0
#define HAVE_XMM_CLOBBERS 0
#define HAVE_DPI_AWARENESS_CONTEXT 0
#define HAVE_IDXGIOUTPUT5 0
#define HAVE_KCMVIDEOCODECTYPE_HEVC 0
#define HAVE_KCMVIDEOCODECTYPE_HEVCWITHALPHA 0
#define HAVE_KCMVIDEOCODECTYPE_VP9 0
@ -424,30 +419,29 @@
#define CONFIG_MANPAGES 0
#define CONFIG_PODPAGES 0
#define CONFIG_TXTPAGES 0
#define CONFIG_AVIO_HTTP_SERVE_FILES_EXAMPLE 1
#define CONFIG_AVIO_LIST_DIR_EXAMPLE 1
#define CONFIG_AVIO_READ_CALLBACK_EXAMPLE 1
#define CONFIG_AVIO_READING_EXAMPLE 1
#define CONFIG_DECODE_AUDIO_EXAMPLE 1
#define CONFIG_DECODE_FILTER_AUDIO_EXAMPLE 1
#define CONFIG_DECODE_FILTER_VIDEO_EXAMPLE 1
#define CONFIG_DECODE_VIDEO_EXAMPLE 1
#define CONFIG_DEMUX_DECODE_EXAMPLE 1
#define CONFIG_DEMUXING_DECODING_EXAMPLE 1
#define CONFIG_ENCODE_AUDIO_EXAMPLE 1
#define CONFIG_ENCODE_VIDEO_EXAMPLE 1
#define CONFIG_EXTRACT_MVS_EXAMPLE 1
#define CONFIG_FILTER_AUDIO_EXAMPLE 1
#define CONFIG_FILTERING_AUDIO_EXAMPLE 1
#define CONFIG_FILTERING_VIDEO_EXAMPLE 1
#define CONFIG_HTTP_MULTICLIENT_EXAMPLE 1
#define CONFIG_HW_DECODE_EXAMPLE 1
#define CONFIG_MUX_EXAMPLE 1
#define CONFIG_QSV_DECODE_EXAMPLE 0
#define CONFIG_REMUX_EXAMPLE 1
#define CONFIG_RESAMPLE_AUDIO_EXAMPLE 1
#define CONFIG_SCALE_VIDEO_EXAMPLE 1
#define CONFIG_SHOW_METADATA_EXAMPLE 1
#define CONFIG_METADATA_EXAMPLE 1
#define CONFIG_MUXING_EXAMPLE 1
#define CONFIG_QSVDEC_EXAMPLE 0
#define CONFIG_REMUXING_EXAMPLE 1
#define CONFIG_RESAMPLING_AUDIO_EXAMPLE 1
#define CONFIG_SCALING_VIDEO_EXAMPLE 1
#define CONFIG_TRANSCODE_AAC_EXAMPLE 1
#define CONFIG_TRANSCODE_EXAMPLE 1
#define CONFIG_TRANSCODING_EXAMPLE 1
#define CONFIG_VAAPI_ENCODE_EXAMPLE 0
#define CONFIG_VAAPI_TRANSCODE_EXAMPLE 0
#define CONFIG_QSV_TRANSCODE_EXAMPLE 0
#define CONFIG_AVISYNTH 0
#define CONFIG_FREI0R 0
#define CONFIG_LIBCDIO 0
@ -569,7 +563,6 @@
#define CONFIG_CUDA_SDK 0
#define CONFIG_LIBNPP 0
#define CONFIG_LIBMFX 0
#define CONFIG_LIBVPL 0
#define CONFIG_MMAL 0
#define CONFIG_OMX 0
#define CONFIG_OPENCL 0
@ -620,7 +613,7 @@
#define CONFIG_FAST_UNALIGNED 0
#define CONFIG_FFT 1
#define CONFIG_LSP 1
#define CONFIG_MDCT 0
#define CONFIG_MDCT 1
#define CONFIG_PIXELUTILS 0
#define CONFIG_NETWORK 1
#define CONFIG_RDFT 1
@ -673,6 +666,7 @@
#define CONFIG_FAANDCT 1
#define CONFIG_FAANIDCT 1
#define CONFIG_FDCTDSP 1
#define CONFIG_FLACDSP 0
#define CONFIG_FMTCONVERT 1
#define CONFIG_FRAME_THREAD_ENCODER 1
#define CONFIG_G722DSP 0
@ -684,15 +678,14 @@
#define CONFIG_H264PARSE 1
#define CONFIG_H264PRED 1
#define CONFIG_H264QPEL 1
#define CONFIG_H264_SEI 1
#define CONFIG_HEVCPARSE 1
#define CONFIG_HEVC_SEI 1
#define CONFIG_HPELDSP 1
#define CONFIG_HUFFMAN 0
#define CONFIG_HUFFYUVDSP 0
#define CONFIG_HUFFYUVENCDSP 0
#define CONFIG_IDCTDSP 1
#define CONFIG_IIRFILTER 1
#define CONFIG_MDCT15 1
#define CONFIG_INFLATE_WRAPPER 1
#define CONFIG_INTRAX8 0
#define CONFIG_ISO_MEDIA 1
@ -714,8 +707,6 @@
#define CONFIG_MPEGVIDEO 1
#define CONFIG_MPEGVIDEODEC 1
#define CONFIG_MPEGVIDEOENC 1
#define CONFIG_MSMPEG4DEC 1
#define CONFIG_MSMPEG4ENC 0
#define CONFIG_MSS34DSP 0
#define CONFIG_PIXBLOCKDSP 1
#define CONFIG_QPELDSP 1

@ -231,58 +231,6 @@ typedef struct RcOverride{
* decoded frame in stream.
*/
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
/**
* Request the encoder to output reconstructed frames, i.e.\ frames that would
* be produced by decoding the encoded bistream. These frames may be retrieved
* by calling avcodec_receive_frame() immediately after a successful call to
* avcodec_receive_packet().
*
* Should only be used with encoders flagged with the
* @ref AV_CODEC_CAP_ENCODER_RECON_FRAME capability.
*/
#define AV_CODEC_FLAG_RECON_FRAME (1 << 6)
/**
* @par decoding
* Request the decoder to propagate each packets AVPacket.opaque and
* AVPacket.opaque_ref to its corresponding output AVFrame.
*
* @par encoding:
* Request the encoder to propagate each frame's AVFrame.opaque and
* AVFrame.opaque_ref values to its corresponding output AVPacket.
*
* @par
* May only be set on encoders that have the
* @ref AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability flag.
*
* @note
* While in typical cases one input frame produces exactly one output packet
* (perhaps after a delay), in general the mapping of frames to packets is
* M-to-N, so
* - Any number of input frames may be associated with any given output packet.
* This includes zero - e.g. some encoders may output packets that carry only
* metadata about the whole stream.
* - A given input frame may be associated with any number of output packets.
* Again this includes zero - e.g. some encoders may drop frames under certain
* conditions.
* .
* This implies that when using this flag, the caller must NOT assume that
* - a given input frame's opaques will necessarily appear on some output packet;
* - every output packet will have some non-NULL opaque value.
* .
* When an output packet contains multiple frames, the opaque values will be
* taken from the first of those.
*
* @note
* The converse holds for decoders, with frames and packets switched.
*/
#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7)
/**
* Signal to the encoder that the values of AVFrame.duration are valid and
* should be used (typically for transferring them to output packets).
*
* If this flag is not set, frame durations are ignored.
*/
#define AV_CODEC_FLAG_FRAME_DURATION (1 << 8)
/**
* Use internal 2pass ratecontrol in first pass mode.
*/
@ -303,6 +251,15 @@ typedef struct RcOverride{
* error[?] variables will be set during encoding.
*/
#define AV_CODEC_FLAG_PSNR (1 << 15)
#if FF_API_FLAG_TRUNCATED
/**
* Input bitstream might be truncated at a random location
* instead of only at frame boundaries.
*
* @deprecated use codec parsers for packetizing input
*/
#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
#endif
/**
* Use interlaced DCT.
*/
@ -343,6 +300,11 @@ typedef struct RcOverride{
*/
#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
/**
* timecode is in drop frame format. DEPRECATED!!!!
*/
#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
/**
* Input bitstream might be truncated at a packet boundaries
* instead of only at frame boundaries.
@ -369,12 +331,13 @@ typedef struct RcOverride{
* Do not reset ASS ReadOrder field on flush (subtitles decoding)
*/
#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
/**
* Generate/parse ICC profiles on encode/decode, as appropriate for the type of
* file. No effect on codecs which cannot contain embedded ICC profiles, or
* when compiled without support for lcms2.
*/
#define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31)
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
* Reference Picture Selection
* Independent Segment Decoding */
/* /Fx */
/* codec capabilities */
/* Exported side data.
These flags can be passed in AVCodecContext.export_side_data before initialization.
@ -543,7 +506,8 @@ typedef struct AVCodecContext {
* (fixed_vop_rate == 0 implies that it is different from the framerate)
*
* - encoding: MUST be set by user.
* - decoding: unused.
* - decoding: the use of this field for decoding is deprecated.
* Use framerate instead.
*/
AVRational time_base;
@ -1061,7 +1025,6 @@ typedef struct AVCodecContext {
*/
int frame_size;
#if FF_API_AVCTX_FRAME_NUMBER
/**
* Frame counter, set by libavcodec.
*
@ -1070,11 +1033,8 @@ typedef struct AVCodecContext {
*
* @note the counter is not incremented if encoding/decoding resulted in
* an error.
* @deprecated use frame_num instead
*/
attribute_deprecated
int frame_number;
#endif
/**
* number of bytes per packet if constant and known or 0
@ -1336,9 +1296,13 @@ typedef struct AVCodecContext {
* unofficial and experimental (that is, they always try to decode things
* when they can) unless they are explicitly asked to behave stupidly
* (=strictly conform to the specs)
* This may only be set to one of the FF_COMPLIANCE_* values in defs.h.
*/
int strict_std_compliance;
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
* error concealment flags
@ -1374,14 +1338,28 @@ typedef struct AVCodecContext {
/**
* Error recognition; may misdetect some more or less valid parts as errors.
* This is a bitfield of the AV_EF_* values defined in defs.h.
*
* - encoding: Set by user.
* - decoding: Set by user.
*/
int err_recognition;
#if FF_API_REORDERED_OPAQUE
/**
* Verify checksums embedded in the bitstream (could be of either encoded or
* decoded data, depending on the codec) and print an error message on mismatch.
* If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
* decoder returning an error.
*/
#define AV_EF_CRCCHECK (1<<0)
#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error
/**
* opaque 64-bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
@ -1390,12 +1368,8 @@ typedef struct AVCodecContext {
* supported by encoders with the
* AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability.
* - decoding: Set by user.
*
* @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead
*/
attribute_deprecated
int64_t reordered_opaque;
#endif
/**
* Hardware accelerator in use
@ -1405,26 +1379,13 @@ typedef struct AVCodecContext {
const struct AVHWAccel *hwaccel;
/**
* Legacy hardware accelerator context.
*
* For some hardware acceleration methods, the caller may use this field to
* signal hwaccel-specific data to the codec. The struct pointed to by this
* pointer is hwaccel-dependent and defined in the respective header. Please
* refer to the FFmpeg HW accelerator documentation to know how to fill
* this.
*
* In most cases this field is optional - the necessary information may also
* be provided to libavcodec through @ref hw_frames_ctx or @ref
* hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it
* may be the only method of signalling some (optional) information.
*
* The struct and its contents are owned by the caller.
*
* - encoding: May be set by the caller before avcodec_open2(). Must remain
* valid until avcodec_free_context().
* - decoding: May be set by the caller in the get_format() callback.
* Must remain valid until the next get_format() call,
* or avcodec_free_context() (whichever comes first).
* Hardware accelerator context.
* For some hardware accelerators, a global context needs to be
* provided by the user. In that case, this holds display-dependent
* data FFmpeg cannot instantiate itself. Please refer to the
* FFmpeg HW accelerator documentation to know how to fill this.
* - encoding: unused
* - decoding: Set by user
*/
void *hwaccel_context;
@ -1520,6 +1481,27 @@ typedef struct AVCodecContext {
*/
int active_thread_type;
#if FF_API_THREAD_SAFE_CALLBACKS
/**
* Set by the client if its custom get_buffer() callback can be called
* synchronously from another thread, which allows faster multithreaded decoding.
* draw_horiz_band() will be called from other threads regardless of this setting.
* Ignored if the default get_buffer() is used.
* - encoding: Set by user.
* - decoding: Set by user.
*
* @deprecated the custom get_buffer2() callback should always be
* thread-safe. Thread-unsafe get_buffer2() implementations will be
* invalid starting with LIBAVCODEC_VERSION_MAJOR=60; in other words,
* libavcodec will behave as if this field was always set to 1.
* Callers that want to be forward compatible with future libavcodec
* versions should wrap access to this field in
* #if LIBAVCODEC_VERSION_MAJOR < 60
*/
attribute_deprecated
int thread_safe_callbacks;
#endif
/**
* The codec may call this to execute several independent things.
* It will return only after finishing all tasks.
@ -1820,6 +1802,17 @@ typedef struct AVCodecContext {
*/
int seek_preroll;
#if FF_API_DEBUG_MV
/**
* @deprecated unused
*/
attribute_deprecated
int debug_mv;
#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
#endif
/**
* custom intra quantization matrix
* - encoding: Set by user, can be NULL.
@ -1886,6 +1879,15 @@ typedef struct AVCodecContext {
*/
AVBufferRef *hw_frames_ctx;
#if FF_API_SUB_TEXT_FORMAT
/**
* @deprecated unused
*/
attribute_deprecated
int sub_text_format;
#define FF_SUB_TEXT_FMT_ASS 0
#endif
/**
* Audio only. The amount of padding (in samples) appended by the encoder to
* the end of the audio. I.e. this number of decoded samples must be
@ -2052,17 +2054,6 @@ typedef struct AVCodecContext {
* The decoder can then override during decoding as needed.
*/
AVChannelLayout ch_layout;
/**
* Frame counter, set by libavcodec.
*
* - decoding: total number of frames returned from the decoder so far.
* - encoding: total number of frames passed to the encoder so far.
*
* @note the counter is not incremented if encoding/decoding resulted in
* an error.
*/
int64_t frame_num;
} AVCodecContext;
/**
@ -2259,22 +2250,6 @@ typedef struct AVHWAccel {
*/
#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
/**
* Some hardware decoders (namely nvdec) can either output direct decoder
* surfaces, or make an on-device copy and return said copy.
* There is a hard limit on how many decoder surfaces there can be, and it
* cannot be accurately guessed ahead of time.
* For some processing chains, this can be okay, but others will run into the
* limit and in turn produce very confusing errors that require fine tuning of
* more or less obscure options by the user, or in extreme cases cannot be
* resolved at all without inserting an avfilter that forces a copy.
*
* Thus, the hwaccel will by default make a copy for safety and resilience.
* If a users really wants to minimize the amount of copies, they can set this
* flag and ensure their processing chain does not exhaust the surface pool.
*/
#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT (1 << 3)
/**
* @}
*/
@ -2380,6 +2355,14 @@ void avcodec_free_context(AVCodecContext **avctx);
*/
const AVClass *avcodec_get_class(void);
#if FF_API_GET_FRAME_CLASS
/**
* @deprecated This function should not be used.
*/
attribute_deprecated
const AVClass *avcodec_get_frame_class(void);
#endif
/**
* Get the AVClass for AVSubtitleRect. It can be used in combination with
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
@ -2510,7 +2493,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS]);
#ifdef FF_API_AVCODEC_CHROMA_POS
/**
* Converts AVChromaLocation to swscale x/y chroma position.
*
@ -2519,9 +2501,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
* @deprecated Use av_chroma_location_enum_to_pos() instead.
*/
attribute_deprecated
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
/**
@ -2532,11 +2512,8 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
* @deprecated Use av_chroma_location_pos_to_enum() instead.
*/
attribute_deprecated
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
#endif
/**
* Decode a subtitle message.
@ -2566,7 +2543,8 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
* @param[in] avpkt The input AVPacket containing the input buffer.
*/
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr, const AVPacket *avpkt);
int *got_sub_ptr,
AVPacket *avpkt);
/**
* Supply raw packet data as input to a decoder.
@ -2602,41 +2580,40 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
* still has frames buffered, it will return them after sending
* a flush packet.
*
* @retval 0 success
* @retval AVERROR(EAGAIN) input is not accepted in the current state - user
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): input is not accepted in the current state - user
* must read output with avcodec_receive_frame() (once
* all output is read, the packet should be resent,
* and the call will not fail with EAGAIN).
* @retval AVERROR_EOF the decoder has been flushed, and no new packets can be
* sent to it (also returned if more than 1 flush
* all output is read, the packet should be resent, and
* the call will not fail with EAGAIN).
* AVERROR_EOF: the decoder has been flushed, and no new packets can
* be sent to it (also returned if more than 1 flush
* packet is sent)
* @retval AVERROR(EINVAL) codec not opened, it is an encoder, or requires flush
* @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
* @retval "another negative error code" legitimate decoding errors
* AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush
* AVERROR(ENOMEM): failed to add packet to internal queue, or similar
* other errors: legitimate decoding errors
*/
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
/**
* Return decoded output data from a decoder or encoder (when the
* AV_CODEC_FLAG_RECON_FRAME flag is used).
* Return decoded output data from a decoder.
*
* @param avctx codec context
* @param frame This will be set to a reference-counted video or audio
* frame (depending on the decoder type) allocated by the
* codec. Note that the function will always call
* decoder. Note that the function will always call
* av_frame_unref(frame) before doing anything else.
*
* @retval 0 success, a frame was returned
* @retval AVERROR(EAGAIN) output is not available in this state - user must
* try to send new input
* @retval AVERROR_EOF the codec has been fully flushed, and there will be
* @return
* 0: success, a frame was returned
* AVERROR(EAGAIN): output is not available in this state - user must try
* to send new input
* AVERROR_EOF: the decoder has been fully flushed, and there will be
* no more output frames
* @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the
* AV_CODEC_FLAG_RECON_FRAME flag enabled
* @retval AVERROR_INPUT_CHANGED current decoded frame has changed parameters with
* respect to first decoded frame. Applicable when flag
* AV_CODEC_FLAG_DROPCHANGED is set.
* @retval "other negative error code" legitimate decoding errors
* AVERROR(EINVAL): codec not opened, or it is an encoder
* AVERROR_INPUT_CHANGED: current decoded frame has changed parameters
* with respect to first decoded frame. Applicable
* when flag AV_CODEC_FLAG_DROPCHANGED is set.
* other negative values: legitimate decoding errors
*/
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
@ -2663,16 +2640,16 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
* If it is not set, frame->nb_samples must be equal to
* avctx->frame_size for all frames except the last.
* The final frame may be smaller than avctx->frame_size.
* @retval 0 success
* @retval AVERROR(EAGAIN) input is not accepted in the current state - user must
* read output with avcodec_receive_packet() (once all
* output is read, the packet should be resent, and the
* call will not fail with EAGAIN).
* @retval AVERROR_EOF the encoder has been flushed, and no new frames can
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): input is not accepted in the current state - user
* must read output with avcodec_receive_packet() (once
* all output is read, the packet should be resent, and
* the call will not fail with EAGAIN).
* AVERROR_EOF: the encoder has been flushed, and no new frames can
* be sent to it
* @retval AVERROR(EINVAL) codec not opened, it is a decoder, or requires flush
* @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
* @retval "another negative error code" legitimate encoding errors
* AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush
* AVERROR(ENOMEM): failed to add packet to internal queue, or similar
* other errors: legitimate encoding errors
*/
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
@ -2683,13 +2660,13 @@ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
* @param avpkt This will be set to a reference-counted packet allocated by the
* encoder. Note that the function will always call
* av_packet_unref(avpkt) before doing anything else.
* @retval 0 success
* @retval AVERROR(EAGAIN) output is not available in the current state - user must
* try to send input
* @retval AVERROR_EOF the encoder has been fully flushed, and there will be no
* more output packets
* @retval AVERROR(EINVAL) codec not opened, or it is a decoder
* @retval "another negative error code" legitimate encoding errors
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): output is not available in the current state - user
* must try to send input
* AVERROR_EOF: the encoder has been fully flushed, and there will be
* no more output packets
* AVERROR(EINVAL): codec not opened, or it is a decoder
* other errors: legitimate encoding errors
*/
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt);
@ -2803,10 +2780,10 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
*/
enum AVPictureStructure {
AV_PICTURE_STRUCTURE_UNKNOWN, ///< unknown
AV_PICTURE_STRUCTURE_TOP_FIELD, ///< coded as top field
AV_PICTURE_STRUCTURE_BOTTOM_FIELD, ///< coded as bottom field
AV_PICTURE_STRUCTURE_FRAME, ///< coded as frame
AV_PICTURE_STRUCTURE_UNKNOWN, //< unknown
AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field
AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
AV_PICTURE_STRUCTURE_FRAME, //< coded as frame
};
typedef struct AVCodecParserContext {

@ -164,8 +164,6 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
/**
* Prepare the filter for use, after all the parameters and options have been
* set.
*
* @param ctx a AVBSFContext previously allocated with av_bsf_alloc()
*/
int av_bsf_init(AVBSFContext *ctx);
@ -176,7 +174,6 @@ int av_bsf_init(AVBSFContext *ctx);
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
* AVERROR_EOF.
*
* @param ctx an initialized AVBSFContext
* @param pkt the packet to filter. The bitstream filter will take ownership of
* the packet and reset the contents of pkt. pkt is not touched if an error occurs.
* If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero),
@ -195,7 +192,6 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
/**
* Retrieve a filtered packet.
*
* @param ctx an initialized AVBSFContext
* @param[out] pkt this struct will be filled with the contents of the filtered
* packet. It is owned by the caller and must be freed using
* av_packet_unref() when it is no longer needed.

@ -50,6 +50,12 @@
* avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
*/
#define AV_CODEC_CAP_DR1 (1 << 1)
#if FF_API_FLAG_TRUNCATED
/**
* @deprecated Use parsers to always send proper frames.
*/
#define AV_CODEC_CAP_TRUNCATED (1 << 3)
#endif
/**
* Encoder or decoder requires flushing with NULL input at the end in order to
* give the complete and correct output.
@ -119,6 +125,9 @@
* multithreading-capable external libraries.
*/
#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
#if FF_API_AUTO_THREADS
#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS
#endif
/**
* Audio encoder supports receiving a different number of samples in each call.
*/
@ -134,6 +143,17 @@
*/
#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
#if FF_API_UNUSED_CODEC_CAPS
/**
* Deprecated and unused. Use AVCodecDescriptor.props instead
*/
#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
/**
* Deprecated and unused. Use AVCodecDescriptor.props instead
*/
#define AV_CODEC_CAP_LOSSLESS 0x80000000
#endif
/**
* Codec is backed by a hardware implementation. Typically used to
* identify a non-hwaccel hardware decoder. For information about hwaccels, use
@ -149,9 +169,9 @@
#define AV_CODEC_CAP_HYBRID (1 << 19)
/**
* This encoder can reorder user opaque values from input AVFrames and return
* them with corresponding output packets.
* @see AV_CODEC_FLAG_COPY_OPAQUE
* This codec takes the reordered_opaque field from input AVFrames
* and returns it in the corresponding field in AVCodecContext after
* encoding.
*/
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
@ -162,14 +182,6 @@
*/
#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
/**
* The encoder is able to output reconstructed frame data, i.e. raw frames that
* would be produced by decoding the encoded bitstream.
*
* Reconstructed frame output is enabled by the AV_CODEC_FLAG_RECON_FRAME flag.
*/
#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22)
/**
* AVProfile.
*/

@ -24,8 +24,6 @@
#include "libavutil/avutil.h"
#include "libavutil/samplefmt.h"
#include "version_major.h"
/**
* @addtogroup lavc_core
* @{
@ -253,9 +251,7 @@ enum AVCodecID {
AV_CODEC_ID_AVRP,
AV_CODEC_ID_012V,
AV_CODEC_ID_AVUI,
#if FF_API_AYUV_CODECID
AV_CODEC_ID_AYUV,
#endif
AV_CODEC_ID_TARGA_Y216,
AV_CODEC_ID_V308,
AV_CODEC_ID_V408,
@ -316,10 +312,6 @@ enum AVCodecID {
AV_CODEC_ID_JPEGXL,
AV_CODEC_ID_QOI,
AV_CODEC_ID_PHM,
AV_CODEC_ID_RADIANCE_HDR,
AV_CODEC_ID_WBMP,
AV_CODEC_ID_MEDIA100,
AV_CODEC_ID_VQC,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@ -413,7 +405,6 @@ enum AVCodecID {
AV_CODEC_ID_ADPCM_IMA_CUNNING,
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
AV_CODEC_ID_ADPCM_IMA_ACORN,
AV_CODEC_ID_ADPCM_XMD,
/* AMR */
AV_CODEC_ID_AMR_NB = 0x12000,
@ -431,8 +422,6 @@ enum AVCodecID {
AV_CODEC_ID_SDX2_DPCM,
AV_CODEC_ID_GREMLIN_DPCM,
AV_CODEC_ID_DERF_DPCM,
AV_CODEC_ID_WADY_DPCM,
AV_CODEC_ID_CBD2_DPCM,
/* audio codecs */
AV_CODEC_ID_MP2 = 0x15000,
@ -532,12 +521,6 @@ enum AVCodecID {
AV_CODEC_ID_FASTAUDIO,
AV_CODEC_ID_MSNSIREN,
AV_CODEC_ID_DFPWM,
AV_CODEC_ID_BONK,
AV_CODEC_ID_MISC4,
AV_CODEC_ID_APAC,
AV_CODEC_ID_FTR,
AV_CODEC_ID_WAVARC,
AV_CODEC_ID_RKA,
/* subtitle codecs */
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
@ -592,16 +575,6 @@ enum AVCodecID {
* stream (only used by libavformat) */
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
/**
* Dummy null video codec, useful mainly for development and debugging.
* Null encoder/decoder discard all input and never return any output.
*/
AV_CODEC_ID_VNULL,
/**
* Dummy null audio codec, useful mainly for development and debugging.
* Null encoder/decoder discard all input and never return any output.
*/
AV_CODEC_ID_ANULL,
};
/**

@ -32,16 +32,15 @@
/**
* @addtogroup lavc_core
* @{
*/
enum AVFieldOrder {
AV_FIELD_UNKNOWN,
AV_FIELD_PROGRESSIVE,
AV_FIELD_TT, ///< Top coded_first, top displayed first
AV_FIELD_BB, ///< Bottom coded first, bottom displayed first
AV_FIELD_TB, ///< Top coded first, bottom displayed first
AV_FIELD_BT, ///< Bottom coded first, top displayed first
AV_FIELD_TT, //< Top coded_first, top displayed first
AV_FIELD_BB, //< Bottom coded first, bottom displayed first
AV_FIELD_TB, //< Top coded first, bottom displayed first
AV_FIELD_BT, //< Bottom coded first, top displayed first
};
/**

@ -39,28 +39,6 @@
*/
#define AV_INPUT_BUFFER_PADDING_SIZE 64
/**
* Verify checksums embedded in the bitstream (could be of either encoded or
* decoded data, depending on the format) and print an error message on mismatch.
* If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
* decoder/demuxer returning an error.
*/
#define AV_EF_CRCCHECK (1<<0)
#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
* @ingroup lavc_decoding
*/

@ -88,15 +88,13 @@ int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render);
/**
* Release a MediaCodec buffer and render it at the given time to the surface
* that is associated with the decoder. The timestamp must be within one second
* of the current `java/lang/System#nanoTime()` (which is implemented using
* `CLOCK_MONOTONIC` on Android). See the Android MediaCodec documentation
* of [`android/media/MediaCodec#releaseOutputBuffer(int,long)`][0] for more details.
* of the current java/lang/System#nanoTime() (which is implemented using
* CLOCK_MONOTONIC on Android). See the Android MediaCodec documentation
* of android/media/MediaCodec#releaseOutputBuffer(int,long) for more details.
*
* @param buffer the buffer to render
* @param time timestamp in nanoseconds of when to render the buffer
* @return 0 on success, < 0 otherwise
*
* [0]: https://developer.android.com/reference/android/media/MediaCodec#releaseOutputBuffer(int,%20long)
*/
int av_mediacodec_render_buffer_at_time(AVMediaCodecBuffer *buffer, int64_t time);

@ -161,7 +161,7 @@ enum AVPacketSideDataType {
* the packet may contain "dual mono" audio specific to Japanese DTV
* and if it is true, recommends only the selected channel to be used.
* @code
* u8 selected channels (0=main/left, 1=sub/right, 2=both)
* u8 selected channels (0=mail/left, 1=sub/right, 2=both)
* @endcode
*/
AV_PKT_DATA_JP_DUALMONO,

@ -21,7 +21,7 @@
#ifndef AVCODEC_QSV_H
#define AVCODEC_QSV_H
#include <mfxvideo.h>
#include <mfx/mfxvideo.h>
#include "libavutil/buffer.h"
@ -61,8 +61,6 @@ typedef struct AVQSVContext {
* required by the encoder and the user-provided value nb_opaque_surfaces.
* The array of the opaque surfaces will be exported to the caller through
* the opaque_surfaces field.
*
* The caller must set this field to zero for oneVPL (MFX_VERSION >= 2.0)
*/
int opaque_alloc;

@ -152,6 +152,6 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
*/
AVVDPAUContext *av_vdpau_alloc_context(void);
/** @} */
/* @}*/
#endif /* AVCODEC_VDPAU_H */

@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 3
#define LIBAVCODEC_VERSION_MINOR 37
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

@ -25,7 +25,7 @@
* Libavcodec version macros.
*/
#define LIBAVCODEC_VERSION_MAJOR 60
#define LIBAVCODEC_VERSION_MAJOR 59
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -37,16 +37,18 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61)
// reminder to remove CrystalHD decoders on next major bump
#define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
#endif /* AVCODEC_VERSION_MAJOR_H */

@ -29,15 +29,6 @@
* Public libavcodec Videotoolbox header.
*/
/**
* @defgroup lavc_codec_hwaccel_videotoolbox VideoToolbox Decoder
* @ingroup lavc_codec_hwaccel
*
* Hardware accelerated decoding using VideoToolbox on Apple Platforms
*
* @{
*/
#include <stdint.h>
#define Picture QuickdrawPicture
@ -46,8 +37,6 @@
#include "libavcodec/avcodec.h"
#include "libavutil/attributes.h"
/**
* This struct holds all the information that needs to be passed
* between the caller and libavcodec for initializing Videotoolbox decoding.
@ -57,17 +46,15 @@
typedef struct AVVideotoolboxContext {
/**
* Videotoolbox decompression session object.
* Created and freed the caller.
*/
VTDecompressionSessionRef session;
#if FF_API_VT_OUTPUT_CALLBACK
/**
* The output callback that must be passed to the session.
* Set by av_videottoolbox_default_init()
*/
attribute_deprecated
VTDecompressionOutputCallback output_callback;
#endif
/**
* CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.
@ -78,17 +65,17 @@ typedef struct AVVideotoolboxContext {
/**
* CoreMedia Format Description that Videotoolbox will use to create the decompression session.
* Set by the caller.
*/
CMVideoFormatDescriptionRef cm_fmt_desc;
/**
* CoreMedia codec type that Videotoolbox will use to create the decompression session.
* Set by the caller.
*/
int cm_codec_type;
} AVVideotoolboxContext;
#if FF_API_VT_HWACCEL_CONTEXT
/**
* Allocate and initialize a Videotoolbox context.
*
@ -101,9 +88,7 @@ typedef struct AVVideotoolboxContext {
* object and free the Videotoolbox context using av_free().
*
* @return the newly allocated context or NULL on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
AVVideotoolboxContext *av_videotoolbox_alloc_context(void);
/**
@ -113,9 +98,7 @@ AVVideotoolboxContext *av_videotoolbox_alloc_context(void);
* @param avctx the corresponding codec context
*
* @return >= 0 on success, a negative AVERROR code on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
int av_videotoolbox_default_init(AVCodecContext *avctx);
/**
@ -126,9 +109,7 @@ int av_videotoolbox_default_init(AVCodecContext *avctx);
* @param vtctx the Videotoolbox context to use
*
* @return >= 0 on success, a negative AVERROR code on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx);
/**
@ -136,13 +117,9 @@ int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *
* av_videotoolbox_default_init().
*
* @param avctx the corresponding codec context
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
void av_videotoolbox_default_free(AVCodecContext *avctx);
#endif /* FF_API_VT_HWACCEL_CONTEXT */
/**
* @}
*/

@ -76,6 +76,16 @@ typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
typedef struct AVFilterChannelLayouts AVFilterChannelLayouts;
#if FF_API_PAD_COUNT
/**
* Get the number of elements in an AVFilter's inputs or outputs array.
*
* @deprecated Use avfilter_filter_pad_count() instead.
*/
attribute_deprecated
int avfilter_pad_count(const AVFilterPad *pads);
#endif
/**
* Get the name of an AVFilterPad.
*
@ -266,6 +276,19 @@ typedef struct AVFilter {
*/
int (*init)(AVFilterContext *ctx);
/**
* Should be set instead of @ref AVFilter.init "init" by the filters that
* want to pass a dictionary of AVOptions to nested contexts that are
* allocated during init.
*
* On return, the options dict should be freed and replaced with one that
* contains all the options which could not be processed by this filter (or
* with NULL if all the options were processed).
*
* Otherwise the semantics is the same as for @ref AVFilter.init "init".
*/
int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
/**
* Filter uninitialization function.
*
@ -290,20 +313,13 @@ typedef struct AVFilter {
* and outputs are fixed), shortly before the format negotiation. This
* callback may be called more than once.
*
* This callback must set ::AVFilterLink's
* @ref AVFilterFormatsConfig.formats "outcfg.formats"
* on every input link and
* @ref AVFilterFormatsConfig.formats "incfg.formats"
* on every output link to a list of pixel/sample formats that the filter
* supports on that link.
* For audio links, this filter must also set
* @ref AVFilterFormatsConfig.samplerates "incfg.samplerates"
* /
* @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates"
* and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts"
* /
* @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts"
* analogously.
* This callback must set AVFilterLink.outcfg.formats on every input link
* and AVFilterLink.incfg.formats on every output link to a list of
* pixel/sample formats that the filter supports on that link. For audio
* links, this filter must also set @ref AVFilterLink.incfg.samplerates
* "in_samplerates" / @ref AVFilterLink.outcfg.samplerates "out_samplerates"
* and @ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" /
* @ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously.
*
* This callback must never be NULL if the union is in this state.
*
@ -1108,317 +1124,6 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Parameters of a filter's input or output pad.
*
* Created as a child of AVFilterParams by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterPadParams {
/**
* An av_malloc()'ed string containing the pad label.
*
* May be av_free()'d and set to NULL by the caller, in which case this pad
* will be treated as unlabeled for linking.
* May also be replaced by another av_malloc()'ed string.
*/
char *label;
} AVFilterPadParams;
/**
* Parameters describing a filter to be created in a filtergraph.
*
* Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterParams {
/**
* The filter context.
*
* Created by avfilter_graph_segment_create_filters() based on
* AVFilterParams.filter_name and instance_name.
*
* Callers may also create the filter context manually, then they should
* av_free() filter_name and set it to NULL. Such AVFilterParams instances
* are then skipped by avfilter_graph_segment_create_filters().
*/
AVFilterContext *filter;
/**
* Name of the AVFilter to be used.
*
* An av_malloc()'ed string, set by avfilter_graph_segment_parse(). Will be
* passed to avfilter_get_by_name() by
* avfilter_graph_segment_create_filters().
*
* Callers may av_free() this string and replace it with another one or
* NULL. If the caller creates the filter instance manually, this string
* MUST be set to NULL.
*
* When both AVFilterParams.filter an AVFilterParams.filter_name are NULL,
* this AVFilterParams instance is skipped by avfilter_graph_segment_*()
* functions.
*/
char *filter_name;
/**
* Name to be used for this filter instance.
*
* An av_malloc()'ed string, may be set by avfilter_graph_segment_parse() or
* left NULL. The caller may av_free() this string and replace with another
* one or NULL.
*
* Will be used by avfilter_graph_segment_create_filters() - passed as the
* third argument to avfilter_graph_alloc_filter(), then freed and set to
* NULL.
*/
char *instance_name;
/**
* Options to be apllied to the filter.
*
* Filled by avfilter_graph_segment_parse(). Afterwards may be freely
* modified by the caller.
*
* Will be applied to the filter by avfilter_graph_segment_apply_opts()
* with an equivalent of av_opt_set_dict2(filter, &opts, AV_OPT_SEARCH_CHILDREN),
* i.e. any unapplied options will be left in this dictionary.
*/
AVDictionary *opts;
AVFilterPadParams **inputs;
unsigned nb_inputs;
AVFilterPadParams **outputs;
unsigned nb_outputs;
} AVFilterParams;
/**
* A filterchain is a list of filter specifications.
*
* Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterChain {
AVFilterParams **filters;
size_t nb_filters;
} AVFilterChain;
/**
* A parsed representation of a filtergraph segment.
*
* A filtergraph segment is conceptually a list of filterchains, with some
* supplementary information (e.g. format conversion flags).
*
* Created by avfilter_graph_segment_parse(). Must be freed with
* avfilter_graph_segment_free().
*/
typedef struct AVFilterGraphSegment {
/**
* The filtergraph this segment is associated with.
* Set by avfilter_graph_segment_parse().
*/
AVFilterGraph *graph;
/**
* A list of filter chain contained in this segment.
* Set in avfilter_graph_segment_parse().
*/
AVFilterChain **chains;
size_t nb_chains;
/**
* A string containing a colon-separated list of key=value options applied
* to all scale filters in this segment.
*
* May be set by avfilter_graph_segment_parse().
* The caller may free this string with av_free() and replace it with a
* different av_malloc()'ed string.
*/
char *scale_sws_opts;
} AVFilterGraphSegment;
/**
* Parse a textual filtergraph description into an intermediate form.
*
* This intermediate representation is intended to be modified by the caller as
* described in the documentation of AVFilterGraphSegment and its children, and
* then applied to the graph either manually or with other
* avfilter_graph_segment_*() functions. See the documentation for
* avfilter_graph_segment_apply() for the canonical way to apply
* AVFilterGraphSegment.
*
* @param graph Filter graph the parsed segment is associated with. Will only be
* used for logging and similar auxiliary purposes. The graph will
* not be actually modified by this function - the parsing results
* are instead stored in seg for further processing.
* @param graph_str a string describing the filtergraph segment
* @param flags reserved for future use, caller must set to 0 for now
* @param seg A pointer to the newly-created AVFilterGraphSegment is written
* here on success. The graph segment is owned by the caller and must
* be freed with avfilter_graph_segment_free() before graph itself is
* freed.
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*/
int avfilter_graph_segment_parse(AVFilterGraph *graph, const char *graph_str,
int flags, AVFilterGraphSegment **seg);
/**
* Create filters specified in a graph segment.
*
* Walk through the creation-pending AVFilterParams in the segment and create
* new filter instances for them.
* Creation-pending params are those where AVFilterParams.filter_name is
* non-NULL (and hence AVFilterParams.filter is NULL). All other AVFilterParams
* instances are ignored.
*
* For any filter created by this function, the corresponding
* AVFilterParams.filter is set to the newly-created filter context,
* AVFilterParams.filter_name and AVFilterParams.instance_name are freed and set
* to NULL.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all creation-pending filters were
* successfully created
* @retval AVERROR_FILTER_NOT_FOUND some filter's name did not correspond to a
* known filter
* @retval "another negative error code" other failures
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_create_filters(AVFilterGraphSegment *seg, int flags);
/**
* Apply parsed options to filter instances in a graph segment.
*
* Walk through all filter instances in the graph segment that have option
* dictionaries associated with them and apply those options with
* av_opt_set_dict2(..., AV_OPT_SEARCH_CHILDREN). AVFilterParams.opts is
* replaced by the dictionary output by av_opt_set_dict2(), which should be
* empty (NULL) if all options were successfully applied.
*
* If any options could not be found, this function will continue processing all
* other filters and finally return AVERROR_OPTION_NOT_FOUND (unless another
* error happens). The calling program may then deal with unapplied options as
* it wishes.
*
* Any creation-pending filters (see avfilter_graph_segment_create_filters())
* present in the segment will cause this function to fail. AVFilterParams with
* no associated filter context are simply skipped.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all options were successfully applied.
* @retval AVERROR_OPTION_NOT_FOUND some options were not found in a filter
* @retval "another negative error code" other failures
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_apply_opts(AVFilterGraphSegment *seg, int flags);
/**
* Initialize all filter instances in a graph segment.
*
* Walk through all filter instances in the graph segment and call
* avfilter_init_dict(..., NULL) on those that have not been initialized yet.
*
* Any creation-pending filters (see avfilter_graph_segment_create_filters())
* present in the segment will cause this function to fail. AVFilterParams with
* no associated filter context or whose filter context is already initialized,
* are simply skipped.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all filter instances were successfully
* initialized
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_init(AVFilterGraphSegment *seg, int flags);
/**
* Link filters in a graph segment.
*
* Walk through all filter instances in the graph segment and try to link all
* unlinked input and output pads. Any creation-pending filters (see
* avfilter_graph_segment_create_filters()) present in the segment will cause
* this function to fail. Disabled filters and already linked pads are skipped.
*
* Every filter output pad that has a corresponding AVFilterPadParams with a
* non-NULL label is
* - linked to the input with the matching label, if one exists;
* - exported in the outputs linked list otherwise, with the label preserved.
* Unlabeled outputs are
* - linked to the first unlinked unlabeled input in the next non-disabled
* filter in the chain, if one exists
* - exported in the ouputs linked list otherwise, with NULL label
*
* Similarly, unlinked input pads are exported in the inputs linked list.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
* @param[out] inputs a linked list of all free (unlinked) inputs of the
* filters in this graph segment will be returned here. It
* is to be freed by the caller using avfilter_inout_free().
* @param[out] outputs a linked list of all free (unlinked) outputs of the
* filters in this graph segment will be returned here. It
* is to be freed by the caller using avfilter_inout_free().
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_link(AVFilterGraphSegment *seg, int flags,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Apply all filter/link descriptions from a graph segment to the associated filtergraph.
*
* This functions is currently equivalent to calling the following in sequence:
* - avfilter_graph_segment_create_filters();
* - avfilter_graph_segment_apply_opts();
* - avfilter_graph_segment_init();
* - avfilter_graph_segment_link();
* failing if any of them fails. This list may be extended in the future.
*
* Since the above functions are idempotent, the caller may call some of them
* manually, then do some custom processing on the filtergraph, then call this
* function to do the rest.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
* @param[out] inputs passed to avfilter_graph_segment_link()
* @param[out] outputs passed to avfilter_graph_segment_link()
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_apply(AVFilterGraphSegment *seg, int flags,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Free the provided AVFilterGraphSegment and everything associated with it.
*
* @param seg double pointer to the AVFilterGraphSegment to be freed. NULL will
* be written to this pointer on exit from this function.
*
* @note
* The filter contexts (AVFilterParams.filter) are owned by AVFilterGraph rather
* than AVFilterGraphSegment, so they are not freed.
*/
void avfilter_graph_segment_free(AVFilterGraphSegment **seg);
/**
* Send a command to one or more filter instances.
*

@ -94,6 +94,42 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
#if FF_API_BUFFERSINK_ALLOC
/**
* Deprecated and unused struct to use for initializing a buffersink context.
*/
typedef struct AVBufferSinkParams {
const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE
} AVBufferSinkParams;
/**
* Create an AVBufferSinkParams structure.
*
* Must be freed with av_free().
*/
attribute_deprecated
AVBufferSinkParams *av_buffersink_params_alloc(void);
/**
* Deprecated and unused struct to use for initializing an abuffersink context.
*/
typedef struct AVABufferSinkParams {
const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1
const int *channel_counts; ///< list of allowed channel counts, terminated by -1
int all_channel_counts; ///< if not 0, accept any channel count or layout
int *sample_rates; ///< list of allowed sample rates, terminated by -1
} AVABufferSinkParams;
/**
* Create an AVABufferSinkParams structure.
*
* Must be freed with av_free().
*/
attribute_deprecated
AVABufferSinkParams *av_abuffersink_params_alloc(void);
#endif
/**
* Set the frame size for an audio buffer sink.
*

@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFILTER_VERSION_MINOR 3
#define LIBAVFILTER_VERSION_MINOR 44
#define LIBAVFILTER_VERSION_MICRO 100

@ -27,7 +27,7 @@
* Libavfilter version macros
*/
#define LIBAVFILTER_VERSION_MAJOR 9
#define LIBAVFILTER_VERSION_MAJOR 8
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -35,4 +35,8 @@
* the public API and may change, break or disappear at any time.
*/
#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9)
#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9)
#endif /* AVFILTER_VERSION_MAJOR_H */

@ -328,8 +328,10 @@
#endif
struct AVFormatContext;
struct AVStream;
struct AVDeviceInfoList;
struct AVDeviceCapabilitiesQuery;
/**
* @defgroup metadata_api Public Metadata API
@ -534,6 +536,114 @@ typedef struct AVOutputFormat {
const AVClass *priv_class; ///< AVClass for the private context
/*****************************************************************
* No fields below this line are part of the public API. They
* may not be used outside of libavformat and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/
/**
* size of private data so that it can be allocated in the wrapper
*/
int priv_data_size;
/**
* Internal flags. See FF_FMT_FLAG_* in internal.h.
*/
int flags_internal;
int (*write_header)(struct AVFormatContext *);
/**
* Write a packet. If AVFMT_ALLOW_FLUSH is set in flags,
* pkt can be NULL in order to flush data buffered in the muxer.
* When flushing, return 0 if there still is more data to flush,
* or 1 if everything was flushed and there is no more buffered
* data.
*/
int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
int (*write_trailer)(struct AVFormatContext *);
/**
* A format-specific function for interleavement.
* If unset, packets will be interleaved by dts.
*
* @param s An AVFormatContext for output. pkt will be added to
* resp. taken from its packet buffer.
* @param[in,out] pkt A packet to be interleaved if has_packet is set;
* also used to return packets. If no packet is returned
* (e.g. on error), pkt is blank on return.
* @param flush 1 if no further packets are available as input and
* all remaining packets should be output.
* @param has_packet If set, pkt contains a packet to be interleaved
* on input; otherwise pkt is blank on input.
* @return 1 if a packet was output, 0 if no packet could be output,
* < 0 if an error occurred
*/
int (*interleave_packet)(struct AVFormatContext *s, AVPacket *pkt,
int flush, int has_packet);
/**
* Test if the given codec can be stored in this container.
*
* @return 1 if the codec is supported, 0 if it is not.
* A negative number if unknown.
* MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC
*/
int (*query_codec)(enum AVCodecID id, int std_compliance);
void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
int64_t *dts, int64_t *wall);
/**
* Allows sending messages from application to device.
*/
int (*control_message)(struct AVFormatContext *s, int type,
void *data, size_t data_size);
/**
* Write an uncoded AVFrame.
*
* See av_write_uncoded_frame() for details.
*
* The library will free *frame afterwards, but the muxer can prevent it
* by setting the pointer to NULL.
*/
int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,
AVFrame **frame, unsigned flags);
/**
* Returns device list with it properties.
* @see avdevice_list_devices() for more details.
*/
int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
enum AVCodecID data_codec; /**< default data codec */
/**
* Initialize format. May allocate data here, and set any AVFormatContext or
* AVStream parameters that need to be set before packets are sent.
* This method must not write output.
*
* Return 0 if streams were fully configured, 1 if not, negative AVERROR on failure
*
* Any allocations made here must be freed in deinit().
*/
int (*init)(struct AVFormatContext *);
/**
* Deinitialize format. If present, this is called whenever the muxer is being
* destroyed, regardless of whether or not the header has been written.
*
* If a trailer is being written, this is called after write_trailer().
*
* This is called if init() fails as well.
*/
void (*deinit)(struct AVFormatContext *);
/**
* Set up any necessary bitstream filtering and extract any extra data needed
* for the global header.
*
* @note pkt might have been directly forwarded by a meta-muxer; therefore
* pkt->stream_index as well as the pkt's timebase might be invalid.
* Return 0 if more packets from this stream must be checked; 1 if not.
*/
int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st,
const AVPacket *pkt);
} AVOutputFormat;
/**
* @}
@ -838,10 +948,12 @@ const char *av_disposition_to_string(int disposition);
* sizeof(AVStream) must not be used outside libav*.
*/
typedef struct AVStream {
#if FF_API_AVSTREAM_CLASS
/**
* A class for @ref avoptions. Set on stream creation.
*/
const AVClass *av_class;
#endif
int index; /**< stream index in AVFormatContext */
/**
@ -851,17 +963,6 @@ typedef struct AVStream {
*/
int id;
/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;
void *priv_data;
/**
@ -997,6 +1098,17 @@ typedef struct AVStream {
*/
AVRational r_frame_rate;
/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;
/**
* Number of bits in timestamps. Used for wrapping control.
*
@ -1009,15 +1121,12 @@ typedef struct AVStream {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
#if FF_API_GET_END_PTS
/**
* Returns the pts of the last muxed packet + its duration
*
* the retuned value is undefined when used with a demuxer.
*/
attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
#define AV_PROGRAM_RUNNING 1
@ -1240,6 +1349,9 @@ typedef struct AVFormatContext {
*/
#define AVFMT_FLAG_BITEXACT 0x0400
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#if FF_API_LAVF_PRIV_OPT
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing)
#endif
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
@ -1663,15 +1775,10 @@ typedef struct AVFormatContext {
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url,
int flags, AVDictionary **options);
#if FF_API_AVFORMAT_IO_CLOSE
/**
* A callback for closing the streams opened with AVFormatContext.io_open().
*
* @deprecated use io_close2
*/
attribute_deprecated
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
#endif
/**
* ',' separated list of disallowed protocols.
@ -1788,8 +1895,8 @@ const AVOutputFormat *av_muxer_iterate(void **opaque);
/**
* Iterate over all registered demuxers.
*
* @param opaque a pointer where libavformat will store the iteration state.
* Must point to NULL to start the iteration.
* @param opaque a pointer where libavformat will store the iteration state. Must
* point to NULL to start the iteration.
*
* @return the next registered demuxer or NULL when the iteration is
* finished
@ -1853,7 +1960,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c);
* family of functions. The ownership of the data is transferred to
* st.
* @param size side information size
*
* @return zero on success, a negative AVERROR code on failure. On failure,
* the stream is unchanged and the data remains owned by the caller.
*/
@ -1866,7 +1972,6 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
* @param stream stream
* @param type desired side information type
* @param size side information size
*
* @return pointer to fresh allocated data or NULL otherwise
*/
uint8_t *av_stream_new_side_data(AVStream *stream,
@ -1878,7 +1983,6 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
* @param type desired side information type
* @param size If supplied, *size will be set to the size of the side data
* or to zero if the desired side data is not present.
*
* @return pointer to data if present or NULL otherwise
*/
uint8_t *av_stream_get_side_data(const AVStream *stream,
@ -1896,15 +2000,14 @@ AVProgram *av_new_program(AVFormatContext *s, int id);
* avformat_free_context() can be used to free the context and
* everything allocated by the framework within it.
*
* @param ctx pointee is set to the created format context,
* or to NULL in case of failure
* @param *ctx is set to the created format context, or to NULL in
* case of failure
* @param oformat format to use for allocating the context, if NULL
* format_name and filename are used instead
* @param format_name the name of output format to use for allocating the
* context, if NULL filename is used instead
* @param filename the name of the filename to use for allocating the
* context, may be NULL
*
* @return >= 0 in case of success, a negative AVERROR code in case of
* failure
*/
@ -1967,7 +2070,6 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd,
* @param logctx the log context
* @param offset the offset within the bytestream to probe from
* @param max_probe_size the maximum probe buffer size (zero for default)
*
* @return the score in case of success, a negative value corresponding to an
* the maximal score is AVPROBE_SCORE_MAX
* AVERROR code otherwise
@ -1987,19 +2089,16 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* Open an input stream and read the header. The codecs are not opened.
* The stream must be closed with avformat_close_input().
*
* @param ps Pointer to user-supplied AVFormatContext (allocated by
* avformat_alloc_context). May be a pointer to NULL, in
* which case an AVFormatContext is allocated by this
* @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
* May be a pointer to NULL, in which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed
* on failure.
* Note that a user-supplied AVFormatContext will be freed on failure.
* @param url URL of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
* Otherwise the format is autodetected.
* @param options A dictionary filled with AVFormatContext and demuxer-private
* options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
* @param options A dictionary filled with AVFormatContext and demuxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return 0 on success, a negative AVERROR on failure.
*
@ -2038,7 +2137,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
* @param last the last found program, the search will start after this
* program, or from the beginning if it is NULL
* @param s stream index
*
* @return the next program which belongs to s, NULL if no program is found or
* the last program is not among the programs of ic.
*/
@ -2063,12 +2161,10 @@ void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
* @param decoder_ret if non-NULL, returns the decoder for the
* selected stream
* @param flags flags; none are currently defined
*
* @return the non-negative stream number in case of success,
* AVERROR_STREAM_NOT_FOUND if no stream with the requested type
* could be found,
* AVERROR_DECODER_NOT_FOUND if streams were found but no decoder
*
* @note If av_find_best_stream returns successfully and decoder_ret is not
* NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
*/
@ -2113,13 +2209,12 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt);
* 'timestamp' in 'stream_index'.
*
* @param s media file handle
* @param stream_index If stream_index is (-1), a default stream is selected,
* and timestamp is automatically converted from
* AV_TIME_BASE units to the stream specific time_base.
* @param timestamp Timestamp in AVStream.time_base units or, if no stream
* is specified, in AV_TIME_BASE units.
* @param stream_index If stream_index is (-1), a default
* stream is selected, and timestamp is automatically converted
* from AV_TIME_BASE units to the stream specific time_base.
* @param timestamp Timestamp in AVStream.time_base units
* or, if no stream is specified, in AV_TIME_BASE units.
* @param flags flags which select direction and seeking mode
*
* @return >= 0 on success
*/
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
@ -2210,22 +2305,16 @@ void avformat_close_input(AVFormatContext **s);
* Allocate the stream private data and write the stream header to
* an output media file.
*
* @param s Media file handle, must be allocated with
* avformat_alloc_context().
* Its \ref AVFormatContext.oformat "oformat" field must be set
* to the desired output format;
* Its \ref AVFormatContext.pb "pb" field must be set to an
* already opened ::AVIOContext.
* @param options An ::AVDictionary filled with AVFormatContext and
* muxer-private options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
* @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec had not already been
* fully initialized in avformat_init_output().
* @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec had already been fully
* initialized in avformat_init_output().
* @retval AVERROR A negative AVERROR on failure.
* @param s Media file handle, must be allocated with avformat_alloc_context().
* Its oformat field must be set to the desired output format;
* Its pb field must be set to an already opened AVIOContext.
* @param options An AVDictionary filled with AVFormatContext and muxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init,
* AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init,
* negative AVERROR on failure.
*
* @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_init_output.
*/
@ -2234,26 +2323,20 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options);
/**
* Allocate the stream private data and initialize the codec, but do not write the header.
* May optionally be used before avformat_write_header() to initialize stream parameters
* May optionally be used before avformat_write_header to initialize stream parameters
* before actually writing the header.
* If using this function, do not pass the same options to avformat_write_header().
*
* @param s Media file handle, must be allocated with
* avformat_alloc_context().
* Its \ref AVFormatContext.oformat "oformat" field must be set
* to the desired output format;
* Its \ref AVFormatContext.pb "pb" field must be set to an
* already opened ::AVIOContext.
* @param options An ::AVDictionary filled with AVFormatContext and
* muxer-private options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
* @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec requires
* avformat_write_header to fully initialize.
* @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec has been fully
* initialized.
* @retval AVERROR Anegative AVERROR on failure.
* If using this function, do not pass the same options to avformat_write_header.
*
* @param s Media file handle, must be allocated with avformat_alloc_context().
* Its oformat field must be set to the desired output format;
* Its pb field must be set to an already opened AVIOContext.
* @param options An AVDictionary filled with AVFormatContext and muxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize,
* AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized,
* negative AVERROR on failure.
*
* @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header.
*/
@ -2426,10 +2509,8 @@ enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
* time_base units
* @param[out] wall absolute time when that packet whas output,
* in microsecond
* @retval 0 Success
* @retval AVERROR(ENOSYS) The format does not support it
*
* @note Some formats or devices may not allow to measure dts and wall
* @return 0 if OK, AVERROR(ENOSYS) if the format does not support it
* Note: some formats or devices may not allow to measure dts and wall
* atomically.
*/
int av_get_output_timestamp(struct AVFormatContext *s, int stream,
@ -2572,7 +2653,7 @@ const AVIndexEntry *avformat_index_get_entry(AVStream *st, int idx);
* Get the AVIndexEntry corresponding to the given timestamp.
*
* @param st Stream containing the requested AVIndexEntry.
* @param wanted_timestamp Timestamp to retrieve the index entry for.
* @param timestamp Timestamp to retrieve the index entry for.
* @param flags If AVSEEK_FLAG_BACKWARD then the returned entry will correspond
* to the timestamp which is <= the requested one, if backward
* is 0, then it will be >=

@ -101,13 +101,9 @@ typedef struct AVIODirEntry {
int64_t filemode; /**< Unix file mode, -1 if unknown. */
} AVIODirEntry;
#if FF_API_AVIODIRCONTEXT
typedef struct AVIODirContext {
struct URLContext *url_context;
} AVIODirContext;
#else
typedef struct AVIODirContext AVIODirContext;
#endif
/**
* Different data types that can be returned via the AVIO
@ -295,6 +291,16 @@ typedef struct AVIOContext {
*/
int ignore_boundary_point;
#if FF_API_AVIOCONTEXT_WRITTEN
/**
* @deprecated field utilized privately by libavformat. For a public
* statistic of how many bytes were written out, see
* AVIOContext::bytes_written.
*/
attribute_deprecated
int64_t written;
#endif
/**
* Maximum reached position before a backward seek in the write buffer,
* used keeping track of already written data for a later flush.
@ -458,7 +464,6 @@ int avio_put_str16be(AVIOContext *s, const char *str);
*
* Zero-length ranges are omitted from the output.
*
* @param s the AVIOContext
* @param time the stream time the current bytestream pos corresponds to
* (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not
* applicable

@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 3
#define LIBAVFORMAT_VERSION_MINOR 27
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

@ -29,7 +29,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 60
#define LIBAVFORMAT_VERSION_MAJOR 59
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -41,10 +41,11 @@
* at once through the bump. This improves the git bisect-ability of the change.
*
*/
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
#define FF_API_R_FRAME_RATE 1

@ -42,9 +42,6 @@ struct AVAES *av_aes_alloc(void);
/**
* Initialize an AVAES context.
*
* @param a The AVAES context
* @param key Pointer to the key
* @param key_bits 128, 192 or 256
* @param decrypt 0 for encryption, 1 for decryption
*/
@ -52,11 +49,9 @@ int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
/**
* Encrypt or decrypt a buffer using a previously initialized context.
*
* @param a The AVAES context
* @param count number of 16 byte blocks
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 16 byte blocks
* @param iv initialization vector for CBC mode, if NULL then ECB will be used
* @param decrypt 0 for encryption, 1 for decryption
*/

@ -22,12 +22,6 @@
#ifndef AVUTIL_AES_CTR_H
#define AVUTIL_AES_CTR_H
/**
* @defgroup lavu_aes_ctr AES-CTR
* @ingroup lavu_crypto
* @{
*/
#include <stdint.h>
#include "attributes.h"
@ -44,23 +38,17 @@ struct AVAESCTR *av_aes_ctr_alloc(void);
/**
* Initialize an AVAESCTR context.
*
* @param a The AVAESCTR context to initialize
* @param key encryption key, must have a length of AES_CTR_KEY_SIZE
*/
int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key);
/**
* Release an AVAESCTR context.
*
* @param a The AVAESCTR context
*/
void av_aes_ctr_free(struct AVAESCTR *a);
/**
* Process a buffer using a previously initialized context.
*
* @param a The AVAESCTR context
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param size the size of src and dst

@ -1,72 +0,0 @@
/*
* Copyright (c) 2023 Jan Ekström <jeebjp@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
#define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
#include <stddef.h>
#include "frame.h"
#include "rational.h"
/**
* Ambient viewing environment metadata as defined by H.274. The values are
* saved in AVRationals so that they keep their exactness, while allowing for
* easy access to a double value with f.ex. av_q2d.
*
* @note sizeof(AVAmbientViewingEnvironment) is not part of the public ABI, and
* it must be allocated using av_ambient_viewing_environment_alloc.
*/
typedef struct AVAmbientViewingEnvironment {
/**
* Environmental illuminance of the ambient viewing environment in lux.
*/
AVRational ambient_illuminance;
/**
* Normalized x chromaticity coordinate of the environmental ambient light
* in the nominal viewing environment according to the CIE 1931 definition
* of x and y as specified in ISO/CIE 11664-1.
*/
AVRational ambient_light_x;
/**
* Normalized y chromaticity coordinate of the environmental ambient light
* in the nominal viewing environment according to the CIE 1931 definition
* of x and y as specified in ISO/CIE 11664-1.
*/
AVRational ambient_light_y;
} AVAmbientViewingEnvironment;
/**
* Allocate an AVAmbientViewingEnvironment structure.
*
* @return the newly allocated struct or NULL on failure
*/
AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t *size);
/**
* Allocate and add an AVAmbientViewingEnvironment structure to an existing
* AVFrame as side data.
*
* @return the newly allocated struct, or NULL on failure
*/
AVAmbientViewingEnvironment *av_ambient_viewing_environment_create_side_data(AVFrame *frame);
#endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */

@ -135,7 +135,6 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_forma
/**
* Get the count of continuous non zero chars starting from the beginning.
*
* @param s the string whose length to count
* @param len maximum number of characters to check in the string, that
* is the maximum value which is returned by the function
*/
@ -157,6 +156,15 @@ static inline size_t av_strnlen(const char *s, size_t len)
*/
char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2);
#if FF_API_D2STR
/**
* Convert a number to an av_malloced string.
* @deprecated use av_asprintf() with "%f" or a more specific format
*/
attribute_deprecated
char *av_d2str(double d);
#endif
/**
* Unescape the given string until a non escaped terminating char,
* and return the token corresponding to the unescaped string.

@ -18,12 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* @ingroup lavu_avbprint
* AVBPrint public header
*/
#ifndef AVUTIL_BPRINT_H
#define AVUTIL_BPRINT_H
@ -32,14 +26,6 @@
#include "attributes.h"
#include "avstring.h"
/**
* @defgroup lavu_avbprint AVBPrint
* @ingroup lavu_data
*
* A buffer to print data progressively
* @{
*/
/**
* Define a structure with extra padding to a fixed size
* This helps ensuring binary compatibility with future versions.
@ -62,14 +48,14 @@ typedef struct name { \
* Small buffers are kept in the structure itself, and thus require no
* memory allocation at all (unless the contents of the buffer is needed
* after the structure goes out of scope). This is almost as lightweight as
* declaring a local `char buf[512]`.
* declaring a local "char buf[512]".
*
* The length of the string can go beyond the allocated size: the buffer is
* then truncated, but the functions still keep account of the actual total
* length.
*
* In other words, AVBPrint.len can be greater than AVBPrint.size and records
* the total length of what would have been to the buffer if there had been
* In other words, buf->len can be greater than buf->size and records the
* total length of what would have been to the buffer if there had been
* enough memory.
*
* Append operations do not need to be tested for failure: if a memory
@ -77,14 +63,17 @@ typedef struct name { \
* is still updated. This situation can be tested with
* av_bprint_is_complete().
*
* The AVBPrint.size_max field determines several possible behaviours:
* - `size_max = -1` (= `UINT_MAX`) or any large value will let the buffer be
* The size_max field determines several possible behaviours:
*
* size_max = -1 (= UINT_MAX) or any large value will let the buffer be
* reallocated as necessary, with an amortized linear cost.
* - `size_max = 0` prevents writing anything to the buffer: only the total
*
* size_max = 0 prevents writing anything to the buffer: only the total
* length is computed. The write operations can then possibly be repeated in
* a buffer with exactly the necessary size
* (using `size_init = size_max = len + 1`).
* - `size_max = 1` is automatically replaced by the exact size available in the
* (using size_init = size_max = len + 1).
*
* size_max = 1 is automatically replaced by the exact size available in the
* structure itself, thus ensuring no dynamic memory allocation. The
* internal buffer is large enough to hold a reasonable paragraph of text,
* such as the current paragraph.
@ -99,31 +88,12 @@ FF_PAD_STRUCTURE(AVBPrint, 1024,
)
/**
* @name Max size special values
* Convenience macros for special values for av_bprint_init() size_max
* parameter.
* @{
*/
/**
* Buffer will be reallocated as necessary, with an amortized linear cost.
*/
#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
/**
* Use the exact size available in the AVBPrint structure itself.
*
* Thus ensuring no dynamic memory allocation. The internal buffer is large
* enough to hold a reasonable paragraph of text, such as the current paragraph.
*/
#define AV_BPRINT_SIZE_AUTOMATIC 1
/**
* Do not write anything to the buffer, only calculate the total length.
*
* The write operations can then possibly be repeated in a buffer with
* exactly the necessary size (using `size_init = size_max = AVBPrint.len + 1`).
*/
#define AV_BPRINT_SIZE_COUNT_ONLY 0
/** @} */
/**
* Init a print buffer.
@ -131,12 +101,12 @@ FF_PAD_STRUCTURE(AVBPrint, 1024,
* @param buf buffer to init
* @param size_init initial size (including the final 0)
* @param size_max maximum size;
* - `0` means do not write anything, just count the length
* - `1` is replaced by the maximum value for automatic storage
* 0 means do not write anything, just count the length;
* 1 is replaced by the maximum value for automatic storage;
* any large value means that the internal buffer will be
* reallocated as needed up to that limit
* - `-1` is converted to `UINT_MAX`, the largest limit possible.
* Check also `AV_BPRINT_SIZE_*` macros.
* reallocated as needed up to that limit; -1 is converted to
* UINT_MAX, the largest limit possible.
* Check also AV_BPRINT_SIZE_* macros.
*/
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
@ -246,6 +216,4 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str);
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars,
enum AVEscapeMode mode, int flags);
/** @} */
#endif /* AVUTIL_BPRINT_H */

@ -40,8 +40,6 @@
# include "arm/bswap.h"
#elif ARCH_AVR32
# include "avr32/bswap.h"
#elif ARCH_RISCV
# include "riscv/bswap.h"
#elif ARCH_SH4
# include "sh4/bswap.h"
#elif ARCH_X86

@ -59,7 +59,7 @@ int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 16 byte blocks
* @param iv initialization vector for CBC mode, NULL for ECB mode
* @paran iv initialization vector for CBC mode, NULL for ECB mode
* @param decrypt 0 for encryption, 1 for decryption
*/
void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);

@ -30,17 +30,11 @@
/**
* @file
* @ingroup lavu_audio_channels
* Public libavutil channel layout APIs header.
* audio channel layout utility functions
*/
/**
* @defgroup lavu_audio_channels Audio channels
* @ingroup lavu_audio
*
* Audio channel layout utility functions
*
* @addtogroup lavu_audio
* @{
*/
@ -90,9 +84,9 @@ enum AVChannel {
* Range of channels between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END represent Ambisonic components using the ACN system.
*
* Given a channel id `<i>` between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel `<n>` is
* `<n> = <i> - AV_CHAN_AMBISONIC_BASE`.
* Given a channel id <i> between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel <n> is
* <n> = <i> - AV_CHAN_AMBISONIC_BASE.
*
* @note these values are only used for AV_CHANNEL_ORDER_CUSTOM channel
* orderings, the AV_CHANNEL_ORDER_AMBISONIC ordering orders the channels
@ -232,9 +226,7 @@ enum AVChannelOrder {
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_TOP_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
@ -274,11 +266,8 @@ typedef struct AVChannelCustom {
* A channel layout here is defined as a set of channels ordered in a specific
* way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an
* AVChannelLayout carries only the channel count).
* All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by
* ignoring everything but the channel count, as long as av_channel_layout_check()
* considers they are valid.
*
* Unlike most structures in FFmpeg, sizeof(AVChannelLayout) is a part of the
* Unlike most structures in Libav, sizeof(AVChannelLayout) is a part of the
* public ABI and may be used by the caller. E.g. it may be allocated on stack
* or embedded in caller-defined structs.
*
@ -361,10 +350,6 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_MASK(nb, m) \
{ .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }}
/**
* @name Common pre-defined channel layouts
* @{
*/
#define AV_CHANNEL_LAYOUT_MONO AV_CHANNEL_LAYOUT_MASK(1, AV_CH_LAYOUT_MONO)
#define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO)
#define AV_CHANNEL_LAYOUT_2POINT1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2POINT1)
@ -390,24 +375,16 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_TOP_BACK)
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
#define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \
{ .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}
/** @} */
struct AVBPrint;
#if FF_API_OLD_CHANNEL_LAYOUT
/**
* @name Deprecated Functions
* @{
*/
/**
* Return a channel layout id that matches name, or 0 if no match is found.
*
@ -452,8 +429,6 @@ int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, i
*
* @param buf put here the string containing the channel layout
* @param buf_size size in bytes of the buffer
* @param nb_channels number of channels
* @param channel_layout channel layout bitset
* @deprecated use av_channel_layout_describe()
*/
attribute_deprecated
@ -484,7 +459,6 @@ int64_t av_get_default_channel_layout(int nb_channels);
/**
* Get the index of a channel in channel_layout.
*
* @param channel_layout channel layout bitset
* @param channel a channel layout describing exactly one channel which must be
* present in channel_layout.
*
@ -537,9 +511,6 @@ const char *av_get_channel_description(uint64_t channel);
attribute_deprecated
int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
const char **name);
/**
* @}
*/
#endif
/**
@ -548,7 +519,6 @@ int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
*
* @param buf pre-allocated buffer where to put the generated string
* @param buf_size size in bytes of the buffer.
* @param channel the AVChannel whose name to get
* @return amount of bytes needed to hold the output string, or a negative AVERROR
* on failure. If the returned value is bigger than buf_size, then the
* string was truncated.
@ -567,7 +537,6 @@ void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
*
* @param buf pre-allocated buffer where to put the generated string
* @param buf_size size in bytes of the buffer.
* @param channel the AVChannel whose description to get
* @return amount of bytes needed to hold the output string, or a negative AVERROR
* on failure. If the returned value is bigger than buf_size, then the
* string was truncated.
@ -624,7 +593,7 @@ int av_channel_layout_from_string(AVChannelLayout *channel_layout,
/**
* Get the default channel layout for a given number of channels.
*
* @param ch_layout the layout structure to be initialized
* @param channel_layout the layout structure to be initialized
* @param nb_channels number of channels
*/
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels);
@ -689,7 +658,6 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout,
* Get the channel with the given index in a channel layout.
*
* @param channel_layout input channel layout
* @param idx index of the channel
* @return channel with the index idx in channel_layout on success or
* AV_CHAN_NONE on failure (if idx is not valid or the channel order is
* unspecified)
@ -702,7 +670,6 @@ av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsi
* channels are found, only the first match will be returned.
*
* @param channel_layout input channel layout
* @param channel the channel whose index to obtain
* @return index of channel in channel_layout on success or a negative number if
* channel is not present in channel_layout.
*/
@ -717,7 +684,6 @@ int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout,
* @ref av_channel_from_string().
*
* @param channel_layout input channel layout
* @param name string describing the channel whose index to obtain
* @return a channel index described by the given string, or a negative AVERROR
* value.
*/
@ -731,7 +697,6 @@ int av_channel_layout_index_from_string(const AVChannelLayout *channel_layout,
* @ref av_channel_from_string().
*
* @param channel_layout input channel layout
* @param name string describing the channel to obtain
* @return a channel described by the given string in channel_layout on success
* or AV_CHAN_NONE on failure (if the string is not valid or the channel
* order is unspecified)
@ -777,6 +742,7 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout);
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1);
/**
* @}
* @}
*/

@ -78,16 +78,6 @@
#define AV_CPU_FLAG_LSX (1 << 0)
#define AV_CPU_FLAG_LASX (1 << 1)
// RISC-V extensions
#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank)
#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP)
#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP)
#define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */
#define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */
#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
/**
* Return the flags which specify extensions supported by the CPU.
* The returned value is affected by av_force_cpu_flags() if that was used

@ -84,10 +84,7 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id);
/**
* Calculate the CRC of a block.
* @param ctx initialized AVCRC array (see av_crc_init())
* @param crc CRC of previous blocks if any or initial value for CRC
* @param buffer buffer whose CRC to calculate
* @param length length of the buffer
* @return CRC updated with the data from the given block
*
* @see av_crc_init() "le" parameter

@ -1,8 +1,5 @@
/*
* Copyright (c) 2015 Kevin Wheatley <kevin.j.wheatley@gmail.com>
* Copyright (c) 2016 Ronald S. Bultje <rsbultje@gmail.com>
* Copyright (c) 2023 Leo Izen <leo.izen@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@ -27,15 +24,9 @@
#include "rational.h"
/**
* @file
* Colorspace value utility functions for libavutil.
* @ingroup lavu_math_csp
* @file Colorspace value utility functions for libavutil.
* @author Ronald S. Bultje <rsbultje@gmail.com>
* @author Leo Izen <leo.izen@gmail.com>
* @author Kevin Wheatley <kevin.j.wheatley@gmail.com>
*/
/**
* @defgroup lavu_math_csp Colorspace Utility
* @ingroup lavu_math
* @{
@ -80,12 +71,6 @@ typedef struct AVColorPrimariesDesc {
AVPrimaryCoefficients prim;
} AVColorPrimariesDesc;
/**
* Function pointer representing a double -> double transfer function that performs
* an EOTF transfer inversion. This function outputs linear light.
*/
typedef double (*av_csp_trc_function)(double);
/**
* Retrieves the Luma coefficients necessary to construct a conversion matrix
* from an enum constant describing the colorspace.
@ -114,35 +99,6 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
*/
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
/**
* Determine a suitable 'gamma' value to match the supplied
* AVColorTransferCharacteristic.
*
* See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html)
*
* This function returns the gamma exponent for the OETF. For example, sRGB is approximated
* by gamma 2.2, not by gamma 0.45455.
*
* @return Will return an approximation to the simple gamma function matching
* the supplied Transfer Characteristic, Will return 0.0 for any
* we cannot reasonably match against.
*/
double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
/**
* Determine the function needed to apply the given
* AVColorTransferCharacteristic to linear input.
*
* The function returned should expect a nominal domain and range of [0.0-1.0]
* values outside of this range maybe valid depending on the chosen
* characteristic function.
*
* @return Will return pointer to the function matching the
* supplied Transfer Characteristic. If unspecified will
* return NULL:
*/
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
/**
* @}
*/

@ -43,8 +43,6 @@ AVDES *av_des_alloc(void);
/**
* @brief Initializes an AVDES context.
*
* @param d pointer to a AVDES structure to initialize
* @param key pointer to the key to use
* @param key_bits must be 64 or 192
* @param decrypt 0 for encryption/CBC-MAC, 1 for decryption
* @return zero on success, negative value otherwise
@ -54,10 +52,9 @@ int av_des_init(struct AVDES *d, const uint8_t *key, int key_bits, int decrypt);
/**
* @brief Encrypts / decrypts using the DES algorithm.
*
* @param d pointer to the AVDES structure
* @param count number of 8 byte blocks
* @param dst destination array, can be equal to src, must be 8-byte aligned
* @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
* @param count number of 8 byte blocks
* @param iv initialization vector for CBC mode, if NULL then ECB will be used,
* must be 8-byte aligned
* @param decrypt 0 for encryption, 1 for decryption
@ -67,10 +64,9 @@ void av_des_crypt(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count,
/**
* @brief Calculates CBC-MAC using the DES algorithm.
*
* @param d pointer to the AVDES structure
* @param count number of 8 byte blocks
* @param dst destination array, can be equal to src, must be 8-byte aligned
* @param src source array, can be equal to dst, must be 8-byte aligned, may be NULL
* @param count number of 8 byte blocks
*/
void av_des_mac(struct AVDES *d, uint8_t *dst, const uint8_t *src, int count);

@ -93,7 +93,6 @@ av_get_detection_bbox(const AVDetectionBBoxHeader *header, unsigned int idx)
* AVDetectionBBox, and initializes the variables.
* Can be freed with a normal av_free() call.
*
* @param nb_bboxes number of AVDetectionBBox structures to allocate
* @param out_size if non-NULL, the size in bytes of the resulting data array is
* written here.
*/

@ -39,15 +39,13 @@
* @brief Simple key:value store
*
* @{
* Dictionaries are used for storing key-value pairs.
*
* - To **create an AVDictionary**, simply pass an address of a NULL
* pointer to av_dict_set(). NULL can be used as an empty dictionary
* wherever a pointer to an AVDictionary is required.
* - To **insert an entry**, use av_dict_set().
* - Use av_dict_get() to **retrieve an entry**.
* - To **iterate over all entries**, use av_dict_iterate().
* - In order to **free the dictionary and all its contents**, use av_dict_free().
* Dictionaries are used for storing key:value pairs. To create
* an AVDictionary, simply pass an address of a NULL pointer to
* av_dict_set(). NULL can be used as an empty dictionary wherever
* a pointer to an AVDictionary is required.
* Use av_dict_get() to retrieve an entry or iterate over all
* entries and finally av_dict_free() to free the dictionary
* and all its contents.
*
@code
AVDictionary *d = NULL; // "create" an empty dictionary
@ -59,18 +57,13 @@
char *v = av_strdup("value"); // you can avoid copying them like this
av_dict_set(&d, k, v, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL);
while ((t = av_dict_iterate(d, t))) {
while (t = av_dict_get(d, "", t, AV_DICT_IGNORE_SUFFIX)) {
<....> // iterate over all entries in d
}
av_dict_free(&d);
@endcode
*/
/**
* @name AVDictionary Flags
* Flags that influence behavior of the matching of keys or insertion to the dictionary.
* @{
*/
#define AV_DICT_MATCH_CASE 1 /**< Only get an entry with exact-case key match. Only relevant in av_dict_get(). */
#define AV_DICT_IGNORE_SUFFIX 2 /**< Return first entry in a dictionary whose first part corresponds to the search key,
ignoring the suffix of the found key string. Only relevant in av_dict_get(). */
@ -78,13 +71,10 @@
allocated with av_malloc() or another memory allocation function. */
#define AV_DICT_DONT_STRDUP_VAL 8 /**< Take ownership of a value that's been
allocated with av_malloc() or another memory allocation function. */
#define AV_DICT_DONT_OVERWRITE 16 /**< Don't overwrite existing entries. */
#define AV_DICT_DONT_OVERWRITE 16 ///< Don't overwrite existing entries.
#define AV_DICT_APPEND 32 /**< If the entry already exists, append to it. Note that no
delimiter is added, the strings are simply concatenated. */
#define AV_DICT_MULTIKEY 64 /**< Allow to store several equal keys in the dictionary */
/**
* @}
*/
typedef struct AVDictionaryEntry {
char *key;
@ -99,44 +89,18 @@ typedef struct AVDictionary AVDictionary;
* The returned entry key or value must not be changed, or it will
* cause undefined behavior.
*
* To iterate through all the dictionary entries, you can set the matching key
* to the null string "" and set the AV_DICT_IGNORE_SUFFIX flag.
*
* @param prev Set to the previous matching element to find the next.
* If set to NULL the first matching element is returned.
* @param key Matching key
* @param flags A collection of AV_DICT_* flags controlling how the
* entry is retrieved
*
* @return Found entry or NULL in case no matching entry was found in the dictionary
* @param key matching key
* @param flags a collection of AV_DICT_* flags controlling how the entry is retrieved
* @return found entry or NULL in case no matching entry was found in the dictionary
*/
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
const AVDictionaryEntry *prev, int flags);
/**
* Iterate over a dictionary
*
* Iterates through all entries in the dictionary.
*
* @warning The returned AVDictionaryEntry key/value must not be changed.
*
* @warning As av_dict_set() invalidates all previous entries returned
* by this function, it must not be called while iterating over the dict.
*
* Typical usage:
* @code
* const AVDictionaryEntry *e = NULL;
* while ((e = av_dict_iterate(m, e))) {
* // ...
* }
* @endcode
*
* @param m The dictionary to iterate over
* @param prev Pointer to the previous AVDictionaryEntry, NULL initially
*
* @retval AVDictionaryEntry* The next element in the dictionary
* @retval NULL No more elements in the dictionary
*/
const AVDictionaryEntry *av_dict_iterate(const AVDictionary *m,
const AVDictionaryEntry *prev);
/**
* Get number of entries in dictionary.
*
@ -151,24 +115,23 @@ int av_dict_count(const AVDictionary *m);
* Note: If AV_DICT_DONT_STRDUP_KEY or AV_DICT_DONT_STRDUP_VAL is set,
* these arguments will be freed on error.
*
* @warning Adding a new entry to a dictionary invalidates all existing entries
* previously returned with av_dict_get() or av_dict_iterate().
* Warning: Adding a new entry to a dictionary invalidates all existing entries
* previously returned with av_dict_get.
*
* @param pm Pointer to a pointer to a dictionary struct. If *pm is NULL
* @param pm pointer to a pointer to a dictionary struct. If *pm is NULL
* a dictionary struct is allocated and put in *pm.
* @param key Entry key to add to *pm (will either be av_strduped or added as a new key depending on flags)
* @param value Entry value to add to *pm (will be av_strduped or added as a new key depending on flags).
* @param key entry key to add to *pm (will either be av_strduped or added as a new key depending on flags)
* @param value entry value to add to *pm (will be av_strduped or added as a new key depending on flags).
* Passing a NULL value will cause an existing entry to be deleted.
*
* @return >= 0 on success otherwise an error code <0
*/
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
/**
* Convenience wrapper for av_dict_set() that converts the value to a string
* Convenience wrapper for av_dict_set that converts the value to a string
* and stores it.
*
* Note: If ::AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error.
* Note: If AV_DICT_DONT_STRDUP_KEY is set, key will be freed on error.
*/
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
@ -178,15 +141,14 @@ int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags
* In case of failure, all the successfully set entries are stored in
* *pm. You may need to manually free the created dictionary.
*
* @param key_val_sep A 0-terminated list of characters used to separate
* @param key_val_sep a 0-terminated list of characters used to separate
* key from value
* @param pairs_sep A 0-terminated list of characters used to separate
* @param pairs_sep a 0-terminated list of characters used to separate
* two pairs from each other
* @param flags Flags to use when adding to the dictionary.
* ::AV_DICT_DONT_STRDUP_KEY and ::AV_DICT_DONT_STRDUP_VAL
* @param flags flags to use when adding to dictionary.
* AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL
* are ignored since the key/value tokens will always
* be duplicated.
*
* @return 0 on success, negative AVERROR code on failure
*/
int av_dict_parse_string(AVDictionary **pm, const char *str,
@ -195,14 +157,11 @@ int av_dict_parse_string(AVDictionary **pm, const char *str,
/**
* Copy entries from one AVDictionary struct into another.
*
* @note Metadata is read using the ::AV_DICT_IGNORE_SUFFIX flag
*
* @param dst Pointer to a pointer to a AVDictionary struct to copy into. If *dst is NULL,
* @param dst pointer to a pointer to a AVDictionary struct. If *dst is NULL,
* this function will allocate a struct for you and put it in *dst
* @param src Pointer to the source AVDictionary struct to copy items from.
* @param flags Flags to use when setting entries in *dst
*
* @param src pointer to source AVDictionary struct
* @param flags flags to use when setting entries in *dst
* @note metadata is read using the AV_DICT_IGNORE_SUFFIX flag
* @return 0 on success, negative AVERROR code on failure. If dst was allocated
* by this function, callers should free the associated memory.
*/
@ -221,15 +180,13 @@ void av_dict_free(AVDictionary **m);
* Such string may be passed back to av_dict_parse_string().
* @note String is escaped with backslashes ('\').
*
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
*
* @param[in] m The dictionary
* @param[in] m dictionary
* @param[out] buffer Pointer to buffer that will be allocated with string containg entries.
* Buffer must be freed by the caller when is no longer needed.
* @param[in] key_val_sep Character used to separate key from value
* @param[in] pairs_sep Character used to separate two pairs from each other
*
* @param[in] key_val_sep character used to separate key from value
* @param[in] pairs_sep character used to separate two pairs from each other
* @return >= 0 on success, negative on error
* @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same.
*/
int av_dict_get_string(const AVDictionary *m, char **buffer,
const char key_val_sep, const char pairs_sep);

@ -20,7 +20,6 @@
/**
* @file
* @ingroup lavu_video_display
* Display matrix
*/
@ -30,9 +29,15 @@
#include <stdint.h>
/**
* @defgroup lavu_video_display Display transformation matrix functions
* @ingroup lavu_video
* @addtogroup lavu_video
* @{
*
* @defgroup lavu_video_display Display transformation matrix functions
* @{
*/
/**
* @addtogroup lavu_video_display
* The display transformation matrix specifies an affine transformation that
* should be applied to video frames for correct presentation. It is compatible
* with the matrices stored in the ISO/IEC 14496-12 container format.
@ -66,8 +71,6 @@
* q' = (b * p + d * q + y) / z;
* z = u * p + v * q + w
* @endcode
*
* @{
*/
/**
@ -87,7 +90,7 @@ double av_display_rotation_get(const int32_t matrix[9]);
* Initialize a transformation matrix describing a pure clockwise
* rotation by the specified angle (in degrees).
*
* @param[out] matrix a transformation matrix (will be fully overwritten
* @param matrix an allocated transformation matrix (will be fully overwritten
* by this function)
* @param angle rotation angle in degrees.
*/
@ -96,13 +99,14 @@ void av_display_rotation_set(int32_t matrix[9], double angle);
/**
* Flip the input matrix horizontally and/or vertically.
*
* @param[in,out] matrix a transformation matrix
* @param matrix an allocated transformation matrix
* @param hflip whether the matrix should be flipped horizontally
* @param vflip whether the matrix should be flipped vertically
*/
void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip);
/**
* @}
* @}
*/

@ -42,7 +42,6 @@ typedef struct AVExpr AVExpr;
* @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
* @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
* @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
* @param log_offset log level offset, can be used to silence error messages
* @param log_ctx parent logging context
* @return >= 0 in case of success, a negative value corresponding to an
* AVERROR code otherwise
@ -66,7 +65,6 @@ int av_expr_parse_and_eval(double *res, const char *s,
* @param funcs1 NULL terminated array of function pointers for functions which take 1 argument
* @param func2_names NULL terminated array of zero terminated strings of funcs2 identifiers
* @param funcs2 NULL terminated array of function pointers for functions which take 2 arguments
* @param log_offset log level offset, can be used to silence error messages
* @param log_ctx parent logging context
* @return >= 0 in case of success, a negative value corresponding to an
* AVERROR code otherwise
@ -80,7 +78,6 @@ int av_expr_parse(AVExpr **expr, const char *s,
/**
* Evaluate a previously parsed expression.
*
* @param e the AVExpr to evaluate
* @param const_values a zero terminated array of values for the identifiers from av_expr_parse() const_names
* @param opaque a pointer which will be passed to all functions from funcs1 and funcs2
* @return the value of the expression
@ -90,7 +87,6 @@ double av_expr_eval(AVExpr *e, const double *const_values, void *opaque);
/**
* Track the presence of variables and their number of occurrences in a parsed expression
*
* @param e the AVExpr to track variables in
* @param counter a zero-initialized array where the count of each variable will be stored
* @param size size of array
* @return 0 on success, a negative value indicates that no expression or array was passed
@ -102,7 +98,6 @@ int av_expr_count_vars(AVExpr *e, unsigned *counter, int size);
* Track the presence of user provided functions and their number of occurrences
* in a parsed expression.
*
* @param e the AVExpr to track user provided functions in
* @param counter a zero-initialized array where the count of each function will be stored
* if you passed 5 functions with 2 arguments to av_expr_parse()
* then for arg=2 this will use upto 5 entries.

@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
#define FFMPEG_VERSION "6.0"
#define FFMPEG_VERSION "5.1.1"
#endif /* AVUTIL_FFVERSION_H */

@ -18,8 +18,7 @@
/**
* @file
* @ingroup lavu_fifo
* A generic FIFO API
* a very simple circular buffer FIFO implementation
*/
#ifndef AVUTIL_FIFO_H
@ -31,14 +30,6 @@
#include "attributes.h"
#include "version.h"
/**
* @defgroup lavu_fifo AVFifo
* @ingroup lavu_data
*
* @{
* A generic FIFO API
*/
typedef struct AVFifo AVFifo;
/**
@ -97,13 +88,7 @@ void av_fifo_auto_grow_limit(AVFifo *f, size_t max_elems);
size_t av_fifo_can_read(const AVFifo *f);
/**
* @return Number of elements that can be written into the given FIFO without
* growing it.
*
* In other words, this number of elements or less is guaranteed to fit
* into the FIFO. More data may be written when the
* AV_FIFO_FLAG_AUTO_GROW flag was specified at FIFO creation, but this
* may involve memory allocation, which can fail.
* @return number of elements that can be written into the given FIFO.
*/
size_t av_fifo_can_write(const AVFifo *f);
@ -124,12 +109,9 @@ int av_fifo_grow2(AVFifo *f, size_t inc);
/**
* Write data into a FIFO.
*
* In case nb_elems > av_fifo_can_write(f) and the AV_FIFO_FLAG_AUTO_GROW flag
* was not specified at FIFO creation, nothing is written and an error
* In case nb_elems > av_fifo_can_write(f), nothing is written and an error
* is returned.
*
* Calling function is guaranteed to succeed if nb_elems <= av_fifo_can_write(f).
*
* @param f the FIFO buffer
* @param buf Data to be written. nb_elems * av_fifo_elem_size(f) bytes will be
* read from buf on success.
@ -441,8 +423,4 @@ static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs)
#endif
#endif
/**
* @}
*/
#endif /* AVUTIL_FIFO_H */

@ -22,7 +22,6 @@
#include <stddef.h>
#include <stdint.h>
#include "version.h"
#include "attributes.h"
/**
@ -39,9 +38,6 @@
* case *bufptr will be set to NULL and *size will be set to 0.
* The returned buffer must be released with av_file_unmap().
*
* @param filename path to the file
* @param[out] bufptr pointee is set to the mapped or allocated buffer
* @param[out] size pointee is set to the size in bytes of the buffer
* @param log_offset loglevel offset used for logging
* @param log_ctx context used for logging
* @return a non negative number in case of success, a negative value
@ -54,13 +50,11 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
/**
* Unmap or free the buffer bufptr created by av_file_map().
*
* @param bufptr the buffer previously created with av_file_map()
* @param size size in bytes of bufptr, must be the same as returned
* by av_file_map()
*/
void av_file_unmap(uint8_t *bufptr, size_t size);
#if FF_API_AV_FOPEN_UTF8
/**
* Wrapper to work around the lack of mkstemp() on mingw.
* Also, tries to create file in /tmp first, if possible.
@ -73,8 +67,6 @@ void av_file_unmap(uint8_t *bufptr, size_t size);
* libraries and could interfere with the calling application.
* @deprecated as fd numbers cannot be passed saftely between libs on some platforms
*/
attribute_deprecated
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
#endif
#endif /* AVUTIL_FILE_H */

@ -209,11 +209,6 @@ enum AVFrameSideDataType {
* volume transform - CUVA 005.1-2021.
*/
AV_FRAME_DATA_DYNAMIC_HDR_VIVID,
/**
* Ambient viewing environment metadata, as defined by H.274.
*/
AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT,
};
enum AVActiveFormatDescription {
@ -451,18 +446,14 @@ typedef struct AVFrame {
*/
AVRational time_base;
#if FF_API_FRAME_PICTURE_NUMBER
/**
* picture number in bitstream order
*/
attribute_deprecated
int coded_picture_number;
/**
* picture number in display order
*/
attribute_deprecated
int display_picture_number;
#endif
/**
* quality (between 1 (good) and FF_LAMBDA_MAX (bad))
@ -495,7 +486,6 @@ typedef struct AVFrame {
*/
int palette_has_changed;
#if FF_API_REORDERED_OPAQUE
/**
* reordered opaque 64 bits (generally an integer or a double precision float
* PTS but can be anything).
@ -503,12 +493,8 @@ typedef struct AVFrame {
* that time,
* the decoder reorders values as needed and sets AVFrame.reordered_opaque
* to exactly one of the values provided by the user through AVCodecContext.reordered_opaque
*
* @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead
*/
attribute_deprecated
int64_t reordered_opaque;
#endif
/**
* Sample rate of the audio data.
@ -618,18 +604,13 @@ typedef struct AVFrame {
*/
int64_t pkt_pos;
#if FF_API_PKT_DURATION
/**
* duration of the corresponding packet, expressed in
* AVStream->time_base units, 0 if unknown.
* - encoding: unused
* - decoding: Read by user.
*
* @deprecated use duration instead
*/
attribute_deprecated
int64_t pkt_duration;
#endif
/**
* metadata.
@ -721,14 +702,18 @@ typedef struct AVFrame {
* Channel layout of the audio data.
*/
AVChannelLayout ch_layout;
/**
* Duration of the frame, in the same units as pts. 0 if unknown.
*/
int64_t duration;
} AVFrame;
#if FF_API_COLORSPACE_NAME
/**
* Get the name of a colorspace.
* @return a static string identifying the colorspace; can be NULL.
* @deprecated use av_color_space_name()
*/
attribute_deprecated
const char *av_get_colorspace_name(enum AVColorSpace val);
#endif
/**
* Allocate an AVFrame and set its fields to default values. The resulting
* struct must be freed using av_frame_free().
@ -833,8 +818,7 @@ int av_frame_is_writable(AVFrame *frame);
* Ensure that the frame data is writable, avoiding data copy if possible.
*
* Do nothing if the frame is writable, allocate new buffers and copy the data
* if it is not. Non-refcounted frames behave as non-writable, i.e. a copy
* is always made.
* if it is not.
*
* @return 0 on success, a negative AVERROR on error.
*
@ -869,7 +853,6 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
/**
* Get the buffer reference a given data plane is stored in.
*
* @param frame the frame to get the plane's buffer from
* @param plane index of the data plane of interest in frame->extended_data.
*
* @return the buffer reference that contains the plane or NULL if the input

@ -249,7 +249,7 @@ const char *av_hwdevice_get_type_name(enum AVHWDeviceType type);
/**
* Iterate over supported device types.
*
* @param prev AV_HWDEVICE_TYPE_NONE initially, then the previous type
* @param type AV_HWDEVICE_TYPE_NONE initially, then the previous type
* returned by this function in subsequent iterations.
* @return The next usable device type from enum AVHWDeviceType, or
* AV_HWDEVICE_TYPE_NONE if there are no more.
@ -591,7 +591,6 @@ int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags);
*
* @param derived_frame_ctx On success, a reference to the newly created
* AVHWFramesContext.
* @param format The AVPixelFormat for the derived context.
* @param derived_device_ctx A reference to the device to create the new
* AVHWFramesContext on.
* @param source_frame_ctx A reference to an existing AVHWFramesContext

@ -31,31 +31,6 @@ typedef struct AVMediaCodecDeviceContext {
* This is the default surface used by decoders on this device.
*/
void *surface;
/**
* Pointer to ANativeWindow.
*
* It both surface and native_window is NULL, try to create it
* automatically if create_window is true and OS support
* createPersistentInputSurface.
*
* It can be used as output surface for decoder and input surface for
* encoder.
*/
void *native_window;
/**
* Enable createPersistentInputSurface automatically.
*
* Disabled by default.
*
* It can be enabled by setting this flag directly, or by setting
* AVDictionary of av_hwdevice_ctx_create(), with "create_window" as key.
* The second method is useful for ffmpeg cmdline, e.g., we can enable it
* via:
* -init_hw_device mediacodec=mediacodec,create_window=1
*/
int create_window;
} AVMediaCodecDeviceContext;
#endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */

@ -19,7 +19,7 @@
#ifndef AVUTIL_HWCONTEXT_QSV_H
#define AVUTIL_HWCONTEXT_QSV_H
#include <mfxvideo.h>
#include <mfx/mfxvideo.h>
/**
* @file
@ -34,17 +34,6 @@
*/
typedef struct AVQSVDeviceContext {
mfxSession session;
/**
* The mfxLoader handle used for mfxSession creation
*
* This field is only available for oneVPL user. For non-oneVPL user, this
* field must be set to NULL.
*
* Filled by the user before calling av_hwdevice_ctx_init() and should be
* cast to mfxLoader handle. Deallocating the AVHWDeviceContext will always
* release this interface.
*/
void *loader;
} AVQSVDeviceContext;
/**

@ -23,7 +23,6 @@
#include <VideoToolbox/VideoToolbox.h>
#include "frame.h"
#include "pixfmt.h"
/**

@ -48,7 +48,6 @@
* component in the plane with the max pixel step.
* @param max_pixstep_comps an array which is filled with the component
* for each plane which has the max pixel step. May be NULL.
* @param pixdesc the AVPixFmtDescriptor for the image, describing its format
*/
void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
const AVPixFmtDescriptor *pixdesc);
@ -66,8 +65,6 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane);
* width width.
*
* @param linesizes array to be filled with the linesize for each plane
* @param pix_fmt the AVPixelFormat of the image
* @param width width of the image in pixels
* @return >= 0 in case of success, a negative error code otherwise
*/
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width);
@ -76,8 +73,6 @@ int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int wi
* Fill plane sizes for an image with pixel format pix_fmt and height height.
*
* @param size the array to be filled with the size of each image plane
* @param pix_fmt the AVPixelFormat of the image
* @param height height of the image in pixels
* @param linesizes the array containing the linesize for each
* plane, should be filled by av_image_fill_linesizes()
* @return >= 0 in case of success, a negative error code otherwise
@ -93,8 +88,6 @@ int av_image_fill_plane_sizes(size_t size[4], enum AVPixelFormat pix_fmt,
* height height.
*
* @param data pointers array to be filled with the pointer for each image plane
* @param pix_fmt the AVPixelFormat of the image
* @param height height of the image in pixels
* @param ptr the pointer to a buffer which will contain the image
* @param linesizes the array containing the linesize for each
* plane, should be filled by av_image_fill_linesizes()
@ -110,11 +103,6 @@ int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int hei
* The allocated image buffer has to be freed by using
* av_freep(&pointers[0]).
*
* @param pointers array to be filled with the pointer for each image plane
* @param linesizes the array filled with the linesize for each plane
* @param w width of the image in pixels
* @param h height of the image in pixels
* @param pix_fmt the AVPixelFormat of the image
* @param align the value to use for buffer size alignment
* @return the size in bytes required for the image buffer, a negative
* error code in case of failure
@ -131,11 +119,8 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
* bytewidth must be contained by both absolute values of dst_linesize
* and src_linesize, otherwise the function behavior is undefined.
*
* @param dst destination plane to copy to
* @param dst_linesize linesize for the image plane in dst
* @param src source plane to copy from
* @param src_linesize linesize for the image plane in src
* @param height height (number of lines) of the plane
*/
void av_image_copy_plane(uint8_t *dst, int dst_linesize,
const uint8_t *src, int src_linesize,
@ -162,13 +147,8 @@ void av_image_copy_plane_uc_from(uint8_t *dst, ptrdiff_t dst_linesize,
/**
* Copy image in src_data to dst_data.
*
* @param dst_data destination image data buffer to copy to
* @param dst_linesizes linesizes for the image in dst_data
* @param src_data source image data buffer to copy from
* @param src_linesizes linesizes for the image in src_data
* @param pix_fmt the AVPixelFormat of the image
* @param width width of the image in pixels
* @param height height of the image in pixels
*/
void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
const uint8_t *src_data[4], const int src_linesizes[4],

@ -27,7 +27,7 @@
/**
* Context structure for the Lagged Fibonacci PRNG.
* The exact layout, types and content of this struct may change and should
* not be accessed directly. Only its `sizeof()` is guaranteed to stay the same
* not be accessed directly. Only its sizeof() is guranteed to stay the same
* to allow easy instanciation.
*/
typedef struct AVLFG {
@ -40,7 +40,7 @@ void av_lfg_init(AVLFG *c, unsigned int seed);
/**
* Seed the state of the ALFG using binary data.
*
* @return 0 on success, negative value (AVERROR) on failure.
* Return value: 0 on success, negative value (AVERROR) on failure.
*/
int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int length);
@ -73,7 +73,6 @@ static inline unsigned int av_mlfg_get(AVLFG *c){
* Get the next two numbers generated by a Box-Muller Gaussian
* generator using the random numbers issued by lfg.
*
* @param lfg pointer to the contex structure
* @param out array where the two generated numbers are placed
*/
void av_bmg_get(AVLFG *lfg, double out[2]);

@ -111,8 +111,7 @@ enum AVRounding {
/**
* Compute the greatest common divisor of two integer operands.
*
* @param a Operand
* @param b Operand
* @param a,b Operands
* @return GCD of a and b up to sign; if a >= 0 and b >= 0, return value is >= 0;
* if a == 0 and b == 0, returns 0.
*/
@ -187,8 +186,7 @@ int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
* av_compare_mod(0x11, 0x02, 0x20) > 0 // since 0x11 % 0x20 (0x11) > 0x02 % 0x20 (0x02)
* @endcode
*
* @param a Operand
* @param b Operand
* @param a,b Operands
* @param mod Divisor; must be a power of 2
* @return
* - a negative value if `a % mod < b % mod`

@ -51,6 +51,86 @@
* @{
*/
#if FF_API_DECLARE_ALIGNED
/**
*
* @defgroup lavu_mem_macros Alignment Macros
* Helper macros for declaring aligned variables.
* @{
*/
/**
* @def DECLARE_ALIGNED(n,t,v)
* Declare a variable that is aligned in memory.
*
* @code{.c}
* DECLARE_ALIGNED(16, uint16_t, aligned_int) = 42;
* DECLARE_ALIGNED(32, uint8_t, aligned_array)[128];
*
* // The default-alignment equivalent would be
* uint16_t aligned_int = 42;
* uint8_t aligned_array[128];
* @endcode
*
* @param n Minimum alignment in bytes
* @param t Type of the variable (or array element)
* @param v Name of the variable
*/
/**
* @def DECLARE_ASM_ALIGNED(n,t,v)
* Declare an aligned variable appropriate for use in inline assembly code.
*
* @code{.c}
* DECLARE_ASM_ALIGNED(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
* @endcode
*
* @param n Minimum alignment in bytes
* @param t Type of the variable (or array element)
* @param v Name of the variable
*/
/**
* @def DECLARE_ASM_CONST(n,t,v)
* Declare a static constant aligned variable appropriate for use in inline
* assembly code.
*
* @code{.c}
* DECLARE_ASM_CONST(16, uint64_t, pw_08) = UINT64_C(0x0008000800080008);
* @endcode
*
* @param n Minimum alignment in bytes
* @param t Type of the variable (or array element)
* @param v Name of the variable
*/
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER < 1110 || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) const t __attribute__ ((aligned (n))) v
#elif defined(__DJGPP__)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (FFMIN(n, 16)))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (FFMIN(n, 16)))) v
#elif defined(__GNUC__) || defined(__clang__)
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
#define DECLARE_ASM_ALIGNED(n,t,v) t av_used __attribute__ ((aligned (n))) v
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
#elif defined(_MSC_VER)
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_ALIGNED(n,t,v) __declspec(align(n)) t v
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
#else
#define DECLARE_ALIGNED(n,t,v) t v
#define DECLARE_ASM_ALIGNED(n,t,v) t v
#define DECLARE_ASM_CONST(n,t,v) static const t v
#endif
/**
* @}
*/
#endif
/**
* @defgroup lavu_mem_attrs Function Attributes
* Function attributes applicable to memory handling functions.
@ -159,6 +239,14 @@ av_alloc_size(1, 2) void *av_malloc_array(size_t nmemb, size_t size);
*/
void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2);
#if FF_API_AV_MALLOCZ_ARRAY
/**
* @deprecated use av_calloc()
*/
attribute_deprecated
void *av_mallocz_array(size_t nmemb, size_t size) av_malloc_attrib av_alloc_size(1, 2);
#endif
/**
* Allocate, reallocate, or free a block of memory.
*
@ -579,8 +667,7 @@ void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
/**
* Multiply two `size_t` values checking for overflow.
*
* @param[in] a Operand of multiplication
* @param[in] b Operand of multiplication
* @param[in] a,b Operands of multiplication
* @param[out] r Pointer to the result of the operation
* @return 0 on success, AVERROR(EINVAL) on overflow
*/

@ -79,8 +79,6 @@ int av_parse_video_rate(AVRational *rate, const char *str);
/**
* Put the RGBA values that correspond to color_string in rgba_color.
*
* @param rgba_color 4-elements array of uint8_t values, where the respective
* red, green, blue and alpha component values are written.
* @param color_string a string specifying a color. It can be the name of
* a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence,
* possibly followed by "@" and a string representing the alpha
@ -94,8 +92,6 @@ int av_parse_video_rate(AVRational *rate, const char *str);
* @param slen length of the initial part of color_string containing the
* color. It can be set to -1 if color_string is a null terminated string
* containing nothing else than the color.
* @param log_ctx a pointer to an arbitrary struct of which the first field
* is a pointer to an AVClass struct (used for av_log()). Can be NULL.
* @return >= 0 in case of success, a negative value in case of
* failure (for example if color_string cannot be parsed).
*/
@ -110,7 +106,7 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
* av_parse_color().
*
* @param color_idx index of the requested color, starting from 0
* @param rgb if not NULL, will point to a 3-elements array with the color value in RGB
* @param rgbp if not NULL, will point to a 3-elements array with the color value in RGB
* @return the color name string or NULL if color_idx is not in the array
*/
const char *av_get_known_color_name(int color_idx, const uint8_t **rgb);
@ -166,19 +162,19 @@ int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info
* by the standard strptime().
*
* The supported input field descriptors are listed below.
* - `%%H`: the hour as a decimal number, using a 24-hour clock, in the
* - %H: the hour as a decimal number, using a 24-hour clock, in the
* range '00' through '23'
* - `%%J`: hours as a decimal number, in the range '0' through INT_MAX
* - `%%M`: the minute as a decimal number, using a 24-hour clock, in the
* - %J: hours as a decimal number, in the range '0' through INT_MAX
* - %M: the minute as a decimal number, using a 24-hour clock, in the
* range '00' through '59'
* - `%%S`: the second as a decimal number, using a 24-hour clock, in the
* - %S: the second as a decimal number, using a 24-hour clock, in the
* range '00' through '59'
* - `%%Y`: the year as a decimal number, using the Gregorian calendar
* - `%%m`: the month as a decimal number, in the range '1' through '12'
* - `%%d`: the day of the month as a decimal number, in the range '1'
* - %Y: the year as a decimal number, using the Gregorian calendar
* - %m: the month as a decimal number, in the range '1' through '12'
* - %d: the day of the month as a decimal number, in the range '1'
* through '31'
* - `%%T`: alias for `%%H:%%M:%%S`
* - `%%`: a literal `%`
* - %T: alias for '%H:%M:%S'
* - %%: a literal '%'
*
* @return a pointer to the first character not processed in this function
* call. In case the input string contains more characters than

@ -264,28 +264,6 @@ const char *av_chroma_location_name(enum AVChromaLocation location);
*/
int av_chroma_location_from_name(const char *name);
/**
* Converts AVChromaLocation to swscale x/y chroma position.
*
* The positions represent the chroma (0,0) position in a coordinates system
* with luma (0,0) representing the origin and luma(1,1) representing 256,256
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
*/
int av_chroma_location_enum_to_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
/**
* Converts swscale x/y chroma position to AVChromaLocation.
*
* The positions represent the chroma (0,0) position in a coordinates system
* with luma (0,0) representing the origin and luma(1,1) representing 256,256
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
*/
enum AVChromaLocation av_chroma_location_pos_to_enum(int xpos, int ypos);
/**
* Return the pixel format corresponding to name.
*
@ -385,9 +363,6 @@ enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt);
#define FF_LOSS_ALPHA 0x0008 /**< loss of alpha bits */
#define FF_LOSS_COLORQUANT 0x0010 /**< loss due to color quantization */
#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */
#define FF_LOSS_EXCESS_RESOLUTION 0x0040 /**< loss due to unneeded extra resolution */
#define FF_LOSS_EXCESS_DEPTH 0x0080 /**< loss due to unneeded extra color depth */
/**
* Compute what kind of losses will occur when converting from one specific

@ -208,34 +208,6 @@ enum AVPixelFormat {
/**
* HW acceleration through QSV, data[3] contains a pointer to the
* mfxFrameSurface1 structure.
*
* Before FFmpeg 5.0:
* mfxFrameSurface1.Data.MemId contains a pointer when importing
* the following frames as QSV frames:
*
* VAAPI:
* mfxFrameSurface1.Data.MemId contains a pointer to VASurfaceID
*
* DXVA2:
* mfxFrameSurface1.Data.MemId contains a pointer to IDirect3DSurface9
*
* FFmpeg 5.0 and above:
* mfxFrameSurface1.Data.MemId contains a pointer to the mfxHDLPair
* structure when importing the following frames as QSV frames:
*
* VAAPI:
* mfxHDLPair.first contains a VASurfaceID pointer.
* mfxHDLPair.second is always MFX_INFINITE.
*
* DXVA2:
* mfxHDLPair.first contains IDirect3DSurface9 pointer.
* mfxHDLPair.second is always MFX_INFINITE.
*
* D3D11:
* mfxHDLPair.first contains a ID3D11Texture2D pointer.
* mfxHDLPair.second contains the texture array index of the frame if the
* ID3D11Texture2D is an array texture, or always MFX_INFINITE if it is a
* normal texture.
*/
AV_PIX_FMT_QSV,
/**
@ -395,31 +367,6 @@ enum AVPixelFormat {
AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4, 32bpp, VUYAVUYA...
AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian
AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian
AV_PIX_FMT_Y212BE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian
AV_PIX_FMT_Y212LE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian
AV_PIX_FMT_XV30BE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined
AV_PIX_FMT_XV30LE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined
AV_PIX_FMT_XV36BE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined
AV_PIX_FMT_XV36LE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined
AV_PIX_FMT_RGBF32BE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian
AV_PIX_FMT_RGBF32LE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian
AV_PIX_FMT_RGBAF32BE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
AV_PIX_FMT_RGBAF32LE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
};
@ -506,13 +453,9 @@ enum AVPixelFormat {
#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE)
#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
@ -521,11 +464,6 @@ enum AVPixelFormat {
#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
/**
* Chromaticity coordinates of the source primaries.
* These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273.

@ -179,8 +179,7 @@ AVRational av_d2q(double d, int max) av_const;
* Find which of the two rationals is closer to another rational.
*
* @param q Rational to be compared against
* @param q1 Rational to be tested
* @param q2 Rational to be tested
* @param q1,q2 Rationals to be tested
* @return One of the following values:
* - 1 if `q1` is nearer to `q` than `q2`
* - -1 if `q2` is nearer to `q` than `q1`

@ -42,8 +42,6 @@ AVRC4 *av_rc4_alloc(void);
/**
* @brief Initializes an AVRC4 context.
*
* @param d pointer to the AVRC4 context
* @param key buffer containig the key
* @param key_bits must be a multiple of 8
* @param decrypt 0 for encryption, 1 for decryption, currently has no effect
* @return zero on success, negative value otherwise
@ -53,7 +51,6 @@ int av_rc4_init(struct AVRC4 *d, const uint8_t *key, int key_bits, int decrypt);
/**
* @brief Encrypts / decrypts using the RC4 algorithm.
*
* @param d pointer to the AVRC4 context
* @param count number of bytes
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst, may be NULL

@ -213,7 +213,6 @@ int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
* @param[out] linesize aligned size for audio buffer(s), may be NULL
* @param nb_channels number of audio channels
* @param nb_samples number of samples per channel
* @param sample_fmt the sample format
* @param align buffer size alignment (0 = default, 1 = no alignment)
* @return >=0 on success or a negative error code on failure
* @todo return the size of the allocated buffer in case of success at the next bump

@ -20,7 +20,6 @@
/**
* @file
* @ingroup lavu_video_spherical
* Spherical video
*/
@ -31,14 +30,19 @@
#include <stdint.h>
/**
* @defgroup lavu_video_spherical Spherical video mapping
* @ingroup lavu_video
* @addtogroup lavu_video
* @{
*
* @defgroup lavu_video_spherical Spherical video mapping
* @{
*/
/**
* @addtogroup lavu_video_spherical
* A spherical video file contains surfaces that need to be mapped onto a
* sphere. Depending on how the frame was converted, a different distortion
* transformation or surface recomposition function needs to be applied before
* the video should be mapped and displayed.
* @{
*/
/**
@ -221,6 +225,7 @@ const char *av_spherical_projection_name(enum AVSphericalProjection projection);
*/
int av_spherical_from_name(const char *name);
/**
* @}
* @}
*/

@ -20,7 +20,6 @@
/**
* @file
* @ingroup lavu_video_stereo3d
* Stereoscopic video
*/
@ -32,15 +31,19 @@
#include "frame.h"
/**
* @defgroup lavu_video_stereo3d Stereo3D types and functions
* @ingroup lavu_video
* @addtogroup lavu_video
* @{
*
* @defgroup lavu_video_stereo3d Stereo3D types and functions
* @{
*/
/**
* @addtogroup lavu_video_stereo3d
* A stereoscopic video file consists in multiple views embedded in a single
* frame, usually describing two views of a scene. This file describes all
* possible codec-independent view arrangements.
*
* @{
*/
* */
/**
* List of possible 3D Types
@ -223,6 +226,7 @@ const char *av_stereo3d_type_name(unsigned int type);
int av_stereo3d_from_name(const char *name);
/**
* @}
* @}
*/

@ -59,7 +59,7 @@ int av_twofish_init(struct AVTWOFISH *ctx, const uint8_t *key, int key_bits);
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 16 byte blocks
* @param iv initialization vector for CBC mode, NULL for ECB mode
* @paran iv initialization vector for CBC mode, NULL for ECB mode
* @param decrypt 0 for encryption, 1 for decryption
*/
void av_twofish_crypt(struct AVTWOFISH *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);

@ -75,9 +75,7 @@ enum AVTXType {
* the double variant, it's a 'double'. If scale is NULL, 1.0 will be used
* as a default.
*
* For forward transforms (R2C), stride must be the spacing between two
* samples in bytes. For inverse transforms, the stride must be set
* to the spacing between two complex values in bytes.
* The stride parameter must be set to the size of a single sample in bytes.
*
* The forward transform performs a real-to-complex DFT of N samples to
* N/2+1 complex values.
@ -91,20 +89,6 @@ enum AVTXType {
AV_TX_DOUBLE_RDFT = 7,
AV_TX_INT32_RDFT = 8,
/**
* Real to real (DCT) transforms.
*
* The forward transform is a DCT-II.
* The inverse transform is a DCT-III.
*
* The input array is always overwritten. DCT-III requires that the
* input be padded with 2 extra samples. Stride must be set to the
* spacing between two samples in bytes.
*/
AV_TX_FLOAT_DCT = 9,
AV_TX_DOUBLE_DCT = 10,
AV_TX_INT32_DCT = 11,
/* Not part of the API, do not use */
AV_TX_NB,
};
@ -131,8 +115,9 @@ typedef void (*av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride);
*/
enum AVTXFlags {
/**
* Allows for in-place transformations, where input == output.
* May be unsupported or slower for some transform types.
* Performs an in-place transformation on the input. The output argument
* of av_tn_fn() MUST match the input. May be unsupported or slower for some
* transform types.
*/
AV_TX_INPLACE = 1ULL << 0,

@ -106,6 +106,7 @@ int av_uuid_parse_range(const char *in_start, const char *in_end, AVUUID uu);
*
* @param[in] uu AVUUID
* @param[out] out Pointer to an array of no less than 37 characters.
* @return A non-zero value in case of an error.
*/
void av_uuid_unparse(const AVUUID uu, char *out);

@ -78,8 +78,8 @@
* @{
*/
#define LIBAVUTIL_VERSION_MAJOR 58
#define LIBAVUTIL_VERSION_MINOR 2
#define LIBAVUTIL_VERSION_MAJOR 57
#define LIBAVUTIL_VERSION_MINOR 28
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
@ -105,14 +105,15 @@
* @{
*/
#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_REORDERED_OPAQUE (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_FIFO_PEEK2 (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_FIFO_OLD_API (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_XVMC (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_OLD_CHANNEL_LAYOUT (LIBAVUTIL_VERSION_MAJOR < 58)
#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 58)
/**
* @}

@ -73,7 +73,7 @@
*
* Once all values have been set, it must be initialized with swr_init(). If
* you need to change the conversion parameters, you can change the parameters
* using @ref avoptions, as described above in the first example; or by using
* using @ref AVOptions, as described above in the first example; or by using
* swr_alloc_set_opts2(), but with the first argument the allocated context.
* You must then call swr_init() again.
*
@ -286,8 +286,8 @@ struct SwrContext *swr_alloc_set_opts(struct SwrContext *s,
* On error, the Swr context is freed and *ps set to NULL.
*/
int swr_alloc_set_opts2(struct SwrContext **ps,
const AVChannelLayout *out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
const AVChannelLayout *in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
AVChannelLayout *out_ch_layout, enum AVSampleFormat out_sample_fmt, int out_sample_rate,
AVChannelLayout *in_ch_layout, enum AVSampleFormat in_sample_fmt, int in_sample_rate,
int log_offset, void *log_ctx);
/**
* @}
@ -354,8 +354,8 @@ int swr_convert(struct SwrContext *s, uint8_t **out, int out_count,
* in this case the output timestamps will match output sample numbers.
* See ffmpeg-resampler(1) for the two modes of compensation.
*
* @param[in] s initialized Swr context
* @param[in] pts timestamp for the next input sample, INT64_MIN if unknown
* @param s[in] initialized Swr context
* @param pts[in] timestamp for the next input sample, INT64_MIN if unknown
* @see swr_set_compensation(), swr_drop_output(), and swr_inject_silence() are
* function used internally for timestamp compensation.
* @return the output timestamp for the next output sample
@ -636,8 +636,8 @@ int swr_convert_frame(SwrContext *swr,
* @see swr_close();
*
* @param swr audio resample context
* @param out output AVFrame
* @param in input AVFrame
* @param output output AVFrame
* @param input input AVFrame
* @return 0 on success, AVERROR on failure.
*/
int swr_config_frame(SwrContext *swr, const AVFrame *out, const AVFrame *in);

@ -30,7 +30,7 @@
#include "version_major.h"
#define LIBSWRESAMPLE_VERSION_MINOR 10
#define LIBSWRESAMPLE_VERSION_MINOR 7
#define LIBSWRESAMPLE_VERSION_MICRO 100
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \

@ -234,7 +234,6 @@ int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[],
* - sws_receive_slice(0, dst->height)
* - sws_frame_end()
*
* @param c The scaling context
* @param dst The destination frame. See documentation for sws_frame_start() for
* more details.
* @param src The source frame.
@ -250,7 +249,6 @@ int sws_scale_frame(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
* This function will retain references to src and dst, so they must both use
* refcounted buffers (if allocated by the caller, in case of dst).
*
* @param c The scaling context
* @param dst The destination frame.
*
* The data buffers may either be already allocated by the caller or
@ -275,8 +273,6 @@ int sws_frame_start(struct SwsContext *c, AVFrame *dst, const AVFrame *src);
* submitted with sws_frame_start(). Must be called after all sws_send_slice()
* and sws_receive_slice() calls are done, before any new sws_frame_start()
* calls.
*
* @param c The scaling context
*/
void sws_frame_end(struct SwsContext *c);
@ -286,7 +282,6 @@ void sws_frame_end(struct SwsContext *c);
* any order, but may not overlap. For vertically subsampled pixel formats, the
* slices must be aligned according to subsampling.
*
* @param c The scaling context
* @param slice_start first row of the slice
* @param slice_height number of rows in the slice
*
@ -299,7 +294,6 @@ int sws_send_slice(struct SwsContext *c, unsigned int slice_start,
* Request a horizontal slice of the output data to be written into the frame
* previously provided to sws_frame_start().
*
* @param c The scaling context
* @param slice_start first row of the slice; must be a multiple of
* sws_receive_slice_alignment()
* @param slice_height number of rows in the slice; must be a multiple of
@ -316,9 +310,6 @@ int sws_receive_slice(struct SwsContext *c, unsigned int slice_start,
unsigned int slice_height);
/**
* Get the alignment required for slices
*
* @param c The scaling context
* @return alignment required for output slices requested with sws_receive_slice().
* Slice offsets and sizes passed to sws_receive_slice() must be
* multiples of the value returned from this function.
@ -326,7 +317,6 @@ int sws_receive_slice(struct SwsContext *c, unsigned int slice_start,
unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
/**
* @param c the scaling context
* @param dstRange flag indicating the while-black range of the output (1=jpeg / 0=mpeg)
* @param srcRange flag indicating the while-black range of the input (1=jpeg / 0=mpeg)
* @param table the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x]
@ -334,17 +324,22 @@ unsigned int sws_receive_slice_alignment(const struct SwsContext *c);
* @param brightness 16.16 fixed point brightness correction
* @param contrast 16.16 fixed point contrast correction
* @param saturation 16.16 fixed point saturation correction
*
* @return A negative error code on error, non negative otherwise.
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
#if LIBSWSCALE_VERSION_MAJOR > 6
* @return negative error code on error, non negative otherwise
#else
* @return -1 if not supported
#endif
*/
int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4],
int srcRange, const int table[4], int dstRange,
int brightness, int contrast, int saturation);
/**
* @return A negative error code on error, non negative otherwise.
* If `LIBSWSCALE_VERSION_MAJOR < 7`, returns -1 if not supported.
#if LIBSWSCALE_VERSION_MAJOR > 6
* @return negative error code on error, non negative otherwise
#else
* @return -1 if not supported
#endif
*/
int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table,
int *srcRange, int **table, int *dstRange,

@ -28,7 +28,7 @@
#include "version_major.h"
#define LIBSWSCALE_VERSION_MINOR 1
#define LIBSWSCALE_VERSION_MINOR 7
#define LIBSWSCALE_VERSION_MICRO 100
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \

@ -24,7 +24,7 @@
* swscale version macros
*/
#define LIBSWSCALE_VERSION_MAJOR 7
#define LIBSWSCALE_VERSION_MAJOR 6
/**
* FF_API_* defines may be placed below to indicate public API that will be

@ -1,9 +1,9 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
#define FFMPEG_CONFIGURATION "--prefix=/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/armeabi-v7a --enable-cross-compile --enable-small --target-os=android --arch=arm --sysroot=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --cxx=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang++ --ld=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --ar=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --nm=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -lm -lz -landroid -I/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/armeabi-v7a/include' --extra-ldflags='-L/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/armeabi-v7a/lib ' --disable-shared --enable-static --disable-vulkan --disable-symver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-ffplay --disable-ffmpeg --disable-ffprobe --disable-avdevice --disable-bsfs --disable-devices --disable-protocols --disable-postproc --enable-protocol=file --enable-protocol=concat --disable-parsers --disable-demuxers --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=image2 --enable-demuxer=gif --enable-demuxer=wav --enable-demuxer=asf --enable-demuxer=flv --enable-demuxer=avi --enable-demuxer=webm_dash_manifest --enable-demuxer=matroska --enable-demuxer=mpegts --disable-decoders --enable-decoder=aac --enable-decoder=png --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mjpeg --enable-decoder=mpeg4 --enable-decoder=gif --enable-decoder=pcm_s16le --enable-decoder=hevc --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=flv --enable-decoder=adpcm_swf --enable-decoder=ac3 --enable-decoder=vp8 --enable-decoder=vorbis --enable-decoder=mpeg2video --enable-decoder=mp2 --enable-decoder=indeo4 --enable-decoder=amrnb --disable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=image2 --enable-muxer=mp3 --enable-muxer=ipod --enable-muxer=gif --disable-encoders --enable-encoder=aac --enable-encoder=png --enable-encoder=mjpeg --enable-encoder=gif --enable-swscale --disable-filters --enable-filter=crop --enable-filter=scale --enable-filter=afade --enable-filter=atempo --enable-filter=copy --enable-filter=aformat --enable-filter=overlay --enable-filter=vflip --enable-filter=hflip --enable-filter=transpose --enable-filter=volume --enable-filter=rotate --enable-filter=apad --enable-filter=amerge --enable-filter=aresample --enable-filter=setpts --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=trim --enable-filter=null --enable-filter=overlay --enable-filter=format --enable-filter=atrim --enable-filter=split --enable-filter=amix --enable-filter=anull --enable-filter=adelay --enable-zlib --enable-jni --enable-nonfree --enable-mediacodec --enable-decoder=h264_mediacodec --enable-decoder=hevc_mediacodec --enable-encoder=h264_mediacodec --enable-encoder=hevc_mediacodec --enable-version3 --pkg-config=/usr/bin/pkg-config --enable-neon --disable-asm --enable-inline-asm --enable-gpl --enable-libmp3lame --enable-encoder=libmp3lame --enable-libx264 --enable-encoder=libx264"
#define FFMPEG_CONFIGURATION "--prefix=/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/armeabi-v7a --enable-cross-compile --enable-small --target-os=android --arch=arm --sysroot=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/sysroot --cc=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --cxx=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang++ --ld=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --ar=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar --as=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi19-clang --nm=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-nm --ranlib=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib --strip=/home/luoye/Android/Sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip --extra-cflags='-O3 -fPIC -lm -lz -landroid -I/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/armeabi-v7a/include' --extra-ldflags='-L/home/luoye/Desktop/Git/ffmpeg-android-build/build/external/armeabi-v7a/lib ' --disable-shared --enable-static --disable-vulkan --disable-symver --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-ffplay --disable-ffmpeg --disable-ffprobe --disable-avdevice --disable-bsfs --disable-devices --disable-protocols --disable-postproc --enable-protocol=file --enable-protocol=concat --disable-parsers --disable-demuxers --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=image2 --enable-demuxer=gif --enable-demuxer=wav --enable-demuxer=asf --enable-demuxer=flv --enable-demuxer=avi --enable-demuxer=webm_dash_manifest --enable-demuxer=matroska --enable-demuxer=mpegts --disable-decoders --enable-decoder=aac --enable-decoder=png --enable-decoder=h264 --enable-decoder=mp3 --enable-decoder=mjpeg --enable-decoder=mpeg4 --enable-decoder=gif --enable-decoder=pcm_s16le --enable-decoder=hevc --enable-decoder=msmpeg4v1 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=flv --enable-decoder=adpcm_swf --enable-decoder=ac3 --enable-decoder=vp8 --enable-decoder=vorbis --enable-decoder=mpeg2video --enable-decoder=mp2 --enable-decoder=indeo4 --enable-decoder=amrnb --disable-muxers --enable-muxer=mov --enable-muxer=mp4 --enable-muxer=image2 --enable-muxer=mp3 --enable-muxer=ipod --enable-muxer=gif --disable-encoders --enable-encoder=aac --enable-encoder=png --enable-encoder=mjpeg --enable-encoder=gif --enable-swscale --disable-filters --enable-filter=crop --enable-filter=scale --enable-filter=afade --enable-filter=atempo --enable-filter=copy --enable-filter=aformat --enable-filter=overlay --enable-filter=vflip --enable-filter=hflip --enable-filter=transpose --enable-filter=volume --enable-filter=rotate --enable-filter=apad --enable-filter=amerge --enable-filter=aresample --enable-filter=setpts --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=trim --enable-filter=null --enable-filter=overlay --enable-filter=format --enable-filter=atrim --enable-filter=split --enable-filter=amix --enable-filter=anull --enable-filter=adelay --enable-zlib --enable-jni --enable-nonfree --enable-mediacodec --enable-version3 --pkg-config=/usr/bin/pkg-config --enable-neon --disable-asm --enable-inline-asm --enable-gpl --enable-libmp3lame --enable-encoder=libmp3lame --enable-libx264 --enable-encoder=libx264"
#define FFMPEG_LICENSE "nonfree and unredistributable"
#define CONFIG_THIS_YEAR 2023
#define CONFIG_THIS_YEAR 2022
#define FFMPEG_DATADIR "/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/armeabi-v7a/share/ffmpeg"
#define AVCONV_DATADIR "/home/luoye/Desktop/Git/ffmpeg-android-build/build/ffmpeg/armeabi-v7a/share/ffmpeg"
#define CC_IDENT "Android (9352603, based on r450784d1) clang version 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)"
@ -57,7 +57,6 @@
#define HAVE_POWER8 0
#define HAVE_PPC4XX 0
#define HAVE_VSX 0
#define HAVE_RVV 0
#define HAVE_AESNI 0
#define HAVE_AMD3DNOW 0
#define HAVE_AMD3DNOWEXT 0
@ -106,7 +105,6 @@
#define HAVE_POWER8_EXTERNAL 0
#define HAVE_PPC4XX_EXTERNAL 0
#define HAVE_VSX_EXTERNAL 0
#define HAVE_RVV_EXTERNAL 0
#define HAVE_AESNI_EXTERNAL 0
#define HAVE_AMD3DNOW_EXTERNAL 0
#define HAVE_AMD3DNOWEXT_EXTERNAL 0
@ -155,7 +153,6 @@
#define HAVE_POWER8_INLINE 0
#define HAVE_PPC4XX_INLINE 0
#define HAVE_VSX_INLINE 0
#define HAVE_RVV_INLINE 0
#define HAVE_AESNI_INLINE 0
#define HAVE_AMD3DNOW_INLINE 0
#define HAVE_AMD3DNOWEXT_INLINE 0
@ -194,7 +191,6 @@
#define HAVE_FAST_64BIT 0
#define HAVE_FAST_CLZ 1
#define HAVE_FAST_CMOV 0
#define HAVE_FAST_FLOAT16 1
#define HAVE_LOCAL_ALIGNED 0
#define HAVE_SIMD_ALIGN_16 0
#define HAVE_SIMD_ALIGN_32 0
@ -206,6 +202,8 @@
#define HAVE_RDTSC 0
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
#define HAVE_CABS 0
#define HAVE_CEXP 0
#define HAVE_INLINE_ASM 1
#define HAVE_SYMVER 0
#define HAVE_X86ASM 0
@ -325,7 +323,6 @@
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_PRCTL 1
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@ -371,8 +368,6 @@
#define HAVE_VFP_ARGS 0
#define HAVE_XFORM_ASM 0
#define HAVE_XMM_CLOBBERS 0
#define HAVE_DPI_AWARENESS_CONTEXT 0
#define HAVE_IDXGIOUTPUT5 0
#define HAVE_KCMVIDEOCODECTYPE_HEVC 0
#define HAVE_KCMVIDEOCODECTYPE_HEVCWITHALPHA 0
#define HAVE_KCMVIDEOCODECTYPE_VP9 0
@ -424,30 +419,29 @@
#define CONFIG_MANPAGES 0
#define CONFIG_PODPAGES 0
#define CONFIG_TXTPAGES 0
#define CONFIG_AVIO_HTTP_SERVE_FILES_EXAMPLE 1
#define CONFIG_AVIO_LIST_DIR_EXAMPLE 1
#define CONFIG_AVIO_READ_CALLBACK_EXAMPLE 1
#define CONFIG_AVIO_READING_EXAMPLE 1
#define CONFIG_DECODE_AUDIO_EXAMPLE 1
#define CONFIG_DECODE_FILTER_AUDIO_EXAMPLE 1
#define CONFIG_DECODE_FILTER_VIDEO_EXAMPLE 1
#define CONFIG_DECODE_VIDEO_EXAMPLE 1
#define CONFIG_DEMUX_DECODE_EXAMPLE 1
#define CONFIG_DEMUXING_DECODING_EXAMPLE 1
#define CONFIG_ENCODE_AUDIO_EXAMPLE 1
#define CONFIG_ENCODE_VIDEO_EXAMPLE 1
#define CONFIG_EXTRACT_MVS_EXAMPLE 1
#define CONFIG_FILTER_AUDIO_EXAMPLE 1
#define CONFIG_FILTERING_AUDIO_EXAMPLE 1
#define CONFIG_FILTERING_VIDEO_EXAMPLE 1
#define CONFIG_HTTP_MULTICLIENT_EXAMPLE 1
#define CONFIG_HW_DECODE_EXAMPLE 1
#define CONFIG_MUX_EXAMPLE 1
#define CONFIG_QSV_DECODE_EXAMPLE 0
#define CONFIG_REMUX_EXAMPLE 1
#define CONFIG_RESAMPLE_AUDIO_EXAMPLE 1
#define CONFIG_SCALE_VIDEO_EXAMPLE 1
#define CONFIG_SHOW_METADATA_EXAMPLE 1
#define CONFIG_METADATA_EXAMPLE 1
#define CONFIG_MUXING_EXAMPLE 1
#define CONFIG_QSVDEC_EXAMPLE 0
#define CONFIG_REMUXING_EXAMPLE 1
#define CONFIG_RESAMPLING_AUDIO_EXAMPLE 1
#define CONFIG_SCALING_VIDEO_EXAMPLE 1
#define CONFIG_TRANSCODE_AAC_EXAMPLE 1
#define CONFIG_TRANSCODE_EXAMPLE 1
#define CONFIG_TRANSCODING_EXAMPLE 1
#define CONFIG_VAAPI_ENCODE_EXAMPLE 0
#define CONFIG_VAAPI_TRANSCODE_EXAMPLE 0
#define CONFIG_QSV_TRANSCODE_EXAMPLE 0
#define CONFIG_AVISYNTH 0
#define CONFIG_FREI0R 0
#define CONFIG_LIBCDIO 0
@ -569,7 +563,6 @@
#define CONFIG_CUDA_SDK 0
#define CONFIG_LIBNPP 0
#define CONFIG_LIBMFX 0
#define CONFIG_LIBVPL 0
#define CONFIG_MMAL 0
#define CONFIG_OMX 0
#define CONFIG_OPENCL 0
@ -620,7 +613,7 @@
#define CONFIG_FAST_UNALIGNED 1
#define CONFIG_FFT 1
#define CONFIG_LSP 1
#define CONFIG_MDCT 0
#define CONFIG_MDCT 1
#define CONFIG_PIXELUTILS 0
#define CONFIG_NETWORK 1
#define CONFIG_RDFT 1
@ -673,6 +666,7 @@
#define CONFIG_FAANDCT 1
#define CONFIG_FAANIDCT 1
#define CONFIG_FDCTDSP 1
#define CONFIG_FLACDSP 0
#define CONFIG_FMTCONVERT 1
#define CONFIG_FRAME_THREAD_ENCODER 1
#define CONFIG_G722DSP 0
@ -684,15 +678,14 @@
#define CONFIG_H264PARSE 1
#define CONFIG_H264PRED 1
#define CONFIG_H264QPEL 1
#define CONFIG_H264_SEI 1
#define CONFIG_HEVCPARSE 1
#define CONFIG_HEVC_SEI 1
#define CONFIG_HPELDSP 1
#define CONFIG_HUFFMAN 0
#define CONFIG_HUFFYUVDSP 0
#define CONFIG_HUFFYUVENCDSP 0
#define CONFIG_IDCTDSP 1
#define CONFIG_IIRFILTER 1
#define CONFIG_MDCT15 1
#define CONFIG_INFLATE_WRAPPER 1
#define CONFIG_INTRAX8 0
#define CONFIG_ISO_MEDIA 1
@ -714,8 +707,6 @@
#define CONFIG_MPEGVIDEO 1
#define CONFIG_MPEGVIDEODEC 1
#define CONFIG_MPEGVIDEOENC 1
#define CONFIG_MSMPEG4DEC 1
#define CONFIG_MSMPEG4ENC 0
#define CONFIG_MSS34DSP 0
#define CONFIG_PIXBLOCKDSP 1
#define CONFIG_QPELDSP 1

@ -231,58 +231,6 @@ typedef struct RcOverride{
* decoded frame in stream.
*/
#define AV_CODEC_FLAG_DROPCHANGED (1 << 5)
/**
* Request the encoder to output reconstructed frames, i.e.\ frames that would
* be produced by decoding the encoded bistream. These frames may be retrieved
* by calling avcodec_receive_frame() immediately after a successful call to
* avcodec_receive_packet().
*
* Should only be used with encoders flagged with the
* @ref AV_CODEC_CAP_ENCODER_RECON_FRAME capability.
*/
#define AV_CODEC_FLAG_RECON_FRAME (1 << 6)
/**
* @par decoding
* Request the decoder to propagate each packets AVPacket.opaque and
* AVPacket.opaque_ref to its corresponding output AVFrame.
*
* @par encoding:
* Request the encoder to propagate each frame's AVFrame.opaque and
* AVFrame.opaque_ref values to its corresponding output AVPacket.
*
* @par
* May only be set on encoders that have the
* @ref AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability flag.
*
* @note
* While in typical cases one input frame produces exactly one output packet
* (perhaps after a delay), in general the mapping of frames to packets is
* M-to-N, so
* - Any number of input frames may be associated with any given output packet.
* This includes zero - e.g. some encoders may output packets that carry only
* metadata about the whole stream.
* - A given input frame may be associated with any number of output packets.
* Again this includes zero - e.g. some encoders may drop frames under certain
* conditions.
* .
* This implies that when using this flag, the caller must NOT assume that
* - a given input frame's opaques will necessarily appear on some output packet;
* - every output packet will have some non-NULL opaque value.
* .
* When an output packet contains multiple frames, the opaque values will be
* taken from the first of those.
*
* @note
* The converse holds for decoders, with frames and packets switched.
*/
#define AV_CODEC_FLAG_COPY_OPAQUE (1 << 7)
/**
* Signal to the encoder that the values of AVFrame.duration are valid and
* should be used (typically for transferring them to output packets).
*
* If this flag is not set, frame durations are ignored.
*/
#define AV_CODEC_FLAG_FRAME_DURATION (1 << 8)
/**
* Use internal 2pass ratecontrol in first pass mode.
*/
@ -303,6 +251,15 @@ typedef struct RcOverride{
* error[?] variables will be set during encoding.
*/
#define AV_CODEC_FLAG_PSNR (1 << 15)
#if FF_API_FLAG_TRUNCATED
/**
* Input bitstream might be truncated at a random location
* instead of only at frame boundaries.
*
* @deprecated use codec parsers for packetizing input
*/
#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
#endif
/**
* Use interlaced DCT.
*/
@ -343,6 +300,11 @@ typedef struct RcOverride{
*/
#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
/**
* timecode is in drop frame format. DEPRECATED!!!!
*/
#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
/**
* Input bitstream might be truncated at a packet boundaries
* instead of only at frame boundaries.
@ -369,12 +331,13 @@ typedef struct RcOverride{
* Do not reset ASS ReadOrder field on flush (subtitles decoding)
*/
#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
/**
* Generate/parse ICC profiles on encode/decode, as appropriate for the type of
* file. No effect on codecs which cannot contain embedded ICC profiles, or
* when compiled without support for lcms2.
*/
#define AV_CODEC_FLAG2_ICC_PROFILES (1U << 31)
/* Unsupported options :
* Syntax Arithmetic coding (SAC)
* Reference Picture Selection
* Independent Segment Decoding */
/* /Fx */
/* codec capabilities */
/* Exported side data.
These flags can be passed in AVCodecContext.export_side_data before initialization.
@ -543,7 +506,8 @@ typedef struct AVCodecContext {
* (fixed_vop_rate == 0 implies that it is different from the framerate)
*
* - encoding: MUST be set by user.
* - decoding: unused.
* - decoding: the use of this field for decoding is deprecated.
* Use framerate instead.
*/
AVRational time_base;
@ -1061,7 +1025,6 @@ typedef struct AVCodecContext {
*/
int frame_size;
#if FF_API_AVCTX_FRAME_NUMBER
/**
* Frame counter, set by libavcodec.
*
@ -1070,11 +1033,8 @@ typedef struct AVCodecContext {
*
* @note the counter is not incremented if encoding/decoding resulted in
* an error.
* @deprecated use frame_num instead
*/
attribute_deprecated
int frame_number;
#endif
/**
* number of bytes per packet if constant and known or 0
@ -1336,9 +1296,13 @@ typedef struct AVCodecContext {
* unofficial and experimental (that is, they always try to decode things
* when they can) unless they are explicitly asked to behave stupidly
* (=strictly conform to the specs)
* This may only be set to one of the FF_COMPLIANCE_* values in defs.h.
*/
int strict_std_compliance;
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
* error concealment flags
@ -1374,14 +1338,28 @@ typedef struct AVCodecContext {
/**
* Error recognition; may misdetect some more or less valid parts as errors.
* This is a bitfield of the AV_EF_* values defined in defs.h.
*
* - encoding: Set by user.
* - decoding: Set by user.
*/
int err_recognition;
#if FF_API_REORDERED_OPAQUE
/**
* Verify checksums embedded in the bitstream (could be of either encoded or
* decoded data, depending on the codec) and print an error message on mismatch.
* If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
* decoder returning an error.
*/
#define AV_EF_CRCCHECK (1<<0)
#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error
/**
* opaque 64-bit number (generally a PTS) that will be reordered and
* output in AVFrame.reordered_opaque
@ -1390,12 +1368,8 @@ typedef struct AVCodecContext {
* supported by encoders with the
* AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE capability.
* - decoding: Set by user.
*
* @deprecated Use AV_CODEC_FLAG_COPY_OPAQUE instead
*/
attribute_deprecated
int64_t reordered_opaque;
#endif
/**
* Hardware accelerator in use
@ -1405,26 +1379,13 @@ typedef struct AVCodecContext {
const struct AVHWAccel *hwaccel;
/**
* Legacy hardware accelerator context.
*
* For some hardware acceleration methods, the caller may use this field to
* signal hwaccel-specific data to the codec. The struct pointed to by this
* pointer is hwaccel-dependent and defined in the respective header. Please
* refer to the FFmpeg HW accelerator documentation to know how to fill
* this.
*
* In most cases this field is optional - the necessary information may also
* be provided to libavcodec through @ref hw_frames_ctx or @ref
* hw_device_ctx (see avcodec_get_hw_config()). However, in some cases it
* may be the only method of signalling some (optional) information.
*
* The struct and its contents are owned by the caller.
*
* - encoding: May be set by the caller before avcodec_open2(). Must remain
* valid until avcodec_free_context().
* - decoding: May be set by the caller in the get_format() callback.
* Must remain valid until the next get_format() call,
* or avcodec_free_context() (whichever comes first).
* Hardware accelerator context.
* For some hardware accelerators, a global context needs to be
* provided by the user. In that case, this holds display-dependent
* data FFmpeg cannot instantiate itself. Please refer to the
* FFmpeg HW accelerator documentation to know how to fill this.
* - encoding: unused
* - decoding: Set by user
*/
void *hwaccel_context;
@ -1520,6 +1481,27 @@ typedef struct AVCodecContext {
*/
int active_thread_type;
#if FF_API_THREAD_SAFE_CALLBACKS
/**
* Set by the client if its custom get_buffer() callback can be called
* synchronously from another thread, which allows faster multithreaded decoding.
* draw_horiz_band() will be called from other threads regardless of this setting.
* Ignored if the default get_buffer() is used.
* - encoding: Set by user.
* - decoding: Set by user.
*
* @deprecated the custom get_buffer2() callback should always be
* thread-safe. Thread-unsafe get_buffer2() implementations will be
* invalid starting with LIBAVCODEC_VERSION_MAJOR=60; in other words,
* libavcodec will behave as if this field was always set to 1.
* Callers that want to be forward compatible with future libavcodec
* versions should wrap access to this field in
* #if LIBAVCODEC_VERSION_MAJOR < 60
*/
attribute_deprecated
int thread_safe_callbacks;
#endif
/**
* The codec may call this to execute several independent things.
* It will return only after finishing all tasks.
@ -1820,6 +1802,17 @@ typedef struct AVCodecContext {
*/
int seek_preroll;
#if FF_API_DEBUG_MV
/**
* @deprecated unused
*/
attribute_deprecated
int debug_mv;
#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
#endif
/**
* custom intra quantization matrix
* - encoding: Set by user, can be NULL.
@ -1886,6 +1879,15 @@ typedef struct AVCodecContext {
*/
AVBufferRef *hw_frames_ctx;
#if FF_API_SUB_TEXT_FORMAT
/**
* @deprecated unused
*/
attribute_deprecated
int sub_text_format;
#define FF_SUB_TEXT_FMT_ASS 0
#endif
/**
* Audio only. The amount of padding (in samples) appended by the encoder to
* the end of the audio. I.e. this number of decoded samples must be
@ -2052,17 +2054,6 @@ typedef struct AVCodecContext {
* The decoder can then override during decoding as needed.
*/
AVChannelLayout ch_layout;
/**
* Frame counter, set by libavcodec.
*
* - decoding: total number of frames returned from the decoder so far.
* - encoding: total number of frames passed to the encoder so far.
*
* @note the counter is not incremented if encoding/decoding resulted in
* an error.
*/
int64_t frame_num;
} AVCodecContext;
/**
@ -2259,22 +2250,6 @@ typedef struct AVHWAccel {
*/
#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2)
/**
* Some hardware decoders (namely nvdec) can either output direct decoder
* surfaces, or make an on-device copy and return said copy.
* There is a hard limit on how many decoder surfaces there can be, and it
* cannot be accurately guessed ahead of time.
* For some processing chains, this can be okay, but others will run into the
* limit and in turn produce very confusing errors that require fine tuning of
* more or less obscure options by the user, or in extreme cases cannot be
* resolved at all without inserting an avfilter that forces a copy.
*
* Thus, the hwaccel will by default make a copy for safety and resilience.
* If a users really wants to minimize the amount of copies, they can set this
* flag and ensure their processing chain does not exhaust the surface pool.
*/
#define AV_HWACCEL_FLAG_UNSAFE_OUTPUT (1 << 3)
/**
* @}
*/
@ -2380,6 +2355,14 @@ void avcodec_free_context(AVCodecContext **avctx);
*/
const AVClass *avcodec_get_class(void);
#if FF_API_GET_FRAME_CLASS
/**
* @deprecated This function should not be used.
*/
attribute_deprecated
const AVClass *avcodec_get_frame_class(void);
#endif
/**
* Get the AVClass for AVSubtitleRect. It can be used in combination with
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
@ -2510,7 +2493,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS]);
#ifdef FF_API_AVCODEC_CHROMA_POS
/**
* Converts AVChromaLocation to swscale x/y chroma position.
*
@ -2519,9 +2501,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
* @deprecated Use av_chroma_location_enum_to_pos() instead.
*/
attribute_deprecated
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
/**
@ -2532,11 +2512,8 @@ int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
*
* @param xpos horizontal chroma sample position
* @param ypos vertical chroma sample position
* @deprecated Use av_chroma_location_pos_to_enum() instead.
*/
attribute_deprecated
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
#endif
/**
* Decode a subtitle message.
@ -2566,7 +2543,8 @@ enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
* @param[in] avpkt The input AVPacket containing the input buffer.
*/
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
int *got_sub_ptr, const AVPacket *avpkt);
int *got_sub_ptr,
AVPacket *avpkt);
/**
* Supply raw packet data as input to a decoder.
@ -2602,41 +2580,40 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
* still has frames buffered, it will return them after sending
* a flush packet.
*
* @retval 0 success
* @retval AVERROR(EAGAIN) input is not accepted in the current state - user
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): input is not accepted in the current state - user
* must read output with avcodec_receive_frame() (once
* all output is read, the packet should be resent,
* and the call will not fail with EAGAIN).
* @retval AVERROR_EOF the decoder has been flushed, and no new packets can be
* sent to it (also returned if more than 1 flush
* all output is read, the packet should be resent, and
* the call will not fail with EAGAIN).
* AVERROR_EOF: the decoder has been flushed, and no new packets can
* be sent to it (also returned if more than 1 flush
* packet is sent)
* @retval AVERROR(EINVAL) codec not opened, it is an encoder, or requires flush
* @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
* @retval "another negative error code" legitimate decoding errors
* AVERROR(EINVAL): codec not opened, it is an encoder, or requires flush
* AVERROR(ENOMEM): failed to add packet to internal queue, or similar
* other errors: legitimate decoding errors
*/
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
/**
* Return decoded output data from a decoder or encoder (when the
* AV_CODEC_FLAG_RECON_FRAME flag is used).
* Return decoded output data from a decoder.
*
* @param avctx codec context
* @param frame This will be set to a reference-counted video or audio
* frame (depending on the decoder type) allocated by the
* codec. Note that the function will always call
* decoder. Note that the function will always call
* av_frame_unref(frame) before doing anything else.
*
* @retval 0 success, a frame was returned
* @retval AVERROR(EAGAIN) output is not available in this state - user must
* try to send new input
* @retval AVERROR_EOF the codec has been fully flushed, and there will be
* @return
* 0: success, a frame was returned
* AVERROR(EAGAIN): output is not available in this state - user must try
* to send new input
* AVERROR_EOF: the decoder has been fully flushed, and there will be
* no more output frames
* @retval AVERROR(EINVAL) codec not opened, or it is an encoder without the
* AV_CODEC_FLAG_RECON_FRAME flag enabled
* @retval AVERROR_INPUT_CHANGED current decoded frame has changed parameters with
* respect to first decoded frame. Applicable when flag
* AV_CODEC_FLAG_DROPCHANGED is set.
* @retval "other negative error code" legitimate decoding errors
* AVERROR(EINVAL): codec not opened, or it is an encoder
* AVERROR_INPUT_CHANGED: current decoded frame has changed parameters
* with respect to first decoded frame. Applicable
* when flag AV_CODEC_FLAG_DROPCHANGED is set.
* other negative values: legitimate decoding errors
*/
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
@ -2663,16 +2640,16 @@ int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
* If it is not set, frame->nb_samples must be equal to
* avctx->frame_size for all frames except the last.
* The final frame may be smaller than avctx->frame_size.
* @retval 0 success
* @retval AVERROR(EAGAIN) input is not accepted in the current state - user must
* read output with avcodec_receive_packet() (once all
* output is read, the packet should be resent, and the
* call will not fail with EAGAIN).
* @retval AVERROR_EOF the encoder has been flushed, and no new frames can
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): input is not accepted in the current state - user
* must read output with avcodec_receive_packet() (once
* all output is read, the packet should be resent, and
* the call will not fail with EAGAIN).
* AVERROR_EOF: the encoder has been flushed, and no new frames can
* be sent to it
* @retval AVERROR(EINVAL) codec not opened, it is a decoder, or requires flush
* @retval AVERROR(ENOMEM) failed to add packet to internal queue, or similar
* @retval "another negative error code" legitimate encoding errors
* AVERROR(EINVAL): codec not opened, it is a decoder, or requires flush
* AVERROR(ENOMEM): failed to add packet to internal queue, or similar
* other errors: legitimate encoding errors
*/
int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
@ -2683,13 +2660,13 @@ int avcodec_send_frame(AVCodecContext *avctx, const AVFrame *frame);
* @param avpkt This will be set to a reference-counted packet allocated by the
* encoder. Note that the function will always call
* av_packet_unref(avpkt) before doing anything else.
* @retval 0 success
* @retval AVERROR(EAGAIN) output is not available in the current state - user must
* try to send input
* @retval AVERROR_EOF the encoder has been fully flushed, and there will be no
* more output packets
* @retval AVERROR(EINVAL) codec not opened, or it is a decoder
* @retval "another negative error code" legitimate encoding errors
* @return 0 on success, otherwise negative error code:
* AVERROR(EAGAIN): output is not available in the current state - user
* must try to send input
* AVERROR_EOF: the encoder has been fully flushed, and there will be
* no more output packets
* AVERROR(EINVAL): codec not opened, or it is a decoder
* other errors: legitimate encoding errors
*/
int avcodec_receive_packet(AVCodecContext *avctx, AVPacket *avpkt);
@ -2803,10 +2780,10 @@ int avcodec_get_hw_frames_parameters(AVCodecContext *avctx,
*/
enum AVPictureStructure {
AV_PICTURE_STRUCTURE_UNKNOWN, ///< unknown
AV_PICTURE_STRUCTURE_TOP_FIELD, ///< coded as top field
AV_PICTURE_STRUCTURE_BOTTOM_FIELD, ///< coded as bottom field
AV_PICTURE_STRUCTURE_FRAME, ///< coded as frame
AV_PICTURE_STRUCTURE_UNKNOWN, //< unknown
AV_PICTURE_STRUCTURE_TOP_FIELD, //< coded as top field
AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
AV_PICTURE_STRUCTURE_FRAME, //< coded as frame
};
typedef struct AVCodecParserContext {

@ -164,8 +164,6 @@ int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx);
/**
* Prepare the filter for use, after all the parameters and options have been
* set.
*
* @param ctx a AVBSFContext previously allocated with av_bsf_alloc()
*/
int av_bsf_init(AVBSFContext *ctx);
@ -176,7 +174,6 @@ int av_bsf_init(AVBSFContext *ctx);
* av_bsf_receive_packet() repeatedly until it returns AVERROR(EAGAIN) or
* AVERROR_EOF.
*
* @param ctx an initialized AVBSFContext
* @param pkt the packet to filter. The bitstream filter will take ownership of
* the packet and reset the contents of pkt. pkt is not touched if an error occurs.
* If pkt is empty (i.e. NULL, or pkt->data is NULL and pkt->side_data_elems zero),
@ -195,7 +192,6 @@ int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt);
/**
* Retrieve a filtered packet.
*
* @param ctx an initialized AVBSFContext
* @param[out] pkt this struct will be filled with the contents of the filtered
* packet. It is owned by the caller and must be freed using
* av_packet_unref() when it is no longer needed.

@ -50,6 +50,12 @@
* avcodec_default_get_buffer2 or avcodec_default_get_encode_buffer.
*/
#define AV_CODEC_CAP_DR1 (1 << 1)
#if FF_API_FLAG_TRUNCATED
/**
* @deprecated Use parsers to always send proper frames.
*/
#define AV_CODEC_CAP_TRUNCATED (1 << 3)
#endif
/**
* Encoder or decoder requires flushing with NULL input at the end in order to
* give the complete and correct output.
@ -119,6 +125,9 @@
* multithreading-capable external libraries.
*/
#define AV_CODEC_CAP_OTHER_THREADS (1 << 15)
#if FF_API_AUTO_THREADS
#define AV_CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_OTHER_THREADS
#endif
/**
* Audio encoder supports receiving a different number of samples in each call.
*/
@ -134,6 +143,17 @@
*/
#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
#if FF_API_UNUSED_CODEC_CAPS
/**
* Deprecated and unused. Use AVCodecDescriptor.props instead
*/
#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
/**
* Deprecated and unused. Use AVCodecDescriptor.props instead
*/
#define AV_CODEC_CAP_LOSSLESS 0x80000000
#endif
/**
* Codec is backed by a hardware implementation. Typically used to
* identify a non-hwaccel hardware decoder. For information about hwaccels, use
@ -149,9 +169,9 @@
#define AV_CODEC_CAP_HYBRID (1 << 19)
/**
* This encoder can reorder user opaque values from input AVFrames and return
* them with corresponding output packets.
* @see AV_CODEC_FLAG_COPY_OPAQUE
* This codec takes the reordered_opaque field from input AVFrames
* and returns it in the corresponding field in AVCodecContext after
* encoding.
*/
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
@ -162,14 +182,6 @@
*/
#define AV_CODEC_CAP_ENCODER_FLUSH (1 << 21)
/**
* The encoder is able to output reconstructed frame data, i.e. raw frames that
* would be produced by decoding the encoded bitstream.
*
* Reconstructed frame output is enabled by the AV_CODEC_FLAG_RECON_FRAME flag.
*/
#define AV_CODEC_CAP_ENCODER_RECON_FRAME (1 << 22)
/**
* AVProfile.
*/

@ -24,8 +24,6 @@
#include "libavutil/avutil.h"
#include "libavutil/samplefmt.h"
#include "version_major.h"
/**
* @addtogroup lavc_core
* @{
@ -253,9 +251,7 @@ enum AVCodecID {
AV_CODEC_ID_AVRP,
AV_CODEC_ID_012V,
AV_CODEC_ID_AVUI,
#if FF_API_AYUV_CODECID
AV_CODEC_ID_AYUV,
#endif
AV_CODEC_ID_TARGA_Y216,
AV_CODEC_ID_V308,
AV_CODEC_ID_V408,
@ -316,10 +312,6 @@ enum AVCodecID {
AV_CODEC_ID_JPEGXL,
AV_CODEC_ID_QOI,
AV_CODEC_ID_PHM,
AV_CODEC_ID_RADIANCE_HDR,
AV_CODEC_ID_WBMP,
AV_CODEC_ID_MEDIA100,
AV_CODEC_ID_VQC,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@ -413,7 +405,6 @@ enum AVCodecID {
AV_CODEC_ID_ADPCM_IMA_CUNNING,
AV_CODEC_ID_ADPCM_IMA_MOFLEX,
AV_CODEC_ID_ADPCM_IMA_ACORN,
AV_CODEC_ID_ADPCM_XMD,
/* AMR */
AV_CODEC_ID_AMR_NB = 0x12000,
@ -431,8 +422,6 @@ enum AVCodecID {
AV_CODEC_ID_SDX2_DPCM,
AV_CODEC_ID_GREMLIN_DPCM,
AV_CODEC_ID_DERF_DPCM,
AV_CODEC_ID_WADY_DPCM,
AV_CODEC_ID_CBD2_DPCM,
/* audio codecs */
AV_CODEC_ID_MP2 = 0x15000,
@ -532,12 +521,6 @@ enum AVCodecID {
AV_CODEC_ID_FASTAUDIO,
AV_CODEC_ID_MSNSIREN,
AV_CODEC_ID_DFPWM,
AV_CODEC_ID_BONK,
AV_CODEC_ID_MISC4,
AV_CODEC_ID_APAC,
AV_CODEC_ID_FTR,
AV_CODEC_ID_WAVARC,
AV_CODEC_ID_RKA,
/* subtitle codecs */
AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
@ -592,16 +575,6 @@ enum AVCodecID {
* stream (only used by libavformat) */
AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
/**
* Dummy null video codec, useful mainly for development and debugging.
* Null encoder/decoder discard all input and never return any output.
*/
AV_CODEC_ID_VNULL,
/**
* Dummy null audio codec, useful mainly for development and debugging.
* Null encoder/decoder discard all input and never return any output.
*/
AV_CODEC_ID_ANULL,
};
/**

@ -32,16 +32,15 @@
/**
* @addtogroup lavc_core
* @{
*/
enum AVFieldOrder {
AV_FIELD_UNKNOWN,
AV_FIELD_PROGRESSIVE,
AV_FIELD_TT, ///< Top coded_first, top displayed first
AV_FIELD_BB, ///< Bottom coded first, bottom displayed first
AV_FIELD_TB, ///< Top coded first, bottom displayed first
AV_FIELD_BT, ///< Bottom coded first, top displayed first
AV_FIELD_TT, //< Top coded_first, top displayed first
AV_FIELD_BB, //< Bottom coded first, bottom displayed first
AV_FIELD_TB, //< Top coded first, bottom displayed first
AV_FIELD_BT, //< Bottom coded first, top displayed first
};
/**

@ -39,28 +39,6 @@
*/
#define AV_INPUT_BUFFER_PADDING_SIZE 64
/**
* Verify checksums embedded in the bitstream (could be of either encoded or
* decoded data, depending on the format) and print an error message on mismatch.
* If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
* decoder/demuxer returning an error.
*/
#define AV_EF_CRCCHECK (1<<0)
#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder/muxer should not do as an error
#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
#define FF_COMPLIANCE_NORMAL 0
#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
/**
* @ingroup lavc_decoding
*/

@ -88,15 +88,13 @@ int av_mediacodec_release_buffer(AVMediaCodecBuffer *buffer, int render);
/**
* Release a MediaCodec buffer and render it at the given time to the surface
* that is associated with the decoder. The timestamp must be within one second
* of the current `java/lang/System#nanoTime()` (which is implemented using
* `CLOCK_MONOTONIC` on Android). See the Android MediaCodec documentation
* of [`android/media/MediaCodec#releaseOutputBuffer(int,long)`][0] for more details.
* of the current java/lang/System#nanoTime() (which is implemented using
* CLOCK_MONOTONIC on Android). See the Android MediaCodec documentation
* of android/media/MediaCodec#releaseOutputBuffer(int,long) for more details.
*
* @param buffer the buffer to render
* @param time timestamp in nanoseconds of when to render the buffer
* @return 0 on success, < 0 otherwise
*
* [0]: https://developer.android.com/reference/android/media/MediaCodec#releaseOutputBuffer(int,%20long)
*/
int av_mediacodec_render_buffer_at_time(AVMediaCodecBuffer *buffer, int64_t time);

@ -161,7 +161,7 @@ enum AVPacketSideDataType {
* the packet may contain "dual mono" audio specific to Japanese DTV
* and if it is true, recommends only the selected channel to be used.
* @code
* u8 selected channels (0=main/left, 1=sub/right, 2=both)
* u8 selected channels (0=mail/left, 1=sub/right, 2=both)
* @endcode
*/
AV_PKT_DATA_JP_DUALMONO,

@ -21,7 +21,7 @@
#ifndef AVCODEC_QSV_H
#define AVCODEC_QSV_H
#include <mfxvideo.h>
#include <mfx/mfxvideo.h>
#include "libavutil/buffer.h"
@ -61,8 +61,6 @@ typedef struct AVQSVContext {
* required by the encoder and the user-provided value nb_opaque_surfaces.
* The array of the opaque surfaces will be exported to the caller through
* the opaque_surfaces field.
*
* The caller must set this field to zero for oneVPL (MFX_VERSION >= 2.0)
*/
int opaque_alloc;

@ -152,6 +152,6 @@ int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
*/
AVVDPAUContext *av_vdpau_alloc_context(void);
/** @} */
/* @}*/
#endif /* AVCODEC_VDPAU_H */

@ -29,7 +29,7 @@
#include "version_major.h"
#define LIBAVCODEC_VERSION_MINOR 3
#define LIBAVCODEC_VERSION_MINOR 37
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \

@ -25,7 +25,7 @@
* Libavcodec version macros.
*/
#define LIBAVCODEC_VERSION_MAJOR 60
#define LIBAVCODEC_VERSION_MAJOR 59
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -37,16 +37,18 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCODEC_CHROMA_POS (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_VT_HWACCEL_CONTEXT (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_AVCTX_FRAME_NUMBER (LIBAVCODEC_VERSION_MAJOR < 61)
// reminder to remove CrystalHD decoders on next major bump
#define FF_CODEC_CRYSTAL_HD (LIBAVCODEC_VERSION_MAJOR < 61)
#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 60)
#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
#endif /* AVCODEC_VERSION_MAJOR_H */

@ -29,15 +29,6 @@
* Public libavcodec Videotoolbox header.
*/
/**
* @defgroup lavc_codec_hwaccel_videotoolbox VideoToolbox Decoder
* @ingroup lavc_codec_hwaccel
*
* Hardware accelerated decoding using VideoToolbox on Apple Platforms
*
* @{
*/
#include <stdint.h>
#define Picture QuickdrawPicture
@ -46,8 +37,6 @@
#include "libavcodec/avcodec.h"
#include "libavutil/attributes.h"
/**
* This struct holds all the information that needs to be passed
* between the caller and libavcodec for initializing Videotoolbox decoding.
@ -57,17 +46,15 @@
typedef struct AVVideotoolboxContext {
/**
* Videotoolbox decompression session object.
* Created and freed the caller.
*/
VTDecompressionSessionRef session;
#if FF_API_VT_OUTPUT_CALLBACK
/**
* The output callback that must be passed to the session.
* Set by av_videottoolbox_default_init()
*/
attribute_deprecated
VTDecompressionOutputCallback output_callback;
#endif
/**
* CVPixelBuffer Format Type that Videotoolbox will use for decoded frames.
@ -78,17 +65,17 @@ typedef struct AVVideotoolboxContext {
/**
* CoreMedia Format Description that Videotoolbox will use to create the decompression session.
* Set by the caller.
*/
CMVideoFormatDescriptionRef cm_fmt_desc;
/**
* CoreMedia codec type that Videotoolbox will use to create the decompression session.
* Set by the caller.
*/
int cm_codec_type;
} AVVideotoolboxContext;
#if FF_API_VT_HWACCEL_CONTEXT
/**
* Allocate and initialize a Videotoolbox context.
*
@ -101,9 +88,7 @@ typedef struct AVVideotoolboxContext {
* object and free the Videotoolbox context using av_free().
*
* @return the newly allocated context or NULL on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
AVVideotoolboxContext *av_videotoolbox_alloc_context(void);
/**
@ -113,9 +98,7 @@ AVVideotoolboxContext *av_videotoolbox_alloc_context(void);
* @param avctx the corresponding codec context
*
* @return >= 0 on success, a negative AVERROR code on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
int av_videotoolbox_default_init(AVCodecContext *avctx);
/**
@ -126,9 +109,7 @@ int av_videotoolbox_default_init(AVCodecContext *avctx);
* @param vtctx the Videotoolbox context to use
*
* @return >= 0 on success, a negative AVERROR code on failure
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *vtctx);
/**
@ -136,13 +117,9 @@ int av_videotoolbox_default_init2(AVCodecContext *avctx, AVVideotoolboxContext *
* av_videotoolbox_default_init().
*
* @param avctx the corresponding codec context
* @deprecated Use AVCodecContext.hw_frames_ctx or hw_device_ctx instead.
*/
attribute_deprecated
void av_videotoolbox_default_free(AVCodecContext *avctx);
#endif /* FF_API_VT_HWACCEL_CONTEXT */
/**
* @}
*/

@ -76,6 +76,16 @@ typedef struct AVFilterPad AVFilterPad;
typedef struct AVFilterFormats AVFilterFormats;
typedef struct AVFilterChannelLayouts AVFilterChannelLayouts;
#if FF_API_PAD_COUNT
/**
* Get the number of elements in an AVFilter's inputs or outputs array.
*
* @deprecated Use avfilter_filter_pad_count() instead.
*/
attribute_deprecated
int avfilter_pad_count(const AVFilterPad *pads);
#endif
/**
* Get the name of an AVFilterPad.
*
@ -266,6 +276,19 @@ typedef struct AVFilter {
*/
int (*init)(AVFilterContext *ctx);
/**
* Should be set instead of @ref AVFilter.init "init" by the filters that
* want to pass a dictionary of AVOptions to nested contexts that are
* allocated during init.
*
* On return, the options dict should be freed and replaced with one that
* contains all the options which could not be processed by this filter (or
* with NULL if all the options were processed).
*
* Otherwise the semantics is the same as for @ref AVFilter.init "init".
*/
int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
/**
* Filter uninitialization function.
*
@ -290,20 +313,13 @@ typedef struct AVFilter {
* and outputs are fixed), shortly before the format negotiation. This
* callback may be called more than once.
*
* This callback must set ::AVFilterLink's
* @ref AVFilterFormatsConfig.formats "outcfg.formats"
* on every input link and
* @ref AVFilterFormatsConfig.formats "incfg.formats"
* on every output link to a list of pixel/sample formats that the filter
* supports on that link.
* For audio links, this filter must also set
* @ref AVFilterFormatsConfig.samplerates "incfg.samplerates"
* /
* @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates"
* and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts"
* /
* @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts"
* analogously.
* This callback must set AVFilterLink.outcfg.formats on every input link
* and AVFilterLink.incfg.formats on every output link to a list of
* pixel/sample formats that the filter supports on that link. For audio
* links, this filter must also set @ref AVFilterLink.incfg.samplerates
* "in_samplerates" / @ref AVFilterLink.outcfg.samplerates "out_samplerates"
* and @ref AVFilterLink.incfg.channel_layouts "in_channel_layouts" /
* @ref AVFilterLink.outcfg.channel_layouts "out_channel_layouts" analogously.
*
* This callback must never be NULL if the union is in this state.
*
@ -1108,317 +1124,6 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Parameters of a filter's input or output pad.
*
* Created as a child of AVFilterParams by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterPadParams {
/**
* An av_malloc()'ed string containing the pad label.
*
* May be av_free()'d and set to NULL by the caller, in which case this pad
* will be treated as unlabeled for linking.
* May also be replaced by another av_malloc()'ed string.
*/
char *label;
} AVFilterPadParams;
/**
* Parameters describing a filter to be created in a filtergraph.
*
* Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterParams {
/**
* The filter context.
*
* Created by avfilter_graph_segment_create_filters() based on
* AVFilterParams.filter_name and instance_name.
*
* Callers may also create the filter context manually, then they should
* av_free() filter_name and set it to NULL. Such AVFilterParams instances
* are then skipped by avfilter_graph_segment_create_filters().
*/
AVFilterContext *filter;
/**
* Name of the AVFilter to be used.
*
* An av_malloc()'ed string, set by avfilter_graph_segment_parse(). Will be
* passed to avfilter_get_by_name() by
* avfilter_graph_segment_create_filters().
*
* Callers may av_free() this string and replace it with another one or
* NULL. If the caller creates the filter instance manually, this string
* MUST be set to NULL.
*
* When both AVFilterParams.filter an AVFilterParams.filter_name are NULL,
* this AVFilterParams instance is skipped by avfilter_graph_segment_*()
* functions.
*/
char *filter_name;
/**
* Name to be used for this filter instance.
*
* An av_malloc()'ed string, may be set by avfilter_graph_segment_parse() or
* left NULL. The caller may av_free() this string and replace with another
* one or NULL.
*
* Will be used by avfilter_graph_segment_create_filters() - passed as the
* third argument to avfilter_graph_alloc_filter(), then freed and set to
* NULL.
*/
char *instance_name;
/**
* Options to be apllied to the filter.
*
* Filled by avfilter_graph_segment_parse(). Afterwards may be freely
* modified by the caller.
*
* Will be applied to the filter by avfilter_graph_segment_apply_opts()
* with an equivalent of av_opt_set_dict2(filter, &opts, AV_OPT_SEARCH_CHILDREN),
* i.e. any unapplied options will be left in this dictionary.
*/
AVDictionary *opts;
AVFilterPadParams **inputs;
unsigned nb_inputs;
AVFilterPadParams **outputs;
unsigned nb_outputs;
} AVFilterParams;
/**
* A filterchain is a list of filter specifications.
*
* Created as a child of AVFilterGraphSegment by avfilter_graph_segment_parse().
* Freed in avfilter_graph_segment_free().
*/
typedef struct AVFilterChain {
AVFilterParams **filters;
size_t nb_filters;
} AVFilterChain;
/**
* A parsed representation of a filtergraph segment.
*
* A filtergraph segment is conceptually a list of filterchains, with some
* supplementary information (e.g. format conversion flags).
*
* Created by avfilter_graph_segment_parse(). Must be freed with
* avfilter_graph_segment_free().
*/
typedef struct AVFilterGraphSegment {
/**
* The filtergraph this segment is associated with.
* Set by avfilter_graph_segment_parse().
*/
AVFilterGraph *graph;
/**
* A list of filter chain contained in this segment.
* Set in avfilter_graph_segment_parse().
*/
AVFilterChain **chains;
size_t nb_chains;
/**
* A string containing a colon-separated list of key=value options applied
* to all scale filters in this segment.
*
* May be set by avfilter_graph_segment_parse().
* The caller may free this string with av_free() and replace it with a
* different av_malloc()'ed string.
*/
char *scale_sws_opts;
} AVFilterGraphSegment;
/**
* Parse a textual filtergraph description into an intermediate form.
*
* This intermediate representation is intended to be modified by the caller as
* described in the documentation of AVFilterGraphSegment and its children, and
* then applied to the graph either manually or with other
* avfilter_graph_segment_*() functions. See the documentation for
* avfilter_graph_segment_apply() for the canonical way to apply
* AVFilterGraphSegment.
*
* @param graph Filter graph the parsed segment is associated with. Will only be
* used for logging and similar auxiliary purposes. The graph will
* not be actually modified by this function - the parsing results
* are instead stored in seg for further processing.
* @param graph_str a string describing the filtergraph segment
* @param flags reserved for future use, caller must set to 0 for now
* @param seg A pointer to the newly-created AVFilterGraphSegment is written
* here on success. The graph segment is owned by the caller and must
* be freed with avfilter_graph_segment_free() before graph itself is
* freed.
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*/
int avfilter_graph_segment_parse(AVFilterGraph *graph, const char *graph_str,
int flags, AVFilterGraphSegment **seg);
/**
* Create filters specified in a graph segment.
*
* Walk through the creation-pending AVFilterParams in the segment and create
* new filter instances for them.
* Creation-pending params are those where AVFilterParams.filter_name is
* non-NULL (and hence AVFilterParams.filter is NULL). All other AVFilterParams
* instances are ignored.
*
* For any filter created by this function, the corresponding
* AVFilterParams.filter is set to the newly-created filter context,
* AVFilterParams.filter_name and AVFilterParams.instance_name are freed and set
* to NULL.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all creation-pending filters were
* successfully created
* @retval AVERROR_FILTER_NOT_FOUND some filter's name did not correspond to a
* known filter
* @retval "another negative error code" other failures
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_create_filters(AVFilterGraphSegment *seg, int flags);
/**
* Apply parsed options to filter instances in a graph segment.
*
* Walk through all filter instances in the graph segment that have option
* dictionaries associated with them and apply those options with
* av_opt_set_dict2(..., AV_OPT_SEARCH_CHILDREN). AVFilterParams.opts is
* replaced by the dictionary output by av_opt_set_dict2(), which should be
* empty (NULL) if all options were successfully applied.
*
* If any options could not be found, this function will continue processing all
* other filters and finally return AVERROR_OPTION_NOT_FOUND (unless another
* error happens). The calling program may then deal with unapplied options as
* it wishes.
*
* Any creation-pending filters (see avfilter_graph_segment_create_filters())
* present in the segment will cause this function to fail. AVFilterParams with
* no associated filter context are simply skipped.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all options were successfully applied.
* @retval AVERROR_OPTION_NOT_FOUND some options were not found in a filter
* @retval "another negative error code" other failures
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_apply_opts(AVFilterGraphSegment *seg, int flags);
/**
* Initialize all filter instances in a graph segment.
*
* Walk through all filter instances in the graph segment and call
* avfilter_init_dict(..., NULL) on those that have not been initialized yet.
*
* Any creation-pending filters (see avfilter_graph_segment_create_filters())
* present in the segment will cause this function to fail. AVFilterParams with
* no associated filter context or whose filter context is already initialized,
* are simply skipped.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
*
* @retval "non-negative number" Success, all filter instances were successfully
* initialized
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_init(AVFilterGraphSegment *seg, int flags);
/**
* Link filters in a graph segment.
*
* Walk through all filter instances in the graph segment and try to link all
* unlinked input and output pads. Any creation-pending filters (see
* avfilter_graph_segment_create_filters()) present in the segment will cause
* this function to fail. Disabled filters and already linked pads are skipped.
*
* Every filter output pad that has a corresponding AVFilterPadParams with a
* non-NULL label is
* - linked to the input with the matching label, if one exists;
* - exported in the outputs linked list otherwise, with the label preserved.
* Unlabeled outputs are
* - linked to the first unlinked unlabeled input in the next non-disabled
* filter in the chain, if one exists
* - exported in the ouputs linked list otherwise, with NULL label
*
* Similarly, unlinked input pads are exported in the inputs linked list.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
* @param[out] inputs a linked list of all free (unlinked) inputs of the
* filters in this graph segment will be returned here. It
* is to be freed by the caller using avfilter_inout_free().
* @param[out] outputs a linked list of all free (unlinked) outputs of the
* filters in this graph segment will be returned here. It
* is to be freed by the caller using avfilter_inout_free().
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_link(AVFilterGraphSegment *seg, int flags,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Apply all filter/link descriptions from a graph segment to the associated filtergraph.
*
* This functions is currently equivalent to calling the following in sequence:
* - avfilter_graph_segment_create_filters();
* - avfilter_graph_segment_apply_opts();
* - avfilter_graph_segment_init();
* - avfilter_graph_segment_link();
* failing if any of them fails. This list may be extended in the future.
*
* Since the above functions are idempotent, the caller may call some of them
* manually, then do some custom processing on the filtergraph, then call this
* function to do the rest.
*
* @param seg the filtergraph segment to process
* @param flags reserved for future use, caller must set to 0 for now
* @param[out] inputs passed to avfilter_graph_segment_link()
* @param[out] outputs passed to avfilter_graph_segment_link()
*
* @retval "non-negative number" success
* @retval "negative error code" failure
*
* @note Calling this function multiple times is safe, as it is idempotent.
*/
int avfilter_graph_segment_apply(AVFilterGraphSegment *seg, int flags,
AVFilterInOut **inputs,
AVFilterInOut **outputs);
/**
* Free the provided AVFilterGraphSegment and everything associated with it.
*
* @param seg double pointer to the AVFilterGraphSegment to be freed. NULL will
* be written to this pointer on exit from this function.
*
* @note
* The filter contexts (AVFilterParams.filter) are owned by AVFilterGraph rather
* than AVFilterGraphSegment, so they are not freed.
*/
void avfilter_graph_segment_free(AVFilterGraphSegment **seg);
/**
* Send a command to one or more filter instances.
*

@ -94,6 +94,42 @@ int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flag
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
#if FF_API_BUFFERSINK_ALLOC
/**
* Deprecated and unused struct to use for initializing a buffersink context.
*/
typedef struct AVBufferSinkParams {
const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE
} AVBufferSinkParams;
/**
* Create an AVBufferSinkParams structure.
*
* Must be freed with av_free().
*/
attribute_deprecated
AVBufferSinkParams *av_buffersink_params_alloc(void);
/**
* Deprecated and unused struct to use for initializing an abuffersink context.
*/
typedef struct AVABufferSinkParams {
const enum AVSampleFormat *sample_fmts; ///< list of allowed sample formats, terminated by AV_SAMPLE_FMT_NONE
const int64_t *channel_layouts; ///< list of allowed channel layouts, terminated by -1
const int *channel_counts; ///< list of allowed channel counts, terminated by -1
int all_channel_counts; ///< if not 0, accept any channel count or layout
int *sample_rates; ///< list of allowed sample rates, terminated by -1
} AVABufferSinkParams;
/**
* Create an AVABufferSinkParams structure.
*
* Must be freed with av_free().
*/
attribute_deprecated
AVABufferSinkParams *av_abuffersink_params_alloc(void);
#endif
/**
* Set the frame size for an audio buffer sink.
*

@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFILTER_VERSION_MINOR 3
#define LIBAVFILTER_VERSION_MINOR 44
#define LIBAVFILTER_VERSION_MICRO 100

@ -27,7 +27,7 @@
* Libavfilter version macros
*/
#define LIBAVFILTER_VERSION_MAJOR 9
#define LIBAVFILTER_VERSION_MAJOR 8
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -35,4 +35,8 @@
* the public API and may change, break or disappear at any time.
*/
#define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9)
#define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
#define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9)
#endif /* AVFILTER_VERSION_MAJOR_H */

@ -328,8 +328,10 @@
#endif
struct AVFormatContext;
struct AVStream;
struct AVDeviceInfoList;
struct AVDeviceCapabilitiesQuery;
/**
* @defgroup metadata_api Public Metadata API
@ -534,6 +536,114 @@ typedef struct AVOutputFormat {
const AVClass *priv_class; ///< AVClass for the private context
/*****************************************************************
* No fields below this line are part of the public API. They
* may not be used outside of libavformat and can be changed and
* removed at will.
* New public fields should be added right above.
*****************************************************************
*/
/**
* size of private data so that it can be allocated in the wrapper
*/
int priv_data_size;
/**
* Internal flags. See FF_FMT_FLAG_* in internal.h.
*/
int flags_internal;
int (*write_header)(struct AVFormatContext *);
/**
* Write a packet. If AVFMT_ALLOW_FLUSH is set in flags,
* pkt can be NULL in order to flush data buffered in the muxer.
* When flushing, return 0 if there still is more data to flush,
* or 1 if everything was flushed and there is no more buffered
* data.
*/
int (*write_packet)(struct AVFormatContext *, AVPacket *pkt);
int (*write_trailer)(struct AVFormatContext *);
/**
* A format-specific function for interleavement.
* If unset, packets will be interleaved by dts.
*
* @param s An AVFormatContext for output. pkt will be added to
* resp. taken from its packet buffer.
* @param[in,out] pkt A packet to be interleaved if has_packet is set;
* also used to return packets. If no packet is returned
* (e.g. on error), pkt is blank on return.
* @param flush 1 if no further packets are available as input and
* all remaining packets should be output.
* @param has_packet If set, pkt contains a packet to be interleaved
* on input; otherwise pkt is blank on input.
* @return 1 if a packet was output, 0 if no packet could be output,
* < 0 if an error occurred
*/
int (*interleave_packet)(struct AVFormatContext *s, AVPacket *pkt,
int flush, int has_packet);
/**
* Test if the given codec can be stored in this container.
*
* @return 1 if the codec is supported, 0 if it is not.
* A negative number if unknown.
* MKTAG('A', 'P', 'I', 'C') if the codec is only supported as AV_DISPOSITION_ATTACHED_PIC
*/
int (*query_codec)(enum AVCodecID id, int std_compliance);
void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
int64_t *dts, int64_t *wall);
/**
* Allows sending messages from application to device.
*/
int (*control_message)(struct AVFormatContext *s, int type,
void *data, size_t data_size);
/**
* Write an uncoded AVFrame.
*
* See av_write_uncoded_frame() for details.
*
* The library will free *frame afterwards, but the muxer can prevent it
* by setting the pointer to NULL.
*/
int (*write_uncoded_frame)(struct AVFormatContext *, int stream_index,
AVFrame **frame, unsigned flags);
/**
* Returns device list with it properties.
* @see avdevice_list_devices() for more details.
*/
int (*get_device_list)(struct AVFormatContext *s, struct AVDeviceInfoList *device_list);
enum AVCodecID data_codec; /**< default data codec */
/**
* Initialize format. May allocate data here, and set any AVFormatContext or
* AVStream parameters that need to be set before packets are sent.
* This method must not write output.
*
* Return 0 if streams were fully configured, 1 if not, negative AVERROR on failure
*
* Any allocations made here must be freed in deinit().
*/
int (*init)(struct AVFormatContext *);
/**
* Deinitialize format. If present, this is called whenever the muxer is being
* destroyed, regardless of whether or not the header has been written.
*
* If a trailer is being written, this is called after write_trailer().
*
* This is called if init() fails as well.
*/
void (*deinit)(struct AVFormatContext *);
/**
* Set up any necessary bitstream filtering and extract any extra data needed
* for the global header.
*
* @note pkt might have been directly forwarded by a meta-muxer; therefore
* pkt->stream_index as well as the pkt's timebase might be invalid.
* Return 0 if more packets from this stream must be checked; 1 if not.
*/
int (*check_bitstream)(struct AVFormatContext *s, struct AVStream *st,
const AVPacket *pkt);
} AVOutputFormat;
/**
* @}
@ -838,10 +948,12 @@ const char *av_disposition_to_string(int disposition);
* sizeof(AVStream) must not be used outside libav*.
*/
typedef struct AVStream {
#if FF_API_AVSTREAM_CLASS
/**
* A class for @ref avoptions. Set on stream creation.
*/
const AVClass *av_class;
#endif
int index; /**< stream index in AVFormatContext */
/**
@ -851,17 +963,6 @@ typedef struct AVStream {
*/
int id;
/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;
void *priv_data;
/**
@ -997,6 +1098,17 @@ typedef struct AVStream {
*/
AVRational r_frame_rate;
/**
* Codec parameters associated with this stream. Allocated and freed by
* libavformat in avformat_new_stream() and avformat_free_context()
* respectively.
*
* - demuxing: filled by libavformat on stream creation or in
* avformat_find_stream_info()
* - muxing: filled by the caller before avformat_write_header()
*/
AVCodecParameters *codecpar;
/**
* Number of bits in timestamps. Used for wrapping control.
*
@ -1009,15 +1121,12 @@ typedef struct AVStream {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
#if FF_API_GET_END_PTS
/**
* Returns the pts of the last muxed packet + its duration
*
* the retuned value is undefined when used with a demuxer.
*/
attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
#define AV_PROGRAM_RUNNING 1
@ -1240,6 +1349,9 @@ typedef struct AVFormatContext {
*/
#define AVFMT_FLAG_BITEXACT 0x0400
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#if FF_API_LAVF_PRIV_OPT
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (deprecated, does nothing)
#endif
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
#define AVFMT_FLAG_AUTO_BSF 0x200000 ///< Add bitstream filters as requested by the muxer
@ -1663,15 +1775,10 @@ typedef struct AVFormatContext {
int (*io_open)(struct AVFormatContext *s, AVIOContext **pb, const char *url,
int flags, AVDictionary **options);
#if FF_API_AVFORMAT_IO_CLOSE
/**
* A callback for closing the streams opened with AVFormatContext.io_open().
*
* @deprecated use io_close2
*/
attribute_deprecated
void (*io_close)(struct AVFormatContext *s, AVIOContext *pb);
#endif
/**
* ',' separated list of disallowed protocols.
@ -1788,8 +1895,8 @@ const AVOutputFormat *av_muxer_iterate(void **opaque);
/**
* Iterate over all registered demuxers.
*
* @param opaque a pointer where libavformat will store the iteration state.
* Must point to NULL to start the iteration.
* @param opaque a pointer where libavformat will store the iteration state. Must
* point to NULL to start the iteration.
*
* @return the next registered demuxer or NULL when the iteration is
* finished
@ -1853,7 +1960,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c);
* family of functions. The ownership of the data is transferred to
* st.
* @param size side information size
*
* @return zero on success, a negative AVERROR code on failure. On failure,
* the stream is unchanged and the data remains owned by the caller.
*/
@ -1866,7 +1972,6 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type,
* @param stream stream
* @param type desired side information type
* @param size side information size
*
* @return pointer to fresh allocated data or NULL otherwise
*/
uint8_t *av_stream_new_side_data(AVStream *stream,
@ -1878,7 +1983,6 @@ uint8_t *av_stream_new_side_data(AVStream *stream,
* @param type desired side information type
* @param size If supplied, *size will be set to the size of the side data
* or to zero if the desired side data is not present.
*
* @return pointer to data if present or NULL otherwise
*/
uint8_t *av_stream_get_side_data(const AVStream *stream,
@ -1896,15 +2000,14 @@ AVProgram *av_new_program(AVFormatContext *s, int id);
* avformat_free_context() can be used to free the context and
* everything allocated by the framework within it.
*
* @param ctx pointee is set to the created format context,
* or to NULL in case of failure
* @param *ctx is set to the created format context, or to NULL in
* case of failure
* @param oformat format to use for allocating the context, if NULL
* format_name and filename are used instead
* @param format_name the name of output format to use for allocating the
* context, if NULL filename is used instead
* @param filename the name of the filename to use for allocating the
* context, may be NULL
*
* @return >= 0 in case of success, a negative AVERROR code in case of
* failure
*/
@ -1967,7 +2070,6 @@ const AVInputFormat *av_probe_input_format3(const AVProbeData *pd,
* @param logctx the log context
* @param offset the offset within the bytestream to probe from
* @param max_probe_size the maximum probe buffer size (zero for default)
*
* @return the score in case of success, a negative value corresponding to an
* the maximal score is AVPROBE_SCORE_MAX
* AVERROR code otherwise
@ -1987,19 +2089,16 @@ int av_probe_input_buffer(AVIOContext *pb, const AVInputFormat **fmt,
* Open an input stream and read the header. The codecs are not opened.
* The stream must be closed with avformat_close_input().
*
* @param ps Pointer to user-supplied AVFormatContext (allocated by
* avformat_alloc_context). May be a pointer to NULL, in
* which case an AVFormatContext is allocated by this
* @param ps Pointer to user-supplied AVFormatContext (allocated by avformat_alloc_context).
* May be a pointer to NULL, in which case an AVFormatContext is allocated by this
* function and written into ps.
* Note that a user-supplied AVFormatContext will be freed
* on failure.
* Note that a user-supplied AVFormatContext will be freed on failure.
* @param url URL of the stream to open.
* @param fmt If non-NULL, this parameter forces a specific input format.
* Otherwise the format is autodetected.
* @param options A dictionary filled with AVFormatContext and demuxer-private
* options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
* @param options A dictionary filled with AVFormatContext and demuxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return 0 on success, a negative AVERROR on failure.
*
@ -2038,7 +2137,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
* @param last the last found program, the search will start after this
* program, or from the beginning if it is NULL
* @param s stream index
*
* @return the next program which belongs to s, NULL if no program is found or
* the last program is not among the programs of ic.
*/
@ -2063,12 +2161,10 @@ void av_program_add_stream_index(AVFormatContext *ac, int progid, unsigned int i
* @param decoder_ret if non-NULL, returns the decoder for the
* selected stream
* @param flags flags; none are currently defined
*
* @return the non-negative stream number in case of success,
* AVERROR_STREAM_NOT_FOUND if no stream with the requested type
* could be found,
* AVERROR_DECODER_NOT_FOUND if streams were found but no decoder
*
* @note If av_find_best_stream returns successfully and decoder_ret is not
* NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
*/
@ -2113,13 +2209,12 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt);
* 'timestamp' in 'stream_index'.
*
* @param s media file handle
* @param stream_index If stream_index is (-1), a default stream is selected,
* and timestamp is automatically converted from
* AV_TIME_BASE units to the stream specific time_base.
* @param timestamp Timestamp in AVStream.time_base units or, if no stream
* is specified, in AV_TIME_BASE units.
* @param stream_index If stream_index is (-1), a default
* stream is selected, and timestamp is automatically converted
* from AV_TIME_BASE units to the stream specific time_base.
* @param timestamp Timestamp in AVStream.time_base units
* or, if no stream is specified, in AV_TIME_BASE units.
* @param flags flags which select direction and seeking mode
*
* @return >= 0 on success
*/
int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp,
@ -2210,22 +2305,16 @@ void avformat_close_input(AVFormatContext **s);
* Allocate the stream private data and write the stream header to
* an output media file.
*
* @param s Media file handle, must be allocated with
* avformat_alloc_context().
* Its \ref AVFormatContext.oformat "oformat" field must be set
* to the desired output format;
* Its \ref AVFormatContext.pb "pb" field must be set to an
* already opened ::AVIOContext.
* @param options An ::AVDictionary filled with AVFormatContext and
* muxer-private options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
* @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec had not already been
* fully initialized in avformat_init_output().
* @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec had already been fully
* initialized in avformat_init_output().
* @retval AVERROR A negative AVERROR on failure.
* @param s Media file handle, must be allocated with avformat_alloc_context().
* Its oformat field must be set to the desired output format;
* Its pb field must be set to an already opened AVIOContext.
* @param options An AVDictionary filled with AVFormatContext and muxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec had not already been fully initialized in avformat_init,
* AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec had already been fully initialized in avformat_init,
* negative AVERROR on failure.
*
* @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_init_output.
*/
@ -2234,26 +2323,20 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options);
/**
* Allocate the stream private data and initialize the codec, but do not write the header.
* May optionally be used before avformat_write_header() to initialize stream parameters
* May optionally be used before avformat_write_header to initialize stream parameters
* before actually writing the header.
* If using this function, do not pass the same options to avformat_write_header().
*
* @param s Media file handle, must be allocated with
* avformat_alloc_context().
* Its \ref AVFormatContext.oformat "oformat" field must be set
* to the desired output format;
* Its \ref AVFormatContext.pb "pb" field must be set to an
* already opened ::AVIOContext.
* @param options An ::AVDictionary filled with AVFormatContext and
* muxer-private options.
* On return this parameter will be destroyed and replaced with
* a dict containing options that were not found. May be NULL.
*
* @retval AVSTREAM_INIT_IN_WRITE_HEADER On success, if the codec requires
* avformat_write_header to fully initialize.
* @retval AVSTREAM_INIT_IN_INIT_OUTPUT On success, if the codec has been fully
* initialized.
* @retval AVERROR Anegative AVERROR on failure.
* If using this function, do not pass the same options to avformat_write_header.
*
* @param s Media file handle, must be allocated with avformat_alloc_context().
* Its oformat field must be set to the desired output format;
* Its pb field must be set to an already opened AVIOContext.
* @param options An AVDictionary filled with AVFormatContext and muxer-private options.
* On return this parameter will be destroyed and replaced with a dict containing
* options that were not found. May be NULL.
*
* @return AVSTREAM_INIT_IN_WRITE_HEADER on success if the codec requires avformat_write_header to fully initialize,
* AVSTREAM_INIT_IN_INIT_OUTPUT on success if the codec has been fully initialized,
* negative AVERROR on failure.
*
* @see av_opt_find, av_dict_set, avio_open, av_oformat_next, avformat_write_header.
*/
@ -2426,10 +2509,8 @@ enum AVCodecID av_guess_codec(const AVOutputFormat *fmt, const char *short_name,
* time_base units
* @param[out] wall absolute time when that packet whas output,
* in microsecond
* @retval 0 Success
* @retval AVERROR(ENOSYS) The format does not support it
*
* @note Some formats or devices may not allow to measure dts and wall
* @return 0 if OK, AVERROR(ENOSYS) if the format does not support it
* Note: some formats or devices may not allow to measure dts and wall
* atomically.
*/
int av_get_output_timestamp(struct AVFormatContext *s, int stream,
@ -2572,7 +2653,7 @@ const AVIndexEntry *avformat_index_get_entry(AVStream *st, int idx);
* Get the AVIndexEntry corresponding to the given timestamp.
*
* @param st Stream containing the requested AVIndexEntry.
* @param wanted_timestamp Timestamp to retrieve the index entry for.
* @param timestamp Timestamp to retrieve the index entry for.
* @param flags If AVSEEK_FLAG_BACKWARD then the returned entry will correspond
* to the timestamp which is <= the requested one, if backward
* is 0, then it will be >=

@ -101,13 +101,9 @@ typedef struct AVIODirEntry {
int64_t filemode; /**< Unix file mode, -1 if unknown. */
} AVIODirEntry;
#if FF_API_AVIODIRCONTEXT
typedef struct AVIODirContext {
struct URLContext *url_context;
} AVIODirContext;
#else
typedef struct AVIODirContext AVIODirContext;
#endif
/**
* Different data types that can be returned via the AVIO
@ -295,6 +291,16 @@ typedef struct AVIOContext {
*/
int ignore_boundary_point;
#if FF_API_AVIOCONTEXT_WRITTEN
/**
* @deprecated field utilized privately by libavformat. For a public
* statistic of how many bytes were written out, see
* AVIOContext::bytes_written.
*/
attribute_deprecated
int64_t written;
#endif
/**
* Maximum reached position before a backward seek in the write buffer,
* used keeping track of already written data for a later flush.
@ -458,7 +464,6 @@ int avio_put_str16be(AVIOContext *s, const char *str);
*
* Zero-length ranges are omitted from the output.
*
* @param s the AVIOContext
* @param time the stream time the current bytestream pos corresponds to
* (in AV_TIME_BASE units), or AV_NOPTS_VALUE if unknown or not
* applicable

@ -31,7 +31,7 @@
#include "version_major.h"
#define LIBAVFORMAT_VERSION_MINOR 3
#define LIBAVFORMAT_VERSION_MINOR 27
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

@ -29,7 +29,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 60
#define LIBAVFORMAT_VERSION_MAJOR 59
/**
* FF_API_* defines may be placed below to indicate public API that will be
@ -41,10 +41,11 @@
* at once through the bump. This improves the git bisect-ability of the change.
*
*/
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_GET_END_PTS (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVIODIRCONTEXT (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_AVFORMAT_IO_CLOSE (LIBAVFORMAT_VERSION_MAJOR < 61)
#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60)
#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59)
#define FF_API_R_FRAME_RATE 1

@ -42,9 +42,6 @@ struct AVAES *av_aes_alloc(void);
/**
* Initialize an AVAES context.
*
* @param a The AVAES context
* @param key Pointer to the key
* @param key_bits 128, 192 or 256
* @param decrypt 0 for encryption, 1 for decryption
*/
@ -52,11 +49,9 @@ int av_aes_init(struct AVAES *a, const uint8_t *key, int key_bits, int decrypt);
/**
* Encrypt or decrypt a buffer using a previously initialized context.
*
* @param a The AVAES context
* @param count number of 16 byte blocks
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 16 byte blocks
* @param iv initialization vector for CBC mode, if NULL then ECB will be used
* @param decrypt 0 for encryption, 1 for decryption
*/

@ -22,12 +22,6 @@
#ifndef AVUTIL_AES_CTR_H
#define AVUTIL_AES_CTR_H
/**
* @defgroup lavu_aes_ctr AES-CTR
* @ingroup lavu_crypto
* @{
*/
#include <stdint.h>
#include "attributes.h"
@ -44,23 +38,17 @@ struct AVAESCTR *av_aes_ctr_alloc(void);
/**
* Initialize an AVAESCTR context.
*
* @param a The AVAESCTR context to initialize
* @param key encryption key, must have a length of AES_CTR_KEY_SIZE
*/
int av_aes_ctr_init(struct AVAESCTR *a, const uint8_t *key);
/**
* Release an AVAESCTR context.
*
* @param a The AVAESCTR context
*/
void av_aes_ctr_free(struct AVAESCTR *a);
/**
* Process a buffer using a previously initialized context.
*
* @param a The AVAESCTR context
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param size the size of src and dst

@ -1,72 +0,0 @@
/*
* Copyright (c) 2023 Jan Ekström <jeebjp@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
#define AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H
#include <stddef.h>
#include "frame.h"
#include "rational.h"
/**
* Ambient viewing environment metadata as defined by H.274. The values are
* saved in AVRationals so that they keep their exactness, while allowing for
* easy access to a double value with f.ex. av_q2d.
*
* @note sizeof(AVAmbientViewingEnvironment) is not part of the public ABI, and
* it must be allocated using av_ambient_viewing_environment_alloc.
*/
typedef struct AVAmbientViewingEnvironment {
/**
* Environmental illuminance of the ambient viewing environment in lux.
*/
AVRational ambient_illuminance;
/**
* Normalized x chromaticity coordinate of the environmental ambient light
* in the nominal viewing environment according to the CIE 1931 definition
* of x and y as specified in ISO/CIE 11664-1.
*/
AVRational ambient_light_x;
/**
* Normalized y chromaticity coordinate of the environmental ambient light
* in the nominal viewing environment according to the CIE 1931 definition
* of x and y as specified in ISO/CIE 11664-1.
*/
AVRational ambient_light_y;
} AVAmbientViewingEnvironment;
/**
* Allocate an AVAmbientViewingEnvironment structure.
*
* @return the newly allocated struct or NULL on failure
*/
AVAmbientViewingEnvironment *av_ambient_viewing_environment_alloc(size_t *size);
/**
* Allocate and add an AVAmbientViewingEnvironment structure to an existing
* AVFrame as side data.
*
* @return the newly allocated struct, or NULL on failure
*/
AVAmbientViewingEnvironment *av_ambient_viewing_environment_create_side_data(AVFrame *frame);
#endif /* AVUTIL_AMBIENT_VIEWING_ENVIRONMENT_H */

@ -135,7 +135,6 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_forma
/**
* Get the count of continuous non zero chars starting from the beginning.
*
* @param s the string whose length to count
* @param len maximum number of characters to check in the string, that
* is the maximum value which is returned by the function
*/
@ -157,6 +156,15 @@ static inline size_t av_strnlen(const char *s, size_t len)
*/
char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2);
#if FF_API_D2STR
/**
* Convert a number to an av_malloced string.
* @deprecated use av_asprintf() with "%f" or a more specific format
*/
attribute_deprecated
char *av_d2str(double d);
#endif
/**
* Unescape the given string until a non escaped terminating char,
* and return the token corresponding to the unescaped string.

@ -18,12 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* @ingroup lavu_avbprint
* AVBPrint public header
*/
#ifndef AVUTIL_BPRINT_H
#define AVUTIL_BPRINT_H
@ -32,14 +26,6 @@
#include "attributes.h"
#include "avstring.h"
/**
* @defgroup lavu_avbprint AVBPrint
* @ingroup lavu_data
*
* A buffer to print data progressively
* @{
*/
/**
* Define a structure with extra padding to a fixed size
* This helps ensuring binary compatibility with future versions.
@ -62,14 +48,14 @@ typedef struct name { \
* Small buffers are kept in the structure itself, and thus require no
* memory allocation at all (unless the contents of the buffer is needed
* after the structure goes out of scope). This is almost as lightweight as
* declaring a local `char buf[512]`.
* declaring a local "char buf[512]".
*
* The length of the string can go beyond the allocated size: the buffer is
* then truncated, but the functions still keep account of the actual total
* length.
*
* In other words, AVBPrint.len can be greater than AVBPrint.size and records
* the total length of what would have been to the buffer if there had been
* In other words, buf->len can be greater than buf->size and records the
* total length of what would have been to the buffer if there had been
* enough memory.
*
* Append operations do not need to be tested for failure: if a memory
@ -77,14 +63,17 @@ typedef struct name { \
* is still updated. This situation can be tested with
* av_bprint_is_complete().
*
* The AVBPrint.size_max field determines several possible behaviours:
* - `size_max = -1` (= `UINT_MAX`) or any large value will let the buffer be
* The size_max field determines several possible behaviours:
*
* size_max = -1 (= UINT_MAX) or any large value will let the buffer be
* reallocated as necessary, with an amortized linear cost.
* - `size_max = 0` prevents writing anything to the buffer: only the total
*
* size_max = 0 prevents writing anything to the buffer: only the total
* length is computed. The write operations can then possibly be repeated in
* a buffer with exactly the necessary size
* (using `size_init = size_max = len + 1`).
* - `size_max = 1` is automatically replaced by the exact size available in the
* (using size_init = size_max = len + 1).
*
* size_max = 1 is automatically replaced by the exact size available in the
* structure itself, thus ensuring no dynamic memory allocation. The
* internal buffer is large enough to hold a reasonable paragraph of text,
* such as the current paragraph.
@ -99,31 +88,12 @@ FF_PAD_STRUCTURE(AVBPrint, 1024,
)
/**
* @name Max size special values
* Convenience macros for special values for av_bprint_init() size_max
* parameter.
* @{
*/
/**
* Buffer will be reallocated as necessary, with an amortized linear cost.
*/
#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1)
/**
* Use the exact size available in the AVBPrint structure itself.
*
* Thus ensuring no dynamic memory allocation. The internal buffer is large
* enough to hold a reasonable paragraph of text, such as the current paragraph.
*/
#define AV_BPRINT_SIZE_AUTOMATIC 1
/**
* Do not write anything to the buffer, only calculate the total length.
*
* The write operations can then possibly be repeated in a buffer with
* exactly the necessary size (using `size_init = size_max = AVBPrint.len + 1`).
*/
#define AV_BPRINT_SIZE_COUNT_ONLY 0
/** @} */
/**
* Init a print buffer.
@ -131,12 +101,12 @@ FF_PAD_STRUCTURE(AVBPrint, 1024,
* @param buf buffer to init
* @param size_init initial size (including the final 0)
* @param size_max maximum size;
* - `0` means do not write anything, just count the length
* - `1` is replaced by the maximum value for automatic storage
* 0 means do not write anything, just count the length;
* 1 is replaced by the maximum value for automatic storage;
* any large value means that the internal buffer will be
* reallocated as needed up to that limit
* - `-1` is converted to `UINT_MAX`, the largest limit possible.
* Check also `AV_BPRINT_SIZE_*` macros.
* reallocated as needed up to that limit; -1 is converted to
* UINT_MAX, the largest limit possible.
* Check also AV_BPRINT_SIZE_* macros.
*/
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
@ -246,6 +216,4 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str);
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars,
enum AVEscapeMode mode, int flags);
/** @} */
#endif /* AVUTIL_BPRINT_H */

@ -40,8 +40,6 @@
# include "arm/bswap.h"
#elif ARCH_AVR32
# include "avr32/bswap.h"
#elif ARCH_RISCV
# include "riscv/bswap.h"
#elif ARCH_SH4
# include "sh4/bswap.h"
#elif ARCH_X86

@ -59,7 +59,7 @@ int av_camellia_init(struct AVCAMELLIA *ctx, const uint8_t *key, int key_bits);
* @param dst destination array, can be equal to src
* @param src source array, can be equal to dst
* @param count number of 16 byte blocks
* @param iv initialization vector for CBC mode, NULL for ECB mode
* @paran iv initialization vector for CBC mode, NULL for ECB mode
* @param decrypt 0 for encryption, 1 for decryption
*/
void av_camellia_crypt(struct AVCAMELLIA *ctx, uint8_t *dst, const uint8_t *src, int count, uint8_t* iv, int decrypt);

@ -30,17 +30,11 @@
/**
* @file
* @ingroup lavu_audio_channels
* Public libavutil channel layout APIs header.
* audio channel layout utility functions
*/
/**
* @defgroup lavu_audio_channels Audio channels
* @ingroup lavu_audio
*
* Audio channel layout utility functions
*
* @addtogroup lavu_audio
* @{
*/
@ -90,9 +84,9 @@ enum AVChannel {
* Range of channels between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END represent Ambisonic components using the ACN system.
*
* Given a channel id `<i>` between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel `<n>` is
* `<n> = <i> - AV_CHAN_AMBISONIC_BASE`.
* Given a channel id <i> between AV_CHAN_AMBISONIC_BASE and
* AV_CHAN_AMBISONIC_END (inclusive), the ACN index of the channel <n> is
* <n> = <i> - AV_CHAN_AMBISONIC_BASE.
*
* @note these values are only used for AV_CHANNEL_ORDER_CUSTOM channel
* orderings, the AV_CHANNEL_ORDER_AMBISONIC ordering orders the channels
@ -232,9 +226,7 @@ enum AVChannelOrder {
#define AV_CH_LAYOUT_7POINT1 (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT1_WIDE (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_TOP_BACK (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_OCTAGONAL (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_CENTER|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_CUBE (AV_CH_LAYOUT_QUAD|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
@ -274,11 +266,8 @@ typedef struct AVChannelCustom {
* A channel layout here is defined as a set of channels ordered in a specific
* way (unless the channel order is AV_CHANNEL_ORDER_UNSPEC, in which case an
* AVChannelLayout carries only the channel count).
* All orders may be treated as if they were AV_CHANNEL_ORDER_UNSPEC by
* ignoring everything but the channel count, as long as av_channel_layout_check()
* considers they are valid.
*
* Unlike most structures in FFmpeg, sizeof(AVChannelLayout) is a part of the
* Unlike most structures in Libav, sizeof(AVChannelLayout) is a part of the
* public ABI and may be used by the caller. E.g. it may be allocated on stack
* or embedded in caller-defined structs.
*
@ -361,10 +350,6 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_MASK(nb, m) \
{ .order = AV_CHANNEL_ORDER_NATIVE, .nb_channels = (nb), .u = { .mask = (m) }}
/**
* @name Common pre-defined channel layouts
* @{
*/
#define AV_CHANNEL_LAYOUT_MONO AV_CHANNEL_LAYOUT_MASK(1, AV_CH_LAYOUT_MONO)
#define AV_CHANNEL_LAYOUT_STEREO AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO)
#define AV_CHANNEL_LAYOUT_2POINT1 AV_CHANNEL_LAYOUT_MASK(3, AV_CH_LAYOUT_2POINT1)
@ -390,24 +375,16 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_7POINT1 AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE)
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_WIDE_BACK)
#define AV_CHANNEL_LAYOUT_7POINT1_TOP_BACK AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_7POINT1_TOP_BACK)
#define AV_CHANNEL_LAYOUT_OCTAGONAL AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_OCTAGONAL)
#define AV_CHANNEL_LAYOUT_CUBE AV_CHANNEL_LAYOUT_MASK(8, AV_CH_LAYOUT_CUBE)
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
#define AV_CHANNEL_LAYOUT_22POINT2 AV_CHANNEL_LAYOUT_MASK(24, AV_CH_LAYOUT_22POINT2)
#define AV_CHANNEL_LAYOUT_AMBISONIC_FIRST_ORDER \
{ .order = AV_CHANNEL_ORDER_AMBISONIC, .nb_channels = 4, .u = { .mask = 0 }}
/** @} */
struct AVBPrint;
#if FF_API_OLD_CHANNEL_LAYOUT
/**
* @name Deprecated Functions
* @{
*/
/**
* Return a channel layout id that matches name, or 0 if no match is found.
*
@ -452,8 +429,6 @@ int av_get_extended_channel_layout(const char *name, uint64_t* channel_layout, i
*
* @param buf put here the string containing the channel layout
* @param buf_size size in bytes of the buffer
* @param nb_channels number of channels
* @param channel_layout channel layout bitset
* @deprecated use av_channel_layout_describe()
*/
attribute_deprecated
@ -484,7 +459,6 @@ int64_t av_get_default_channel_layout(int nb_channels);
/**
* Get the index of a channel in channel_layout.
*
* @param channel_layout channel layout bitset
* @param channel a channel layout describing exactly one channel which must be
* present in channel_layout.
*
@ -537,9 +511,6 @@ const char *av_get_channel_description(uint64_t channel);
attribute_deprecated
int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
const char **name);
/**
* @}
*/
#endif
/**
@ -548,7 +519,6 @@ int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
*
* @param buf pre-allocated buffer where to put the generated string
* @param buf_size size in bytes of the buffer.
* @param channel the AVChannel whose name to get
* @return amount of bytes needed to hold the output string, or a negative AVERROR
* on failure. If the returned value is bigger than buf_size, then the
* string was truncated.
@ -567,7 +537,6 @@ void av_channel_name_bprint(struct AVBPrint *bp, enum AVChannel channel_id);
*
* @param buf pre-allocated buffer where to put the generated string
* @param buf_size size in bytes of the buffer.
* @param channel the AVChannel whose description to get
* @return amount of bytes needed to hold the output string, or a negative AVERROR
* on failure. If the returned value is bigger than buf_size, then the
* string was truncated.
@ -624,7 +593,7 @@ int av_channel_layout_from_string(AVChannelLayout *channel_layout,
/**
* Get the default channel layout for a given number of channels.
*
* @param ch_layout the layout structure to be initialized
* @param channel_layout the layout structure to be initialized
* @param nb_channels number of channels
*/
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels);
@ -689,7 +658,6 @@ int av_channel_layout_describe_bprint(const AVChannelLayout *channel_layout,
* Get the channel with the given index in a channel layout.
*
* @param channel_layout input channel layout
* @param idx index of the channel
* @return channel with the index idx in channel_layout on success or
* AV_CHAN_NONE on failure (if idx is not valid or the channel order is
* unspecified)
@ -702,7 +670,6 @@ av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsi
* channels are found, only the first match will be returned.
*
* @param channel_layout input channel layout
* @param channel the channel whose index to obtain
* @return index of channel in channel_layout on success or a negative number if
* channel is not present in channel_layout.
*/
@ -717,7 +684,6 @@ int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout,
* @ref av_channel_from_string().
*
* @param channel_layout input channel layout
* @param name string describing the channel whose index to obtain
* @return a channel index described by the given string, or a negative AVERROR
* value.
*/
@ -731,7 +697,6 @@ int av_channel_layout_index_from_string(const AVChannelLayout *channel_layout,
* @ref av_channel_from_string().
*
* @param channel_layout input channel layout
* @param name string describing the channel to obtain
* @return a channel described by the given string in channel_layout on success
* or AV_CHAN_NONE on failure (if the string is not valid or the channel
* order is unspecified)
@ -777,6 +742,7 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout);
int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1);
/**
* @}
* @}
*/

@ -78,16 +78,6 @@
#define AV_CPU_FLAG_LSX (1 << 0)
#define AV_CPU_FLAG_LASX (1 << 1)
// RISC-V extensions
#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank)
#define AV_CPU_FLAG_RVF (1 << 1) ///< F (single precision FP)
#define AV_CPU_FLAG_RVD (1 << 2) ///< D (double precision FP)
#define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */
#define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */
#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
/**
* Return the flags which specify extensions supported by the CPU.
* The returned value is affected by av_force_cpu_flags() if that was used

@ -84,10 +84,7 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id);
/**
* Calculate the CRC of a block.
* @param ctx initialized AVCRC array (see av_crc_init())
* @param crc CRC of previous blocks if any or initial value for CRC
* @param buffer buffer whose CRC to calculate
* @param length length of the buffer
* @return CRC updated with the data from the given block
*
* @see av_crc_init() "le" parameter

@ -1,8 +1,5 @@
/*
* Copyright (c) 2015 Kevin Wheatley <kevin.j.wheatley@gmail.com>
* Copyright (c) 2016 Ronald S. Bultje <rsbultje@gmail.com>
* Copyright (c) 2023 Leo Izen <leo.izen@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@ -27,15 +24,9 @@
#include "rational.h"
/**
* @file
* Colorspace value utility functions for libavutil.
* @ingroup lavu_math_csp
* @file Colorspace value utility functions for libavutil.
* @author Ronald S. Bultje <rsbultje@gmail.com>
* @author Leo Izen <leo.izen@gmail.com>
* @author Kevin Wheatley <kevin.j.wheatley@gmail.com>
*/
/**
* @defgroup lavu_math_csp Colorspace Utility
* @ingroup lavu_math
* @{
@ -80,12 +71,6 @@ typedef struct AVColorPrimariesDesc {
AVPrimaryCoefficients prim;
} AVColorPrimariesDesc;
/**
* Function pointer representing a double -> double transfer function that performs
* an EOTF transfer inversion. This function outputs linear light.
*/
typedef double (*av_csp_trc_function)(double);
/**
* Retrieves the Luma coefficients necessary to construct a conversion matrix
* from an enum constant describing the colorspace.
@ -114,35 +99,6 @@ const AVColorPrimariesDesc *av_csp_primaries_desc_from_id(enum AVColorPrimaries
*/
enum AVColorPrimaries av_csp_primaries_id_from_desc(const AVColorPrimariesDesc *prm);
/**
* Determine a suitable 'gamma' value to match the supplied
* AVColorTransferCharacteristic.
*
* See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html)
*
* This function returns the gamma exponent for the OETF. For example, sRGB is approximated
* by gamma 2.2, not by gamma 0.45455.
*
* @return Will return an approximation to the simple gamma function matching
* the supplied Transfer Characteristic, Will return 0.0 for any
* we cannot reasonably match against.
*/
double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
/**
* Determine the function needed to apply the given
* AVColorTransferCharacteristic to linear input.
*
* The function returned should expect a nominal domain and range of [0.0-1.0]
* values outside of this range maybe valid depending on the chosen
* characteristic function.
*
* @return Will return pointer to the function matching the
* supplied Transfer Characteristic. If unspecified will
* return NULL:
*/
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
/**
* @}
*/

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save