Project import generated by Copybara.
GitOrigin-RevId: ebd8895ddb097b985db1fbdc816548549e211af9
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 625bc51..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,50 +0,0 @@
-*.a
-*.o
-*.o.*
-*.d
-*.def
-*.dll
-*.dylib
-*.exe
-*.exp
-*.gcda
-*.gcno
-*.h.c
-*.ilk
-*.lib
-*.pc
-*.pdb
-*.pyc
-*.so
-*.so.*
-*.swp
-*.ver
-*.version
-*.ptx
-*.ptx.c
-*_g
-\#*
-.\#*
-/.config
-/.version
-/ffmpeg
-/ffplay
-/ffprobe
-/config.asm
-/config.h
-/coverage.info
-/avversion.h
-/lcov/
-/src
-/mapfile
-/tools/python/__pycache__/
-
-# Chromium stuff.
-/build.*
-/chromium/binaries/Chrome
-/*.props
-/*.sln
-*.target.mk
-/*.targets
-/*.vcxproj*
-/*.xml
diff --git a/.mailmap b/.mailmap
index ba072f3..3bd1a85 100644
--- a/.mailmap
+++ b/.mailmap
@@ -10,8 +10,7 @@
<barryjzhao@tencent.com> <jun.zhao@intel.com>
<josh@itanimul.li> <joshdk@obe.tv>
<michael@niedermayer.cc> <michaelni@gmx.at>
-<linjie.justin.fu@gmail.com> <linjie.fu@intel.com>
-<linjie.justin.fu@gmail.com> <fulinjie@zju.edu.cn>
+<linjie.fu@intel.com> <fulinjie@zju.edu.cn>
<ceffmpeg@gmail.com> <cehoyos@ag.or.at>
<ceffmpeg@gmail.com> <cehoyos@rainbow.studorg.tuwien.ac.at>
<ffmpeg@gyani.pro> <gyandoshi@gmail.com>
diff --git a/BUILD.gn b/BUILD.gn
index 40cd148..f7f34ea 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -251,7 +251,7 @@
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
- if (ffmpeg_use_unsafe_atomics) {
+ if (ffmpeg_use_atomics_fallback) {
if (is_posix || is_fuchsia) {
include_dirs += [ "compat/atomics/gcc" ]
} else if (is_win) {
diff --git a/Changelog b/Changelog
index b28a8c5..6ffe02c 100644
--- a/Changelog
+++ b/Changelog
@@ -53,34 +53,6 @@
- Microsoft Paint (MSP) demuxer
- AV1 monochrome encoding support via libaom >= 2.0.1
- asuperpass and asuperstop filter
-- shufflepixels filter
-- tmidequalizer filter
-- estdif filter
-- epx filter
-- Dolby E parser
-- shear filter
-- kirsch filter
-- colortemperature filter
-- colorcontrast filter
-- PFM encoder
-- colorcorrect filter
-- binka demuxer
-- XBM parser
-- xbm_pipe demuxer
-- colorize filter
-- CRI parser
-- aexciter audio filter
-- exposure video filter
-- monochrome video filter
-- setts bitstream filter
-- vif video filter
-- OpenEXR image encoder
-- Simbiosis IMX decoder
-- Simbiosis IMX demuxer
-- Digital Pictures SGA demuxer and decoders
-- TTML subtitle encoder and muxer
-- identity video filter
-- msad video filter
version 4.3:
diff --git a/DIR_METADATA b/DIR_METADATA
deleted file mode 100644
index 48be0cb..0000000
--- a/DIR_METADATA
+++ /dev/null
@@ -1,3 +0,0 @@
-monorail {
- component: "Internals>Media>FFmpeg"
-}
diff --git a/MAINTAINERS b/MAINTAINERS
index 3b6cfad..00c9007 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -57,7 +57,7 @@
mailing lists Baptiste Coudurier
Twitter Reynaldo H. Verdejo Pinochet
Launchpad Timothy Gu
-ffmpeg-security Andreas Cadhalpun, Carl Eugen Hoyos, Clément Bœsch, Michael Niedermayer, Reimar Doeffinger, rcombs, wm4
+ffmpeg-security Andreas Cadhalpun, Carl Eugen Hoyos, Clément Bœsch, Michael Niedermayer, Reimar Doeffinger, Rodger Combs, wm4
libavutil
@@ -144,7 +144,7 @@
ass* Aurelien Jacobs
asv* Michael Niedermayer
atrac3plus* Maxim Poliakovski
- audiotoolbox* rcombs
+ audiotoolbox* Rodger Combs
avs2* Huiwen Ren
bgmc.c, bgmc.h Thilo Borgmann
binkaudio.c Peter Ross
diff --git a/OWNERS b/OWNERS
index ad98c56..d05744d 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,3 +1,4 @@
+# COMPONENT: Internals>Media>FFmpeg
chcunningham@chromium.org
dalecurtis@chromium.org
hubbe@chromium.org
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index acfaa65..cd1b8f7 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -47,7 +47,7 @@
errors += input_api.RunTests(
input_api.canned_checks.GetUnitTests(
input_api, output_api,
- ['chromium/scripts/generate_gn_unittest_wrapper.py']))
+ ['chromium/scripts/generate_gn_unittest.py']))
return errors
diff --git a/README.chromium b/README.chromium
index 3a4336a..766b0ee 100644
--- a/README.chromium
+++ b/README.chromium
@@ -3,7 +3,7 @@
License: LGPL 2.1
License File: CREDITS.chromium
Upstream Git: git://source.ffmpeg.org/ffmpeg.git
-Last Upstream Merge: f4f5da0d9167bb3ebf7519ded2a9965bac5404bf, Mar 11 2021
+Last Upstream Merge: adf72718a41943bb62b3fabd5dbe33f5b9a6e63e, Dec 11 2020
This file documents the layout of the Chromium copy of FFmpeg, some common
tasks, and how to create the build files and related configurations.
diff --git a/chromium/config/Chrome/android/arm-neon/config.h b/chromium/config/Chrome/android/arm-neon/config.h
index 53268fd..6281058 100644
--- a/chromium/config/Chrome/android/arm-neon/config.h
+++ b/chromium/config/Chrome/android/arm-neon/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi --extra-cflags='--target=arm-linux-androideabi21' --extra-ldflags='--target=arm-linux-androideabi21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/arm-linux-androideabi --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-neon --extra-cflags='-mtune=generic-armv7-a' --extra-cflags='-mfloat-abi=softfp' --extra-cflags='-mfpu=neon' --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-16/arch-arm --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi --extra-cflags='--target=arm-linux-androideabi' --extra-ldflags='--target=arm-linux-androideabi' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/arm-linux-androideabi/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-neon --extra-cflags='-mtune=generic-armv7-a' --extra-cflags='-mfloat-abi=softfp' --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -256,8 +254,8 @@
#define HAVE_LDEXPF 1
#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
-#define HAVE_LOG2 1
-#define HAVE_LOG2F 1
+#define HAVE_LOG2 0
+#define HAVE_LOG2F 0
#define HAVE_LOG10F 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
@@ -310,7 +308,7 @@
#define HAVE_MPROTECT 1
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
-#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 1 -- forced to 0. See https://crbug.com/604451 */
+#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 0 -- forced to 0. See https://crbug.com/604451 */
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h b/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h
+++ b/chromium/config/Chrome/android/arm-neon/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/android/arm64/config.h b/chromium/config/Chrome/android/arm64/config.h
index 2adb521..3907dd4 100644
--- a/chromium/config/Chrome/android/arm64/config.h
+++ b/chromium/config/Chrome/android/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android --extra-cflags='--target=aarch64-linux-android21' --extra-ldflags='--target=aarch64-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-21/arch-arm64 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android --extra-cflags='--target=aarch64-linux-android' --extra-ldflags='--target=aarch64-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/android/arm64/libavutil/ffversion.h b/chromium/config/Chrome/android/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/android/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/android/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/android/ia32/config.h b/chromium/config/Chrome/android/ia32/config.h
index 83ae7a4..a1139f8 100644
--- a/chromium/config/Chrome/android/ia32/config.h
+++ b/chromium/config/Chrome/android/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/i686-linux-android --extra-cflags='--target=i686-linux-android21' --extra-ldflags='--target=i686-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/i686-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --disable-x86asm --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-16/arch-x86 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/i686-linux-android --extra-cflags='--target=i686-linux-android' --extra-ldflags='--target=i686-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/i686-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --disable-x86asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -256,8 +254,8 @@
#define HAVE_LDEXPF 1
#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
-#define HAVE_LOG2 1
-#define HAVE_LOG2F 1
+#define HAVE_LOG2 0
+#define HAVE_LOG2F 0
#define HAVE_LOG10F 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
@@ -310,7 +308,7 @@
#define HAVE_MPROTECT 1
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
-#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 1 -- forced to 0. See https://crbug.com/604451 */
+#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 0 -- forced to 0. See https://crbug.com/604451 */
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@@ -341,7 +339,7 @@
#define HAVE_AS_OBJECT_ARCH 0
#define HAVE_ASM_MOD_Q 0
#define HAVE_BLOCKS_EXTENSION 0
-/* #define HAVE_EBP_AVAILABLE 1 -- ebp selection is done by the chrome build */
+/* #define HAVE_EBP_AVAILABLE 0 -- ebp selection is done by the chrome build */
#define HAVE_EBX_AVAILABLE 1
#define HAVE_GNU_AS 0
#define HAVE_GNU_WINDRES 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/android/ia32/libavutil/ffversion.h b/chromium/config/Chrome/android/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/android/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chrome/android/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/android/x64/config.asm b/chromium/config/Chrome/android/x64/config.asm
index 7060b09..d02ea8b 100644
--- a/chromium/config/Chrome/android/x64/config.asm
+++ b/chromium/config/Chrome/android/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 0
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/android/x64/config.h b/chromium/config/Chrome/android/x64/config.h
index f20bdad..0301b77 100644
--- a/chromium/config/Chrome/android/x64/config.h
+++ b/chromium/config/Chrome/android/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android --extra-cflags='--target=x86_64-linux-android21' --extra-ldflags='--target=x86_64-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=x86_64 --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-21/arch-x86_64 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android --extra-cflags='--target=x86_64-linux-android' --extra-ldflags='--target=x86_64-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=x86_64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-demuxer=aac --enable-parser=aac --enable-decoder=aac" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/android/x64/libavutil/ffversion.h b/chromium/config/Chrome/android/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/android/x64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/android/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux-noasm/x64/config.h b/chromium/config/Chrome/linux-noasm/x64/config.h
index 92a8e9e..07b16b9 100644
--- a/chromium/config/Chrome/linux-noasm/x64/config.h
+++ b/chromium/config/Chrome/linux-noasm/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h b/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux-noasm/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/arm-neon/config.h b/chromium/config/Chrome/linux/arm-neon/config.h
index fd93dd5..1322e1e 100644
--- a/chromium/config/Chrome/linux/arm-neon/config.h
+++ b/chromium/config/Chrome/linux/arm-neon/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h b/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/arm-neon/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/arm/config.h b/chromium/config/Chrome/linux/arm/config.h
index d6b1ade..4a6becf 100644
--- a/chromium/config/Chrome/linux/arm/config.h
+++ b/chromium/config/Chrome/linux/arm/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/arm/libavutil/ffversion.h b/chromium/config/Chrome/linux/arm/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/arm/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/arm/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/arm64/config.h b/chromium/config/Chrome/linux/arm64/config.h
index 0815ff3..86f0d87 100644
--- a/chromium/config/Chrome/linux/arm64/config.h
+++ b/chromium/config/Chrome/linux/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h b/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/ia32/config.asm b/chromium/config/Chrome/linux/ia32/config.asm
index ec62061..c3db8c9 100644
--- a/chromium/config/Chrome/linux/ia32/config.asm
+++ b/chromium/config/Chrome/linux/ia32/config.asm
@@ -172,7 +172,7 @@
%define HAVE_ATOMIC_CAS_PTR 0
%define HAVE_MACHINE_RW_BARRIER 0
%define HAVE_MEMORYBARRIER 0
-%define HAVE_MM_EMPTY 1
+%define HAVE_MM_EMPTY 0
%define HAVE_RDTSC 0
%define HAVE_SEM_TIMEDWAIT 1
%define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/ia32/config.h b/chromium/config/Chrome/linux/ia32/config.h
index 90cae4e..41d8317 100644
--- a/chromium/config/Chrome/linux/ia32/config.h
+++ b/chromium/config/Chrome/linux/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -188,7 +187,7 @@
#define HAVE_ATOMIC_CAS_PTR 0
#define HAVE_MACHINE_RW_BARRIER 0
#define HAVE_MEMORYBARRIER 0
-#define HAVE_MM_EMPTY 1
+#define HAVE_MM_EMPTY 0
#define HAVE_RDTSC 0
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h b/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/mips64el/config.h b/chromium/config/Chrome/linux/mips64el/config.h
index 4178e4c..cf44108 100644
--- a/chromium/config/Chrome/linux/mips64el/config.h
+++ b/chromium/config/Chrome/linux/mips64el/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/mips64el/libavutil/ffversion.h b/chromium/config/Chrome/linux/mips64el/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/mips64el/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/mips64el/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/mipsel/config.h b/chromium/config/Chrome/linux/mipsel/config.h
index 54be269..f080101 100644
--- a/chromium/config/Chrome/linux/mipsel/config.h
+++ b/chromium/config/Chrome/linux/mipsel/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/mipsel/libavutil/ffversion.h b/chromium/config/Chrome/linux/mipsel/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/mipsel/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/mipsel/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/linux/x64/config.asm b/chromium/config/Chrome/linux/x64/config.asm
index f70f2b2..29eea21 100644
--- a/chromium/config/Chrome/linux/x64/config.asm
+++ b/chromium/config/Chrome/linux/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/x64/config.h b/chromium/config/Chrome/linux/x64/config.h
index c2aad2f..19cdfaa 100644
--- a/chromium/config/Chrome/linux/x64/config.h
+++ b/chromium/config/Chrome/linux/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/linux/x64/libavutil/ffversion.h b/chromium/config/Chrome/linux/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/linux/x64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/linux/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/mac/arm64/config.h b/chromium/config/Chrome/mac/arm64/config.h
index 4f57136..0ac7c2c 100644
--- a/chromium/config/Chrome/mac/arm64/config.h
+++ b/chromium/config/Chrome/mac/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/ssd/trunk_blink_tot/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/llvm-build/Release+Asserts/lib/clang/12.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME darwin
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -238,7 +236,7 @@
#define HAVE_VALGRIND_VALGRIND_H 0 /* #define HAVE_VALGRIND_VALGRIND_H 0 -- forced to 0. See https://crbug.com/590440 */
#define HAVE_WINDOWS_H 0
#define HAVE_WINSOCK2_H 0
-#define HAVE_INTRINSICS_NEON 1
+#define HAVE_INTRINSICS_NEON 0
#define HAVE_ATANF 1
#define HAVE_ATAN2F 1
#define HAVE_CBRT 1
@@ -351,7 +349,7 @@
#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
#define HAVE_PRAGMA_DEPRECATED 1
#define HAVE_RSYNC_CONTIMEOUT 1
-#define HAVE_SYMVER_ASM_LABEL 0
+#define HAVE_SYMVER_ASM_LABEL 1
#define HAVE_SYMVER_GNU_ASM 0
/* #define HAVE_VFP_ARGS 0 -- softfp/hardfp selection is done by the chrome build */
#define HAVE_XFORM_ASM 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h b/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/mac/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/mac/x64/config.asm b/chromium/config/Chrome/mac/x64/config.asm
index 7fc33be..983a8a9 100644
--- a/chromium/config/Chrome/mac/x64/config.asm
+++ b/chromium/config/Chrome/mac/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -335,7 +334,7 @@
%define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
%define HAVE_PRAGMA_DEPRECATED 1
%define HAVE_RSYNC_CONTIMEOUT 1
-%define HAVE_SYMVER_ASM_LABEL 0
+%define HAVE_SYMVER_ASM_LABEL 1
%define HAVE_SYMVER_GNU_ASM 0
%define HAVE_VFP_ARGS 0
%define HAVE_XFORM_ASM 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/mac/x64/config.h b/chromium/config/Chrome/mac/x64/config.h
index 92a50f2..b421819 100644
--- a/chromium/config/Chrome/mac/x64/config.h
+++ b/chromium/config/Chrome/mac/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/ssd/trunk_blink_tot/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags='-arch x86_64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/llvm-build/Release+Asserts/lib/clang/12.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags=-m64 --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME darwin
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -351,7 +349,7 @@
#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
#define HAVE_PRAGMA_DEPRECATED 1
#define HAVE_RSYNC_CONTIMEOUT 1
-#define HAVE_SYMVER_ASM_LABEL 0
+#define HAVE_SYMVER_ASM_LABEL 1
#define HAVE_SYMVER_GNU_ASM 0
#define HAVE_VFP_ARGS 0
#define HAVE_XFORM_ASM 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/mac/x64/libavutil/ffversion.h b/chromium/config/Chrome/mac/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/mac/x64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/mac/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/win/arm64/config.h b/chromium/config/Chrome/win/arm64/config.h
index 44c602d..8cdf6d3 100644
--- a/chromium/config/Chrome/win/arm64/config.h
+++ b/chromium/config/Chrome/win/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/arm64' --extra-ldflags='-libpath:/tmp/windows_build_ffmpeg0sG8TT' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegnpJGA8' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-ldflags='--target=arm64-windows' --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/arm64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win32
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/win/arm64/libavutil/ffversion.h b/chromium/config/Chrome/win/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/win/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/win/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/win/ia32/config.asm b/chromium/config/Chrome/win/ia32/config.asm
index da4cb64..486ef4d 100644
--- a/chromium/config/Chrome/win/ia32/config.asm
+++ b/chromium/config/Chrome/win/ia32/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 1
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/win/ia32/config.h b/chromium/config/Chrome/win/ia32/config.h
index 3a96714..62074f1 100644
--- a/chromium/config/Chrome/win/ia32/config.h
+++ b/chromium/config/Chrome/win/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x86' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegyUA9_h' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegEDND2F' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/x86' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/x86' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win32
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/win/ia32/libavutil/ffversion.h b/chromium/config/Chrome/win/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/win/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chrome/win/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chrome/win/x64/config.asm b/chromium/config/Chrome/win/x64/config.asm
index 1e1f04f..bc2b0db 100644
--- a/chromium/config/Chrome/win/x64/config.asm
+++ b/chromium/config/Chrome/win/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 1
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/win/x64/config.h b/chromium/config/Chrome/win/x64/config.h
index dd981de..5acbedf 100644
--- a/chromium/config/Chrome/win/x64/config.h
+++ b/chromium/config/Chrome/win/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x64' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegyC1L2b' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegsogwo4' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/x64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/x64' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win64
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chrome/win/x64/libavutil/ffversion.h b/chromium/config/Chrome/win/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chrome/win/x64/libavutil/ffversion.h
+++ b/chromium/config/Chrome/win/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux-noasm/x64/config.h b/chromium/config/ChromeOS/linux-noasm/x64/config.h
index e05abf1..d7ec792 100644
--- a/chromium/config/ChromeOS/linux-noasm/x64/config.h
+++ b/chromium/config/ChromeOS/linux-noasm/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h b/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux-noasm/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/arm-neon/config.h b/chromium/config/ChromeOS/linux/arm-neon/config.h
index 6ab6b10..9138a74 100644
--- a/chromium/config/ChromeOS/linux/arm-neon/config.h
+++ b/chromium/config/ChromeOS/linux/arm-neon/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/arm-neon/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/arm/config.h b/chromium/config/ChromeOS/linux/arm/config.h
index d6bcd6f..8000a0e 100644
--- a/chromium/config/ChromeOS/linux/arm/config.h
+++ b/chromium/config/ChromeOS/linux/arm/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/arm/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/arm64/config.h b/chromium/config/ChromeOS/linux/arm64/config.h
index d70ced0..4f0fba3 100644
--- a/chromium/config/ChromeOS/linux/arm64/config.h
+++ b/chromium/config/ChromeOS/linux/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/ia32/config.asm b/chromium/config/ChromeOS/linux/ia32/config.asm
index e020992..8b4d489 100644
--- a/chromium/config/ChromeOS/linux/ia32/config.asm
+++ b/chromium/config/ChromeOS/linux/ia32/config.asm
@@ -172,7 +172,7 @@
%define HAVE_ATOMIC_CAS_PTR 0
%define HAVE_MACHINE_RW_BARRIER 0
%define HAVE_MEMORYBARRIER 0
-%define HAVE_MM_EMPTY 1
+%define HAVE_MM_EMPTY 0
%define HAVE_RDTSC 0
%define HAVE_SEM_TIMEDWAIT 1
%define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/ia32/config.h b/chromium/config/ChromeOS/linux/ia32/config.h
index f4152b0..ff8b5d4 100644
--- a/chromium/config/ChromeOS/linux/ia32/config.h
+++ b/chromium/config/ChromeOS/linux/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -188,7 +187,7 @@
#define HAVE_ATOMIC_CAS_PTR 0
#define HAVE_MACHINE_RW_BARRIER 0
#define HAVE_MEMORYBARRIER 0
-#define HAVE_MM_EMPTY 1
+#define HAVE_MM_EMPTY 0
#define HAVE_RDTSC 0
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/mips64el/config.h b/chromium/config/ChromeOS/linux/mips64el/config.h
index 215d6fc..4aa8033 100644
--- a/chromium/config/ChromeOS/linux/mips64el/config.h
+++ b/chromium/config/ChromeOS/linux/mips64el/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/mips64el/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/mips64el/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/mips64el/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/mips64el/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/mipsel/config.h b/chromium/config/ChromeOS/linux/mipsel/config.h
index b1315b9..449c59a 100644
--- a/chromium/config/ChromeOS/linux/mipsel/config.h
+++ b/chromium/config/ChromeOS/linux/mipsel/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/mipsel/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/mipsel/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/mipsel/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/mipsel/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/ChromeOS/linux/x64/config.asm b/chromium/config/ChromeOS/linux/x64/config.asm
index a5a3106..76c758e 100644
--- a/chromium/config/ChromeOS/linux/x64/config.asm
+++ b/chromium/config/ChromeOS/linux/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/x64/config.h b/chromium/config/ChromeOS/linux/x64/config.h
index 60216f1..8b08475 100644
--- a/chromium/config/ChromeOS/linux/x64/config.h
+++ b/chromium/config/ChromeOS/linux/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi --enable-demuxer=amr --enable-decoder='amrnb,amrwb' --enable-decoder=gsm_ms --enable-parser=gsm" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h b/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h
+++ b/chromium/config/ChromeOS/linux/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/android/arm-neon/config.h b/chromium/config/Chromium/android/arm-neon/config.h
index e0d077b..5c58f7c 100644
--- a/chromium/config/Chromium/android/arm-neon/config.h
+++ b/chromium/config/Chromium/android/arm-neon/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi --extra-cflags='--target=arm-linux-androideabi21' --extra-ldflags='--target=arm-linux-androideabi21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/arm-linux-androideabi --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-neon --extra-cflags='-mtune=generic-armv7-a' --extra-cflags='-mfloat-abi=softfp' --extra-cflags='-mfpu=neon'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-16/arch-arm --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/arm-linux-androideabi --extra-cflags='--target=arm-linux-androideabi' --extra-ldflags='--target=arm-linux-androideabi' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/arm-linux-androideabi/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-neon --extra-cflags='-mtune=generic-armv7-a' --extra-cflags='-mfloat-abi=softfp' --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -256,8 +254,8 @@
#define HAVE_LDEXPF 1
#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
-#define HAVE_LOG2 1
-#define HAVE_LOG2F 1
+#define HAVE_LOG2 0
+#define HAVE_LOG2F 0
#define HAVE_LOG10F 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
@@ -310,7 +308,7 @@
#define HAVE_MPROTECT 1
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
-#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 1 -- forced to 0. See https://crbug.com/604451 */
+#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 0 -- forced to 0. See https://crbug.com/604451 */
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h b/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h
+++ b/chromium/config/Chromium/android/arm-neon/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/android/arm64/config.h b/chromium/config/Chromium/android/arm64/config.h
index df78bad..2e2512a 100644
--- a/chromium/config/Chromium/android/arm64/config.h
+++ b/chromium/config/Chromium/android/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android --extra-cflags='--target=aarch64-linux-android21' --extra-ldflags='--target=aarch64-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-21/arch-arm64 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android --extra-cflags='--target=aarch64-linux-android' --extra-ldflags='--target=aarch64-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/android/arm64/libavutil/ffversion.h b/chromium/config/Chromium/android/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/android/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/android/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/android/ia32/config.h b/chromium/config/Chromium/android/ia32/config.h
index d2c334c..aa6592f 100644
--- a/chromium/config/Chromium/android/ia32/config.h
+++ b/chromium/config/Chromium/android/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/i686-linux-android --extra-cflags='--target=i686-linux-android21' --extra-ldflags='--target=i686-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/i686-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --disable-x86asm" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-16/arch-x86 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/i686-linux-android --extra-cflags='--target=i686-linux-android' --extra-ldflags='--target=i686-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/i686-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --disable-x86asm --enable-pic --cc=clang --cxx=clang++ --ld=clang" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -256,8 +254,8 @@
#define HAVE_LDEXPF 1
#define HAVE_LLRINT 1
#define HAVE_LLRINTF 1
-#define HAVE_LOG2 1
-#define HAVE_LOG2F 1
+#define HAVE_LOG2 0
+#define HAVE_LOG2F 0
#define HAVE_LOG10F 1
#define HAVE_LRINT 1
#define HAVE_LRINTF 1
@@ -310,7 +308,7 @@
#define HAVE_MPROTECT 1
#define HAVE_NANOSLEEP 1
#define HAVE_PEEKNAMEDPIPE 0
-#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 1 -- forced to 0. See https://crbug.com/604451 */
+#define HAVE_POSIX_MEMALIGN 0 /* #define HAVE_POSIX_MEMALIGN 0 -- forced to 0. See https://crbug.com/604451 */
#define HAVE_PTHREAD_CANCEL 0
#define HAVE_SCHED_GETAFFINITY 1
#define HAVE_SECITEMIMPORT 0
@@ -341,7 +339,7 @@
#define HAVE_AS_OBJECT_ARCH 0
#define HAVE_ASM_MOD_Q 0
#define HAVE_BLOCKS_EXTENSION 0
-/* #define HAVE_EBP_AVAILABLE 1 -- ebp selection is done by the chrome build */
+/* #define HAVE_EBP_AVAILABLE 0 -- ebp selection is done by the chrome build */
#define HAVE_EBX_AVAILABLE 1
#define HAVE_GNU_AS 0
#define HAVE_GNU_WINDRES 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/android/ia32/libavutil/ffversion.h b/chromium/config/Chromium/android/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/android/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chromium/android/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/android/x64/config.asm b/chromium/config/Chromium/android/x64/config.asm
index d0be566..72c9286 100644
--- a/chromium/config/Chromium/android/x64/config.asm
+++ b/chromium/config/Chromium/android/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 0
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/android/x64/config.h b/chromium/config/Chromium/android/x64/config.h
index c75297d..b5c8098 100644
--- a/chromium/config/Chromium/android/x64/config.h
+++ b/chromium/config/Chromium/android/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-pic --cc=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --cxx=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --ld=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --enable-cross-compile --sysroot=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android --extra-cflags='--target=x86_64-linux-android21' --extra-ldflags='--target=x86_64-linux-android21' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android --extra-ldflags='--gcc-toolchain=/ssd/trunk_blink_tot/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=x86_64" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --enable-small --enable-cross-compile --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/platforms/android-21/arch-x86_64 --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/x86_64-linux-android --extra-cflags='--target=x86_64-linux-android' --extra-ldflags='--target=x86_64-linux-android' --extra-ldflags=-L/tmp/fakelinkerscripts --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/ --extra-ldflags='--gcc-toolchain=/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/' --target-os=android --arch=x86_64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "Android (6875598, based on r399163b) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)"
-#define OS_NAME android
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 0
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/android/x64/libavutil/ffversion.h b/chromium/config/Chromium/android/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/android/x64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/android/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux-noasm/x64/config.h b/chromium/config/Chromium/linux-noasm/x64/config.h
index 3689bd4..624227a 100644
--- a/chromium/config/Chromium/linux-noasm/x64/config.h
+++ b/chromium/config/Chromium/linux-noasm/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --disable-asm --disable-inline-asm --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h b/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux-noasm/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/arm-neon/config.h b/chromium/config/Chromium/linux/arm-neon/config.h
index 2ec9ad3..d920a13 100644
--- a/chromium/config/Chromium/linux/arm-neon/config.h
+++ b/chromium/config/Chromium/linux/arm-neon/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --enable-neon --extra-cflags='-mfpu=neon' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h b/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/arm-neon/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/arm/config.h b/chromium/config/Chromium/linux/arm/config.h
index bec905b..1371de8 100644
--- a/chromium/config/Chromium/linux/arm/config.h
+++ b/chromium/config/Chromium/linux/arm/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=arm --enable-armv6 --enable-armv6t2 --enable-vfp --enable-thumb --extra-cflags='-march=armv7-a' --enable-cross-compile --target-os=linux --extra-cflags='--target=arm-linux-gnueabihf' --extra-ldflags='--target=arm-linux-gnueabihf' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm-sysroot --extra-cflags='-mtune=cortex-a8' --extra-cflags='-mfloat-abi=hard' --extra-cflags=-O2 --disable-neon --extra-cflags='-mfpu=vfpv3-d16' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/arm/libavutil/ffversion.h b/chromium/config/Chromium/linux/arm/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/arm/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/arm/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/arm64/config.h b/chromium/config/Chromium/linux/arm64/config.h
index 1ef89d6..2bd6782 100644
--- a/chromium/config/Chromium/linux/arm64/config.h
+++ b/chromium/config/Chromium/linux/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-cross-compile --cross-prefix=/usr/bin/aarch64-linux-gnu- --target-os=linux --extra-cflags='--target=aarch64-linux-gnu' --extra-ldflags='--target=aarch64-linux-gnu' --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_arm64-sysroot --arch=aarch64 --enable-armv8 --extra-cflags='-march=armv8-a' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h b/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/ia32/config.asm b/chromium/config/Chromium/linux/ia32/config.asm
index 7da6b21..97ac7a7 100644
--- a/chromium/config/Chromium/linux/ia32/config.asm
+++ b/chromium/config/Chromium/linux/ia32/config.asm
@@ -172,7 +172,7 @@
%define HAVE_ATOMIC_CAS_PTR 0
%define HAVE_MACHINE_RW_BARRIER 0
%define HAVE_MEMORYBARRIER 0
-%define HAVE_MM_EMPTY 1
+%define HAVE_MM_EMPTY 0
%define HAVE_RDTSC 0
%define HAVE_SEM_TIMEDWAIT 1
%define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/ia32/config.h b/chromium/config/Chromium/linux/ia32/config.h
index 37bc36c..2be3ecf 100644
--- a/chromium/config/Chromium/linux/ia32/config.h
+++ b/chromium/config/Chromium/linux/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=i686 --extra-cflags='\"-m32\"' --extra-ldflags='\"-m32\"' --enable-pic --cc=clang --cxx=clang++ --ld=clang" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -188,7 +187,7 @@
#define HAVE_ATOMIC_CAS_PTR 0
#define HAVE_MACHINE_RW_BARRIER 0
#define HAVE_MEMORYBARRIER 0
-#define HAVE_MM_EMPTY 1
+#define HAVE_MM_EMPTY 0
#define HAVE_RDTSC 0
#define HAVE_SEM_TIMEDWAIT 1
#define HAVE_SYNC_VAL_COMPARE_AND_SWAP 1
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h b/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/mips64el/config.h b/chromium/config/Chromium/linux/mips64el/config.h
index 81d1d33..84bd14f 100644
--- a/chromium/config/Chromium/linux/mips64el/config.h
+++ b/chromium/config/Chromium/linux/mips64el/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mips64el --enable-mipsfpu --disable-mipsdsp --disable-mipsdspr2 --extra-cflags='-march=mips64el' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips64el-sysroot --enable-mips64r2 --disable-mips64r6 --disable-msa --extra-cflags='-mcpu=mips64r2' --extra-cflags='--target=mips64el-linux-gnuabi64' --extra-ldflags='--target=mips64el-linux-gnuabi64' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/mips64el/libavutil/ffversion.h b/chromium/config/Chromium/linux/mips64el/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/mips64el/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/mips64el/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/mipsel/config.h b/chromium/config/Chromium/linux/mipsel/config.h
index 968241e..cabcc0e 100644
--- a/chromium/config/Chromium/linux/mipsel/config.h
+++ b/chromium/config/Chromium/linux/mipsel/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/ssd/trunk_blink_tot/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=mipsel --disable-mips32r6 --disable-mips32r5 --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-mipsfpu --extra-cflags='-march=mipsel' --extra-cflags='-mcpu=mips32' --extra-ldflags='-z notext' --enable-cross-compile --target-os=linux --sysroot=/usr/local/google/home/ezemtsov/projects/chromium/src/build/linux/debian_sid_mips-sysroot --extra-cflags='--target=mipsel-linux-gnu' --extra-ldflags='--target=mipsel-linux-gnu' --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/mipsel/libavutil/ffversion.h b/chromium/config/Chromium/linux/mipsel/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/mipsel/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/mipsel/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/linux/x64/config.asm b/chromium/config/Chromium/linux/x64/config.asm
index 7403ecb..946313f 100644
--- a/chromium/config/Chromium/linux/x64/config.asm
+++ b/chromium/config/Chromium/linux/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 1
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/x64/config.h b/chromium/config/Chromium/linux/x64/config.h
index c36debb..2dab423 100644
--- a/chromium/config/Chromium/linux/x64/config.h
+++ b/chromium/config/Chromium/linux/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-lto --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME linux
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 1
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/linux/x64/libavutil/ffversion.h b/chromium/config/Chromium/linux/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/linux/x64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/linux/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/mac/arm64/config.h b/chromium/config/Chromium/mac/arm64/config.h
index 8dd2cb5..a46b138 100644
--- a/chromium/config/Chromium/mac/arm64/config.h
+++ b/chromium/config/Chromium/mac/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/ssd/trunk_blink_tot/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=arm64-apple-macosx' --extra-cflags=-F/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/llvm-build/Release+Asserts/lib/clang/12.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --arch=arm64 --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME darwin
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -238,7 +236,7 @@
#define HAVE_VALGRIND_VALGRIND_H 0 /* #define HAVE_VALGRIND_VALGRIND_H 0 -- forced to 0. See https://crbug.com/590440 */
#define HAVE_WINDOWS_H 0
#define HAVE_WINSOCK2_H 0
-#define HAVE_INTRINSICS_NEON 1
+#define HAVE_INTRINSICS_NEON 0
#define HAVE_ATANF 1
#define HAVE_ATAN2F 1
#define HAVE_CBRT 1
@@ -351,7 +349,7 @@
#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
#define HAVE_PRAGMA_DEPRECATED 1
#define HAVE_RSYNC_CONTIMEOUT 1
-#define HAVE_SYMVER_ASM_LABEL 0
+#define HAVE_SYMVER_ASM_LABEL 1
#define HAVE_SYMVER_GNU_ASM 0
/* #define HAVE_VFP_ARGS 0 -- softfp/hardfp selection is done by the chrome build */
#define HAVE_XFORM_ASM 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h b/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/mac/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/mac/x64/config.asm b/chromium/config/Chromium/mac/x64/config.asm
index 9edb430..b43510e 100644
--- a/chromium/config/Chromium/mac/x64/config.asm
+++ b/chromium/config/Chromium/mac/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 0
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -335,7 +334,7 @@
%define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
%define HAVE_PRAGMA_DEPRECATED 1
%define HAVE_RSYNC_CONTIMEOUT 1
-%define HAVE_SYMVER_ASM_LABEL 0
+%define HAVE_SYMVER_ASM_LABEL 1
%define HAVE_SYMVER_GNU_ASM 0
%define HAVE_VFP_ARGS 0
%define HAVE_XFORM_ASM 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/mac/x64/config.h b/chromium/config/Chromium/mac/x64/config.h
index 30cf8d0..c35c060 100644
--- a/chromium/config/Chromium/mac/x64/config.h
+++ b/chromium/config/Chromium/mac/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/ssd/trunk_blink_tot/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/ssd/trunk_blink_tot/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --extra-ldflags=-platform_version --extra-ldflags=macos --extra-ldflags=10.10 --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags='-arch x86_64'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --enable-pic --cc=clang --cxx=clang++ --ld=clang --enable-cross-compile --cc=clang --ld=ld64.lld --nm=llvm-nm --ar=llvm-ar --target-os=darwin --extra-cflags='--target=x86_64-apple-macosx' --extra-cflags=-F/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks --extra-cflags='-mmacosx-version-min=10.10' --extra-cflags=-fblocks --extra-cflags=-nostdinc --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include --extra-cflags=-isystem/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/llvm-build/Release+Asserts/lib/clang/12.0.0/include --extra-ldflags=-syslibroot --extra-ldflags=/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --extra-ldflags=-L/usr/local/google/home/ezemtsov/projects/chromium/src/build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib --extra-ldflags=-lSystem --extra-ldflags=-macosx_version_min --extra-ldflags=10.10 --extra-ldflags=-sdk_version --extra-ldflags=10.10 --arch=x86_64 --extra-cflags=-m64 --extra-ldflags=-m64" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME darwin
+#define CC_IDENT "clang version 9.0.1-14"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 0
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -351,7 +349,7 @@
#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
#define HAVE_PRAGMA_DEPRECATED 1
#define HAVE_RSYNC_CONTIMEOUT 1
-#define HAVE_SYMVER_ASM_LABEL 0
+#define HAVE_SYMVER_ASM_LABEL 1
#define HAVE_SYMVER_GNU_ASM 0
#define HAVE_VFP_ARGS 0
#define HAVE_XFORM_ASM 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/mac/x64/libavutil/ffversion.h b/chromium/config/Chromium/mac/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/mac/x64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/mac/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/win/arm64/config.h b/chromium/config/Chromium/win/arm64/config.h
index 7bb921b..01832fc 100644
--- a/chromium/config/Chromium/win/arm64/config.h
+++ b/chromium/config/Chromium/win/arm64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/arm64' --extra-ldflags='-libpath:/tmp/windows_build_ffmpeg0sG8TT' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegnpJGA8' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/arm64'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --arch=aarch64 --as=clang-cl --extra-cflags='--target=arm64-windows' --extra-ldflags='--target=arm64-windows' --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/arm64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/arm64'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win32
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/win/arm64/libavutil/ffversion.h b/chromium/config/Chromium/win/arm64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/win/arm64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/win/arm64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/win/ia32/config.asm b/chromium/config/Chromium/win/ia32/config.asm
index 0785529..ec1be8d 100644
--- a/chromium/config/Chromium/win/ia32/config.asm
+++ b/chromium/config/Chromium/win/ia32/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 1
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/win/ia32/config.h b/chromium/config/Chromium/win/ia32/config.h
index aaed39c..cda3dd8 100644
--- a/chromium/config/Chromium/win/ia32/config.h
+++ b/chromium/config/Chromium/win/ia32/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x86' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegyUA9_h' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegEDND2F' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/x86'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-m32 --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/x86' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/x86'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win32
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX "_"
#define EXTERN_ASM _
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/win/ia32/libavutil/ffversion.h b/chromium/config/Chromium/win/ia32/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/win/ia32/libavutil/ffversion.h
+++ b/chromium/config/Chromium/win/ia32/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/config/Chromium/win/x64/config.asm b/chromium/config/Chromium/win/x64/config.asm
index f37d123..6aeefde 100644
--- a/chromium/config/Chromium/win/x64/config.asm
+++ b/chromium/config/Chromium/win/x64/config.asm
@@ -201,7 +201,6 @@
%define HAVE_ES2_GL_H 0
%define HAVE_GSM_H 0
%define HAVE_IO_H 1
-%define HAVE_LINUX_DMA_BUF_H 0
%define HAVE_LINUX_PERF_EVENT_H 0
%define HAVE_MACHINE_IOCTL_BT848_H 0
%define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -713,7 +712,6 @@
%define CONFIG_PCM_RECHUNK_BSF 0
%define CONFIG_PRORES_METADATA_BSF 0
%define CONFIG_REMOVE_EXTRADATA_BSF 0
-%define CONFIG_SETTS_BSF 0
%define CONFIG_TEXT2MOVSUB_BSF 0
%define CONFIG_TRACE_HEADERS_BSF 0
%define CONFIG_TRUEHD_CORE_BSF 0
@@ -919,11 +917,9 @@
%define CONFIG_SANM_DECODER 0
%define CONFIG_SCPR_DECODER 0
%define CONFIG_SCREENPRESSO_DECODER 0
-%define CONFIG_SGA_DECODER 0
%define CONFIG_SGI_DECODER 0
%define CONFIG_SGIRLE_DECODER 0
%define CONFIG_SHEERVIDEO_DECODER 0
-%define CONFIG_SIMBIOSIS_IMX_DECODER 0
%define CONFIG_SMACKER_DECODER 0
%define CONFIG_SMC_DECODER 0
%define CONFIG_SMVJPEG_DECODER 0
@@ -1125,7 +1121,6 @@
%define CONFIG_PCM_S32LE_PLANAR_DECODER 0
%define CONFIG_PCM_S64BE_DECODER 0
%define CONFIG_PCM_S64LE_DECODER 0
-%define CONFIG_PCM_SGA_DECODER 0
%define CONFIG_PCM_U8_DECODER 1
%define CONFIG_PCM_U16BE_DECODER 0
%define CONFIG_PCM_U16LE_DECODER 0
@@ -1290,7 +1285,6 @@
%define CONFIG_DNXHD_ENCODER 0
%define CONFIG_DPX_ENCODER 0
%define CONFIG_DVVIDEO_ENCODER 0
-%define CONFIG_EXR_ENCODER 0
%define CONFIG_FFV1_ENCODER 0
%define CONFIG_FFVHUFF_ENCODER 0
%define CONFIG_FITS_ENCODER 0
@@ -1317,7 +1311,6 @@
%define CONFIG_PAM_ENCODER 0
%define CONFIG_PBM_ENCODER 0
%define CONFIG_PCX_ENCODER 0
-%define CONFIG_PFM_ENCODER 0
%define CONFIG_PGM_ENCODER 0
%define CONFIG_PGMYUV_ENCODER 0
%define CONFIG_PNG_ENCODER 0
@@ -1435,7 +1428,6 @@
%define CONFIG_SRT_ENCODER 0
%define CONFIG_SUBRIP_ENCODER 0
%define CONFIG_TEXT_ENCODER 0
-%define CONFIG_TTML_ENCODER 0
%define CONFIG_WEBVTT_ENCODER 0
%define CONFIG_XSUB_ENCODER 0
%define CONFIG_AAC_AT_ENCODER 0
@@ -1575,11 +1567,9 @@
%define CONFIG_BMP_PARSER 0
%define CONFIG_CAVSVIDEO_PARSER 0
%define CONFIG_COOK_PARSER 0
-%define CONFIG_CRI_PARSER 0
%define CONFIG_DCA_PARSER 0
%define CONFIG_DIRAC_PARSER 0
%define CONFIG_DNXHD_PARSER 0
-%define CONFIG_DOLBY_E_PARSER 0
%define CONFIG_DPX_PARSER 0
%define CONFIG_DVAUDIO_PARSER 0
%define CONFIG_DVBSUB_PARSER 0
@@ -1615,7 +1605,6 @@
%define CONFIG_VP8_PARSER 1
%define CONFIG_VP9_PARSER 1
%define CONFIG_WEBP_PARSER 0
-%define CONFIG_XBM_PARSER 0
%define CONFIG_XMA_PARSER 0
%define CONFIG_ALSA_INDEV 0
%define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1666,7 +1655,6 @@
%define CONFIG_AECHO_FILTER 0
%define CONFIG_AEMPHASIS_FILTER 0
%define CONFIG_AEVAL_FILTER 0
-%define CONFIG_AEXCITER_FILTER 0
%define CONFIG_AFADE_FILTER 0
%define CONFIG_AFFTDN_FILTER 0
%define CONFIG_AFFTFILT_FILTER 0
@@ -1811,16 +1799,12 @@
%define CONFIG_CODECVIEW_FILTER 0
%define CONFIG_COLORBALANCE_FILTER 0
%define CONFIG_COLORCHANNELMIXER_FILTER 0
-%define CONFIG_COLORCONTRAST_FILTER 0
-%define CONFIG_COLORCORRECT_FILTER 0
-%define CONFIG_COLORIZE_FILTER 0
%define CONFIG_COLORKEY_FILTER 0
%define CONFIG_COLORKEY_OPENCL_FILTER 0
%define CONFIG_COLORHOLD_FILTER 0
%define CONFIG_COLORLEVELS_FILTER 0
%define CONFIG_COLORMATRIX_FILTER 0
%define CONFIG_COLORSPACE_FILTER 0
-%define CONFIG_COLORTEMPERATURE_FILTER 0
%define CONFIG_CONVOLUTION_FILTER 0
%define CONFIG_CONVOLUTION_OPENCL_FILTER 0
%define CONFIG_CONVOLVE_FILTER 0
@@ -1863,12 +1847,9 @@
%define CONFIG_EDGEDETECT_FILTER 0
%define CONFIG_ELBG_FILTER 0
%define CONFIG_ENTROPY_FILTER 0
-%define CONFIG_EPX_FILTER 0
%define CONFIG_EQ_FILTER 0
%define CONFIG_EROSION_FILTER 0
%define CONFIG_EROSION_OPENCL_FILTER 0
-%define CONFIG_ESTDIF_FILTER 0
-%define CONFIG_EXPOSURE_FILTER 0
%define CONFIG_EXTRACTPLANES_FILTER 0
%define CONFIG_FADE_FILTER 0
%define CONFIG_FFTDNOIZ_FILTER 0
@@ -1907,14 +1888,12 @@
%define CONFIG_HWUPLOAD_FILTER 0
%define CONFIG_HWUPLOAD_CUDA_FILTER 0
%define CONFIG_HYSTERESIS_FILTER 0
-%define CONFIG_IDENTITY_FILTER 0
%define CONFIG_IDET_FILTER 0
%define CONFIG_IL_FILTER 0
%define CONFIG_INFLATE_FILTER 0
%define CONFIG_INTERLACE_FILTER 0
%define CONFIG_INTERLEAVE_FILTER 0
%define CONFIG_KERNDEINT_FILTER 0
-%define CONFIG_KIRSCH_FILTER 0
%define CONFIG_LAGFUN_FILTER 0
%define CONFIG_LENSCORRECTION_FILTER 0
%define CONFIG_LENSFUN_FILTER 0
@@ -1942,9 +1921,7 @@
%define CONFIG_MIDEQUALIZER_FILTER 0
%define CONFIG_MINTERPOLATE_FILTER 0
%define CONFIG_MIX_FILTER 0
-%define CONFIG_MONOCHROME_FILTER 0
%define CONFIG_MPDECIMATE_FILTER 0
-%define CONFIG_MSAD_FILTER 0
%define CONFIG_NEGATE_FILTER 0
%define CONFIG_NLMEANS_FILTER 0
%define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2018,11 +1995,9 @@
%define CONFIG_SETSAR_FILTER 0
%define CONFIG_SETTB_FILTER 0
%define CONFIG_SHARPNESS_VAAPI_FILTER 0
-%define CONFIG_SHEAR_FILTER 0
%define CONFIG_SHOWINFO_FILTER 0
%define CONFIG_SHOWPALETTE_FILTER 0
%define CONFIG_SHUFFLEFRAMES_FILTER 0
-%define CONFIG_SHUFFLEPIXELS_FILTER 0
%define CONFIG_SHUFFLEPLANES_FILTER 0
%define CONFIG_SIDEDATA_FILTER 0
%define CONFIG_SIGNALSTATS_FILTER 0
@@ -2050,7 +2025,6 @@
%define CONFIG_TINTERLACE_FILTER 0
%define CONFIG_TLUT2_FILTER 0
%define CONFIG_TMEDIAN_FILTER 0
-%define CONFIG_TMIDEQUALIZER_FILTER 0
%define CONFIG_TMIX_FILTER 0
%define CONFIG_TONEMAP_FILTER 0
%define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2074,7 +2048,6 @@
%define CONFIG_VIBRANCE_FILTER 0
%define CONFIG_VIDSTABDETECT_FILTER 0
%define CONFIG_VIDSTABTRANSFORM_FILTER 0
-%define CONFIG_VIF_FILTER 0
%define CONFIG_VIGNETTE_FILTER 0
%define CONFIG_VMAFMOTION_FILTER 0
%define CONFIG_VPP_QSV_FILTER 0
@@ -2181,7 +2154,6 @@
%define CONFIG_BFI_DEMUXER 0
%define CONFIG_BINTEXT_DEMUXER 0
%define CONFIG_BINK_DEMUXER 0
-%define CONFIG_BINKA_DEMUXER 0
%define CONFIG_BIT_DEMUXER 0
%define CONFIG_BMV_DEMUXER 0
%define CONFIG_BFSTM_DEMUXER 0
@@ -2371,10 +2343,8 @@
%define CONFIG_SDX_DEMUXER 0
%define CONFIG_SEGAFILM_DEMUXER 0
%define CONFIG_SER_DEMUXER 0
-%define CONFIG_SGA_DEMUXER 0
%define CONFIG_SHORTEN_DEMUXER 0
%define CONFIG_SIFF_DEMUXER 0
-%define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
%define CONFIG_SLN_DEMUXER 0
%define CONFIG_SMACKER_DEMUXER 0
%define CONFIG_SMJPEG_DEMUXER 0
@@ -2459,7 +2429,6 @@
%define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
%define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
%define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-%define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
%define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
%define CONFIG_LIBGME_DEMUXER 0
@@ -2620,7 +2589,6 @@
%define CONFIG_MKVTIMESTAMP_V2_MUXER 0
%define CONFIG_TRUEHD_MUXER 0
%define CONFIG_TTA_MUXER 0
-%define CONFIG_TTML_MUXER 0
%define CONFIG_UNCODEDFRAMECRC_MUXER 0
%define CONFIG_VC1_MUXER 0
%define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/win/x64/config.h b/chromium/config/Chromium/win/x64/config.h
index 788a3a2..231f09e 100644
--- a/chromium/config/Chromium/win/x64/config.h
+++ b/chromium/config/Chromium/win/x64/config.h
@@ -1,13 +1,12 @@
/* Automatically generated by configure - do not modify! */
#ifndef FFMPEG_CONFIG_H
#define FFMPEG_CONFIG_H
-/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/ssd/trunk_blink_tot/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=/winsysroot/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x64' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegyC1L2b' --extra-ldflags='-libpath:/tmp/windows_build_ffmpegsogwo4' --extra-ldflags='-libpath:/ssd/trunk_blink_tot/src/third_party/depot_tools/win_toolchain/vs_files/20d5f2553f/VC/Tools/MSVC/14.26.28801/lib/x64'" -- elide long configuration string from binary */
+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-fft --enable-rdft --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-lzo --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --toolchain=msvc --extra-cflags=-I/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/chromium/include/win --target-os=win64 --enable-cross-compile --cc=clang-cl --ld=lld-link --nm=llvm-nm --ar=llvm-ar --extra-cflags=-O2 --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/um --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/shared --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/winrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Include/10.0.19041.0/ucrt --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/include --extra-cflags=-imsvc/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/ffmpeg/../depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/include --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/atlmfc/lib/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/ucrt/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/win_sdk/Lib/10.0.19041.0/um/x64' --extra-ldflags='-libpath:/usr/local/google/home/ezemtsov/projects/chromium/src/third_party/depot_tools/win_toolchain/vs_files/a687d8e2e4114d9015eb550e1b156af21381faac/VC/Tools/MSVC/14.26.28801/lib/x64'" -- elide long configuration string from binary */
#define FFMPEG_LICENSE "LGPL version 2.1 or later"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-#define CC_IDENT "clang version 13.0.0 (https://github.com/llvm/llvm-project/ fe5c2c3ca682b140dd5e640e75948363b6b25ef9)"
-#define OS_NAME win64
+#define CC_IDENT "clang version 12.0.0 (https://github.com/llvm/llvm-project/ 6ee22ca6ceb71661e8dbc296b471ace0614c07e5)"
#define av_restrict restrict
#define EXTERN_PREFIX ""
#define EXTERN_ASM
@@ -217,7 +216,6 @@
#define HAVE_ES2_GL_H 0
#define HAVE_GSM_H 0
#define HAVE_IO_H 1
-#define HAVE_LINUX_DMA_BUF_H 0
#define HAVE_LINUX_PERF_EVENT_H 0
#define HAVE_MACHINE_IOCTL_BT848_H 0
#define HAVE_MACHINE_IOCTL_METEOR_H 0
@@ -729,7 +727,6 @@
#define CONFIG_PCM_RECHUNK_BSF 0
#define CONFIG_PRORES_METADATA_BSF 0
#define CONFIG_REMOVE_EXTRADATA_BSF 0
-#define CONFIG_SETTS_BSF 0
#define CONFIG_TEXT2MOVSUB_BSF 0
#define CONFIG_TRACE_HEADERS_BSF 0
#define CONFIG_TRUEHD_CORE_BSF 0
@@ -935,11 +932,9 @@
#define CONFIG_SANM_DECODER 0
#define CONFIG_SCPR_DECODER 0
#define CONFIG_SCREENPRESSO_DECODER 0
-#define CONFIG_SGA_DECODER 0
#define CONFIG_SGI_DECODER 0
#define CONFIG_SGIRLE_DECODER 0
#define CONFIG_SHEERVIDEO_DECODER 0
-#define CONFIG_SIMBIOSIS_IMX_DECODER 0
#define CONFIG_SMACKER_DECODER 0
#define CONFIG_SMC_DECODER 0
#define CONFIG_SMVJPEG_DECODER 0
@@ -1141,7 +1136,6 @@
#define CONFIG_PCM_S32LE_PLANAR_DECODER 0
#define CONFIG_PCM_S64BE_DECODER 0
#define CONFIG_PCM_S64LE_DECODER 0
-#define CONFIG_PCM_SGA_DECODER 0
#define CONFIG_PCM_U8_DECODER 1
#define CONFIG_PCM_U16BE_DECODER 0
#define CONFIG_PCM_U16LE_DECODER 0
@@ -1306,7 +1300,6 @@
#define CONFIG_DNXHD_ENCODER 0
#define CONFIG_DPX_ENCODER 0
#define CONFIG_DVVIDEO_ENCODER 0
-#define CONFIG_EXR_ENCODER 0
#define CONFIG_FFV1_ENCODER 0
#define CONFIG_FFVHUFF_ENCODER 0
#define CONFIG_FITS_ENCODER 0
@@ -1333,7 +1326,6 @@
#define CONFIG_PAM_ENCODER 0
#define CONFIG_PBM_ENCODER 0
#define CONFIG_PCX_ENCODER 0
-#define CONFIG_PFM_ENCODER 0
#define CONFIG_PGM_ENCODER 0
#define CONFIG_PGMYUV_ENCODER 0
#define CONFIG_PNG_ENCODER 0
@@ -1451,7 +1443,6 @@
#define CONFIG_SRT_ENCODER 0
#define CONFIG_SUBRIP_ENCODER 0
#define CONFIG_TEXT_ENCODER 0
-#define CONFIG_TTML_ENCODER 0
#define CONFIG_WEBVTT_ENCODER 0
#define CONFIG_XSUB_ENCODER 0
#define CONFIG_AAC_AT_ENCODER 0
@@ -1591,11 +1582,9 @@
#define CONFIG_BMP_PARSER 0
#define CONFIG_CAVSVIDEO_PARSER 0
#define CONFIG_COOK_PARSER 0
-#define CONFIG_CRI_PARSER 0
#define CONFIG_DCA_PARSER 0
#define CONFIG_DIRAC_PARSER 0
#define CONFIG_DNXHD_PARSER 0
-#define CONFIG_DOLBY_E_PARSER 0
#define CONFIG_DPX_PARSER 0
#define CONFIG_DVAUDIO_PARSER 0
#define CONFIG_DVBSUB_PARSER 0
@@ -1631,7 +1620,6 @@
#define CONFIG_VP8_PARSER 1
#define CONFIG_VP9_PARSER 1
#define CONFIG_WEBP_PARSER 0
-#define CONFIG_XBM_PARSER 0
#define CONFIG_XMA_PARSER 0
#define CONFIG_ALSA_INDEV 0
#define CONFIG_ANDROID_CAMERA_INDEV 0
@@ -1682,7 +1670,6 @@
#define CONFIG_AECHO_FILTER 0
#define CONFIG_AEMPHASIS_FILTER 0
#define CONFIG_AEVAL_FILTER 0
-#define CONFIG_AEXCITER_FILTER 0
#define CONFIG_AFADE_FILTER 0
#define CONFIG_AFFTDN_FILTER 0
#define CONFIG_AFFTFILT_FILTER 0
@@ -1827,16 +1814,12 @@
#define CONFIG_CODECVIEW_FILTER 0
#define CONFIG_COLORBALANCE_FILTER 0
#define CONFIG_COLORCHANNELMIXER_FILTER 0
-#define CONFIG_COLORCONTRAST_FILTER 0
-#define CONFIG_COLORCORRECT_FILTER 0
-#define CONFIG_COLORIZE_FILTER 0
#define CONFIG_COLORKEY_FILTER 0
#define CONFIG_COLORKEY_OPENCL_FILTER 0
#define CONFIG_COLORHOLD_FILTER 0
#define CONFIG_COLORLEVELS_FILTER 0
#define CONFIG_COLORMATRIX_FILTER 0
#define CONFIG_COLORSPACE_FILTER 0
-#define CONFIG_COLORTEMPERATURE_FILTER 0
#define CONFIG_CONVOLUTION_FILTER 0
#define CONFIG_CONVOLUTION_OPENCL_FILTER 0
#define CONFIG_CONVOLVE_FILTER 0
@@ -1879,12 +1862,9 @@
#define CONFIG_EDGEDETECT_FILTER 0
#define CONFIG_ELBG_FILTER 0
#define CONFIG_ENTROPY_FILTER 0
-#define CONFIG_EPX_FILTER 0
#define CONFIG_EQ_FILTER 0
#define CONFIG_EROSION_FILTER 0
#define CONFIG_EROSION_OPENCL_FILTER 0
-#define CONFIG_ESTDIF_FILTER 0
-#define CONFIG_EXPOSURE_FILTER 0
#define CONFIG_EXTRACTPLANES_FILTER 0
#define CONFIG_FADE_FILTER 0
#define CONFIG_FFTDNOIZ_FILTER 0
@@ -1923,14 +1903,12 @@
#define CONFIG_HWUPLOAD_FILTER 0
#define CONFIG_HWUPLOAD_CUDA_FILTER 0
#define CONFIG_HYSTERESIS_FILTER 0
-#define CONFIG_IDENTITY_FILTER 0
#define CONFIG_IDET_FILTER 0
#define CONFIG_IL_FILTER 0
#define CONFIG_INFLATE_FILTER 0
#define CONFIG_INTERLACE_FILTER 0
#define CONFIG_INTERLEAVE_FILTER 0
#define CONFIG_KERNDEINT_FILTER 0
-#define CONFIG_KIRSCH_FILTER 0
#define CONFIG_LAGFUN_FILTER 0
#define CONFIG_LENSCORRECTION_FILTER 0
#define CONFIG_LENSFUN_FILTER 0
@@ -1958,9 +1936,7 @@
#define CONFIG_MIDEQUALIZER_FILTER 0
#define CONFIG_MINTERPOLATE_FILTER 0
#define CONFIG_MIX_FILTER 0
-#define CONFIG_MONOCHROME_FILTER 0
#define CONFIG_MPDECIMATE_FILTER 0
-#define CONFIG_MSAD_FILTER 0
#define CONFIG_NEGATE_FILTER 0
#define CONFIG_NLMEANS_FILTER 0
#define CONFIG_NLMEANS_OPENCL_FILTER 0
@@ -2034,11 +2010,9 @@
#define CONFIG_SETSAR_FILTER 0
#define CONFIG_SETTB_FILTER 0
#define CONFIG_SHARPNESS_VAAPI_FILTER 0
-#define CONFIG_SHEAR_FILTER 0
#define CONFIG_SHOWINFO_FILTER 0
#define CONFIG_SHOWPALETTE_FILTER 0
#define CONFIG_SHUFFLEFRAMES_FILTER 0
-#define CONFIG_SHUFFLEPIXELS_FILTER 0
#define CONFIG_SHUFFLEPLANES_FILTER 0
#define CONFIG_SIDEDATA_FILTER 0
#define CONFIG_SIGNALSTATS_FILTER 0
@@ -2066,7 +2040,6 @@
#define CONFIG_TINTERLACE_FILTER 0
#define CONFIG_TLUT2_FILTER 0
#define CONFIG_TMEDIAN_FILTER 0
-#define CONFIG_TMIDEQUALIZER_FILTER 0
#define CONFIG_TMIX_FILTER 0
#define CONFIG_TONEMAP_FILTER 0
#define CONFIG_TONEMAP_OPENCL_FILTER 0
@@ -2090,7 +2063,6 @@
#define CONFIG_VIBRANCE_FILTER 0
#define CONFIG_VIDSTABDETECT_FILTER 0
#define CONFIG_VIDSTABTRANSFORM_FILTER 0
-#define CONFIG_VIF_FILTER 0
#define CONFIG_VIGNETTE_FILTER 0
#define CONFIG_VMAFMOTION_FILTER 0
#define CONFIG_VPP_QSV_FILTER 0
@@ -2197,7 +2169,6 @@
#define CONFIG_BFI_DEMUXER 0
#define CONFIG_BINTEXT_DEMUXER 0
#define CONFIG_BINK_DEMUXER 0
-#define CONFIG_BINKA_DEMUXER 0
#define CONFIG_BIT_DEMUXER 0
#define CONFIG_BMV_DEMUXER 0
#define CONFIG_BFSTM_DEMUXER 0
@@ -2387,10 +2358,8 @@
#define CONFIG_SDX_DEMUXER 0
#define CONFIG_SEGAFILM_DEMUXER 0
#define CONFIG_SER_DEMUXER 0
-#define CONFIG_SGA_DEMUXER 0
#define CONFIG_SHORTEN_DEMUXER 0
#define CONFIG_SIFF_DEMUXER 0
-#define CONFIG_SIMBIOSIS_IMX_DEMUXER 0
#define CONFIG_SLN_DEMUXER 0
#define CONFIG_SMACKER_DEMUXER 0
#define CONFIG_SMJPEG_DEMUXER 0
@@ -2475,7 +2444,6 @@
#define CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER 0
#define CONFIG_IMAGE_TIFF_PIPE_DEMUXER 0
#define CONFIG_IMAGE_WEBP_PIPE_DEMUXER 0
-#define CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XPM_PIPE_DEMUXER 0
#define CONFIG_IMAGE_XWD_PIPE_DEMUXER 0
#define CONFIG_LIBGME_DEMUXER 0
@@ -2636,7 +2604,6 @@
#define CONFIG_MKVTIMESTAMP_V2_MUXER 0
#define CONFIG_TRUEHD_MUXER 0
#define CONFIG_TTA_MUXER 0
-#define CONFIG_TTML_MUXER 0
#define CONFIG_UNCODEDFRAMECRC_MUXER 0
#define CONFIG_VC1_MUXER 0
#define CONFIG_VC1T_MUXER 0
diff --git a/chromium/config/Chromium/win/x64/libavutil/ffversion.h b/chromium/config/Chromium/win/x64/libavutil/ffversion.h
index 056bc62..367a7f7 100644
--- a/chromium/config/Chromium/win/x64/libavutil/ffversion.h
+++ b/chromium/config/Chromium/win/x64/libavutil/ffversion.h
@@ -1,5 +1,5 @@
/* Automatically generated by version.sh, do not manually edit! */
#ifndef AVUTIL_FFVERSION_H
#define AVUTIL_FFVERSION_H
-#define FFMPEG_VERSION "N-102522-gec861011d1"
+#define FFMPEG_VERSION "N-101445-g2e5e8668e9"
#endif /* AVUTIL_FFVERSION_H */
diff --git a/chromium/ffmpeg.sigs b/chromium/ffmpeg.sigs
index 8ee3a26..7c06a94 100755
--- a/chromium/ffmpeg.sigs
+++ b/chromium/ffmpeg.sigs
@@ -23,8 +23,6 @@
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par);
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt);
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame);
-AVPacket *av_packet_alloc(void);
-void av_packet_free(AVPacket **pkt);
// RDFT functions.
RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
diff --git a/chromium/patches/README b/chromium/patches/README
index ea76002..a7bac8c 100644
--- a/chromium/patches/README
+++ b/chromium/patches/README
@@ -1,5 +1,5 @@
---------------------------------------------------------------------
--- Chromium Patches. Autogenerated by find_patches.py, do not edit --
+-- Chromium Patches. Autogenerated by find_patches.pyc, do not edit --
---------------------------------------------------------------------
@@ -795,6 +795,26 @@
libavcodec/h264dec.c
------------------------------------------------------------------
+commit 252792a1ff65deadc4e627e59ce80b8811c5a5de
+Author: Thomas Guilbert <tguilbert@chromium.org>
+Date: Mon Dec 9 17:09:54 2019 -0800
+
+ Fix null pointer addition error
+
+ Clusterfuzz uncovered a scenario in which 0 is added to a null pointer,
+ which is undefined behavior. This CL fixes the issue by checking the
+ pointer is null before incrementing it.
+
+ BUG= 1027047, 1028812
+
+ Change-Id: I160c7e36134687a7d2ef4099078d89a714c8cfe4
+ Reviewed-on: https://chromium-review.googlesource.com/c/chromium/third_party/ffmpeg/+/1958714
+ Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
+
+Affects:
+ libavformat/utils.c
+
+------------------------------------------------------------------
commit 6a44f89787a6103bf85825aac5b7bcfdba0dde5f
Merge: c5003c8e13 acbd950ed2
Author: John Rummell <jrummell@chromium.org>
@@ -922,47 +942,3 @@
Affects:
libavformat/mp3dec.c
-------------------------------------------------------------------
-commit afa2b4327ab4beb4cd47f6cf4e59df620b5d6e4f
-Author: Matt Wolenetz <wolenetz@chromium.org>
-Date: Wed Mar 10 16:57:29 2021 -0800
-
- Update mac build_ffmpeg and configure to work with ld64.lld changes
-
- The minimal linking done with real, yet unstable, ld64.lld no longer
- recognizes "-m64", needs "-arch x64_64" instead, and needs a
- "-platform_version <platform> <min_version> <sdk_version>" set of
- arguments. Beyond the initial configure step, build_ffmpeg for mac
- cross-compilation still uses a fake linker.
-
- Also, ld64.lld now issues error instead of warning for unrecognized
- arguments '-Wl,-dynamic,-search_paths_first' inserted by configure,
- causing misdetection of features due to widespread link failures in
- configure's probing, resulting in build_ffmpeg.py failure. This change
- updates our downstream configure script to not insert those options.
-
- BUG=1170998
-
- Change-Id: If6d5a73f23bf8b6d3053961e13e89b0c50ccd8a6
- Reviewed-on: https://chromium-review.googlesource.com/c/chromium/third_party/ffmpeg/+/2749496
- Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
-
-Affects:
- configure
-
-------------------------------------------------------------------
-commit 7c13bac566ff75ef1821adcc4f08935d84c0c5dd
-Author: Matt Wolenetz <wolenetz@chromium.org>
-Date: Mon Mar 29 16:06:42 2021 -0700
-
- Always use av_realloc_array() for nal->skipped_bytes_pos
-
- Mixing av_malloc_array() with av_realloc_array() does not work when
- posix_memalign() is available.
-
- BUG=1193797,721872
- TEST=No repro of scenario in crbug with patch applied.
-
-Affects:
- libavcodec/h2645_parse.c
-
diff --git a/chromium/patches/config_flag_changes.txt b/chromium/patches/config_flag_changes.txt
index 57e94e5..36bc0f2 100644
--- a/chromium/patches/config_flag_changes.txt
+++ b/chromium/patches/config_flag_changes.txt
@@ -1,44 +1,37 @@
-+ CONFIG_AEXCITER_FILTER 0
-+ CONFIG_BINKA_DEMUXER 0
-+ CONFIG_COLORCONTRAST_FILTER 0
-+ CONFIG_COLORCORRECT_FILTER 0
-+ CONFIG_COLORIZE_FILTER 0
-+ CONFIG_COLORTEMPERATURE_FILTER 0
-+ CONFIG_CRI_PARSER 0
-+ CONFIG_DOLBY_E_PARSER 0
-+ CONFIG_EPX_FILTER 0
-+ CONFIG_ESTDIF_FILTER 0
-+ CONFIG_EXPOSURE_FILTER 0
-+ CONFIG_EXR_ENCODER 0
-+ CONFIG_IDENTITY_FILTER 0
-+ CONFIG_IMAGE_XBM_PIPE_DEMUXER 0
-+ CONFIG_KIRSCH_FILTER 0
-+ CONFIG_MONOCHROME_FILTER 0
-+ CONFIG_MSAD_FILTER 0
-+ CONFIG_PCM_SGA_DECODER 0
-+ CONFIG_PFM_ENCODER 0
-+ CONFIG_SETTS_BSF 0
-+ CONFIG_SGA_DECODER 0
-+ CONFIG_SGA_DEMUXER 0
-+ CONFIG_SHEAR_FILTER 0
-+ CONFIG_SHUFFLEPIXELS_FILTER 0
-+ CONFIG_SIMBIOSIS_IMX_DECODER 0
-+ CONFIG_SIMBIOSIS_IMX_DEMUXER 0
-- CONFIG_THIS_YEAR 2020
-+ CONFIG_THIS_YEAR 2021
-+ CONFIG_TMIDEQUALIZER_FILTER 0
-+ CONFIG_TTML_ENCODER 0
-+ CONFIG_TTML_MUXER 0
-+ CONFIG_VIF_FILTER 0
-+ CONFIG_XBM_PARSER 0
-- HAVE_INTRINSICS_NEON 0
-+ HAVE_INTRINSICS_NEON 1
-+ HAVE_LINUX_DMA_BUF_H 0
-- HAVE_LOG2 0
-+ HAVE_LOG2 1
-- HAVE_LOG2F 0
-+ HAVE_LOG2F 1
-- HAVE_MM_EMPTY 0
-+ HAVE_MM_EMPTY 1
-+ HAVE_SYMVER_ASM_LABEL 0
-- HAVE_SYMVER_ASM_LABEL 1
++ CONFIG_ACE_DEMUXER 0
++ CONFIG_ADENORM_FILTER 0
++ CONFIG_ADPCM_IMA_ALP_ENCODER 0
++ CONFIG_ADPCM_IMA_AMV_ENCODER 0
++ CONFIG_AFREQSHIFT_FILTER 0
++ CONFIG_ALP_MUXER 0
++ CONFIG_AMV_MUXER 0
++ CONFIG_APHASESHIFT_FILTER 0
++ CONFIG_ASUBCUT_FILTER 0
++ CONFIG_ASUPERCUT_FILTER 0
++ CONFIG_ASUPERPASS_FILTER 0
++ CONFIG_ASUPERSTOP_FILTER 0
++ CONFIG_AV1_CUVID_DECODER 0
++ CONFIG_AV1_D3D11VA2_HWACCEL 0
++ CONFIG_AV1_D3D11VA_HWACCEL 0
++ CONFIG_AV1_DXVA2_HWACCEL 0
++ CONFIG_AV1_NVDEC_HWACCEL 0
++ CONFIG_AV1_QSV_DECODER 0
++ CONFIG_AV1_VAAPI_HWACCEL 0
++ CONFIG_AVS3_DEMUXER 0
++ CONFIG_AVS3_PARSER 0
++ CONFIG_CRI_DECODER 0
++ CONFIG_IMAGE_CRI_PIPE_DEMUXER 0
++ CONFIG_LIBUAVS3D 0
++ CONFIG_LIBUAVS3D_DECODER 0
+- CONFIG_LIBWAVPACK 0
+- CONFIG_LIBWAVPACK_ENCODER 0
++ CONFIG_MSP2_DECODER 0
++ CONFIG_MSP_DEMUXER 0
++ CONFIG_SPEECHNORM_FILTER 0
++ CONFIG_SPEEDHQ_ENCODER 0
++ HAVE_INTRINSICS_NEON 0
+- HAVE_INTRINSICS_NEON 1
++ HAVE_MM_EMPTY 0
+- HAVE_MM_EMPTY 1
++ HAVE_VALGRIND_VALGRIND_H 0 ; HAVE_VALGRIND_VALGRIND_H 0 -- forced to 0. See https://crbug.com/590440
+- HAVE_VALGRIND_VALGRIND_H 0 ; HAVE_VALGRIND_VALGRIND_H 1 -- forced to 0. See https://crbug.com/590440
diff --git a/chromium/scripts/build_ffmpeg.py b/chromium/scripts/build_ffmpeg.py
index fcdba5a..b51f479 100755
--- a/chromium/scripts/build_ffmpeg.py
+++ b/chromium/scripts/build_ffmpeg.py
@@ -6,7 +6,6 @@
from __future__ import print_function
-import atexit
import collections
import functools
import glob
@@ -14,12 +13,10 @@
import os
import platform
import re
-import shlex
import shutil
import signal
import subprocess
import sys
-import tempfile
SCRIPTS_DIR = os.path.abspath(os.path.dirname(__file__))
FFMPEG_DIR = os.path.abspath(os.path.join(SCRIPTS_DIR, '..', '..'))
@@ -168,99 +165,58 @@
f.write(contents)
-# Class for determining the 32-bit and 64-bit Android API levels that Chromium
-# uses. Since @functools.cache is not available for easy memoization of the
-# determination result, we use a lazy singleton instance constructed by calling
-# Get().
-class AndroidApiLevels:
- __instance = None
+# Extracts the Android api level from the Android config.gni.
+# Returns (api level, api 64 level).
+def GetAndroidApiLevel():
+ android_config_gni = os.path.join(CHROMIUM_ROOT_DIR, 'build', 'config',
+ 'android', 'config.gni')
+ with open(android_config_gni, 'r') as f:
+ gni_contents = f.read()
+ api64_match = re.search('android64_ndk_api_level\s*=\s*(\d{2})',
+ gni_contents)
+ api_match = re.search('android32_ndk_api_level\s*=\s*(\d{2})', gni_contents)
+ if not api_match or not api64_match:
+ raise Exception('Failed to find the android api level or toolchain '
+ 'version in ' + android_config_gni)
- # Extracts the Android API levels from the Chromium Android GN config.
- # Before Q1 2021, these were grep'able from build/config/android/config.gni.
- # With conditional logic introduced in that gni file, we seek to avoid fragility
- # going forwards, at the cost of creating a full temporary GN Chromium Android
- # build configuration just to extract the API levels here. Caches the results
- # in api32 and api64 instance variables.
- def Setup(self):
- print('Creating a temporary GN config to retrieve Android API levels:')
-
- # Make a temporary GN build output folder
- # No tempfile.TemporaryDirectory until python 3.2, so instead:
- tmp_dir = tempfile.mkdtemp(prefix = 'android_build_ffmpeg_for_api_level_config')
- print('Created temporary directory ' + tmp_dir)
-
- # Populate that GN build output folder with generated config for Android as
- # target OS.
- with open(os.path.join(tmp_dir, 'args.gn'), 'w') as args_gn_file:
- args_gn_file.write('target_os = "android"\n')
- print('Created ' + os.path.realpath(args_gn_file.name))
-
- # Ask GN to generate build files.
- PrintAndCheckCall(['gn', 'gen', tmp_dir], cwd=CHROMIUM_ROOT_DIR)
-
- # Query the API levels in the generated build config.
- print('Retrieving config vars')
- config_output = subprocess.check_output([
- 'gn', 'args', tmp_dir, '--short', '--list'], cwd=CHROMIUM_ROOT_DIR)
-
- # Remove the temporary GN build output folder
- print('removing temp dir ' + tmp_dir)
- shutil.rmtree(tmp_dir, ignore_errors=False)
-
- api64_match = re.search(r'android64_ndk_api_level\s*=\s*(\d{2})',
- config_output)
- api32_match = re.search(r'android32_ndk_api_level\s*=\s*(\d{2})',
- config_output)
- if not api32_match or not api64_match:
- raise Exception('Failed to find the android api levels')
-
- self.api32 = api32_match.group(1)
- self.api64 = api64_match.group(1)
-
- def ApiLevels(self):
- return (self.api32, self.api64)
-
- @classmethod
- def Get(cls):
- if cls.__instance is None:
- cls.__instance = AndroidApiLevels()
- cls.__instance.Setup()
- return cls.__instance.ApiLevels()
+ return (api_match.group(1), api64_match.group(1))
-# Sets up cross-compilation (specific to host being linux-x64_64) for compiling
-# Android.
+# Sets up cross-compilation (regardless of host arch) for compiling Android.
# Returns the necessary configure flags as a list.
-# See also https://developer.android.com/ndk/guides/other_build_systems
-# As of M90, //third_party/android_ndk no longer includes mipsel or mips64el
-# toolchains; they were not previously supported by default by this script, and
-# currently are unsupported due to lack of toolchain in checkout.
def SetupAndroidToolchain(target_arch):
- api_level, api64_level = AndroidApiLevels.Get()
- print('Determined Android API levels: 32bit=' + api_level +
- ', 64bit=' + api64_level)
+ api_level, api64_level = GetAndroidApiLevel()
# Toolchain prefix misery, for when just one pattern is not enough :/
toolchain_level = api_level
+ sysroot_arch = target_arch
+ toolchain_dir_prefix = target_arch
toolchain_bin_prefix = target_arch
-
if target_arch == 'arm-neon' or target_arch == 'arm':
- toolchain_bin_prefix = 'arm-linux-androideabi'
+ toolchain_bin_prefix = toolchain_dir_prefix = 'arm-linux-androideabi'
+ sysroot_arch = 'arm'
elif target_arch == 'arm64':
toolchain_level = api64_level
- toolchain_bin_prefix = 'aarch64-linux-android'
+ toolchain_bin_prefix = toolchain_dir_prefix = 'aarch64-linux-android'
elif target_arch == 'ia32':
+ toolchain_dir_prefix = sysroot_arch = 'x86'
toolchain_bin_prefix = 'i686-linux-android'
elif target_arch == 'x64':
toolchain_level = api64_level
+ toolchain_dir_prefix = sysroot_arch = 'x86_64'
toolchain_bin_prefix = 'x86_64-linux-android'
- elif target_arch == 'mipsel': # Unsupported beginning in M90
- toolchain_bin_prefix = 'mipsel-linux-android'
- elif target_arch == 'mips64el': # Unsupported beginning in M90
+ elif target_arch == 'mipsel':
+ sysroot_arch = 'mips'
+ toolchain_bin_prefix = toolchain_dir_prefix = 'mipsel-linux-android'
+ elif target_arch == 'mips64el':
toolchain_level = api64_level
- toolchain_bin_prefix = 'mips64el-linux-android'
+ sysroot_arch = 'mips64'
+ toolchain_bin_prefix = toolchain_dir_prefix = 'mips64el-linux-android'
- clang_toolchain_dir = NDK_ROOT_DIR + '/toolchains/llvm/prebuilt/linux-x86_64/'
+ sysroot = (
+ NDK_ROOT_DIR + '/platforms/android-' + toolchain_level + '/arch-' +
+ sysroot_arch)
+ gcc_toolchain = NDK_ROOT_DIR + '/toolchains/llvm/prebuilt/linux-x86_64/'
# Big old nasty hack here, beware! The new android ndk has some foolery with
# libgcc.a -- clang still uses gcc for its linker when cross compiling.
@@ -281,20 +237,19 @@
fakedir=fakedir))
return [
- '--enable-pic',
- '--cc=' + clang_toolchain_dir + 'bin/clang',
- '--cxx=' + clang_toolchain_dir + 'bin/clang++',
- '--ld=' + clang_toolchain_dir + 'bin/clang',
'--enable-cross-compile',
- '--sysroot=' + clang_toolchain_dir + 'sysroot',
- '--extra-cflags=-I' + clang_toolchain_dir + 'sysroot/usr/include',
- '--extra-cflags=-I' + clang_toolchain_dir + 'sysroot/usr/include/' +
+ '--sysroot=' + sysroot,
+
+ # Android sysroot includes are now split out; try to cobble together the
+ # correct tree.
+ '--extra-cflags=-I' + gcc_toolchain + 'sysroot/usr/include',
+ '--extra-cflags=-I' + gcc_toolchain + 'sysroot/usr/include/' +
toolchain_bin_prefix,
- '--extra-cflags=--target=' + toolchain_bin_prefix + toolchain_level,
- '--extra-ldflags=--target=' + toolchain_bin_prefix + toolchain_level,
+ '--extra-cflags=--target=' + toolchain_bin_prefix,
+ '--extra-ldflags=--target=' + toolchain_bin_prefix,
'--extra-ldflags=-L{}'.format(fakedir),
- '--extra-ldflags=-L' + clang_toolchain_dir + toolchain_bin_prefix,
- '--extra-ldflags=--gcc-toolchain=' + clang_toolchain_dir,
+ '--extra-ldflags=-L' + gcc_toolchain + toolchain_bin_prefix + '/',
+ '--extra-ldflags=--gcc-toolchain=' + gcc_toolchain,
'--target-os=android',
]
@@ -329,14 +284,15 @@
'--as=clang-cl',
# FFMPEG is not yet enlightened for ARM64 Windows.
# Imitate Android workaround.
- '--extra-cflags=--target=arm64-windows'
+ '--extra-cflags=--target=arm64-windows',
+ '--extra-ldflags=--target=arm64-windows',
]
# Turn this into a dictionary.
win_dirs = gn_helpers.FromGNArgs(output)
- # Use those paths with a second script which will tell us the proper lib paths
- # to specify for ldflags.
+ # Use those paths with a second script which will tell us the proper include
+ # and lib paths to specify for cflags and ldflags respectively.
output = subprocess.check_output([
'python',
os.path.join(CHROMIUM_ROOT_DIR, 'build', 'toolchain', 'win',
@@ -345,76 +301,42 @@
])
flags = gn_helpers.FromGNArgs(output)
-
- # Q1 2021 update to LLVM now lets us use a sysroot for cross-compilation
- # targeting Windows, instead of specificying a variety of individual include
- # folders which now include whitespace within paths within the SDK. Either
- # injection of such paths into environment variable or using the new sysroot
- # option is required, since using a /tmp symlink solution to avoid the spaces
- # broke cross-compilation for win-arm64. For at least now, we'll use the
- # sysroot approach, until and unless the environment variable injection
- # approach is determined to be better or more consistent.
- new_args += [
- '--extra-cflags=/winsysroot' + win_dirs['vs_path'],
- ]
-
- # FFmpeg configure doesn't like arguments with spaces in them even if quoted
- # or double-quoted or escape-quoted (whole argument and/or the internal
- # spaces). To automate this for now, every path that has a space in it is
- # replaced with a symbolic link created in the OS' temp folder to the real
- # path.
- def do_remove_temp_link(temp_name):
- assert os.path.exists(temp_name)
- assert os.path.islink(temp_name)
- print('Removing temporary link ' + temp_name)
- os.remove(temp_name)
-
- def do_make_temp_link(real_target):
- temp_file = tempfile.NamedTemporaryFile(prefix='windows_build_ffmpeg')
- temp_name = temp_file.name
- # Destroy |temp_file|, but reuse its name for the symbolic link which
- # survives this helper method.
- temp_file.close()
- os.symlink(real_target, temp_name)
- assert os.path.exists(temp_name)
- assert os.path.islink(temp_name)
- atexit.register(do_remove_temp_link, temp_name)
- return temp_name
-
- # Even with the /winsysroot option, the libpaths still require explicit
- # configuration (for now at least); /winsysroot is not recognized as a valid
- # extra-ldflags option by lld-link.
+ cwd = os.getcwd()
+ for cflag in flags['include_flags_imsvc'].split(' '):
+ # Apparently setup_toolchain prefers relative include paths, which
+ # may work for chrome, but it does not work for ffmpeg, so let's make
+ # them asbolute again.
+ cflag = cflag.strip('"')
+ if cflag.startswith("-imsvc"):
+ cflag = "-imsvc" + os.path.join(cwd, cflag[6:])
+ new_args += ['--extra-cflags=' + cflag]
# TODO(dalecurtis): Why isn't the ucrt path printed?
flags['vc_lib_ucrt_path'] = flags['vc_lib_um_path'].replace('/um/', '/ucrt/')
- # The lib include paths are each in a separate key.
+ # Unlike the cflags, the lib include paths are each in a separate variable.
for k in flags:
# libpath_flags is like cflags. Since it is also redundant, skip it.
if 'lib' in k and k != 'libpath_flags':
- lib_path = flags[k]
- if ' ' in lib_path:
- # Use a temporary symbolic link instead of the real path if there is a
- # space in the real path. Arguably, injection of these into environment
- # variables may be better, especially if /winsysroot continues to not
- # provide appropriate lib paths.
- lib_path = do_make_temp_link(lib_path)
- new_args += [ '--extra-ldflags=-libpath:' + lib_path ]
-
+ new_args += ['--extra-ldflags=-libpath:' + flags[k]]
return new_args
-
def SetupMacCrossCompileToolchain(target_arch):
# First compute the various SDK paths.
mac_min_ver = '10.10'
- developer_dir = os.path.join(CHROMIUM_ROOT_DIR, 'build', 'mac_files',
- 'xcode_binaries', 'Contents', 'Developer')
- sdk_dir = os.path.join(developer_dir, 'Platforms', 'MacOSX.platform',
- 'Developer', 'SDKs', 'MacOSX.sdk')
-
if target_arch == 'x64':
+ developer_dir = os.path.join(CHROMIUM_ROOT_DIR, 'build', 'mac_files',
+ 'xcode_binaries', 'Contents', 'Developer')
+ sdk_dir = os.path.join(developer_dir, 'Platforms', 'MacOSX.platform',
+ 'Developer', 'SDKs', 'MacOSX.sdk')
target_triple = 'x86_64-apple-macosx'
elif target_arch == 'arm64':
+ # TODO: Once the 11.0 SDK is out of beta, it should be used for both
+ # arm64 and intel builds.
+ developer_dir = os.path.join(CHROMIUM_ROOT_DIR, 'build', 'mac_files',
+ 'xcode_binaries', 'Contents', 'Developer')
+ sdk_dir = os.path.join(developer_dir, 'Platforms', 'MacOSX.platform',
+ 'Developer', 'SDKs', 'MacOSX11.0.sdk')
target_triple = 'arm64-apple-macosx'
else:
raise Exception("unknown arch " + target_arch)
@@ -459,11 +381,7 @@
'--extra-ldflags=' + '-L' + libs_dir,
'--extra-ldflags=-lSystem',
'--extra-ldflags=-macosx_version_min', '--extra-ldflags=' + mac_min_ver,
- '--extra-ldflags=-sdk_version', '--extra-ldflags=' + mac_min_ver,
- # ld64.lld requires -platform_version <platform> <min_version>
- # <sdk_version>
- '--extra-ldflags=-platform_version', '--extra-ldflags=macos',
- '--extra-ldflags=' + mac_min_ver, '--extra-ldflags=' + mac_min_ver]
+ '--extra-ldflags=-sdk_version', '--extra-ldflags=' + mac_min_ver]
return new_args
@@ -659,7 +577,6 @@
configure_args,
options=options)
-
def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
configure_args, options):
if target_os == 'linux' and target_arch == 'noasm-x64':
@@ -918,7 +835,7 @@
'--disable-inline-asm',
])
- if 'win' not in target_os and 'android' not in target_os:
+ if 'win' not in target_os:
configure_flags['Common'].extend([
'--enable-pic',
'--cc=clang',
@@ -957,7 +874,7 @@
configure_flags['Common'].extend([
'--arch=x86_64',
'--extra-cflags=-m64',
- '--extra-ldflags=-arch x86_64',
+ '--extra-ldflags=-m64',
])
elif target_arch == 'arm64':
configure_flags['Common'].extend([
diff --git a/chromium/scripts/check_merge.py b/chromium/scripts/check_merge.py
index d74c0e7..b59829d 100755
--- a/chromium/scripts/check_merge.py
+++ b/chromium/scripts/check_merge.py
@@ -61,17 +61,17 @@
return [r for r in regexps if re.search(r, text)]
def main(argv):
- # What we're considering merging, and would like to check. Normally, this
- # is HEAD, but you might want to verify some previous merge.
+ # What we're considering merging, and would like to check. Normally, this is
+ # HEAD, but you might want to verify some previous merge.
if len(argv) > 1:
new_commit = argv[1]
else:
new_commit = "HEAD"
- print(f"Comparing {new_commit} to baseline {EXISTING_COMMIT}...")
+ print "Comparing %s to baseline %s..." % (new_commit, EXISTING_COMMIT)
diff = subprocess.Popen(["git", "diff", "-U0", EXISTING_COMMIT, new_commit],
- stdout=subprocess.PIPE).communicate()[0].decode(sys.stdout.encoding)
+ stdout=subprocess.PIPE).communicate()[0]
filename=None
skip = False
files_encountered = 0
@@ -93,14 +93,14 @@
if tripwire:
failures.add("Tripwire '%s' found in %s" % (tripwire, filename))
- # If we have failures, then print them and fail.
+ # If we have failures, then print them and fail.
if failures:
for failure in failures:
- print(f"Failure: {failure}")
+ print "Failure: %s" % failure
sys.exit(2)
- checked = files_encountered - files_skipped
- print(f"No problems found! Checked {checked}, skipped {files_skipped}.")
+ print ("No problems found! Checked %d files, skipped %d." %
+ (files_encountered - files_skipped, files_skipped))
if __name__ == '__main__':
main(sys.argv)
diff --git a/chromium/scripts/credits_updater.py b/chromium/scripts/credits_updater.py
index 7082513..cf14c7f 100644
--- a/chromium/scripts/credits_updater.py
+++ b/chromium/scripts/credits_updater.py
@@ -30,6 +30,7 @@
import collections
import difflib
+from enum import enum
import hashlib
import os
import re
@@ -74,8 +75,7 @@
*/"""
# Known licenses
-_Licenses = ('LGPL', 'MIPS', 'JPEG', 'OGG_MA_MR_2005')
-License = collections.namedtuple('License', _Licenses)(*_Licenses)
+License = enum('LGPL', 'MIPS', 'JPEG', 'OGG_MA_MR_2005')
# Tuple describing license and similarity to the FFmpeg LGPL reference for a
# given file. See KNOWN_FILE_BUCKETS.
@@ -279,7 +279,7 @@
# together to avoid repeating the same license text in the credits.
if rel_file_path in self.known_file_map:
hasher = hashlib.md5()
- hasher.update(ConcatLines(comment_lines).encode('utf-8'))
+ hasher.update(ConcatLines(comment_lines))
# Detect changes to file's licensing header.
file_license_info = self.known_file_map[rel_file_path]
@@ -302,18 +302,18 @@
num_known_credits = 0
for license_bucket in self.known_credits:
num_known_credits += len(self.known_credits[license_bucket])
- print('CreditsUpdater stats:')
- print(f'\t{num_known_credits} files w/ known_credits')
- print(f'\t{len(self.generated_credits.keys())} generated_credits')
- print(f'\t{len(self.difficult_files)} difficult_files files')
+ print 'CreditsUpdater stats:'
+ print '\t%s files w/ known_credits' % num_known_credits
+ print '\t%s generated_credits' % len(self.generated_credits.keys())
+ print '\t%s difficult_files files' % len(self.difficult_files)
def WriteCredits(self):
if self.difficult_files:
# After taking a closer look, enhance this tool to work for these or
# add them to the white-list if they truly have no licensing header.
- print('Failed to find license header for these files:')
+ print 'Failed to find license header for these files:'
for filename in self.difficult_files:
- print(filename)
+ print filename
exit('Update script to work for these to continue generating credits')
output_path = os.path.join(self.source_dir, self.output_file)
@@ -324,7 +324,7 @@
open_output.writelines(open_license_md.readlines())
# Next write verbatim headers from the generated credits map.
- for filename, file_license in sorted(self.generated_credits.items(),
+ for filename, file_license in sorted(self.generated_credits.iteritems(),
key=lambda x: x[0]):
open_output.writelines(LICENSE_SEPARATOR)
open_output.writelines('%s\n\n%s' % (filename, file_license))
@@ -400,7 +400,7 @@
comment_start_re = C_COMMENT_BLOCK_START
comment_end_re = C_COMMENT_BLOCK_END
- for _ in range(0, 100):
+ for _ in xrange(0, 100):
line = open_file.readline()
found_comment_start = (
found_comment_start or comment_start_re.search(line))
@@ -421,7 +421,7 @@
def StripCommentChars(comment_lines, is_asm=False):
if is_asm:
- for i in range(len(comment_lines)):
+ for i in xrange(len(comment_lines)):
comment_lines[i] = re.sub(ASM_COMMENT_PRE, '', comment_lines[i])
else:
# Strip off the start slash-star
@@ -429,5 +429,5 @@
# Strip off the comment end star-slash
comment_lines[-1] = re.sub(C_COMMENT_BLOCK_END, '', comment_lines[-1])
# Strip off the comment star for middle lines
- for i in range(1, len(comment_lines)):
+ for i in xrange(1, len(comment_lines)):
comment_lines[i] = re.sub(C_COMMENT_BLOCK_MID, '', comment_lines[i])
diff --git a/chromium/scripts/credits_updater_unittest.py b/chromium/scripts/credits_updater_unittest.py
index 6e99926..458a2c0 100755
--- a/chromium/scripts/credits_updater_unittest.py
+++ b/chromium/scripts/credits_updater_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/python
#
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -8,6 +8,7 @@
import copy
import credits_updater as cu
import os
+import string
import unittest
# Assumes this script is in ffmpeg/chromium/scripts/
@@ -134,7 +135,7 @@
credits = ''.join(ReadCreditsLines())
current_offset = 0
for f in sorted(files):
- i = credits.find(f, current_offset)
+ i = string.find(credits, f, current_offset)
if i == -1:
self.fail("Failed to find %s starting at offset %s of content:\n%s" %
(f, current_offset, credits))
diff --git a/chromium/scripts/enum.py b/chromium/scripts/enum.py
new file mode 100644
index 0000000..a30d2b8
--- /dev/null
+++ b/chromium/scripts/enum.py
@@ -0,0 +1,7 @@
+import collections
+
+
+# Python has enums now, but Goobuntu machines seem to run very old python. From:
+# http://stackoverflow.com/questions/36932/how-can-i-represent-an-enum-in-python
+def enum(*keys):
+ return collections.namedtuple('Enum', keys)(*keys)
diff --git a/chromium/scripts/find_patches.py b/chromium/scripts/find_patches.py
index c3fdf77..f579fcd 100755
--- a/chromium/scripts/find_patches.py
+++ b/chromium/scripts/find_patches.py
@@ -18,21 +18,32 @@
find_patches.py origin/merge-m68 > patches.68
"""
+from __future__ import print_function
import collections
import os
import re
import sys
import subprocess
-from robo_lib import shell
-
# What directory will we look for patches in?
# TODO(liberato): Should we find the root of the ffmpeg tree?
PATH = "."
-def log(msg):
- print(f"[{msg}]", file=sys.stderr)
+def log(str):
+ print("[%s]" % str, file=sys.stderr)
+
+
+def run(command):
+ """ Runs a command and returns stdout.
+
+ Args:
+ command: Array of argv[] entries. E.g., ["path_to_executable", "arg1", ...].
+
+ Returns:
+ stdout as a a string.
+ """
+ return subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
class PatchInfo:
@@ -106,8 +117,8 @@
"""Write the patches file for |origin_branch| to |output_file|."""
# Get the latest upstream commit that's reachable from the origin branch.
# We'll use that to compare against.
- upstream = shell.output_or_error(
- ["git", "merge-base", "upstream/master", origin_branch])
+ upstream = run(["git", "merge-base", "upstream/master",
+ origin_branch]).strip()
if not upstream:
raise Exception("Could not find upstream commit")
@@ -122,9 +133,10 @@
# Find diffs between the versions, excluding all files that are only on
# origin. We explicitly exclude .gitignore, since it exists in both places.
# Ask for no context, since we ignore it anyway.
- diff = shell.output_or_error(
- ["git", "diff", "--diff-filter=a", "-U0", revision_range, PATH,
- ":!.gitignore"])
+ diff = run([
+ "git", "diff", "--diff-filter=a", "-U0", revision_range, PATH,
+ ":!.gitignore"
+ ])
# Set of chromium patch sha1s we've seen.
sha1s = set()
@@ -171,7 +183,7 @@
# One-line change
blame_range = "%s,+1" % added_linespec
- blame = shell.output_or_error([
+ blame = run([
"git", "blame", "-l",
"-L %s" % blame_range, revision_range, "--", filename
])
@@ -201,16 +213,12 @@
if len(deleted_line) < 4:
continue
- # git log freaks out if you search for a line starting with #, remove it.
- while deleted_line.startswith('#'):
- deleted_line = deleted_line[1:]
-
log("Checking for deleted lines in %s" % filename)
# Specify "--first-parent" so that we find commits on (presumably) origin.
- sha1 = shell.output_or_error([
+ sha1 = run([
"git", "log", "-1", revision_range, "--format=%H", "-S", deleted_line,
origin_branch, "--", filename
- ])
+ ]).strip()
# Add the sha1 to the sets
sha1s.add(sha1)
@@ -221,7 +229,7 @@
log("Looking up sha1 dates to sort them")
sha1_to_date = {}
for sha1 in sha1s:
- date = shell.output_or_error(["git", "log", "-1", "--format=%at", "%s" % sha1])
+ date = run(["git", "log", "-1", "--format=%at", "%s" % sha1]).strip()
sha1_to_date[sha1] = date
# Print the patches file.
@@ -238,12 +246,11 @@
file=output_file)
print("\n", file=output_file)
wd = os.getcwd()
- for sha1, date in sorted(sha1_to_date.items(), key=lambda kv: kv[1]):
+ for sha1, date in sorted(sha1_to_date.iteritems(), key=lambda (k, v): v):
print(
"------------------------------------------------------------------",
file=output_file)
- loglines = shell.output_or_error(["git", "log", "-1", "%s" % sha1])
- for line in loglines.splitlines():
+ for line in run(["git", "log", "-1", "%s" % sha1]).splitlines():
print(line.rstrip(), file=output_file)
print("\nAffects:", file=output_file)
# TODO(liberato): maybe add the lines that were affected.
diff --git a/chromium/scripts/generate_gn.py b/chromium/scripts/generate_gn.py
index 6814adf..d165254 100755
--- a/chromium/scripts/generate_gn.py
+++ b/chromium/scripts/generate_gn.py
@@ -25,6 +25,7 @@
import collections
import copy
import datetime
+from enum import enum
import fnmatch
import credits_updater
import itertools
@@ -32,6 +33,7 @@
import os
import re
import shutil
+import string
import subprocess
import sys
@@ -72,8 +74,7 @@
"""
# Controls conditional stanza generation.
-_Attrs = ('ARCHITECTURE', 'TARGET', 'PLATFORM')
-Attr = collections.namedtuple('Attr', _Attrs)(*_Attrs)
+Attr = enum('ARCHITECTURE', 'TARGET', 'PLATFORM')
SUPPORT_MATRIX = {
Attr.ARCHITECTURE:
set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'mipsel', 'mips64el']),
@@ -86,7 +87,7 @@
def NormalizeFilename(name):
"""Removes leading path separators in an attempt to normalize paths."""
- return name.lstrip(os.sep)
+ return string.lstrip(name, os.sep)
def CleanObjectFiles(object_files):
@@ -735,7 +736,7 @@
if not include_match:
if EXOTIC_INCLUDE_REGEX.search(line):
- print(f'WARNING: Investigate whacky include line: {line}')
+ print 'WARNING: Investigate whacky include line:', line
continue
include_file_path = include_match.group(1)
@@ -761,8 +762,8 @@
# At this point we've found the file. Check if its in our ignore list which
# means that the list should be updated to no longer mention this file.
if include_file_path in IGNORED_INCLUDE_FILES:
- print(f'Found {include_file_path} in IGNORED_INCLUDE_FILES. '
- 'Consider updating the list to remove this file.')
+ print('Found %s in IGNORED_INCLUDE_FILES. Consider updating the list '
+ 'to remove this file.' % str(include_file_path))
GetIncludedSources(resolved_include_path, source_dir, include_set)
@@ -783,7 +784,6 @@
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, _ = check_process.communicate()
- stdout = stdout.decode(sys.stdout.encoding)
# Get the filename and license out of the stdout. stdout is expected to be
# "/abspath/to/file: *No copyright* SOME LICENSE".
@@ -795,17 +795,17 @@
if (licensename in ALLOWED_LICENSES or
(licensename == 'UNKNOWN' and rel_file_path in LICENSE_EXCEPTIONS)):
if print_licenses:
- print(f'{filename}: {licensename}')
+ print filename, ':', licensename
continue
- print(f'UNEXPECTED LICENSE: {filename}: {licensename}')
+ print 'UNEXPECTED LICENSE: %s: %s' % (filename, licensename)
return False
return True
def CheckLicensesForStaticLinking(sources_to_check, source_dir, print_licenses):
- print('Checking licenses...')
+ print 'Checking licenses...'
return CheckLicensesForSources(sources_to_check, source_dir, print_licenses)
@@ -867,8 +867,8 @@
for rename in renames:
if log_renames:
- print(
- f'Fixing basename collision: {rename.old_path} -> {rename.new_path}')
+ print 'Fixing basename collision: %s -> %s' % (rename.old_path,
+ rename.new_path)
_, old_filename = os.path.split(rename.old_path)
_, file_extension = os.path.splitext(old_filename)
include_prefix = '%' if (file_extension == '.asm') else '#'
@@ -888,12 +888,12 @@
for source_path in all_sources:
if RENAME_PREFIX in source_path and source_path not in all_renames:
old_renames_to_delete.add(source_path)
- print(f'WARNING: {source_path} no longer collides. DELETE ME!')
+ print 'WARNING: %s no longer collides. DELETE ME!' % source_path
return all_renames, old_renames_to_delete
def UpdateCredits(sources_to_check, source_dir):
- print('Updating ffmpeg credits...')
+ print 'Updating ffmpeg credits...'
updater = credits_updater.CreditsUpdater(source_dir)
for source_name in sources_to_check:
updater.ProcessFile(source_name)
@@ -929,7 +929,7 @@
build_dir = os.path.join(options.build_dir, name, target)
if not os.path.exists(build_dir):
continue
- print(f'Processing build directory: {name}')
+ print 'Processing build directory: %s' % name
object_files = GetObjectFiles(build_dir)
@@ -973,11 +973,11 @@
if not CheckLicensesForStaticLinking(sources_to_check, source_dir,
options.print_licenses):
exit('GENERATE FAILED: invalid licenses detected.')
- print('License checks passed.')
+ print 'License checks passed.'
UpdateCredits(sources_to_check, source_dir)
gn_file_name = os.path.join(options.source_dir, 'ffmpeg_generated.gni')
- print(f'Writing: {gn_file_name}')
+ print 'Writing:', gn_file_name
with open(gn_file_name, 'w') as fd:
WriteGn(fd, sets)
diff --git a/chromium/scripts/generate_gn_unittest.py b/chromium/scripts/generate_gn_unittest.py
index cc7d5ec..a87f516 100755
--- a/chromium/scripts/generate_gn_unittest.py
+++ b/chromium/scripts/generate_gn_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/python
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -12,6 +12,7 @@
import generate_gn as gg
from generate_gn import SourceSet, SourceListCondition
+import string
import unittest
from os import path
@@ -157,28 +158,28 @@
a = SourceSet(
set(['a', 'b']), set([SourceListCondition('ia32', 'Chromium', 'win')]))
a_stanza = a.GenerateGnStanza()
- a_stanza.index('current_cpu == "x86"')
- a_stanza.index('is_win')
+ string.index(a_stanza, 'current_cpu == "x86"')
+ string.index(a_stanza, 'is_win')
# x64 should just be x64. Linux should appear as an OS restriction.
b = SourceSet(
set(['a', 'b']), set([SourceListCondition('x64', 'Chromium', 'linux')]))
b_stanza = b.GenerateGnStanza()
- b_stanza.index('current_cpu == "x64"')
- b_stanza.index('use_linux_config')
+ string.index(b_stanza, 'current_cpu == "x64"')
+ string.index(b_stanza, 'use_linux_config')
# arm should just be arm.
c = SourceSet(
set(['a', 'b']), set([SourceListCondition('arm', 'Chromium', 'linux')]))
c_stanza = c.GenerateGnStanza()
- c_stanza.index('current_cpu == "arm"')
+ string.index(c_stanza, 'current_cpu == "arm"')
# arm-neon should be arm and flip the arm_neon switch.
d = SourceSet(
set(['a', 'b']),
set([SourceListCondition('arm-neon', 'Chromium', 'linux')]))
d_stanza = d.GenerateGnStanza()
- d_stanza.index('current_cpu == "arm" && arm_use_neon')
+ string.index(d_stanza, 'current_cpu == "arm" && arm_use_neon')
# Multiple conditions
e = SourceSet(
@@ -188,10 +189,10 @@
SourceListCondition('x64', 'Chromium', 'linux')
]))
e_stanza = e.GenerateGnStanza()
- e_stanza.index(('is_win && current_cpu == "arm"'
- ' && ffmpeg_branding == "Chrome"'))
- e_stanza.index(('use_linux_config && current_cpu == "x64"'
- ' && ffmpeg_branding == "Chromium"'))
+ string.index(e_stanza, ('is_win && current_cpu == "arm"'
+ ' && ffmpeg_branding == "Chrome"'))
+ string.index(e_stanza, ('use_linux_config && current_cpu == "x64"'
+ ' && ffmpeg_branding == "Chromium"'))
def testComplexSourceListConditions(self):
# Create 2 sets with intersecting source 'a', but setup such that 'a'
@@ -215,7 +216,7 @@
self.assertEqual(1, len(disjoint_sets))
stanza = disjoint_sets[0].GenerateGnStanza()
- self.assertEqual(stanza.find(bad_condition), -1)
+ self.assertEqual(string.find(stanza, bad_condition), -1)
def assertEqualSourceSets(self, expected, actual):
assert all(isinstance(a, SourceSet) for a in expected)
@@ -458,10 +459,10 @@
a = SourceSet(
set(['foo.c']), set([SourceListCondition('x64', 'Chromium', '*')]))
stanza = a.GenerateGnStanza()
- stanza.index('== "x64"')
- stanza.index('ffmpeg_branding == "Chromium"')
+ string.index(stanza, '== "x64"')
+ string.index(stanza, 'ffmpeg_branding == "Chromium"')
# OS is wild-card, so it should not be mentioned in the stanza.
- self.assertEqual(-1, stanza.find('OS =='))
+ self.assertEqual(-1, string.find(stanza, 'OS =='))
def testFixObjectBasenameCollisions(self):
# Use callback to capture executed renames.
diff --git a/chromium/scripts/generate_gn_unittest_wrapper.py b/chromium/scripts/generate_gn_unittest_wrapper.py
deleted file mode 100755
index 5d5ab69..0000000
--- a/chromium/scripts/generate_gn_unittest_wrapper.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-'''Wrapper script to appease the PRESUBMIT.py vpython dark spirits.'''
-
-import os
-import subprocess
-import unittest
-
-class WrapperUnittest(unittest.TestCase):
- def testCallRealTestsWithPy3(self):
- tests = os.path.join(os.path.dirname(__file__), 'generate_gn_unittest.py')
- try:
- test_out = subprocess.check_output(['python3', tests])
- except subprocess.CalledProcessError as e:
- self.fail('Unit tests failed, see above for expectation errors')
- self.assertEqual(test_out, '')
-
-if __name__ == '__main__':
- unittest.main()
\ No newline at end of file
diff --git a/chromium/scripts/robo_branch.py b/chromium/scripts/robo_branch.py
index e36e3c2..c4c5a36 100644
--- a/chromium/scripts/robo_branch.py
+++ b/chromium/scripts/robo_branch.py
@@ -15,13 +15,14 @@
import find_patches
import os
import re
-from robo_lib.errors import UserInstructions
-from robo_lib import shell
+from robo_lib import UserInstructions
+from robo_lib import log
+from subprocess import check_output
def IsWorkingDirectoryClean():
"""Return true if and only if the working directory is clean."""
- return not shell.output_or_error(
- ["git", "status", "--untracked-files=no", "--porcelain"])
+ return not check_output(["git", "status", "--untracked-files=no",
+ "--porcelain"]).strip()
def RequiresCleanWorkingDirectory(fn):
def wrapper(*args, **kwargs):
@@ -35,7 +36,7 @@
"""Create a dated branch from origin/master and check it out."""
now = datetime.now()
branch_name=cfg.sushi_branch_prefix() + now.strftime("%Y-%m-%d-%H-%M-%S")
- shell.log("Creating dated branch %s" % branch_name)
+ log("Creating dated branch %s" % branch_name)
# Fetch the latest from origin
if cfg.Call(["git", "fetch", "origin"]):
raise Exception("Could not fetch from origin")
@@ -51,7 +52,11 @@
#
# We don't want to push anything to origin yet, though, just to keep from
# making a bunch of sushi branches. We can do it later just as easily.
- if cfg.Call(["git", "branch", "--no-track", branch_name, cfg.origin_merge_base()]):
+ if cfg.Call(["git",
+ "branch",
+ "--no-track",
+ branch_name,
+ cfg.origin_merge_base()]):
raise Exception("Could not create branch")
# NOTE: we could push the remote branch back to origin and start tracking it
@@ -65,38 +70,35 @@
cfg.SetBranchName(branch_name)
-
def CreateAndCheckoutDatedSushiBranchIfNeeded(cfg):
"""Create a dated branch from origin/master if we're not already on one."""
if cfg.sushi_branch_name():
- shell.log(f"Already on sushi branch {cfg.sushi_branch_name()}")
+ log("Already on sushi branch %s" % cfg.sushi_branch_name())
return
- CreateAndCheckoutDatedSushiBranch(cfg)
+ CreateAndCheckoutDatedSushiBranch(cfg)
@RequiresCleanWorkingDirectory
def MergeUpstreamToSushiBranch(cfg):
- shell.log("Merging upstream/master to local branch")
+ log("Merging upstream/master to local branch")
if not cfg.sushi_branch_name():
raise Exception("Refusing to do a merge on a branch I didn't create")
if cfg.Call(["git", "fetch", "upstream"]):
raise Exception("Could not fetch from upstream")
if cfg.Call(["git", "merge", "upstream/master"]):
raise UserInstructions("Merge failed -- resolve conflicts manually.")
- shell.log("Merge has completed successfully")
-
+ log("Merge has completed successfully")
def GetMergeParentsIfAny(cfg):
"""Return the set of commit sha-1s of the merge commit, if one exists, between
HEAD and where it joins up with origin/master. Otherwise, return []."""
# Get all sha1s between us and origin/master
- sha1s = shell.output_or_error(
- ["git", "log", "--format=%H",
- f'{cfg.origin_merge_base()}..{cfg.branch_name()}']).split()
+ sha1s = check_output(["git", "log", "--format=%H",
+ "%s..%s" % (cfg.origin_merge_base(), cfg.branch_name())]).split()
for sha1 in sha1s:
# Does |sha1| have more than one parent commit?
- parents = shell.output_or_error(
- ["git", "show", "--no-patch", "--format=%P", sha1]).split()
+ parents = check_output(["git", "show", "--no-patch", "--format=%P",
+ sha1]).split()
if len(parents) > 1:
return parents
return []
@@ -111,8 +113,8 @@
sha1s = GetMergeParentsIfAny(cfg)
for sha1 in sha1s:
# 'not' is correct -- it returns zero if it is an ancestor => upstream.
- cmd = ["git", "merge-base", "--is-ancestor", sha1, "upstream/master"]
- if not shell.stdout_fail_ok(cmd):
+ if not cfg.Call(["git", "merge-base", "--is-ancestor", sha1,
+ "upstream/master"]):
return sha1
raise Exception("No upstream merge parent found. Is the merge committed?")
@@ -120,7 +122,7 @@
"""Start a merge if we've not started one before, or do nothing successfully
if the merge is complete. If it's half done, then get mad and exit."""
if IsMergeCommitOnThisBranch(cfg):
- shell.log("Merge commit already marked as complete")
+ log("Merge commit already marked as complete")
return
# See if a merge is in progress. "git merge HEAD" will do nothing if it
# succeeds, but will fail if a merge is in progress.
@@ -134,13 +136,13 @@
"""Verify that the merge config looks good."""
# If we haven't built all configs, then we might not be checking everything.
# The check might look at config for each platform, etc.
- shell.log("Checking merge for common failures")
+ log("Checking merge for common failures")
cfg.chdir_to_ffmpeg_home();
check_merge.main([])
def WritePatchesReadme(cfg):
"""Write the chromium patches file."""
- shell.log("Generating CHROMIUM.patches file")
+ log("Generating CHROMIUM.patches file")
cfg.chdir_to_ffmpeg_home();
with open(os.path.join("chromium", "patches", "README"), "w+") as f:
find_patches.write_patches_file("HEAD", f)
@@ -157,10 +159,10 @@
def AddAndCommit(cfg, commit_title):
"""Add everything, and commit locally with |commit_title|"""
- shell.log("Creating local commit %s" % commit_title)
+ log("Creating local commit %s" % commit_title)
cfg.chdir_to_ffmpeg_home();
if IsWorkingDirectoryClean():
- shell.log("No files to commit to %s" % commit_title)
+ log("No files to commit to %s" % commit_title)
return
# TODO: Ignore this file, for the "comment out autorename exception" thing.
if cfg.Call(["git", "add", "-u"]):
@@ -172,8 +174,8 @@
"""Check if the local branch is tracking upstream."""
# git branch -vv --list ffmpeg_roll
# ffmpeg_roll 28e7fbe889 [origin/master: behind 8859] Merge branch 'merge-m57'
- output = shell.output_or_error(
- ["git", "branch", "-vv", "--list", cfg.sushi_branch_name()])
+ output = check_output(["git", "branch", "-vv", "--list",
+ cfg.sushi_branch_name()])
# Note that it might have ": behind" or other things.
return "[origin/%s" % cfg.sushi_branch_name() in output
@@ -182,11 +184,11 @@
cfg.chdir_to_ffmpeg_home();
# If the tracking branch is unset, then assume that we haven't done this yet.
if IsTrackingBranchSet(cfg):
- shell.log("Already have local tracking branch")
+ log("Already have local tracking branch")
return
- shell.log("Pushing merge to origin without review")
+ log("Pushing merge to origin without review")
cfg.Call(["git", "push", "origin", cfg.sushi_branch_name()])
- shell.log("Setting tracking branch")
+ log("Setting tracking branch")
cfg.Call(["git", "branch", "--set-upstream-to=origin/%s" %
cfg.sushi_branch_name()])
# Sanity check. We don't want to start pushing other commits without review.
@@ -196,7 +198,7 @@
def HandleAutorename(cfg):
# We assume that there is a script written by generate_gn.py that adds /
# removes files needed for autorenames. Run it.
- shell.log("Updating git for any autorename changes")
+ log("Updating git for any autorename changes")
cfg.chdir_to_ffmpeg_home();
if cfg.Call(["chmod", "+x", cfg.autorename_git_file()]):
raise Exception("Unable to chmod %s" % cfg.autorename_git_file())
@@ -206,7 +208,7 @@
def IsCommitOnThisBranch(robo_configuration, commit_title):
"""Detect if we've already committed the |commit_title| locally."""
# Get all commit titles between us and origin/master
- titles = shell.output_or_error(["git", "log", "--format=%s",
+ titles = check_output(["git", "log", "--format=%s",
"origin/master..%s" % robo_configuration.branch_name()])
return commit_title in titles
@@ -215,7 +217,7 @@
if IsCommitOnThisBranch(
robo_configuration,
robo_configuration.patches_commit_title()):
- shell.log("Skipping patches file since already committed")
+ log("Skipping patches file since already committed")
return True
return False
@@ -231,20 +233,20 @@
if IsCommitOnThisBranch(
robo_configuration,
robo_configuration.readme_chromium_commit_title()):
- shell.log("Skipping README.chromium file since already committed")
+ log("Skipping README.chromium file since already committed")
return True
return False
@RequiresCleanWorkingDirectory
def UpdateChromiumReadmeWithUpstream(robo_configuration):
"""Update the upstream info in README.chromium and commit the result."""
- shell.log("Updating merge info in README.chromium")
+ log("Updating merge info in README.chromium")
merge_sha1 = FindUpstreamMergeParent(robo_configuration)
robo_configuration.chdir_to_ffmpeg_home();
with open("README.chromium", "r+") as f:
readme = f.read()
last_upstream_merge = "Last Upstream Merge:"
- merge_date = shell.output_or_error(["git", "log", "-1","--date=format:%b %d %Y",
+ merge_date = check_output(["git", "log", "-1","--date=format:%b %d %Y",
"--format=%cd", merge_sha1])
readme = re.sub(r"(Last Upstream Merge:).*\n",
r"\1 %s, %s" % (merge_sha1, merge_date),
@@ -264,11 +266,11 @@
"""Check if the local branch is already uploaded."""
robo_configuration.chdir_to_ffmpeg_home();
if not HasGerritIssueNumber(robo_configuration):
- shell.log("No Gerrit issue number exsts.")
+ log("No Gerrit issue number exsts.")
return False
if not IsWorkingDirectoryClean():
- shell.log("Working directory is not clean -- commit changes and update CL");
+ log("Working directory is not clean -- commit changes and update CL");
return False
# Has been uploaded for review. Might or might not have been landed yet.
@@ -279,13 +281,13 @@
been landed."""
robo_configuration.chdir_to_ffmpeg_home();
if not IsUploadedForReview(robo_configuration):
- shell.log("Is not uploaded for review")
+ log("Is not uploaded for review")
return False
# See if origin/sushi and local/sushi are the same. This check by itself
# isn't sufficient, since it would return true any time the two are in sync.
- diff = shell.output_or_error(["git", "diff",
+ diff = check_output(["git", "diff",
"origin/" + robo_configuration.sushi_branch_name(),
- robo_configuration.sushi_branch_name()])
+ robo_configuration.sushi_branch_name()]).strip()
return not diff
@RequiresCleanWorkingDirectory
@@ -295,13 +297,13 @@
if IsUploadedForReview(robo_configuration):
raise Exception(
"Sushi branch is already uploaded for review! (try git cl web)")
- shell.log("Uploading sushi branch for review.")
+ log("Uploading sushi branch for review.")
os.system("git cl upload")
@RequiresCleanWorkingDirectory
def TryFakeDepsRoll(robo_configuration):
"""Start a deps roll against the sushi branch, and -1 it."""
- shell.log("Considering starting a fake deps roll")
+ log("Considering starting a fake deps roll")
# Make sure that we've landed the sushi commits. Note that this can happen if
# somebody re-runs robosushi after we upload the commits to Gerrit, but before
@@ -310,7 +312,7 @@
raise Exception("Cannot start a fake deps roll until gerrit review lands!")
robo_configuration.chdir_to_ffmpeg_home();
- sha1 = shell.output_or_error("git", "show", "-1", "--format=%P")
+ sha1 = check_output("git", "show", "-1", "--format=%P").strip()
if not sha1:
raise Exception("Cannot get sha1 of HEAD for fakes dep roll")
@@ -318,5 +320,5 @@
# TODO: make sure that there's not a deps roll in progress, else we'll keep
# doing this every time we're run.
# TODO: get mad otherwise.
- shell.output_or_error(["roll-deps.py", "third_party/ffmpeg", sha1])
+ check_output(["roll-deps.py", "third_party/ffmpeg", sha1])
# TODO: -1 it.
diff --git a/chromium/scripts/robo_build.py b/chromium/scripts/robo_build.py
index b10a210..e93f6a4 100644
--- a/chromium/scripts/robo_build.py
+++ b/chromium/scripts/robo_build.py
@@ -7,7 +7,7 @@
# Various functions to help build / test ffmpeg.
import os
-from robo_lib import shell
+from robo_lib import log
def ConfigureAndBuildFFmpeg(robo_configuration, platform, architecture):
"""Run FFmpeg's configure script, and build ffmpeg.
@@ -18,15 +18,15 @@
architecture: (optional) arch name (e.g., "ia32"). If omitted, then we
build all of them for |platform|.
"""
- shell.log("Generating FFmpeg config and building for %s %s" %
+ log("Generating FFmpeg config and building for %s %s" %
(platform, architecture))
- shell.log("Starting FFmpeg build for %s %s" % (platform, architecture))
+ log("Starting FFmpeg build for %s %s" % (platform, architecture))
robo_configuration.chdir_to_ffmpeg_home();
- command = ["python2", "./chromium/scripts/build_ffmpeg.py", platform]
+ command = ["./chromium/scripts/build_ffmpeg.py", platform]
if architecture:
command.append(architecture)
- if robo_configuration.Call(command, stdout=None, stderr=None):
+ if robo_configuration.Call(command):
raise Exception("FFmpeg build failed for %s %s" %
(platform, architecture))
@@ -39,18 +39,15 @@
with the appropriate git commands to add / rm autorenames.
"""
robo_configuration.chdir_to_ffmpeg_home();
- shell.log("Copying FFmpeg configs")
+ log("Copying FFmpeg configs")
if robo_configuration.Call(["./chromium/scripts/copy_config.sh"]):
- raise Exception("FFmpeg copy_config.sh failed")
-
- # TODO... seems like there are some auto-generated files that generate_gn.py
- # throws a nasty license check on, incorrectly. maybe they should be deleted
- shell.log("Generating GN config for all ffmpeg versions")
+ raise Exception("FFmpeg copy_config.sh failed")
+ log("Generating GN config for all ffmpeg versions")
generate_cmd = ["./chromium/scripts/generate_gn.py"]
if write_git_file:
generate_cmd += ["-i", robo_configuration.autorename_git_file()]
if robo_configuration.Call(generate_cmd):
- raise Exception("FFmpeg generate_gn.sh failed")
+ raise Exception("FFmpeg generate_gn.sh failed")
def BuildAndImportAllFFmpegConfigs(robo_configuration):
"""Build ffmpeg for all platforms that we can, and build the gn files.
@@ -100,7 +97,7 @@
architecture: arch to build it for (e.g., "x64").
"""
robo_configuration.chdir_to_chrome_src()
- if robo_configuration.Call(["ninja", "-j500", "-C",
+ if robo_configuration.Call(["ninja", "-j5000", "-C",
robo_configuration.relative_asan_directory(), target]):
raise Exception("Failed to build %s" % target)
@@ -114,15 +111,15 @@
platform: platform to build it for, which should probably be the host's.
architecture: arch to build it for (e.g., "x64").
"""
- shell.log("Building and running %s" % target)
+ log("Building and running %s" % target)
BuildChromeTargetASAN(robo_configuration, target, platform, architecture)
# TODO: we should be smarter about running things on android, for example.
- shell.log("Running %s" % target)
+ log("Running %s" % target)
robo_configuration.chdir_to_chrome_src()
if robo_configuration.Call(
[os.path.join(robo_configuration.absolute_asan_directory(), target)]):
raise Exception("%s didn't complete successfully" % target)
- shell.log("%s ran successfully" % target)
+ log("%s ran successfully" % target)
def RunTests(robo_configuration):
"""Build all tests and run them locally.
diff --git a/chromium/scripts/robo_lib/config.py b/chromium/scripts/robo_lib.py
similarity index 77%
rename from chromium/scripts/robo_lib/config.py
rename to chromium/scripts/robo_lib.py
index 133e4ea..df71bbc 100644
--- a/chromium/scripts/robo_lib/config.py
+++ b/chromium/scripts/robo_lib.py
@@ -1,19 +1,30 @@
-""" Contains the global configuration object.
-"""
+#!/usr/bin/python
+#
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+# Various utility fns for robosushi.
import os
-from . import shell
-from . import packages
+from subprocess import call
+import subprocess
+def log(msg):
+ print "[ %s ]" % msg
+
+class UserInstructions(Exception):
+ """Handy exception subclass that just prints very verbose instructions to the
+ user. Normal exceptions tend to lose the message in the stack trace, which we
+ probably don't care about."""
+ def __init__ (self, msg):
+ self._msg = msg
+
+ def __str__(self):
+ sep = "=" * 78
+ return "\n\n%s\n%s\n%s\n\n" % (sep, self._msg, sep)
class RoboConfiguration:
- __slots__ = ('_sushi_branch_prefix', '_gn_commit_title',
- '_patches_commit_title', '_readme_chromium_commit_title',
- '_origin_merge_base', '_llvm_path', '_autorename_git_file',
- '_chrome_src', '_host_operating_system', '_host_architecture',
- '_ffmpeg_home', '_relative_asan_directory', '_branch_name',
- '_sushi_branch_name', '_readme_chromium_commit_title', '_nasm_path',
- '_prompt_on_call', '_os_flavor')
def __init__(self):
"""Ensure that our config has basic fields fill in, and passes some sanity
checks too.
@@ -42,18 +53,22 @@
"llvm-build", "Release+Asserts", "bin")
self.EnsurePathContainsLLVM()
- shell.log("Using chrome src: %s" % self.chrome_src())
+ log("Using chrome src: %s" % self.chrome_src())
self.EnsureFFmpegHome()
- shell.log("Using ffmpeg home: %s" % self.ffmpeg_home())
+ log("Using ffmpeg home: %s" % self.ffmpeg_home())
self.EnsureASANConfig()
self.ComputeBranchName()
- shell.log("On branch: %s" % self.branch_name())
+ log("On branch: %s" % self.branch_name())
if self.sushi_branch_name():
- shell.log("On sushi branch: %s" % self.sushi_branch_name())
+ log("On sushi branch: %s" % self.sushi_branch_name())
# Filename that we'll ask generate_gn.py to write git commands to.
self._autorename_git_file = os.path.join(
- self.ffmpeg_home(), "chromium", "scripts", ".git_commands.sh")
+ self.ffmpeg_home(),
+ "chromium",
+ "scripts",
+ ".git_commands.sh")
+
def chrome_src(self):
"""Return /path/to/chromium/src"""
@@ -115,24 +130,12 @@
def override_origin_merge_base(self, new_base):
self._origin_merge_base = new_base
- def os_flavor(self):
- return self._os_flavor
-
def EnsureHostInfo(self):
"""Ensure that the host architecture and platform are set."""
- kernel, host, os, *rest = shell.output_or_error(["uname", "-a"]).split()
- assert kernel in ("Linux", "linux")
- assert "x86_64" in rest
+ # TODO(liberato): autodetect
self._host_operating_system = "linux"
self._host_architecture = "x64"
- if "rodete" in os:
- self._os_flavor = packages.OsFlavor.Debian
- elif "arch" in os:
- self._os_flavor = packages.OsFlavor.Arch
- else:
- raise Exception("Couldn't determine OS flavor (needed to install packages)")
-
def EnsureChromeSrc(self):
"""Find the /absolute/path/to/my_chrome_dir/src"""
wd = os.getcwd()
@@ -174,9 +177,9 @@
def ComputeBranchName(self):
"""Get the current branch name and set it."""
self.chdir_to_ffmpeg_home()
- branch_name = shell.output_or_error(
- ["git", "rev-parse", "--abbrev-ref", "HEAD"])
- self.SetBranchName(str(branch_name))
+ branch_name = subprocess.Popen(["git", "rev-parse", "--abbrev-ref", "HEAD"],
+ stdout=subprocess.PIPE).communicate()[0].strip()
+ self.SetBranchName(branch_name)
def SetBranchName(self, name):
"""Set our branch name, which may be a sushi branch or not."""
@@ -197,10 +200,11 @@
def set_prompt_on_call(self, value):
self._prompt_on_call = value
- def Call(self, args, **kwargs):
+ def Call(self, args, shell=False):
"""Run the command specified by |args| (see subprocess.call), optionally
prompting the user."""
if self.prompt_on_call():
- print(f"[{os.getcwd()}] About to run: `{' '.join(args)}` ")
- input("Press ENTER to continue, or interrupt the script: ")
- return shell.check_run(args, **kwargs)
\ No newline at end of file
+ print("[%s] About to run: %s " % (os.getcwd(), args))
+ raw_input("Press ENTER to continue, or interrupt the script: ")
+ return call(args, shell=shell)
+
diff --git a/chromium/scripts/robo_lib/__init__.py b/chromium/scripts/robo_lib/__init__.py
deleted file mode 100644
index 33fafd6..0000000
--- a/chromium/scripts/robo_lib/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-'''placeholder'''
\ No newline at end of file
diff --git a/chromium/scripts/robo_lib/errors.py b/chromium/scripts/robo_lib/errors.py
deleted file mode 100644
index 8f1321d..0000000
--- a/chromium/scripts/robo_lib/errors.py
+++ /dev/null
@@ -1,16 +0,0 @@
-'''Custom error types.
-'''
-
-
-class UserInstructions(Exception):
- '''Handy exception subclass that just prints very verbose instructions to the
- user. Normal exceptions tend to lose the message in the stack trace, which we
- probably don't care about.
- '''
- __slots__ = ('_msg', )
- def __init__ (self, msg):
- self._msg = msg
-
- def __str__(self):
- sep = '=' * 78
- return f'\n\n{sep}\n{self._msg}\n{sep}\n\n'
\ No newline at end of file
diff --git a/chromium/scripts/robo_lib/packages.py b/chromium/scripts/robo_lib/packages.py
deleted file mode 100644
index d7660f7..0000000
--- a/chromium/scripts/robo_lib/packages.py
+++ /dev/null
@@ -1,28 +0,0 @@
-'''Utilities for installing os-level packages.'''
-
-import collections
-import enum
-
-
-class Library(collections.namedtuple('Library', ['name', 'pkg_map'])):
- def Install(self, configuration):
- flavor = configuration.os_flavor()
- install_cmd = ['sudo', *flavor.value, self.pkg_map[flavor]]
- return configuration.Call(install_cmd, stderr=None, stdout=None)
-
-
-class OsFlavor(enum.Enum):
- Debian = ('apt-get', 'install')
- Arch = ('pacman', '-S')
-
-
-Nasm = Library('nasm', {
- OsFlavor.Debian: 'nasm',
- OsFlavor.Arch: 'nasm',
-})
-
-
-GccAarch64LinuxGNU = Library('gcc-aarch64-linux-gnu', {
- OsFlavor.Debian: 'gcc-aarch64-linux-gnu',
- OsFlavor.Arch: 'aarch64-linux-gnu-binutils',
-})
\ No newline at end of file
diff --git a/chromium/scripts/robo_lib/shell.py b/chromium/scripts/robo_lib/shell.py
deleted file mode 100644
index 2b1149a..0000000
--- a/chromium/scripts/robo_lib/shell.py
+++ /dev/null
@@ -1,61 +0,0 @@
-'''Contains helper methods for writing to and reading from
-the console that can be configured by arguments, such as
-verbose logging and dryrunning potentially dangerous commands.
-'''
-
-import collections
-import os
-import subprocess
-
-
-LOG_LEVEL = collections.namedtuple('LL', ['NORM', 'VERBOSE', 'DEBUG'])(1, 2, 3)
-SET_LOG_LEVEL = LOG_LEVEL.NORM
-
-
-EXEC_MOD = collections.namedtuple('EM', ['NORM', 'DRY'])
-SET_EXEC_MOD = EXEC_MOD.NORM
-
-
-def log(message, verbosity=LOG_LEVEL.NORM, **kwargs):
- if verbosity >= SET_LOG_LEVEL:
- print(f'[ {message} ]', **kwargs)
-
-
-def run(command, **kwargs):
- if SET_EXEC_MOD == EXEC_MOD.NORM:
- return subprocess.run(command,
- encoding=kwargs.get('encoding', 'utf-8'),
- shell=kwargs.get('shell', False),
- stderr=kwargs.get('stderr', subprocess.PIPE),
- stdout=kwargs.get('stdout', subprocess.PIPE))
- else:
- # Print it, not 'echo' it, since there might be some funky unescape stuff
- print(' '.join(command))
- return subprocess.CompletedProcess(['echo'] + command, 0)
-
-
-def output_or_error(command, error_gen=None, **kwargs):
- ''' Run a command and return the output as a string, or raise error.
- error_gen: a function that could either return or raise an error
- from a given subprocess.CompletedProcess object.
- '''
- result = run(command, **kwargs)
- if result.returncode:
- if error_gen is not None:
- raise error_gen(result)
- raise RuntimeError(f'`{" ".join(command)}` ({result.returncode})\n\t{result.stderr}\n\t{result.stdout}')
-
- if kwargs.get('stdout', subprocess.PIPE) == subprocess.PIPE:
- return result.stdout.strip()
- return ''
-
-
-def check_run(command, error_gen=None, **kwargs):
- ''' Just like output_or_error, but returns None on success.
- '''
- output_or_error(command, error_gen, **kwargs)
- return None
-
-
-def stdout_fail_ok(command, **kwargs):
- return run(command, **kwargs).stdout.strip()
\ No newline at end of file
diff --git a/chromium/scripts/robo_setup.py b/chromium/scripts/robo_setup.py
index 30d82c0..9f802d8 100755
--- a/chromium/scripts/robo_setup.py
+++ b/chromium/scripts/robo_setup.py
@@ -8,13 +8,25 @@
import io
import os
-from robo_lib.errors import UserInstructions
+from robo_lib import UserInstructions
import subprocess
-from robo_lib import shell
-from robo_lib import packages
+from robo_lib import log
import shutil
+def InstallUbuntuPackage(robo_configuration, package):
+ """Install |package|.
+
+ Args:
+ robo_configuration: current RoboConfiguration.
+ package: package name.
+ """
+
+ log("Installing package %s" % package)
+ if robo_configuration.Call(["sudo", "apt-get", "install", package]):
+ raise Exception("Could not install %s" % package)
+
+
def InstallPrereqs(robo_configuration):
"""Install prereqs needed to build ffmpeg.
@@ -26,7 +38,7 @@
# Check out data for ffmpeg regression tests.
media_directory = os.path.join("media", "test", "data", "internal")
if not os.path.exists(media_directory):
- shell.log("Checking out media internal test data")
+ log("Checking out media internal test data")
if robo_configuration.Call([
"git", "clone",
"https://chrome-internal.googlesource.com/chrome/data/media",
@@ -36,8 +48,8 @@
media_directory)
if robo_configuration.host_operating_system() == "linux":
- packages.Nasm.Install(robo_configuration)
- packages.GccAarch64LinuxGNU.Install(robo_configuration)
+ InstallUbuntuPackage(robo_configuration, "nasm")
+ InstallUbuntuPackage(robo_configuration, "gcc-aarch64-linux-gnu")
else:
raise Exception("I don't know how to install deps for host os %s" %
robo_configuration.host_operating_system())
@@ -61,7 +73,7 @@
# re-build it when we run ninja later (after importing the ffmpeg config)
# if it's changed.
- shell.log("Creating asan build dir %s" % directory_name)
+ log("Creating asan build dir %s" % directory_name)
os.mkdir(directory_name)
# TODO(liberato): ffmpeg_branding Chrome vs ChromeOS. also add arch
@@ -70,14 +82,14 @@
"media_use_libvpx=true", "media_use_ffmpeg=true",
'ffmpeg_branding="Chrome"', "use_goma=true", "is_asan=true",
"dcheck_always_on=true")
- print(opts)
+ print opts
with open(os.path.join(directory_name, "args.gn"), "w") as f:
for opt in opts:
- print(opt)
+ print opt
f.write("%s\n" % opt)
# Ask gn to generate build files.
- shell.log("Running gn on %s" % directory_name)
+ log("Running gn on %s" % directory_name)
if robo_configuration.Call(
["gn", "gen", robo_configuration.relative_asan_directory()]):
raise Exception(
@@ -92,9 +104,9 @@
def EnsureGClientTargets(robo_configuration):
"""Make sure that we've got the right sdks if we're on a linux host."""
if not robo_configuration.host_operating_system() == "linux":
- shell.log("Not changing gclient target_os list on a non-linux host")
+ log("Not changing gclient target_os list on a non-linux host")
return
- shell.log("Checking gclient target_os list")
+ log("Checking gclient target_os list")
gclient_filename = os.path.join(robo_configuration.chrome_src(), "..",
".gclient")
@@ -102,26 +114,26 @@
scope = {}
try:
exec (FileRead(gclient_filename), scope)
- except SyntaxError as e:
+ except SyntaxError, e:
raise Exception("Unable to read %s" % gclient_filename)
if 'target_os' not in scope:
- shell.log("Missing 'target_os', which goes at the end of .gclient,")
- shell.log("OUTSIDE of the solutions = [] section")
- shell.log("Example line:")
- shell.log("target_os = [ 'android', 'win' ]")
+ log("Missing 'target_os', which goes at the end of .gclient,")
+ log("OUTSIDE of the solutions = [] section")
+ log("Example line:")
+ log("target_os = [ 'android', 'win' ]")
raise UserInstructions("Please add target_os to %s" % gclient_filename)
if ('android' not in scope['target_os']) or ('win' not in scope['target_os']):
- shell.log("Missing 'android' and/or 'win' in target_os, which goes at the")
- shell.log("end of .gclient, OUTSIDE of the solutions = [] section")
- shell.log("Example line:")
- shell.log("target_os = [ 'android', 'win' ]")
+ log("Missing 'android' and/or 'win' in target_os, which goes at the")
+ log("end of .gclient, OUTSIDE of the solutions = [] section")
+ log("Example line:")
+ log("target_os = [ 'android', 'win' ]")
raise UserInstructions(
"Please add 'android' and 'win' to target_os in %s" % gclient_filename)
# Sync regardless of whether we changed the config.
- shell.log("Running gclient sync")
+ log("Running gclient sync")
robo_configuration.chdir_to_chrome_src()
if robo_configuration.Call(["gclient", "sync"]):
raise Exception("gclient sync failed")
@@ -131,26 +143,35 @@
"""Download some additional binaries needed by ffmpeg. gclient sync can
sometimes remove these. Re-run this if you're missing llvm-nm or llvm-ar."""
robo_configuration.chdir_to_chrome_src()
- shell.log("Downloading some additional compiler tools")
+ log("Downloading some additional compiler tools")
if robo_configuration.Call(["tools/clang/scripts/update.py",
"--package=objdump"]):
raise Exception("update.py --package=objdump failed")
-def FetchMacSDK(robo_configuration):
- """Download the MacOSX SDK."""
- shell.log("Installing Mac OSX sdk")
+def FetchMacSDKs(robo_configuration):
+ """Download the MacOSX SDKs."""
+ log("Installing Mac OSX sdk")
robo_configuration.chdir_to_chrome_src()
if robo_configuration.Call(
"FORCE_MAC_TOOLCHAIN=1 build/mac_toolchain.py",
shell=True):
- raise Exception("Cannot download and extract Mac SDK")
+ raise Exception("Cannot download and extract Mac beta SDK")
+
+ # TODO: Once the 11.0 SDK is out of beta, it should be used for both
+ # arm64 and intel builds.
+ log("Installing Mac OSX 11.0 beta sdk for arm64")
+ robo_configuration.chdir_to_chrome_src()
+ if robo_configuration.Call(
+ "FORCE_MAC_TOOLCHAIN=1 build/mac_toolchain.py",
+ shell=True):
+ raise Exception("Cannot download and extract Mac beta SDK")
def EnsureLLVMSymlinks(robo_configuration):
"""Create some symlinks to clang and friends, since that changes their
behavior somewhat."""
- shell.log("Creating symlinks to compiler tools if needed")
+ log("Creating symlinks to compiler tools if needed")
os.chdir(
os.path.join(robo_configuration.chrome_src(), "third_party", "llvm-build",
"Release+Asserts", "bin"))
@@ -173,7 +194,7 @@
robo_configuration.chdir_to_chrome_src()
for arch in ["arm", "arm64", "mips", "mips64el"]:
if robo_configuration.Call(
- ["build/linux/sysroot_scripts/install-sysroot.py", f"--arch={arch}"]):
+ ["build/linux/sysroot_scripts/install-sysroot.py", "--arch=" + arch]):
raise Exception("Failed to install sysroot for " + arch)
@@ -188,14 +209,14 @@
# build. That's not good.
llvm_nasm_path = os.path.join(robo_configuration.llvm_path(), "nasm")
if os.path.exists(llvm_nasm_path):
- shell.log("nasm already installed in llvm bin directory")
+ log("nasm already installed in llvm bin directory")
return
# Make sure nasm is built, and copy it to the llvm bin directory.
chromium_nasm_path = os.path.join(
robo_configuration.absolute_asan_directory(), "nasm")
if not os.path.exists(chromium_nasm_path):
- shell.log("Building Chromium's nasm")
+ log("Building Chromium's nasm")
if robo_configuration.Call([
"ninja", "-j5000", "-C",
robo_configuration.relative_asan_directory(), "third_party/nasm"
@@ -206,7 +227,7 @@
raise Exception("Failed to find nasm even after building it")
# Copy it
- shell.log("Copying Chromium's nasm to llvm bin directory")
+ log("Copying Chromium's nasm to llvm bin directory")
if shutil.copy(chromium_nasm_path, llvm_nasm_path):
raise Exception(
"Could not copy %s into %s" % (chromium_nasm_path, llvm_nasm_path))
@@ -216,7 +237,7 @@
"""Make sure that we have all the toolchains for cross-compilation"""
EnsureGClientTargets(robo_configuration)
FetchAdditionalWindowsBinaries(robo_configuration)
- FetchMacSDK(robo_configuration)
+ FetchMacSDKs(robo_configuration)
EnsureLLVMSymlinks(robo_configuration)
EnsureSysroots(robo_configuration)
@@ -224,11 +245,12 @@
def EnsureUpstreamRemote(robo_configuration):
"""Make sure that the upstream remote is defined."""
robo_configuration.chdir_to_ffmpeg_home()
- remotes = shell.output_or_error(["git", "remote", "-v"]).split()
+ remotes = subprocess.check_output(["git", "remote", "-v"]).split()
if "upstream" in remotes:
- shell.log("Upstream remote found")
+ log("Upstream remote found")
return
- shell.log("Adding upstream remote")
+ log("Adding upstream remote")
if robo_configuration.Call([
- "git", "remote", "add", "upstream", "git://source.ffmpeg.org/ffmpeg.git"]):
+ "git", "remote", "add", "upstream", "git://source.ffmpeg.org/ffmpeg.git"
+ ]):
raise Exception("Failed to add git remote")
diff --git a/chromium/scripts/robosushi.py b/chromium/scripts/robosushi.py
index c86b73f..7d7e568 100755
--- a/chromium/scripts/robosushi.py
+++ b/chromium/scripts/robosushi.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python
#
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -22,9 +22,9 @@
from subprocess import check_output
import robo_branch
-from robo_lib import shell
-from robo_lib import errors
-from robo_lib import config
+from robo_lib import log
+from robo_lib import UserInstructions
+import robo_lib
import robo_build
import robo_setup
@@ -55,7 +55,6 @@
robo_branch.AddAndCommit(robo_configuration,
robo_configuration.gn_commit_title())
-
# Array of steps that this script knows how to perform. Each step is a
# dictionary that has the following keys:
# desc: (required) user-friendly description of this step.
@@ -124,7 +123,7 @@
# Some things you probably don't need unless you're debugging.
"download_mac_sdk":
{ "desc": "Try to download the mac SDK, if needed.",
- "do_fn": robo_setup.FetchMacSDK },
+ "do_fn": robo_setup.FetchMacSDKs },
# Roll-up for --auto-merge
"auto-merge":
@@ -141,34 +140,31 @@
]) },
}
-
def RunSteps(cfg, step_names):
for step_name in step_names:
if not step_name in steps:
raise Exception("Unknown step %s" % step_name)
- shell.log("Step %s" % step_name)
+ log("Step %s" % step_name)
step = steps[step_name]
try:
if "pre_fn" in step:
raise Exception("pre_fn not supported yet")
if "skip_fn" in step:
if step["skip_fn"](cfg):
- shell.log("Step %s not needed, skipping" % step_name)
+ log("Step %s not needed, skipping" % step_name)
continue
step["do_fn"](cfg)
- except Exception as e:
- shell.log("Step %s failed" % step_name)
+ except Exception, e:
+ log("Step %s failed" % step_name)
raise e
-
def ListSteps():
for name, step in steps.iteritems():
if "desc" in step:
- print(f"{name}: {step['desc']}\n")
-
+ print "%s: %s\n" % (name, step["desc"])
def main(argv):
- robo_configuration = config.RoboConfiguration()
+ robo_configuration = robo_lib.RoboConfiguration()
robo_configuration.chdir_to_ffmpeg_home();
# TODO(liberato): Add a way to skip |skip_fn|.
@@ -185,13 +181,11 @@
"dev-merge",
])
- exec_steps = []
-
for opt, arg in parsed:
if opt == "--prompt":
robo_configuration.set_prompt_on_call(True)
elif opt == "--setup":
- exec_steps = ["setup"]
+ RunSteps(robo_configuration, ["setup"])
elif opt == "--test":
robo_build.BuildAndImportFFmpegConfigForHost(robo_configuration)
robo_build.RunTests(robo_configuration)
@@ -201,40 +195,39 @@
elif opt == "--patches":
# To be run after committing a local change to fix the tests.
if not robo_branch.IsWorkingDirectoryClean():
- raise errors.UserInstructions(
+ raise UserInstructions(
"Working directory must be clean to generate patches file")
robo_branch.UpdatePatchesFileUnconditionally(robo_configuration)
elif opt == "--auto-merge":
- exec_steps = ["auto-merge"]
+ # TODO: make sure that any untracked autorename files are removed, or
+ # make sure that the autorename git script doesn't try to 'git rm'
+ # untracked files, else the script fails.
+ RunSteps(robo_configuration, ["auto-merge"])
+
+ # TODO: Start a fake deps roll. To do this, we would:
+ # Create new remote branch from the current remote sushi branch.
+ # Create and check out a new local branch at the current local branch.
+ # Make the new local branch track the new remote branch.
+ # Push to origin/new remote branch.
+ # Start a fake deps roll CL that runs the *san bots.
+ # Switch back to original local branch.
+ # For extra points, include a pointer to the fake deps roll CL in the
+ # local branch, so that when it's pushed for review, it'll point the
+ # reviewer at it.
+
+ # TODO: git cl upload for review.
elif opt == "--step":
- exec_steps = arg.split(",")
+ RunSteps(robo_configuration, arg.split(","))
elif opt == "--list":
ListSteps()
elif opt == "--dev-merge":
# Use HEAD rather than origin/master, so that local robosushi changes
# are part of the merge. Only useful for testing those changes.
- new_merge_base = shell.output_or_error(["git", "log", "--format=%H", "-1"])
- shell.log(f"Using {new_merge_base} as new origin merge base for testing")
+ new_merge_base = check_output(["git", "log", "--format=%H", "-1"]).strip()
+ log("Using %s as new origin merge base for testing" % new_merge_base)
robo_configuration.override_origin_merge_base(new_merge_base)
else:
raise Exception("Unknown option '%s'" % opt);
- # TODO: make sure that any untracked autorename files are removed, or
- # make sure that the autorename git script doesn't try to 'git rm'
- # untracked files, else the script fails.
- RunSteps(robo_configuration, exec_steps)
- # TODO: Start a fake deps roll. To do this, we would:
- # Create new remote branch from the current remote sushi branch.
- # Create and check out a new local branch at the current local branch.
- # Make the new local branch track the new remote branch.
- # Push to origin/new remote branch.
- # Start a fake deps roll CL that runs the *san bots.
- # Switch back to original local branch.
- # For extra points, include a pointer to the fake deps roll CL in the
- # local branch, so that when it's pushed for review, it'll point the
- # reviewer at it.
- # TODO: git cl upload for review.
-
-
if __name__ == "__main__":
main(sys.argv[1:])
diff --git a/compat/cuda/cuda_runtime.h b/compat/cuda/cuda_runtime.h
index c5450b2..590c2d1 100644
--- a/compat/cuda/cuda_runtime.h
+++ b/compat/cuda/cuda_runtime.h
@@ -1,7 +1,7 @@
/*
* Minimum CUDA compatibility definitions header
*
- * Copyright (c) 2019 rcombs
+ * Copyright (c) 2019 Rodger Combs
*
* This file is part of FFmpeg.
*
@@ -73,7 +73,7 @@
typedef struct __device_builtin__ __align__(8) ushort4
{
- unsigned short x, y, z, w;
+ unsigned char x, y, z, w;
} ushort4;
typedef struct __device_builtin__ __align__(16) int4
diff --git a/configure b/configure
index eeb2b0a..0d94922 100755
--- a/configure
+++ b/configure
@@ -2125,7 +2125,6 @@
ES2_gl_h
gsm_h
io_h
- linux_dma_buf_h
linux_perf_event_h
machine_ioctl_bt848_h
machine_ioctl_meteor_h
@@ -2652,7 +2651,7 @@
# decoders / encoders
aac_decoder_select="adts_header mdct15 mdct sinewin"
-aac_fixed_decoder_select="adts_header mdct"
+aac_fixed_decoder_select="adts_header mdct sinewin"
aac_encoder_select="audio_frame_queue iirfilter lpc mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert mdct"
@@ -2688,6 +2687,7 @@
atrac3pal_decoder_select="mdct sinewin"
atrac9_decoder_select="mdct"
av1_decoder_select="cbs_av1"
+avrn_decoder_select="exif jpegtables"
bink_decoder_select="blockdsp hpeldsp"
binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs"
binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs"
@@ -2715,7 +2715,6 @@
eatgq_decoder_select="aandcttables"
eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp"
exr_decoder_deps="zlib"
-exr_encoder_deps="zlib"
ffv1_decoder_select="rangecoder"
ffv1_encoder_select="rangecoder"
ffvhuff_decoder_select="huffyuv_decoder"
@@ -2761,7 +2760,7 @@
jpegls_decoder_select="mjpeg_decoder"
jv_decoder_select="blockdsp"
lagarith_decoder_select="llviddsp"
-ljpeg_encoder_select="idctdsp jpegtables"
+ljpeg_encoder_select="idctdsp jpegtables mpegvideoenc"
lscr_decoder_deps="zlib"
magicyuv_decoder_select="llviddsp"
magicyuv_encoder_select="llvidencdsp"
@@ -2847,7 +2846,6 @@
sonic_ls_encoder_select="golomb rangecoder"
sp5x_decoder_select="mjpeg_decoder"
speedhq_decoder_select="mpegvideo"
-speedhq_encoder_select="mpegvideoenc"
srgc_decoder_deps="zlib"
svq1_decoder_select="hpeldsp"
svq1_encoder_select="hpeldsp me_cmp mpegvideoenc"
@@ -3306,9 +3304,9 @@
asf_muxer_select="riffenc"
asf_stream_muxer_select="asf_muxer"
av1_demuxer_select="av1_frame_merge_bsf av1_parser"
-avi_demuxer_select="riffdec exif"
+avi_demuxer_select="iso_media riffdec exif"
avi_muxer_select="riffenc"
-caf_demuxer_select="iso_media"
+caf_demuxer_select="iso_media riffdec"
caf_muxer_select="iso_media"
dash_muxer_select="mp4_muxer"
dash_demuxer_deps="libxml2"
@@ -3334,9 +3332,9 @@
ivf_muxer_select="av1_metadata_bsf vp9_superframe_bsf"
latm_muxer_select="aac_adtstoasc_bsf"
matroska_audio_muxer_select="matroska_muxer"
-matroska_demuxer_select="riffdec"
+matroska_demuxer_select="iso_media riffdec"
matroska_demuxer_suggest="bzlib lzo zlib"
-matroska_muxer_select="riffenc vp9_superframe_bsf aac_adtstoasc_bsf"
+matroska_muxer_select="iso_media riffenc vp9_superframe_bsf aac_adtstoasc_bsf"
mlp_demuxer_select="mlp_parser"
mmf_muxer_select="riffenc"
mov_demuxer_select="iso_media riffdec"
@@ -3382,7 +3380,7 @@
wav_demuxer_select="riffdec"
wav_muxer_select="riffenc"
webm_chunk_muxer_select="webm_muxer"
-webm_muxer_select="riffenc"
+webm_muxer_select="iso_media riffenc"
webm_dash_manifest_demuxer_select="matroska_demuxer"
wtv_demuxer_select="mpegts_demuxer riffdec"
wtv_muxer_select="mpegts_muxer riffenc"
@@ -4268,7 +4266,7 @@
ld_default="$source_path/compat/windows/mslink"
nm_default="dumpbin.exe -symbols"
ar_default="lib.exe"
- case "${arch:-$arch_default}" in
+ case "$arch" in
aarch64|arm64)
as_default="armasm64.exe"
;;
@@ -5390,12 +5388,7 @@
SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(INSTALL_NAME_DIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
strip="${strip} -x"
-
- # TODO(wolenetz): ld64.lld no longer recognizes the following flags and
- # produces error causing configure to misdetect things like whether
- # stdlib defines getenv.
- # add_ldflags -Wl,-dynamic,-search_paths_first
-
+ add_ldflags -Wl,-dynamic,-search_paths_first
check_cflags -Werror=partial-availability
SLIBSUF=".dylib"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
@@ -6163,9 +6156,6 @@
check_headers dxva.h
check_headers dxva2api.h -D_WIN32_WINNT=0x0600
check_headers io.h
-enabled libdrm &&
- check_headers linux/dma-buf.h
-
check_headers linux/perf_event.h
check_headers libcrystalhd/libcrystalhd_if.h
check_headers malloc.h
@@ -6252,7 +6242,7 @@
if enabled cuda_nvcc; then
nvccflags="$nvccflags -ptx"
else
- nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -Wno-c++11-narrowing -include ${source_link}/compat/cuda/cuda_runtime.h"
+ nvccflags="$nvccflags -S -nocudalib -nocudainc --cuda-device-only -include ${source_link}/compat/cuda/cuda_runtime.h"
check_nvcc cuda_llvm
fi
@@ -6419,7 +6409,7 @@
# }
enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new
enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection
-enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new
+enabled librav1e && require_pkg_config librav1e "rav1e >= 0.1.0" rav1e.h rav1e_context_new
enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo
enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket
enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++"
@@ -7586,11 +7576,10 @@
#define FFMPEG_CONFIG_H
#define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
#define FFMPEG_LICENSE "$(c_escape $license)"
-#define CONFIG_THIS_YEAR 2021
+#define CONFIG_THIS_YEAR 2020
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
-#define OS_NAME $target_os
#define av_restrict $restrict_keyword
#define EXTERN_PREFIX "${extern_prefix}"
#define EXTERN_ASM ${extern_prefix}
diff --git a/doc/APIchanges b/doc/APIchanges
index 13350c0..3fb9e12 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,51 +15,6 @@
API changes, most recent first:
-2021-03-10 - xxxxxxxxxx - lavf 58.72.100 - avformat.h
- Change AVBufferRef related AVStream function and struct size
- parameter and fields type to size_t at next major bump.
-
-2021-03-10 - xxxxxxxxxx - lavc 58.130.100 - packet.h
- Change AVBufferRef related AVPacket function and struct size
- parameter and fields type to size_t at next major bump.
-
-2021-03-10 - xxxxxxxxxx - lavu 56.68.100 - buffer.h frame.h
- Change AVBufferRef and relevant AVFrame function and struct size
- parameter and fields type to size_t at next major bump.
-
-2021-03-04 - xxxxxxxxxx - lavc 58.128.101 - avcodec.h
- Enable err_recognition to be set for encoders.
-
-2021-03-03 - xxxxxxxxxx - lavf 58.70.100 - avformat.h
- Deprecate AVFMT_FLAG_PRIV_OPT. It will do nothing
- as soon as av_demuxer_open() is removed.
-
-2021-02-27 - xxxxxxxxxx - lavc 58.126.100 - avcodec.h
- Deprecated avcodec_get_frame_class().
-
-2021-02-21 - xxxxxxxxxx - lavu 56.66.100 - tx.h
- Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE
-
-2021-02-14 - xxxxxxxxxx - lavd 58.12.100 - avdevice.h
- Deprecated avdevice_capabilities_create() and
- avdevice_capabilities_free().
-
-2021-02-xx - xxxxxxxxxx - lavu 56.xx.100 - common.h
- Add FFABS64U()
-
-2021-01-26 - xxxxxxxxxx - lavu 56.64.100 - common.h
- Add FFABSU()
-
-2021-01-25 - xxxxxxxxxx - lavc 58.119.100 - avcodec.h
- Deprecate AVCodecContext.debug_mv, FF_DEBUG_VIS_MV_P_FOR, FF_DEBUG_VIS_MV_B_FOR,
- FF_DEBUG_VIS_MV_B_BACK
-
-2021-01-11 - xxxxxxxxxx - lavc 58.116.100 - avcodec.h
- Add FF_PROFILE_VVC_MAIN_10 and FF_PROFILE_VVC_MAIN_10_444.
-
-2020-xx-xx - xxxxxxxxxx - lavu 56.63.100 - video_enc_params.h
- Add AV_VIDEO_ENC_PARAMS_MPEG2
-
2020-12-03 - xxxxxxxxxx - lavu 56.62.100 - timecode.h
Add av_timecode_init_from_components.
diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index 60e7294..8a2f55c 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -675,63 +675,6 @@
@end table
@end table
-@section setts
-Set PTS and DTS in packets.
-
-It accepts the following parameters:
-@table @option
-@item ts
-@item pts
-@item dts
-Set expressions for PTS, DTS or both.
-@end table
-
-The expressions are evaluated through the eval API and can contain the following
-constants:
-
-@table @option
-@item N
-The count of the input packet. Starting from 0.
-
-@item TS
-The demux timestamp in input in case of @code{ts} or @code{dts} option or presentation
-timestamp in case of @code{pts} option.
-
-@item POS
-The original position in the file of the packet, or undefined if undefined
-for the current packet
-
-@item DTS
-The demux timestamp in input.
-
-@item PTS
-The presentation timestamp in input.
-
-@item STARTDTS
-The DTS of the first packet.
-
-@item STARTPTS
-The PTS of the first packet.
-
-@item PREV_INDTS
-The previous input DTS.
-
-@item PREV_INPTS
-The previous input PTS.
-
-@item PREV_OUTDTS
-The previous output DTS.
-
-@item PREV_OUTPTS
-The previous output PTS.
-
-@item TB
-The timebase of stream packet belongs.
-
-@item SR
-The sample rate of stream packet belongs.
-@end table
-
@anchor{text2movsub}
@section text2movsub
diff --git a/doc/codecs.texi b/doc/codecs.texi
index 9add762..1da2590 100644
--- a/doc/codecs.texi
+++ b/doc/codecs.texi
@@ -50,6 +50,8 @@
Use internal 2pass ratecontrol in second pass mode.
@item gray
Only decode/encode grayscale.
+@item emu_edge
+Do not draw edges.
@item psnr
Set error[?] variables during encoding.
@item truncated
@@ -70,6 +72,10 @@
platforms. Its primary use is for regression testing.
@item aic
Apply H263 advanced intra coding / mpeg4 ac prediction.
+@item cbp
+Deprecated, use mpegvideo private options instead.
+@item qprd
+Deprecated, use mpegvideo private options instead.
@item ilme
Apply interlaced motion estimation.
@item cgop
@@ -78,6 +84,40 @@
Output even potentially corrupted frames.
@end table
+@item me_method @var{integer} (@emph{encoding,video})
+Set motion estimation method.
+
+Possible values:
+@table @samp
+@item zero
+zero motion estimation (fastest)
+@item full
+full motion estimation (slowest)
+@item epzs
+EPZS motion estimation (default)
+@item esa
+esa motion estimation (alias for full)
+@item tesa
+tesa motion estimation
+@item dia
+dia motion estimation (alias for epzs)
+@item log
+log motion estimation
+@item phods
+phods motion estimation
+@item x1
+X1 motion estimation
+@item hex
+hex motion estimation
+@item umh
+umh motion estimation
+@item iter
+iter motion estimation
+@end table
+
+@item extradata_size @var{integer}
+Set extradata size.
+
@item time_base @var{rational number}
Set codec time base.
@@ -144,6 +184,9 @@
@item b_qfactor @var{float} (@emph{encoding,video})
Set qp factor between P and B frames.
+@item rc_strategy @var{integer} (@emph{encoding,video})
+Set ratecontrol method.
+
@item b_strategy @var{integer} (@emph{encoding,video})
Set strategy to choose between I/P/B-frames.
@@ -167,6 +210,8 @@
@table @samp
@item autodetect
+@item old_msmpeg4
+some old lavc generated msmpeg4v3 files (no autodetection)
@item xvid_ilace
Xvid interlacing bug (autodetected if fourcc==XVIX)
@item ump4
@@ -175,6 +220,8 @@
padding bug (autodetected)
@item amv
+@item ac_vlc
+illegal vlc bug (autodetected per fourcc)
@item qpel_chroma
@item std_qpel
@@ -195,6 +242,14 @@
trancated frames
@end table
+@item lelim @var{integer} (@emph{encoding,video})
+Set single coefficient elimination threshold for luminance (negative
+values also consider DC coefficient).
+
+@item celim @var{integer} (@emph{encoding,video})
+Set single coefficient elimination threshold for chrominance (negative
+values also consider dc coefficient)
+
@item strict @var{integer} (@emph{decoding/encoding,audio,video})
Specify how strictly to follow the standards.
@@ -251,8 +306,26 @@
@item mpeg_quant @var{integer} (@emph{encoding,video})
Use MPEG quantizers instead of H.263.
+@item qsquish @var{float} (@emph{encoding,video})
+How to keep quantizer between qmin and qmax (0 = clip, 1 = use
+differentiable function).
+
+@item rc_qmod_amp @var{float} (@emph{encoding,video})
+Set experimental quantizer modulation.
+
+@item rc_qmod_freq @var{integer} (@emph{encoding,video})
+Set experimental quantizer modulation.
+
@item rc_override_count @var{integer}
+@item rc_eq @var{string} (@emph{encoding,video})
+Set rate control equation. When computing the expression, besides the
+standard functions defined in the section 'Expression Evaluation', the
+following functions are available: bits2qp(bits), qp2bits(qp). Also
+the following constants are available: iTex pTex tex mv fCode iCount
+mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex
+avgTex.
+
@item maxrate @var{integer} (@emph{encoding,audio,video})
Set max bitrate tolerance (in bits/s). Requires bufsize to be set.
@@ -263,12 +336,18 @@
@item bufsize @var{integer} (@emph{encoding,audio,video})
Set ratecontrol buffer size (in bits).
+@item rc_buf_aggressivity @var{float} (@emph{encoding,video})
+Currently useless.
+
@item i_qfactor @var{float} (@emph{encoding,video})
Set QP factor between P and I frames.
@item i_qoffset @var{float} (@emph{encoding,video})
Set QP offset between P and I frames.
+@item rc_init_cplx @var{float} (@emph{encoding,video})
+Set initial complexity for 1-pass encoding.
+
@item dct @var{integer} (@emph{encoding,video})
Set DCT algorithm.
@@ -333,7 +412,11 @@
@item simpleneon
-@item xvid
+@item simplealpha
+
+@item ipp
+
+@item xvidmmx
@item faani
floating point AAN IDCT
@@ -631,9 +714,19 @@
@item subq @var{integer} (@emph{encoding,video})
Set sub pel motion estimation quality.
+@item dtg_active_format @var{integer}
+
@item me_range @var{integer} (@emph{encoding,video})
Set limit motion vectors range (1023 for DivX player).
+@item ibias @var{integer} (@emph{encoding,video})
+Set intra quant bias.
+
+@item pbias @var{integer} (@emph{encoding,video})
+Set inter quant bias.
+
+@item color_table_id @var{integer}
+
@item global_quality @var{integer} (@emph{encoding,audio,video})
@item coder @var{integer} (@emph{encoding,video})
@@ -648,6 +741,8 @@
raw (no encoding)
@item rle
run-length coder
+@item deflate
+deflate-based coder
@end table
@item context @var{integer} (@emph{encoding,video})
@@ -668,9 +763,17 @@
use best rate distortion
@end table
+@item stream_codec_tag @var{integer}
+
@item sc_threshold @var{integer} (@emph{encoding,video})
Set scene change threshold.
+@item lmin @var{integer} (@emph{encoding,video})
+Set min lagrange factor (VBR).
+
+@item lmax @var{integer} (@emph{encoding,video})
+Set max lagrange factor (VBR).
+
@item nr @var{integer} (@emph{encoding,video})
Set noise reduction.
@@ -713,14 +816,13 @@
@item prft
Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT})
for codecs that support it.
-@item venc_params
-Export video encoding parameters through frame side data (see @code{AV_FRAME_DATA_VIDEO_ENC_PARAMS})
-for codecs that support it. At present, those are H.264 and VP9.
-@item film_grain
-Export film grain parameters through frame side data (see @code{AV_FRAME_DATA_FILM_GRAIN_PARAMS}).
-Supported at present by AV1 decoders.
@end table
+@item error @var{integer} (@emph{encoding,video})
+
+@item qns @var{integer} (@emph{encoding,video})
+Deprecated, use mpegvideo private options instead.
+
@item threads @var{integer} (@emph{decoding/encoding,video})
Set the number of threads to be used, in case the selected codec
implementation supports multi-threading.
@@ -733,6 +835,12 @@
Default value is @samp{auto}.
+@item me_threshold @var{integer} (@emph{encoding,video})
+Set motion estimation threshold.
+
+@item mb_threshold @var{integer} (@emph{encoding,video})
+Set macroblock threshold.
+
@item dc @var{integer} (@emph{encoding,video})
Set intra_dc_precision.
@@ -810,6 +918,9 @@
@end table
+@item border_mask @var{float} (@emph{encoding,video})
+Increase the quantizer for macroblocks close to borders.
+
@item mblmin @var{integer} (@emph{encoding,video})
Set min macroblock lagrange factor (VBR).
@@ -883,6 +994,9 @@
@item timecode_frame_start @var{integer} (@emph{encoding,video})
Set GOP timecode frame start number, in non drop frame format.
+@item request_channels @var{integer} (@emph{decoding,audio})
+Set desired number of audio channels.
+
@item bits_per_raw_sample @var{integer}
@item channel_layout @var{integer} (@emph{decoding/encoding,audio})
diff --git a/doc/decoders.texi b/doc/decoders.texi
index 27c6ba4..bfab562 100644
--- a/doc/decoders.texi
+++ b/doc/decoders.texi
@@ -25,19 +25,6 @@
A description of some of the currently available video decoders
follows.
-@section av1
-
-AOMedia Video 1 (AV1) decoder.
-
-@subsection Options
-
-@table @option
-
-@item operating_point
-Select an operating point of a scalable AV1 bitstream (0 - 31). Default is 0.
-
-@end table
-
@section rawvideo
Raw video decoder.
diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785..0b1c69e 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -151,9 +151,10 @@
The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
encoder only uses fixed-point integer math. This does not mean that one is
always faster, just that one or the other may be better suited to a
-particular system. The @var{ac3_fixed} encoder is not the default codec for
-any of the output formats, so it must be specified explicitly using the option
-@code{-acodec ac3_fixed} in order to use it.
+particular system. The floating-point encoder will generally produce better
+quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
+default codec for any of the output formats, so it must be specified explicitly
+using the option @code{-acodec ac3_fixed} in order to use it.
@subsection AC-3 Metadata
@@ -1268,44 +1269,6 @@
A description of some of the currently available video encoders
follows.
-@section GIF
-
-GIF image/animation encoder.
-
-@subsection Options
-
-@table @option
-@item gifflags @var{integer}
-Sets the flags used for GIF encoding.
-
-@table @option
-@item offsetting
-Enables picture offsetting.
-
-Default is enabled.
-
-@item transdiff
-Enables transparency detection between frames.
-
-Default is enabled.
-
-@end table
-
-@item gifimage @var{integer}
-Enables encoding one full GIF image per frame, rather than an animated GIF.
-
-Default value is @option{0}.
-
-@item global_palette @var{integer}
-Writes a palette to the global GIF header where feasible.
-
-If disabled, every frame will always have a palette written, even if there
-is a global palette supplied.
-
-Default value is @option{1}.
-
-@end table
-
@section Hap
Vidvox Hap video encoder.
@@ -1722,17 +1685,6 @@
@item enable-smooth-interintra (@emph{boolean}) (Requires libaom >= v2.0.0)
Enable smooth interintra mode. Default is true.
-@item aom-params
-Set libaom options using a list of @var{key}=@var{value} pairs separated
-by ":". For a list of supported options, see @command{aomenc --help} under the
-section "AV1 Specific Options".
-
-For example to specify libaom encoding options with @option{-aom-params}:
-
-@example
-ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4
-@end example
-
@end table
@section libsvtav1
@@ -2177,38 +2129,6 @@
The valid range is [0, 10000]. 0 (default) uses standard VBR.
@item enable-tpl @var{boolean}
Enable temporal dependency model.
-@item ref-frame-config
-Using per-frame metadata, set members of the structure @code{vpx_svc_ref_frame_config_t} in @code{vpx/vp8cx.h} to fine-control referencing schemes and frame buffer management.
-@*Use a :-separated list of key=value pairs.
-For example,
-@example
-av_dict_set(&av_frame->metadata, "ref-frame-config", \
-"rfc_update_buffer_slot=7:rfc_lst_fb_idx=0:rfc_gld_fb_idx=1:rfc_alt_fb_idx=2:rfc_reference_last=0:rfc_reference_golden=0:rfc_reference_alt_ref=0");
-@end example
-@table @option
-@item rfc_update_buffer_slot
-Indicates the buffer slot number to update
-@item rfc_update_last
-Indicates whether to update the LAST frame
-@item rfc_update_golden
-Indicates whether to update GOLDEN frame
-@item rfc_update_alt_ref
-Indicates whether to update ALT_REF frame
-@item rfc_lst_fb_idx
-LAST frame buffer index
-@item rfc_gld_fb_idx
-GOLDEN frame buffer index
-@item rfc_alt_fb_idx
-ALT_REF frame buffer index
-@item rfc_reference_last
-Indicates whether to reference LAST frame
-@item rfc_reference_golden
-Indicates whether to reference GOLDEN frame
-@item rfc_reference_alt_ref
-Indicates whether to reference ALT_REF frame
-@item rfc_reference_duration
-Indicates frame duration
-@end table
@end table
@end table
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index b0d1cf0..95d6463 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -675,19 +675,14 @@
Print encoding progress/statistics. It is on by default, to explicitly
disable it you need to specify @code{-nostats}.
-@item -stats_period @var{time} (@emph{global})
-Set period at which encoding progress/statistics are updated. Default is 0.5 seconds.
-
@item -progress @var{url} (@emph{global})
Send program-friendly progress information to @var{url}.
-Progress information is written periodically and at the end of
+Progress information is written approximately every second and at the end of
the encoding process. It is made of "@var{key}=@var{value}" lines. @var{key}
consists of only alphanumeric characters. The last key of a sequence of
progress information is always "progress".
-The update period is set using @code{-stats_period}.
-
@anchor{stdin option}
@item -stdin
Enable interaction on standard input. On by default unless standard input is
@@ -759,13 +754,6 @@
As an output option, duplicate or drop input frames to achieve constant output
frame rate @var{fps}.
-@item -fpsmax[:@var{stream_specifier}] @var{fps} (@emph{output,per-stream})
-Set maximum frame rate (Hz value, fraction or abbreviation).
-
-Clamps output frame rate when output framerate is auto-set and is higher than this value.
-Useful in batch processing or when input framerate is wrongly detected as very high.
-It cannot be set together with @code{-r}. It is ignored during streamcopy.
-
@item -s[:@var{stream_specifier}] @var{size} (@emph{input/output,per-stream})
Set frame size.
@@ -1512,17 +1500,6 @@
This option has been deprecated. Use the @code{aresample} audio filter instead.
-@item -adrift_threshold @var{time}
-Set the minimum difference between timestamps and audio data (in seconds) to trigger
-adding/dropping samples to make it match the timestamps. This option effectively is
-a threshold to select between hard (add/drop) and soft (squeeze/stretch) compensation.
-@code{-async} must be set to a positive value.
-
-@item -apad @var{parameters} (@emph{output,per-stream})
-Pad the output audio stream(s). This is the same as applying @code{-af apad}.
-Argument is a string of filter parameters composed the same as with the @code{apad} filter.
-@code{-shortest} must be set for this output for the option to take effect.
-
@item -copyts
Do not process input timestamps, but keep their values without trying
to sanitize them. In particular, do not remove the initial start time
@@ -1677,22 +1654,6 @@
ffmpeg -i video.mkv -i image.png -filter_complex 'overlay' out.mkv
@end example
-As a special exception, you can use a bitmap subtitle stream as input: it
-will be converted into a video with the same size as the largest video in
-the file, or 720x576 if no video is present. Note that this is an
-experimental and temporary solution. It will be removed once libavfilter has
-proper support for subtitles.
-
-For example, to hardcode subtitles on top of a DVB-T recording stored in
-MPEG-TS format, delaying the subtitles by 1 second:
-@example
-ffmpeg -i input.ts -filter_complex \
- '[#0x2ef] setpts=PTS+1/TB [sub] ; [#0x2d0] [sub] overlay' \
- -sn -map '#0x2dc' output.mkv
-@end example
-(0x2d0, 0x2dc and 0x2ef are the MPEG-TS PIDs of respectively the video,
-audio and subtitles streams; 0:0, 0:3 and 0:7 would have worked too)
-
To generate 5 seconds of pure red video using lavfi @code{color} source:
@example
ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
@@ -1773,11 +1734,6 @@
No packets were passed to the muxer in some of the output streams.
@end table
-@item -max_error_rate (@emph{global})
-Set fraction of decoding frame failures across all inputs which when crossed
-ffmpeg will return exit code 69. Crossing this threshold does not terminate
-processing. Range is a floating-point number between 0 to 1. Default is 2/3.
-
@item -xerror (@emph{global})
Stop and exit on error
@@ -1807,6 +1763,22 @@
@end table
+As a special exception, you can use a bitmap subtitle stream as input: it
+will be converted into a video with the same size as the largest video in
+the file, or 720x576 if no video is present. Note that this is an
+experimental and temporary solution. It will be removed once libavfilter has
+proper support for subtitles.
+
+For example, to hardcode subtitles on top of a DVB-T recording stored in
+MPEG-TS format, delaying the subtitles by 1 second:
+@example
+ffmpeg -i input.ts -filter_complex \
+ '[#0x2ef] setpts=PTS+1/TB [sub] ; [#0x2d0] [sub] overlay' \
+ -sn -map '#0x2dc' output.mkv
+@end example
+(0x2d0, 0x2dc and 0x2ef are the MPEG-TS PIDs of respectively the video,
+audio and subtitles streams; 0:0, 0:3 and 0:7 would have worked too)
+
@section Preset files
A preset file contains a sequence of @var{option}=@var{value} pairs,
one for each line, specifying a sequence of options which would be
diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
index 4427d02..71cbd23 100644
--- a/doc/ffprobe.xsd
+++ b/doc/ffprobe.xsd
@@ -61,6 +61,8 @@
<xsd:attribute name="dts_time" type="xsd:float" />
<xsd:attribute name="duration" type="xsd:long" />
<xsd:attribute name="duration_time" type="xsd:float" />
+ <xsd:attribute name="convergence_duration" type="xsd:long" />
+ <xsd:attribute name="convergence_duration_time" type="xsd:float" />
<xsd:attribute name="size" type="xsd:long" use="required" />
<xsd:attribute name="pos" type="xsd:long" />
<xsd:attribute name="flags" type="xsd:string" use="required" />
@@ -213,6 +215,7 @@
<xsd:attribute name="codec_long_name" type="xsd:string" />
<xsd:attribute name="profile" type="xsd:string" />
<xsd:attribute name="codec_type" type="xsd:string" />
+ <xsd:attribute name="codec_time_base" type="xsd:string" use="required"/>
<xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
<xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
<xsd:attribute name="extradata" type="xsd:string" />
@@ -235,6 +238,7 @@
<xsd:attribute name="color_primaries" type="xsd:string"/>
<xsd:attribute name="chroma_location" type="xsd:string"/>
<xsd:attribute name="field_order" type="xsd:string"/>
+ <xsd:attribute name="timecode" type="xsd:string"/>
<xsd:attribute name="refs" type="xsd:int"/>
<!-- audio attributes -->
@@ -354,6 +358,7 @@
<xsd:attribute name="hwaccel" type="xsd:int" use="required"/>
<xsd:attribute name="planar" type="xsd:int" use="required"/>
<xsd:attribute name="rgb" type="xsd:int" use="required"/>
+ <xsd:attribute name="pseudopal" type="xsd:int" use="required"/>
<xsd:attribute name="alpha" type="xsd:int" use="required"/>
</xsd:complexType>
diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi
index 5260ecb..2c94eae 100644
--- a/doc/fftools-common-opts.texi
+++ b/doc/fftools-common-opts.texi
@@ -122,9 +122,6 @@
@item -version
Show version.
-@item -buildconf
-Show the build configuration, one option per line.
-
@item -formats
Show available formats (including devices).
@@ -352,12 +349,6 @@
@item k8
@end table
@end table
-
-@item -max_alloc @var{bytes}
-Set the maximum size limit for allocating a block on the heap by ffmpeg's
-family of malloc functions. Exercise @strong{extreme caution} when using
-this option. Don't use if you do not understand the full consequence of doing so.
-Default is INT_MAX.
@end table
@section AVOptions
diff --git a/doc/filters.texi b/doc/filters.texi
index eb0a0b6..89244dc 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -640,10 +640,6 @@
Set LFO rate.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section acue
Delay audio filtering until a given wallclock timestamp. See the @ref{cue}
@@ -656,44 +652,44 @@
autoregressive modelling.
@table @option
-@item window, w
+@item w
Set window size, in milliseconds. Allowed range is from @code{10} to
@code{100}. Default value is @code{55} milliseconds.
This sets size of window which will be processed at once.
-@item overlap, o
+@item o
Set window overlap, in percentage of window size. Allowed range is from
@code{50} to @code{95}. Default value is @code{75} percent.
Setting this to a very high value increases impulsive noise removal but makes
whole process much slower.
-@item arorder, a
+@item a
Set autoregression order, in percentage of window size. Allowed range is from
@code{0} to @code{25}. Default value is @code{2} percent. This option also
controls quality of interpolated samples using neighbour good samples.
-@item threshold, t
+@item t
Set threshold value. Allowed range is from @code{1} to @code{100}.
Default value is @code{2}.
This controls the strength of impulsive noise which is going to be removed.
The lower value, the more samples will be detected as impulsive noise.
-@item burst, b
+@item b
Set burst fusion, in percentage of window size. Allowed range is @code{0} to
@code{10}. Default value is @code{2}.
If any two samples detected as noise are spaced less than this value then any
sample between those two samples will be also detected as noise.
-@item method, m
+@item m
Set overlap method.
It accepts the following values:
@table @option
-@item add, a
+@item a
Select overlap-add method. Even not interpolated samples are slightly
changed with this method.
-@item save, s
+@item s
Select overlap-save method. Not interpolated samples remain unchanged.
@end table
@@ -707,38 +703,38 @@
autoregressive modelling.
@table @option
-@item window, w
+@item w
Set window size, in milliseconds. Allowed range is from @code{10} to @code{100}.
Default value is @code{55} milliseconds.
This sets size of window which will be processed at once.
-@item overlap, o
+@item o
Set window overlap, in percentage of window size. Allowed range is from @code{50}
to @code{95}. Default value is @code{75} percent.
-@item arorder, a
+@item a
Set autoregression order, in percentage of window size. Allowed range is from
@code{0} to @code{25}. Default value is @code{8} percent. This option also controls
quality of interpolated samples using neighbour good samples.
-@item threshold, t
+@item t
Set threshold value. Allowed range is from @code{1} to @code{100}.
Default value is @code{10}. Higher values make clip detection less aggressive.
-@item hsize, n
+@item n
Set size of histogram used to detect clips. Allowed range is from @code{100} to @code{9999}.
Default value is @code{1000}. Higher values make clip detection less aggressive.
-@item method, m
+@item m
Set overlap method.
It accepts the following values:
@table @option
-@item add, a
+@item a
Select overlap-add method. Even not interpolated samples are slightly changed
with this method.
-@item save, s
+@item s
Select overlap-save method. Not interpolated samples remain unchanged.
@end table
@@ -1003,62 +999,6 @@
@end example
@end itemize
-@section aexciter
-
-An exciter is used to produce high sound that is not present in the
-original signal. This is done by creating harmonic distortions of the
-signal which are restricted in range and added to the original signal.
-An Exciter raises the upper end of an audio signal without simply raising
-the higher frequencies like an equalizer would do to create a more
-"crisp" or "brilliant" sound.
-
-The filter accepts the following options:
-
-@table @option
-@item level_in
-Set input level prior processing of signal.
-Allowed range is from 0 to 64.
-Default value is 1.
-
-@item level_out
-Set output level after processing of signal.
-Allowed range is from 0 to 64.
-Default value is 1.
-
-@item amount
-Set the amount of harmonics added to original signal.
-Allowed range is from 0 to 64.
-Default value is 1.
-
-@item drive
-Set the amount of newly created harmonics.
-Allowed range is from 0.1 to 10.
-Default value is 8.5.
-
-@item blend
-Set the octave of newly created harmonics.
-Allowed range is from -10 to 10.
-Default value is 0.
-
-@item freq
-Set the lower frequency limit of producing harmonics in Hz.
-Allowed range is from 2000 to 12000 Hz.
-Default is 7500 Hz.
-
-@item ceil
-Set the upper frequency limit of producing harmonics.
-Allowed range is from 9999 to 20000 Hz.
-If value is lower than 10000 Hz no limit is applied.
-
-@item listen
-Mute the original signal and output only added harmonics.
-By default is disabled.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@anchor{afade}
@section afade
@@ -1935,11 +1875,6 @@
@item weights
Specify weight of each input audio stream as sequence.
Each weight is separated by space. By default all inputs have same weight.
-
-@item normalize
-Always scale inputs instead of only doing summation of samples.
-Beware of heavy clipping if inputs are not normalized prior or after filtering
-by this filter if this option is disabled. By default is enabled.
@end table
@subsection Commands
@@ -1947,7 +1882,6 @@
This filter supports the following commands:
@table @option
@item weights
-@item sum
Syntax is same as option with same name.
@end table
@@ -2409,10 +2343,6 @@
noise removed from input signal.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section asetnsamples
Set the number of samples per each output audio frame.
@@ -2524,12 +2454,6 @@
@item erf
@end table
-@item threshold
-Set threshold from where to start clipping. Default value is 0dB or 1.
-
-@item output
-Set gain applied to output. Default value is 0dB or 1.
-
@item param
Set additional parameter which controls sigmoid function.
@@ -3225,9 +3149,6 @@
@item width, w
Determine how steep is the filter's shelf transition.
-@item poles, p
-Set number of poles. Default is 2.
-
@item mix, m
How much to use filtered signal in output. Default is 1.
Range is between 0 and 1.
@@ -3752,17 +3673,14 @@
This filter supports the all above options as @ref{commands}.
@section crystalizer
-Simple algorithm for audio noise sharpening.
-
-This filter linearly increases differences betweeen each audio sample.
+Simple algorithm to expand audio dynamic range.
The filter accepts the following options:
@table @option
@item i
-Sets the intensity of effect (default: 2.0). Must be in range between -10.0 to 0
+Sets the intensity of effect (default: 2.0). Must be in range between 0.0
(unchanged sound) to 10.0 (maximum effect).
-To inverse filtering use negative value.
@item c
Enable clipping. By default is enabled.
@@ -6132,9 +6050,6 @@
@item width, w
Determine how steep is the filter's shelf transition.
-@item poles, p
-Set number of poles. Default is 2.
-
@item mix, m
How much to use filtered signal in output. Default is 1.
Range is between 0 and 1.
@@ -7166,15 +7081,6 @@
Parallel can be faster then serial, while other way around is never true.
Parallel will abort early on first change being greater then thresholds, while serial
will continue processing other side of frames if they are equal or below thresholds.
-
-@item 0s
-@item 1s
-@item 2s
-Set sigma for 1st plane, 2nd plane or 3rd plane. Default is 32767.
-Valid range is from 0 to 32767.
-This options controls weight for each pixel in radius defined by size.
-Default value means every pixel have same weight.
-Setting this option to 0 effectively disables filtering.
@end table
@subsection Commands
@@ -7223,10 +7129,6 @@
Set the minimal luminance value. Default is @code{16}.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section bilateral
Apply bilateral filter, spatial smoothing while preserving edges.
@@ -7244,10 +7146,6 @@
Set planes to filter. Default is first only.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section bitplanenoise
Show and measure bit plane noise.
@@ -7515,9 +7413,6 @@
@end example
@end itemize
-@subsection Commands
-This filter supports same @ref{commands} as options.
-
@section bm3d
Denoise frames using Block-Matching 3D algorithm.
@@ -7759,9 +7654,6 @@
planes except alpha plane.
@end table
-@subsection Commands
-This filter supports same @ref{commands} as options.
-
@section chromahold
Remove all color information for all colors except for certain one.
@@ -8095,69 +7987,6 @@
This filter supports the all above options as @ref{commands}.
-@section colorcontrast
-
-Adjust color contrast between RGB components.
-
-The filter accepts the following options:
-
-@table @option
-@item rc
-Set the red-cyan contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
-
-@item gm
-Set the green-magenta contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
-
-@item by
-Set the blue-yellow contrast. Defaults is 0.0. Allowed range is from -1.0 to 1.0.
-
-@item rcw
-@item gmw
-@item byw
-Set the weight of each @code{rc}, @code{gm}, @code{by} option value. Default value is 0.0.
-Allowed range is from 0.0 to 1.0. If all weights are 0.0 filtering is disabled.
-
-@item pl
-Set the amount of preserving lightness. Default value is 0.0. Allowed range is from 0.0 to 1.0.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
-@section colorcorrect
-
-Adjust color white balance selectively for blacks and whites.
-This filter operates in YUV colorspace.
-
-The filter accepts the following options:
-
-@table @option
-@item rl
-Set the red shadow spot. Allowed range is from -1.0 to 1.0.
-Default value is 0.
-
-@item bl
-Set the blue shadow spot. Allowed range is from -1.0 to 1.0.
-Default value is 0.
-
-@item rh
-Set the red highlight spot. Allowed range is from -1.0 to 1.0.
-Default value is 0.
-
-@item bh
-Set the red highlight spot. Allowed range is from -1.0 to 1.0.
-Default value is 0.
-
-@item saturation
-Set the amount of saturation. Allowed range is from -3.0 to 3.0.
-Default value is 1.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section colorchannelmixer
Adjust video input frames by re-mixing color channels.
@@ -8201,10 +8030,6 @@
Default is @code{1} for @var{aa}, and @code{0} for @var{ar}, @var{ag} and @var{ab}.
Allowed ranges for options are @code{[-2.0, 2.0]}.
-
-@item pl
-Preserve lightness when changing colors. Allowed range is from @code{[0.0, 1.0]}.
-Default is @code{0.0}, thus disabled.
@end table
@subsection Examples
@@ -8226,33 +8051,6 @@
This filter supports the all above options as @ref{commands}.
-@section colorize
-Overlay a solid color on the video stream.
-
-The filter accepts the following options:
-
-@table @option
-@item hue
-Set the color hue. Allowed range is from 0 to 360.
-Default value is 0.
-
-@item saturation
-Set the color saturation. Allowed range is from 0 to 1.
-Default value is 0.5.
-
-@item lightness
-Set the color lightness. Allowed range is from 0 to 1.
-Default value is 0.5.
-
-@item mix
-Set the mix of source lightness. By default is set to 1.0.
-Allowed range is from 0.0 to 1.0.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section colorkey
RGB colorspace color keying.
@@ -8713,28 +8511,6 @@
colorspace=smpte240m
@end example
-@section colortemperature
-Adjust color temperature in video to simulate variations in ambient color temperature.
-
-The filter accepts the following options:
-
-@table @option
-@item temperature
-Set the temperature in Kelvin. Allowed range is from 1000 to 40000.
-Default value is 6500 K.
-
-@item mix
-Set mixing with filtered output. Allowed range is from 0 to 1.
-Default value is 1.
-
-@item pl
-Set the amount of preserving lightness. Allowed range is from 0 to 1.
-Default value is 0.
-@end table
-
-@subsection Commands
-This filter supports same @ref{commands} as options.
-
@section convolution
Apply convolution of 3x3, 5x5, 7x7 or horizontal/vertical up to 49 elements.
@@ -9313,10 +9089,6 @@
To avoid some filtergraph syntax conflicts, each key points list need to be
defined using the following syntax: @code{x0/y0 x1/y1 x2/y2 ...}.
-@subsection Commands
-
-This filter supports same @ref{commands} as options.
-
@subsection Examples
@itemize
@@ -9409,15 +9181,8 @@
@item format
Set display number format. Can be @code{hex}, or @code{dec}. Default is @code{hex}.
-
-@item components
-Set pixel components to display. By default all pixel components are displayed.
@end table
-@subsection Commands
-
-This filter supports same @ref{commands} as options excluding @code{size} option.
-
@section dblur
Apply Directional blur filter.
@@ -9550,10 +9315,6 @@
The default is disabled.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section deblock
Remove blocking artifacts from input video.
@@ -9613,10 +9374,6 @@
@end example
@end itemize
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@anchor{decimate}
@section decimate
@@ -10180,10 +9937,6 @@
@item output
Set the output name of the dnn network.
-@item async
-use DNN async execution if set (default: set),
-roll back to sync execution if the backend does not support async.
-
@end table
@subsection Examples
@@ -11145,18 +10898,6 @@
between neighbour histogram values.
@end table
-@section epx
-Apply the EPX magnification filter which is designed for pixel art.
-
-It accepts the following option:
-
-@table @option
-@item n
-Set the scaling dimension: @code{2} for @code{2xEPX}, @code{3} for
-@code{3xEPX}.
-Default is @code{3}.
-@end table
-
@section eq
Set brightness, contrast, saturation and approximate gamma adjustment.
@@ -11298,102 +11039,6 @@
This filter supports the all above options as @ref{commands}.
-@section estdif
-
-Deinterlace the input video ("estdif" stands for "Edge Slope
-Tracing Deinterlacing Filter").
-
-Spatial only filter that uses edge slope tracing algorithm
-to interpolate missing lines.
-It accepts the following parameters:
-
-@table @option
-@item mode
-The interlacing mode to adopt. It accepts one of the following values:
-
-@table @option
-@item frame
-Output one frame for each frame.
-@item field
-Output one frame for each field.
-@end table
-
-The default value is @code{field}.
-
-@item parity
-The picture field parity assumed for the input interlaced video. It accepts one
-of the following values:
-
-@table @option
-@item tff
-Assume the top field is first.
-@item bff
-Assume the bottom field is first.
-@item auto
-Enable automatic detection of field parity.
-@end table
-
-The default value is @code{auto}.
-If the interlacing is unknown or the decoder does not export this information,
-top field first will be assumed.
-
-@item deint
-Specify which frames to deinterlace. Accepts one of the following
-values:
-
-@table @option
-@item all
-Deinterlace all frames.
-@item interlaced
-Only deinterlace frames marked as interlaced.
-@end table
-
-The default value is @code{all}.
-
-@item rslope
-Specify the search radius for edge slope tracing. Default value is 1.
-Allowed range is from 1 to 15.
-
-@item redge
-Specify the search radius for best edge matching. Default value is 2.
-Allowed range is from 0 to 15.
-
-@item interp
-Specify the interpolation used. Default is 4-point interpolation. It accepts one
-of the following values:
-
-@table @option
-@item 2p
-Two-point interpolation.
-@item 4p
-Four-point interpolation.
-@item 6p
-Six-point interpolation.
-@end table
-@end table
-
-@subsection Commands
-This filter supports same @ref{commands} as options.
-
-@section exposure
-Adjust exposure of the video stream.
-
-The filter accepts the following options:
-
-@table @option
-@item exposure
-Set the exposure correction in EV. Allowed range is from -3.0 to 3.0 EV
-Default value is 0 EV.
-
-@item black
-Set the black level correction. Allowed range is from -1.0 to 1.0.
-Default value is 0.
-@end table
-
-@subsection Commands
-
-This filter supports same @ref{commands} as options.
-
@section extractplanes
Extract color channel components from input video stream into
@@ -12099,25 +11744,16 @@
fill pixels using outermost pixels
@item mirror
-fill pixels using mirroring (half sample symmetric)
+fill pixels using mirroring
@item fixed
fill pixels with constant value
-
-@item reflect
-fill pixels using reflecting (whole sample symmetric)
-
-@item wrap
-fill pixels using wrapping
-
-@item fade
-fade pixels to constant value
@end table
Default is @var{smear}.
@item color
-Set color for pixels in fixed or fade mode. Default is @var{black}.
+Set color for pixels in fixed mode. Default is @var{black}.
@end table
@subsection Commands
@@ -12901,10 +12537,6 @@
More information about the Hald CLUT can be found on Eskil Steenberg's website
(Hald CLUT author) at @url{http://www.quelsolaar.com/technology/clut.html}.
-@subsection Commands
-
-This filter supports the @code{interp} option as @ref{commands}.
-
@subsection Workflow examples
@subsubsection Hald CLUT video stream
@@ -13382,28 +13014,6 @@
The @code{hysteresis} filter also supports the @ref{framesync} options.
-@section identity
-
-Obtain the identity score between two input videos.
-
-This filter takes two input videos.
-
-Both input videos must have the same resolution and pixel format for
-this filter to work correctly. Also it assumes that both inputs
-have the same number of frames, which are compared one by one.
-
-The obtained per component, average, min and max identity score is printed through
-the logging system.
-
-The filter stores the calculated identity scores of each frame in frame metadata.
-
-In the below example the input file @file{main.mpg} being processed is compared
-with the reference file @file{ref.mpg}.
-
-@example
-ffmpeg -i main.mpg -i ref.mpg -lavfi identity -f null -
-@end example
-
@section idet
Detect video interlacing type.
@@ -13646,27 +13256,6 @@
@end example
@end itemize
-@section kirsch
-Apply kirsch operator to input video stream.
-
-The filter accepts the following option:
-
-@table @option
-@item planes
-Set which planes will be processed, unprocessed planes will be copied.
-By default value 0xf, all planes will be processed.
-
-@item scale
-Set value which will be multiplied with filtered result.
-
-@item delta
-Set value which will be added to filtered result.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section lagfun
Slowly update darker pixels.
@@ -13682,10 +13271,6 @@
Set which planes to filter. Default is all. Allowed range is from 0 to 15.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section lenscorrection
Correct radial lens distortion
@@ -13724,13 +13309,6 @@
@item k2
Coefficient of the double quadratic correction term. This value has a range [-1,1].
0 means no correction. Default is 0.
-@item i
-Set interpolation type. Can be @code{nearest} or @code{bilinear}.
-Default is @code{nearest}.
-@item fc
-Specify the color of the unmapped pixels. For the syntax of this option,
-check the @ref{color syntax,,"Color" section in the ffmpeg-utils
-manual,ffmpeg-utils}. Default color is @code{black@@0}.
@end table
The formula that generates the correction is:
@@ -13740,10 +13318,6 @@
where @var{r_0} is halve of the image diagonal and @var{r_src} and @var{r_tgt} are the
distances from the focal point in the source and target images, respectively.
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section lensfun
Apply lens correction via the lensfun library (@url{http://lensfun.sourceforge.net/}).
@@ -13977,10 +13551,6 @@
Specify which planes will be processed. Defaults to all available.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section loop
Loop video frames.
@@ -14058,10 +13628,6 @@
@end table
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@anchor{lut3d}
@section lut3d
@@ -14098,17 +13664,9 @@
Interpolate values using the 8 points defining a cube.
@item tetrahedral
Interpolate values using a tetrahedron.
-@item pyramid
-Interpolate values using a pyramid.
-@item prism
-Interpolate values using a prism.
@end table
@end table
-@subsection Commands
-
-This filter supports the @code{interp} option as @ref{commands}.
-
@section lumakey
Turn certain luma values into transparency.
@@ -14219,10 +13777,6 @@
All expressions default to "val".
-@subsection Commands
-
-This filter supports same @ref{commands} as options.
-
@subsection Examples
@itemize
@@ -14342,10 +13896,6 @@
All expressions default to "x".
-@subsection Commands
-
-This filter supports the all above options as @ref{commands} except option @code{d}.
-
@subsection Examples
@itemize
@@ -14389,10 +13939,6 @@
By default value 0xf, all planes will be processed.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section maskedmax
Merge the second and third input stream into output stream using absolute differences
@@ -14409,10 +13955,6 @@
By default value 0xf, all planes will be processed.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section maskedmerge
Merge the first input stream with the second input stream using per pixel
@@ -14432,10 +13974,6 @@
By default value 0xf, all planes will be processed.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section maskedmin
Merge the second and third input stream into output stream using absolute differences
@@ -14452,10 +13990,6 @@
By default value 0xf, all planes will be processed.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section maskedthreshold
Pick pixels comparing absolute difference of two video streams with fixed
threshold.
@@ -14477,10 +14011,6 @@
By default value 0xf, all planes will be processed.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section maskfun
Create mask from input video.
@@ -14508,10 +14038,6 @@
Typically useful for scene changes when used in combination with @code{tblend} filter.
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section mcdeint
Apply motion-compensation deinterlacing.
@@ -14829,42 +14355,6 @@
@end table
@end table
-@subsection Commands
-
-This filter supports the following commands:
-@table @option
-@item weights
-@item scale
-Syntax is same as option with same name.
-@end table
-
-@section monochrome
-Convert video to gray using custom color filter.
-
-A description of the accepted options follows.
-
-@table @option
-@item cb
-Set the chroma blue spot. Allowed range is from -1 to 1.
-Default value is 0.
-
-@item cr
-Set the chroma red spot. Allowed range is from -1 to 1.
-Default value is 0.
-
-@item size
-Set the color filter size. Allowed range is from .1 to 10.
-Default value is 1.
-
-@item high
-Set the highlights strength. Allowed range is from 0 to 1.
-Default value is 0.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section mpdecimate
Drop frames that do not differ greatly from the previous frame in
@@ -14903,27 +14393,6 @@
64*5, and default value for @option{frac} is 0.33.
@end table
-@section msad
-
-Obtain the MSAD (Mean Sum of Absolute Differences) between two input videos.
-
-This filter takes two input videos.
-
-Both input videos must have the same resolution and pixel format for
-this filter to work correctly. Also it assumes that both inputs
-have the same number of frames, which are compared one by one.
-
-The obtained per component, average, min and max MSAD is printed through
-the logging system.
-
-The filter stores the calculated MSAD of each frame in frame metadata.
-
-In the below example the input file @file{main.mpg} being processed is compared
-with the reference file @file{ref.mpg}.
-
-@example
-ffmpeg -i main.mpg -i ref.mpg -lavfi msad -f null -
-@end example
@section negate
@@ -14937,10 +14406,6 @@
With value 1, it negates the alpha component, if present. Default value is 0.
@end table
-@subsection Commands
-
-This filter supports same @ref{commands} as options.
-
@anchor{nlmeans}
@section nlmeans
@@ -15054,9 +14519,9 @@
Can be one of the following:
@table @samp
-@item a, abs
+@item a
weights trained to minimize absolute error
-@item s, mse
+@item s
weights trained to minimize squared error
@end table
@@ -15078,15 +14543,13 @@
@item none
@item original
@item new
-@item new2
-@item new3
@end table
Default is @code{new}.
-@end table
-@subsection Commands
-This filter supports same @ref{commands} as options, excluding @var{weights} option.
+@item fapprox
+Set various debugging flags.
+@end table
@section noformat
@@ -16195,10 +15658,6 @@
@end table
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section photosensitivity
Reduce various flashes in video, so to help users with epilepsy.
@@ -16261,10 +15720,6 @@
Set window Y position, relative offset on Y axis.
@end table
-@subsection Commands
-
-This filter supports same @ref{commands} as options.
-
@section pp
Enable the specified chain of postprocessing subfilters using libpostproc. This
@@ -16523,33 +15978,12 @@
@item c3
set pixel fourth component expression, corresponds to the alpha component
-@item index, i
+@item i
set component to use as base for altering colors
-
-@item preset, p
-Pick one of built-in LUTs. By default is set to none.
-
-Available LUTs:
-@table @samp
-@item magma
-@item inferno
-@item plasma
-@item viridis
-@item turbo
-@item cividis
-@item range1
-@item range2
-@item shadows
-@item highlights
@end table
-@item opacity
-Set opacity of output colors. Allowed range is from 0 to 1.
-Default value is set to 1.
-@end table
-
-Each of the expression options specifies the expression to use for computing
-the lookup table for the corresponding pixel component values.
+Each of them specifies the expression to use for computing the lookup table for
+the corresponding pixel component values.
The expressions can contain the following constants and functions:
@@ -16570,10 +16004,6 @@
All expressions default to "val".
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@subsection Examples
@itemize
@@ -18208,37 +17638,6 @@
@end table
@end table
-@section shear
-Apply shear transform to input video.
-
-This filter supports the following options:
-
-@table @option
-@item shx
-Shear factor in X-direction. Default value is 0.
-Allowed range is from -2 to 2.
-
-@item shy
-Shear factor in Y-direction. Default value is 0.
-Allowed range is from -2 to 2.
-
-@item fillcolor, c
-Set the color used to fill the output area not covered by the transformed
-video. For the general syntax of this option, check the
-@ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}.
-If the special value "none" is selected then no
-background is printed (useful for example if the background is never shown).
-
-Default value is "black".
-
-@item interp
-Set interpolation type. Can be @code{bilinear} or @code{nearest}. Default is @code{bilinear}.
-@end table
-
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section showinfo
Show a line containing various information for each input video frame.
@@ -18359,33 +17758,6 @@
@end example
@end itemize
-@section shufflepixels
-
-Reorder pixels in video frames.
-
-This filter accepts the following options:
-
-@table @option
-@item direction, d
-Set shuffle direction. Can be forward or inverse direction.
-Default direction is forward.
-
-@item mode, m
-Set shuffle mode. Can be horizontal, vertical or block mode.
-
-@item width, w
-@item height, h
-Set shuffle block_size. In case of horizontal shuffle mode only width
-part of size is used, and in case of vertical shuffle mode only height
-part of size is used.
-
-@item seed, s
-Set random seed used with shuffling pixels. Mainly useful to set to be able
-to reverse filtering process to get original input.
-For example, to reverse forward shuffle you need to use same parameters
-and exact same seed and to set direction to inverse.
-@end table
-
@section shuffleplanes
Reorder and/or duplicate video planes.
@@ -19330,10 +18702,6 @@
the position in the file of the input frame, NAN if unknown
@end table
-@subsection Commands
-
-This filter supports the all above options as @ref{commands}.
-
@section swapuv
Swap U & V plane.
@@ -19869,32 +19237,6 @@
minimum values, and @code{1} maximum values.
@end table
-@subsection Commands
-
-This filter supports all above options as @ref{commands}, excluding option @code{radius}.
-
-@section tmidequalizer
-
-Apply Temporal Midway Video Equalization effect.
-
-Midway Video Equalization adjusts a sequence of video frames to have the same
-histograms, while maintaining their dynamics as much as possible. It's
-useful for e.g. matching exposures from a video frames sequence.
-
-This filter accepts the following option:
-
-@table @option
-@item radius
-Set filtering radius. Default is @code{5}. Allowed range is from 1 to 127.
-
-@item sigma
-Set filtering sigma. Default is @code{0.5}. This controls strength of filtering.
-Setting this option to 0 effectively does nothing.
-
-@item planes
-Set which planes to process. Default is @code{15}, which is all available planes.
-@end table
-
@section tmix
Mix successive video frames.
@@ -19939,15 +19281,6 @@
@end example
@end itemize
-@subsection Commands
-
-This filter supports the following commands:
-@table @option
-@item weights
-@item scale
-Syntax is same as option with same name.
-@end table
-
@anchor{tonemap}
@section tonemap
Tone map colors from different dynamic ranges.
@@ -21309,27 +20642,6 @@
This filter supports the all above options as @ref{commands}.
-@section vif
-
-Obtain the average VIF (Visual Information Fidelity) between two input videos.
-
-This filter takes two input videos.
-
-Both input videos must have the same resolution and pixel format for
-this filter to work correctly. Also it assumes that both inputs
-have the same number of frames, which are compared one by one.
-
-The obtained average VIF score is printed through the logging system.
-
-The filter stores the calculated VIF score of each frame.
-
-In the below example the input file @file{main.mpg} being processed is compared
-with the reference file @file{ref.mpg}.
-
-@example
-ffmpeg -i main.mpg -i ref.mpg -lavfi vif -f null -
-@end example
-
@anchor{vignette}
@section vignette
@@ -21511,35 +20823,6 @@
@end table
Default value is @samp{complex}.
-@item mode
-The interlacing mode to adopt. It accepts one of the following values:
-
-@table @option
-@item frame
-Output one frame for each frame.
-@item field
-Output one frame for each field.
-@end table
-
-The default value is @code{field}.
-
-@item parity
-The picture field parity assumed for the input interlaced video. It accepts one
-of the following values:
-
-@table @option
-@item tff
-Assume the top field is first.
-@item bff
-Assume the bottom field is first.
-@item auto
-Enable automatic detection of field parity.
-@end table
-
-The default value is @code{auto}.
-If the interlacing is unknown or the decoder does not export this information,
-top field first will be assumed.
-
@item deint
Specify which frames to deinterlace. Accepts one of the following values:
@@ -21553,9 +20836,6 @@
Default value is @samp{all}.
@end table
-@subsection Commands
-This filter supports same @ref{commands} as options.
-
@section waveform
Video waveform monitor.
@@ -21901,10 +21181,6 @@
minimum values, and @code{1} maximum values.
@end table
-@subsection Commands
-
-This filter supports all above options as @ref{commands}, excluding option @code{inputs}.
-
@section xstack
Stack video inputs into custom layout.
@@ -22488,13 +21764,6 @@
@item npl
Set the nominal peak luminance.
-
-@item param_a
-Parameter A for scaling filters. Parameter "b" for bicubic, and the number of
-filter taps for lanczos.
-
-@item param_b
-Parameter B for scaling filters. Parameter "c" for bicubic.
@end table
The values of the @option{w} and @option{h} options are expressions
diff --git a/doc/general_contents.texi b/doc/general_contents.texi
index 58c9bcf..443e8ed 100644
--- a/doc/general_contents.texi
+++ b/doc/general_contents.texi
@@ -385,7 +385,6 @@
@tab Audio format used on the PS2.
@item APNG @tab X @tab X
@item ASF @tab X @tab X
- @tab Advanced / Active Streaming Format.
@item AST @tab X @tab X
@tab Audio format used on the Nintendo Wii.
@item AVI @tab X @tab X
@@ -401,20 +400,14 @@
@item Binary text @tab @tab X
@item Bink @tab @tab X
@tab Multimedia format used by many games.
-@item Bink Audio @tab @tab X
- @tab Audio only multimedia format used by some games.
@item Bitmap Brothers JV @tab @tab X
@tab Used in Z and Z95 games.
-@item BRP @tab @tab X
- @tab Argonaut Games format.
@item Brute Force & Ignorance @tab @tab X
@tab Used in the game Flash Traffic: City of Angels.
@item BFSTM @tab @tab X
@tab Audio format used on the Nintendo WiiU (based on BRSTM).
@item BRSTM @tab @tab X
@tab Audio format used on the Nintendo Wii.
-@item BW64 @tab @tab X
- @tab Broadcast Wave 64bit.
@item BWF @tab X @tab X
@item codec2 (raw) @tab X @tab X
@tab Must be given -mode format option to decode correctly.
@@ -637,7 +630,6 @@
@item RedSpark @tab @tab X
@item Renderware TeXture Dictionary @tab @tab X
@item Resolume DXV @tab @tab X
-@item RF64 @tab @tab X
@item RL2 @tab @tab X
@tab Audio and video format used in some games by Entertainment Software Partners.
@item RPL/ARMovie @tab @tab X
@@ -727,13 +719,10 @@
@tab Alias/Wavefront PIX image format
@item animated GIF @tab X @tab X
@item APNG @tab X @tab X
- @tab Animated Portable Network Graphics
@item BMP @tab X @tab X
@tab Microsoft BMP image
@item BRender PIX @tab @tab X
@tab Argonaut BRender 3D engine image format.
-@item CRI @tab @tab X
- @tab Cintel RAW
@item DPX @tab X @tab X
@tab Digital Picture Exchange
@item EXR @tab @tab X
@@ -752,12 +741,8 @@
@tab PAM is a PNM extension with alpha support.
@item PBM @tab X @tab X
@tab Portable BitMap image
-@item PCD @tab @tab X
- @tab PhotoCD
@item PCX @tab X @tab X
@tab PC Paintbrush
-@item PFM @tab X @tab X
- @tab Portable FloatMap image
@item PGM @tab X @tab X
@tab Portable GrayMap image
@item PGMYUV @tab X @tab X
@@ -767,7 +752,6 @@
@item PIC @tab @tab X
@tab Pictor/PC Paint
@item PNG @tab X @tab X
- @tab Portable Network Graphics image
@item PPM @tab X @tab X
@tab Portable PixelMap image
@item PSD @tab @tab X
@@ -821,8 +805,6 @@
@tab fourcc: apch,apcn,apcs,apco,ap4h,ap4x
@item Apple QuickDraw @tab @tab X
@tab fourcc: qdrw
-@item Argonaut Video @tab @tab X
- @tab Used in some Argonaut games.
@item Asus v1 @tab X @tab X
@tab fourcc: ASV1
@item Asus v2 @tab X @tab X
@@ -1352,7 +1334,6 @@
@item SubViewer v1 @tab @tab X @tab @tab X
@item SubViewer @tab @tab X @tab @tab X
@item TED Talks captions @tab @tab X @tab @tab X
-@item TTML @tab X @tab @tab X @tab
@item VobSub (IDX+SUB) @tab @tab X @tab @tab X
@item VPlayer @tab @tab X @tab @tab X
@item WebVTT @tab X @tab X @tab X @tab X
diff --git a/doc/muxers.texi b/doc/muxers.texi
index 74833d7..179b923 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -242,8 +242,6 @@
@item seg_duration @var{duration}
Set the segment length in seconds (fractional value can be set). The value is
treated as average segment duration when @var{use_template} is enabled and
-@var{use_timeline} is disabled and as minimum segment duration for all the other
-use cases.
@item frag_duration @var{duration}
Set the length in seconds of fragments within segments (fractional value can be set).
@item frag_type @var{type}
@@ -611,21 +609,14 @@
This muxer supports the following options:
@table @option
-@item hls_init_time @var{duration}
-Set the initial target segment length. Default value is @var{0}.
-
-@var{duration} must be a time duration specification,
-see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
-
+@item hls_init_time @var{seconds}
+Set the initial target segment length in seconds. Default value is @var{0}.
Segment will be cut on the next key frame after this time has passed on the first m3u8 list.
After the initial playlist is filled @command{ffmpeg} will cut segments
at duration equal to @code{hls_time}
-@item hls_time @var{duration}
-Set the target segment length. Default value is 2.
-
-@var{duration} must be a time duration specification,
-see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
+@item hls_time @var{seconds}
+Set the target segment length in seconds. Default value is 2.
Segment will be cut on the next key frame after this time has passed.
@item hls_list_size @var{size}
@@ -840,7 +831,7 @@
is saved as @var{playlist name}.key.
@item -hls_enc_key @var{key}
-16-octet key to encrypt the segments, by default it
+Hex-coded 16byte key to encrypt the segments, by default it
is randomly generated.
@item -hls_enc_key_url @var{keyurl}
@@ -848,7 +839,7 @@
in the playlist.
@item -hls_enc_iv @var{iv}
-16-octet initialization vector for every segment instead
+Hex-coded 16byte initialization vector for every segment instead
of the autogenerated ones.
@item hls_segment_type @var{flags}
diff --git a/doc/protocols.texi b/doc/protocols.texi
index c0b511b..b4efa14 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -63,17 +63,16 @@
the command:
@example
-ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@@]hostname[:port][/vhost]
+ffmpeg -re -i input -f mpegts amqp://[[user]:[password]@@]hostname[:port]
@end example
Where hostname and port (default is 5672) is the address of the broker. The
client may also set a user/password for authentication. The default for both
-fields is "guest". Name of virtual host on broker can be set with vhost. The
-default value is "/".
+fields is "guest".
Muliple subscribers may stream from the broker using the command:
@example
-ffplay amqp://[[user]:[password]@@]hostname[:port][/vhost]
+ffplay amqp://[[user]:[password]@@]hostname[:port]
@end example
In RabbitMQ all data published to the broker flows through a specific exchange,
@@ -175,16 +174,6 @@
Cache the input stream to temporary file. It brings seeking capability to live streams.
-The accepted options are:
-@table @option
-
-@item read_ahead_limit
-Amount in bytes that may be read ahead when seeking isn't supported. Range is -1 to INT_MAX.
--1 for unlimited. Default is 65536.
-
-@end table
-
-URL Syntax is
@example
cache:@var{URL}
@end example
@@ -410,13 +399,6 @@
@item reconnect_streamed
If set then even streamed/non seekable streams will be reconnected on errors.
-@item reconnect_on_network_error
-Reconnect automatically in case of TCP/TLS errors during connect.
-
-@item reconnect_on_http_error
-A comma separated list of HTTP status codes to reconnect on. The list can
-include specific status codes (e.g. '503') or the strings '4xx' / '5xx'.
-
@item reconnect_delay_max
Sets the maximum delay in seconds after which to give up reconnecting
@@ -1652,9 +1634,8 @@
The list of supported options follows.
@table @option
-@item listen=@var{2|1|0}
-Listen for an incoming connection. 0 disables listen, 1 enables listen in
-single client mode, 2 enables listen in multi-client mode. Default value is 0.
+@item listen=@var{1|0}
+Listen for an incoming connection. Default value is 0.
@item timeout=@var{microseconds}
Set raise error timeout, expressed in microseconds.
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index e070b6b..13e1355 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -107,7 +107,7 @@
%.c %.h %.pc %.ver %.version: TAG = GEN
# Dummy rule to stop make trying to rebuild removed or renamed headers
-%.h %_template.c:
+%.h:
@:
# Disable suffix rules. Most of the builtin rules are suffix rules,
diff --git a/ffmpeg_generated.gni b/ffmpeg_generated.gni
index 88f513b..ddb03ff 100644
--- a/ffmpeg_generated.gni
+++ b/ffmpeg_generated.gni
@@ -1,4 +1,4 @@
-# Copyright 2021 The Chromium Authors. All rights reserved.
+# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -42,6 +42,7 @@
"libavcodec/dirac.c",
"libavcodec/dv_profile.c",
"libavcodec/encode.c",
+ "libavcodec/fft_fixed.c",
"libavcodec/fft_fixed_32.c",
"libavcodec/fft_float.c",
"libavcodec/fft_init_table.c",
@@ -54,9 +55,11 @@
"libavcodec/libopus.c",
"libavcodec/libopusdec.c",
"libavcodec/mathtables.c",
+ "libavcodec/mdct_fixed.c",
"libavcodec/mdct_fixed_32.c",
"libavcodec/mdct_float.c",
"libavcodec/mediacodec.c",
+ "libavcodec/mjpegenc_huffman.c",
"libavcodec/mpeg12framerate.c",
"libavcodec/mpeg4audio.c",
"libavcodec/mpegaudio.c",
@@ -96,6 +99,7 @@
"libavformat/autorename_libavformat_utils.c",
"libavformat/avio.c",
"libavformat/aviobuf.c",
+ "libavformat/cutils.c",
"libavformat/dump.c",
"libavformat/flac_picture.c",
"libavformat/flacdec.c",
@@ -103,7 +107,6 @@
"libavformat/id3v1.c",
"libavformat/id3v2.c",
"libavformat/isom.c",
- "libavformat/isom_tags.c",
"libavformat/matroska.c",
"libavformat/matroskadec.c",
"libavformat/metadata.c",
@@ -213,7 +216,6 @@
ffmpeg_c_sources += [
"libavcodec/aac_ac3_parser.c",
"libavcodec/aac_parser.c",
- "libavcodec/aacps_common.c",
"libavcodec/aacps_float.c",
"libavcodec/aacpsdsp_float.c",
"libavcodec/aacsbr.c",
@@ -225,6 +227,7 @@
"libavcodec/cbrt_data.c",
"libavcodec/kbdwin.c",
"libavcodec/sinewin.c",
+ "libavcodec/sinewin_fixed.c",
"libavformat/aacdec.c",
"libavformat/apetag.c",
"libavformat/img2.c",
@@ -293,6 +296,7 @@
if ((is_android && current_cpu == "arm" && arm_use_neon) || (use_linux_config && current_cpu == "arm" && arm_use_neon) || (use_linux_config && current_cpu == "arm")) {
ffmpeg_c_sources += [
+ "libavcodec/arm/fft_fixed_init_arm.c",
"libavcodec/arm/fft_init_arm.c",
"libavcodec/arm/flacdsp_init_arm.c",
"libavcodec/arm/mpegaudiodsp_init_arm.c",
@@ -391,6 +395,7 @@
"libavcodec/error_resilience.c",
"libavcodec/exif.c",
"libavcodec/fdctdsp.c",
+ "libavcodec/flvdec.c",
"libavcodec/gsm_parser.c",
"libavcodec/gsmdec.c",
"libavcodec/gsmdec_data.c",
@@ -399,6 +404,7 @@
"libavcodec/h263data.c",
"libavcodec/h263dec.c",
"libavcodec/h263dsp.c",
+ "libavcodec/intelh263dec.c",
"libavcodec/ituh263dec.c",
"libavcodec/jfdctfst.c",
"libavcodec/jfdctint.c",
@@ -504,7 +510,9 @@
"libavutil/arm/float_dsp_init_neon.c",
]
ffmpeg_gas_sources += [
+ "libavcodec/arm/fft_fixed_neon.S",
"libavcodec/arm/fft_neon.S",
+ "libavcodec/arm/mdct_fixed_neon.S",
"libavcodec/arm/mdct_neon.S",
"libavcodec/arm/rdft_neon.S",
"libavcodec/arm/vorbisdsp_neon.S",
diff --git a/ffmpeg_options.gni b/ffmpeg_options.gni
index c9ebbca..026e955 100644
--- a/ffmpeg_options.gni
+++ b/ffmpeg_options.gni
@@ -40,8 +40,7 @@
# https://groups.google.com/a/chromium.org/forum/#!msg/chromium-packagers/R5rcZXWxBEQ/B6k0zzmJbvcJ
is_component_ffmpeg = is_component_build
- # Set to true to force the use of ffmpeg's stdatomic fallback code. This code
- # is unsafe and does not implement atomics properly. https://crbug.com/161723.
+ # Set to true to force the use of ffmpeg's stdatomic fallback code.
#
# Windows and GCC prior to 4.9 lack stdatomic.h.
#
@@ -49,7 +48,7 @@
# clang's -frewrite-includes flag which is broken with #include_next
# directives as used in chromium's clang stdatomic.h.
# Some background: https://bugs.llvm.org/show_bug.cgi?id=26828
- ffmpeg_use_unsafe_atomics = false
+ ffmpeg_use_atomics_fallback = !is_clang
}
assert(ffmpeg_branding == "Chromium" ||
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 8cfca22..4eb68d2 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -215,9 +215,11 @@
static const OptionDef *find_option(const OptionDef *po, const char *name)
{
+ const char *p = strchr(name, ':');
+ int len = p ? p - name : strlen(name);
+
while (po->name) {
- const char *end;
- if (av_strstart(name, po->name, &end) && (!*end || *end == ':'))
+ if (!strncmp(name, po->name, len) && strlen(po->name) == len)
break;
po++;
}
@@ -2101,7 +2103,7 @@
}
AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
- AVFormatContext *s, AVStream *st, const AVCodec *codec)
+ AVFormatContext *s, AVStream *st, AVCodec *codec)
{
AVDictionary *ret = NULL;
AVDictionaryEntry *t = NULL;
@@ -2130,7 +2132,6 @@
}
while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) {
- const AVClass *priv_class;
char *p = strchr(t->key, ':');
/* check stream specification in opt name */
@@ -2143,8 +2144,8 @@
if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) ||
!codec ||
- ((priv_class = codec->priv_class) &&
- av_opt_find(&priv_class, t->key, NULL, flags,
+ (codec->priv_class &&
+ av_opt_find(&codec->priv_class, t->key, NULL, flags,
AV_OPT_SEARCH_FAKE_OBJ)))
av_dict_set(&ret, t->key, t->value, 0);
else if (t->key[0] == prefix &&
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 5da9f4c..1917510 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -414,7 +414,7 @@
* @return a pointer to the created dictionary
*/
AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
- AVFormatContext *s, AVStream *st, const AVCodec *codec);
+ AVFormatContext *s, AVStream *st, AVCodec *codec);
/**
* Setup AVCodecContext options for avformat_find_stream_info().
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 2abbc0f..b446d9b 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -136,7 +136,6 @@
static unsigned dup_warning = 1000;
static int nb_frames_drop = 0;
static int64_t decode_error_stat[2];
-static unsigned nb_output_dumped = 0;
static int want_sdp = 1;
@@ -394,30 +393,8 @@
}
#endif
-#ifdef __linux__
-#define SIGNAL(sig, func) \
- do { \
- action.sa_handler = func; \
- sigaction(sig, &action, NULL); \
- } while (0)
-#else
-#define SIGNAL(sig, func) \
- signal(sig, func)
-#endif
-
void term_init(void)
{
-#if defined __linux__
- struct sigaction action = {0};
- action.sa_handler = sigterm_handler;
-
- /* block other interrupts while processing this one */
- sigfillset(&action.sa_mask);
-
- /* restart interruptible functions (i.e. don't fail with EINTR) */
- action.sa_flags = SA_RESTART;
-#endif
-
#if HAVE_TERMIOS_H
if (!run_as_daemon && stdin_interaction) {
struct termios tty;
@@ -436,14 +413,14 @@
tcsetattr (0, TCSANOW, &tty);
}
- SIGNAL(SIGQUIT, sigterm_handler); /* Quit (POSIX). */
+ signal(SIGQUIT, sigterm_handler); /* Quit (POSIX). */
}
#endif
- SIGNAL(SIGINT , sigterm_handler); /* Interrupt (ANSI). */
- SIGNAL(SIGTERM, sigterm_handler); /* Termination (ANSI). */
+ signal(SIGINT , sigterm_handler); /* Interrupt (ANSI). */
+ signal(SIGTERM, sigterm_handler); /* Termination (ANSI). */
#ifdef SIGXCPU
- SIGNAL(SIGXCPU, sigterm_handler);
+ signal(SIGXCPU, sigterm_handler);
#endif
#ifdef SIGPIPE
signal(SIGPIPE, SIG_IGN); /* Broken pipe (POSIX). */
@@ -688,7 +665,7 @@
}
}
-static void abort_codec_experimental(const AVCodec *c, int encoder)
+static void abort_codec_experimental(AVCodec *c, int encoder)
{
exit_program(1);
}
@@ -1708,7 +1685,6 @@
double speed;
int64_t pts = INT64_MIN + 1;
static int64_t last_time = -1;
- static int first_report = 1;
static int qp_histogram[52];
int hours, mins, secs, us;
const char *hours_sign;
@@ -1721,9 +1697,9 @@
if (!is_last_report) {
if (last_time == -1) {
last_time = cur_time;
+ return;
}
- if (((cur_time - last_time) < stats_period && !first_report) ||
- (first_report && nb_output_dumped < nb_output_files))
+ if ((cur_time - last_time) < 500000)
return;
last_time = cur_time;
}
@@ -1900,8 +1876,6 @@
}
}
- first_report = 0;
-
if (is_last_report)
print_final_stats(total_size);
}
@@ -2943,7 +2917,7 @@
InputStream *ist = input_streams[ist_index];
if (ist->decoding_needed) {
- const AVCodec *codec = ist->dec;
+ AVCodec *codec = ist->dec;
if (!codec) {
snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d",
avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index);
@@ -2957,6 +2931,7 @@
ist->dec_ctx->thread_safe_callbacks = 1;
#endif
+ av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0);
if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE &&
(ist->decoding_needed & DECODING_FOR_OST)) {
av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE);
@@ -3040,7 +3015,6 @@
of->header_written = 1;
av_dump_format(of->ctx, file_index, of->ctx->url, 1);
- nb_output_dumped++;
if (sdp_filename || want_sdp)
print_sdp();
@@ -3375,7 +3349,7 @@
ost->frame_rate = ist->framerate;
if (ist && !ost->frame_rate.num)
ost->frame_rate = ist->st->r_frame_rate;
- if (ist && !ost->frame_rate.num && !ost->max_frame_rate.num) {
+ if (ist && !ost->frame_rate.num) {
ost->frame_rate = (AVRational){25, 1};
av_log(NULL, AV_LOG_WARNING,
"No information "
@@ -3385,11 +3359,6 @@
ost->file_index, ost->index);
}
- if (ost->max_frame_rate.num &&
- (av_q2d(ost->frame_rate) > av_q2d(ost->max_frame_rate) ||
- !ost->frame_rate.den))
- ost->frame_rate = ost->max_frame_rate;
-
if (ost->enc->supported_framerates && !ost->force_fps) {
int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates);
ost->frame_rate = ost->enc->supported_framerates[idx];
@@ -3522,7 +3491,7 @@
int ret = 0;
if (ost->encoding_needed) {
- const AVCodec *codec = ost->enc;
+ AVCodec *codec = ost->enc;
AVCodecContext *dec = NULL;
InputStream *ist;
@@ -4036,7 +4005,11 @@
if(key == 'D') {
debug = input_streams[0]->dec_ctx->debug << 1;
if(!debug) debug = 1;
- while (debug & FF_DEBUG_DCT_COEFF) //unsupported, would just crash
+ while(debug & (FF_DEBUG_DCT_COEFF
+#if FF_API_DEBUG_MV
+ |FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE
+#endif
+ )) //unsupported, would just crash
debug += debug;
}else{
char buf[32];
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 8813eaf..3b54dab 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -108,8 +108,6 @@
int nb_audio_sample_rate;
SpecifierOpt *frame_rates;
int nb_frame_rates;
- SpecifierOpt *max_frame_rates;
- int nb_max_frame_rates;
SpecifierOpt *frame_sizes;
int nb_frame_sizes;
SpecifierOpt *frame_pix_fmts;
@@ -307,7 +305,7 @@
#define DECODING_FOR_FILTER 2
AVCodecContext *dec_ctx;
- const AVCodec *dec;
+ AVCodec *dec;
AVFrame *decoded_frame;
AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */
@@ -470,7 +468,7 @@
AVCodecContext *enc_ctx;
AVCodecParameters *ref_par; /* associated input codec parameters with encoders options applied */
- const AVCodec *enc;
+ AVCodec *enc;
int64_t max_frames;
AVFrame *filtered_frame;
AVFrame *last_frame;
@@ -481,7 +479,6 @@
/* video only */
AVRational frame_rate;
- AVRational max_frame_rate;
int is_cfr;
int force_fps;
int top_field_first;
@@ -617,7 +614,6 @@
extern int exit_on_error;
extern int abort_on_flags;
extern int print_stats;
-extern int64_t stats_period;
extern int qp_hist;
extern int stdin_interaction;
extern int frame_bits_per_raw_sample;
@@ -643,15 +639,24 @@
void term_init(void);
void term_exit(void);
+void reset_options(OptionsContext *o, int is_input);
void show_usage(void);
+void opt_output_file(void *optctx, const char *filename);
+
void remove_avoptions(AVDictionary **a, AVDictionary *b);
void assert_avoptions(AVDictionary *m);
int guess_input_channel_layout(InputStream *ist);
+enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx,
+ const AVCodec *codec, enum AVPixelFormat target);
+void choose_sample_fmt(AVStream *st, const AVCodec *codec);
+
int configure_filtergraph(FilterGraph *fg);
+int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out);
void check_filter_outputs(void);
+int ist_in_filtergraph(FilterGraph *fg, InputStream *ist);
int filtergraph_is_simple(FilterGraph *fg);
int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int init_complex_filtergraph(FilterGraph *fg);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 4ab769c..e9e31e0 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -60,7 +60,7 @@
}
}
-static enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx,
+enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx,
const AVCodec *codec, enum AVPixelFormat target)
{
if (codec && codec->pix_fmts) {
@@ -74,7 +74,7 @@
p = get_compliance_unofficial_pix_fmts(enc_ctx->codec_id, p);
}
for (; *p != AV_PIX_FMT_NONE; p++) {
- best = av_find_best_pix_fmt_of_2(best, *p, target, has_alpha, NULL);
+ best= avcodec_find_best_pix_fmt_of_2(best, *p, target, has_alpha, NULL);
if (*p == target)
break;
}
@@ -91,6 +91,29 @@
return target;
}
+void choose_sample_fmt(AVStream *st, const AVCodec *codec)
+{
+ if (codec && codec->sample_fmts) {
+ const enum AVSampleFormat *p = codec->sample_fmts;
+ for (; *p != -1; p++) {
+ if (*p == st->codecpar->format)
+ break;
+ }
+ if (*p == -1) {
+ const AVCodecDescriptor *desc = avcodec_descriptor_get(codec->id);
+ if(desc && (desc->props & AV_CODEC_PROP_LOSSLESS) && av_get_sample_fmt_name(st->codecpar->format) > av_get_sample_fmt_name(codec->sample_fmts[0]))
+ av_log(NULL, AV_LOG_ERROR, "Conversion will not be lossless.\n");
+ if(av_get_sample_fmt_name(st->codecpar->format))
+ av_log(NULL, AV_LOG_WARNING,
+ "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
+ av_get_sample_fmt_name(st->codecpar->format),
+ codec->name,
+ av_get_sample_fmt_name(codec->sample_fmts[0]));
+ st->codecpar->format = codec->sample_fmts[0];
+ }
+ }
+}
+
static char *choose_pix_fmts(OutputFilter *ofilter)
{
OutputStream *ost = ofilter->ost;
@@ -618,6 +641,13 @@
pad_idx = 0;
}
+ if (audio_volume != 256 && 0) {
+ char args[256];
+
+ snprintf(args, sizeof(args), "%f", audio_volume / 256.);
+ AUTO_INSERT_FILTER("-vol", "volume", args);
+ }
+
if (ost->apad && of->shortest) {
char args[256];
int i;
@@ -645,8 +675,7 @@
return 0;
}
-static int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter,
- AVFilterInOut *out)
+int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
{
if (!ofilter->ost) {
av_log(NULL, AV_LOG_FATAL, "Filter %s has an unconnected output\n", ofilter->name);
@@ -1177,6 +1206,15 @@
return 0;
}
+int ist_in_filtergraph(FilterGraph *fg, InputStream *ist)
+{
+ int i;
+ for (i = 0; i < fg->nb_inputs; i++)
+ if (fg->inputs[i]->ist == ist)
+ return 1;
+ return 0;
+}
+
int filtergraph_is_simple(FilterGraph *fg)
{
return !fg->graph_desc;
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 85feeb8..7ee034c 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -51,50 +51,49 @@
#define SPECIFIER_OPT_FMT_f "%f"
#define SPECIFIER_OPT_FMT_dbl "%lf"
-static const char *const opt_name_codec_names[] = {"c", "codec", "acodec", "vcodec", "scodec", "dcodec", NULL};
-static const char *const opt_name_audio_channels[] = {"ac", NULL};
-static const char *const opt_name_audio_sample_rate[] = {"ar", NULL};
-static const char *const opt_name_frame_rates[] = {"r", NULL};
-static const char *const opt_name_max_frame_rates[] = {"fpsmax", NULL};
-static const char *const opt_name_frame_sizes[] = {"s", NULL};
-static const char *const opt_name_frame_pix_fmts[] = {"pix_fmt", NULL};
-static const char *const opt_name_ts_scale[] = {"itsscale", NULL};
-static const char *const opt_name_hwaccels[] = {"hwaccel", NULL};
-static const char *const opt_name_hwaccel_devices[] = {"hwaccel_device", NULL};
-static const char *const opt_name_hwaccel_output_formats[] = {"hwaccel_output_format", NULL};
-static const char *const opt_name_autorotate[] = {"autorotate", NULL};
-static const char *const opt_name_autoscale[] = {"autoscale", NULL};
-static const char *const opt_name_max_frames[] = {"frames", "aframes", "vframes", "dframes", NULL};
-static const char *const opt_name_bitstream_filters[] = {"bsf", "absf", "vbsf", NULL};
-static const char *const opt_name_codec_tags[] = {"tag", "atag", "vtag", "stag", NULL};
-static const char *const opt_name_sample_fmts[] = {"sample_fmt", NULL};
-static const char *const opt_name_qscale[] = {"q", "qscale", NULL};
-static const char *const opt_name_forced_key_frames[] = {"forced_key_frames", NULL};
-static const char *const opt_name_force_fps[] = {"force_fps", NULL};
-static const char *const opt_name_frame_aspect_ratios[] = {"aspect", NULL};
-static const char *const opt_name_rc_overrides[] = {"rc_override", NULL};
-static const char *const opt_name_intra_matrices[] = {"intra_matrix", NULL};
-static const char *const opt_name_inter_matrices[] = {"inter_matrix", NULL};
-static const char *const opt_name_chroma_intra_matrices[] = {"chroma_intra_matrix", NULL};
-static const char *const opt_name_top_field_first[] = {"top", NULL};
-static const char *const opt_name_presets[] = {"pre", "apre", "vpre", "spre", NULL};
-static const char *const opt_name_copy_initial_nonkeyframes[] = {"copyinkfr", NULL};
-static const char *const opt_name_copy_prior_start[] = {"copypriorss", NULL};
-static const char *const opt_name_filters[] = {"filter", "af", "vf", NULL};
-static const char *const opt_name_filter_scripts[] = {"filter_script", NULL};
-static const char *const opt_name_reinit_filters[] = {"reinit_filter", NULL};
-static const char *const opt_name_fix_sub_duration[] = {"fix_sub_duration", NULL};
-static const char *const opt_name_canvas_sizes[] = {"canvas_size", NULL};
-static const char *const opt_name_pass[] = {"pass", NULL};
-static const char *const opt_name_passlogfiles[] = {"passlogfile", NULL};
-static const char *const opt_name_max_muxing_queue_size[] = {"max_muxing_queue_size", NULL};
-static const char *const opt_name_muxing_queue_data_threshold[] = {"muxing_queue_data_threshold", NULL};
-static const char *const opt_name_guess_layout_max[] = {"guess_layout_max", NULL};
-static const char *const opt_name_apad[] = {"apad", NULL};
-static const char *const opt_name_discard[] = {"discard", NULL};
-static const char *const opt_name_disposition[] = {"disposition", NULL};
-static const char *const opt_name_time_bases[] = {"time_base", NULL};
-static const char *const opt_name_enc_time_bases[] = {"enc_time_base", NULL};
+static const char *opt_name_codec_names[] = {"c", "codec", "acodec", "vcodec", "scodec", "dcodec", NULL};
+static const char *opt_name_audio_channels[] = {"ac", NULL};
+static const char *opt_name_audio_sample_rate[] = {"ar", NULL};
+static const char *opt_name_frame_rates[] = {"r", NULL};
+static const char *opt_name_frame_sizes[] = {"s", NULL};
+static const char *opt_name_frame_pix_fmts[] = {"pix_fmt", NULL};
+static const char *opt_name_ts_scale[] = {"itsscale", NULL};
+static const char *opt_name_hwaccels[] = {"hwaccel", NULL};
+static const char *opt_name_hwaccel_devices[] = {"hwaccel_device", NULL};
+static const char *opt_name_hwaccel_output_formats[] = {"hwaccel_output_format", NULL};
+static const char *opt_name_autorotate[] = {"autorotate", NULL};
+static const char *opt_name_autoscale[] = {"autoscale", NULL};
+static const char *opt_name_max_frames[] = {"frames", "aframes", "vframes", "dframes", NULL};
+static const char *opt_name_bitstream_filters[] = {"bsf", "absf", "vbsf", NULL};
+static const char *opt_name_codec_tags[] = {"tag", "atag", "vtag", "stag", NULL};
+static const char *opt_name_sample_fmts[] = {"sample_fmt", NULL};
+static const char *opt_name_qscale[] = {"q", "qscale", NULL};
+static const char *opt_name_forced_key_frames[] = {"forced_key_frames", NULL};
+static const char *opt_name_force_fps[] = {"force_fps", NULL};
+static const char *opt_name_frame_aspect_ratios[] = {"aspect", NULL};
+static const char *opt_name_rc_overrides[] = {"rc_override", NULL};
+static const char *opt_name_intra_matrices[] = {"intra_matrix", NULL};
+static const char *opt_name_inter_matrices[] = {"inter_matrix", NULL};
+static const char *opt_name_chroma_intra_matrices[] = {"chroma_intra_matrix", NULL};
+static const char *opt_name_top_field_first[] = {"top", NULL};
+static const char *opt_name_presets[] = {"pre", "apre", "vpre", "spre", NULL};
+static const char *opt_name_copy_initial_nonkeyframes[] = {"copyinkfr", NULL};
+static const char *opt_name_copy_prior_start[] = {"copypriorss", NULL};
+static const char *opt_name_filters[] = {"filter", "af", "vf", NULL};
+static const char *opt_name_filter_scripts[] = {"filter_script", NULL};
+static const char *opt_name_reinit_filters[] = {"reinit_filter", NULL};
+static const char *opt_name_fix_sub_duration[] = {"fix_sub_duration", NULL};
+static const char *opt_name_canvas_sizes[] = {"canvas_size", NULL};
+static const char *opt_name_pass[] = {"pass", NULL};
+static const char *opt_name_passlogfiles[] = {"passlogfile", NULL};
+static const char *opt_name_max_muxing_queue_size[] = {"max_muxing_queue_size", NULL};
+static const char *opt_name_muxing_queue_data_threshold[] = {"muxing_queue_data_threshold", NULL};
+static const char *opt_name_guess_layout_max[] = {"guess_layout_max", NULL};
+static const char *opt_name_apad[] = {"apad", NULL};
+static const char *opt_name_discard[] = {"discard", NULL};
+static const char *opt_name_disposition[] = {"disposition", NULL};
+static const char *opt_name_time_bases[] = {"time_base", NULL};
+static const char *opt_name_enc_time_bases[] = {"enc_time_base", NULL};
#define WARN_MULTIPLE_OPT_USAGE(name, type, so, st)\
{\
@@ -175,7 +174,6 @@
int filter_complex_nbthreads = 0;
int vstats_version = 2;
int auto_conversion_filters = 1;
-int64_t stats_period = 500000;
static int intra_only = 0;
@@ -284,21 +282,6 @@
return av_opt_eval_flags(&pclass, &opts[0], arg, &abort_on_flags);
}
-static int opt_stats_period(void *optctx, const char *opt, const char *arg)
-{
- int64_t user_stats_period = parse_time_or_die(opt, arg, 1);
-
- if (user_stats_period <= 0) {
- av_log(NULL, AV_LOG_ERROR, "stats_period %s must be positive.\n", arg);
- return AVERROR(EINVAL);
- }
-
- stats_period = user_stats_period;
- av_log(NULL, AV_LOG_INFO, "ffmpeg stats and -progress period set to %s.\n", arg);
-
- return 0;
-}
-
static int opt_sameq(void *optctx, const char *opt, const char *arg)
{
av_log(NULL, AV_LOG_ERROR, "Option '%s' was removed. "
@@ -766,13 +749,13 @@
return codec;
}
-static const AVCodec *choose_decoder(OptionsContext *o, AVFormatContext *s, AVStream *st)
+static AVCodec *choose_decoder(OptionsContext *o, AVFormatContext *s, AVStream *st)
{
char *codec_name = NULL;
MATCH_PER_STREAM_OPT(codec_names, str, codec_name, s, st);
if (codec_name) {
- const AVCodec *codec = find_codec_or_die(codec_name, st->codecpar->codec_type, 0);
+ AVCodec *codec = find_codec_or_die(codec_name, st->codecpar->codec_type, 0);
st->codecpar->codec_id = codec->id;
return codec;
} else
@@ -868,6 +851,15 @@
case AVMEDIA_TYPE_VIDEO:
if(!ist->dec)
ist->dec = avcodec_find_decoder(par->codec_id);
+#if FF_API_LOWRES
+ if (st->codec->lowres) {
+ ist->dec_ctx->lowres = st->codec->lowres;
+ ist->dec_ctx->width = st->codec->width;
+ ist->dec_ctx->height = st->codec->height;
+ ist->dec_ctx->coded_width = st->codec->coded_width;
+ ist->dec_ctx->coded_height = st->codec->coded_height;
+ }
+#endif
// avformat_find_stream_info() doesn't set this for us anymore.
ist->dec_ctx->framerate = st->avg_frame_rate;
@@ -1689,7 +1681,7 @@
AVStream *st;
OutputStream *ost;
AVCodecContext *video_enc;
- char *frame_rate = NULL, *max_frame_rate = NULL, *frame_aspect_ratio = NULL;
+ char *frame_rate = NULL, *frame_aspect_ratio = NULL;
ost = new_output_stream(o, oc, AVMEDIA_TYPE_VIDEO, source_index);
st = ost->st;
@@ -1700,21 +1692,8 @@
av_log(NULL, AV_LOG_FATAL, "Invalid framerate value: %s\n", frame_rate);
exit_program(1);
}
-
- MATCH_PER_STREAM_OPT(max_frame_rates, str, max_frame_rate, oc, st);
- if (max_frame_rate && av_parse_video_rate(&ost->max_frame_rate, max_frame_rate) < 0) {
- av_log(NULL, AV_LOG_FATAL, "Invalid maximum framerate value: %s\n", max_frame_rate);
- exit_program(1);
- }
-
- if (frame_rate && max_frame_rate) {
- av_log(NULL, AV_LOG_ERROR, "Only one of -fpsmax and -r can be set for a stream.\n");
- exit_program(1);
- }
-
- if ((frame_rate || max_frame_rate) &&
- video_sync_method == VSYNC_PASSTHROUGH)
- av_log(NULL, AV_LOG_ERROR, "Using -vsync 0 and -r/-fpsmax can produce invalid output files\n");
+ if (frame_rate && video_sync_method == VSYNC_PASSTHROUGH)
+ av_log(NULL, AV_LOG_ERROR, "Using -vsync 0 and -r can produce invalid output files\n");
MATCH_PER_STREAM_OPT(frame_aspect_ratios, str, frame_aspect_ratio, oc, st);
if (frame_aspect_ratio) {
@@ -2655,9 +2634,6 @@
if(o->recording_time != INT64_MAX)
av_dict_set(&oc->metadata, "duration", NULL, 0);
av_dict_set(&oc->metadata, "creation_time", NULL, 0);
- av_dict_set(&oc->metadata, "company_name", NULL, 0);
- av_dict_set(&oc->metadata, "product_name", NULL, 0);
- av_dict_set(&oc->metadata, "product_version", NULL, 0);
}
if (!o->metadata_streams_manual)
for (i = of->ost_index; i < nb_output_streams; i++) {
@@ -3581,8 +3557,6 @@
"enable automatic conversion filters globally" },
{ "stats", OPT_BOOL, { &print_stats },
"print progress report during encoding", },
- { "stats_period", HAS_ARG | OPT_EXPERT, { .func_arg = opt_stats_period },
- "set the period at which ffmpeg updates stats and -progress output", "time" },
{ "attach", HAS_ARG | OPT_PERFILE | OPT_EXPERT |
OPT_OUTPUT, { .func_arg = opt_attach },
"add an attachment to the output file", "filename" },
@@ -3594,7 +3568,7 @@
{ "debug_ts", OPT_BOOL | OPT_EXPERT, { &debug_ts },
"print timestamp debugging info" },
{ "max_error_rate", HAS_ARG | OPT_FLOAT, { &max_error_rate },
- "ratio of decoding errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.", "maximum error rate" },
+ "ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success.", "maximum error rate" },
{ "discard", OPT_STRING | HAS_ARG | OPT_SPEC |
OPT_INPUT, { .off = OFFSET(discard) },
"discard", "" },
@@ -3613,9 +3587,6 @@
{ "r", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_SPEC |
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(frame_rates) },
"set frame rate (Hz value, fraction or abbreviation)", "rate" },
- { "fpsmax", OPT_VIDEO | HAS_ARG | OPT_STRING | OPT_SPEC |
- OPT_OUTPUT, { .off = OFFSET(max_frame_rates) },
- "set max frame rate (Hz value, fraction or abbreviation)", "rate" },
{ "s", OPT_VIDEO | HAS_ARG | OPT_SUBTITLE | OPT_STRING | OPT_SPEC |
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(frame_sizes) },
"set frame size (WxH or abbreviation)", "size" },
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index e14c800..9ff0425 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -36,7 +36,6 @@
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/dict.h"
-#include "libavutil/fifo.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
@@ -112,12 +111,13 @@
static unsigned sws_flags = SWS_BICUBIC;
typedef struct MyAVPacketList {
- AVPacket *pkt;
+ AVPacket pkt;
+ struct MyAVPacketList *next;
int serial;
} MyAVPacketList;
typedef struct PacketQueue {
- AVFifoBuffer *pkt_list;
+ MyAVPacketList *first_pkt, *last_pkt;
int nb_packets;
int size;
int64_t duration;
@@ -187,7 +187,7 @@
};
typedef struct Decoder {
- AVPacket *pkt;
+ AVPacket pkt;
PacketQueue *queue;
AVCodecContext *avctx;
int pkt_serial;
@@ -361,6 +361,8 @@
static int is_full_screen;
static int64_t audio_callback_time;
+static AVPacket flush_pkt;
+
#define FF_QUIT_EVENT (SDL_USEREVENT + 2)
static SDL_Window *window;
@@ -425,23 +427,28 @@
static int packet_queue_put_private(PacketQueue *q, AVPacket *pkt)
{
- MyAVPacketList pkt1;
+ MyAVPacketList *pkt1;
if (q->abort_request)
return -1;
- if (av_fifo_space(q->pkt_list) < sizeof(pkt1)) {
- if (av_fifo_grow(q->pkt_list, sizeof(pkt1)) < 0)
- return -1;
- }
+ pkt1 = av_malloc(sizeof(MyAVPacketList));
+ if (!pkt1)
+ return -1;
+ pkt1->pkt = *pkt;
+ pkt1->next = NULL;
+ if (pkt == &flush_pkt)
+ q->serial++;
+ pkt1->serial = q->serial;
- pkt1.pkt = pkt;
- pkt1.serial = q->serial;
-
- av_fifo_generic_write(q->pkt_list, &pkt1, sizeof(pkt1), NULL);
+ if (!q->last_pkt)
+ q->first_pkt = pkt1;
+ else
+ q->last_pkt->next = pkt1;
+ q->last_pkt = pkt1;
q->nb_packets++;
- q->size += pkt1.pkt->size + sizeof(pkt1);
- q->duration += pkt1.pkt->duration;
+ q->size += pkt1->pkt.size + sizeof(*pkt1);
+ q->duration += pkt1->pkt.duration;
/* XXX: should duplicate packet data in DV case */
SDL_CondSignal(q->cond);
return 0;
@@ -449,28 +456,24 @@
static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
{
- AVPacket *pkt1;
int ret;
- pkt1 = av_packet_alloc();
- if (!pkt1) {
- av_packet_unref(pkt);
- return -1;
- }
- av_packet_move_ref(pkt1, pkt);
-
SDL_LockMutex(q->mutex);
- ret = packet_queue_put_private(q, pkt1);
+ ret = packet_queue_put_private(q, pkt);
SDL_UnlockMutex(q->mutex);
- if (ret < 0)
- av_packet_free(&pkt1);
+ if (pkt != &flush_pkt && ret < 0)
+ av_packet_unref(pkt);
return ret;
}
-static int packet_queue_put_nullpacket(PacketQueue *q, AVPacket *pkt, int stream_index)
+static int packet_queue_put_nullpacket(PacketQueue *q, int stream_index)
{
+ AVPacket pkt1, *pkt = &pkt1;
+ av_init_packet(pkt);
+ pkt->data = NULL;
+ pkt->size = 0;
pkt->stream_index = stream_index;
return packet_queue_put(q, pkt);
}
@@ -479,9 +482,6 @@
static int packet_queue_init(PacketQueue *q)
{
memset(q, 0, sizeof(PacketQueue));
- q->pkt_list = av_fifo_alloc(sizeof(MyAVPacketList));
- if (!q->pkt_list)
- return AVERROR(ENOMEM);
q->mutex = SDL_CreateMutex();
if (!q->mutex) {
av_log(NULL, AV_LOG_FATAL, "SDL_CreateMutex(): %s\n", SDL_GetError());
@@ -498,24 +498,25 @@
static void packet_queue_flush(PacketQueue *q)
{
- MyAVPacketList pkt1;
+ MyAVPacketList *pkt, *pkt1;
SDL_LockMutex(q->mutex);
- while (av_fifo_size(q->pkt_list) >= sizeof(pkt1)) {
- av_fifo_generic_read(q->pkt_list, &pkt1, sizeof(pkt1), NULL);
- av_packet_free(&pkt1.pkt);
+ for (pkt = q->first_pkt; pkt; pkt = pkt1) {
+ pkt1 = pkt->next;
+ av_packet_unref(&pkt->pkt);
+ av_freep(&pkt);
}
+ q->last_pkt = NULL;
+ q->first_pkt = NULL;
q->nb_packets = 0;
q->size = 0;
q->duration = 0;
- q->serial++;
SDL_UnlockMutex(q->mutex);
}
static void packet_queue_destroy(PacketQueue *q)
{
packet_queue_flush(q);
- av_fifo_freep(&q->pkt_list);
SDL_DestroyMutex(q->mutex);
SDL_DestroyCond(q->cond);
}
@@ -535,14 +536,14 @@
{
SDL_LockMutex(q->mutex);
q->abort_request = 0;
- q->serial++;
+ packet_queue_put_private(q, &flush_pkt);
SDL_UnlockMutex(q->mutex);
}
/* return < 0 if aborted, 0 if no packet and > 0 if packet. */
static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block, int *serial)
{
- MyAVPacketList pkt1;
+ MyAVPacketList *pkt1;
int ret;
SDL_LockMutex(q->mutex);
@@ -553,15 +554,18 @@
break;
}
- if (av_fifo_size(q->pkt_list) >= sizeof(pkt1)) {
- av_fifo_generic_read(q->pkt_list, &pkt1, sizeof(pkt1), NULL);
+ pkt1 = q->first_pkt;
+ if (pkt1) {
+ q->first_pkt = pkt1->next;
+ if (!q->first_pkt)
+ q->last_pkt = NULL;
q->nb_packets--;
- q->size -= pkt1.pkt->size + sizeof(pkt1);
- q->duration -= pkt1.pkt->duration;
- av_packet_move_ref(pkt, pkt1.pkt);
+ q->size -= pkt1->pkt.size + sizeof(*pkt1);
+ q->duration -= pkt1->pkt.duration;
+ *pkt = pkt1->pkt;
if (serial)
- *serial = pkt1.serial;
- av_packet_free(&pkt1.pkt);
+ *serial = pkt1->serial;
+ av_free(pkt1);
ret = 1;
break;
} else if (!block) {
@@ -575,23 +579,21 @@
return ret;
}
-static int decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue, SDL_cond *empty_queue_cond) {
+static void decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue, SDL_cond *empty_queue_cond) {
memset(d, 0, sizeof(Decoder));
- d->pkt = av_packet_alloc();
- if (!d->pkt)
- return AVERROR(ENOMEM);
d->avctx = avctx;
d->queue = queue;
d->empty_queue_cond = empty_queue_cond;
d->start_pts = AV_NOPTS_VALUE;
d->pkt_serial = -1;
- return 0;
}
static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
int ret = AVERROR(EAGAIN);
for (;;) {
+ AVPacket pkt;
+
if (d->queue->serial == d->pkt_serial) {
do {
if (d->queue->abort_request)
@@ -637,48 +639,49 @@
if (d->queue->nb_packets == 0)
SDL_CondSignal(d->empty_queue_cond);
if (d->packet_pending) {
+ av_packet_move_ref(&pkt, &d->pkt);
d->packet_pending = 0;
} else {
- int old_serial = d->pkt_serial;
- if (packet_queue_get(d->queue, d->pkt, 1, &d->pkt_serial) < 0)
+ if (packet_queue_get(d->queue, &pkt, 1, &d->pkt_serial) < 0)
return -1;
- if (old_serial != d->pkt_serial) {
- avcodec_flush_buffers(d->avctx);
- d->finished = 0;
- d->next_pts = d->start_pts;
- d->next_pts_tb = d->start_pts_tb;
- }
}
if (d->queue->serial == d->pkt_serial)
break;
- av_packet_unref(d->pkt);
+ av_packet_unref(&pkt);
} while (1);
- if (d->avctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
- int got_frame = 0;
- ret = avcodec_decode_subtitle2(d->avctx, sub, &got_frame, d->pkt);
- if (ret < 0) {
- ret = AVERROR(EAGAIN);
- } else {
- if (got_frame && !d->pkt->data) {
- d->packet_pending = 1;
- }
- ret = got_frame ? 0 : (d->pkt->data ? AVERROR(EAGAIN) : AVERROR_EOF);
- }
- av_packet_unref(d->pkt);
+ if (pkt.data == flush_pkt.data) {
+ avcodec_flush_buffers(d->avctx);
+ d->finished = 0;
+ d->next_pts = d->start_pts;
+ d->next_pts_tb = d->start_pts_tb;
} else {
- if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) {
- av_log(d->avctx, AV_LOG_ERROR, "Receive_frame and send_packet both returned EAGAIN, which is an API violation.\n");
- d->packet_pending = 1;
+ if (d->avctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
+ int got_frame = 0;
+ ret = avcodec_decode_subtitle2(d->avctx, sub, &got_frame, &pkt);
+ if (ret < 0) {
+ ret = AVERROR(EAGAIN);
+ } else {
+ if (got_frame && !pkt.data) {
+ d->packet_pending = 1;
+ av_packet_move_ref(&d->pkt, &pkt);
+ }
+ ret = got_frame ? 0 : (pkt.data ? AVERROR(EAGAIN) : AVERROR_EOF);
+ }
} else {
- av_packet_unref(d->pkt);
+ if (avcodec_send_packet(d->avctx, &pkt) == AVERROR(EAGAIN)) {
+ av_log(d->avctx, AV_LOG_ERROR, "Receive_frame and send_packet both returned EAGAIN, which is an API violation.\n");
+ d->packet_pending = 1;
+ av_packet_move_ref(&d->pkt, &pkt);
+ }
}
+ av_packet_unref(&pkt);
}
}
}
static void decoder_destroy(Decoder *d) {
- av_packet_free(&d->pkt);
+ av_packet_unref(&d->pkt);
avcodec_free_context(&d->avctx);
}
@@ -1148,8 +1151,6 @@
if (realloc_texture(&s->vis_texture, SDL_PIXELFORMAT_ARGB8888, s->width, s->height, SDL_BLENDMODE_NONE, 1) < 0)
return;
- if (s->xpos >= s->width)
- s->xpos = 0;
nb_display_channels= FFMIN(nb_display_channels, 2);
if (rdft_bits != s->rdft_bits) {
av_rdft_end(s->rdft);
@@ -1199,6 +1200,8 @@
}
if (!s->paused)
s->xpos++;
+ if (s->xpos >= s->width)
+ s->xpos= s->xleft;
}
}
@@ -1644,37 +1647,37 @@
}
if (is->subtitle_st) {
- while (frame_queue_nb_remaining(&is->subpq) > 0) {
- sp = frame_queue_peek(&is->subpq);
+ while (frame_queue_nb_remaining(&is->subpq) > 0) {
+ sp = frame_queue_peek(&is->subpq);
- if (frame_queue_nb_remaining(&is->subpq) > 1)
- sp2 = frame_queue_peek_next(&is->subpq);
- else
- sp2 = NULL;
+ if (frame_queue_nb_remaining(&is->subpq) > 1)
+ sp2 = frame_queue_peek_next(&is->subpq);
+ else
+ sp2 = NULL;
- if (sp->serial != is->subtitleq.serial
- || (is->vidclk.pts > (sp->pts + ((float) sp->sub.end_display_time / 1000)))
- || (sp2 && is->vidclk.pts > (sp2->pts + ((float) sp2->sub.start_display_time / 1000))))
- {
- if (sp->uploaded) {
- int i;
- for (i = 0; i < sp->sub.num_rects; i++) {
- AVSubtitleRect *sub_rect = sp->sub.rects[i];
- uint8_t *pixels;
- int pitch, j;
+ if (sp->serial != is->subtitleq.serial
+ || (is->vidclk.pts > (sp->pts + ((float) sp->sub.end_display_time / 1000)))
+ || (sp2 && is->vidclk.pts > (sp2->pts + ((float) sp2->sub.start_display_time / 1000))))
+ {
+ if (sp->uploaded) {
+ int i;
+ for (i = 0; i < sp->sub.num_rects; i++) {
+ AVSubtitleRect *sub_rect = sp->sub.rects[i];
+ uint8_t *pixels;
+ int pitch, j;
- if (!SDL_LockTexture(is->sub_texture, (SDL_Rect *)sub_rect, (void **)&pixels, &pitch)) {
- for (j = 0; j < sub_rect->h; j++, pixels += pitch)
- memset(pixels, 0, sub_rect->w << 2);
- SDL_UnlockTexture(is->sub_texture);
+ if (!SDL_LockTexture(is->sub_texture, (SDL_Rect *)sub_rect, (void **)&pixels, &pitch)) {
+ for (j = 0; j < sub_rect->h; j++, pixels += pitch)
+ memset(pixels, 0, sub_rect->w << 2);
+ SDL_UnlockTexture(is->sub_texture);
+ }
}
}
+ frame_queue_next(&is->subpq);
+ } else {
+ break;
}
- frame_queue_next(&is->subpq);
- } else {
- break;
}
- }
}
frame_queue_next(&is->pictq);
@@ -2573,7 +2576,7 @@
{
AVFormatContext *ic = is->ic;
AVCodecContext *avctx;
- const AVCodec *codec;
+ AVCodec *codec;
const char *forced_codec_name = NULL;
AVDictionary *opts = NULL;
AVDictionaryEntry *t = NULL;
@@ -2628,6 +2631,8 @@
av_dict_set(&opts, "threads", "auto", 0);
if (stream_lowres)
av_dict_set_int(&opts, "lowres", stream_lowres, 0);
+ if (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO)
+ av_dict_set(&opts, "refcounted_frames", "1", 0);
if ((ret = avcodec_open2(avctx, codec, &opts)) < 0) {
goto fail;
}
@@ -2680,8 +2685,7 @@
is->audio_stream = stream_index;
is->audio_st = ic->streams[stream_index];
- if ((ret = decoder_init(&is->auddec, avctx, &is->audioq, is->continue_read_thread)) < 0)
- goto fail;
+ decoder_init(&is->auddec, avctx, &is->audioq, is->continue_read_thread);
if ((is->ic->iformat->flags & (AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK)) && !is->ic->iformat->read_seek) {
is->auddec.start_pts = is->audio_st->start_time;
is->auddec.start_pts_tb = is->audio_st->time_base;
@@ -2694,8 +2698,7 @@
is->video_stream = stream_index;
is->video_st = ic->streams[stream_index];
- if ((ret = decoder_init(&is->viddec, avctx, &is->videoq, is->continue_read_thread)) < 0)
- goto fail;
+ decoder_init(&is->viddec, avctx, &is->videoq, is->continue_read_thread);
if ((ret = decoder_start(&is->viddec, video_thread, "video_decoder", is)) < 0)
goto out;
is->queue_attachments_req = 1;
@@ -2704,8 +2707,7 @@
is->subtitle_stream = stream_index;
is->subtitle_st = ic->streams[stream_index];
- if ((ret = decoder_init(&is->subdec, avctx, &is->subtitleq, is->continue_read_thread)) < 0)
- goto fail;
+ decoder_init(&is->subdec, avctx, &is->subtitleq, is->continue_read_thread);
if ((ret = decoder_start(&is->subdec, subtitle_thread, "subtitle_decoder", is)) < 0)
goto out;
break;
@@ -2758,7 +2760,7 @@
AVFormatContext *ic = NULL;
int err, i, ret;
int st_index[AVMEDIA_TYPE_NB];
- AVPacket *pkt = NULL;
+ AVPacket pkt1, *pkt = &pkt1;
int64_t stream_start_time;
int pkt_in_play_range = 0;
AVDictionaryEntry *t;
@@ -2775,12 +2777,6 @@
memset(st_index, -1, sizeof(st_index));
is->eof = 0;
- pkt = av_packet_alloc();
- if (!pkt) {
- av_log(NULL, AV_LOG_FATAL, "Could not allocate packet.\n");
- ret = AVERROR(ENOMEM);
- goto fail;
- }
ic = avformat_alloc_context();
if (!ic) {
av_log(NULL, AV_LOG_FATAL, "Could not allocate context.\n");
@@ -2964,12 +2960,18 @@
av_log(NULL, AV_LOG_ERROR,
"%s: error while seeking\n", is->ic->url);
} else {
- if (is->audio_stream >= 0)
+ if (is->audio_stream >= 0) {
packet_queue_flush(&is->audioq);
- if (is->subtitle_stream >= 0)
+ packet_queue_put(&is->audioq, &flush_pkt);
+ }
+ if (is->subtitle_stream >= 0) {
packet_queue_flush(&is->subtitleq);
- if (is->video_stream >= 0)
+ packet_queue_put(&is->subtitleq, &flush_pkt);
+ }
+ if (is->video_stream >= 0) {
packet_queue_flush(&is->videoq);
+ packet_queue_put(&is->videoq, &flush_pkt);
+ }
if (is->seek_flags & AVSEEK_FLAG_BYTE) {
set_clock(&is->extclk, NAN, 0);
} else {
@@ -2984,10 +2986,11 @@
}
if (is->queue_attachments_req) {
if (is->video_st && is->video_st->disposition & AV_DISPOSITION_ATTACHED_PIC) {
- if ((ret = av_packet_ref(pkt, &is->video_st->attached_pic)) < 0)
+ AVPacket copy;
+ if ((ret = av_packet_ref(©, &is->video_st->attached_pic)) < 0)
goto fail;
- packet_queue_put(&is->videoq, pkt);
- packet_queue_put_nullpacket(&is->videoq, pkt, is->video_stream);
+ packet_queue_put(&is->videoq, ©);
+ packet_queue_put_nullpacket(&is->videoq, is->video_stream);
}
is->queue_attachments_req = 0;
}
@@ -3018,11 +3021,11 @@
if (ret < 0) {
if ((ret == AVERROR_EOF || avio_feof(ic->pb)) && !is->eof) {
if (is->video_stream >= 0)
- packet_queue_put_nullpacket(&is->videoq, pkt, is->video_stream);
+ packet_queue_put_nullpacket(&is->videoq, is->video_stream);
if (is->audio_stream >= 0)
- packet_queue_put_nullpacket(&is->audioq, pkt, is->audio_stream);
+ packet_queue_put_nullpacket(&is->audioq, is->audio_stream);
if (is->subtitle_stream >= 0)
- packet_queue_put_nullpacket(&is->subtitleq, pkt, is->subtitle_stream);
+ packet_queue_put_nullpacket(&is->subtitleq, is->subtitle_stream);
is->eof = 1;
}
if (ic->pb && ic->pb->error) {
@@ -3063,7 +3066,6 @@
if (ic && !is->ic)
avformat_close_input(&ic);
- av_packet_free(&pkt);
if (ret != 0) {
SDL_Event event;
@@ -3736,6 +3738,9 @@
SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
+ av_init_packet(&flush_pkt);
+ flush_pkt.data = (uint8_t *)&flush_pkt;
+
if (!display_disable) {
int flags = SDL_WINDOW_HIDDEN;
if (alwaysontop)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index 1eb9d88..3453aa0 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -1672,6 +1672,24 @@
return 0;
}
+static const char *xml_escape_str(AVBPrint *dst, const char *src, void *log_ctx)
+{
+ const char *p;
+
+ for (p = src; *p; p++) {
+ switch (*p) {
+ case '&' : av_bprintf(dst, "%s", "&"); break;
+ case '<' : av_bprintf(dst, "%s", "<"); break;
+ case '>' : av_bprintf(dst, "%s", ">"); break;
+ case '"' : av_bprintf(dst, "%s", """); break;
+ case '\'': av_bprintf(dst, "%s", "'"); break;
+ default: av_bprint_chars(dst, *p, 1);
+ }
+ }
+
+ return dst->str;
+}
+
#define XML_INDENT() printf("%*c", xml->indent_level * 4, ' ')
static void xml_print_section_header(WriterContext *wctx)
@@ -1743,22 +1761,14 @@
if (section->flags & SECTION_FLAG_HAS_VARIABLE_FIELDS) {
XML_INDENT();
- av_bprint_escape(&buf, key, NULL,
- AV_ESCAPE_MODE_XML, AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES);
printf("<%s key=\"%s\"",
- section->element_name, buf.str);
+ section->element_name, xml_escape_str(&buf, key, wctx));
av_bprint_clear(&buf);
-
- av_bprint_escape(&buf, value, NULL,
- AV_ESCAPE_MODE_XML, AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES);
- printf(" value=\"%s\"/>\n", buf.str);
+ printf(" value=\"%s\"/>\n", xml_escape_str(&buf, value, wctx));
} else {
if (wctx->nb_item[wctx->level])
printf(" ");
-
- av_bprint_escape(&buf, value, NULL,
- AV_ESCAPE_MODE_XML, AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES);
- printf("%s=\"%s\"", key, buf.str);
+ printf("%s=\"%s\"", key, xml_escape_str(&buf, value, wctx));
}
av_bprint_finalize(&buf, NULL);
@@ -2158,6 +2168,8 @@
print_time("dts_time", pkt->dts, &st->time_base);
print_duration_ts("duration", pkt->duration);
print_duration_time("duration_time", pkt->duration, &st->time_base);
+ print_duration_ts("convergence_duration", pkt->convergence_duration);
+ print_duration_time("convergence_duration_time", pkt->convergence_duration, &st->time_base);
print_val("size", pkt->size, unit_byte_str);
if (pkt->pos != -1) print_fmt ("pos", "%"PRId64, pkt->pos);
else print_str_opt("pos", "N/A");
@@ -2621,6 +2633,10 @@
s = av_get_media_type_string(par->codec_type);
if (s) print_str ("codec_type", s);
else print_str_opt("codec_type", "unknown");
+#if FF_API_LAVF_AVCTX
+ if (dec_ctx)
+ print_q("codec_time_base", dec_ctx->time_base, '/');
+#endif
/* print AVI/FourCC tag */
print_str("codec_tag_string", av_fourcc2str(par->codec_tag));
@@ -2630,11 +2646,13 @@
case AVMEDIA_TYPE_VIDEO:
print_int("width", par->width);
print_int("height", par->height);
+#if FF_API_LAVF_AVCTX
if (dec_ctx) {
print_int("coded_width", dec_ctx->coded_width);
print_int("coded_height", dec_ctx->coded_height);
print_int("closed_captions", !!(dec_ctx->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS));
}
+#endif
print_int("has_b_frames", par->video_delay);
sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
if (sar.num) {
@@ -2672,6 +2690,15 @@
else
print_str_opt("field_order", "unknown");
+#if FF_API_PRIVATE_OPT
+ if (dec_ctx && dec_ctx->timecode_frame_start >= 0) {
+ char tcbuf[AV_TIMECODE_STR_SIZE];
+ av_timecode_make_mpeg_tc_string(tcbuf, dec_ctx->timecode_frame_start);
+ print_str("timecode", tcbuf);
+ } else {
+ print_str_opt("timecode", "N/A");
+ }
+#endif
if (dec_ctx)
print_int("refs", dec_ctx->refs);
break;
@@ -2729,10 +2756,10 @@
print_time("duration", stream->duration, &stream->time_base);
if (par->bit_rate > 0) print_val ("bit_rate", par->bit_rate, unit_bit_per_second_str);
else print_str_opt("bit_rate", "N/A");
- if (dec_ctx && dec_ctx->rc_max_rate > 0)
- print_val ("max_bit_rate", dec_ctx->rc_max_rate, unit_bit_per_second_str);
- else
- print_str_opt("max_bit_rate", "N/A");
+#if FF_API_LAVF_AVCTX
+ if (stream->codec->rc_max_rate > 0) print_val ("max_bit_rate", stream->codec->rc_max_rate, unit_bit_per_second_str);
+ else print_str_opt("max_bit_rate", "N/A");
+#endif
if (dec_ctx && dec_ctx->bits_per_raw_sample > 0) print_fmt("bits_per_raw_sample", "%d", dec_ctx->bits_per_raw_sample);
else print_str_opt("bits_per_raw_sample", "N/A");
if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
@@ -2986,7 +3013,7 @@
for (i = 0; i < fmt_ctx->nb_streams; i++) {
InputStream *ist = &ifile->streams[i];
AVStream *stream = fmt_ctx->streams[i];
- const AVCodec *codec;
+ AVCodec *codec;
ist->st = stream;
@@ -3024,6 +3051,12 @@
}
ist->dec_ctx->pkt_timebase = stream->time_base;
+ ist->dec_ctx->framerate = stream->avg_frame_rate;
+#if FF_API_LAVF_AVCTX
+ ist->dec_ctx->properties = stream->codec->properties;
+ ist->dec_ctx->coded_width = stream->codec->coded_width;
+ ist->dec_ctx->coded_height = stream->codec->coded_height;
+#endif
if (avcodec_open2(ist->dec_ctx, codec, &opts) < 0) {
av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
@@ -3224,6 +3257,9 @@
PRINT_PIX_FMT_FLAG(HWACCEL, "hwaccel");
PRINT_PIX_FMT_FLAG(PLANAR, "planar");
PRINT_PIX_FMT_FLAG(RGB, "rgb");
+#if FF_API_PSEUDOPAL
+ PRINT_PIX_FMT_FLAG(PSEUDOPAL, "pseudopal");
+#endif
PRINT_PIX_FMT_FLAG(ALPHA, "alpha");
writer_print_section_footer(w);
}
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 4d58b09..336c651 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -30,7 +30,6 @@
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "blockdsp.h"
#include "bswapdsp.h"
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 53e939d..aa2318f 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -122,7 +122,7 @@
}
if (avctx->bits_per_coded_sample <= 8) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt,
AV_PKT_DATA_PALETTE,
&size);
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 81cc164..4507818 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -48,6 +48,7 @@
mediacodec.o \
mpeg12framerate.o \
options.o \
+ mjpegenc_huffman.o \
parser.o \
parsers.o \
profiles.o \
@@ -68,10 +69,10 @@
OBJS-$(CONFIG_BLOCKDSP) += blockdsp.o
OBJS-$(CONFIG_BSWAPDSP) += bswapdsp.o
OBJS-$(CONFIG_CABAC) += cabac.o
-OBJS-$(CONFIG_CBS) += cbs.o cbs_bsf.o
+OBJS-$(CONFIG_CBS) += cbs.o
OBJS-$(CONFIG_CBS_AV1) += cbs_av1.o
-OBJS-$(CONFIG_CBS_H264) += cbs_h2645.o cbs_sei.o h2645_parse.o
-OBJS-$(CONFIG_CBS_H265) += cbs_h2645.o cbs_sei.o h2645_parse.o
+OBJS-$(CONFIG_CBS_H264) += cbs_h2645.o h2645_parse.o
+OBJS-$(CONFIG_CBS_H265) += cbs_h2645.o h2645_parse.o
OBJS-$(CONFIG_CBS_JPEG) += cbs_jpeg.o
OBJS-$(CONFIG_CBS_MPEG2) += cbs_mpeg2.o
OBJS-$(CONFIG_CBS_VP9) += cbs_vp9.o
@@ -82,9 +83,10 @@
OBJS-$(CONFIG_FAANDCT) += faandct.o
OBJS-$(CONFIG_FAANIDCT) += faanidct.o
OBJS-$(CONFIG_FDCTDSP) += fdctdsp.o jfdctfst.o jfdctint.o
-FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o
-OBJS-$(CONFIG_FFT) += avfft.o fft_float.o fft_fixed_32.o \
- fft_init_table.o $(FFT-OBJS-yes)
+FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o
+OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
+ fft_fixed_32.o fft_init_table.o \
+ $(FFT-OBJS-yes)
OBJS-$(CONFIG_FLACDSP) += flacdsp.o
OBJS-$(CONFIG_FMTCONVERT) += fmtconvert.o
OBJS-$(CONFIG_GOLOMB) += golomb.o
@@ -113,7 +115,7 @@
OBJS-$(CONFIG_LPC) += lpc.o
OBJS-$(CONFIG_LSP) += lsp.o
OBJS-$(CONFIG_LZF) += lzf.o
-OBJS-$(CONFIG_MDCT) += mdct_float.o mdct_fixed_32.o
+OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o mdct_fixed_32.o
OBJS-$(CONFIG_ME_CMP) += me_cmp.o
OBJS-$(CONFIG_MEDIACODEC) += mediacodecdec_common.o mediacodec_surface.o mediacodec_wrapper.o mediacodec_sw_buffer.o
OBJS-$(CONFIG_MPEG_ER) += mpeg_er.o
@@ -140,7 +142,7 @@
OBJS-$(CONFIG_RDFT) += rdft.o
OBJS-$(CONFIG_RV34DSP) += rv34dsp.o
OBJS-$(CONFIG_SHARED) += log2_tab.o reverse.o
-OBJS-$(CONFIG_SINEWIN) += sinewin.o
+OBJS-$(CONFIG_SINEWIN) += sinewin.o sinewin_fixed.o
OBJS-$(CONFIG_SNAPPY) += snappy.o
OBJS-$(CONFIG_STARTCODE) += startcode.o
OBJS-$(CONFIG_TEXTUREDSP) += texturedsp.o
@@ -160,10 +162,10 @@
OBJS-$(CONFIG_ZERO12V_DECODER) += 012v.o
OBJS-$(CONFIG_A64MULTI_ENCODER) += a64multienc.o elbg.o
OBJS-$(CONFIG_A64MULTI5_ENCODER) += a64multienc.o elbg.o
-OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps_common.o aacps_float.o \
+OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps_float.o \
mpeg4audio.o kbdwin.o \
sbrdsp.o aacpsdsp_float.o cbrt_data.o
-OBJS-$(CONFIG_AAC_FIXED_DECODER) += aacdec_fixed.o aactab.o aacsbr_fixed.o aacps_common.o aacps_fixed.o \
+OBJS-$(CONFIG_AAC_FIXED_DECODER) += aacdec_fixed.o aactab.o aacsbr_fixed.o aacps_fixed.o \
mpeg4audio.o kbdwin.o \
sbrdsp_fixed.o aacpsdsp_fixed.o cbrt_data_fixed.o
OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o aacenctab.o \
@@ -172,14 +174,14 @@
aacenc_tns.o \
aacenc_ltp.o \
aacenc_pred.o \
- psymodel.o mpeg4audio.o kbdwin.o
+ psymodel.o mpeg4audio.o kbdwin.o cbrt_data.o
OBJS-$(CONFIG_AAC_MF_ENCODER) += mfenc.o mf_utils.o
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
OBJS-$(CONFIG_AC3_DECODER) += ac3dec_float.o ac3dec_data.o ac3.o kbdwin.o ac3tab.o
OBJS-$(CONFIG_AC3_FIXED_DECODER) += ac3dec_fixed.o ac3dec_data.o ac3.o kbdwin.o ac3tab.o
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_float.o ac3enc.o ac3tab.o \
ac3.o kbdwin.o
-OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3enc.o ac3tab.o ac3.o kbdwin.o
+OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3enc.o ac3tab.o ac3.o
OBJS-$(CONFIG_AC3_MF_ENCODER) += mfenc.o mf_utils.o
OBJS-$(CONFIG_ACELP_KELVIN_DECODER) += g729dec.o lsp.o celp_math.o celp_filters.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o
OBJS-$(CONFIG_AGM_DECODER) += agm.o
@@ -230,7 +232,7 @@
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
OBJS-$(CONFIG_AV1_DECODER) += av1dec.o
OBJS-$(CONFIG_AV1_CUVID_DECODER) += cuviddec.o
-OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o
+OBJS-$(CONFIG_AVRN_DECODER) += avrndec.o mjpegdec.o
OBJS-$(CONFIG_AVRP_DECODER) += r210dec.o
OBJS-$(CONFIG_AVRP_ENCODER) += r210enc.o
OBJS-$(CONFIG_AVS_DECODER) += avs.o
@@ -258,7 +260,7 @@
OBJS-$(CONFIG_CDTOONS_DECODER) += cdtoons.o
OBJS-$(CONFIG_CDXL_DECODER) += cdxl.o
OBJS-$(CONFIG_CFHD_DECODER) += cfhd.o cfhddata.o cfhddsp.o
-OBJS-$(CONFIG_CFHD_ENCODER) += cfhdenc.o cfhddata.o cfhdencdsp.o
+OBJS-$(CONFIG_CFHD_ENCODER) += cfhdenc.o cfhddata.o
OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
OBJS-$(CONFIG_CINEPAK_ENCODER) += cinepakenc.o elbg.o
OBJS-$(CONFIG_CLEARVIDEO_DECODER) += clearvideo.o
@@ -275,7 +277,7 @@
OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadata.o dcahuff.o \
dca_core.o dca_exss.o dca_xll.o dca_lbr.o \
dcadsp.o dcadct.o synth_filter.o
-OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o dcadata.o dcahuff.o \
+OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o dca.o dcadata.o dcahuff.o \
dcaadpcm.o
OBJS-$(CONFIG_DDS_DECODER) += dds.o
OBJS-$(CONFIG_DERF_DPCM_DECODER) += dpcm.o
@@ -284,7 +286,7 @@
OBJS-$(CONFIG_DFA_DECODER) += dfa.o
OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o
-OBJS-$(CONFIG_DOLBY_E_DECODER) += dolby_e.o dolby_e_parse.o kbdwin.o
+OBJS-$(CONFIG_DOLBY_E_DECODER) += dolby_e.o kbdwin.o
OBJS-$(CONFIG_DPX_DECODER) += dpx.o
OBJS-$(CONFIG_DPX_ENCODER) += dpxenc.o
OBJS-$(CONFIG_DSD_LSBF_DECODER) += dsddec.o dsd.o
@@ -320,7 +322,6 @@
OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o
OBJS-$(CONFIG_EVRC_DECODER) += evrcdec.o acelp_vectors.o lsp.o
OBJS-$(CONFIG_EXR_DECODER) += exr.o exrdsp.o
-OBJS-$(CONFIG_EXR_ENCODER) += exrenc.o
OBJS-$(CONFIG_FASTAUDIO_DECODER) += fastaudio.o
OBJS-$(CONFIG_FFV1_DECODER) += ffv1dec.o ffv1.o
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1enc.o ffv1.o
@@ -329,19 +330,17 @@
OBJS-$(CONFIG_FITS_DECODER) += fitsdec.o fits.o
OBJS-$(CONFIG_FITS_ENCODER) += fitsenc.o
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o
-OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o
+OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
OBJS-$(CONFIG_FLASHSV2_DECODER) += flashsv.o
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
-OBJS-$(CONFIG_FLV_DECODER) += flvdec.o
-OBJS-$(CONFIG_FLV_ENCODER) += flvenc.o
OBJS-$(CONFIG_FMVC_DECODER) += fmvc.o
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
-OBJS-$(CONFIG_G2M_DECODER) += g2meet.o elsdec.o mjpegdec_common.o
+OBJS-$(CONFIG_G2M_DECODER) += g2meet.o elsdec.o
OBJS-$(CONFIG_G723_1_DECODER) += g723_1dec.o g723_1.o \
acelp_vectors.o celp_filters.o celp_math.o
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1enc.o g723_1.o \
@@ -356,11 +355,10 @@
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261data.o h261.o
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261data.o h261.o
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \
- mpeg4video.o mpeg4videodec.o \
- h263data.o
-OBJS-$(CONFIG_H263I_DECODER) += intelh263dec.o
-OBJS-$(CONFIG_H263_ENCODER) += mpeg4video.o \
- h263.o ituh263enc.o h263data.o
+ mpeg4video.o mpeg4videodec.o flvdec.o\
+ intelh263dec.o h263data.o
+OBJS-$(CONFIG_H263_ENCODER) += mpeg4videoenc.o mpeg4video.o \
+ h263.o ituh263enc.o flvenc.o h263data.o
OBJS-$(CONFIG_H263_V4L2M2M_DECODER) += v4l2_m2m_dec.o
OBJS-$(CONFIG_H263_V4L2M2M_ENCODER) += v4l2_m2m_enc.o
OBJS-$(CONFIG_H264_DECODER) += h264dec.o h264_cabac.o h264_cavlc.o \
@@ -377,7 +375,7 @@
OBJS-$(CONFIG_NVENC_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_NVENC_H264_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_H264_OMX_ENCODER) += omx.o
-OBJS-$(CONFIG_H264_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_H264_QSV_DECODER) += qsvdec_h2645.o
OBJS-$(CONFIG_H264_QSV_ENCODER) += qsvenc_h264.o
OBJS-$(CONFIG_H264_RKMPP_DECODER) += rkmppdec.o
OBJS-$(CONFIG_H264_VAAPI_ENCODER) += vaapi_encode_h264.o h264_levels.o
@@ -397,7 +395,7 @@
OBJS-$(CONFIG_HEVC_MF_ENCODER) += mfenc.o mf_utils.o
OBJS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc_hevc.o
OBJS-$(CONFIG_NVENC_HEVC_ENCODER) += nvenc_hevc.o
-OBJS-$(CONFIG_HEVC_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_HEVC_QSV_DECODER) += qsvdec_h2645.o
OBJS-$(CONFIG_HEVC_QSV_ENCODER) += qsvenc_hevc.o hevc_ps_enc.o \
hevc_data.o
OBJS-$(CONFIG_HEVC_RKMPP_DECODER) += rkmppdec.o
@@ -439,7 +437,7 @@
OBJS-$(CONFIG_LAGARITH_DECODER) += lagarith.o lagarithrac.o
OBJS-$(CONFIG_LJPEG_ENCODER) += ljpegenc.o mjpegenc_common.o
OBJS-$(CONFIG_LOCO_DECODER) += loco.o
-OBJS-$(CONFIG_LSCR_DECODER) += lscrdec.o png.o pngdec.o pngdsp.o
+OBJS-$(CONFIG_LSCR_DECODER) += png.o pngdec.o pngdsp.o
OBJS-$(CONFIG_M101_DECODER) += m101.o
OBJS-$(CONFIG_MACE3_DECODER) += mace.o
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
@@ -450,8 +448,8 @@
twinvq.o
OBJS-$(CONFIG_MICRODVD_DECODER) += microdvddec.o ass.o
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o
-OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpegdec_common.o
-OBJS-$(CONFIG_MJPEG_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o
+OBJS-$(CONFIG_MJPEG_QSV_DECODER) += qsvdec_other.o
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpegenc_common.o \
mjpegenc_huffman.o
OBJS-$(CONFIG_MJPEGB_DECODER) += mjpegbdec.o
@@ -488,7 +486,7 @@
OBJS-$(CONFIG_MPEG1_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_MPEG1_V4L2M2M_DECODER) += v4l2_m2m_dec.o
OBJS-$(CONFIG_MPEG2_MMAL_DECODER) += mmaldec.o
-OBJS-$(CONFIG_MPEG2_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_MPEG2_QSV_DECODER) += qsvdec_other.o
OBJS-$(CONFIG_MPEG2_QSV_ENCODER) += qsvenc_mpeg2.o
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
@@ -497,7 +495,6 @@
OBJS-$(CONFIG_MPEG2_VAAPI_ENCODER) += vaapi_encode_mpeg2.o
OBJS-$(CONFIG_MPEG2_V4L2M2M_DECODER) += v4l2_m2m_dec.o
OBJS-$(CONFIG_MPEG4_DECODER) += xvididct.o
-OBJS-$(CONFIG_MPEG4_ENCODER) += mpeg4videoenc.o
OBJS-$(CONFIG_MPEG4_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_MPEG4_MEDIACODEC_DECODER) += mediacodecdec.o
OBJS-$(CONFIG_MPEG4_OMX_ENCODER) += omx.o
@@ -545,7 +542,6 @@
OBJS-$(CONFIG_PCX_DECODER) += pcx.o
OBJS-$(CONFIG_PCX_ENCODER) += pcxenc.o
OBJS-$(CONFIG_PFM_DECODER) += pnmdec.o pnm.o
-OBJS-$(CONFIG_PFM_ENCODER) += pnmenc.o
OBJS-$(CONFIG_PGM_DECODER) += pnmdec.o pnm.o
OBJS-$(CONFIG_PGM_ENCODER) += pnmenc.o
OBJS-$(CONFIG_PGMYUV_DECODER) += pnmdec.o pnm.o
@@ -609,7 +605,6 @@
OBJS-$(CONFIG_SCPR_DECODER) += scpr.o
OBJS-$(CONFIG_SCREENPRESSO_DECODER) += screenpresso.o
OBJS-$(CONFIG_SDX2_DPCM_DECODER) += dpcm.o
-OBJS-$(CONFIG_SGA_DECODER) += sga.o
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
OBJS-$(CONFIG_SGI_ENCODER) += sgienc.o rle.o
OBJS-$(CONFIG_SGIRLE_DECODER) += sgirledec.o
@@ -620,7 +615,6 @@
acelp_filters.o celp_filters.o \
sipr16k.o
OBJS-$(CONFIG_SIREN_DECODER) += siren.o
-OBJS-$(CONFIG_SIMBIOSIS_IMX_DECODER) += imx.o
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o
OBJS-$(CONFIG_SMC_DECODER) += smc.o
@@ -659,8 +653,8 @@
OBJS-$(CONFIG_TARGA_Y216_DECODER) += targa_y216dec.o
OBJS-$(CONFIG_TDSC_DECODER) += tdsc.o
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
-OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_common.o
-OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o
+OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_data.o tiff_common.o mjpegdec.o
+OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o tiff_data.o
OBJS-$(CONFIG_TMV_DECODER) += tmv.o cga_data.o
OBJS-$(CONFIG_TRUEHD_DECODER) += mlpdec.o mlpdsp.o
OBJS-$(CONFIG_TRUEHD_ENCODER) += mlpenc.o mlp.o
@@ -672,8 +666,7 @@
OBJS-$(CONFIG_TSCC2_DECODER) += tscc2.o
OBJS-$(CONFIG_TTA_DECODER) += tta.o ttadata.o ttadsp.o
OBJS-$(CONFIG_TTA_ENCODER) += ttaenc.o ttaencdsp.o ttadata.o
-OBJS-$(CONFIG_TTML_ENCODER) += ttmlenc.o ass_split.o
-OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o metasound_data.o
+OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.o
OBJS-$(CONFIG_TXD_DECODER) += txd.o
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideodsp.o
@@ -695,7 +688,7 @@
wmv2dsp.o wmv2data.o
OBJS-$(CONFIG_VC1_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_VC1_MMAL_DECODER) += mmaldec.o
-OBJS-$(CONFIG_VC1_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_VC1_QSV_DECODER) += qsvdec_other.o
OBJS-$(CONFIG_VC1_V4L2M2M_DECODER) += v4l2_m2m_dec.o
OBJS-$(CONFIG_VC2_ENCODER) += vc2enc.o vc2enc_dwt.o diractab.o
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
@@ -714,7 +707,7 @@
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp56rac.o
OBJS-$(CONFIG_VP8_CUVID_DECODER) += cuviddec.o
OBJS-$(CONFIG_VP8_MEDIACODEC_DECODER) += mediacodecdec.o
-OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec.o
+OBJS-$(CONFIG_VP8_QSV_DECODER) += qsvdec_other.o
OBJS-$(CONFIG_VP8_RKMPP_DECODER) += rkmppdec.o
OBJS-$(CONFIG_VP8_VAAPI_ENCODER) += vaapi_encode_vp8.o
OBJS-$(CONFIG_VP8_V4L2M2M_DECODER) += v4l2_m2m_dec.o
@@ -730,8 +723,8 @@
OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.o
OBJS-$(CONFIG_VP9_V4L2M2M_DECODER) += v4l2_m2m_dec.o
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
-OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o wavpackdata.o dsd.o
-OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackdata.o wavpackenc.o
+OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o dsd.o
+OBJS-$(CONFIG_WAVPACK_ENCODER) += wavpackenc.o
OBJS-$(CONFIG_WCMV_DECODER) += wcmv.o
OBJS-$(CONFIG_WEBP_DECODER) += webp.o
OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o ass.o
@@ -832,7 +825,6 @@
OBJS-$(CONFIG_PCM_S64BE_ENCODER) += pcm.o
OBJS-$(CONFIG_PCM_S64LE_DECODER) += pcm.o
OBJS-$(CONFIG_PCM_S64LE_ENCODER) += pcm.o
-OBJS-$(CONFIG_PCM_SGA_DECODER) += pcm.o
OBJS-$(CONFIG_PCM_U8_DECODER) += pcm.o
OBJS-$(CONFIG_PCM_U8_ENCODER) += pcm.o
OBJS-$(CONFIG_PCM_U16BE_DECODER) += pcm.o
@@ -931,14 +923,14 @@
OBJS-$(CONFIG_H264_D3D11VA_HWACCEL) += dxva2_h264.o
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
OBJS-$(CONFIG_H264_NVDEC_HWACCEL) += nvdec_h264.o
-OBJS-$(CONFIG_H264_QSV_HWACCEL) += qsvdec.o
+OBJS-$(CONFIG_H264_QSV_HWACCEL) += qsvdec_h2645.o
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
OBJS-$(CONFIG_H264_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) += dxva2_hevc.o
OBJS-$(CONFIG_HEVC_DXVA2_HWACCEL) += dxva2_hevc.o
OBJS-$(CONFIG_HEVC_NVDEC_HWACCEL) += nvdec_hevc.o
-OBJS-$(CONFIG_HEVC_QSV_HWACCEL) += qsvdec.o
+OBJS-$(CONFIG_HEVC_QSV_HWACCEL) += qsvdec_h2645.o
OBJS-$(CONFIG_HEVC_VAAPI_HWACCEL) += vaapi_hevc.o h265_profile_level.o
OBJS-$(CONFIG_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o h265_profile_level.o
OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL) += nvdec_mjpeg.o
@@ -950,7 +942,7 @@
OBJS-$(CONFIG_MPEG2_D3D11VA_HWACCEL) += dxva2_mpeg2.o
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
OBJS-$(CONFIG_MPEG2_NVDEC_HWACCEL) += nvdec_mpeg12.o
-OBJS-$(CONFIG_MPEG2_QSV_HWACCEL) += qsvdec.o
+OBJS-$(CONFIG_MPEG2_QSV_HWACCEL) += qsvdec_other.o
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
OBJS-$(CONFIG_MPEG2_VDPAU_HWACCEL) += vdpau_mpeg12.o
OBJS-$(CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
@@ -962,7 +954,7 @@
OBJS-$(CONFIG_VC1_D3D11VA_HWACCEL) += dxva2_vc1.o
OBJS-$(CONFIG_VC1_DXVA2_HWACCEL) += dxva2_vc1.o
OBJS-$(CONFIG_VC1_NVDEC_HWACCEL) += nvdec_vc1.o
-OBJS-$(CONFIG_VC1_QSV_HWACCEL) += qsvdec.o
+OBJS-$(CONFIG_VC1_QSV_HWACCEL) += qsvdec_other.o
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o
OBJS-$(CONFIG_VC1_VDPAU_HWACCEL) += vdpau_vc1.o
OBJS-$(CONFIG_VP8_NVDEC_HWACCEL) += nvdec_vp8.o
@@ -972,24 +964,26 @@
OBJS-$(CONFIG_VP9_NVDEC_HWACCEL) += nvdec_vp9.o
OBJS-$(CONFIG_VP9_VAAPI_HWACCEL) += vaapi_vp9.o
OBJS-$(CONFIG_VP9_VDPAU_HWACCEL) += vdpau_vp9.o
-OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec.o
+OBJS-$(CONFIG_VP8_QSV_HWACCEL) += qsvdec_other.o
# libavformat dependencies
OBJS-$(CONFIG_ISO_MEDIA) += mpeg4audio.o mpegaudiodata.o
OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o
+OBJS-$(CONFIG_CAF_DEMUXER) += ac3tab.o
OBJS-$(CONFIG_CODEC2_DEMUXER) += codec2utils.o
OBJS-$(CONFIG_CODEC2_MUXER) += codec2utils.o
OBJS-$(CONFIG_CODEC2RAW_DEMUXER) += codec2utils.o
OBJS-$(CONFIG_DNXHD_DEMUXER) += dnxhddata.o
OBJS-$(CONFIG_FITS_DEMUXER) += fits.o
+OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o
OBJS-$(CONFIG_LATM_MUXER) += mpeg4audio.o
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += mpeg4audio.o
OBJS-$(CONFIG_MATROSKA_MUXER) += mpeg4audio.o
OBJS-$(CONFIG_MOV_DEMUXER) += ac3tab.o
-OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o
OBJS-$(CONFIG_MXF_MUXER) += dnxhddata.o
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
+OBJS-$(CONFIG_NUT_DEMUXER) += mpegaudiodata.o mpeg4audio.o
OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o
OBJS-$(CONFIG_SPDIF_MUXER) += dca.o
OBJS-$(CONFIG_TAK_DEMUXER) += tak.o
@@ -1086,17 +1080,16 @@
OBJS-$(CONFIG_BMP_PARSER) += bmp_parser.o
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o
-OBJS-$(CONFIG_CRI_PARSER) += cri_parser.o
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca_exss.o dca.o
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o dnxhddata.o
-OBJS-$(CONFIG_DOLBY_E_PARSER) += dolby_e_parser.o dolby_e_parse.o
OBJS-$(CONFIG_DPX_PARSER) += dpx_parser.o
OBJS-$(CONFIG_DVAUDIO_PARSER) += dvaudio_parser.o
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
OBJS-$(CONFIG_DVD_NAV_PARSER) += dvd_nav_parser.o
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
-OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o
+OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o \
+ vorbis_data.o
OBJS-$(CONFIG_G723_1_PARSER) += g723_1_parser.o
OBJS-$(CONFIG_G729_PARSER) += g729_parser.o
OBJS-$(CONFIG_GIF_PARSER) += gif_parser.o
@@ -1130,7 +1123,6 @@
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
OBJS-$(CONFIG_VP9_PARSER) += vp9_parser.o
OBJS-$(CONFIG_WEBP_PARSER) += webp_parser.o
-OBJS-$(CONFIG_XBM_PARSER) += xbm_parser.o
OBJS-$(CONFIG_XMA_PARSER) += xma_parser.o
# bitstream filters
@@ -1165,7 +1157,6 @@
OBJS-$(CONFIG_PCM_RECHUNK_BSF) += pcm_rechunk_bsf.o
OBJS-$(CONFIG_PRORES_METADATA_BSF) += prores_metadata_bsf.o
OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o
-OBJS-$(CONFIG_SETTS_BSF) += setts_bsf.o
OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
OBJS-$(CONFIG_TRACE_HEADERS_BSF) += trace_headers_bsf.o
OBJS-$(CONFIG_TRUEHD_CORE_BSF) += truehd_core_bsf.o mlp_parse.o mlp.o
@@ -1205,6 +1196,7 @@
SKIPHEADERS-$(CONFIG_NVDEC) += nvdec.h
SKIPHEADERS-$(CONFIG_NVENC) += nvenc.h
SKIPHEADERS-$(CONFIG_QSV) += qsv.h qsv_internal.h
+SKIPHEADERS-$(CONFIG_QSVDEC) += qsvdec.h
SKIPHEADERS-$(CONFIG_QSVENC) += qsvenc.h
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h
@@ -1219,15 +1211,16 @@
imgconvert \
jpeg2000dwt \
mathops \
+ options \
+ mjpegenc_huffman \
utils \
TESTPROGS-$(CONFIG_CABAC) += cabac
TESTPROGS-$(CONFIG_DCT) += avfft
-TESTPROGS-$(CONFIG_FFT) += fft fft-fixed32
+TESTPROGS-$(CONFIG_FFT) += fft fft-fixed fft-fixed32
TESTPROGS-$(CONFIG_GOLOMB) += golomb
TESTPROGS-$(CONFIG_IDCTDSP) += dct
TESTPROGS-$(CONFIG_IIRFILTER) += iirfilter
-TESTPROGS-$(CONFIG_MJPEG_ENCODER) += mjpegenc_huffman
TESTPROGS-$(HAVE_MMX) += motion
TESTPROGS-$(CONFIG_MPEGVIDEO) += mpeg12framerate
TESTPROGS-$(CONFIG_H264_METADATA_BSF) += h264_levels
@@ -1283,9 +1276,9 @@
ifdef CONFIG_HARDCODED_TABLES
$(SUBDIR)cbrt_data.o: $(SUBDIR)cbrt_tables.h
$(SUBDIR)cbrt_data_fixed.o: $(SUBDIR)cbrt_fixed_tables.h
-$(SUBDIR)aacdec_fixed.o: $(SUBDIR)sinewin_fixed_tables.h
$(SUBDIR)aacps_float.o: $(SUBDIR)aacps_tables.h
$(SUBDIR)aacps_fixed.o: $(SUBDIR)aacps_fixed_tables.h
+$(SUBDIR)aactab_fixed.o: $(SUBDIR)aac_fixed_tables.h
$(SUBDIR)dvenc.o: $(SUBDIR)dv_tables.h
$(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables.h
$(SUBDIR)mpegaudiodec_common.o: $(SUBDIR)mpegaudiodec_common_tables.h
@@ -1294,4 +1287,5 @@
$(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
$(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
$(SUBDIR)sinewin.o: $(SUBDIR)sinewin_tables.h
+$(SUBDIR)sinewin_fixed.o: $(SUBDIR)sinewin_fixed_tables.h
endif
diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index 1e82f56..d422ea5 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -34,7 +34,6 @@
#include "aac_defines.h"
#include "libavutil/float_dsp.h"
#include "libavutil/fixed_dsp.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#if !USE_FIXED
#include "mdct15.h"
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index e84d30a..e5d4b53 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -89,7 +89,7 @@
the frame). */
if (avctx->codec_id != AV_CODEC_ID_AAC) {
avctx->sample_rate = s->sample_rate;
- if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
+ if (avctx->codec_id != AV_CODEC_ID_EAC3) {
avctx->channels = s->channels;
avctx->channel_layout = s->channel_layout;
}
@@ -99,7 +99,7 @@
/* Calculate the average bit rate */
s->frame_number++;
- if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
+ if (avctx->codec_id != AV_CODEC_ID_EAC3) {
avctx->bit_rate +=
(s->bit_rate - avctx->bit_rate) / s->frame_number;
}
diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h
index e94475a..74ac011 100644
--- a/libavcodec/aac_defines.h
+++ b/libavcodec/aac_defines.h
@@ -34,7 +34,7 @@
#define AAC_RENAME(x) x ## _fixed
#define AAC_RENAME_32(x) x ## _fixed_32
-#define AAC_RENAME2(x) x ## _fixed
+#define AAC_KBD_RENAME(x) aac_ ## x ## _fixed
typedef int INTFLOAT;
typedef unsigned UINTFLOAT; ///< Equivalent to INTFLOAT, Used as temporal cast to avoid undefined sign overflow operations.
typedef int64_t INT64FLOAT;
@@ -84,7 +84,7 @@
#define AAC_RENAME(x) x
#define AAC_RENAME_32(x) x
-#define AAC_RENAME2(x) ff_ ## x
+#define AAC_KBD_RENAME(x) ff_aac_ ## x
typedef float INTFLOAT;
typedef float UINTFLOAT;
typedef float INT64FLOAT;
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index c5d923a..4d82b7b 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -70,7 +70,7 @@
#include "fft.h"
#include "lpc.h"
#include "kbdwin.h"
-#include "sinewin_fixed_tablegen.h"
+#include "sinewin.h"
#include "aac.h"
#include "aactab.h"
@@ -86,8 +86,8 @@
#include <math.h>
#include <string.h>
-DECLARE_ALIGNED(32, static int, AAC_RENAME2(aac_kbd_long_1024))[1024];
-DECLARE_ALIGNED(32, static int, AAC_RENAME2(aac_kbd_short_128))[128];
+DECLARE_ALIGNED(32, static int, AAC_KBD_RENAME(kbd_long_1024))[1024];
+DECLARE_ALIGNED(32, static int, AAC_KBD_RENAME(kbd_short_128))[128];
static av_always_inline void reset_predict_state(PredictorState *ps)
{
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 98f77a3..fbe3074 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -639,14 +639,11 @@
* As actual intended 7.1(wide) streams are very rare, default to assuming a
* 7.1 layout was intended.
*/
- if (channel_config == 7 && avctx->strict_std_compliance < FF_COMPLIANCE_STRICT) {
+ if (channel_config == 7 && avctx->strict_std_compliance < FF_COMPLIANCE_STRICT && (!ac || !ac->warned_71_wide++)) {
+ av_log(avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout"
+ " instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode"
+ " according to the specification instead.\n", FF_COMPLIANCE_STRICT);
layout_map[2][2] = AAC_CHANNEL_SIDE;
-
- if (!ac || !ac->warned_71_wide++) {
- av_log(avctx, AV_LOG_INFO, "Assuming an incorrectly encoded 7.1 channel layout"
- " instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode"
- " according to the specification instead.\n", FF_COMPLIANCE_STRICT);
- }
}
return 0;
@@ -1238,13 +1235,14 @@
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120);
AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_960), 960);
AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_120), 120);
- AAC_RENAME(ff_init_ff_sine_windows)(9);
ff_aac_float_common_init();
#else
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024);
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128);
- init_sine_windows_fixed();
+ AAC_RENAME(ff_kbd_window_init)(AAC_KBD_RENAME(kbd_long_1024), 4.0, 1024);
+ AAC_RENAME(ff_kbd_window_init)(AAC_KBD_RENAME(kbd_short_128), 6.0, 128);
+ AAC_RENAME(ff_init_ff_sine_windows)(10);
+ AAC_RENAME(ff_init_ff_sine_windows)( 7);
#endif
+ AAC_RENAME(ff_init_ff_sine_windows)( 9);
AAC_RENAME(ff_cbrt_tableinit)();
}
@@ -2646,10 +2644,10 @@
static void windowing_and_mdct_ltp(AACContext *ac, INTFLOAT *out,
INTFLOAT *in, IndividualChannelStream *ics)
{
- const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_RENAME2(aac_kbd_long_1024) : AAC_RENAME2(sine_1024);
- const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME2(aac_kbd_short_128) : AAC_RENAME2(sine_128);
- const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME2(aac_kbd_long_1024) : AAC_RENAME2(sine_1024);
- const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME2(aac_kbd_short_128) : AAC_RENAME2(sine_128);
+ const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024);
+ const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128);
+ const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024);
+ const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128);
if (ics->window_sequence[0] != LONG_STOP_SEQUENCE) {
ac->fdsp->vector_fmul(in, in, lwindow_prev, 1024);
@@ -2706,8 +2704,8 @@
IndividualChannelStream *ics = &sce->ics;
INTFLOAT *saved = sce->saved;
INTFLOAT *saved_ltp = sce->coeffs;
- const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_RENAME2(aac_kbd_long_1024) : AAC_RENAME2(sine_1024);
- const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME2(aac_kbd_short_128) : AAC_RENAME2(sine_128);
+ const INTFLOAT *lwindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024);
+ const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128);
int i;
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
@@ -2745,9 +2743,9 @@
INTFLOAT *in = sce->coeffs;
INTFLOAT *out = sce->ret;
INTFLOAT *saved = sce->saved;
- const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME2(aac_kbd_short_128) : AAC_RENAME2(sine_128);
- const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME2(aac_kbd_long_1024) : AAC_RENAME2(sine_1024);
- const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME2(aac_kbd_short_128) : AAC_RENAME2(sine_128);
+ const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128);
+ const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_long_1024) : AAC_RENAME(ff_sine_1024);
+ const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_KBD_RENAME(kbd_short_128) : AAC_RENAME(ff_sine_128);
INTFLOAT *buf = ac->buf_mdct;
INTFLOAT *temp = ac->temp;
int i;
@@ -2893,10 +2891,10 @@
if (ics->use_kb_window[1]) {
// AAC LD uses a low overlap sine window instead of a KBD window
memcpy(out, saved, 192 * sizeof(*out));
- ac->fdsp->vector_fmul_window(out + 192, saved + 192, buf, AAC_RENAME2(sine_128), 64);
+ ac->fdsp->vector_fmul_window(out + 192, saved + 192, buf, AAC_RENAME(ff_sine_128), 64);
memcpy( out + 320, buf + 64, 192 * sizeof(*out));
} else {
- ac->fdsp->vector_fmul_window(out, saved, buf, AAC_RENAME2(sine_512), 256);
+ ac->fdsp->vector_fmul_window(out, saved, buf, AAC_RENAME(ff_sine_512), 256);
}
// buffer update
@@ -2905,7 +2903,7 @@
static void imdct_and_windowing_eld(AACContext *ac, SingleChannelElement *sce)
{
- UINTFLOAT *in = sce->coeffs;
+ INTFLOAT *in = sce->coeffs;
INTFLOAT *out = sce->ret;
INTFLOAT *saved = sce->saved;
INTFLOAT *buf = ac->buf_mdct;
@@ -3216,8 +3214,7 @@
}
static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
- int *got_frame_ptr, GetBitContext *gb,
- const AVPacket *avpkt)
+ int *got_frame_ptr, GetBitContext *gb, AVPacket *avpkt)
{
AACContext *ac = avctx->priv_data;
ChannelElement *che = NULL, *che_prev = NULL;
@@ -3437,11 +3434,11 @@
int buf_consumed;
int buf_offset;
int err;
- buffer_size_t new_extradata_size;
+ int new_extradata_size;
const uint8_t *new_extradata = av_packet_get_side_data(avpkt,
AV_PKT_DATA_NEW_EXTRADATA,
&new_extradata_size);
- buffer_size_t jp_dualmono_size;
+ int jp_dualmono_size;
const uint8_t *jp_dualmono = av_packet_get_side_data(avpkt,
AV_PKT_DATA_JP_DUALMONO,
&jp_dualmono_size);
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h
index 8ffc94f..5a015ca 100644
--- a/libavcodec/aacenc.h
+++ b/libavcodec/aacenc.h
@@ -23,8 +23,6 @@
#define AVCODEC_AACENC_H
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "put_bits.h"
diff --git a/libavcodec/aacenctab.c b/libavcodec/aacenctab.c
index 874365a..f3d70fb 100644
--- a/libavcodec/aacenctab.c
+++ b/libavcodec/aacenctab.c
@@ -88,7 +88,7 @@
32, 36, 36, 40, 44, 48, 52, 56, 60, 64, 80
};
-const uint8_t *const ff_aac_swb_size_128[] = {
+const uint8_t *ff_aac_swb_size_128[] = {
swb_size_128_96, swb_size_128_96, swb_size_128_64,
swb_size_128_48, swb_size_128_48, swb_size_128_48,
swb_size_128_24, swb_size_128_24, swb_size_128_16,
@@ -96,7 +96,7 @@
swb_size_128_8
};
-const uint8_t *const ff_aac_swb_size_1024[] = {
+const uint8_t *ff_aac_swb_size_1024[] = {
swb_size_1024_96, swb_size_1024_96, swb_size_1024_64,
swb_size_1024_48, swb_size_1024_48, swb_size_1024_32,
swb_size_1024_24, swb_size_1024_24, swb_size_1024_16,
diff --git a/libavcodec/aacenctab.h b/libavcodec/aacenctab.h
index dbbdf61..64932d7 100644
--- a/libavcodec/aacenctab.h
+++ b/libavcodec/aacenctab.h
@@ -38,9 +38,9 @@
#define AAC_MAX_CHANNELS 16
-extern const uint8_t *const ff_aac_swb_size_1024[];
+extern const uint8_t *ff_aac_swb_size_1024[];
extern const int ff_aac_swb_size_1024_len;
-extern const uint8_t *const ff_aac_swb_size_128[];
+extern const uint8_t *ff_aac_swb_size_128[];
extern const int ff_aac_swb_size_128_len;
/* Supported layouts without using a PCE */
diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c
index 6c7a33f..22df160 100644
--- a/libavcodec/aacps.c
+++ b/libavcodec/aacps.c
@@ -25,8 +25,8 @@
#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
+#include "get_bits.h"
#include "aacps.h"
#if USE_FIXED
#include "aacps_fixed_tablegen.h"
@@ -34,12 +34,118 @@
#include "libavutil/internal.h"
#include "aacps_tablegen.h"
#endif /* USE_FIXED */
+#include "aacpsdata.c"
-static const INTFLOAT g1_Q2[] = {
- Q31(0.0f), Q31(0.01899487526049f), Q31(0.0f), Q31(-0.07293139167538f),
- Q31(0.0f), Q31(0.30596630545168f), Q31(0.5f)
+#define PS_BASELINE 0 ///< Operate in Baseline PS mode
+ ///< Baseline implies 10 or 20 stereo bands,
+ ///< mixing mode A, and no ipd/opd
+
+#define numQMFSlots 32 //numTimeSlots * RATE
+
+static const int8_t num_env_tab[2][4] = {
+ { 0, 1, 2, 4, },
+ { 1, 2, 3, 4, },
};
+static const int8_t nr_iidicc_par_tab[] = {
+ 10, 20, 34, 10, 20, 34,
+};
+
+static const int8_t nr_iidopd_par_tab[] = {
+ 5, 11, 17, 5, 11, 17,
+};
+
+enum {
+ huff_iid_df1,
+ huff_iid_dt1,
+ huff_iid_df0,
+ huff_iid_dt0,
+ huff_icc_df,
+ huff_icc_dt,
+ huff_ipd_df,
+ huff_ipd_dt,
+ huff_opd_df,
+ huff_opd_dt,
+};
+
+static const int huff_iid[] = {
+ huff_iid_df0,
+ huff_iid_df1,
+ huff_iid_dt0,
+ huff_iid_dt1,
+};
+
+static VLC vlc_ps[10];
+
+#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION) \
+/** \
+ * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \
+ * Inter-channel Phase Difference/Overall Phase Difference parameters from the \
+ * bitstream. \
+ * \
+ * @param avctx contains the current codec context \
+ * @param gb pointer to the input bitstream \
+ * @param ps pointer to the Parametric Stereo context \
+ * @param PAR pointer to the parameter to be read \
+ * @param e envelope to decode \
+ * @param dt 1: time delta-coded, 0: frequency delta-coded \
+ */ \
+static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, \
+ int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
+{ \
+ int b, num = ps->nr_ ## PAR ## _par; \
+ VLC_TYPE (*vlc_table)[2] = vlc_ps[table_idx].table; \
+ if (dt) { \
+ int e_prev = e ? e - 1 : ps->num_env_old - 1; \
+ e_prev = FFMAX(e_prev, 0); \
+ for (b = 0; b < num; b++) { \
+ int val = PAR[e_prev][b] + get_vlc2(gb, vlc_table, 9, 3) - OFFSET; \
+ if (MASK) val &= MASK; \
+ PAR[e][b] = val; \
+ if (ERR_CONDITION) \
+ goto err; \
+ } \
+ } else { \
+ int val = 0; \
+ for (b = 0; b < num; b++) { \
+ val += get_vlc2(gb, vlc_table, 9, 3) - OFFSET; \
+ if (MASK) val &= MASK; \
+ PAR[e][b] = val; \
+ if (ERR_CONDITION) \
+ goto err; \
+ } \
+ } \
+ return 0; \
+err: \
+ av_log(avctx, AV_LOG_ERROR, "illegal "#PAR"\n"); \
+ return AVERROR_INVALIDDATA; \
+}
+
+READ_PAR_DATA(iid, huff_offset[table_idx], 0, FFABS(ps->iid_par[e][b]) > 7 + 8 * ps->iid_quant)
+READ_PAR_DATA(icc, huff_offset[table_idx], 0, ps->icc_par[e][b] > 7U)
+READ_PAR_DATA(ipdopd, 0, 0x07, 0)
+
+static int ps_read_extension_data(GetBitContext *gb, PSContext *ps, int ps_extension_id)
+{
+ int e;
+ int count = get_bits_count(gb);
+
+ if (ps_extension_id)
+ return 0;
+
+ ps->enable_ipdopd = get_bits1(gb);
+ if (ps->enable_ipdopd) {
+ for (e = 0; e < ps->num_env; e++) {
+ int dt = get_bits1(gb);
+ read_ipdopd_data(NULL, gb, ps, ps->ipd_par, dt ? huff_ipd_dt : huff_ipd_df, e, dt);
+ dt = get_bits1(gb);
+ read_ipdopd_data(NULL, gb, ps, ps->opd_par, dt ? huff_opd_dt : huff_opd_df, e, dt);
+ }
+ }
+ skip_bits1(gb); //reserved_ps
+ return get_bits_count(gb) - count;
+}
+
static void ipdopd_reset(int8_t *ipd_hist, int8_t *opd_hist)
{
int i;
@@ -49,6 +155,163 @@
}
}
+int AAC_RENAME(ff_ps_read_data)(AVCodecContext *avctx, GetBitContext *gb_host, PSContext *ps, int bits_left)
+{
+ int e;
+ int bit_count_start = get_bits_count(gb_host);
+ int header;
+ int bits_consumed;
+ GetBitContext gbc = *gb_host, *gb = &gbc;
+
+ header = get_bits1(gb);
+ if (header) { //enable_ps_header
+ ps->enable_iid = get_bits1(gb);
+ if (ps->enable_iid) {
+ int iid_mode = get_bits(gb, 3);
+ if (iid_mode > 5) {
+ av_log(avctx, AV_LOG_ERROR, "iid_mode %d is reserved.\n",
+ iid_mode);
+ goto err;
+ }
+ ps->nr_iid_par = nr_iidicc_par_tab[iid_mode];
+ ps->iid_quant = iid_mode > 2;
+ ps->nr_ipdopd_par = nr_iidopd_par_tab[iid_mode];
+ }
+ ps->enable_icc = get_bits1(gb);
+ if (ps->enable_icc) {
+ ps->icc_mode = get_bits(gb, 3);
+ if (ps->icc_mode > 5) {
+ av_log(avctx, AV_LOG_ERROR, "icc_mode %d is reserved.\n",
+ ps->icc_mode);
+ goto err;
+ }
+ ps->nr_icc_par = nr_iidicc_par_tab[ps->icc_mode];
+ }
+ ps->enable_ext = get_bits1(gb);
+ }
+
+ ps->frame_class = get_bits1(gb);
+ ps->num_env_old = ps->num_env;
+ ps->num_env = num_env_tab[ps->frame_class][get_bits(gb, 2)];
+
+ ps->border_position[0] = -1;
+ if (ps->frame_class) {
+ for (e = 1; e <= ps->num_env; e++) {
+ ps->border_position[e] = get_bits(gb, 5);
+ if (ps->border_position[e] < ps->border_position[e-1]) {
+ av_log(avctx, AV_LOG_ERROR, "border_position non monotone.\n");
+ goto err;
+ }
+ }
+ } else
+ for (e = 1; e <= ps->num_env; e++)
+ ps->border_position[e] = (e * numQMFSlots >> ff_log2_tab[ps->num_env]) - 1;
+
+ if (ps->enable_iid) {
+ for (e = 0; e < ps->num_env; e++) {
+ int dt = get_bits1(gb);
+ if (read_iid_data(avctx, gb, ps, ps->iid_par, huff_iid[2*dt+ps->iid_quant], e, dt))
+ goto err;
+ }
+ } else
+ memset(ps->iid_par, 0, sizeof(ps->iid_par));
+
+ if (ps->enable_icc)
+ for (e = 0; e < ps->num_env; e++) {
+ int dt = get_bits1(gb);
+ if (read_icc_data(avctx, gb, ps, ps->icc_par, dt ? huff_icc_dt : huff_icc_df, e, dt))
+ goto err;
+ }
+ else
+ memset(ps->icc_par, 0, sizeof(ps->icc_par));
+
+ if (ps->enable_ext) {
+ int cnt = get_bits(gb, 4);
+ if (cnt == 15) {
+ cnt += get_bits(gb, 8);
+ }
+ cnt *= 8;
+ while (cnt > 7) {
+ int ps_extension_id = get_bits(gb, 2);
+ cnt -= 2 + ps_read_extension_data(gb, ps, ps_extension_id);
+ }
+ if (cnt < 0) {
+ av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d\n", cnt);
+ goto err;
+ }
+ skip_bits(gb, cnt);
+ }
+
+ ps->enable_ipdopd &= !PS_BASELINE;
+
+ //Fix up envelopes
+ if (!ps->num_env || ps->border_position[ps->num_env] < numQMFSlots - 1) {
+ //Create a fake envelope
+ int source = ps->num_env ? ps->num_env - 1 : ps->num_env_old - 1;
+ int b;
+ if (source >= 0 && source != ps->num_env) {
+ if (ps->enable_iid) {
+ memcpy(ps->iid_par+ps->num_env, ps->iid_par+source, sizeof(ps->iid_par[0]));
+ }
+ if (ps->enable_icc) {
+ memcpy(ps->icc_par+ps->num_env, ps->icc_par+source, sizeof(ps->icc_par[0]));
+ }
+ if (ps->enable_ipdopd) {
+ memcpy(ps->ipd_par+ps->num_env, ps->ipd_par+source, sizeof(ps->ipd_par[0]));
+ memcpy(ps->opd_par+ps->num_env, ps->opd_par+source, sizeof(ps->opd_par[0]));
+ }
+ }
+ if (ps->enable_iid){
+ for (b = 0; b < ps->nr_iid_par; b++) {
+ if (FFABS(ps->iid_par[ps->num_env][b]) > 7 + 8 * ps->iid_quant) {
+ av_log(avctx, AV_LOG_ERROR, "iid_par invalid\n");
+ goto err;
+ }
+ }
+ }
+ if (ps->enable_icc){
+ for (b = 0; b < ps->nr_iid_par; b++) {
+ if (ps->icc_par[ps->num_env][b] > 7U) {
+ av_log(avctx, AV_LOG_ERROR, "icc_par invalid\n");
+ goto err;
+ }
+ }
+ }
+ ps->num_env++;
+ ps->border_position[ps->num_env] = numQMFSlots - 1;
+ }
+
+
+ ps->is34bands_old = ps->is34bands;
+ if (!PS_BASELINE && (ps->enable_iid || ps->enable_icc))
+ ps->is34bands = (ps->enable_iid && ps->nr_iid_par == 34) ||
+ (ps->enable_icc && ps->nr_icc_par == 34);
+
+ //Baseline
+ if (!ps->enable_ipdopd) {
+ memset(ps->ipd_par, 0, sizeof(ps->ipd_par));
+ memset(ps->opd_par, 0, sizeof(ps->opd_par));
+ }
+
+ if (header)
+ ps->start = 1;
+
+ bits_consumed = get_bits_count(gb) - bit_count_start;
+ if (bits_consumed <= bits_left) {
+ skip_bits_long(gb_host, bits_consumed);
+ return bits_consumed;
+ }
+ av_log(avctx, AV_LOG_ERROR, "Expected to read %d PS bits actually read %d.\n", bits_left, bits_consumed);
+err:
+ ps->start = 0;
+ skip_bits_long(gb_host, bits_left);
+ memset(ps->iid_par, 0, sizeof(ps->iid_par));
+ memset(ps->icc_par, 0, sizeof(ps->icc_par));
+ memset(ps->ipd_par, 0, sizeof(ps->ipd_par));
+ memset(ps->opd_par, 0, sizeof(ps->opd_par));
+ return bits_left;
+}
+
/** Split one subband into 2 subsubbands with a symmetric real filter.
* The filter must have its non-center even coefficients equal to zero. */
static void hybrid2_re(INTFLOAT (*in)[2], INTFLOAT (*out)[32][2], const INTFLOAT filter[8], int len, int reverse)
@@ -409,14 +672,14 @@
const float transient_impact = 1.5f;
const float a_smooth = 0.25f; ///< Smoothing coefficient
#endif /* USE_FIXED */
- const int8_t *const k_to_i = is34 ? ff_k_to_i_34 : ff_k_to_i_20;
+ const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
int i, k, m, n;
int n0 = 0, nL = 32;
const INTFLOAT peak_decay_factor = Q31(0.76592833836465f);
memset(power, 0, 34 * sizeof(*power));
- if (is34 != ps->common.is34bands_old) {
+ if (is34 != ps->is34bands_old) {
memset(ps->peak_decay_nrg, 0, sizeof(ps->peak_decay_nrg));
memset(ps->power_smooth, 0, sizeof(ps->power_smooth));
memset(ps->peak_decay_diff_smooth, 0, sizeof(ps->peak_decay_diff_smooth));
@@ -558,7 +821,6 @@
{
int e, b, k;
- PSCommonContext *const ps2 = &ps->common;
INTFLOAT (*H11)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H11;
INTFLOAT (*H12)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H12;
INTFLOAT (*H21)[PS_MAX_NUM_ENV+1][PS_MAX_NR_IIDICC] = ps->H21;
@@ -573,29 +835,29 @@
int8_t (*icc_mapped)[PS_MAX_NR_IIDICC] = icc_mapped_buf;
int8_t (*ipd_mapped)[PS_MAX_NR_IIDICC] = ipd_mapped_buf;
int8_t (*opd_mapped)[PS_MAX_NR_IIDICC] = opd_mapped_buf;
- const int8_t *const k_to_i = is34 ? ff_k_to_i_34 : ff_k_to_i_20;
- TABLE_CONST INTFLOAT (*H_LUT)[8][4] = (PS_BASELINE || ps2->icc_mode < 3) ? HA : HB;
+ const int8_t *k_to_i = is34 ? k_to_i_34 : k_to_i_20;
+ TABLE_CONST INTFLOAT (*H_LUT)[8][4] = (PS_BASELINE || ps->icc_mode < 3) ? HA : HB;
//Remapping
- if (ps2->num_env_old) {
- memcpy(H11[0][0], H11[0][ps2->num_env_old], sizeof(H11[0][0]));
- memcpy(H11[1][0], H11[1][ps2->num_env_old], sizeof(H11[1][0]));
- memcpy(H12[0][0], H12[0][ps2->num_env_old], sizeof(H12[0][0]));
- memcpy(H12[1][0], H12[1][ps2->num_env_old], sizeof(H12[1][0]));
- memcpy(H21[0][0], H21[0][ps2->num_env_old], sizeof(H21[0][0]));
- memcpy(H21[1][0], H21[1][ps2->num_env_old], sizeof(H21[1][0]));
- memcpy(H22[0][0], H22[0][ps2->num_env_old], sizeof(H22[0][0]));
- memcpy(H22[1][0], H22[1][ps2->num_env_old], sizeof(H22[1][0]));
+ if (ps->num_env_old) {
+ memcpy(H11[0][0], H11[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[0][0][0]));
+ memcpy(H11[1][0], H11[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H11[1][0][0]));
+ memcpy(H12[0][0], H12[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[0][0][0]));
+ memcpy(H12[1][0], H12[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H12[1][0][0]));
+ memcpy(H21[0][0], H21[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[0][0][0]));
+ memcpy(H21[1][0], H21[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H21[1][0][0]));
+ memcpy(H22[0][0], H22[0][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[0][0][0]));
+ memcpy(H22[1][0], H22[1][ps->num_env_old], PS_MAX_NR_IIDICC*sizeof(H22[1][0][0]));
}
if (is34) {
- remap34(&iid_mapped, ps2->iid_par, ps2->nr_iid_par, ps2->num_env, 1);
- remap34(&icc_mapped, ps2->icc_par, ps2->nr_icc_par, ps2->num_env, 1);
- if (ps2->enable_ipdopd) {
- remap34(&ipd_mapped, ps2->ipd_par, ps2->nr_ipdopd_par, ps2->num_env, 0);
- remap34(&opd_mapped, ps2->opd_par, ps2->nr_ipdopd_par, ps2->num_env, 0);
+ remap34(&iid_mapped, ps->iid_par, ps->nr_iid_par, ps->num_env, 1);
+ remap34(&icc_mapped, ps->icc_par, ps->nr_icc_par, ps->num_env, 1);
+ if (ps->enable_ipdopd) {
+ remap34(&ipd_mapped, ps->ipd_par, ps->nr_ipdopd_par, ps->num_env, 0);
+ remap34(&opd_mapped, ps->opd_par, ps->nr_ipdopd_par, ps->num_env, 0);
}
- if (!ps2->is34bands_old) {
+ if (!ps->is34bands_old) {
map_val_20_to_34(H11[0][0]);
map_val_20_to_34(H11[1][0]);
map_val_20_to_34(H12[0][0]);
@@ -607,13 +869,13 @@
ipdopd_reset(ipd_hist, opd_hist);
}
} else {
- remap20(&iid_mapped, ps2->iid_par, ps2->nr_iid_par, ps2->num_env, 1);
- remap20(&icc_mapped, ps2->icc_par, ps2->nr_icc_par, ps2->num_env, 1);
- if (ps2->enable_ipdopd) {
- remap20(&ipd_mapped, ps2->ipd_par, ps2->nr_ipdopd_par, ps2->num_env, 0);
- remap20(&opd_mapped, ps2->opd_par, ps2->nr_ipdopd_par, ps2->num_env, 0);
+ remap20(&iid_mapped, ps->iid_par, ps->nr_iid_par, ps->num_env, 1);
+ remap20(&icc_mapped, ps->icc_par, ps->nr_icc_par, ps->num_env, 1);
+ if (ps->enable_ipdopd) {
+ remap20(&ipd_mapped, ps->ipd_par, ps->nr_ipdopd_par, ps->num_env, 0);
+ remap20(&opd_mapped, ps->opd_par, ps->nr_ipdopd_par, ps->num_env, 0);
}
- if (ps2->is34bands_old) {
+ if (ps->is34bands_old) {
map_val_34_to_20(H11[0][0]);
map_val_34_to_20(H11[1][0]);
map_val_34_to_20(H12[0][0]);
@@ -627,15 +889,15 @@
}
//Mixing
- for (e = 0; e < ps2->num_env; e++) {
+ for (e = 0; e < ps->num_env; e++) {
for (b = 0; b < NR_PAR_BANDS[is34]; b++) {
INTFLOAT h11, h12, h21, h22;
- h11 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps2->iid_quant][icc_mapped[e][b]][0];
- h12 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps2->iid_quant][icc_mapped[e][b]][1];
- h21 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps2->iid_quant][icc_mapped[e][b]][2];
- h22 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps2->iid_quant][icc_mapped[e][b]][3];
+ h11 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][0];
+ h12 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][1];
+ h21 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][2];
+ h22 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][3];
- if (!PS_BASELINE && ps2->enable_ipdopd && b < NR_IPDOPD_BANDS[is34]) {
+ if (!PS_BASELINE && ps->enable_ipdopd && b < NR_IPDOPD_BANDS[is34]) {
//The spec say says to only run this smoother when enable_ipdopd
//is set but the reference decoder appears to run it constantly
INTFLOAT h11i, h12i, h21i, h22i;
@@ -672,8 +934,8 @@
for (k = 0; k < NR_BANDS[is34]; k++) {
LOCAL_ALIGNED_16(INTFLOAT, h, [2], [4]);
LOCAL_ALIGNED_16(INTFLOAT, h_step, [2], [4]);
- int start = ps2->border_position[e];
- int stop = ps2->border_position[e+1];
+ int start = ps->border_position[e];
+ int stop = ps->border_position[e+1];
INTFLOAT width = Q30(1.f) / ((stop - start) ? (stop - start) : 1);
#if USE_FIXED
width = FFMIN(2U*width, INT_MAX);
@@ -683,7 +945,7 @@
h[0][1] = H12[0][e][b];
h[0][2] = H21[0][e][b];
h[0][3] = H22[0][e][b];
- if (!PS_BASELINE && ps2->enable_ipdopd) {
+ if (!PS_BASELINE && ps->enable_ipdopd) {
//Is this necessary? ps_04_new seems unchanged
if ((is34 && k <= 13 && k >= 9) || (!is34 && k <= 1)) {
h[1][0] = -H11[1][e][b];
@@ -702,14 +964,14 @@
h_step[0][1] = AAC_MSUB31_V3(H12[0][e+1][b], h[0][1], width);
h_step[0][2] = AAC_MSUB31_V3(H21[0][e+1][b], h[0][2], width);
h_step[0][3] = AAC_MSUB31_V3(H22[0][e+1][b], h[0][3], width);
- if (!PS_BASELINE && ps2->enable_ipdopd) {
+ if (!PS_BASELINE && ps->enable_ipdopd) {
h_step[1][0] = AAC_MSUB31_V3(H11[1][e+1][b], h[1][0], width);
h_step[1][1] = AAC_MSUB31_V3(H12[1][e+1][b], h[1][1], width);
h_step[1][2] = AAC_MSUB31_V3(H21[1][e+1][b], h[1][2], width);
h_step[1][3] = AAC_MSUB31_V3(H22[1][e+1][b], h[1][3], width);
}
if (stop - start)
- ps->dsp.stereo_interpolate[!PS_BASELINE && ps2->enable_ipdopd](
+ ps->dsp.stereo_interpolate[!PS_BASELINE && ps->enable_ipdopd](
l[k] + 1 + start, r[k] + 1 + start,
h, h_step, stop - start);
}
@@ -721,7 +983,7 @@
INTFLOAT (*Lbuf)[32][2] = ps->Lbuf;
INTFLOAT (*Rbuf)[32][2] = ps->Rbuf;
const int len = 32;
- int is34 = ps->common.is34bands;
+ int is34 = ps->is34bands;
top += NR_BANDS[is34] - 64;
memset(ps->delay+top, 0, (NR_BANDS[is34] - top)*sizeof(ps->delay[0]));
@@ -737,9 +999,45 @@
return 0;
}
+#define PS_INIT_VLC_STATIC(num, size) \
+ INIT_VLC_STATIC(&vlc_ps[num], 9, ps_tmp[num].table_size / ps_tmp[num].elem_size, \
+ ps_tmp[num].ps_bits, 1, 1, \
+ ps_tmp[num].ps_codes, ps_tmp[num].elem_size, ps_tmp[num].elem_size, \
+ size);
+
+#define PS_VLC_ROW(name) \
+ { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) }
+
av_cold void AAC_RENAME(ff_ps_init)(void) {
+ // Syntax initialization
+ static const struct {
+ const void *ps_codes, *ps_bits;
+ const unsigned int table_size, elem_size;
+ } ps_tmp[] = {
+ PS_VLC_ROW(huff_iid_df1),
+ PS_VLC_ROW(huff_iid_dt1),
+ PS_VLC_ROW(huff_iid_df0),
+ PS_VLC_ROW(huff_iid_dt0),
+ PS_VLC_ROW(huff_icc_df),
+ PS_VLC_ROW(huff_icc_dt),
+ PS_VLC_ROW(huff_ipd_df),
+ PS_VLC_ROW(huff_ipd_dt),
+ PS_VLC_ROW(huff_opd_df),
+ PS_VLC_ROW(huff_opd_dt),
+ };
+
+ PS_INIT_VLC_STATIC(0, 1544);
+ PS_INIT_VLC_STATIC(1, 832);
+ PS_INIT_VLC_STATIC(2, 1024);
+ PS_INIT_VLC_STATIC(3, 1036);
+ PS_INIT_VLC_STATIC(4, 544);
+ PS_INIT_VLC_STATIC(5, 544);
+ PS_INIT_VLC_STATIC(6, 512);
+ PS_INIT_VLC_STATIC(7, 512);
+ PS_INIT_VLC_STATIC(8, 512);
+ PS_INIT_VLC_STATIC(9, 512);
+
ps_tableinit();
- ff_ps_init_common();
}
av_cold void AAC_RENAME(ff_ps_ctx_init)(PSContext *ps)
diff --git a/libavcodec/aacps.h b/libavcodec/aacps.h
index 3efa38a..61edce3 100644
--- a/libavcodec/aacps.h
+++ b/libavcodec/aacps.h
@@ -24,8 +24,6 @@
#include <stdint.h>
-#include "libavutil/mem_internal.h"
-
#include "aacpsdsp.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -39,13 +37,8 @@
#define PS_MAX_DELAY 14
#define PS_AP_LINKS 3
#define PS_MAX_AP_DELAY 5
-#define PS_BASELINE 0 ///< Operate in Baseline PS mode
- ///< Baseline implies 10 or 20 stereo bands,
- ///< mixing mode A, and no ipd/opd
-#define numQMFSlots 32 //numTimeSlots * RATE
-
-typedef struct PSCommonContext {
+typedef struct PSContext {
int start;
int enable_iid;
int iid_quant;
@@ -67,10 +60,6 @@
int8_t opd_par[PS_MAX_NUM_ENV][PS_MAX_NR_IIDICC]; ///< Overall Phase Difference Parameters
int is34bands;
int is34bands_old;
-} PSCommonContext;
-
-typedef struct PSContext {
- PSCommonContext common;
DECLARE_ALIGNED(16, INTFLOAT, in_buf)[5][44][2];
DECLARE_ALIGNED(16, INTFLOAT, delay)[PS_MAX_SSB][PS_QMF_TIME_SLOTS + PS_MAX_DELAY][2];
@@ -89,14 +78,9 @@
PSDSPContext dsp;
} PSContext;
-extern const int8_t ff_k_to_i_20[];
-extern const int8_t ff_k_to_i_34[];
-
-void ff_ps_init_common(void);
void AAC_RENAME(ff_ps_init)(void);
void AAC_RENAME(ff_ps_ctx_init)(PSContext *ps);
-int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb,
- PSCommonContext *ps, int bits_left);
+int AAC_RENAME(ff_ps_read_data)(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps, int bits_left);
int AAC_RENAME(ff_ps_apply)(AVCodecContext *avctx, PSContext *ps, INTFLOAT L[2][38][64], INTFLOAT R[2][38][64], int top);
#endif /* AVCODEC_AACPS_H */
diff --git a/libavcodec/aacps_common.c b/libavcodec/aacps_common.c
deleted file mode 100644
index 8653b87..0000000
--- a/libavcodec/aacps_common.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Functions common to fixed/float MPEG-4 Parametric Stereo decoding
- * Copyright (c) 2010 Alex Converse <alex.converse@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
- */
-
-#include <stdint.h>
-#include "libavutil/common.h"
-#include "libavutil/thread.h"
-#include "aacps.h"
-#include "get_bits.h"
-#include "aacpsdata.c"
-
-static const int8_t num_env_tab[2][4] = {
- { 0, 1, 2, 4, },
- { 1, 2, 3, 4, },
-};
-
-static const int8_t nr_iidicc_par_tab[] = {
- 10, 20, 34, 10, 20, 34,
-};
-
-static const int8_t nr_iidopd_par_tab[] = {
- 5, 11, 17, 5, 11, 17,
-};
-
-enum {
- huff_iid_df1,
- huff_iid_dt1,
- huff_iid_df0,
- huff_iid_dt0,
- huff_icc_df,
- huff_icc_dt,
- huff_ipd_df,
- huff_ipd_dt,
- huff_opd_df,
- huff_opd_dt,
-};
-
-static const int huff_iid[] = {
- huff_iid_df0,
- huff_iid_df1,
- huff_iid_dt0,
- huff_iid_dt1,
-};
-
-static VLC vlc_ps[10];
-
-#define READ_PAR_DATA(PAR, OFFSET, MASK, ERR_CONDITION, NB_BITS, MAX_DEPTH) \
-/** \
- * Read Inter-channel Intensity Difference/Inter-Channel Coherence/ \
- * Inter-channel Phase Difference/Overall Phase Difference parameters from the \
- * bitstream. \
- * \
- * @param avctx contains the current codec context \
- * @param gb pointer to the input bitstream \
- * @param ps pointer to the Parametric Stereo context \
- * @param PAR pointer to the parameter to be read \
- * @param e envelope to decode \
- * @param dt 1: time delta-coded, 0: frequency delta-coded \
- */ \
-static int read_ ## PAR ## _data(AVCodecContext *avctx, GetBitContext *gb, PSCommonContext *ps, \
- int8_t (*PAR)[PS_MAX_NR_IIDICC], int table_idx, int e, int dt) \
-{ \
- int b, num = ps->nr_ ## PAR ## _par; \
- VLC_TYPE (*vlc_table)[2] = vlc_ps[table_idx].table; \
- if (dt) { \
- int e_prev = e ? e - 1 : ps->num_env_old - 1; \
- e_prev = FFMAX(e_prev, 0); \
- for (b = 0; b < num; b++) { \
- int val = PAR[e_prev][b] + get_vlc2(gb, vlc_table, NB_BITS, MAX_DEPTH) - OFFSET; \
- if (MASK) val &= MASK; \
- PAR[e][b] = val; \
- if (ERR_CONDITION) \
- goto err; \
- } \
- } else { \
- int val = 0; \
- for (b = 0; b < num; b++) { \
- val += get_vlc2(gb, vlc_table, NB_BITS, MAX_DEPTH) - OFFSET; \
- if (MASK) val &= MASK; \
- PAR[e][b] = val; \
- if (ERR_CONDITION) \
- goto err; \
- } \
- } \
- return 0; \
-err: \
- av_log(avctx, AV_LOG_ERROR, "illegal "#PAR"\n"); \
- return AVERROR_INVALIDDATA; \
-}
-
-READ_PAR_DATA(iid, huff_offset[table_idx], 0, FFABS(ps->iid_par[e][b]) > 7 + 8 * ps->iid_quant, 9, 3)
-READ_PAR_DATA(icc, huff_offset[table_idx], 0, ps->icc_par[e][b] > 7U, 9, 2)
-READ_PAR_DATA(ipdopd, 0, 0x07, 0, 5, 1)
-
-static int ps_read_extension_data(GetBitContext *gb, PSCommonContext *ps,
- int ps_extension_id)
-{
- int e;
- int count = get_bits_count(gb);
-
- if (ps_extension_id)
- return 0;
-
- ps->enable_ipdopd = get_bits1(gb);
- if (ps->enable_ipdopd) {
- for (e = 0; e < ps->num_env; e++) {
- int dt = get_bits1(gb);
- read_ipdopd_data(NULL, gb, ps, ps->ipd_par, dt ? huff_ipd_dt : huff_ipd_df, e, dt);
- dt = get_bits1(gb);
- read_ipdopd_data(NULL, gb, ps, ps->opd_par, dt ? huff_opd_dt : huff_opd_df, e, dt);
- }
- }
- skip_bits1(gb); //reserved_ps
- return get_bits_count(gb) - count;
-}
-
-int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb_host,
- PSCommonContext *ps, int bits_left)
-{
- int e;
- int bit_count_start = get_bits_count(gb_host);
- int header;
- int bits_consumed;
- GetBitContext gbc = *gb_host, *gb = &gbc;
-
- header = get_bits1(gb);
- if (header) { //enable_ps_header
- ps->enable_iid = get_bits1(gb);
- if (ps->enable_iid) {
- int iid_mode = get_bits(gb, 3);
- if (iid_mode > 5) {
- av_log(avctx, AV_LOG_ERROR, "iid_mode %d is reserved.\n",
- iid_mode);
- goto err;
- }
- ps->nr_iid_par = nr_iidicc_par_tab[iid_mode];
- ps->iid_quant = iid_mode > 2;
- ps->nr_ipdopd_par = nr_iidopd_par_tab[iid_mode];
- }
- ps->enable_icc = get_bits1(gb);
- if (ps->enable_icc) {
- ps->icc_mode = get_bits(gb, 3);
- if (ps->icc_mode > 5) {
- av_log(avctx, AV_LOG_ERROR, "icc_mode %d is reserved.\n",
- ps->icc_mode);
- goto err;
- }
- ps->nr_icc_par = nr_iidicc_par_tab[ps->icc_mode];
- }
- ps->enable_ext = get_bits1(gb);
- }
-
- ps->frame_class = get_bits1(gb);
- ps->num_env_old = ps->num_env;
- ps->num_env = num_env_tab[ps->frame_class][get_bits(gb, 2)];
-
- ps->border_position[0] = -1;
- if (ps->frame_class) {
- for (e = 1; e <= ps->num_env; e++) {
- ps->border_position[e] = get_bits(gb, 5);
- if (ps->border_position[e] < ps->border_position[e-1]) {
- av_log(avctx, AV_LOG_ERROR, "border_position non monotone.\n");
- goto err;
- }
- }
- } else
- for (e = 1; e <= ps->num_env; e++)
- ps->border_position[e] = (e * numQMFSlots >> ff_log2_tab[ps->num_env]) - 1;
-
- if (ps->enable_iid) {
- for (e = 0; e < ps->num_env; e++) {
- int dt = get_bits1(gb);
- if (read_iid_data(avctx, gb, ps, ps->iid_par, huff_iid[2*dt+ps->iid_quant], e, dt))
- goto err;
- }
- } else
- memset(ps->iid_par, 0, sizeof(ps->iid_par));
-
- if (ps->enable_icc)
- for (e = 0; e < ps->num_env; e++) {
- int dt = get_bits1(gb);
- if (read_icc_data(avctx, gb, ps, ps->icc_par, dt ? huff_icc_dt : huff_icc_df, e, dt))
- goto err;
- }
- else
- memset(ps->icc_par, 0, sizeof(ps->icc_par));
-
- if (ps->enable_ext) {
- int cnt = get_bits(gb, 4);
- if (cnt == 15) {
- cnt += get_bits(gb, 8);
- }
- cnt *= 8;
- while (cnt > 7) {
- int ps_extension_id = get_bits(gb, 2);
- cnt -= 2 + ps_read_extension_data(gb, ps, ps_extension_id);
- }
- if (cnt < 0) {
- av_log(avctx, AV_LOG_ERROR, "ps extension overflow %d\n", cnt);
- goto err;
- }
- skip_bits(gb, cnt);
- }
-
- ps->enable_ipdopd &= !PS_BASELINE;
-
- //Fix up envelopes
- if (!ps->num_env || ps->border_position[ps->num_env] < numQMFSlots - 1) {
- //Create a fake envelope
- int source = ps->num_env ? ps->num_env - 1 : ps->num_env_old - 1;
- int b;
- if (source >= 0 && source != ps->num_env) {
- if (ps->enable_iid) {
- memcpy(ps->iid_par+ps->num_env, ps->iid_par+source, sizeof(ps->iid_par[0]));
- }
- if (ps->enable_icc) {
- memcpy(ps->icc_par+ps->num_env, ps->icc_par+source, sizeof(ps->icc_par[0]));
- }
- if (ps->enable_ipdopd) {
- memcpy(ps->ipd_par+ps->num_env, ps->ipd_par+source, sizeof(ps->ipd_par[0]));
- memcpy(ps->opd_par+ps->num_env, ps->opd_par+source, sizeof(ps->opd_par[0]));
- }
- }
- if (ps->enable_iid){
- for (b = 0; b < ps->nr_iid_par; b++) {
- if (FFABS(ps->iid_par[ps->num_env][b]) > 7 + 8 * ps->iid_quant) {
- av_log(avctx, AV_LOG_ERROR, "iid_par invalid\n");
- goto err;
- }
- }
- }
- if (ps->enable_icc){
- for (b = 0; b < ps->nr_iid_par; b++) {
- if (ps->icc_par[ps->num_env][b] > 7U) {
- av_log(avctx, AV_LOG_ERROR, "icc_par invalid\n");
- goto err;
- }
- }
- }
- ps->num_env++;
- ps->border_position[ps->num_env] = numQMFSlots - 1;
- }
-
-
- ps->is34bands_old = ps->is34bands;
- if (!PS_BASELINE && (ps->enable_iid || ps->enable_icc))
- ps->is34bands = (ps->enable_iid && ps->nr_iid_par == 34) ||
- (ps->enable_icc && ps->nr_icc_par == 34);
-
- //Baseline
- if (!ps->enable_ipdopd) {
- memset(ps->ipd_par, 0, sizeof(ps->ipd_par));
- memset(ps->opd_par, 0, sizeof(ps->opd_par));
- }
-
- if (header)
- ps->start = 1;
-
- bits_consumed = get_bits_count(gb) - bit_count_start;
- if (bits_consumed <= bits_left) {
- skip_bits_long(gb_host, bits_consumed);
- return bits_consumed;
- }
- av_log(avctx, AV_LOG_ERROR, "Expected to read %d PS bits actually read %d.\n", bits_left, bits_consumed);
-err:
- ps->start = 0;
- skip_bits_long(gb_host, bits_left);
- memset(ps->iid_par, 0, sizeof(ps->iid_par));
- memset(ps->icc_par, 0, sizeof(ps->icc_par));
- memset(ps->ipd_par, 0, sizeof(ps->ipd_par));
- memset(ps->opd_par, 0, sizeof(ps->opd_par));
- return bits_left;
-}
-
-#define PS_INIT_VLC_STATIC(num, nb_bits, size) \
- INIT_VLC_STATIC(&vlc_ps[num], nb_bits, ps_tmp[num].table_size / ps_tmp[num].elem_size, \
- ps_tmp[num].ps_bits, 1, 1, \
- ps_tmp[num].ps_codes, ps_tmp[num].elem_size, ps_tmp[num].elem_size, \
- size);
-
-#define PS_VLC_ROW(name) \
- { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) }
-
-static av_cold void ps_init_common(void)
-{
- // Syntax initialization
- static const struct {
- const void *ps_codes, *ps_bits;
- const unsigned int table_size, elem_size;
- } ps_tmp[] = {
- PS_VLC_ROW(huff_iid_df1),
- PS_VLC_ROW(huff_iid_dt1),
- PS_VLC_ROW(huff_iid_df0),
- PS_VLC_ROW(huff_iid_dt0),
- PS_VLC_ROW(huff_icc_df),
- PS_VLC_ROW(huff_icc_dt),
- PS_VLC_ROW(huff_ipd_df),
- PS_VLC_ROW(huff_ipd_dt),
- PS_VLC_ROW(huff_opd_df),
- PS_VLC_ROW(huff_opd_dt),
- };
-
- PS_INIT_VLC_STATIC(0, 9, 1544);
- PS_INIT_VLC_STATIC(1, 9, 832);
- PS_INIT_VLC_STATIC(2, 9, 1024);
- PS_INIT_VLC_STATIC(3, 9, 1036);
- PS_INIT_VLC_STATIC(4, 9, 544);
- PS_INIT_VLC_STATIC(5, 9, 544);
- PS_INIT_VLC_STATIC(6, 5, 32);
- PS_INIT_VLC_STATIC(7, 5, 32);
- PS_INIT_VLC_STATIC(8, 5, 32);
- PS_INIT_VLC_STATIC(9, 5, 32);
-}
-
-av_cold void ff_ps_init_common(void)
-{
- static AVOnce init_static_once = AV_ONCE_INIT;
- ff_thread_once(&init_static_once, ps_init_common);
-}
diff --git a/libavcodec/aacps_fixed_tablegen.h b/libavcodec/aacps_fixed_tablegen.h
index 8fb1da5..8b82deb 100644
--- a/libavcodec/aacps_fixed_tablegen.h
+++ b/libavcodec/aacps_fixed_tablegen.h
@@ -36,12 +36,7 @@
#else
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
-#ifdef BUILD_TABLES
-#undef DECLARE_ALIGNED
-#define DECLARE_ALIGNED(align, type, variable) type variable
-#else
-#include "libavutil/mem_internal.h"
-#endif
+#include "libavutil/mem.h"
#include "aac_defines.h"
#include "libavutil/softfloat.h"
diff --git a/libavcodec/aacps_tablegen_template.c b/libavcodec/aacps_tablegen_template.c
index e70edf8..341bd44 100644
--- a/libavcodec/aacps_tablegen_template.c
+++ b/libavcodec/aacps_tablegen_template.c
@@ -21,7 +21,6 @@
*/
#include <stdlib.h>
-#define BUILD_TABLES
#define CONFIG_HARDCODED_TABLES 0
#include "aac_defines.h"
diff --git a/libavcodec/aacpsdata.c b/libavcodec/aacpsdata.c
index 7a1f490..5c1a1b0 100644
--- a/libavcodec/aacpsdata.c
+++ b/libavcodec/aacpsdata.c
@@ -142,17 +142,22 @@
};
///Table 8.48
-const int8_t ff_k_to_i_20[] = {
+static const int8_t k_to_i_20[] = {
1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15,
15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
};
///Table 8.49
-const int8_t ff_k_to_i_34[] = {
+static const int8_t k_to_i_34[] = {
0, 1, 2, 3, 4, 5, 6, 6, 7, 2, 1, 0, 10, 10, 4, 5, 6, 7, 8,
9, 10, 11, 12, 9, 14, 11, 12, 13, 14, 15, 16, 13, 16, 17, 18, 19, 20, 21,
22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29,
30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33
};
+
+static const INTFLOAT g1_Q2[] = {
+ Q31(0.0f), Q31(0.01899487526049f), Q31(0.0f), Q31(-0.07293139167538f),
+ Q31(0.0f), Q31(0.30596630545168f), Q31(0.5f)
+};
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c
index b74cd82..1d2a8d4 100644
--- a/libavcodec/aacsbr.c
+++ b/libavcodec/aacsbr.c
@@ -31,6 +31,7 @@
#include "sbr.h"
#include "aacsbr.h"
#include "aacsbrdata.h"
+#include "aacsbr_tablegen.h"
#include "fft.h"
#include "internal.h"
#include "aacps.h"
@@ -38,7 +39,6 @@
#include "libavutil/internal.h"
#include "libavutil/libm.h"
#include "libavutil/avassert.h"
-#include "libavutil/mem_internal.h"
#include <stdint.h>
#include <float.h>
diff --git a/libavcodec/aacsbr_fixed.c b/libavcodec/aacsbr_fixed.c
index ffa63f2..59cbba1 100644
--- a/libavcodec/aacsbr_fixed.c
+++ b/libavcodec/aacsbr_fixed.c
@@ -60,6 +60,7 @@
#include "sbr.h"
#include "aacsbr.h"
#include "aacsbrdata.h"
+#include "aacsbr_fixed_tablegen.h"
#include "fft.h"
#include "aacps.h"
#include "sbrdsp.h"
diff --git a/libavcodec/ttmlenc.h b/libavcodec/aacsbr_fixed_tablegen.h
similarity index 72%
rename from libavcodec/ttmlenc.h
rename to libavcodec/aacsbr_fixed_tablegen.h
index c1dd5ec..3fcf020 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/aacsbr_fixed_tablegen.h
@@ -1,6 +1,7 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
+ * Header file for hardcoded AAC SBR windows
+ *
+ * Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
*
* This file is part of FFmpeg.
*
@@ -19,10 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
+#ifndef AVCODEC_AACSBR_FIXED_TABLEGEN_H
+#define AVCODEC_AACSBR_FIXED_TABLEGEN_H
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
+#include "aacsbr_tablegen_common.h"
-#endif /* AVCODEC_TTMLENC_H */
+#endif /* AVCODEC_AACSBR_FIXED_TABLEGEN_H */
diff --git a/libavcodec/ttmlenc.h b/libavcodec/aacsbr_tablegen.h
similarity index 72%
copy from libavcodec/ttmlenc.h
copy to libavcodec/aacsbr_tablegen.h
index c1dd5ec..242a963 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/aacsbr_tablegen.h
@@ -1,6 +1,7 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
+ * Header file for hardcoded AAC SBR windows
+ *
+ * Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
*
* This file is part of FFmpeg.
*
@@ -19,10 +20,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
+#ifndef AVCODEC_AACSBR_TABLEGEN_H
+#define AVCODEC_AACSBR_TABLEGEN_H
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
+#include "aacsbr_tablegen_common.h"
-#endif /* AVCODEC_TTMLENC_H */
+#endif /* AVCODEC_AACSBR_TABLEGEN_H */
diff --git a/libavcodec/aacsbr_tablegen_common.h b/libavcodec/aacsbr_tablegen_common.h
new file mode 100644
index 0000000..8e0dd9e
--- /dev/null
+++ b/libavcodec/aacsbr_tablegen_common.h
@@ -0,0 +1,114 @@
+/*
+ * Header file for hardcoded AAC SBR windows
+ *
+ * Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
+ *
+ * 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 AVCODEC_AACSBR_TABLEGEN_COMMON_H
+#define AVCODEC_AACSBR_TABLEGEN_COMMON_H
+#include "aac_defines.h"
+#include "libavutil/mem.h"
+
+///< window coefficients for analysis/synthesis QMF banks
+static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320];
+static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_us)[640] = {
+ Q31( 0.0000000000f), Q31(-0.0005525286f), Q31(-0.0005617692f), Q31(-0.0004947518f),
+ Q31(-0.0004875227f), Q31(-0.0004893791f), Q31(-0.0005040714f), Q31(-0.0005226564f),
+ Q31(-0.0005466565f), Q31(-0.0005677802f), Q31(-0.0005870930f), Q31(-0.0006132747f),
+ Q31(-0.0006312493f), Q31(-0.0006540333f), Q31(-0.0006777690f), Q31(-0.0006941614f),
+ Q31(-0.0007157736f), Q31(-0.0007255043f), Q31(-0.0007440941f), Q31(-0.0007490598f),
+ Q31(-0.0007681371f), Q31(-0.0007724848f), Q31(-0.0007834332f), Q31(-0.0007779869f),
+ Q31(-0.0007803664f), Q31(-0.0007801449f), Q31(-0.0007757977f), Q31(-0.0007630793f),
+ Q31(-0.0007530001f), Q31(-0.0007319357f), Q31(-0.0007215391f), Q31(-0.0006917937f),
+ Q31(-0.0006650415f), Q31(-0.0006341594f), Q31(-0.0005946118f), Q31(-0.0005564576f),
+ Q31(-0.0005145572f), Q31(-0.0004606325f), Q31(-0.0004095121f), Q31(-0.0003501175f),
+ Q31(-0.0002896981f), Q31(-0.0002098337f), Q31(-0.0001446380f), Q31(-0.0000617334f),
+ Q31( 0.0000134949f), Q31( 0.0001094383f), Q31( 0.0002043017f), Q31( 0.0002949531f),
+ Q31( 0.0004026540f), Q31( 0.0005107388f), Q31( 0.0006239376f), Q31( 0.0007458025f),
+ Q31( 0.0008608443f), Q31( 0.0009885988f), Q31( 0.0011250155f), Q31( 0.0012577884f),
+ Q31( 0.0013902494f), Q31( 0.0015443219f), Q31( 0.0016868083f), Q31( 0.0018348265f),
+ Q31( 0.0019841140f), Q31( 0.0021461583f), Q31( 0.0023017254f), Q31( 0.0024625616f),
+ Q31( 0.0026201758f), Q31( 0.0027870464f), Q31( 0.0029469447f), Q31( 0.0031125420f),
+ Q31( 0.0032739613f), Q31( 0.0034418874f), Q31( 0.0036008268f), Q31( 0.0037603922f),
+ Q31( 0.0039207432f), Q31( 0.0040819753f), Q31( 0.0042264269f), Q31( 0.0043730719f),
+ Q31( 0.0045209852f), Q31( 0.0046606460f), Q31( 0.0047932560f), Q31( 0.0049137603f),
+ Q31( 0.0050393022f), Q31( 0.0051407353f), Q31( 0.0052461166f), Q31( 0.0053471681f),
+ Q31( 0.0054196775f), Q31( 0.0054876040f), Q31( 0.0055475714f), Q31( 0.0055938023f),
+ Q31( 0.0056220643f), Q31( 0.0056455196f), Q31( 0.0056389199f), Q31( 0.0056266114f),
+ Q31( 0.0055917128f), Q31( 0.0055404363f), Q31( 0.0054753783f), Q31( 0.0053838975f),
+ Q31( 0.0052715758f), Q31( 0.0051382275f), Q31( 0.0049839687f), Q31( 0.0048109469f),
+ Q31( 0.0046039530f), Q31( 0.0043801861f), Q31( 0.0041251642f), Q31( 0.0038456408f),
+ Q31( 0.0035401246f), Q31( 0.0032091885f), Q31( 0.0028446757f), Q31( 0.0024508540f),
+ Q31( 0.0020274176f), Q31( 0.0015784682f), Q31( 0.0010902329f), Q31( 0.0005832264f),
+ Q31( 0.0000276045f), Q31(-0.0005464280f), Q31(-0.0011568135f), Q31(-0.0018039472f),
+ Q31(-0.0024826723f), Q31(-0.0031933778f), Q31(-0.0039401124f), Q31(-0.0047222596f),
+ Q31(-0.0055337211f), Q31(-0.0063792293f), Q31(-0.0072615816f), Q31(-0.0081798233f),
+ Q31(-0.0091325329f), Q31(-0.0101150215f), Q31(-0.0111315548f), Q31(-0.0121849995f),
+ Q31( 0.0132718220f), Q31( 0.0143904666f), Q31( 0.0155405553f), Q31( 0.0167324712f),
+ Q31( 0.0179433381f), Q31( 0.0191872431f), Q31( 0.0204531793f), Q31( 0.0217467550f),
+ Q31( 0.0230680169f), Q31( 0.0244160992f), Q31( 0.0257875847f), Q31( 0.0271859429f),
+ Q31( 0.0286072173f), Q31( 0.0300502657f), Q31( 0.0315017608f), Q31( 0.0329754081f),
+ Q31( 0.0344620948f), Q31( 0.0359697560f), Q31( 0.0374812850f), Q31( 0.0390053679f),
+ Q31( 0.0405349170f), Q31( 0.0420649094f), Q31( 0.0436097542f), Q31( 0.0451488405f),
+ Q31( 0.0466843027f), Q31( 0.0482165720f), Q31( 0.0497385755f), Q31( 0.0512556155f),
+ Q31( 0.0527630746f), Q31( 0.0542452768f), Q31( 0.0557173648f), Q31( 0.0571616450f),
+ Q31( 0.0585915683f), Q31( 0.0599837480f), Q31( 0.0613455171f), Q31( 0.0626857808f),
+ Q31( 0.0639715898f), Q31( 0.0652247106f), Q31( 0.0664367512f), Q31( 0.0676075985f),
+ Q31( 0.0687043828f), Q31( 0.0697630244f), Q31( 0.0707628710f), Q31( 0.0717002673f),
+ Q31( 0.0725682583f), Q31( 0.0733620255f), Q31( 0.0741003642f), Q31( 0.0747452558f),
+ Q31( 0.0753137336f), Q31( 0.0758008358f), Q31( 0.0761992479f), Q31( 0.0764992170f),
+ Q31( 0.0767093490f), Q31( 0.0768173975f), Q31( 0.0768230011f), Q31( 0.0767204924f),
+ Q31( 0.0765050718f), Q31( 0.0761748321f), Q31( 0.0757305756f), Q31( 0.0751576255f),
+ Q31( 0.0744664394f), Q31( 0.0736406005f), Q31( 0.0726774642f), Q31( 0.0715826364f),
+ Q31( 0.0703533073f), Q31( 0.0689664013f), Q31( 0.0674525021f), Q31( 0.0657690668f),
+ Q31( 0.0639444805f), Q31( 0.0619602779f), Q31( 0.0598166570f), Q31( 0.0575152691f),
+ Q31( 0.0550460034f), Q31( 0.0524093821f), Q31( 0.0495978676f), Q31( 0.0466303305f),
+ Q31( 0.0434768782f), Q31( 0.0401458278f), Q31( 0.0366418116f), Q31( 0.0329583930f),
+ Q31( 0.0290824006f), Q31( 0.0250307561f), Q31( 0.0207997072f), Q31( 0.0163701258f),
+ Q31( 0.0117623832f), Q31( 0.0069636862f), Q31( 0.0019765601f), Q31(-0.0032086896f),
+ Q31(-0.0085711749f), Q31(-0.0141288827f), Q31(-0.0198834129f), Q31(-0.0258227288f),
+ Q31(-0.0319531274f), Q31(-0.0382776572f), Q31(-0.0447806821f), Q31(-0.0514804176f),
+ Q31(-0.0583705326f), Q31(-0.0654409853f), Q31(-0.0726943300f), Q31(-0.0801372934f),
+ Q31(-0.0877547536f), Q31(-0.0955533352f), Q31(-0.1035329531f), Q31(-0.1116826931f),
+ Q31(-0.1200077984f), Q31(-0.1285002850f), Q31(-0.1371551761f), Q31(-0.1459766491f),
+ Q31(-0.1549607071f), Q31(-0.1640958855f), Q31(-0.1733808172f), Q31(-0.1828172548f),
+ Q31(-0.1923966745f), Q31(-0.2021250176f), Q31(-0.2119735853f), Q31(-0.2219652696f),
+ Q31(-0.2320690870f), Q31(-0.2423016884f), Q31(-0.2526480309f), Q31(-0.2631053299f),
+ Q31(-0.2736634040f), Q31(-0.2843214189f), Q31(-0.2950716717f), Q31(-0.3059098575f),
+ Q31(-0.3168278913f), Q31(-0.3278113727f), Q31(-0.3388722693f), Q31(-0.3499914122f),
+ Q31( 0.3611589903f), Q31( 0.3723795546f), Q31( 0.3836350013f), Q31( 0.3949211761f),
+ Q31( 0.4062317676f), Q31( 0.4175696896f), Q31( 0.4289119920f), Q31( 0.4402553754f),
+ Q31( 0.4515996535f), Q31( 0.4629308085f), Q31( 0.4742453214f), Q31( 0.4855253091f),
+ Q31( 0.4967708254f), Q31( 0.5079817500f), Q31( 0.5191234970f), Q31( 0.5302240895f),
+ Q31( 0.5412553448f), Q31( 0.5522051258f), Q31( 0.5630789140f), Q31( 0.5738524131f),
+ Q31( 0.5845403235f), Q31( 0.5951123086f), Q31( 0.6055783538f), Q31( 0.6159109932f),
+ Q31( 0.6261242695f), Q31( 0.6361980107f), Q31( 0.6461269695f), Q31( 0.6559016302f),
+ Q31( 0.6655139880f), Q31( 0.6749663190f), Q31( 0.6842353293f), Q31( 0.6933282376f),
+ Q31( 0.7022388719f), Q31( 0.7109410426f), Q31( 0.7194462634f), Q31( 0.7277448900f),
+ Q31( 0.7358211758f), Q31( 0.7436827863f), Q31( 0.7513137456f), Q31( 0.7587080760f),
+ Q31( 0.7658674865f), Q31( 0.7727780881f), Q31( 0.7794287519f), Q31( 0.7858353120f),
+ Q31( 0.7919735841f), Q31( 0.7978466413f), Q31( 0.8034485751f), Q31( 0.8087695004f),
+ Q31( 0.8138191270f), Q31( 0.8185776004f), Q31( 0.8230419890f), Q31( 0.8272275347f),
+ Q31( 0.8311038457f), Q31( 0.8346937361f), Q31( 0.8379717337f), Q31( 0.8409541392f),
+ Q31( 0.8436238281f), Q31( 0.8459818469f), Q31( 0.8480315777f), Q31( 0.8497805198f),
+ Q31( 0.8511971524f), Q31( 0.8523047035f), Q31( 0.8531020949f), Q31( 0.8535720573f),
+ Q31( 0.8537385600f),
+};
+
+#endif /* AVCODEC_AACSBR_TABLEGEN_COMMON_H */
diff --git a/libavcodec/aacsbr_template.c b/libavcodec/aacsbr_template.c
index 774f12e..821615f 100644
--- a/libavcodec/aacsbr_template.c
+++ b/libavcodec/aacsbr_template.c
@@ -37,6 +37,10 @@
static av_cold void aacsbr_tableinit(void)
{
int n;
+ for (n = 1; n < 320; n++)
+ sbr_qmf_window_us[320 + n] = sbr_qmf_window_us[320 - n];
+ sbr_qmf_window_us[384] = -sbr_qmf_window_us[384];
+ sbr_qmf_window_us[512] = -sbr_qmf_window_us[512];
for (n = 0; n < 320; n++)
sbr_qmf_window_ds[n] = sbr_qmf_window_us[2*n];
@@ -953,7 +957,7 @@
skip_bits_long(gb, *num_bits_left); // bs_fill_bits
*num_bits_left = 0;
} else {
- *num_bits_left -= ff_ps_read_data(ac->avctx, gb, &sbr->ps.common, *num_bits_left);
+ *num_bits_left -= AAC_RENAME(ff_ps_read_data)(ac->avctx, gb, &sbr->ps, *num_bits_left);
ac->avctx->profile = FF_PROFILE_AAC_HE_V2;
}
break;
@@ -1544,7 +1548,7 @@
}
if (ac->oc[1].m4ac.ps == 1) {
- if (sbr->ps.common.start) {
+ if (sbr->ps.start) {
AAC_RENAME(ff_ps_apply)(ac->avctx, &sbr->ps, sbr->X[0], sbr->X[1], sbr->kx[1] + sbr->m[1]);
} else {
memcpy(sbr->X[1], sbr->X[0], sizeof(sbr->X[0]));
diff --git a/libavcodec/aacsbrdata.h b/libavcodec/aacsbrdata.h
index 7a11594..4ff8fae 100644
--- a/libavcodec/aacsbrdata.h
+++ b/libavcodec/aacsbrdata.h
@@ -29,7 +29,7 @@
#define AVCODEC_AACSBRDATA_H
#include <stdint.h>
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "aac_defines.h"
///< Huffman tables for SBR
@@ -532,171 +532,4 @@
{Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)},
};
-///< window coefficients for analysis/synthesis QMF banks
-static DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_ds)[320];
-/* This table contains redundancy: It is symmetric about the entry #320
- * with the exception of entries 384 and 512 which are negated. */
-static const DECLARE_ALIGNED(32, INTFLOAT, sbr_qmf_window_us)[640] = {
- Q31( 0.0000000000f), Q31(-0.0005525286f), Q31(-0.0005617692f), Q31(-0.0004947518f),
- Q31(-0.0004875227f), Q31(-0.0004893791f), Q31(-0.0005040714f), Q31(-0.0005226564f),
- Q31(-0.0005466565f), Q31(-0.0005677802f), Q31(-0.0005870930f), Q31(-0.0006132747f),
- Q31(-0.0006312493f), Q31(-0.0006540333f), Q31(-0.0006777690f), Q31(-0.0006941614f),
- Q31(-0.0007157736f), Q31(-0.0007255043f), Q31(-0.0007440941f), Q31(-0.0007490598f),
- Q31(-0.0007681371f), Q31(-0.0007724848f), Q31(-0.0007834332f), Q31(-0.0007779869f),
- Q31(-0.0007803664f), Q31(-0.0007801449f), Q31(-0.0007757977f), Q31(-0.0007630793f),
- Q31(-0.0007530001f), Q31(-0.0007319357f), Q31(-0.0007215391f), Q31(-0.0006917937f),
- Q31(-0.0006650415f), Q31(-0.0006341594f), Q31(-0.0005946118f), Q31(-0.0005564576f),
- Q31(-0.0005145572f), Q31(-0.0004606325f), Q31(-0.0004095121f), Q31(-0.0003501175f),
- Q31(-0.0002896981f), Q31(-0.0002098337f), Q31(-0.0001446380f), Q31(-0.0000617334f),
- Q31( 0.0000134949f), Q31( 0.0001094383f), Q31( 0.0002043017f), Q31( 0.0002949531f),
- Q31( 0.0004026540f), Q31( 0.0005107388f), Q31( 0.0006239376f), Q31( 0.0007458025f),
- Q31( 0.0008608443f), Q31( 0.0009885988f), Q31( 0.0011250155f), Q31( 0.0012577884f),
- Q31( 0.0013902494f), Q31( 0.0015443219f), Q31( 0.0016868083f), Q31( 0.0018348265f),
- Q31( 0.0019841140f), Q31( 0.0021461583f), Q31( 0.0023017254f), Q31( 0.0024625616f),
- Q31( 0.0026201758f), Q31( 0.0027870464f), Q31( 0.0029469447f), Q31( 0.0031125420f),
- Q31( 0.0032739613f), Q31( 0.0034418874f), Q31( 0.0036008268f), Q31( 0.0037603922f),
- Q31( 0.0039207432f), Q31( 0.0040819753f), Q31( 0.0042264269f), Q31( 0.0043730719f),
- Q31( 0.0045209852f), Q31( 0.0046606460f), Q31( 0.0047932560f), Q31( 0.0049137603f),
- Q31( 0.0050393022f), Q31( 0.0051407353f), Q31( 0.0052461166f), Q31( 0.0053471681f),
- Q31( 0.0054196775f), Q31( 0.0054876040f), Q31( 0.0055475714f), Q31( 0.0055938023f),
- Q31( 0.0056220643f), Q31( 0.0056455196f), Q31( 0.0056389199f), Q31( 0.0056266114f),
- Q31( 0.0055917128f), Q31( 0.0055404363f), Q31( 0.0054753783f), Q31( 0.0053838975f),
- Q31( 0.0052715758f), Q31( 0.0051382275f), Q31( 0.0049839687f), Q31( 0.0048109469f),
- Q31( 0.0046039530f), Q31( 0.0043801861f), Q31( 0.0041251642f), Q31( 0.0038456408f),
- Q31( 0.0035401246f), Q31( 0.0032091885f), Q31( 0.0028446757f), Q31( 0.0024508540f),
- Q31( 0.0020274176f), Q31( 0.0015784682f), Q31( 0.0010902329f), Q31( 0.0005832264f),
- Q31( 0.0000276045f), Q31(-0.0005464280f), Q31(-0.0011568135f), Q31(-0.0018039472f),
- Q31(-0.0024826723f), Q31(-0.0031933778f), Q31(-0.0039401124f), Q31(-0.0047222596f),
- Q31(-0.0055337211f), Q31(-0.0063792293f), Q31(-0.0072615816f), Q31(-0.0081798233f),
- Q31(-0.0091325329f), Q31(-0.0101150215f), Q31(-0.0111315548f), Q31(-0.0121849995f),
- Q31( 0.0132718220f), Q31( 0.0143904666f), Q31( 0.0155405553f), Q31( 0.0167324712f),
- Q31( 0.0179433381f), Q31( 0.0191872431f), Q31( 0.0204531793f), Q31( 0.0217467550f),
- Q31( 0.0230680169f), Q31( 0.0244160992f), Q31( 0.0257875847f), Q31( 0.0271859429f),
- Q31( 0.0286072173f), Q31( 0.0300502657f), Q31( 0.0315017608f), Q31( 0.0329754081f),
- Q31( 0.0344620948f), Q31( 0.0359697560f), Q31( 0.0374812850f), Q31( 0.0390053679f),
- Q31( 0.0405349170f), Q31( 0.0420649094f), Q31( 0.0436097542f), Q31( 0.0451488405f),
- Q31( 0.0466843027f), Q31( 0.0482165720f), Q31( 0.0497385755f), Q31( 0.0512556155f),
- Q31( 0.0527630746f), Q31( 0.0542452768f), Q31( 0.0557173648f), Q31( 0.0571616450f),
- Q31( 0.0585915683f), Q31( 0.0599837480f), Q31( 0.0613455171f), Q31( 0.0626857808f),
- Q31( 0.0639715898f), Q31( 0.0652247106f), Q31( 0.0664367512f), Q31( 0.0676075985f),
- Q31( 0.0687043828f), Q31( 0.0697630244f), Q31( 0.0707628710f), Q31( 0.0717002673f),
- Q31( 0.0725682583f), Q31( 0.0733620255f), Q31( 0.0741003642f), Q31( 0.0747452558f),
- Q31( 0.0753137336f), Q31( 0.0758008358f), Q31( 0.0761992479f), Q31( 0.0764992170f),
- Q31( 0.0767093490f), Q31( 0.0768173975f), Q31( 0.0768230011f), Q31( 0.0767204924f),
- Q31( 0.0765050718f), Q31( 0.0761748321f), Q31( 0.0757305756f), Q31( 0.0751576255f),
- Q31( 0.0744664394f), Q31( 0.0736406005f), Q31( 0.0726774642f), Q31( 0.0715826364f),
- Q31( 0.0703533073f), Q31( 0.0689664013f), Q31( 0.0674525021f), Q31( 0.0657690668f),
- Q31( 0.0639444805f), Q31( 0.0619602779f), Q31( 0.0598166570f), Q31( 0.0575152691f),
- Q31( 0.0550460034f), Q31( 0.0524093821f), Q31( 0.0495978676f), Q31( 0.0466303305f),
- Q31( 0.0434768782f), Q31( 0.0401458278f), Q31( 0.0366418116f), Q31( 0.0329583930f),
- Q31( 0.0290824006f), Q31( 0.0250307561f), Q31( 0.0207997072f), Q31( 0.0163701258f),
- Q31( 0.0117623832f), Q31( 0.0069636862f), Q31( 0.0019765601f), Q31(-0.0032086896f),
- Q31(-0.0085711749f), Q31(-0.0141288827f), Q31(-0.0198834129f), Q31(-0.0258227288f),
- Q31(-0.0319531274f), Q31(-0.0382776572f), Q31(-0.0447806821f), Q31(-0.0514804176f),
- Q31(-0.0583705326f), Q31(-0.0654409853f), Q31(-0.0726943300f), Q31(-0.0801372934f),
- Q31(-0.0877547536f), Q31(-0.0955533352f), Q31(-0.1035329531f), Q31(-0.1116826931f),
- Q31(-0.1200077984f), Q31(-0.1285002850f), Q31(-0.1371551761f), Q31(-0.1459766491f),
- Q31(-0.1549607071f), Q31(-0.1640958855f), Q31(-0.1733808172f), Q31(-0.1828172548f),
- Q31(-0.1923966745f), Q31(-0.2021250176f), Q31(-0.2119735853f), Q31(-0.2219652696f),
- Q31(-0.2320690870f), Q31(-0.2423016884f), Q31(-0.2526480309f), Q31(-0.2631053299f),
- Q31(-0.2736634040f), Q31(-0.2843214189f), Q31(-0.2950716717f), Q31(-0.3059098575f),
- Q31(-0.3168278913f), Q31(-0.3278113727f), Q31(-0.3388722693f), Q31(-0.3499914122f),
- Q31( 0.3611589903f), Q31( 0.3723795546f), Q31( 0.3836350013f), Q31( 0.3949211761f),
- Q31( 0.4062317676f), Q31( 0.4175696896f), Q31( 0.4289119920f), Q31( 0.4402553754f),
- Q31( 0.4515996535f), Q31( 0.4629308085f), Q31( 0.4742453214f), Q31( 0.4855253091f),
- Q31( 0.4967708254f), Q31( 0.5079817500f), Q31( 0.5191234970f), Q31( 0.5302240895f),
- Q31( 0.5412553448f), Q31( 0.5522051258f), Q31( 0.5630789140f), Q31( 0.5738524131f),
- Q31( 0.5845403235f), Q31( 0.5951123086f), Q31( 0.6055783538f), Q31( 0.6159109932f),
- Q31( 0.6261242695f), Q31( 0.6361980107f), Q31( 0.6461269695f), Q31( 0.6559016302f),
- Q31( 0.6655139880f), Q31( 0.6749663190f), Q31( 0.6842353293f), Q31( 0.6933282376f),
- Q31( 0.7022388719f), Q31( 0.7109410426f), Q31( 0.7194462634f), Q31( 0.7277448900f),
- Q31( 0.7358211758f), Q31( 0.7436827863f), Q31( 0.7513137456f), Q31( 0.7587080760f),
- Q31( 0.7658674865f), Q31( 0.7727780881f), Q31( 0.7794287519f), Q31( 0.7858353120f),
- Q31( 0.7919735841f), Q31( 0.7978466413f), Q31( 0.8034485751f), Q31( 0.8087695004f),
- Q31( 0.8138191270f), Q31( 0.8185776004f), Q31( 0.8230419890f), Q31( 0.8272275347f),
- Q31( 0.8311038457f), Q31( 0.8346937361f), Q31( 0.8379717337f), Q31( 0.8409541392f),
- Q31( 0.8436238281f), Q31( 0.8459818469f), Q31( 0.8480315777f), Q31( 0.8497805198f),
- Q31( 0.8511971524f), Q31( 0.8523047035f), Q31( 0.8531020949f), Q31( 0.8535720573f),
- Q31( 0.8537385600f), Q31( 0.8535720573f), Q31( 0.8531020949f), Q31( 0.8523047035f),
- Q31( 0.8511971524f), Q31( 0.8497805198f), Q31( 0.8480315777f), Q31( 0.8459818469f),
- Q31( 0.8436238281f), Q31( 0.8409541392f), Q31( 0.8379717337f), Q31( 0.8346937361f),
- Q31( 0.8311038457f), Q31( 0.8272275347f), Q31( 0.8230419890f), Q31( 0.8185776004f),
- Q31( 0.8138191270f), Q31( 0.8087695004f), Q31( 0.8034485751f), Q31( 0.7978466413f),
- Q31( 0.7919735841f), Q31( 0.7858353120f), Q31( 0.7794287519f), Q31( 0.7727780881f),
- Q31( 0.7658674865f), Q31( 0.7587080760f), Q31( 0.7513137456f), Q31( 0.7436827863f),
- Q31( 0.7358211758f), Q31( 0.7277448900f), Q31( 0.7194462634f), Q31( 0.7109410426f),
- Q31( 0.7022388719f), Q31( 0.6933282376f), Q31( 0.6842353293f), Q31( 0.6749663190f),
- Q31( 0.6655139880f), Q31( 0.6559016302f), Q31( 0.6461269695f), Q31( 0.6361980107f),
- Q31( 0.6261242695f), Q31( 0.6159109932f), Q31( 0.6055783538f), Q31( 0.5951123086f),
- Q31( 0.5845403235f), Q31( 0.5738524131f), Q31( 0.5630789140f), Q31( 0.5522051258f),
- Q31( 0.5412553448f), Q31( 0.5302240895f), Q31( 0.5191234970f), Q31( 0.5079817500f),
- Q31( 0.4967708254f), Q31( 0.4855253091f), Q31( 0.4742453214f), Q31( 0.4629308085f),
- Q31( 0.4515996535f), Q31( 0.4402553754f), Q31( 0.4289119920f), Q31( 0.4175696896f),
- Q31( 0.4062317676f), Q31( 0.3949211761f), Q31( 0.3836350013f), Q31( 0.3723795546f),
- -Q31( 0.3611589903f), Q31(-0.3499914122f), Q31(-0.3388722693f), Q31(-0.3278113727f),
- Q31(-0.3168278913f), Q31(-0.3059098575f), Q31(-0.2950716717f), Q31(-0.2843214189f),
- Q31(-0.2736634040f), Q31(-0.2631053299f), Q31(-0.2526480309f), Q31(-0.2423016884f),
- Q31(-0.2320690870f), Q31(-0.2219652696f), Q31(-0.2119735853f), Q31(-0.2021250176f),
- Q31(-0.1923966745f), Q31(-0.1828172548f), Q31(-0.1733808172f), Q31(-0.1640958855f),
- Q31(-0.1549607071f), Q31(-0.1459766491f), Q31(-0.1371551761f), Q31(-0.1285002850f),
- Q31(-0.1200077984f), Q31(-0.1116826931f), Q31(-0.1035329531f), Q31(-0.0955533352f),
- Q31(-0.0877547536f), Q31(-0.0801372934f), Q31(-0.0726943300f), Q31(-0.0654409853f),
- Q31(-0.0583705326f), Q31(-0.0514804176f), Q31(-0.0447806821f), Q31(-0.0382776572f),
- Q31(-0.0319531274f), Q31(-0.0258227288f), Q31(-0.0198834129f), Q31(-0.0141288827f),
- Q31(-0.0085711749f), Q31(-0.0032086896f), Q31( 0.0019765601f), Q31( 0.0069636862f),
- Q31( 0.0117623832f), Q31( 0.0163701258f), Q31( 0.0207997072f), Q31( 0.0250307561f),
- Q31( 0.0290824006f), Q31( 0.0329583930f), Q31( 0.0366418116f), Q31( 0.0401458278f),
- Q31( 0.0434768782f), Q31( 0.0466303305f), Q31( 0.0495978676f), Q31( 0.0524093821f),
- Q31( 0.0550460034f), Q31( 0.0575152691f), Q31( 0.0598166570f), Q31( 0.0619602779f),
- Q31( 0.0639444805f), Q31( 0.0657690668f), Q31( 0.0674525021f), Q31( 0.0689664013f),
- Q31( 0.0703533073f), Q31( 0.0715826364f), Q31( 0.0726774642f), Q31( 0.0736406005f),
- Q31( 0.0744664394f), Q31( 0.0751576255f), Q31( 0.0757305756f), Q31( 0.0761748321f),
- Q31( 0.0765050718f), Q31( 0.0767204924f), Q31( 0.0768230011f), Q31( 0.0768173975f),
- Q31( 0.0767093490f), Q31( 0.0764992170f), Q31( 0.0761992479f), Q31( 0.0758008358f),
- Q31( 0.0753137336f), Q31( 0.0747452558f), Q31( 0.0741003642f), Q31( 0.0733620255f),
- Q31( 0.0725682583f), Q31( 0.0717002673f), Q31( 0.0707628710f), Q31( 0.0697630244f),
- Q31( 0.0687043828f), Q31( 0.0676075985f), Q31( 0.0664367512f), Q31( 0.0652247106f),
- Q31( 0.0639715898f), Q31( 0.0626857808f), Q31( 0.0613455171f), Q31( 0.0599837480f),
- Q31( 0.0585915683f), Q31( 0.0571616450f), Q31( 0.0557173648f), Q31( 0.0542452768f),
- Q31( 0.0527630746f), Q31( 0.0512556155f), Q31( 0.0497385755f), Q31( 0.0482165720f),
- Q31( 0.0466843027f), Q31( 0.0451488405f), Q31( 0.0436097542f), Q31( 0.0420649094f),
- Q31( 0.0405349170f), Q31( 0.0390053679f), Q31( 0.0374812850f), Q31( 0.0359697560f),
- Q31( 0.0344620948f), Q31( 0.0329754081f), Q31( 0.0315017608f), Q31( 0.0300502657f),
- Q31( 0.0286072173f), Q31( 0.0271859429f), Q31( 0.0257875847f), Q31( 0.0244160992f),
- Q31( 0.0230680169f), Q31( 0.0217467550f), Q31( 0.0204531793f), Q31( 0.0191872431f),
- Q31( 0.0179433381f), Q31( 0.0167324712f), Q31( 0.0155405553f), Q31( 0.0143904666f),
- -Q31( 0.0132718220f), Q31(-0.0121849995f), Q31(-0.0111315548f), Q31(-0.0101150215f),
- Q31(-0.0091325329f), Q31(-0.0081798233f), Q31(-0.0072615816f), Q31(-0.0063792293f),
- Q31(-0.0055337211f), Q31(-0.0047222596f), Q31(-0.0039401124f), Q31(-0.0031933778f),
- Q31(-0.0024826723f), Q31(-0.0018039472f), Q31(-0.0011568135f), Q31(-0.0005464280f),
- Q31( 0.0000276045f), Q31( 0.0005832264f), Q31( 0.0010902329f), Q31( 0.0015784682f),
- Q31( 0.0020274176f), Q31( 0.0024508540f), Q31( 0.0028446757f), Q31( 0.0032091885f),
- Q31( 0.0035401246f), Q31( 0.0038456408f), Q31( 0.0041251642f), Q31( 0.0043801861f),
- Q31( 0.0046039530f), Q31( 0.0048109469f), Q31( 0.0049839687f), Q31( 0.0051382275f),
- Q31( 0.0052715758f), Q31( 0.0053838975f), Q31( 0.0054753783f), Q31( 0.0055404363f),
- Q31( 0.0055917128f), Q31( 0.0056266114f), Q31( 0.0056389199f), Q31( 0.0056455196f),
- Q31( 0.0056220643f), Q31( 0.0055938023f), Q31( 0.0055475714f), Q31( 0.0054876040f),
- Q31( 0.0054196775f), Q31( 0.0053471681f), Q31( 0.0052461166f), Q31( 0.0051407353f),
- Q31( 0.0050393022f), Q31( 0.0049137603f), Q31( 0.0047932560f), Q31( 0.0046606460f),
- Q31( 0.0045209852f), Q31( 0.0043730719f), Q31( 0.0042264269f), Q31( 0.0040819753f),
- Q31( 0.0039207432f), Q31( 0.0037603922f), Q31( 0.0036008268f), Q31( 0.0034418874f),
- Q31( 0.0032739613f), Q31( 0.0031125420f), Q31( 0.0029469447f), Q31( 0.0027870464f),
- Q31( 0.0026201758f), Q31( 0.0024625616f), Q31( 0.0023017254f), Q31( 0.0021461583f),
- Q31( 0.0019841140f), Q31( 0.0018348265f), Q31( 0.0016868083f), Q31( 0.0015443219f),
- Q31( 0.0013902494f), Q31( 0.0012577884f), Q31( 0.0011250155f), Q31( 0.0009885988f),
- Q31( 0.0008608443f), Q31( 0.0007458025f), Q31( 0.0006239376f), Q31( 0.0005107388f),
- Q31( 0.0004026540f), Q31( 0.0002949531f), Q31( 0.0002043017f), Q31( 0.0001094383f),
- Q31( 0.0000134949f), Q31(-0.0000617334f), Q31(-0.0001446380f), Q31(-0.0002098337f),
- Q31(-0.0002896981f), Q31(-0.0003501175f), Q31(-0.0004095121f), Q31(-0.0004606325f),
- Q31(-0.0005145572f), Q31(-0.0005564576f), Q31(-0.0005946118f), Q31(-0.0006341594f),
- Q31(-0.0006650415f), Q31(-0.0006917937f), Q31(-0.0007215391f), Q31(-0.0007319357f),
- Q31(-0.0007530001f), Q31(-0.0007630793f), Q31(-0.0007757977f), Q31(-0.0007801449f),
- Q31(-0.0007803664f), Q31(-0.0007779869f), Q31(-0.0007834332f), Q31(-0.0007724848f),
- Q31(-0.0007681371f), Q31(-0.0007490598f), Q31(-0.0007440941f), Q31(-0.0007255043f),
- Q31(-0.0007157736f), Q31(-0.0006941614f), Q31(-0.0006777690f), Q31(-0.0006540333f),
- Q31(-0.0006312493f), Q31(-0.0006132747f), Q31(-0.0005870930f), Q31(-0.0005677802f),
- Q31(-0.0005466565f), Q31(-0.0005226564f), Q31(-0.0005040714f), Q31(-0.0004893791f),
- Q31(-0.0004875227f), Q31(-0.0004947518f), Q31(-0.0005617692f), Q31(-0.0005525286f),
-};
-
#endif /* AVCODEC_AACSBRDATA_H */
diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c
index fa5420f..abe5fd7 100644
--- a/libavcodec/aactab.c
+++ b/libavcodec/aactab.c
@@ -29,7 +29,6 @@
#include "config.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "aac.h"
#include "aactab.h"
diff --git a/libavcodec/aactab.h b/libavcodec/aactab.h
index 9b1450c..8a354e8 100644
--- a/libavcodec/aactab.h
+++ b/libavcodec/aactab.h
@@ -30,7 +30,7 @@
#ifndef AVCODEC_AACTAB_H
#define AVCODEC_AACTAB_H
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "aac.h"
#include <stdint.h>
diff --git a/libavcodec/aarch64/Makefile b/libavcodec/aarch64/Makefile
index 954461f..f6434e4 100644
--- a/libavcodec/aarch64/Makefile
+++ b/libavcodec/aarch64/Makefile
@@ -61,6 +61,3 @@
aarch64/vp9lpf_neon.o \
aarch64/vp9mc_16bpp_neon.o \
aarch64/vp9mc_neon.o
-NEON-OBJS-$(CONFIG_HEVC_DECODER) += aarch64/hevcdsp_idct_neon.o \
- aarch64/hevcdsp_init_aarch64.o \
- aarch64/hevcdsp_sao_neon.o
diff --git a/libavcodec/aarch64/hevcdsp_idct_neon.S b/libavcodec/aarch64/hevcdsp_idct_neon.S
deleted file mode 100644
index 28c11e6..0000000
--- a/libavcodec/aarch64/hevcdsp_idct_neon.S
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- * ARM NEON optimised IDCT functions for HEVC decoding
- * Copyright (c) 2014 Seppo Tomperi <seppo.tomperi@vtt.fi>
- * Copyright (c) 2017 Alexandra Hájková
- *
- * Ported from arm/hevcdsp_idct_neon.S by
- * Copyright (c) 2020 Reimar Döffinger
- * Copyright (c) 2020 Josh Dekker
- *
- * 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
- */
-
-#include "libavutil/aarch64/asm.S"
-
-const trans, align=4
- .short 64, 83, 64, 36
- .short 89, 75, 50, 18
- .short 90, 87, 80, 70
- .short 57, 43, 25, 9
- .short 90, 90, 88, 85
- .short 82, 78, 73, 67
- .short 61, 54, 46, 38
- .short 31, 22, 13, 4
-endconst
-
-.macro clip10 in1, in2, c1, c2
- smax \in1, \in1, \c1
- smax \in2, \in2, \c1
- smin \in1, \in1, \c2
- smin \in2, \in2, \c2
-.endm
-
-function ff_hevc_add_residual_4x4_8_neon, export=1
- ld1 {v0.8h-v1.8h}, [x1]
- ld1 {v2.s}[0], [x0], x2
- ld1 {v2.s}[1], [x0], x2
- ld1 {v2.s}[2], [x0], x2
- ld1 {v2.s}[3], [x0], x2
- sub x0, x0, x2, lsl #2
- uxtl v6.8h, v2.8b
- uxtl2 v7.8h, v2.16b
- sqadd v0.8h, v0.8h, v6.8h
- sqadd v1.8h, v1.8h, v7.8h
- sqxtun v0.8b, v0.8h
- sqxtun2 v0.16b, v1.8h
- st1 {v0.s}[0], [x0], x2
- st1 {v0.s}[1], [x0], x2
- st1 {v0.s}[2], [x0], x2
- st1 {v0.s}[3], [x0], x2
- ret
-endfunc
-
-function ff_hevc_add_residual_4x4_10_neon, export=1
- mov x12, x0
- ld1 {v0.8h-v1.8h}, [x1]
- ld1 {v2.d}[0], [x12], x2
- ld1 {v2.d}[1], [x12], x2
- ld1 {v3.d}[0], [x12], x2
- sqadd v0.8h, v0.8h, v2.8h
- ld1 {v3.d}[1], [x12], x2
- movi v4.8h, #0
- sqadd v1.8h, v1.8h, v3.8h
- mvni v5.8h, #0xFC, lsl #8 // movi #0x3FF
- clip10 v0.8h, v1.8h, v4.8h, v5.8h
- st1 {v0.d}[0], [x0], x2
- st1 {v0.d}[1], [x0], x2
- st1 {v1.d}[0], [x0], x2
- st1 {v1.d}[1], [x0], x2
- ret
-endfunc
-
-function ff_hevc_add_residual_8x8_8_neon, export=1
- add x12, x0, x2
- add x2, x2, x2
- mov x3, #8
-1: subs x3, x3, #2
- ld1 {v2.d}[0], [x0]
- ld1 {v2.d}[1], [x12]
- uxtl v3.8h, v2.8b
- ld1 {v0.8h-v1.8h}, [x1], #32
- uxtl2 v2.8h, v2.16b
- sqadd v0.8h, v0.8h, v3.8h
- sqadd v1.8h, v1.8h, v2.8h
- sqxtun v0.8b, v0.8h
- sqxtun2 v0.16b, v1.8h
- st1 {v0.d}[0], [x0], x2
- st1 {v0.d}[1], [x12], x2
- bne 1b
- ret
-endfunc
-
-function ff_hevc_add_residual_8x8_10_neon, export=1
- add x12, x0, x2
- add x2, x2, x2
- mov x3, #8
- movi v4.8h, #0
- mvni v5.8h, #0xFC, lsl #8 // movi #0x3FF
-1: subs x3, x3, #2
- ld1 {v0.8h-v1.8h}, [x1], #32
- ld1 {v2.8h}, [x0]
- sqadd v0.8h, v0.8h, v2.8h
- ld1 {v3.8h}, [x12]
- sqadd v1.8h, v1.8h, v3.8h
- clip10 v0.8h, v1.8h, v4.8h, v5.8h
- st1 {v0.8h}, [x0], x2
- st1 {v1.8h}, [x12], x2
- bne 1b
- ret
-endfunc
-
-function ff_hevc_add_residual_16x16_8_neon, export=1
- mov x3, #16
- add x12, x0, x2
- add x2, x2, x2
-1: subs x3, x3, #2
- ld1 {v16.16b}, [x0]
- ld1 {v0.8h-v3.8h}, [x1], #64
- ld1 {v19.16b}, [x12]
- uxtl v17.8h, v16.8b
- uxtl2 v18.8h, v16.16b
- uxtl v20.8h, v19.8b
- uxtl2 v21.8h, v19.16b
- sqadd v0.8h, v0.8h, v17.8h
- sqadd v1.8h, v1.8h, v18.8h
- sqadd v2.8h, v2.8h, v20.8h
- sqadd v3.8h, v3.8h, v21.8h
- sqxtun v0.8b, v0.8h
- sqxtun2 v0.16b, v1.8h
- sqxtun v1.8b, v2.8h
- sqxtun2 v1.16b, v3.8h
- st1 {v0.16b}, [x0], x2
- st1 {v1.16b}, [x12], x2
- bne 1b
- ret
-endfunc
-
-function ff_hevc_add_residual_16x16_10_neon, export=1
- mov x3, #16
- movi v20.8h, #0
- mvni v21.8h, #0xFC, lsl #8 // movi #0x3FF
- add x12, x0, x2
- add x2, x2, x2
-1: subs x3, x3, #2
- ld1 {v16.8h-v17.8h}, [x0]
- ld1 {v0.8h-v3.8h}, [x1], #64
- sqadd v0.8h, v0.8h, v16.8h
- ld1 {v18.8h-v19.8h}, [x12]
- sqadd v1.8h, v1.8h, v17.8h
- sqadd v2.8h, v2.8h, v18.8h
- sqadd v3.8h, v3.8h, v19.8h
- clip10 v0.8h, v1.8h, v20.8h, v21.8h
- clip10 v2.8h, v3.8h, v20.8h, v21.8h
- st1 {v0.8h-v1.8h}, [x0], x2
- st1 {v2.8h-v3.8h}, [x12], x2
- bne 1b
- ret
-endfunc
-
-function ff_hevc_add_residual_32x32_8_neon, export=1
- add x12, x0, x2
- add x2, x2, x2
- mov x3, #32
-1: subs x3, x3, #2
- ld1 {v20.16b, v21.16b}, [x0]
- uxtl v16.8h, v20.8b
- uxtl2 v17.8h, v20.16b
- ld1 {v22.16b, v23.16b}, [x12]
- uxtl v18.8h, v21.8b
- uxtl2 v19.8h, v21.16b
- uxtl v20.8h, v22.8b
- ld1 {v0.8h-v3.8h}, [x1], #64
- ld1 {v4.8h-v7.8h}, [x1], #64
- uxtl2 v21.8h, v22.16b
- uxtl v22.8h, v23.8b
- uxtl2 v23.8h, v23.16b
- sqadd v0.8h, v0.8h, v16.8h
- sqadd v1.8h, v1.8h, v17.8h
- sqadd v2.8h, v2.8h, v18.8h
- sqadd v3.8h, v3.8h, v19.8h
- sqadd v4.8h, v4.8h, v20.8h
- sqadd v5.8h, v5.8h, v21.8h
- sqadd v6.8h, v6.8h, v22.8h
- sqadd v7.8h, v7.8h, v23.8h
- sqxtun v0.8b, v0.8h
- sqxtun2 v0.16b, v1.8h
- sqxtun v1.8b, v2.8h
- sqxtun2 v1.16b, v3.8h
- sqxtun v2.8b, v4.8h
- sqxtun2 v2.16b, v5.8h
- st1 {v0.16b, v1.16b}, [x0], x2
- sqxtun v3.8b, v6.8h
- sqxtun2 v3.16b, v7.8h
- st1 {v2.16b, v3.16b}, [x12], x2
- bne 1b
- ret
-endfunc
-
-function ff_hevc_add_residual_32x32_10_neon, export=1
- mov x3, #32
- movi v20.8h, #0
- mvni v21.8h, #0xFC, lsl #8 // movi #0x3FF
-1: subs x3, x3, #1
- ld1 {v0.8h-v3.8h}, [x1], #64
- ld1 {v16.8h-v19.8h}, [x0]
- sqadd v0.8h, v0.8h, v16.8h
- sqadd v1.8h, v1.8h, v17.8h
- sqadd v2.8h, v2.8h, v18.8h
- sqadd v3.8h, v3.8h, v19.8h
- clip10 v0.8h, v1.8h, v20.8h, v21.8h
- clip10 v2.8h, v3.8h, v20.8h, v21.8h
- st1 {v0.8h-v3.8h}, [x0], x2
- bne 1b
- ret
-endfunc
-
-.macro sum_sub out, in, c, op, p
- .ifc \op, +
- smlal\p \out, \in, \c
- .else
- smlsl\p \out, \in, \c
- .endif
-.endm
-
-.macro fixsqrshrn d, dt, n, m
- .ifc \dt, .8h
- sqrshrn2 \d\dt, \n\().4s, \m
- .else
- sqrshrn \n\().4h, \n\().4s, \m
- mov \d\().d[0], \n\().d[0]
- .endif
-.endm
-
-// uses and clobbers v28-v31 as temp registers
-.macro tr_4x4_8 in0, in1, in2, in3, out0, out1, out2, out3, p1, p2
- sshll\p1 v28.4s, \in0, #6
- mov v29.16b, v28.16b
- smull\p1 v30.4s, \in1, v0.h[1]
- smull\p1 v31.4s, \in1, v0.h[3]
- smlal\p2 v28.4s, \in2, v0.h[0] //e0
- smlsl\p2 v29.4s, \in2, v0.h[0] //e1
- smlal\p2 v30.4s, \in3, v0.h[3] //o0
- smlsl\p2 v31.4s, \in3, v0.h[1] //o1
-
- add \out0, v28.4s, v30.4s
- add \out1, v29.4s, v31.4s
- sub \out2, v29.4s, v31.4s
- sub \out3, v28.4s, v30.4s
-.endm
-
-.macro transpose8_4x4 r0, r1, r2, r3
- trn1 v2.8h, \r0\().8h, \r1\().8h
- trn2 v3.8h, \r0\().8h, \r1\().8h
- trn1 v4.8h, \r2\().8h, \r3\().8h
- trn2 v5.8h, \r2\().8h, \r3\().8h
- trn1 \r0\().4s, v2.4s, v4.4s
- trn2 \r2\().4s, v2.4s, v4.4s
- trn1 \r1\().4s, v3.4s, v5.4s
- trn2 \r3\().4s, v3.4s, v5.4s
-.endm
-
-.macro transpose_8x8 r0, r1, r2, r3, r4, r5, r6, r7
- transpose8_4x4 \r0, \r1, \r2, \r3
- transpose8_4x4 \r4, \r5, \r6, \r7
-.endm
-
-.macro tr_8x4 shift, in0,in0t, in1,in1t, in2,in2t, in3,in3t, in4,in4t, in5,in5t, in6,in6t, in7,in7t, p1, p2
- tr_4x4_8 \in0\in0t, \in2\in2t, \in4\in4t, \in6\in6t, v24.4s, v25.4s, v26.4s, v27.4s, \p1, \p2
-
- smull\p1 v30.4s, \in1\in1t, v0.h[6]
- smull\p1 v28.4s, \in1\in1t, v0.h[4]
- smull\p1 v29.4s, \in1\in1t, v0.h[5]
- sum_sub v30.4s, \in3\in3t, v0.h[4], -, \p1
- sum_sub v28.4s, \in3\in3t, v0.h[5], +, \p1
- sum_sub v29.4s, \in3\in3t, v0.h[7], -, \p1
-
- sum_sub v30.4s, \in5\in5t, v0.h[7], +, \p2
- sum_sub v28.4s, \in5\in5t, v0.h[6], +, \p2
- sum_sub v29.4s, \in5\in5t, v0.h[4], -, \p2
-
- sum_sub v30.4s, \in7\in7t, v0.h[5], +, \p2
- sum_sub v28.4s, \in7\in7t, v0.h[7], +, \p2
- sum_sub v29.4s, \in7\in7t, v0.h[6], -, \p2
-
- add v31.4s, v26.4s, v30.4s
- sub v26.4s, v26.4s, v30.4s
- fixsqrshrn \in2,\in2t, v31, \shift
-
-
- smull\p1 v31.4s, \in1\in1t, v0.h[7]
- sum_sub v31.4s, \in3\in3t, v0.h[6], -, \p1
- sum_sub v31.4s, \in5\in5t, v0.h[5], +, \p2
- sum_sub v31.4s, \in7\in7t, v0.h[4], -, \p2
- fixsqrshrn \in5,\in5t, v26, \shift
-
-
- add v26.4s, v24.4s, v28.4s
- sub v24.4s, v24.4s, v28.4s
- add v28.4s, v25.4s, v29.4s
- sub v25.4s, v25.4s, v29.4s
- add v30.4s, v27.4s, v31.4s
- sub v27.4s, v27.4s, v31.4s
-
- fixsqrshrn \in0,\in0t, v26, \shift
- fixsqrshrn \in7,\in7t, v24, \shift
- fixsqrshrn \in1,\in1t, v28, \shift
- fixsqrshrn \in6,\in6t, v25, \shift
- fixsqrshrn \in3,\in3t, v30, \shift
- fixsqrshrn \in4,\in4t, v27, \shift
-.endm
-
-.macro idct_8x8 bitdepth
-function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1
-//x0 - coeffs
- mov x1, x0
- ld1 {v16.8h-v19.8h}, [x1], #64
- ld1 {v20.8h-v23.8h}, [x1]
-
- movrel x1, trans
- ld1 {v0.8h}, [x1]
-
- tr_8x4 7, v16,.4h, v17,.4h, v18,.4h, v19,.4h, v20,.4h, v21,.4h, v22,.4h, v23,.4h
- tr_8x4 7, v16,.8h, v17,.8h, v18,.8h, v19,.8h, v20,.8h, v21,.8h, v22,.8h, v23,.8h, 2, 2
-
- transpose_8x8 v16, v17, v18, v19, v20, v21, v22, v23
-
- tr_8x4 20 - \bitdepth, v16,.4h, v17,.4h, v18,.4h, v19,.4h, v16,.8h, v17,.8h, v18,.8h, v19,.8h, , 2
- tr_8x4 20 - \bitdepth, v20,.4h, v21,.4h, v22,.4h, v23,.4h, v20,.8h, v21,.8h, v22,.8h, v23,.8h, , 2
-
- transpose_8x8 v16, v17, v18, v19, v20, v21, v22, v23
-
- mov x1, x0
- st1 {v16.8h-v19.8h}, [x1], #64
- st1 {v20.8h-v23.8h}, [x1]
-
- ret
-endfunc
-.endm
-
-.macro butterfly e, o, tmp_p, tmp_m
- add \tmp_p, \e, \o
- sub \tmp_m, \e, \o
-.endm
-
-.macro tr16_8x4 in0, in1, in2, in3, offset
- tr_4x4_8 \in0\().4h, \in1\().4h, \in2\().4h, \in3\().4h, v24.4s, v25.4s, v26.4s, v27.4s
-
- smull2 v28.4s, \in0\().8h, v0.h[4]
- smull2 v29.4s, \in0\().8h, v0.h[5]
- smull2 v30.4s, \in0\().8h, v0.h[6]
- smull2 v31.4s, \in0\().8h, v0.h[7]
- sum_sub v28.4s, \in1\().8h, v0.h[5], +, 2
- sum_sub v29.4s, \in1\().8h, v0.h[7], -, 2
- sum_sub v30.4s, \in1\().8h, v0.h[4], -, 2
- sum_sub v31.4s, \in1\().8h, v0.h[6], -, 2
-
- sum_sub v28.4s, \in2\().8h, v0.h[6], +, 2
- sum_sub v29.4s, \in2\().8h, v0.h[4], -, 2
- sum_sub v30.4s, \in2\().8h, v0.h[7], +, 2
- sum_sub v31.4s, \in2\().8h, v0.h[5], +, 2
-
- sum_sub v28.4s, \in3\().8h, v0.h[7], +, 2
- sum_sub v29.4s, \in3\().8h, v0.h[6], -, 2
- sum_sub v30.4s, \in3\().8h, v0.h[5], +, 2
- sum_sub v31.4s, \in3\().8h, v0.h[4], -, 2
-
- butterfly v24.4s, v28.4s, v16.4s, v23.4s
- butterfly v25.4s, v29.4s, v17.4s, v22.4s
- butterfly v26.4s, v30.4s, v18.4s, v21.4s
- butterfly v27.4s, v31.4s, v19.4s, v20.4s
- add x4, sp, #\offset
- st1 {v16.4s-v19.4s}, [x4], #64
- st1 {v20.4s-v23.4s}, [x4]
-.endm
-
-.macro load16 in0, in1, in2, in3
- ld1 {\in0}[0], [x1], x2
- ld1 {\in0}[1], [x3], x2
- ld1 {\in1}[0], [x1], x2
- ld1 {\in1}[1], [x3], x2
- ld1 {\in2}[0], [x1], x2
- ld1 {\in2}[1], [x3], x2
- ld1 {\in3}[0], [x1], x2
- ld1 {\in3}[1], [x3], x2
-.endm
-
-.macro add_member in, t0, t1, t2, t3, t4, t5, t6, t7, op0, op1, op2, op3, op4, op5, op6, op7, p
- sum_sub v21.4s, \in, \t0, \op0, \p
- sum_sub v22.4s, \in, \t1, \op1, \p
- sum_sub v23.4s, \in, \t2, \op2, \p
- sum_sub v24.4s, \in, \t3, \op3, \p
- sum_sub v25.4s, \in, \t4, \op4, \p
- sum_sub v26.4s, \in, \t5, \op5, \p
- sum_sub v27.4s, \in, \t6, \op6, \p
- sum_sub v28.4s, \in, \t7, \op7, \p
-.endm
-
-.macro butterfly16 in0, in1, in2, in3, in4, in5, in6, in7
- add v20.4s, \in0, \in1
- sub \in0, \in0, \in1
- add \in1, \in2, \in3
- sub \in2, \in2, \in3
- add \in3, \in4, \in5
- sub \in4, \in4, \in5
- add \in5, \in6, \in7
- sub \in6, \in6, \in7
-.endm
-
-.macro store16 in0, in1, in2, in3, rx
- st1 {\in0}[0], [x1], x2
- st1 {\in0}[1], [x3], \rx
- st1 {\in1}[0], [x1], x2
- st1 {\in1}[1], [x3], \rx
- st1 {\in2}[0], [x1], x2
- st1 {\in2}[1], [x3], \rx
- st1 {\in3}[0], [x1], x2
- st1 {\in3}[1], [x3], \rx
-.endm
-
-.macro scale out0, out1, out2, out3, in0, in1, in2, in3, in4, in5, in6, in7, shift
- sqrshrn \out0\().4h, \in0, \shift
- sqrshrn2 \out0\().8h, \in1, \shift
- sqrshrn \out1\().4h, \in2, \shift
- sqrshrn2 \out1\().8h, \in3, \shift
- sqrshrn \out2\().4h, \in4, \shift
- sqrshrn2 \out2\().8h, \in5, \shift
- sqrshrn \out3\().4h, \in6, \shift
- sqrshrn2 \out3\().8h, \in7, \shift
-.endm
-
-.macro transpose16_4x4_2 r0, r1, r2, r3
- // lower halves
- trn1 v2.4h, \r0\().4h, \r1\().4h
- trn2 v3.4h, \r0\().4h, \r1\().4h
- trn1 v4.4h, \r2\().4h, \r3\().4h
- trn2 v5.4h, \r2\().4h, \r3\().4h
- trn1 v6.2s, v2.2s, v4.2s
- trn2 v7.2s, v2.2s, v4.2s
- trn1 v2.2s, v3.2s, v5.2s
- trn2 v4.2s, v3.2s, v5.2s
- mov \r0\().d[0], v6.d[0]
- mov \r2\().d[0], v7.d[0]
- mov \r1\().d[0], v2.d[0]
- mov \r3\().d[0], v4.d[0]
-
- // upper halves in reverse order
- trn1 v2.8h, \r3\().8h, \r2\().8h
- trn2 v3.8h, \r3\().8h, \r2\().8h
- trn1 v4.8h, \r1\().8h, \r0\().8h
- trn2 v5.8h, \r1\().8h, \r0\().8h
- trn1 v6.4s, v2.4s, v4.4s
- trn2 v7.4s, v2.4s, v4.4s
- trn1 v2.4s, v3.4s, v5.4s
- trn2 v4.4s, v3.4s, v5.4s
- mov \r3\().d[1], v6.d[1]
- mov \r1\().d[1], v7.d[1]
- mov \r2\().d[1], v2.d[1]
- mov \r0\().d[1], v4.d[1]
-.endm
-
-.macro tr_16x4 name, shift, offset, step
-function func_tr_16x4_\name
- mov x1, x5
- add x3, x5, #(\step * 64)
- mov x2, #(\step * 128)
- load16 v16.d, v17.d, v18.d, v19.d
- movrel x1, trans
- ld1 {v0.8h}, [x1]
-
- tr16_8x4 v16, v17, v18, v19, \offset
-
- add x1, x5, #(\step * 32)
- add x3, x5, #(\step * 3 *32)
- mov x2, #(\step * 128)
- load16 v20.d, v17.d, v18.d, v19.d
- movrel x1, trans, 16
- ld1 {v1.8h}, [x1]
- smull v21.4s, v20.4h, v1.h[0]
- smull v22.4s, v20.4h, v1.h[1]
- smull v23.4s, v20.4h, v1.h[2]
- smull v24.4s, v20.4h, v1.h[3]
- smull v25.4s, v20.4h, v1.h[4]
- smull v26.4s, v20.4h, v1.h[5]
- smull v27.4s, v20.4h, v1.h[6]
- smull v28.4s, v20.4h, v1.h[7]
-
- add_member v20.8h, v1.h[1], v1.h[4], v1.h[7], v1.h[5], v1.h[2], v1.h[0], v1.h[3], v1.h[6], +, +, +, -, -, -, -, -, 2
- add_member v17.4h, v1.h[2], v1.h[7], v1.h[3], v1.h[1], v1.h[6], v1.h[4], v1.h[0], v1.h[5], +, +, -, -, -, +, +, +
- add_member v17.8h, v1.h[3], v1.h[5], v1.h[1], v1.h[7], v1.h[0], v1.h[6], v1.h[2], v1.h[4], +, -, -, +, +, +, -, -, 2
- add_member v18.4h, v1.h[4], v1.h[2], v1.h[6], v1.h[0], v1.h[7], v1.h[1], v1.h[5], v1.h[3], +, -, -, +, -, -, +, +
- add_member v18.8h, v1.h[5], v1.h[0], v1.h[4], v1.h[6], v1.h[1], v1.h[3], v1.h[7], v1.h[2], +, -, +, +, -, +, +, -, 2
- add_member v19.4h, v1.h[6], v1.h[3], v1.h[0], v1.h[2], v1.h[5], v1.h[7], v1.h[4], v1.h[1], +, -, +, -, +, +, -, +
- add_member v19.8h, v1.h[7], v1.h[6], v1.h[5], v1.h[4], v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, +, -, +, -, 2
-
- add x4, sp, #\offset
- ld1 {v16.4s-v19.4s}, [x4], #64
-
- butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s
- scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift
- transpose16_4x4_2 v29, v30, v31, v24
- mov x1, x6
- add x3, x6, #(24 +3*32)
- mov x2, #32
- mov x4, #-32
- store16 v29.d, v30.d, v31.d, v24.d, x4
-
- add x4, sp, #(\offset + 64)
- ld1 {v16.4s-v19.4s}, [x4]
- butterfly16 v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, v28.4s
- scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift
- transpose16_4x4_2 v29, v30, v31, v20
-
- add x1, x6, #8
- add x3, x6, #(16 + 3 * 32)
- mov x2, #32
- mov x4, #-32
- store16 v29.d, v30.d, v31.d, v20.d, x4
-
- ret
-endfunc
-.endm
-
-.macro idct_16x16 bitdepth
-function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1
-//r0 - coeffs
- mov x15, x30
-
- // allocate a temp buffer
- sub sp, sp, #640
-
-.irp i, 0, 1, 2, 3
- add x5, x0, #(8 * \i)
- add x6, sp, #(8 * \i * 16)
- bl func_tr_16x4_firstpass
-.endr
-
-.irp i, 0, 1, 2, 3
- add x5, sp, #(8 * \i)
- add x6, x0, #(8 * \i * 16)
- bl func_tr_16x4_secondpass_\bitdepth
-.endr
-
- add sp, sp, #640
-
- mov x30, x15
- ret
-endfunc
-.endm
-
-idct_8x8 8
-idct_8x8 10
-
-tr_16x4 firstpass, 7, 512, 1
-tr_16x4 secondpass_8, 20 - 8, 512, 1
-tr_16x4 secondpass_10, 20 - 10, 512, 1
-
-idct_16x16 8
-idct_16x16 10
-
-// void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs)
-.macro idct_dc size, bitdepth
-function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1
- movi v1.8h, #((1 << (14 - \bitdepth))+1)
- ld1r {v4.8h}, [x0]
- add v4.8h, v4.8h, v1.8h
- sshr v0.8h, v4.8h, #(15 - \bitdepth)
- sshr v1.8h, v4.8h, #(15 - \bitdepth)
-.if \size > 4
- sshr v2.8h, v4.8h, #(15 - \bitdepth)
- sshr v3.8h, v4.8h, #(15 - \bitdepth)
-.if \size > 16 /* dc 32x32 */
- mov x2, #4
-1:
- subs x2, x2, #1
-.endif
- add x12, x0, #64
- mov x13, #128
-.if \size > 8 /* dc 16x16 */
- st1 {v0.8h-v3.8h}, [x0], x13
- st1 {v0.8h-v3.8h}, [x12], x13
- st1 {v0.8h-v3.8h}, [x0], x13
- st1 {v0.8h-v3.8h}, [x12], x13
- st1 {v0.8h-v3.8h}, [x0], x13
- st1 {v0.8h-v3.8h}, [x12], x13
-.endif /* dc 8x8 */
- st1 {v0.8h-v3.8h}, [x0], x13
- st1 {v0.8h-v3.8h}, [x12], x13
-.if \size > 16 /* dc 32x32 */
- bne 1b
-.endif
-.else /* dc 4x4 */
- st1 {v0.8h-v1.8h}, [x0]
-.endif
- ret
-endfunc
-.endm
-
-idct_dc 4, 8
-idct_dc 4, 10
-
-idct_dc 8, 8
-idct_dc 8, 10
-
-idct_dc 16, 8
-idct_dc 16, 10
-
-idct_dc 32, 8
-idct_dc 32, 10
diff --git a/libavcodec/aarch64/hevcdsp_init_aarch64.c b/libavcodec/aarch64/hevcdsp_init_aarch64.c
deleted file mode 100644
index c785e46..0000000
--- a/libavcodec/aarch64/hevcdsp_init_aarch64.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2020 Reimar Döffinger
- *
- * 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
- */
-
-#include <stdint.h>
-
-#include "libavutil/attributes.h"
-#include "libavutil/cpu.h"
-#include "libavutil/aarch64/cpu.h"
-#include "libavcodec/hevcdsp.h"
-
-void ff_hevc_add_residual_4x4_8_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_4x4_10_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_8x8_8_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_8x8_10_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_16x16_8_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_16x16_10_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_32x32_8_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_add_residual_32x32_10_neon(uint8_t *_dst, int16_t *coeffs,
- ptrdiff_t stride);
-void ff_hevc_idct_8x8_8_neon(int16_t *coeffs, int col_limit);
-void ff_hevc_idct_8x8_10_neon(int16_t *coeffs, int col_limit);
-void ff_hevc_idct_16x16_8_neon(int16_t *coeffs, int col_limit);
-void ff_hevc_idct_16x16_10_neon(int16_t *coeffs, int col_limit);
-void ff_hevc_idct_4x4_dc_8_neon(int16_t *coeffs);
-void ff_hevc_idct_8x8_dc_8_neon(int16_t *coeffs);
-void ff_hevc_idct_16x16_dc_8_neon(int16_t *coeffs);
-void ff_hevc_idct_32x32_dc_8_neon(int16_t *coeffs);
-void ff_hevc_idct_4x4_dc_10_neon(int16_t *coeffs);
-void ff_hevc_idct_8x8_dc_10_neon(int16_t *coeffs);
-void ff_hevc_idct_16x16_dc_10_neon(int16_t *coeffs);
-void ff_hevc_idct_32x32_dc_10_neon(int16_t *coeffs);
-void ff_hevc_sao_band_filter_8x8_8_neon(uint8_t *_dst, uint8_t *_src,
- ptrdiff_t stride_dst, ptrdiff_t stride_src,
- int16_t *sao_offset_val, int sao_left_class,
- int width, int height);
-
-
-
-av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth)
-{
- if (!have_neon(av_get_cpu_flags())) return;
-
- if (bit_depth == 8) {
- c->add_residual[0] = ff_hevc_add_residual_4x4_8_neon;
- c->add_residual[1] = ff_hevc_add_residual_8x8_8_neon;
- c->add_residual[2] = ff_hevc_add_residual_16x16_8_neon;
- c->add_residual[3] = ff_hevc_add_residual_32x32_8_neon;
- c->idct[1] = ff_hevc_idct_8x8_8_neon;
- c->idct[2] = ff_hevc_idct_16x16_8_neon;
- c->idct_dc[0] = ff_hevc_idct_4x4_dc_8_neon;
- c->idct_dc[1] = ff_hevc_idct_8x8_dc_8_neon;
- c->idct_dc[2] = ff_hevc_idct_16x16_dc_8_neon;
- c->idct_dc[3] = ff_hevc_idct_32x32_dc_8_neon;
- c->sao_band_filter[0] = ff_hevc_sao_band_filter_8x8_8_neon;
- }
- if (bit_depth == 10) {
- c->add_residual[0] = ff_hevc_add_residual_4x4_10_neon;
- c->add_residual[1] = ff_hevc_add_residual_8x8_10_neon;
- c->add_residual[2] = ff_hevc_add_residual_16x16_10_neon;
- c->add_residual[3] = ff_hevc_add_residual_32x32_10_neon;
- c->idct[1] = ff_hevc_idct_8x8_10_neon;
- c->idct[2] = ff_hevc_idct_16x16_10_neon;
- c->idct_dc[0] = ff_hevc_idct_4x4_dc_10_neon;
- c->idct_dc[1] = ff_hevc_idct_8x8_dc_10_neon;
- c->idct_dc[2] = ff_hevc_idct_16x16_dc_10_neon;
- c->idct_dc[3] = ff_hevc_idct_32x32_dc_10_neon;
- }
-}
diff --git a/libavcodec/aarch64/hevcdsp_sao_neon.S b/libavcodec/aarch64/hevcdsp_sao_neon.S
deleted file mode 100644
index f9fed83..0000000
--- a/libavcodec/aarch64/hevcdsp_sao_neon.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*-arm64-*-
- * vim: syntax=arm64asm
- *
- * AArch64 NEON optimised SAO functions for HEVC decoding
- *
- * Copyright (c) 2020 Josh Dekker <josh@itanimul.li>
- *
- * 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
- */
-
-#include "libavutil/aarch64/asm.S"
-
-// void sao_band_filter(uint8_t *_dst, uint8_t *_src,
-// ptrdiff_t stride_dst, ptrdiff_t stride_src,
-// int16_t *sao_offset_val, int sao_left_class,
-// int width, int height)
-function ff_hevc_sao_band_filter_8x8_8_neon, export=1
- sub sp, sp, #64
- stp xzr, xzr, [sp]
- stp xzr, xzr, [sp, #16]
- stp xzr, xzr, [sp, #32]
- stp xzr, xzr, [sp, #48]
- mov w8, #4
-0:
- ldrsh x9, [x4, x8, lsl #1] // x9 = sao_offset_val[k+1]
- subs w8, w8, #1
- add w10, w8, w5 // x10 = k + sao_left_class
- and w10, w10, #0x1F
- strh w9, [sp, x10, lsl #1]
- bne 0b
- ld1 {v16.16b-v19.16b}, [sp], #64
- movi v20.8h, #1
-1: // beginning of line
- mov w8, w6
-2:
- // Simple layout for accessing 16bit values
- // with 8bit LUT.
- //
- // 00 01 02 03 04 05 06 07
- // +----------------------------------->
- // |xDE#xAD|xCA#xFE|xBE#xEF|xFE#xED|....
- // +----------------------------------->
- // i-0 i-1 i-2 i-3
- // dst[x] = av_clip_pixel(src[x] + offset_table[src[x] >> shift]);
- ld1 {v2.8b}, [x1]
- // load src[x]
- uxtl v0.8h, v2.8b
- // >> shift
- ushr v2.8h, v0.8h, #3 // BIT_DEPTH - 3
- // x2 (access lower short)
- shl v1.8h, v2.8h, #1 // low (x2, accessing short)
- // +1 access upper short
- add v3.8h, v1.8h, v20.8h
- // shift insert index to upper byte
- sli v1.8h, v3.8h, #8
- // table
- tbx v2.16b, {v16.16b-v19.16b}, v1.16b
- // src[x] + table
- add v1.8h, v0.8h, v2.8h
- // clip + narrow
- sqxtun v4.8b, v1.8h
- // store
- st1 {v4.8b}, [x0]
- // done 8 pixels
- subs w8, w8, #8
- bne 2b
- // finished line
- subs w7, w7, #1
- add x0, x0, x2 // dst += stride_dst
- add x1, x1, x3 // src += stride_src
- bne 1b
- ret
-endfunc
diff --git a/libavcodec/aarch64/neontest.c b/libavcodec/aarch64/neontest.c
index a4fc5a0..a24c22d 100644
--- a/libavcodec/aarch64/neontest.c
+++ b/libavcodec/aarch64/neontest.c
@@ -29,7 +29,6 @@
testneonclobbers(avcodec_open2, avctx, codec, options);
}
-#if FF_API_OLD_ENCDEC
wrap(avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
@@ -48,22 +47,6 @@
got_picture_ptr, avpkt);
}
-wrap(avcodec_encode_audio2(AVCodecContext *avctx,
- AVPacket *avpkt,
- const AVFrame *frame,
- int *got_packet_ptr))
-{
- testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
- got_packet_ptr);
-}
-
-wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
- const AVFrame *frame, int *got_packet_ptr))
-{
- testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
-}
-#endif
-
wrap(avcodec_decode_subtitle2(AVCodecContext *avctx,
AVSubtitle *sub,
int *got_sub_ptr,
@@ -73,6 +56,15 @@
got_sub_ptr, avpkt);
}
+wrap(avcodec_encode_audio2(AVCodecContext *avctx,
+ AVPacket *avpkt,
+ const AVFrame *frame,
+ int *got_packet_ptr))
+{
+ testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
+ got_packet_ptr);
+}
+
wrap(avcodec_encode_subtitle(AVCodecContext *avctx,
uint8_t *buf, int buf_size,
const AVSubtitle *sub))
@@ -80,6 +72,12 @@
testneonclobbers(avcodec_encode_subtitle, avctx, buf, buf_size, sub);
}
+wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
+ const AVFrame *frame, int *got_packet_ptr))
+{
+ testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
+}
+
wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt))
{
testneonclobbers(avcodec_send_packet, avctx, avpkt);
diff --git a/libavcodec/aarch64/vp9dsp_init_16bpp_aarch64_template.c b/libavcodec/aarch64/vp9dsp_init_16bpp_aarch64_template.c
index d2a4e90..8dcfdea 100644
--- a/libavcodec/aarch64/vp9dsp_init_16bpp_aarch64_template.c
+++ b/libavcodec/aarch64/vp9dsp_init_16bpp_aarch64_template.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/aarch64/cpu.h"
#include "vp9dsp_init.h"
diff --git a/libavcodec/aarch64/vp9dsp_init_aarch64.c b/libavcodec/aarch64/vp9dsp_init_aarch64.c
index 4d1fee6..4c69975 100644
--- a/libavcodec/aarch64/vp9dsp_init_aarch64.c
+++ b/libavcodec/aarch64/vp9dsp_init_aarch64.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/aarch64/cpu.h"
#include "libavcodec/vp9dsp.h"
#include "vp9dsp_init.h"
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index c7deb56..eaa327a 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -33,7 +33,6 @@
#include "libavutil/crc.h"
#include "libavutil/downmix_info.h"
#include "libavutil/opt.h"
-#include "libavutil/thread.h"
#include "bswapdsp.h"
#include "internal.h"
#include "aac_ac3_parser.h"
@@ -184,26 +183,23 @@
*/
static av_cold int ac3_decode_init(AVCodecContext *avctx)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
AC3DecodeContext *s = avctx->priv_data;
- int i, ret;
+ int i;
s->avctx = avctx;
- if ((ret = ff_mdct_init(&s->imdct_256, 8, 1, 1.0)) < 0 ||
- (ret = ff_mdct_init(&s->imdct_512, 9, 1, 1.0)) < 0)
- return ret;
+ ac3_tables_init();
+ ff_mdct_init(&s->imdct_256, 8, 1, 1.0);
+ ff_mdct_init(&s->imdct_512, 9, 1, 1.0);
AC3_RENAME(ff_kbd_window_init)(s->window, 5.0, 256);
ff_bswapdsp_init(&s->bdsp);
#if (USE_FIXED)
s->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT);
#else
- ff_fmt_convert_init(&s->fmt_conv, avctx);
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
+ ff_fmt_convert_init(&s->fmt_conv, avctx);
#endif
- if (!s->fdsp)
- return AVERROR(ENOMEM);
ff_ac3dsp_init(&s->ac3dsp, avctx->flags & AV_CODEC_FLAG_BITEXACT);
av_lfg_init(&s->dith_state, 0);
@@ -227,8 +223,6 @@
s->dlyptr[i] = s->delay[i];
}
- ff_thread_once(&init_static_once, ac3_tables_init);
-
return 0;
}
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index 8565399..ce1434b 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -53,8 +53,6 @@
#include "libavutil/float_dsp.h"
#include "libavutil/fixed_dsp.h"
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
-
#include "ac3.h"
#include "ac3dsp.h"
#include "bswapdsp.h"
diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index daab433..f36854c 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -182,5 +182,4 @@
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3_decoder_class,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c
index b18317f..57a626a 100644
--- a/libavcodec/ac3dec_float.c
+++ b/libavcodec/ac3dec_float.c
@@ -67,7 +67,6 @@
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3_decoder_class,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
#if CONFIG_EAC3_DECODER
@@ -92,6 +91,5 @@
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_NONE },
.priv_class = &eac3_decoder_class,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
#endif
diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c
index 85c721d..43438da 100644
--- a/libavcodec/ac3dsp.c
+++ b/libavcodec/ac3dsp.c
@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "ac3.h"
#include "ac3dsp.h"
@@ -46,6 +44,49 @@
}
}
+static int ac3_max_msb_abs_int16_c(const int16_t *src, int len)
+{
+ int i, v = 0;
+ for (i = 0; i < len; i++)
+ v |= abs(src[i]);
+ return v;
+}
+
+static void ac3_lshift_int16_c(int16_t *src, unsigned int len,
+ unsigned int shift)
+{
+ uint32_t *src32 = (uint32_t *)src;
+ const uint32_t mask = ~(((1 << shift) - 1) << 16);
+ int i;
+ len >>= 1;
+ for (i = 0; i < len; i += 8) {
+ src32[i ] = (src32[i ] << shift) & mask;
+ src32[i+1] = (src32[i+1] << shift) & mask;
+ src32[i+2] = (src32[i+2] << shift) & mask;
+ src32[i+3] = (src32[i+3] << shift) & mask;
+ src32[i+4] = (src32[i+4] << shift) & mask;
+ src32[i+5] = (src32[i+5] << shift) & mask;
+ src32[i+6] = (src32[i+6] << shift) & mask;
+ src32[i+7] = (src32[i+7] << shift) & mask;
+ }
+}
+
+static void ac3_rshift_int32_c(int32_t *src, unsigned int len,
+ unsigned int shift)
+{
+ do {
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ *src++ >>= shift;
+ len -= 8;
+ } while (len > 0);
+}
+
static void float_to_fixed24_c(int32_t *dst, const float *src, unsigned int len)
{
const float scale = 1 << 24;
@@ -333,6 +374,19 @@
ac3_downmix_c_fixed(samples, matrix, out_ch, in_ch, len);
}
+static void apply_window_int16_c(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len)
+{
+ int i;
+ int len2 = len >> 1;
+
+ for (i = 0; i < len2; i++) {
+ int16_t w = window[i];
+ output[i] = (MUL16(input[i], w) + (1 << 14)) >> 15;
+ output[len-i-1] = (MUL16(input[len-i-1], w) + (1 << 14)) >> 15;
+ }
+}
+
void ff_ac3dsp_downmix(AC3DSPContext *c, float **samples, float **matrix,
int out_ch, int in_ch, int len)
{
@@ -368,6 +422,9 @@
av_cold void ff_ac3dsp_init(AC3DSPContext *c, int bit_exact)
{
c->ac3_exponent_min = ac3_exponent_min_c;
+ c->ac3_max_msb_abs_int16 = ac3_max_msb_abs_int16_c;
+ c->ac3_lshift_int16 = ac3_lshift_int16_c;
+ c->ac3_rshift_int32 = ac3_rshift_int32_c;
c->float_to_fixed24 = float_to_fixed24_c;
c->bit_alloc_calc_bap = ac3_bit_alloc_calc_bap_c;
c->update_bap_counts = ac3_update_bap_counts_c;
@@ -379,6 +436,7 @@
c->out_channels = 0;
c->downmix = NULL;
c->downmix_fixed = NULL;
+ c->apply_window_int16 = apply_window_int16_c;
if (ARCH_ARM)
ff_ac3dsp_init_arm(c, bit_exact);
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index a23b115..161de4c 100644
--- a/libavcodec/ac3dsp.h
+++ b/libavcodec/ac3dsp.h
@@ -43,6 +43,39 @@
void (*ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
/**
+ * Calculate the maximum MSB of the absolute value of each element in an
+ * array of int16_t.
+ * @param src input array
+ * constraints: align 16. values must be in range [-32767,32767]
+ * @param len number of values in the array
+ * constraints: multiple of 16 greater than 0
+ * @return a value with the same MSB as max(abs(src[]))
+ */
+ int (*ac3_max_msb_abs_int16)(const int16_t *src, int len);
+
+ /**
+ * Left-shift each value in an array of int16_t by a specified amount.
+ * @param src input array
+ * constraints: align 16
+ * @param len number of values in the array
+ * constraints: multiple of 32 greater than 0
+ * @param shift left shift amount
+ * constraints: range [0,15]
+ */
+ void (*ac3_lshift_int16)(int16_t *src, unsigned int len, unsigned int shift);
+
+ /**
+ * Right-shift each value in an array of int32_t by a specified amount.
+ * @param src input array
+ * constraints: align 16
+ * @param len number of values in the array
+ * constraints: multiple of 16 greater than 0
+ * @param shift right shift amount
+ * constraints: range [0,31]
+ */
+ void (*ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift);
+
+ /**
* Convert an array of float in range [-1.0,1.0] to int32_t with range
* [-(1<<24),(1<<24)]
*
@@ -103,6 +136,20 @@
int in_channels;
void (*downmix)(float **samples, float **matrix, int len);
void (*downmix_fixed)(int32_t **samples, int16_t **matrix, int len);
+
+ /**
+ * Apply symmetric window in 16-bit fixed-point.
+ * @param output destination array
+ * constraints: 16-byte aligned
+ * @param input source array
+ * constraints: 16-byte aligned
+ * @param window window array
+ * constraints: 16-byte aligned, at least len/2 elements
+ * @param len full window length
+ * constraints: multiple of ? greater than zero
+ */
+ void (*apply_window_int16)(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
} AC3DSPContext;
void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact);
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 8044e6d..37dc0fb 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -34,9 +34,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/crc.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
-#include "libavutil/thread.h"
#include "avcodec.h"
#include "internal.h"
#include "me_cmp.h"
@@ -69,65 +67,6 @@
LEVEL_MINUS_3DB, LEVEL_MINUS_4POINT5DB, LEVEL_MINUS_6DB, LEVEL_ZERO
};
-/* The first two options apply only to the AC-3 encoders;
- * the rest is also valid for EAC-3. When modifying it,
- * it might be necessary to adapt said offset in eac3enc.c. */
-#define OFFSET(param) offsetof(AC3EncodeContext, options.param)
-#define AC3ENC_PARAM (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
-const AVOption ff_ac3_enc_options[] = {
-/* AC-3 downmix levels */
-{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM},
-{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM},
-/* audio production information */
-{"mixing_level", "Mixing Level", OFFSET(mixing_level), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 111, AC3ENC_PARAM},
-{"room_type", "Room Type", OFFSET(room_type), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_SMALL_ROOM, AC3ENC_PARAM, "room_type"},
- {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
- {"large", "Large Room", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_LARGE_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
- {"small", "Small Room", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_SMALL_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
-/* Metadata Options */
-{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, AC3ENC_PARAM},
-{"copyright", "Copyright Bit", OFFSET(copyright), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM},
-{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), AV_OPT_TYPE_INT, {.i64 = -31 }, -31, -1, AC3ENC_PARAM},
-{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dsur_mode"},
- {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
- {"on", "Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
- {"off", "Not Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
-{"original", "Original Bit Stream", OFFSET(original), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM},
-/* extended bitstream information */
-{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_DOWNMIX_DPLII, AC3ENC_PARAM, "dmix_mode"},
- {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
- {"ltrt", "Lt/Rt Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_LTRT }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
- {"loro", "Lo/Ro Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_LORO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
- {"dplii", "Dolby Pro Logic II Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_DPLII }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
-{"ltrt_cmixlev", "Lt/Rt Center Mix Level", OFFSET(ltrt_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
-{"ltrt_surmixlev", "Lt/Rt Surround Mix Level", OFFSET(ltrt_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
-{"loro_cmixlev", "Lo/Ro Center Mix Level", OFFSET(loro_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
-{"loro_surmixlev", "Lo/Ro Surround Mix Level", OFFSET(loro_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
-{"dsurex_mode", "Dolby Surround EX Mode", OFFSET(dolby_surround_ex_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_DSUREX_DPLIIZ, AC3ENC_PARAM, "dsurex_mode"},
- {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
- {"on", "Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
- {"off", "Not Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
- {"dpliiz", "Dolby Pro Logic IIz-encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DSUREX_DPLIIZ }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
-{"dheadphone_mode", "Dolby Headphone Mode", OFFSET(dolby_headphone_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dheadphone_mode"},
- {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
- {"on", "Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
- {"off", "Not Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
-{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_ADCONV_HDCD, AC3ENC_PARAM, "ad_conv_type"},
- {"standard", "Standard (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_ADCONV_STANDARD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
- {"hdcd", "HDCD", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_ADCONV_HDCD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
-/* Other Encoding Options */
-{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), AV_OPT_TYPE_BOOL, {.i64 = 1 }, 0, 1, AC3ENC_PARAM},
-{"channel_coupling", "Channel Coupling", OFFSET(channel_coupling), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, AC3ENC_OPT_ON, AC3ENC_PARAM, "channel_coupling"},
- {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "channel_coupling"},
-{"cpl_start_band", "Coupling Start Band", OFFSET(cpl_start), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, 15, AC3ENC_PARAM, "cpl_start_band"},
- {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "cpl_start_band"},
-{NULL}
-};
-
-const AVCodecDefault ff_ac3_enc_defaults[] = {
- { "b", "0" },
- { NULL }
-};
/**
* LUT for number of exponent groups.
@@ -161,15 +100,6 @@
0
};
-/**
- * Table to remap channels from SMPTE order to AC-3 order.
- * [channel_mode][lfe][ch]
- */
-static const uint8_t ac3_enc_channel_map[8][2][6] = {
- COMMON_CHANNEL_MAP
- { { 0, 1, 2, 3, }, { 0, 1, 3, 4, 2, } },
- { { 0, 2, 1, 3, 4, }, { 0, 2, 1, 4, 5, 3 } },
-};
/**
* LUT to select the bandwidth code based on the bit rate, sample rate, and
@@ -339,7 +269,7 @@
*
* @param s AC-3 encoder private context
*/
-static void ac3_apply_rematrixing(AC3EncodeContext *s)
+void ff_ac3_apply_rematrixing(AC3EncodeContext *s)
{
int nb_coefs;
int blk, bnd, i;
@@ -373,7 +303,7 @@
/*
* Initialize exponent tables.
*/
-static av_cold void exponent_init(void)
+static av_cold void exponent_init(AC3EncodeContext *s)
{
int expstr, i, grpsize;
@@ -386,6 +316,9 @@
}
/* LFE */
exponent_group_tab[0][0][7] = 2;
+
+ if (CONFIG_EAC3_ENCODER && s->eac3)
+ ff_eac3_exponent_init();
}
@@ -643,7 +576,7 @@
*
* @param s AC-3 encoder private context
*/
-static void ac3_group_exponents(AC3EncodeContext *s)
+void ff_ac3_group_exponents(AC3EncodeContext *s)
{
int blk, ch, i, cpl;
int group_size, nb_groups;
@@ -701,7 +634,7 @@
*
* @param s AC-3 encoder private context
*/
-static void ac3_process_exponents(AC3EncodeContext *s)
+void ff_ac3_process_exponents(AC3EncodeContext *s)
{
extract_exponents(s);
@@ -1210,7 +1143,7 @@
* frame size. Output is the SNR offset and a set of bit allocation pointers
* used to quantize the mantissas.
*/
-static int ac3_compute_bit_allocation(AC3EncodeContext *s)
+int ff_ac3_compute_bit_allocation(AC3EncodeContext *s)
{
count_frame_bits(s);
@@ -1364,7 +1297,7 @@
*
* @param s AC-3 encoder private context
*/
-static void ac3_quantize_mantissas(AC3EncodeContext *s)
+void ff_ac3_quantize_mantissas(AC3EncodeContext *s)
{
int blk, ch, ch0=0, got_cpl;
@@ -1725,7 +1658,7 @@
* @param s AC-3 encoder private context
* @param frame output data buffer
*/
-static void ac3_output_frame(AC3EncodeContext *s, unsigned char *frame)
+void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame)
{
int blk;
@@ -1739,36 +1672,6 @@
output_frame_end(s);
}
-int ff_ac3_encode_frame_common_end(AVCodecContext *avctx, AVPacket *avpkt,
- const AVFrame *frame, int *got_packet_ptr)
-{
- AC3EncodeContext *const s = avctx->priv_data;
- int ret;
-
- ac3_apply_rematrixing(s);
-
- ac3_process_exponents(s);
-
- ret = ac3_compute_bit_allocation(s);
- if (ret) {
- av_log(avctx, AV_LOG_ERROR, "Bit allocation failed. Try increasing the bitrate.\n");
- return ret;
- }
-
- ac3_group_exponents(s);
-
- ac3_quantize_mantissas(s);
-
- if ((ret = ff_alloc_packet2(avctx, avpkt, s->frame_size, 0)) < 0)
- return ret;
- ac3_output_frame(s, avpkt->data);
-
- if (frame->pts != AV_NOPTS_VALUE)
- avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->initial_padding);
-
- *got_packet_ptr = 1;
- return 0;
-}
static void dprint_options(AC3EncodeContext *s)
{
@@ -2115,7 +2018,6 @@
int blk, ch;
AC3EncodeContext *s = avctx->priv_data;
- av_freep(&s->mdct_window);
av_freep(&s->windowed_samples);
if (s->planar_samples)
for (ch = 0; ch < s->channels; ch++)
@@ -2148,7 +2050,8 @@
av_freep(&block->cpl_coord_mant);
}
- s->mdct_end(s);
+ if (s->mdct_end)
+ s->mdct_end(s);
return 0;
}
@@ -2193,7 +2096,7 @@
s->has_center = (s->channel_mode & 0x01) && s->channel_mode != AC3_CHMODE_MONO;
s->has_surround = s->channel_mode & 0x04;
- s->channel_map = ac3_enc_channel_map[s->channel_mode][s->lfe_on];
+ s->channel_map = ff_ac3_enc_channel_map[s->channel_mode][s->lfe_on];
*channel_layout = ch_layout;
if (s->lfe_on)
*channel_layout |= AV_CH_LOW_FREQUENCY;
@@ -2505,7 +2408,6 @@
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
AC3EncodeContext *s = avctx->priv_data;
int ret, frame_size_58;
@@ -2535,15 +2437,25 @@
s->crc_inv[1] = pow_poly((CRC16_POLY >> 1), (8 * frame_size_58) - 16, CRC16_POLY);
}
- if (CONFIG_EAC3_ENCODER && s->eac3) {
- static AVOnce init_static_once_eac3 = AV_ONCE_INIT;
- ff_thread_once(&init_static_once_eac3, ff_eac3_exponent_init);
+ /* set function pointers */
+ if (CONFIG_AC3_FIXED_ENCODER && s->fixed_point) {
+ s->mdct_end = ff_ac3_fixed_mdct_end;
+ s->mdct_init = ff_ac3_fixed_mdct_init;
+ s->allocate_sample_buffers = ff_ac3_fixed_allocate_sample_buffers;
+ } else if (CONFIG_AC3_ENCODER || CONFIG_EAC3_ENCODER) {
+ s->mdct_end = ff_ac3_float_mdct_end;
+ s->mdct_init = ff_ac3_float_mdct_init;
+ s->allocate_sample_buffers = ff_ac3_float_allocate_sample_buffers;
+ }
+ if (CONFIG_EAC3_ENCODER && s->eac3)
s->output_frame_header = ff_eac3_output_frame_header;
- } else
+ else
s->output_frame_header = ac3_output_frame_header;
set_bandwidth(s);
+ exponent_init(s);
+
bit_alloc_init(s);
ret = s->mdct_init(s);
@@ -2560,7 +2472,5 @@
dprint_options(s);
- ff_thread_once(&init_static_once, exponent_init);
-
return 0;
}
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index c064ba4..1e4a740 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -30,6 +30,8 @@
#include <stdint.h>
+#include "libavutil/float_dsp.h"
+
#include "ac3.h"
#include "ac3dsp.h"
#include "avcodec.h"
@@ -39,12 +41,18 @@
#include "put_bits.h"
#include "audiodsp.h"
-#ifndef AC3ENC_FLOAT
-#define AC3ENC_FLOAT 0
+#ifndef CONFIG_AC3ENC_FLOAT
+#define CONFIG_AC3ENC_FLOAT 0
#endif
-#if AC3ENC_FLOAT
-#include "libavutil/float_dsp.h"
+#define OFFSET(param) offsetof(AC3EncodeContext, options.param)
+#define AC3ENC_PARAM (AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
+
+#define AC3ENC_TYPE_AC3_FIXED 0
+#define AC3ENC_TYPE_AC3 1
+#define AC3ENC_TYPE_EAC3 2
+
+#if CONFIG_AC3ENC_FLOAT
#define AC3_NAME(x) ff_ac3_float_ ## x
#define MAC_COEF(d,a,b) ((d)+=(a)*(b))
#define COEF_MIN (-16777215.0/16777216.0)
@@ -54,13 +62,12 @@
typedef float CoefType;
typedef float CoefSumType;
#else
-#include "libavutil/fixed_dsp.h"
#define AC3_NAME(x) ff_ac3_fixed_ ## x
#define MAC_COEF(d,a,b) MAC64(d,a,b)
#define COEF_MIN -16777215
#define COEF_MAX 16777215
#define NEW_CPL_COORD_THRESHOLD 503317
-typedef int32_t SampleType;
+typedef int16_t SampleType;
typedef int32_t CoefType;
typedef int64_t CoefSumType;
#endif
@@ -134,6 +141,7 @@
uint16_t **qmant; ///< quantized mantissas
uint8_t **cpl_coord_exp; ///< coupling coord exponents (cplcoexp)
uint8_t **cpl_coord_mant; ///< coupling coord mantissas (cplcomant)
+ uint8_t coeff_shift[AC3_MAX_CHANNELS]; ///< fixed-point coefficient shift values
uint8_t new_rematrixing_strategy; ///< send new rematrixing flags in this block
int num_rematrixing_bands; ///< number of rematrixing bands
uint8_t rematrixing_flags[4]; ///< rematrixing flags
@@ -157,11 +165,7 @@
AVCodecContext *avctx; ///< parent AVCodecContext
PutBitContext pb; ///< bitstream writer context
AudioDSPContext adsp;
-#if AC3ENC_FLOAT
AVFloatDSPContext *fdsp;
-#else
- AVFixedDSPContext *fdsp;
-#endif
MECmpContext mecc;
AC3DSPContext ac3dsp; ///< AC-3 optimized functions
FFTContext mdct; ///< FFT context for MDCT calculation
@@ -266,8 +270,6 @@
extern const uint64_t ff_ac3_channel_layouts[19];
-extern const AVOption ff_ac3_enc_options[];
-extern const AVCodecDefault ff_ac3_enc_defaults[];
int ff_ac3_encode_init(AVCodecContext *avctx);
int ff_ac3_float_encode_init(AVCodecContext *avctx);
@@ -280,11 +282,33 @@
void ff_ac3_compute_coupling_strategy(AC3EncodeContext *s);
-int ff_ac3_encode_frame_common_end(AVCodecContext *avctx, AVPacket *avpkt,
- const AVFrame *frame, int *got_packet_ptr);
+void ff_ac3_apply_rematrixing(AC3EncodeContext *s);
+
+void ff_ac3_process_exponents(AC3EncodeContext *s);
+
+int ff_ac3_compute_bit_allocation(AC3EncodeContext *s);
+
+void ff_ac3_group_exponents(AC3EncodeContext *s);
+
+void ff_ac3_quantize_mantissas(AC3EncodeContext *s);
+
+void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame);
+
+
+/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */
+
+void ff_ac3_fixed_mdct_end(AC3EncodeContext *s);
+void ff_ac3_float_mdct_end(AC3EncodeContext *s);
+
+int ff_ac3_fixed_mdct_init(AC3EncodeContext *s);
+int ff_ac3_float_mdct_init(AC3EncodeContext *s);
+
/* prototypes for functions in ac3enc_template.c */
+int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s);
+int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s);
+
int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr);
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 8b1a062..428bbfb 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -26,22 +26,54 @@
* fixed-point AC-3 encoder.
*/
-#define AC3ENC_FLOAT 0
#define FFT_FLOAT 0
-#define FFT_FIXED_32 1
+#undef CONFIG_AC3ENC_FLOAT
#include "internal.h"
#include "audiodsp.h"
#include "ac3enc.h"
#include "eac3enc.h"
-#include "kbdwin.h"
+
+#define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
+#include "ac3enc_opts_template.c"
static const AVClass ac3enc_class = {
.class_name = "Fixed-Point AC-3 Encoder",
.item_name = av_default_item_name,
- .option = ff_ac3_enc_options,
+ .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT,
};
+/*
+ * Normalize the input samples to use the maximum available precision.
+ * This assumes signed 16-bit input samples.
+ */
+static int normalize_samples(AC3EncodeContext *s)
+{
+ int v = s->ac3dsp.ac3_max_msb_abs_int16(s->windowed_samples, AC3_WINDOW_SIZE);
+ v = 14 - av_log2(v);
+ if (v > 0)
+ s->ac3dsp.ac3_lshift_int16(s->windowed_samples, AC3_WINDOW_SIZE, v);
+ /* +6 to right-shift from 31-bit to 25-bit */
+ return v + 6;
+}
+
+
+/*
+ * Scale MDCT coefficients to 25-bit signed fixed-point.
+ */
+static void scale_coefficients(AC3EncodeContext *s)
+{
+ int blk, ch;
+
+ for (blk = 0; blk < s->num_blocks; blk++) {
+ AC3Block *block = &s->blocks[blk];
+ for (ch = 1; ch <= s->channels; ch++) {
+ s->ac3dsp.ac3_rshift_int32(block->mdct_coef[ch], AC3_MAX_COEFS,
+ block->coeff_shift[ch]);
+ }
+ }
+}
+
static void sum_square_butterfly(AC3EncodeContext *s, int64_t sum[4],
const int32_t *coef0, const int32_t *coef1,
int len)
@@ -83,36 +115,23 @@
*
* @param s AC-3 encoder private context
*/
-static av_cold void ac3_fixed_mdct_end(AC3EncodeContext *s)
+av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s)
{
ff_mdct_end(&s->mdct);
}
+
/**
* Initialize MDCT tables.
*
* @param s AC-3 encoder private context
* @return 0 on success, negative error code on failure
*/
-static av_cold int ac3_fixed_mdct_init(AC3EncodeContext *s)
+av_cold int ff_ac3_fixed_mdct_init(AC3EncodeContext *s)
{
- float fwin[AC3_BLOCK_SIZE];
-
- int32_t *iwin = av_malloc_array(AC3_BLOCK_SIZE, sizeof(*iwin));
- if (!iwin)
- return AVERROR(ENOMEM);
-
- ff_kbd_window_init(fwin, 5.0, AC3_BLOCK_SIZE);
- for (int i = 0; i < AC3_BLOCK_SIZE; i++)
- iwin[i] = lrintf(fwin[i] * (1 << 22));
-
- s->mdct_window = iwin;
-
- s->fdsp = avpriv_alloc_fixed_dsp(s->avctx->flags & AV_CODEC_FLAG_BITEXACT);
- if (!s->fdsp)
- return AVERROR(ENOMEM);
-
- return ff_mdct_init(&s->mdct, 9, 0, -1.0);
+ int ret = ff_mdct_init(&s->mdct, 9, 0, -1.0);
+ s->mdct_window = ff_ac3_window;
+ return ret;
}
@@ -120,9 +139,6 @@
{
AC3EncodeContext *s = avctx->priv_data;
s->fixed_point = 1;
- s->mdct_end = ac3_fixed_mdct_end;
- s->mdct_init = ac3_fixed_mdct_init;
- s->allocate_sample_buffers = allocate_sample_buffers;
return ff_ac3_encode_init(avctx);
}
@@ -136,11 +152,11 @@
.init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame,
.close = ff_ac3_encode_close,
- .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S32P,
+ .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16P,
AV_SAMPLE_FMT_NONE },
.priv_class = &ac3enc_class,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
- .defaults = ff_ac3_enc_defaults,
+ .defaults = ac3_defaults,
};
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index 2238749..99863a9 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -26,7 +26,7 @@
* floating-point AC-3 encoder.
*/
-#define AC3ENC_FLOAT 1
+#define CONFIG_AC3ENC_FLOAT 1
#include "internal.h"
#include "audiodsp.h"
#include "ac3enc.h"
@@ -34,10 +34,12 @@
#include "kbdwin.h"
+#define AC3ENC_TYPE AC3ENC_TYPE_AC3
+#include "ac3enc_opts_template.c"
static const AVClass ac3enc_class = {
.class_name = "AC-3 Encoder",
.item_name = av_default_item_name,
- .option = ff_ac3_enc_options,
+ .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT,
};
@@ -92,9 +94,10 @@
*
* @param s AC-3 encoder private context
*/
-static av_cold void ac3_float_mdct_end(AC3EncodeContext *s)
+av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
{
ff_mdct_end(&s->mdct);
+ av_freep(&s->mdct_window);
}
@@ -104,27 +107,31 @@
* @param s AC-3 encoder private context
* @return 0 on success, negative error code on failure
*/
-static av_cold int ac3_float_mdct_init(AC3EncodeContext *s)
+av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
{
- float *window = av_malloc_array(AC3_BLOCK_SIZE, sizeof(*window));
+ float *window;
+ int i, n, n2;
+
+ n = 1 << 9;
+ n2 = n >> 1;
+
+ window = av_malloc_array(n, sizeof(*window));
if (!window) {
av_log(s->avctx, AV_LOG_ERROR, "Cannot allocate memory.\n");
return AVERROR(ENOMEM);
}
-
- ff_kbd_window_init(window, 5.0, AC3_BLOCK_SIZE);
+ ff_kbd_window_init(window, 5.0, n2);
+ for (i = 0; i < n2; i++)
+ window[n-1-i] = window[i];
s->mdct_window = window;
- return ff_mdct_init(&s->mdct, 9, 0, -2.0 / AC3_WINDOW_SIZE);
+ return ff_mdct_init(&s->mdct, 9, 0, -2.0 / n);
}
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
{
AC3EncodeContext *s = avctx->priv_data;
- s->mdct_end = ac3_float_mdct_end;
- s->mdct_init = ac3_float_mdct_init;
- s->allocate_sample_buffers = allocate_sample_buffers;
s->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT);
if (!s->fdsp)
return AVERROR(ENOMEM);
@@ -145,6 +152,6 @@
.priv_class = &ac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
- .defaults = ff_ac3_enc_defaults,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .defaults = ac3_defaults,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/ac3enc_opts_template.c b/libavcodec/ac3enc_opts_template.c
new file mode 100644
index 0000000..57b65a7
--- /dev/null
+++ b/libavcodec/ac3enc_opts_template.c
@@ -0,0 +1,82 @@
+/*
+ * AC-3 encoder options
+ * Copyright (c) 2011 Justin Ruggles <justin.ruggles@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
+ */
+
+#include "libavutil/opt.h"
+#include "internal.h"
+#include "ac3.h"
+
+static const AVOption ac3_options[] = {
+/* Metadata Options */
+{"per_frame_metadata", "Allow Changing Metadata Per-Frame", OFFSET(allow_per_frame_metadata), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, AC3ENC_PARAM},
+#if AC3ENC_TYPE != AC3ENC_TYPE_EAC3
+/* AC-3 downmix levels */
+{"center_mixlev", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_4POINT5DB }, 0.0, 1.0, AC3ENC_PARAM},
+{"surround_mixlev", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = LEVEL_MINUS_6DB }, 0.0, 1.0, AC3ENC_PARAM},
+#endif
+/* audio production information */
+{"mixing_level", "Mixing Level", OFFSET(mixing_level), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 111, AC3ENC_PARAM},
+{"room_type", "Room Type", OFFSET(room_type), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_SMALL_ROOM, AC3ENC_PARAM, "room_type"},
+ {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
+ {"large", "Large Room", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_LARGE_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
+ {"small", "Small Room", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_SMALL_ROOM }, INT_MIN, INT_MAX, AC3ENC_PARAM, "room_type"},
+/* other metadata options */
+{"copyright", "Copyright Bit", OFFSET(copyright), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM},
+{"dialnorm", "Dialogue Level (dB)", OFFSET(dialogue_level), AV_OPT_TYPE_INT, {.i64 = -31 }, -31, -1, AC3ENC_PARAM},
+{"dsur_mode", "Dolby Surround Mode", OFFSET(dolby_surround_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dsur_mode"},
+ {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
+ {"on", "Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
+ {"off", "Not Dolby Surround Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsur_mode"},
+{"original", "Original Bit Stream", OFFSET(original), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, 1, AC3ENC_PARAM},
+/* extended bitstream information */
+{"dmix_mode", "Preferred Stereo Downmix Mode", OFFSET(preferred_stereo_downmix), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_DOWNMIX_DPLII, AC3ENC_PARAM, "dmix_mode"},
+ {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
+ {"ltrt", "Lt/Rt Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_LTRT }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
+ {"loro", "Lo/Ro Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_LORO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
+ {"dplii", "Dolby Pro Logic II Downmix Preferred", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DOWNMIX_DPLII }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dmix_mode"},
+{"ltrt_cmixlev", "Lt/Rt Center Mix Level", OFFSET(ltrt_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
+{"ltrt_surmixlev", "Lt/Rt Surround Mix Level", OFFSET(ltrt_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
+{"loro_cmixlev", "Lo/Ro Center Mix Level", OFFSET(loro_center_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
+{"loro_surmixlev", "Lo/Ro Surround Mix Level", OFFSET(loro_surround_mix_level), AV_OPT_TYPE_FLOAT, {.dbl = -1.0 }, -1.0, 2.0, AC3ENC_PARAM},
+{"dsurex_mode", "Dolby Surround EX Mode", OFFSET(dolby_surround_ex_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_DSUREX_DPLIIZ, AC3ENC_PARAM, "dsurex_mode"},
+ {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
+ {"on", "Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
+ {"off", "Not Dolby Surround EX Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
+ {"dpliiz", "Dolby Pro Logic IIz-encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_DSUREX_DPLIIZ }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dsurex_mode"},
+{"dheadphone_mode", "Dolby Headphone Mode", OFFSET(dolby_headphone_mode), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_MODE_ON, AC3ENC_PARAM, "dheadphone_mode"},
+ {"notindicated", "Not Indicated (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_NOT_INDICATED }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
+ {"on", "Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_ON }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
+ {"off", "Not Dolby Headphone Encoded", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_MODE_OFF }, INT_MIN, INT_MAX, AC3ENC_PARAM, "dheadphone_mode"},
+{"ad_conv_type", "A/D Converter Type", OFFSET(ad_converter_type), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_NONE }, AC3ENC_OPT_NONE, AC3ENC_OPT_ADCONV_HDCD, AC3ENC_PARAM, "ad_conv_type"},
+ {"standard", "Standard (default)", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_ADCONV_STANDARD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
+ {"hdcd", "HDCD", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_ADCONV_HDCD }, INT_MIN, INT_MAX, AC3ENC_PARAM, "ad_conv_type"},
+/* Other Encoding Options */
+{"stereo_rematrixing", "Stereo Rematrixing", OFFSET(stereo_rematrixing), AV_OPT_TYPE_BOOL, {.i64 = 1 }, 0, 1, AC3ENC_PARAM},
+{"channel_coupling", "Channel Coupling", OFFSET(channel_coupling), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, AC3ENC_OPT_ON, AC3ENC_PARAM, "channel_coupling"},
+ {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "channel_coupling"},
+{"cpl_start_band", "Coupling Start Band", OFFSET(cpl_start), AV_OPT_TYPE_INT, {.i64 = AC3ENC_OPT_AUTO }, AC3ENC_OPT_AUTO, 15, AC3ENC_PARAM, "cpl_start_band"},
+ {"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = AC3ENC_OPT_AUTO }, INT_MIN, INT_MAX, AC3ENC_PARAM, "cpl_start_band"},
+{NULL}
+};
+
+static const AVCodecDefault ac3_defaults[] = {
+ { "b", "0" },
+ { NULL }
+};
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index 5ecef3b..b85fe51 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -30,7 +30,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "audiodsp.h"
#include "internal.h"
@@ -38,7 +37,7 @@
#include "eac3enc.h"
-static int allocate_sample_buffers(AC3EncodeContext *s)
+int AC3_NAME(allocate_sample_buffers)(AC3EncodeContext *s)
{
int ch;
@@ -91,14 +90,19 @@
AC3Block *block = &s->blocks[blk];
const SampleType *input_samples = &s->planar_samples[ch][blk * AC3_BLOCK_SIZE];
+#if CONFIG_AC3ENC_FLOAT
s->fdsp->vector_fmul(s->windowed_samples, input_samples,
- s->mdct_window, AC3_BLOCK_SIZE);
- s->fdsp->vector_fmul_reverse(s->windowed_samples + AC3_BLOCK_SIZE,
- &input_samples[AC3_BLOCK_SIZE],
- s->mdct_window, AC3_BLOCK_SIZE);
+ s->mdct_window, AC3_WINDOW_SIZE);
+#else
+ s->ac3dsp.apply_window_int16(s->windowed_samples, input_samples,
+ s->mdct_window, AC3_WINDOW_SIZE);
- s->mdct.mdct_calc(&s->mdct, block->mdct_coef[ch+1],
- s->windowed_samples);
+ if (s->fixed_point)
+ block->coeff_shift[ch+1] = normalize_samples(s);
+#endif
+
+ s->mdct.mdct_calcw(&s->mdct, block->mdct_coef[ch+1],
+ s->windowed_samples);
}
}
}
@@ -110,7 +114,7 @@
static void apply_channel_coupling(AC3EncodeContext *s)
{
LOCAL_ALIGNED_16(CoefType, cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
-#if AC3ENC_FLOAT
+#if CONFIG_AC3ENC_FLOAT
LOCAL_ALIGNED_16(int32_t, fixed_cpl_coords, [AC3_MAX_BLOCKS], [AC3_MAX_CHANNELS][16]);
#else
int32_t (*fixed_cpl_coords)[AC3_MAX_CHANNELS][16] = cpl_coords;
@@ -120,7 +124,7 @@
int cpl_start, num_cpl_coefs;
memset(cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*cpl_coords));
-#if AC3ENC_FLOAT
+#if CONFIG_AC3ENC_FLOAT
memset(fixed_cpl_coords, 0, AC3_MAX_BLOCKS * sizeof(*cpl_coords));
#endif
@@ -261,7 +265,7 @@
if (!block->cpl_in_use)
continue;
-#if AC3ENC_FLOAT
+#if CONFIG_AC3ENC_FLOAT
s->ac3dsp.float_to_fixed24(fixed_cpl_coords[blk][1],
cpl_coords[blk][1],
s->fbw_channels * 16);
@@ -307,7 +311,7 @@
}
}
- if (AC3ENC_FLOAT && CONFIG_EAC3_ENCODER && s->eac3)
+ if (CONFIG_EAC3_ENCODER && s->eac3)
ff_eac3_set_cpl_states(s);
}
@@ -379,13 +383,19 @@
return ret;
}
- if (s->bit_alloc.sr_code == 1 || (AC3ENC_FLOAT && s->eac3))
+ if (s->bit_alloc.sr_code == 1 || s->eac3)
ff_ac3_adjust_frame_size(s);
copy_input_samples(s, (SampleType **)frame->extended_data);
apply_mdct(s);
+ if (s->fixed_point)
+ scale_coefficients(s);
+
+ clip_coefficients(&s->adsp, s->blocks[0].mdct_coef[1],
+ AC3_MAX_COEFS * s->num_blocks * s->channels);
+
s->cpl_on = s->cpl_enabled;
ff_ac3_compute_coupling_strategy(s);
@@ -394,9 +404,30 @@
compute_rematrixing_strategy(s);
-#if AC3ENC_FLOAT
- scale_coefficients(s);
-#endif
+ if (!s->fixed_point)
+ scale_coefficients(s);
- return ff_ac3_encode_frame_common_end(avctx, avpkt, frame, got_packet_ptr);
+ ff_ac3_apply_rematrixing(s);
+
+ ff_ac3_process_exponents(s);
+
+ ret = ff_ac3_compute_bit_allocation(s);
+ if (ret) {
+ av_log(avctx, AV_LOG_ERROR, "Bit allocation failed. Try increasing the bitrate.\n");
+ return ret;
+ }
+
+ ff_ac3_group_exponents(s);
+
+ ff_ac3_quantize_mantissas(s);
+
+ if ((ret = ff_alloc_packet2(avctx, avpkt, s->frame_size, 0)) < 0)
+ return ret;
+ ff_ac3_output_frame(s, avpkt->data);
+
+ if (frame->pts != AV_NOPTS_VALUE)
+ avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->initial_padding);
+
+ *got_packet_ptr = 1;
+ return 0;
}
diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c
index e53086a..ef2a41b 100644
--- a/libavcodec/ac3tab.c
+++ b/libavcodec/ac3tab.c
@@ -25,7 +25,7 @@
*/
#include "libavutil/channel_layout.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "avcodec.h"
#include "ac3tab.h"
@@ -97,6 +97,24 @@
AV_CH_LAYOUT_5POINT0
};
+#define COMMON_CHANNEL_MAP \
+ { { 0, 1, }, { 0, 1, 2, } },\
+ { { 0, }, { 0, 1, } },\
+ { { 0, 1, }, { 0, 1, 2, } },\
+ { { 0, 2, 1, }, { 0, 2, 1, 3, } },\
+ { { 0, 1, 2, }, { 0, 1, 3, 2, } },\
+ { { 0, 2, 1, 3, }, { 0, 2, 1, 4, 3, } },
+
+/**
+ * Table to remap channels from SMPTE order to AC-3 order.
+ * [channel_mode][lfe][ch]
+ */
+const uint8_t ff_ac3_enc_channel_map[8][2][6] = {
+ COMMON_CHANNEL_MAP
+ { { 0, 1, 2, 3, }, { 0, 1, 3, 4, 2, } },
+ { { 0, 2, 1, 3, 4, }, { 0, 2, 1, 4, 5, 3 } },
+};
+
/**
* Table to remap channels from AC-3 order to SMPTE order.
* [channel_mode][lfe][ch]
@@ -129,6 +147,44 @@
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1
};
+/* AC-3 MDCT window */
+
+/* MDCT window */
+DECLARE_ALIGNED(16, const int16_t, ff_ac3_window)[AC3_WINDOW_SIZE/2] = {
+ 4, 7, 12, 16, 21, 28, 34, 42,
+ 51, 61, 72, 84, 97, 111, 127, 145,
+ 164, 184, 207, 231, 257, 285, 315, 347,
+ 382, 419, 458, 500, 544, 591, 641, 694,
+ 750, 810, 872, 937, 1007, 1079, 1155, 1235,
+ 1318, 1406, 1497, 1593, 1692, 1796, 1903, 2016,
+ 2132, 2253, 2379, 2509, 2644, 2783, 2927, 3076,
+ 3230, 3389, 3552, 3721, 3894, 4072, 4255, 4444,
+ 4637, 4835, 5038, 5246, 5459, 5677, 5899, 6127,
+ 6359, 6596, 6837, 7083, 7334, 7589, 7848, 8112,
+ 8380, 8652, 8927, 9207, 9491, 9778,10069,10363,
+10660,10960,11264,11570,11879,12190,12504,12820,
+13138,13458,13780,14103,14427,14753,15079,15407,
+15735,16063,16392,16720,17049,17377,17705,18032,
+18358,18683,19007,19330,19651,19970,20287,20602,
+20914,21225,21532,21837,22139,22438,22733,23025,
+23314,23599,23880,24157,24430,24699,24964,25225,
+25481,25732,25979,26221,26459,26691,26919,27142,
+27359,27572,27780,27983,28180,28373,28560,28742,
+28919,29091,29258,29420,29577,29729,29876,30018,
+30155,30288,30415,30538,30657,30771,30880,30985,
+31086,31182,31274,31363,31447,31528,31605,31678,
+31747,31814,31877,31936,31993,32046,32097,32145,
+32190,32232,32272,32310,32345,32378,32409,32438,
+32465,32490,32513,32535,32556,32574,32592,32608,
+32623,32636,32649,32661,32671,32681,32690,32698,
+32705,32712,32718,32724,32729,32733,32737,32741,
+32744,32747,32750,32752,32754,32756,32757,32759,
+32760,32761,32762,32763,32764,32764,32765,32765,
+32766,32766,32766,32766,32767,32767,32767,32767,
+32767,32767,32767,32767,32767,32767,32767,32767,
+32767,32767,32767,32767,32767,32767,32767,32767,
+};
+
const uint8_t ff_ac3_log_add_tab[260]= {
0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37,
0x36,0x35,0x34,0x34,0x33,0x32,0x31,0x30,0x2f,0x2f,
@@ -245,6 +301,19 @@
0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400,
};
+/**
+ * Default channel map for a dependent substream defined by acmod
+ */
+const uint16_t ff_eac3_default_chmap[8] = {
+ AC3_CHMAP_L | AC3_CHMAP_R, // FIXME Ch1+Ch2
+ AC3_CHMAP_C,
+ AC3_CHMAP_L | AC3_CHMAP_R,
+ AC3_CHMAP_L | AC3_CHMAP_C | AC3_CHMAP_R,
+ AC3_CHMAP_L | AC3_CHMAP_R | AC3_CHMAP_C_SUR,
+ AC3_CHMAP_L | AC3_CHMAP_C | AC3_CHMAP_R | AC3_CHMAP_C_SUR,
+ AC3_CHMAP_L | AC3_CHMAP_R | AC3_CHMAP_L_SUR | AC3_CHMAP_R_SUR,
+ AC3_CHMAP_L | AC3_CHMAP_C | AC3_CHMAP_R | AC3_CHMAP_L_SUR | AC3_CHMAP_R_SUR
+};
const uint64_t ff_eac3_custom_channel_map_locations[16][2] = {
{ 1, AV_CH_FRONT_LEFT },
{ 1, AV_CH_FRONT_CENTER },
diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h
index ea8e334..1d1264e 100644
--- a/libavcodec/ac3tab.h
+++ b/libavcodec/ac3tab.h
@@ -31,11 +31,13 @@
extern const uint16_t ff_ac3_frame_size_tab[38][3];
extern const uint8_t ff_ac3_channels_tab[8];
extern av_export_avcodec const uint16_t avpriv_ac3_channel_layout_tab[8];
+extern const uint8_t ff_ac3_enc_channel_map[8][2][6];
extern const uint8_t ff_ac3_dec_channel_map[8][2][6];
extern const int ff_ac3_sample_rate_tab[];
extern const uint16_t ff_ac3_bitrate_tab[19];
extern const uint8_t ff_ac3_rematrix_band_tab[5];
extern const uint8_t ff_eac3_default_cpl_band_struct[18];
+extern const int16_t ff_ac3_window[AC3_WINDOW_SIZE/2];
extern const uint8_t ff_ac3_log_add_tab[260];
extern const uint16_t ff_ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3];
extern const uint8_t ff_ac3_bap_tab[64];
@@ -45,6 +47,7 @@
extern const uint16_t ff_ac3_db_per_bit_tab[4];
extern const int16_t ff_ac3_floor_tab[8];
extern const uint16_t ff_ac3_fast_gain_tab[8];
+extern const uint16_t ff_eac3_default_chmap[8];
extern const uint8_t ff_ac3_band_start_tab[AC3_CRITICAL_BANDS+1];
extern const uint8_t ff_ac3_bin_to_band_tab[253];
extern const uint64_t ff_eac3_custom_channel_map_locations[16][2];
@@ -65,12 +68,4 @@
AC3_CHMAP_LFE = 1<<(15-15)
};
-#define COMMON_CHANNEL_MAP \
- { { 0, 1, }, { 0, 1, 2, } },\
- { { 0, }, { 0, 1, } },\
- { { 0, 1, }, { 0, 1, 2, } },\
- { { 0, 2, 1, }, { 0, 2, 1, 3, } },\
- { { 0, 1, 2, }, { 0, 1, 3, 2, } },\
- { { 0, 2, 1, 3, }, { 0, 2, 1, 4, 3, } },
-
#endif /* AVCODEC_AC3TAB_H */
diff --git a/libavcodec/acelp_pitch_delay.c b/libavcodec/acelp_pitch_delay.c
index 1eca97e..a070d1b 100644
--- a/libavcodec/acelp_pitch_delay.c
+++ b/libavcodec/acelp_pitch_delay.c
@@ -29,6 +29,47 @@
#include "celp_math.h"
#include "audiodsp.h"
+int ff_acelp_decode_8bit_to_1st_delay3(int ac_index)
+{
+ ac_index += 58;
+ if(ac_index > 254)
+ ac_index = 3 * ac_index - 510;
+ return ac_index;
+}
+
+int ff_acelp_decode_4bit_to_2nd_delay3(
+ int ac_index,
+ int pitch_delay_min)
+{
+ if(ac_index < 4)
+ return 3 * (ac_index + pitch_delay_min);
+ else if(ac_index < 12)
+ return 3 * pitch_delay_min + ac_index + 6;
+ else
+ return 3 * (ac_index + pitch_delay_min) - 18;
+}
+
+int ff_acelp_decode_5_6_bit_to_2nd_delay3(
+ int ac_index,
+ int pitch_delay_min)
+{
+ return 3 * pitch_delay_min + ac_index - 2;
+}
+
+int ff_acelp_decode_9bit_to_1st_delay6(int ac_index)
+{
+ if(ac_index < 463)
+ return ac_index + 105;
+ else
+ return 6 * (ac_index - 368);
+}
+int ff_acelp_decode_6bit_to_2nd_delay6(
+ int ac_index,
+ int pitch_delay_min)
+{
+ return 6 * pitch_delay_min + ac_index - 3;
+}
+
void ff_acelp_update_past_gain(
int16_t* quant_energy,
int gain_corr_factor,
diff --git a/libavcodec/acelp_pitch_delay.h b/libavcodec/acelp_pitch_delay.h
index 73fa3c3..2aade2f 100644
--- a/libavcodec/acelp_pitch_delay.h
+++ b/libavcodec/acelp_pitch_delay.h
@@ -41,13 +41,7 @@
* with 1/3 resolution, 19 < pitch_delay < 85
* integers only, 85 <= pitch_delay <= 143
*/
-static inline int ff_acelp_decode_8bit_to_1st_delay3(int ac_index)
-{
- ac_index += 58;
- if (ac_index > 254)
- ac_index = 3 * ac_index - 510;
- return ac_index;
-}
+int ff_acelp_decode_8bit_to_1st_delay3(int ac_index);
/**
* @brief Decode pitch delay of the second subframe encoded by 5 or 6 bits
@@ -64,11 +58,9 @@
* @remark The routine is used in G.729 @@8k, AMR @@10.2k, AMR @@7.95k,
* AMR @@7.4k for the second subframe.
*/
-static inline int ff_acelp_decode_5_6_bit_to_2nd_delay3(int ac_index,
- int pitch_delay_min)
-{
- return 3 * pitch_delay_min + ac_index - 2;
-}
+int ff_acelp_decode_5_6_bit_to_2nd_delay3(
+ int ac_index,
+ int pitch_delay_min);
/**
* @brief Decode pitch delay with 1/3 precision.
@@ -86,16 +78,9 @@
* @remark The routine is used in G.729 @@6.4k, AMR @@6.7k, AMR @@5.9k,
* AMR @@5.15k, AMR @@4.75k for the second subframe.
*/
-static inline int ff_acelp_decode_4bit_to_2nd_delay3(int ac_index,
- int pitch_delay_min)
-{
- if (ac_index < 4)
- return 3 * (ac_index + pitch_delay_min);
- else if (ac_index < 12)
- return 3 * pitch_delay_min + ac_index + 6;
- else
- return 3 * (ac_index + pitch_delay_min) - 18;
-}
+int ff_acelp_decode_4bit_to_2nd_delay3(
+ int ac_index,
+ int pitch_delay_min);
/**
* @brief Decode pitch delay of the first subframe encoded by 9 bits
@@ -110,13 +95,7 @@
*
* @remark The routine is used in AMR @@12.2k for the first and third subframes.
*/
-static inline int ff_acelp_decode_9bit_to_1st_delay6(int ac_index)
-{
- if (ac_index < 463)
- return ac_index + 105;
- else
- return 6 * (ac_index - 368);
-}
+int ff_acelp_decode_9bit_to_1st_delay6(int ac_index);
/**
* @brief Decode pitch delay of the second subframe encoded by 6 bits
@@ -132,11 +111,9 @@
*
* @remark The routine is used in AMR @@12.2k for the second and fourth subframes.
*/
-static inline int ff_acelp_decode_6bit_to_2nd_delay6(int ac_index,
- int pitch_delay_min)
-{
- return 6 * pitch_delay_min + ac_index - 3;
-}
+int ff_acelp_decode_6bit_to_2nd_delay6(
+ int ac_index,
+ int pitch_delay_min);
/**
* @brief Update past quantized energies
diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c
index 0d4de0e..798217d 100644
--- a/libavcodec/acelp_vectors.c
+++ b/libavcodec/acelp_vectors.c
@@ -28,6 +28,17 @@
#include "avcodec.h"
#include "acelp_vectors.h"
+const uint8_t ff_fc_2pulses_9bits_track1[16] =
+{
+ 1, 3,
+ 6, 8,
+ 11, 13,
+ 16, 18,
+ 21, 23,
+ 26, 28,
+ 31, 33,
+ 36, 38
+};
const uint8_t ff_fc_2pulses_9bits_track1_gray[16] =
{
1, 3,
diff --git a/libavcodec/acelp_vectors.h b/libavcodec/acelp_vectors.h
index c2587c5..fae834d 100644
--- a/libavcodec/acelp_vectors.h
+++ b/libavcodec/acelp_vectors.h
@@ -102,6 +102,7 @@
*
* Used in G.729 @@6.4k (with gray coding), AMR @@5.9k (without gray coding)
*/
+extern const uint8_t ff_fc_2pulses_9bits_track1[16];
extern const uint8_t ff_fc_2pulses_9bits_track1_gray[16];
/**
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index 94de3ee..35b20c5 100644
--- a/libavcodec/adxdec.c
+++ b/libavcodec/adxdec.c
@@ -103,7 +103,7 @@
const uint8_t *buf = avpkt->data;
const uint8_t *buf_end = buf + avpkt->size;
int num_blocks, ch, ret;
- buffer_size_t new_extradata_size;
+ int new_extradata_size;
uint8_t *new_extradata;
new_extradata = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,
diff --git a/libavcodec/agm.c b/libavcodec/agm.c
index f393831..f60cbf1 100644
--- a/libavcodec/agm.c
+++ b/libavcodec/agm.c
@@ -26,8 +26,6 @@
#define BITSTREAM_READER_LE
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "bytestream.h"
#include "copy_block.h"
diff --git a/libavcodec/aic.c b/libavcodec/aic.c
index cf5b078..f027fa9 100644
--- a/libavcodec/aic.c
+++ b/libavcodec/aic.c
@@ -22,8 +22,6 @@
#include <inttypes.h>
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 2e9a358..f00d524 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -109,7 +109,6 @@
extern AVCodec ff_eightsvx_fib_decoder;
extern AVCodec ff_escape124_decoder;
extern AVCodec ff_escape130_decoder;
-extern AVCodec ff_exr_encoder;
extern AVCodec ff_exr_decoder;
extern AVCodec ff_ffv1_encoder;
extern AVCodec ff_ffv1_decoder;
@@ -240,7 +239,6 @@
extern AVCodec ff_pbm_decoder;
extern AVCodec ff_pcx_encoder;
extern AVCodec ff_pcx_decoder;
-extern AVCodec ff_pfm_encoder;
extern AVCodec ff_pfm_decoder;
extern AVCodec ff_pgm_encoder;
extern AVCodec ff_pgm_decoder;
@@ -289,12 +287,10 @@
extern AVCodec ff_sanm_decoder;
extern AVCodec ff_scpr_decoder;
extern AVCodec ff_screenpresso_decoder;
-extern AVCodec ff_sga_decoder;
extern AVCodec ff_sgi_encoder;
extern AVCodec ff_sgi_decoder;
extern AVCodec ff_sgirle_decoder;
extern AVCodec ff_sheervideo_decoder;
-extern AVCodec ff_simbiosis_imx_decoder;
extern AVCodec ff_smacker_decoder;
extern AVCodec ff_smc_decoder;
extern AVCodec ff_smvjpeg_decoder;
@@ -569,7 +565,6 @@
extern AVCodec ff_pcm_s64be_decoder;
extern AVCodec ff_pcm_s64le_encoder;
extern AVCodec ff_pcm_s64le_decoder;
-extern AVCodec ff_pcm_sga_decoder;
extern AVCodec ff_pcm_u8_encoder;
extern AVCodec ff_pcm_u8_decoder;
extern AVCodec ff_pcm_u16be_encoder;
@@ -691,7 +686,6 @@
extern AVCodec ff_subviewer1_decoder;
extern AVCodec ff_text_encoder;
extern AVCodec ff_text_decoder;
-extern AVCodec ff_ttml_encoder;
extern AVCodec ff_vplayer_decoder;
extern AVCodec ff_webvtt_encoder;
extern AVCodec ff_webvtt_decoder;
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index a8c3433..c318ad0 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -762,7 +762,7 @@
}
for (k = 2; k < opt_order; k++)
- quant_cof[k] = (quant_cof[k] * (1U << 14)) + (add_base << 13);
+ quant_cof[k] = (quant_cof[k] * (1 << 14)) + (add_base << 13);
}
}
@@ -1016,10 +1016,6 @@
ALSSpecificConfig *sconf = &ctx->sconf;
*bd->shift_lsbs = 0;
-
- if (get_bits_left(gb) < 1)
- return AVERROR_INVALIDDATA;
-
// read block type flag and read the samples accordingly
if (get_bits1(gb)) {
ret = read_var_block_data(ctx, bd);
diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c
index a1225c0..bb224c5 100644
--- a/libavcodec/amfenc_hevc.c
+++ b/libavcodec/amfenc_hevc.c
@@ -298,8 +298,6 @@
{ "b", "2M" },
{ "g", "250" },
{ "slices", "1" },
- { "qmin", "-1" },
- { "qmax", "-1" },
{ NULL },
};
static const AVClass hevc_amf_class = {
diff --git a/libavcodec/amrnbdata.h b/libavcodec/amrnbdata.h
index 20b7a64..435fd99 100644
--- a/libavcodec/amrnbdata.h
+++ b/libavcodec/amrnbdata.h
@@ -1424,6 +1424,11 @@
// fixed tables
+/**
+ * number of pulses per mode
+ */
+static const uint8_t pulses_nb_per_mode[] = {2, 2, 2, 3, 4, 4, 8, 10};
+
/** track start positions for algebraic code book routines */
static const uint8_t track_position[16] = {
0, 2, 0, 3, 0, 2, 0, 3, 1, 3, 2, 4, 1, 4, 1, 4
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index e0c6b6b..8fe7b5e 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -243,7 +243,6 @@
av_log(avctx, AV_LOG_ERROR, "Only mono and stereo is supported\n");
return AVERROR(EINVAL);
}
- avctx->bits_per_raw_sample =
s->bps = avctx->bits_per_coded_sample;
switch (s->bps) {
case 8:
@@ -1334,7 +1333,7 @@
/* Version 3.98 and later files */
/* Update the adaption coefficients */
- absres = FFABSU(res);
+ absres = FFABS(res);
if (absres)
*f->adaptcoeffs = APESIGN(res) *
(8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3)));
diff --git a/libavcodec/argo.c b/libavcodec/argo.c
index 7358d10..6b4d449 100644
--- a/libavcodec/argo.c
+++ b/libavcodec/argo.c
@@ -565,7 +565,7 @@
GetByteContext *gb = &s->gb;
const int w = frame->width;
const int h = frame->height;
- const int l = frame->linesize[0];
+ const int l = frame->linesize[0] / 4;
uint8_t *dst = frame->data[0];
int pos = 0, y = 0;
diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index c4ab93a..c6be814 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -5,7 +5,8 @@
arm/ac3dsp_arm.o
OBJS-$(CONFIG_AUDIODSP) += arm/audiodsp_init_arm.o
OBJS-$(CONFIG_BLOCKDSP) += arm/blockdsp_init_arm.o
-OBJS-$(CONFIG_FFT) += arm/fft_init_arm.o
+OBJS-$(CONFIG_FFT) += arm/fft_init_arm.o \
+ arm/fft_fixed_init_arm.o
OBJS-$(CONFIG_FLACDSP) += arm/flacdsp_init_arm.o \
arm/flacdsp_arm.o
OBJS-$(CONFIG_FMTCONVERT) += arm/fmtconvert_init_arm.o
@@ -107,7 +108,8 @@
arm/int_neon.o
NEON-OBJS-$(CONFIG_BLOCKDSP) += arm/blockdsp_init_neon.o \
arm/blockdsp_neon.o
-NEON-OBJS-$(CONFIG_FFT) += arm/fft_neon.o
+NEON-OBJS-$(CONFIG_FFT) += arm/fft_neon.o \
+ arm/fft_fixed_neon.o
NEON-OBJS-$(CONFIG_FMTCONVERT) += arm/fmtconvert_neon.o
NEON-OBJS-$(CONFIG_G722DSP) += arm/g722dsp_neon.o
NEON-OBJS-$(CONFIG_H264CHROMA) += arm/h264cmc_neon.o
@@ -121,7 +123,8 @@
NEON-OBJS-$(CONFIG_IDCTDSP) += arm/idctdsp_init_neon.o \
arm/idctdsp_neon.o \
arm/simple_idct_neon.o
-NEON-OBJS-$(CONFIG_MDCT) += arm/mdct_neon.o
+NEON-OBJS-$(CONFIG_MDCT) += arm/mdct_neon.o \
+ arm/mdct_fixed_neon.o
NEON-OBJS-$(CONFIG_MPEGVIDEO) += arm/mpegvideo_neon.o
NEON-OBJS-$(CONFIG_PIXBLOCKDSP) += arm/pixblockdsp_neon.o
NEON-OBJS-$(CONFIG_RDFT) += arm/rdft_neon.o
diff --git a/libavcodec/arm/ac3dsp_init_arm.c b/libavcodec/arm/ac3dsp_init_arm.c
index 9217a7d..a3c32ff 100644
--- a/libavcodec/arm/ac3dsp_init_arm.c
+++ b/libavcodec/arm/ac3dsp_init_arm.c
@@ -26,8 +26,13 @@
#include "config.h"
void ff_ac3_exponent_min_neon(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
+int ff_ac3_max_msb_abs_int16_neon(const int16_t *src, int len);
+void ff_ac3_lshift_int16_neon(int16_t *src, unsigned len, unsigned shift);
+void ff_ac3_rshift_int32_neon(int32_t *src, unsigned len, unsigned shift);
void ff_float_to_fixed24_neon(int32_t *dst, const float *src, unsigned int len);
void ff_ac3_extract_exponents_neon(uint8_t *exp, int32_t *coef, int nb_coefs);
+void ff_apply_window_int16_neon(int16_t *dst, const int16_t *src,
+ const int16_t *window, unsigned n);
void ff_ac3_sum_square_butterfly_int32_neon(int64_t sum[4],
const int32_t *coef0,
const int32_t *coef1,
@@ -56,8 +61,12 @@
if (have_neon(cpu_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_neon;
+ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_neon;
+ c->ac3_lshift_int16 = ff_ac3_lshift_int16_neon;
+ c->ac3_rshift_int32 = ff_ac3_rshift_int32_neon;
c->float_to_fixed24 = ff_float_to_fixed24_neon;
c->extract_exponents = ff_ac3_extract_exponents_neon;
+ c->apply_window_int16 = ff_apply_window_int16_neon;
c->sum_square_butterfly_int32 = ff_ac3_sum_square_butterfly_int32_neon;
c->sum_square_butterfly_float = ff_ac3_sum_square_butterfly_float_neon;
}
diff --git a/libavcodec/arm/fft_fixed_init_arm.c b/libavcodec/arm/fft_fixed_init_arm.c
new file mode 100644
index 0000000..11226d6
--- /dev/null
+++ b/libavcodec/arm/fft_fixed_init_arm.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2009 Mans Rullgard <mans@mansr.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
+ */
+
+#include "libavutil/attributes.h"
+#include "libavutil/cpu.h"
+#include "libavutil/arm/cpu.h"
+
+#define FFT_FLOAT 0
+#include "libavcodec/fft.h"
+
+void ff_fft_fixed_calc_neon(FFTContext *s, FFTComplex *z);
+void ff_mdct_fixed_calc_neon(FFTContext *s, FFTSample *o, const FFTSample *i);
+void ff_mdct_fixed_calcw_neon(FFTContext *s, FFTDouble *o, const FFTSample *i);
+
+av_cold void ff_fft_fixed_init_arm(FFTContext *s)
+{
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_neon(cpu_flags)) {
+ s->fft_permutation = FF_FFT_PERM_SWAP_LSBS;
+#if CONFIG_FFT
+ s->fft_calc = ff_fft_fixed_calc_neon;
+#endif
+
+#if CONFIG_MDCT
+ if (!s->inverse && s->nbits >= 3) {
+ s->mdct_permutation = FF_MDCT_PERM_INTERLEAVE;
+ s->mdct_calc = ff_mdct_fixed_calc_neon;
+ s->mdct_calcw = ff_mdct_fixed_calcw_neon;
+ }
+#endif
+ }
+}
diff --git a/libavcodec/arm/fft_fixed_neon.S b/libavcodec/arm/fft_fixed_neon.S
new file mode 100644
index 0000000..2651607
--- /dev/null
+++ b/libavcodec/arm/fft_fixed_neon.S
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2011 Mans Rullgard <mans@mansr.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
+ */
+
+#include "libavutil/arm/asm.S"
+
+.macro bflies d0, d1, r0, r1
+ vrev64.32 \r0, \d1 @ t5, t6, t1, t2
+ vhsub.s16 \r1, \d1, \r0 @ t1-t5, t2-t6, t5-t1, t6-t2
+ vhadd.s16 \r0, \d1, \r0 @ t1+t5, t2+t6, t5+t1, t6+t2
+ vext.16 \r1, \r1, \r1, #1 @ t2-t6, t5-t1, t6-t2, t1-t5
+ vtrn.32 \r0, \r1 @ t1+t5, t2+t6, t2-t6, t5-t1
+ @ t5, t6, t4, t3
+ vhsub.s16 \d1, \d0, \r0
+ vhadd.s16 \d0, \d0, \r0
+.endm
+
+.macro transform01 q0, q1, d3, c0, c1, r0, w0, w1
+ vrev32.16 \r0, \d3
+ vmull.s16 \w0, \d3, \c0
+ vmlal.s16 \w0, \r0, \c1
+ vshrn.s32 \d3, \w0, #15
+ bflies \q0, \q1, \w0, \w1
+.endm
+
+.macro transform2 d0, d1, d2, d3, q0, q1, c0, c1, c2, c3, \
+ r0, r1, w0, w1
+ vrev32.16 \r0, \d1
+ vrev32.16 \r1, \d3
+ vmull.s16 \w0, \d1, \c0
+ vmlal.s16 \w0, \r0, \c1
+ vmull.s16 \w1, \d3, \c2
+ vmlal.s16 \w1, \r1, \c3
+ vshrn.s32 \d1, \w0, #15
+ vshrn.s32 \d3, \w1, #15
+ bflies \q0, \q1, \w0, \w1
+.endm
+
+.macro fft4 d0, d1, r0, r1
+ vhsub.s16 \r0, \d0, \d1 @ t3, t4, t8, t7
+ vhsub.s16 \r1, \d1, \d0
+ vhadd.s16 \d0, \d0, \d1 @ t1, t2, t6, t5
+ vmov.i64 \d1, #0xffff00000000
+ vbit \r0, \r1, \d1
+ vrev64.16 \r1, \r0 @ t7, t8, t4, t3
+ vtrn.32 \r0, \r1 @ t3, t4, t7, t8
+ vtrn.32 \d0, \r0 @ t1, t2, t3, t4, t6, t5, t8, t7
+ vhsub.s16 \d1, \d0, \r0 @ r2, i2, r3, i1
+ vhadd.s16 \d0, \d0, \r0 @ r0, i0, r1, i3
+.endm
+
+.macro fft8 d0, d1, d2, d3, q0, q1, c0, c1, r0, r1, w0, w1
+ fft4 \d0, \d1, \r0, \r1
+ vtrn.32 \d0, \d1 @ z0, z2, z1, z3
+ vhadd.s16 \r0, \d2, \d3 @ t1, t2, t3, t4
+ vhsub.s16 \d3, \d2, \d3 @ z5, z7
+ vmov \d2, \r0
+ transform01 \q0, \q1, \d3, \c0, \c1, \r0, \w0, \w1
+.endm
+
+function fft4_neon
+ vld1.16 {d0-d1}, [r0]
+ fft4 d0, d1, d2, d3
+ vst1.16 {d0-d1}, [r0]
+ bx lr
+endfunc
+
+function fft8_neon
+ vld1.16 {d0-d3}, [r0,:128]
+ movrel r1, coefs
+ vld1.16 {d30}, [r1,:64]
+ vdup.16 d31, d30[0]
+ fft8 d0, d1, d2, d3, q0, q1, d31, d30, d20, d21, q8, q9
+ vtrn.32 d0, d1
+ vtrn.32 d2, d3
+ vst1.16 {d0-d3}, [r0,:128]
+ bx lr
+endfunc
+
+function fft16_neon
+ vld1.16 {d0-d3}, [r0,:128]!
+ vld1.16 {d4-d7}, [r0,:128]
+ movrel r1, coefs
+ sub r0, r0, #32
+ vld1.16 {d28-d31},[r1,:128]
+ vdup.16 d31, d28[0]
+ fft8 d0, d1, d2, d3, q0, q1, d31, d28, d20, d21, q8, q9
+ vswp d5, d6
+ fft4 q2, q3, q8, q9
+ vswp d5, d6
+ vtrn.32 q0, q1 @ z0, z4, z2, z6, z1, z5, z3, z7
+ vtrn.32 q2, q3 @ z8, z12,z10,z14,z9, z13,z11,z15
+ vswp d1, d2
+ vdup.16 d31, d28[0]
+ transform01 q0, q2, d5, d31, d28, d20, q8, q9
+ vdup.16 d26, d29[0]
+ vdup.16 d27, d30[0]
+ transform2 d2, d6, d3, d7, q1, q3, d26, d30, d27, d29, \
+ d20, d21, q8, q9
+ vtrn.32 q0, q1
+ vtrn.32 q2, q3
+ vst1.16 {d0-d3}, [r0,:128]!
+ vst1.16 {d4-d7}, [r0,:128]
+ bx lr
+endfunc
+
+function fft_pass_neon
+ push {r4,lr}
+ movrel lr, coefs + 24
+ vld1.16 {d30}, [lr,:64]
+ lsl r12, r2, #3
+ vmov d31, d30
+ add r3, r1, r2, lsl #2
+ mov lr, #-8
+ sub r3, r3, #2
+ mov r4, r0
+ vld1.16 {d27[]}, [r3,:16]
+ sub r3, r3, #6
+ vld1.16 {q0}, [r4,:128], r12
+ vld1.16 {q1}, [r4,:128], r12
+ vld1.16 {q2}, [r4,:128], r12
+ vld1.16 {q3}, [r4,:128], r12
+ vld1.16 {d28}, [r1,:64]!
+ vld1.16 {d29}, [r3,:64], lr
+ vswp d1, d2
+ vswp d5, d6
+ vtrn.32 d0, d1
+ vtrn.32 d4, d5
+ vdup.16 d25, d28[1]
+ vmul.s16 d27, d27, d31
+ transform01 q0, q2, d5, d25, d27, d20, q8, q9
+ b 2f
+1:
+ mov r4, r0
+ vdup.16 d26, d29[0]
+ vld1.16 {q0}, [r4,:128], r12
+ vld1.16 {q1}, [r4,:128], r12
+ vld1.16 {q2}, [r4,:128], r12
+ vld1.16 {q3}, [r4,:128], r12
+ vld1.16 {d28}, [r1,:64]!
+ vld1.16 {d29}, [r3,:64], lr
+ vswp d1, d2
+ vswp d5, d6
+ vtrn.32 d0, d1
+ vtrn.32 d4, d5
+ vdup.16 d24, d28[0]
+ vdup.16 d25, d28[1]
+ vdup.16 d27, d29[3]
+ vmul.s16 q13, q13, q15
+ transform2 d0, d4, d1, d5, q0, q2, d24, d26, d25, d27, \
+ d16, d17, q9, q10
+2:
+ vtrn.32 d2, d3
+ vtrn.32 d6, d7
+ vdup.16 d24, d28[2]
+ vdup.16 d26, d29[2]
+ vdup.16 d25, d28[3]
+ vdup.16 d27, d29[1]
+ vmul.s16 q13, q13, q15
+ transform2 d2, d6, d3, d7, q1, q3, d24, d26, d25, d27, \
+ d16, d17, q9, q10
+ vtrn.32 d0, d1
+ vtrn.32 d2, d3
+ vtrn.32 d4, d5
+ vtrn.32 d6, d7
+ vswp d1, d2
+ vswp d5, d6
+ mov r4, r0
+ vst1.16 {q0}, [r4,:128], r12
+ vst1.16 {q1}, [r4,:128], r12
+ vst1.16 {q2}, [r4,:128], r12
+ vst1.16 {q3}, [r4,:128], r12
+ add r0, r0, #16
+ subs r2, r2, #2
+ bgt 1b
+ pop {r4,pc}
+endfunc
+
+#define F_SQRT1_2 23170
+#define F_COS_16_1 30274
+#define F_COS_16_3 12540
+
+const coefs, align=4
+ .short F_SQRT1_2, -F_SQRT1_2, -F_SQRT1_2, F_SQRT1_2
+ .short F_COS_16_1,-F_COS_16_1,-F_COS_16_1, F_COS_16_1
+ .short F_COS_16_3,-F_COS_16_3,-F_COS_16_3, F_COS_16_3
+ .short 1, -1, -1, 1
+endconst
+
+.macro def_fft n, n2, n4
+function fft\n\()_neon
+ push {r4, lr}
+ mov r4, r0
+ bl fft\n2\()_neon
+ add r0, r4, #\n4*2*4
+ bl fft\n4\()_neon
+ add r0, r4, #\n4*3*4
+ bl fft\n4\()_neon
+ mov r0, r4
+ pop {r4, lr}
+ movrelx r1, X(ff_cos_\n\()_fixed)
+ mov r2, #\n4/2
+ b fft_pass_neon
+endfunc
+.endm
+
+ def_fft 32, 16, 8
+ def_fft 64, 32, 16
+ def_fft 128, 64, 32
+ def_fft 256, 128, 64
+ def_fft 512, 256, 128
+ def_fft 1024, 512, 256
+ def_fft 2048, 1024, 512
+ def_fft 4096, 2048, 1024
+ def_fft 8192, 4096, 2048
+ def_fft 16384, 8192, 4096
+ def_fft 32768, 16384, 8192
+ def_fft 65536, 32768, 16384
+
+function ff_fft_fixed_calc_neon, export=1
+ ldr r2, [r0]
+ sub r2, r2, #2
+ movrel r3, fft_fixed_tab_neon
+ ldr r3, [r3, r2, lsl #2]
+ mov r0, r1
+ bx r3
+endfunc
+
+const fft_fixed_tab_neon, relocate=1
+ .word fft4_neon
+ .word fft8_neon
+ .word fft16_neon
+ .word fft32_neon
+ .word fft64_neon
+ .word fft128_neon
+ .word fft256_neon
+ .word fft512_neon
+ .word fft1024_neon
+ .word fft2048_neon
+ .word fft4096_neon
+ .word fft8192_neon
+ .word fft16384_neon
+ .word fft32768_neon
+ .word fft65536_neon
+endconst
diff --git a/libavcodec/arm/mdct_fixed_neon.S b/libavcodec/arm/mdct_fixed_neon.S
new file mode 100644
index 0000000..365c5e7
--- /dev/null
+++ b/libavcodec/arm/mdct_fixed_neon.S
@@ -0,0 +1,193 @@
+/*
+ * Copyright (c) 2011 Mans Rullgard <mans@mansr.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
+ */
+
+#include "libavutil/arm/asm.S"
+
+.macro prerot dst, rt
+ lsr r3, r6, #2 @ n4
+ add \rt, r4, r6, lsr #1 @ revtab + n4
+ add r9, r3, r3, lsl #1 @ n3
+ add r8, r7, r6 @ tcos + n4
+ add r3, r2, r6, lsr #1 @ in + n4
+ add r9, r2, r9, lsl #1 @ in + n3
+ sub r8, r8, #16
+ sub r10, r3, #16
+ sub r11, r9, #16
+ mov r12, #-16
+1:
+ vld2.16 {d0,d1}, [r9, :128]!
+ vld2.16 {d2,d3}, [r11,:128], r12
+ vld2.16 {d4,d5}, [r3, :128]!
+ vld2.16 {d6,d7}, [r10,:128], r12
+ vld2.16 {d16,d17},[r7, :128]! @ cos, sin
+ vld2.16 {d18,d19},[r8, :128], r12
+ vrev64.16 q1, q1
+ vrev64.16 q3, q3
+ vrev64.16 q9, q9
+ vneg.s16 d0, d0
+ vneg.s16 d2, d2
+ vneg.s16 d16, d16
+ vneg.s16 d18, d18
+ vhsub.s16 d0, d0, d3 @ re
+ vhsub.s16 d4, d7, d4 @ im
+ vhsub.s16 d6, d6, d5
+ vhsub.s16 d2, d2, d1
+ vmull.s16 q10, d0, d16
+ vmlsl.s16 q10, d4, d17
+ vmull.s16 q11, d0, d17
+ vmlal.s16 q11, d4, d16
+ vmull.s16 q12, d6, d18
+ vmlsl.s16 q12, d2, d19
+ vmull.s16 q13, d6, d19
+ vmlal.s16 q13, d2, d18
+ vshrn.s32 d0, q10, #15
+ vshrn.s32 d1, q11, #15
+ vshrn.s32 d2, q12, #15
+ vshrn.s32 d3, q13, #15
+ vzip.16 d0, d1
+ vzip.16 d2, d3
+ ldrh lr, [r4], #2
+ ldrh r2, [\rt, #-2]!
+ add lr, \dst, lr, lsl #2
+ add r2, \dst, r2, lsl #2
+ vst1.32 {d0[0]}, [lr,:32]
+ vst1.32 {d2[0]}, [r2,:32]
+ ldrh lr, [r4], #2
+ ldrh r2, [\rt, #-2]!
+ add lr, \dst, lr, lsl #2
+ add r2, \dst, r2, lsl #2
+ vst1.32 {d0[1]}, [lr,:32]
+ vst1.32 {d2[1]}, [r2,:32]
+ ldrh lr, [r4], #2
+ ldrh r2, [\rt, #-2]!
+ add lr, \dst, lr, lsl #2
+ add r2, \dst, r2, lsl #2
+ vst1.32 {d1[0]}, [lr,:32]
+ vst1.32 {d3[0]}, [r2,:32]
+ ldrh lr, [r4], #2
+ ldrh r2, [\rt, #-2]!
+ add lr, \dst, lr, lsl #2
+ add r2, \dst, r2, lsl #2
+ vst1.32 {d1[1]}, [lr,:32]
+ vst1.32 {d3[1]}, [r2,:32]
+ subs r6, r6, #32
+ bgt 1b
+.endm
+
+function ff_mdct_fixed_calc_neon, export=1
+ push {r1,r4-r11,lr}
+
+ ldr r4, [r0, #8] @ revtab
+ ldr r6, [r0, #16] @ mdct_size; n
+ ldr r7, [r0, #24] @ tcos
+
+ prerot r1, r5
+
+ mov r4, r0
+ bl X(ff_fft_fixed_calc_neon)
+
+ pop {r5}
+ mov r12, #-16
+ ldr r6, [r4, #16] @ mdct_size; n
+ ldr r7, [r4, #24] @ tcos
+ add r5, r5, r6, lsr #1
+ add r7, r7, r6, lsr #1
+ sub r1, r5, #16
+ sub r2, r7, #16
+1:
+ vld2.16 {d4,d5}, [r7,:128]!
+ vld2.16 {d6,d7}, [r2,:128], r12
+ vld2.16 {d0,d1}, [r5,:128]
+ vld2.16 {d2,d3}, [r1,:128]
+ vrev64.16 q3, q3
+ vrev64.16 q1, q1
+ vneg.s16 q3, q3
+ vneg.s16 q2, q2
+ vmull.s16 q11, d2, d6
+ vmlal.s16 q11, d3, d7
+ vmull.s16 q8, d0, d5
+ vmlsl.s16 q8, d1, d4
+ vmull.s16 q9, d0, d4
+ vmlal.s16 q9, d1, d5
+ vmull.s16 q10, d2, d7
+ vmlsl.s16 q10, d3, d6
+ vshrn.s32 d0, q11, #15
+ vshrn.s32 d1, q8, #15
+ vshrn.s32 d2, q9, #15
+ vshrn.s32 d3, q10, #15
+ vrev64.16 q0, q0
+ vst2.16 {d2,d3}, [r5,:128]!
+ vst2.16 {d0,d1}, [r1,:128], r12
+ subs r6, r6, #32
+ bgt 1b
+
+ pop {r4-r11,pc}
+endfunc
+
+function ff_mdct_fixed_calcw_neon, export=1
+ push {r1,r4-r11,lr}
+
+ ldrd r4, r5, [r0, #8] @ revtab, tmp_buf
+ ldr r6, [r0, #16] @ mdct_size; n
+ ldr r7, [r0, #24] @ tcos
+
+ prerot r5, r1
+
+ mov r4, r0
+ mov r1, r5
+ bl X(ff_fft_fixed_calc_neon)
+
+ pop {r7}
+ mov r12, #-16
+ ldr r6, [r4, #16] @ mdct_size; n
+ ldr r9, [r4, #24] @ tcos
+ add r5, r5, r6, lsr #1
+ add r7, r7, r6
+ add r9, r9, r6, lsr #1
+ sub r3, r5, #16
+ sub r1, r7, #16
+ sub r2, r9, #16
+1:
+ vld2.16 {d4,d5}, [r9,:128]!
+ vld2.16 {d6,d7}, [r2,:128], r12
+ vld2.16 {d0,d1}, [r5,:128]!
+ vld2.16 {d2,d3}, [r3,:128], r12
+ vrev64.16 q3, q3
+ vrev64.16 q1, q1
+ vneg.s16 q3, q3
+ vneg.s16 q2, q2
+ vmull.s16 q8, d2, d6
+ vmlal.s16 q8, d3, d7
+ vmull.s16 q9, d0, d5
+ vmlsl.s16 q9, d1, d4
+ vmull.s16 q10, d0, d4
+ vmlal.s16 q10, d1, d5
+ vmull.s16 q11, d2, d7
+ vmlsl.s16 q11, d3, d6
+ vrev64.32 q8, q8
+ vrev64.32 q9, q9
+ vst2.32 {q10,q11},[r7,:128]!
+ vst2.32 {d16,d18},[r1,:128], r12
+ vst2.32 {d17,d19},[r1,:128], r12
+ subs r6, r6, #32
+ bgt 1b
+
+ pop {r4-r11,pc}
+endfunc
diff --git a/libavcodec/arm/neontest.c b/libavcodec/arm/neontest.c
index d1ede49..f9c0dbf 100644
--- a/libavcodec/arm/neontest.c
+++ b/libavcodec/arm/neontest.c
@@ -29,7 +29,6 @@
testneonclobbers(avcodec_open2, avctx, codec, options);
}
-#if FF_API_OLD_ENCDEC
wrap(avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
@@ -48,22 +47,6 @@
got_picture_ptr, avpkt);
}
-wrap(avcodec_encode_audio2(AVCodecContext *avctx,
- AVPacket *avpkt,
- const AVFrame *frame,
- int *got_packet_ptr))
-{
- testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
- got_packet_ptr);
-}
-
-wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
- const AVFrame *frame, int *got_packet_ptr))
-{
- testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
-}
-#endif
-
wrap(avcodec_decode_subtitle2(AVCodecContext *avctx,
AVSubtitle *sub,
int *got_sub_ptr,
@@ -73,6 +56,15 @@
got_sub_ptr, avpkt);
}
+wrap(avcodec_encode_audio2(AVCodecContext *avctx,
+ AVPacket *avpkt,
+ const AVFrame *frame,
+ int *got_packet_ptr))
+{
+ testneonclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
+ got_packet_ptr);
+}
+
wrap(avcodec_encode_subtitle(AVCodecContext *avctx,
uint8_t *buf, int buf_size,
const AVSubtitle *sub))
@@ -80,6 +72,12 @@
testneonclobbers(avcodec_encode_subtitle, avctx, buf, buf_size, sub);
}
+wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
+ const AVFrame *frame, int *got_packet_ptr))
+{
+ testneonclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
+}
+
wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt))
{
testneonclobbers(avcodec_send_packet, avctx, avpkt);
diff --git a/libavcodec/arm/sbcdsp_init_arm.c b/libavcodec/arm/sbcdsp_init_arm.c
index b8fa5a3..6bf7e72 100644
--- a/libavcodec/arm/sbcdsp_init_arm.c
+++ b/libavcodec/arm/sbcdsp_init_arm.c
@@ -30,7 +30,6 @@
*/
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/sbcdsp.h"
diff --git a/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c b/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c
index b090709..1b00078 100644
--- a/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c
+++ b/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/arm/cpu.h"
#include "vp9dsp_init.h"
diff --git a/libavcodec/arm/vp9dsp_init_arm.c b/libavcodec/arm/vp9dsp_init_arm.c
index b3911f7..cb7f48d 100644
--- a/libavcodec/arm/vp9dsp_init_arm.c
+++ b/libavcodec/arm/vp9dsp_init_arm.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/vp9dsp.h"
#include "vp9dsp_init.h"
diff --git a/libavcodec/asv.h b/libavcodec/asv.h
index 269bbe7..e778c72 100644
--- a/libavcodec/asv.h
+++ b/libavcodec/asv.h
@@ -28,7 +28,7 @@
#include <stdint.h>
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "avcodec.h"
#include "blockdsp.h"
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index 54f9b1c..0dd8b87 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -33,8 +33,6 @@
#include <stdio.h>
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "fft.h"
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 37ccbcc..6330327 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -39,7 +39,6 @@
#include "libavutil/attributes.h"
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
diff --git a/libavcodec/atrac3plus.h b/libavcodec/atrac3plus.h
index a588436..82fe0fe 100644
--- a/libavcodec/atrac3plus.h
+++ b/libavcodec/atrac3plus.h
@@ -31,8 +31,6 @@
#include <stdint.h>
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
-
#include "atrac.h"
#include "avcodec.h"
#include "fft.h"
diff --git a/libavcodec/atrac3plus_data.h b/libavcodec/atrac3plus_data.h
index 05ae2b7..7039936 100644
--- a/libavcodec/atrac3plus_data.h
+++ b/libavcodec/atrac3plus_data.h
@@ -104,6 +104,25 @@
0, 1, 2, 14, 15, 3, 13, 4, 12, 5, 11, 6, 7, 9, 10,
};
+static const uint8_t atrac3p_ct_huff1[4][2] = {
+ { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 3 },
+};
+
+static const uint8_t atrac3p_ct_huff2[8][2] = {
+ { 0, 2 }, { 1, 3 }, { 2, 3 }, { 3, 3 }, { 4, 3 }, { 5, 3 }, { 6, 4 },
+ { 7, 4 },
+};
+
+static const uint8_t atrac3p_ct_huff3[8][2] = {
+ { 0, 2 }, { 1, 3 }, { 2, 3 }, { 3, 3 }, { 6, 3 }, { 7, 3 }, { 4, 4 },
+ { 5, 4 },
+};
+
+static const uint8_t atrac3p_ct_huff4[8][2] = {
+ { 0, 1 }, { 1, 3 }, { 2, 4 }, { 3, 4 }, { 4, 4 }, { 5, 4 }, { 6, 4 },
+ { 7, 4 },
+};
+
/* weights for quantized word lengths */
static const int8_t atrac3p_wl_weights[6][32] = {
{ 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0,
@@ -374,7 +393,7 @@
/* If the first entry of a subtable is negative, it means
* that another VLC is to be reused. */
-static const int8_t atrac3p_spectra_cbs[][12] = {
+static int8_t atrac3p_spectra_cbs[][12] = {
{ 1, 0, 0, 1, 7, 0, 19, 5, 13, 21, 6, 8 },
{ 0, 1, 0, 4, 11, 0, 1, 29, 6, 20, 7, 2 },
{ 0, 0, 1, 8, 0, 13, 18, 7, 2, 0, 0, 0 },
diff --git a/libavcodec/atrac3plusdec.c b/libavcodec/atrac3plusdec.c
index c024ab6..2ae03d8 100644
--- a/libavcodec/atrac3plusdec.c
+++ b/libavcodec/atrac3plusdec.c
@@ -39,7 +39,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "get_bits.h"
diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c
index e32c5c8..7af1fa2 100644
--- a/libavcodec/atrac3plusdsp.c
+++ b/libavcodec/atrac3plusdsp.c
@@ -29,8 +29,6 @@
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "sinewin.h"
#include "fft.h"
diff --git a/libavcodec/atrac9dec.c b/libavcodec/atrac9dec.c
index f88b25d..f2413ef 100644
--- a/libavcodec/atrac9dec.c
+++ b/libavcodec/atrac9dec.c
@@ -27,7 +27,6 @@
#include "atrac9tab.h"
#include "libavutil/lfg.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#define ATRAC9_SF_VLC_BITS 8
#define ATRAC9_COEFF_VLC_BITS 9
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index bf3e009..19003f9 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -1,7 +1,7 @@
/*
* Audio Toolbox system codecs
*
- * copyright (c) 2016 rcombs
+ * copyright (c) 2016 Rodger Combs
*
* This file is part of FFmpeg.
*
@@ -296,8 +296,7 @@
return 0;
}
-static av_cold int ffat_create_decoder(AVCodecContext *avctx,
- const AVPacket *pkt)
+static av_cold int ffat_create_decoder(AVCodecContext *avctx, AVPacket *pkt)
{
ATDecodeContext *at = avctx->priv_data;
OSStatus status;
@@ -484,7 +483,7 @@
if (avctx->codec_id == AV_CODEC_ID_AAC) {
if (!at->extradata_size) {
uint8_t *side_data;
- buffer_size_t side_data_size;
+ int side_data_size;
side_data = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA,
&side_data_size);
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index b0a4340..e8748b3 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -1,7 +1,7 @@
/*
* Audio Toolbox system codecs
*
- * copyright (c) 2016 rcombs
+ * copyright (c) 2016 Rodger Combs
*
* This file is part of FFmpeg.
*
diff --git a/libavcodec/av1_frame_split_bsf.c b/libavcodec/av1_frame_split_bsf.c
index fa8b887..13bebe1 100644
--- a/libavcodec/av1_frame_split_bsf.c
+++ b/libavcodec/av1_frame_split_bsf.c
@@ -214,7 +214,7 @@
if (ret < 0)
return ret;
- s->cbc->decompose_unit_types = decompose_unit_types;
+ s->cbc->decompose_unit_types = (CodedBitstreamUnitType*)decompose_unit_types;
s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
if (!ctx->par_in->extradata_size)
diff --git a/libavcodec/av1_metadata_bsf.c b/libavcodec/av1_metadata_bsf.c
index 8cafe46..3158ba9 100644
--- a/libavcodec/av1_metadata_bsf.c
+++ b/libavcodec/av1_metadata_bsf.c
@@ -20,12 +20,22 @@
#include "libavutil/opt.h"
#include "bsf.h"
+#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_av1.h"
+enum {
+ PASS,
+ INSERT,
+ REMOVE,
+};
+
typedef struct AV1MetadataContext {
- CBSBSFContext common;
+ const AVClass *class;
+
+ CodedBitstreamContext *input;
+ CodedBitstreamContext *output;
+ CodedBitstreamFragment access_unit;
int td;
@@ -103,27 +113,91 @@
return 0;
}
-static int av1_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
- CodedBitstreamFragment *frag)
+static int av1_metadata_update_side_data(AVBSFContext *bsf, AVPacket *pkt)
{
AV1MetadataContext *ctx = bsf->priv_data;
- AV1RawOBU td, *obu;
+ CodedBitstreamFragment *frag = &ctx->access_unit;
+ uint8_t *side_data;
+ int side_data_size;
int err, i;
+ side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
+ &side_data_size);
+ if (!side_data_size)
+ return 0;
+
+ err = ff_cbs_read(ctx->input, frag, side_data, side_data_size);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata from packet side data.\n");
+ return err;
+ }
+
for (i = 0; i < frag->nb_units; i++) {
if (frag->units[i].type == AV1_OBU_SEQUENCE_HEADER) {
- obu = frag->units[i].content;
+ AV1RawOBU *obu = frag->units[i].content;
err = av1_metadata_update_sequence_header(bsf, &obu->obu.sequence_header);
if (err < 0)
return err;
}
}
+ err = ff_cbs_write_fragment_data(ctx->output, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata into packet side data.\n");
+ return err;
+ }
+
+ side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, frag->data_size);
+ if (!side_data)
+ return AVERROR(ENOMEM);
+ memcpy(side_data, frag->data, frag->data_size);
+
+ ff_cbs_fragment_reset(frag);
+
+ return 0;
+}
+
+static int av1_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
+{
+ AV1MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *frag = &ctx->access_unit;
+ AV1RawOBU td, *obu;
+ int err, i;
+
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = av1_metadata_update_side_data(bsf, pkt);
+ if (err < 0)
+ goto fail;
+
+ err = ff_cbs_read_packet(ctx->input, frag, pkt);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read packet.\n");
+ goto fail;
+ }
+
+ if (frag->nb_units == 0) {
+ av_log(bsf, AV_LOG_ERROR, "No OBU in packet.\n");
+ err = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
+ for (i = 0; i < frag->nb_units; i++) {
+ if (frag->units[i].type == AV1_OBU_SEQUENCE_HEADER) {
+ obu = frag->units[i].content;
+ err = av1_metadata_update_sequence_header(bsf, &obu->obu.sequence_header);
+ if (err < 0)
+ goto fail;
+ }
+ }
+
// If a Temporal Delimiter is present, it must be the first OBU.
if (frag->units[0].type == AV1_OBU_TEMPORAL_DELIMITER) {
- if (ctx->td == BSF_ELEMENT_REMOVE)
+ if (ctx->td == REMOVE)
ff_cbs_delete_unit(frag, 0);
- } else if (pkt && ctx->td == BSF_ELEMENT_INSERT) {
+ } else if (ctx->td == INSERT) {
td = (AV1RawOBU) {
.header.obu_type = AV1_OBU_TEMPORAL_DELIMITER,
};
@@ -132,7 +206,7 @@
&td, NULL);
if (err < 0) {
av_log(bsf, AV_LOG_ERROR, "Failed to insert Temporal Delimiter.\n");
- return err;
+ goto fail;
}
}
@@ -143,26 +217,86 @@
}
}
- return 0;
-}
+ err = ff_cbs_write_packet(ctx->output, pkt, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n");
+ goto fail;
+ }
-static const CBSBSFType av1_metadata_type = {
- .codec_id = AV_CODEC_ID_AV1,
- .fragment_name = "temporal unit",
- .unit_name = "OBU",
- .update_fragment = &av1_metadata_update_fragment,
-};
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(frag);
+
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
+}
static int av1_metadata_init(AVBSFContext *bsf)
{
- return ff_cbs_bsf_generic_init(bsf, &av1_metadata_type);
+ AV1MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *frag = &ctx->access_unit;
+ AV1RawOBU *obu;
+ int err, i;
+
+ err = ff_cbs_init(&ctx->input, AV_CODEC_ID_AV1, bsf);
+ if (err < 0)
+ return err;
+ err = ff_cbs_init(&ctx->output, AV_CODEC_ID_AV1, bsf);
+ if (err < 0)
+ return err;
+
+ if (bsf->par_in->extradata) {
+ err = ff_cbs_read_extradata(ctx->input, frag, bsf->par_in);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
+ goto fail;
+ }
+
+ for (i = 0; i < frag->nb_units; i++) {
+ if (frag->units[i].type == AV1_OBU_SEQUENCE_HEADER) {
+ obu = frag->units[i].content;
+ err = av1_metadata_update_sequence_header(bsf, &obu->obu.sequence_header);
+ if (err < 0)
+ goto fail;
+ }
+ }
+
+ err = ff_cbs_write_extradata(ctx->output, bsf->par_out, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
+ goto fail;
+ }
+ }
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(frag);
+ return err;
+}
+
+static void av1_metadata_close(AVBSFContext *bsf)
+{
+ AV1MetadataContext *ctx = bsf->priv_data;
+
+ ff_cbs_fragment_free(&ctx->access_unit);
+ ff_cbs_close(&ctx->input);
+ ff_cbs_close(&ctx->output);
}
#define OFFSET(x) offsetof(AV1MetadataContext, x)
#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
static const AVOption av1_metadata_options[] = {
- BSF_ELEMENT_OPTIONS_PIR("td", "Temporal Delimiter OBU",
- td, FLAGS),
+ { "td", "Temporal Delimiter OBU",
+ OFFSET(td), AV_OPT_TYPE_INT,
+ { .i64 = PASS }, PASS, REMOVE, FLAGS, "td" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "td" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "td" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "td" },
{ "color_primaries", "Set color primaries (section 6.4.2)",
OFFSET(color_primaries), AV_OPT_TYPE_INT,
@@ -222,7 +356,7 @@
.priv_data_size = sizeof(AV1MetadataContext),
.priv_class = &av1_metadata_class,
.init = &av1_metadata_init,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &av1_metadata_close,
+ .filter = &av1_metadata_filter,
.codec_ids = av1_metadata_codec_ids,
};
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c
index 6a76ffb..181ff3a 100644
--- a/libavcodec/av1_parser.c
+++ b/libavcodec/av1_parser.c
@@ -191,7 +191,7 @@
if (ret < 0)
return ret;
- s->cbc->decompose_unit_types = decompose_unit_types;
+ s->cbc->decompose_unit_types = (CodedBitstreamUnitType *)decompose_unit_types;
s->cbc->nb_decompose_unit_types = FF_ARRAY_ELEMS(decompose_unit_types);
return 0;
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index a75d674..bc897af 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -18,9 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/film_grain_params.h"
#include "libavutil/pixdesc.h"
-#include "libavutil/opt.h"
#include "avcodec.h"
#include "av1dec.h"
#include "bytestream.h"
@@ -654,8 +652,6 @@
if (ret < 0)
return ret;
- av_opt_set_int(s->cbc->priv_data, "operating_point", s->operating_point, 0);
-
if (avctx->extradata && avctx->extradata_size) {
ret = ff_cbs_read_extradata_from_codec(s->cbc,
&s->current_obu,
@@ -741,66 +737,6 @@
return ret;
}
-static int export_film_grain(AVCodecContext *avctx, AVFrame *frame)
-{
- AV1DecContext *s = avctx->priv_data;
- const AV1RawFilmGrainParams *film_grain = &s->cur_frame.film_grain;
- AVFilmGrainParams *fgp;
- AVFilmGrainAOMParams *aom;
-
- if (!film_grain->apply_grain)
- return 0;
-
- fgp = av_film_grain_params_create_side_data(frame);
- if (!fgp)
- return AVERROR(ENOMEM);
-
- fgp->type = AV_FILM_GRAIN_PARAMS_AV1;
- fgp->seed = film_grain->grain_seed;
-
- aom = &fgp->codec.aom;
- aom->chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma;
- aom->scaling_shift = film_grain->grain_scaling_minus_8 + 8;
- aom->ar_coeff_lag = film_grain->ar_coeff_lag;
- aom->ar_coeff_shift = film_grain->ar_coeff_shift_minus_6 + 6;
- aom->grain_scale_shift = film_grain->grain_scale_shift;
- aom->overlap_flag = film_grain->overlap_flag;
- aom->limit_output_range = film_grain->clip_to_restricted_range;
-
- aom->num_y_points = film_grain->num_y_points;
- for (int i = 0; i < film_grain->num_y_points; i++) {
- aom->y_points[i][0] = film_grain->point_y_value[i];
- aom->y_points[i][1] = film_grain->point_y_scaling[i];
- }
- aom->num_uv_points[0] = film_grain->num_cb_points;
- for (int i = 0; i < film_grain->num_cb_points; i++) {
- aom->uv_points[0][i][0] = film_grain->point_cb_value[i];
- aom->uv_points[0][i][1] = film_grain->point_cb_scaling[i];
- }
- aom->num_uv_points[1] = film_grain->num_cr_points;
- for (int i = 0; i < film_grain->num_cr_points; i++) {
- aom->uv_points[1][i][0] = film_grain->point_cr_value[i];
- aom->uv_points[1][i][1] = film_grain->point_cr_scaling[i];
- }
-
- for (int i = 0; i < 24; i++) {
- aom->ar_coeffs_y[i] = film_grain->ar_coeffs_y_plus_128[i] - 128;
- }
- for (int i = 0; i < 25; i++) {
- aom->ar_coeffs_uv[0][i] = film_grain->ar_coeffs_cb_plus_128[i] - 128;
- aom->ar_coeffs_uv[1][i] = film_grain->ar_coeffs_cr_plus_128[i] - 128;
- }
-
- aom->uv_mult[0] = film_grain->cb_mult;
- aom->uv_mult[1] = film_grain->cr_mult;
- aom->uv_mult_luma[0] = film_grain->cb_luma_mult;
- aom->uv_mult_luma[1] = film_grain->cr_luma_mult;
- aom->uv_offset[0] = film_grain->cb_offset;
- aom->uv_offset[1] = film_grain->cr_offset;
-
- return 0;
-}
-
static int set_output_frame(AVCodecContext *avctx, AVFrame *frame,
const AVPacket *pkt, int *got_frame)
{
@@ -808,23 +744,10 @@
const AVFrame *srcframe = s->cur_frame.tf.f;
int ret;
- // TODO: all layers
- if (s->operating_point_idc &&
- av_log2(s->operating_point_idc >> 8) > s->cur_frame.spatial_id)
- return 0;
-
ret = av_frame_ref(frame, srcframe);
if (ret < 0)
return ret;
- if (avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) {
- ret = export_film_grain(avctx, frame);
- if (ret < 0) {
- av_frame_unref(frame);
- return ret;
- }
- }
-
frame->pts = pkt->pts;
frame->pkt_dts = pkt->dts;
frame->pkt_size = pkt->size;
@@ -927,8 +850,6 @@
goto end;
}
- s->operating_point_idc = s->raw_seq->operating_point_idc[s->operating_point];
-
if (s->pix_fmt == AV_PIX_FMT_NONE) {
ret = get_pixel_format(avctx);
if (ret < 0) {
@@ -1099,28 +1020,12 @@
av1_frame_unref(avctx, &s->ref[i]);
av1_frame_unref(avctx, &s->cur_frame);
- s->operating_point_idc = 0;
s->raw_frame_header = NULL;
s->raw_seq = NULL;
ff_cbs_flush(s->cbc);
}
-#define OFFSET(x) offsetof(AV1DecContext, x)
-#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
-static const AVOption av1_options[] = {
- { "operating_point", "Select an operating point of the scalable bitstream",
- OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, AV1_MAX_OPERATING_POINTS - 1, VD },
- { NULL }
-};
-
-static const AVClass av1_class = {
- .class_name = "AV1 decoder",
- .item_name = av_default_item_name,
- .option = av1_options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
AVCodec ff_av1_decoder = {
.name = "av1",
.long_name = NULL_IF_CONFIG_SMALL("Alliance for Open Media AV1"),
@@ -1136,8 +1041,7 @@
FF_CODEC_CAP_SETS_PKT_DTS,
.flush = av1_decode_flush,
.profiles = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
- .priv_class = &av1_class,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal * []) {
#if CONFIG_AV1_DXVA2_HWACCEL
HWACCEL_DXVA2(av1),
#endif
diff --git a/libavcodec/av1dec.h b/libavcodec/av1dec.h
index 248a687..7e3b0c7 100644
--- a/libavcodec/av1dec.h
+++ b/libavcodec/av1dec.h
@@ -76,13 +76,9 @@
uint16_t tg_start;
uint16_t tg_end;
- int operating_point_idc;
-
AV1Frame ref[AV1_NUM_REF_FRAMES];
AV1Frame cur_frame;
- // AVOptions
- int operating_point;
} AV1DecContext;
#endif /* AVCODEC_AV1DEC_H */
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3ecb3a4..1d3099d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1345,7 +1345,6 @@
*/
int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
-#if FF_API_OLD_ENCDEC
/**
* If non-zero, the decoded audio and video frames returned from
* avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted
@@ -1361,7 +1360,6 @@
*/
attribute_deprecated
int refcounted_frames;
-#endif
/* - encoding parameters */
float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0)
@@ -1621,20 +1619,42 @@
#define FF_DEBUG_BITSTREAM 4
#define FF_DEBUG_MB_TYPE 8
#define FF_DEBUG_QP 16
+#if FF_API_DEBUG_MV
+/**
+ * @deprecated this option does nothing
+ */
+#define FF_DEBUG_MV 32
+#endif
#define FF_DEBUG_DCT_COEFF 0x00000040
#define FF_DEBUG_SKIP 0x00000080
#define FF_DEBUG_STARTCODE 0x00000100
#define FF_DEBUG_ER 0x00000400
#define FF_DEBUG_MMCO 0x00000800
#define FF_DEBUG_BUGS 0x00001000
+#if FF_API_DEBUG_MV
+#define FF_DEBUG_VIS_QP 0x00002000
+#define FF_DEBUG_VIS_MB_TYPE 0x00004000
+#endif
#define FF_DEBUG_BUFFERS 0x00008000
#define FF_DEBUG_THREADS 0x00010000
#define FF_DEBUG_GREEN_MD 0x00800000
#define FF_DEBUG_NOMC 0x01000000
+#if FF_API_DEBUG_MV
+ /**
+ * debug
+ * - encoding: Set by user.
+ * - decoding: Set by user.
+ */
+ 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
+
/**
* Error recognition; may misdetect some more or less valid parts as errors.
- * - encoding: Set by user.
+ * - encoding: unused
* - decoding: Set by user.
*/
int err_recognition;
@@ -1741,12 +1761,14 @@
*/
int bits_per_raw_sample;
+#if FF_API_LOWRES
/**
* low resolution decoding, 1-> 1/2 size, 2->1/4 size
* - encoding: unused
* - decoding: Set by user.
*/
int lowres;
+#endif
#if FF_API_CODED_FRAME
/**
@@ -1797,11 +1819,7 @@
*
* @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
+ * invalid once this field is removed.
*/
attribute_deprecated
int thread_safe_callbacks;
@@ -1943,9 +1961,6 @@
#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
#define FF_PROFILE_HEVC_REXT 4
-#define FF_PROFILE_VVC_MAIN_10 1
-#define FF_PROFILE_VVC_MAIN_10_444 33
-
#define FF_PROFILE_AV1_MAIN 0
#define FF_PROFILE_AV1_HIGH 1
#define FF_PROFILE_AV1_PROFESSIONAL 2
@@ -2086,6 +2101,15 @@
*/
const AVCodecDescriptor *codec_descriptor;
+#if !FF_API_LOWRES
+ /**
+ * low resolution decoding, 1-> 1/2 size, 2->1/4 size
+ * - encoding: unused
+ * - decoding: Set by user.
+ */
+ int lowres;
+#endif
+
/**
* Current statistics for PTS correction.
* - decoding: maintained and used by libavcodec, not intended to be used by user apps
@@ -2136,11 +2160,12 @@
*/
int seek_preroll;
-#if FF_API_DEBUG_MV
+#if !FF_API_DEBUG_MV
/**
- * @deprecated unused
+ * debug motion vectors
+ * - encoding: Set by user.
+ * - decoding: Set by user.
*/
- 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
@@ -2359,10 +2384,12 @@
attribute_deprecated
unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
+#if FF_API_LOWRES
attribute_deprecated
int av_codec_get_lowres(const AVCodecContext *avctx);
attribute_deprecated
void av_codec_set_lowres(AVCodecContext *avctx, int val);
+#endif
attribute_deprecated
int av_codec_get_seek_preroll(const AVCodecContext *avctx);
@@ -2712,13 +2739,25 @@
#if FF_API_NEXT
/**
- * @deprecated Calling this function is unnecessary.
+ * Register the codec codec and initialize libavcodec.
+ *
+ * @warning either this function or avcodec_register_all() must be called
+ * before any other libavcodec functions.
+ *
+ * @see avcodec_register_all()
*/
attribute_deprecated
void avcodec_register(AVCodec *codec);
/**
- * @deprecated Calling this function is unnecessary.
+ * Register all the codecs, parsers and bitstream filters which were enabled at
+ * configuration time. If you do not call this function you can select exactly
+ * which formats you want to support, by using the individual registration
+ * functions.
+ *
+ * @see avcodec_register
+ * @see av_register_codec_parser
+ * @see av_register_bitstream_filter
*/
attribute_deprecated
void avcodec_register_all(void);
@@ -2762,13 +2801,14 @@
*/
const AVClass *avcodec_get_class(void);
-#if FF_API_GET_FRAME_CLASS
+#if FF_API_COPY_CONTEXT
/**
- * @deprecated This function should not be used.
+ * Get the AVClass for AVFrame. It can be used in combination with
+ * AV_OPT_SEARCH_FAKE_OBJ for examining options.
+ *
+ * @see av_opt_find().
*/
-attribute_deprecated
const AVClass *avcodec_get_frame_class(void);
-#endif
/**
* Get the AVClass for AVSubtitleRect. It can be used in combination with
@@ -2778,7 +2818,6 @@
*/
const AVClass *avcodec_get_subtitle_rect_class(void);
-#if FF_API_COPY_CONTEXT
/**
* Copy the settings of the source AVCodecContext into the destination
* AVCodecContext. The resulting destination codec context will be
@@ -2835,6 +2874,7 @@
* @ref avcodec_receive_frame()).
*
* @code
+ * avcodec_register_all();
* av_dict_set(&opts, "b", "2.5M", 0);
* codec = avcodec_find_decoder(AV_CODEC_ID_H264);
* if (!codec)
@@ -2939,7 +2979,6 @@
*/
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
-#if FF_API_OLD_ENCDEC
/**
* Decode the audio frame of size avpkt->size from avpkt->data into frame.
*
@@ -3046,7 +3085,6 @@
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
int *got_picture_ptr,
const AVPacket *avpkt);
-#endif
/**
* Decode a subtitle message.
@@ -3503,10 +3541,7 @@
const uint8_t *buf, int buf_size);
void (*parser_close)(AVCodecParserContext *s);
int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
-#if FF_API_NEXT
- attribute_deprecated
struct AVCodecParser *next;
-#endif
} AVCodecParser;
/**
@@ -3567,18 +3602,14 @@
int64_t pts, int64_t dts,
int64_t pos);
-#if FF_API_PARSER_CHANGE
/**
* @return 0 if the output buffer is a subset of the input, 1 if it is allocated and must be freed
- * @deprecated Use dump_extradata, remove_extra or extract_extradata
- * bitstream filters instead.
+ * @deprecated use AVBitStreamFilter
*/
-attribute_deprecated
int av_parser_change(AVCodecParserContext *s,
AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe);
-#endif
void av_parser_close(AVCodecParserContext *s);
/**
@@ -3591,7 +3622,6 @@
* @{
*/
-#if FF_API_OLD_ENCDEC
/**
* Encode a frame of audio.
*
@@ -3674,7 +3704,6 @@
attribute_deprecated
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
const AVFrame *frame, int *got_packet_ptr);
-#endif
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
const AVSubtitle *sub);
@@ -3782,6 +3811,12 @@
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
/**
+ * @deprecated see av_get_pix_fmt_loss()
+ */
+int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
+ int has_alpha);
+
+/**
* Find the best pixel format to convert to given a certain source pixel
* format. When converting from one pixel format to another, information loss
* may occur. For example, when converting from RGB24 to GRAY, the color
@@ -3802,24 +3837,15 @@
enum AVPixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr);
-#if FF_API_AVCODEC_PIX_FMT
-/**
- * @deprecated see av_get_pix_fmt_loss()
- */
-attribute_deprecated
-int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
- int has_alpha);
/**
* @deprecated see av_find_best_pix_fmt_of_2()
*/
-attribute_deprecated
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
attribute_deprecated
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
-#endif
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 32cb71f..e4ba403 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -330,16 +330,12 @@
uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
- buffer_size_t size)
+ int size)
{
int ret;
uint8_t *data;
-#if FF_API_BUFFER_SIZE_T
if ((unsigned)size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
-#else
- if (size > SIZE_MAX - AV_INPUT_BUFFER_PADDING_SIZE)
-#endif
return NULL;
data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
if (!data)
@@ -355,7 +351,7 @@
}
uint8_t *av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
- buffer_size_t *size)
+ int *size)
{
int i;
@@ -558,7 +554,7 @@
}
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
- buffer_size_t size)
+ int size)
{
int i;
@@ -593,7 +589,7 @@
dst->side_data_elems = 0;
for (i = 0; i < src->side_data_elems; i++) {
enum AVPacketSideDataType type = src->side_data[i].type;
- buffer_size_t size = src->side_data[i].size;
+ int size = src->side_data[i].size;
uint8_t *src_data = src->side_data[i].data;
uint8_t *dst_data = av_packet_new_side_data(dst, type, size);
@@ -800,7 +796,7 @@
int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type)
{
uint8_t *side_data;
- buffer_size_t side_data_size;
+ int side_data_size;
int i;
side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, &side_data_size);
@@ -826,7 +822,7 @@
{
AVProducerReferenceTime *prft;
uint8_t *side_data;
- buffer_size_t side_data_size;
+ int side_data_size;
side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PRFT, &side_data_size);
if (!side_data) {
diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c
index 477afd8..d85e3c2 100644
--- a/libavcodec/avrndec.c
+++ b/libavcodec/avrndec.c
@@ -21,9 +21,13 @@
#include "avcodec.h"
#include "internal.h"
+#include "mjpeg.h"
+#include "mjpegdec.h"
#include "libavutil/imgutils.h"
typedef struct {
+ AVCodecContext *mjpeg_avctx;
+ int is_mjpeg;
int interlace;
int tff;
} AVRnContext;
@@ -33,6 +37,42 @@
AVRnContext *a = avctx->priv_data;
int ret;
+ // Support "Resolution 1:1" for Avid AVI Codec
+ a->is_mjpeg = avctx->extradata_size < 31 || memcmp(&avctx->extradata[28], "1:1", 3);
+
+ if(!a->is_mjpeg && avctx->lowres) {
+ av_log(avctx, AV_LOG_ERROR, "lowres is not possible with rawvideo\n");
+ return AVERROR(EINVAL);
+ }
+
+ if(a->is_mjpeg) {
+ const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG);
+ AVDictionary *thread_opt = NULL;
+ if (!codec) {
+ av_log(avctx, AV_LOG_ERROR, "MJPEG codec not found\n");
+ return AVERROR_DECODER_NOT_FOUND;
+ }
+
+ a->mjpeg_avctx = avcodec_alloc_context3(codec);
+ if (!a->mjpeg_avctx)
+ return AVERROR(ENOMEM);
+
+ av_dict_set(&thread_opt, "threads", "1", 0); // Is this needed ?
+ a->mjpeg_avctx->refcounted_frames = 1;
+ a->mjpeg_avctx->flags = avctx->flags;
+ a->mjpeg_avctx->idct_algo = avctx->idct_algo;
+ a->mjpeg_avctx->lowres = avctx->lowres;
+ a->mjpeg_avctx->width = avctx->width;
+ a->mjpeg_avctx->height = avctx->height;
+
+ if ((ret = avcodec_open2(a->mjpeg_avctx, codec, &thread_opt)) < 0) {
+ av_log(avctx, AV_LOG_ERROR, "MJPEG codec failed to open\n");
+ }
+ av_dict_free(&thread_opt);
+
+ return ret;
+ }
+
if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
return ret;
@@ -49,6 +89,15 @@
return 0;
}
+static av_cold int end(AVCodecContext *avctx)
+{
+ AVRnContext *a = avctx->priv_data;
+
+ avcodec_free_context(&a->mjpeg_avctx);
+
+ return 0;
+}
+
static int decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
@@ -58,6 +107,28 @@
int buf_size = avpkt->size;
int y, ret, true_height;
+ if(a->is_mjpeg) {
+ ret = avcodec_decode_video2(a->mjpeg_avctx, data, got_frame, avpkt);
+
+ if (ret >= 0 && *got_frame && avctx->width <= p->width && avctx->height <= p->height) {
+ int shift = p->height - avctx->height;
+ int subsample_h, subsample_v;
+
+ av_pix_fmt_get_chroma_sub_sample(p->format, &subsample_h, &subsample_v);
+
+ p->data[0] += p->linesize[0] * shift;
+ if (p->data[2]) {
+ p->data[1] += p->linesize[1] * (shift>>subsample_v);
+ p->data[2] += p->linesize[2] * (shift>>subsample_v);
+ }
+
+ p->width = avctx->width;
+ p->height = avctx->height;
+ }
+ avctx->pix_fmt = a->mjpeg_avctx->pix_fmt;
+ return ret;
+ }
+
true_height = buf_size / (2*avctx->width);
if(buf_size < 2*avctx->width * avctx->height) {
@@ -96,7 +167,8 @@
.id = AV_CODEC_ID_AVRN,
.priv_data_size = sizeof(AVRnContext),
.init = init,
+ .close = end,
.decode = decode_frame,
- .capabilities = AV_CODEC_CAP_DR1,
+ .max_lowres = 3,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 5efd24e..ec164d0 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -23,7 +23,6 @@
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#define BITSTREAM_READER_LE
#include "avcodec.h"
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 381fc4c..7b5965e 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -30,7 +30,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/intfloat.h"
-#include "libavutil/mem_internal.h"
#define BITSTREAM_READER_LE
#include "avcodec.h"
diff --git a/libavcodec/bitpacked.c b/libavcodec/bitpacked.c
index 23e82c6..952ba73 100644
--- a/libavcodec/bitpacked.c
+++ b/libavcodec/bitpacked.c
@@ -33,12 +33,12 @@
struct BitpackedContext {
int (*decode)(AVCodecContext *avctx, AVFrame *frame,
- const AVPacket *pkt);
+ AVPacket *pkt);
};
/* For this format, it's a simple passthrough */
static int bitpacked_decode_uyvy422(AVCodecContext *avctx, AVFrame *frame,
- const AVPacket *avpkt)
+ AVPacket *avpkt)
{
int ret;
@@ -56,7 +56,7 @@
}
static int bitpacked_decode_yuv422p10(AVCodecContext *avctx, AVFrame *frame,
- const AVPacket *avpkt)
+ AVPacket *avpkt)
{
uint64_t frame_size = (uint64_t)avctx->width * (uint64_t)avctx->height * 20;
uint64_t packet_size = (uint64_t)avpkt->size * 8;
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index e425ffd..7570fb2 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -104,10 +104,10 @@
v = *(const uint16_t *)ptr; \
break; \
case 4: \
- default: \
- av_assert1(size == 4); \
v = *(const uint32_t *)ptr; \
break; \
+ default: \
+ av_assert1(0); \
} \
}
diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c
index 02d33ab..b26d6a9 100644
--- a/libavcodec/bitstream_filters.c
+++ b/libavcodec/bitstream_filters.c
@@ -53,7 +53,6 @@
extern const AVBitStreamFilter ff_pcm_rechunk_bsf;
extern const AVBitStreamFilter ff_prores_metadata_bsf;
extern const AVBitStreamFilter ff_remove_extradata_bsf;
-extern const AVBitStreamFilter ff_setts_bsf;
extern const AVBitStreamFilter ff_text2movsub_bsf;
extern const AVBitStreamFilter ff_trace_headers_bsf;
extern const AVBitStreamFilter ff_truehd_core_bsf;
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 6649fee..54e9bb4 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -27,7 +27,6 @@
#include <string.h>
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
#include "cabac.h"
#include "cabac_functions.h"
@@ -159,6 +158,18 @@
};
/**
+ * @param buf_size size of buf in bits
+ */
+void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size){
+ init_put_bits(&c->pb, buf, buf_size);
+
+ c->low= 0;
+ c->range= 0x1FE;
+ c->outstanding_count= 0;
+ c->pb.bit_left++; //avoids firstBitFlag
+}
+
+/**
*
* @param buf_size size of buf in bits
*/
diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h
index 38d06b2..1bf1c62 100644
--- a/libavcodec/cabac.h
+++ b/libavcodec/cabac.h
@@ -29,6 +29,8 @@
#include <stdint.h>
+#include "put_bits.h"
+
extern const uint8_t ff_h264_cabac_tables[512 + 4*2*64 + 4*64 + 63];
#define H264_NORM_SHIFT_OFFSET 0
#define H264_LPS_RANGE_OFFSET 512
@@ -41,11 +43,14 @@
typedef struct CABACContext{
int low;
int range;
+ int outstanding_count;
const uint8_t *bytestream_start;
const uint8_t *bytestream;
const uint8_t *bytestream_end;
+ PutBitContext pb;
}CABACContext;
+void ff_init_cabac_encoder(CABACContext *c, uint8_t *buf, int buf_size);
int ff_init_cabac_decoder(CABACContext *c, const uint8_t *buf, int buf_size);
#endif /* AVCODEC_CABAC_H */
diff --git a/libavcodec/cabac_functions.h b/libavcodec/cabac_functions.h
index 46af921..bb2b421 100644
--- a/libavcodec/cabac_functions.h
+++ b/libavcodec/cabac_functions.h
@@ -27,7 +27,6 @@
#ifndef AVCODEC_CABAC_FUNCTIONS_H
#define AVCODEC_CABAC_FUNCTIONS_H
-#include <stddef.h>
#include <stdint.h>
#include "cabac.h"
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 74b8371..ba2b6ef 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -25,8 +25,6 @@
* @author Stefan Gehrer <stefan.gehrer@gmx.de>
*/
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index cbc163f..6bfb22c 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -22,8 +22,6 @@
#ifndef AVCODEC_CAVS_H
#define AVCODEC_CAVS_H
-#include "libavutil/mem_internal.h"
-
#include "cavsdsp.h"
#include "blockdsp.h"
#include "h264chroma.h"
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c
index ecf22b3..f98531e 100644
--- a/libavcodec/cbs.c
+++ b/libavcodec/cbs.c
@@ -23,13 +23,12 @@
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/common.h"
-#include "libavutil/opt.h"
#include "cbs.h"
#include "cbs_internal.h"
-static const CodedBitstreamType *const cbs_type_table[] = {
+static const CodedBitstreamType *cbs_type_table[] = {
#if CONFIG_CBS_AV1
&ff_cbs_type_av1,
#endif
@@ -102,10 +101,6 @@
av_freep(&ctx);
return AVERROR(ENOMEM);
}
- if (type->priv_class) {
- *(const AVClass **)ctx->priv_data = type->priv_class;
- av_opt_set_defaults(ctx->priv_data);
- }
}
ctx->decompose_unit_types = NULL;
@@ -134,10 +129,6 @@
ctx->codec->close(ctx);
av_freep(&ctx->write_buffer);
-
- if (ctx->codec->priv_class && ctx->priv_data)
- av_opt_free(ctx->priv_data);
-
av_freep(&ctx->priv_data);
av_freep(ctx_ptr);
}
@@ -202,12 +193,6 @@
av_log(ctx->log_ctx, AV_LOG_VERBOSE,
"Decomposition unimplemented for unit %d "
"(type %"PRIu32").\n", i, unit->type);
- } else if (err == AVERROR(EAGAIN)) {
- av_log(ctx->log_ctx, AV_LOG_VERBOSE,
- "Skipping decomposition of unit %d "
- "(type %"PRIu32").\n", i, unit->type);
- av_buffer_unref(&unit->content_ref);
- unit->content = NULL;
} else if (err < 0) {
av_log(ctx->log_ctx, AV_LOG_ERROR, "Failed to read unit %d "
"(type %"PRIu32").\n", i, unit->type);
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h
index f022282..3fd0a0e 100644
--- a/libavcodec/cbs.h
+++ b/libavcodec/cbs.h
@@ -196,7 +196,7 @@
* Types not in this list will be available in bitstream form only.
* If NULL, all supported types will be decomposed.
*/
- const CodedBitstreamUnitType *decompose_unit_types;
+ CodedBitstreamUnitType *decompose_unit_types;
/**
* Length of the decompose_unit_types array.
*/
diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c
index 302e1f3..a40c91a 100644
--- a/libavcodec/cbs_av1.c
+++ b/libavcodec/cbs_av1.c
@@ -17,7 +17,6 @@
*/
#include "libavutil/avassert.h"
-#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "cbs.h"
@@ -918,7 +917,7 @@
int in_spatial_layer =
(priv->operating_point_idc >> (priv->spatial_id + 8)) & 1;
if (!in_temporal_layer || !in_spatial_layer) {
- return AVERROR(EAGAIN); // drop_obu()
+ // Decoding will drop this OBU at this operating point.
}
}
}
@@ -931,18 +930,6 @@
if (err < 0)
return err;
- if (priv->operating_point >= 0) {
- AV1RawSequenceHeader *sequence_header = &obu->obu.sequence_header;
-
- if (priv->operating_point > sequence_header->operating_points_cnt_minus_1) {
- av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid Operating Point %d requested. "
- "Must not be higher than %u.\n",
- priv->operating_point, sequence_header->operating_points_cnt_minus_1);
- return AVERROR(EINVAL);
- }
- priv->operating_point_idc = sequence_header->operating_point_idc[priv->operating_point];
- }
-
av_buffer_unref(&priv->sequence_header_ref);
priv->sequence_header = NULL;
@@ -1304,24 +1291,9 @@
CBS_UNIT_TYPE_END_OF_LIST
};
-#define OFFSET(x) offsetof(CodedBitstreamAV1Context, x)
-static const AVOption cbs_av1_options[] = {
- { "operating_point", "Set operating point to select layers to parse from a scalable bitstream",
- OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, AV1_MAX_OPERATING_POINTS - 1, 0 },
- { NULL }
-};
-
-static const AVClass cbs_av1_class = {
- .class_name = "cbs_av1",
- .item_name = av_default_item_name,
- .option = cbs_av1_options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
const CodedBitstreamType ff_cbs_type_av1 = {
.codec_id = AV_CODEC_ID_AV1,
- .priv_class = &cbs_av1_class,
.priv_data_size = sizeof(CodedBitstreamAV1Context),
.unit_types = cbs_av1_unit_types,
diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h
index 1fc80dc..7994700 100644
--- a/libavcodec/cbs_av1.h
+++ b/libavcodec/cbs_av1.h
@@ -425,8 +425,6 @@
} AV1ReferenceFrameState;
typedef struct CodedBitstreamAV1Context {
- const AVClass *class;
-
AV1RawSequenceHeader *sequence_header;
AVBufferRef *sequence_header_ref;
@@ -455,9 +453,6 @@
int tile_num;
AV1ReferenceFrameState ref[AV1_NUM_REF_FRAMES];
-
- // AVOptions
- int operating_point;
} CodedBitstreamAV1Context;
diff --git a/libavcodec/cbs_bsf.c b/libavcodec/cbs_bsf.c
deleted file mode 100644
index f0f7dd7..0000000
--- a/libavcodec/cbs_bsf.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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
- */
-
-#include "bsf_internal.h"
-#include "cbs_bsf.h"
-
-static int cbs_bsf_update_side_data(AVBSFContext *bsf, AVPacket *pkt)
-{
- CBSBSFContext *ctx = bsf->priv_data;
- CodedBitstreamFragment *frag = &ctx->fragment;
- uint8_t *side_data;
- buffer_size_t side_data_size;
- int err;
-
- side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
- &side_data_size);
- if (!side_data_size)
- return 0;
-
- err = ff_cbs_read(ctx->input, frag, side_data, side_data_size);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR,
- "Failed to read extradata from packet side data.\n");
- return err;
- }
-
- err = ctx->type->update_fragment(bsf, NULL, frag);
- if (err < 0)
- return err;
-
- err = ff_cbs_write_fragment_data(ctx->output, frag);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR,
- "Failed to write extradata into packet side data.\n");
- return err;
- }
-
- side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
- frag->data_size);
- if (!side_data)
- return AVERROR(ENOMEM);
- memcpy(side_data, frag->data, frag->data_size);
-
- ff_cbs_fragment_reset(frag);
- return 0;
-}
-
-int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
-{
- CBSBSFContext *ctx = bsf->priv_data;
- CodedBitstreamFragment *frag = &ctx->fragment;
- int err;
-
- err = ff_bsf_get_packet_ref(bsf, pkt);
- if (err < 0)
- return err;
-
- err = cbs_bsf_update_side_data(bsf, pkt);
- if (err < 0)
- goto fail;
-
- err = ff_cbs_read_packet(ctx->input, frag, pkt);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to read %s from packet.\n",
- ctx->type->fragment_name);
- goto fail;
- }
-
- if (frag->nb_units == 0) {
- av_log(bsf, AV_LOG_ERROR, "No %s found in packet.\n",
- ctx->type->unit_name);
- err = AVERROR_INVALIDDATA;
- goto fail;
- }
-
- err = ctx->type->update_fragment(bsf, pkt, frag);
- if (err < 0)
- goto fail;
-
- err = ff_cbs_write_packet(ctx->output, pkt, frag);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to write %s into packet.\n",
- ctx->type->fragment_name);
- goto fail;
- }
-
- err = 0;
-fail:
- ff_cbs_fragment_reset(frag);
-
- if (err < 0)
- av_packet_unref(pkt);
-
- return err;
-}
-
-int ff_cbs_bsf_generic_init(AVBSFContext *bsf, const CBSBSFType *type)
-{
- CBSBSFContext *ctx = bsf->priv_data;
- CodedBitstreamFragment *frag = &ctx->fragment;
- int err;
-
- ctx->type = type;
-
- err = ff_cbs_init(&ctx->input, type->codec_id, bsf);
- if (err < 0)
- return err;
-
- err = ff_cbs_init(&ctx->output, type->codec_id, bsf);
- if (err < 0)
- return err;
-
- if (bsf->par_in->extradata) {
- err = ff_cbs_read_extradata(ctx->input, frag, bsf->par_in);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
- goto fail;
- }
-
- err = type->update_fragment(bsf, NULL, frag);
- if (err < 0)
- goto fail;
-
- err = ff_cbs_write_extradata(ctx->output, bsf->par_out, frag);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
- goto fail;
- }
- }
-
- err = 0;
-fail:
- ff_cbs_fragment_reset(frag);
- return err;
-}
-
-void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
-{
- CBSBSFContext *ctx = bsf->priv_data;
-
- ff_cbs_fragment_free(&ctx->fragment);
- ff_cbs_close(&ctx->input);
- ff_cbs_close(&ctx->output);
-}
diff --git a/libavcodec/cbs_bsf.h b/libavcodec/cbs_bsf.h
deleted file mode 100644
index 6be95ab..0000000
--- a/libavcodec/cbs_bsf.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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 AVCODEC_CBS_BSF_H
-#define AVCODEC_CBS_BSF_H
-
-#include "cbs.h"
-
-
-typedef struct CBSBSFType {
- enum AVCodecID codec_id;
-
- // Name of a frame fragment in this codec (e.g. "access unit",
- // "temporal unit").
- const char *fragment_name;
-
- // Name of a unit for this BSF, for use in error messages (e.g.
- // "NAL unit", "OBU").
- const char *unit_name;
-
- // Update the content of a fragment with whatever metadata changes
- // are desired. The associated AVPacket is provided so that any side
- // data associated with the fragment can be inspected or edited. If
- // pkt is NULL, then an extradata header fragment is being updated.
- int (*update_fragment)(AVBSFContext *bsf, AVPacket *pkt,
- CodedBitstreamFragment *frag);
-} CBSBSFType;
-
-// Common structure for all generic CBS BSF users. An instance of this
-// structure must be the first member of the BSF private context (to be
-// pointed to by AVBSFContext.priv_data).
-typedef struct CBSBSFContext {
- const AVClass *class;
- const CBSBSFType *type;
-
- CodedBitstreamContext *input;
- CodedBitstreamContext *output;
- CodedBitstreamFragment fragment;
-} CBSBSFContext;
-
-/**
- * Initialise generic CBS BSF setup.
- *
- * Creates the input and output CBS instances, and applies the filter to
- * the extradata on the input codecpar if any is present.
- *
- * Since it calls the update_fragment() function immediately to deal with
- * extradata, this should be called after any codec-specific setup is done
- * (probably at the end of the AVBitStreamFilter.init function).
- */
-int ff_cbs_bsf_generic_init(AVBSFContext *bsf, const CBSBSFType *type);
-
-/**
- * Close a generic CBS BSF instance.
- *
- * If no other deinitialisation is required then this function can be used
- * directly as AVBitStreamFilter.close.
- */
-void ff_cbs_bsf_generic_close(AVBSFContext *bsf);
-
-/**
- * Filter operation for CBS BSF.
- *
- * Reads the input packet into a CBS fragment, calls update_fragment() on
- * it, then writes the result to an output packet. If the input packet
- * has AV_PKT_DATA_NEW_EXTRADATA side-data associated with it then it does
- * the same thing to that new extradata to form the output side-data first.
- *
- * If the BSF does not do anything else then this function can be used
- * directly as AVBitStreamFilter.filter.
- */
-int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt);
-
-
-// Options for element manipulation.
-enum {
- // Pass this element through unchanged.
- BSF_ELEMENT_PASS,
- // Insert this element, replacing any existing instances of it.
- // Associated values may be provided explicitly (as addtional options)
- // or implicitly (either as side data or deduced from other parts of
- // the stream).
- BSF_ELEMENT_INSERT,
- // Remove this element if it appears in the stream.
- BSF_ELEMENT_REMOVE,
- // Extract this element to side data, so that further manipulation
- // can happen elsewhere.
- BSF_ELEMENT_EXTRACT,
-};
-
-#define BSF_ELEMENT_OPTIONS_PIR(name, help, field, opt_flags) \
- { name, help, OFFSET(field), AV_OPT_TYPE_INT, \
- { .i64 = BSF_ELEMENT_PASS }, \
- BSF_ELEMENT_PASS, BSF_ELEMENT_REMOVE, opt_flags, name }, \
- { "pass", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_PASS }, .flags = opt_flags, .unit = name }, \
- { "insert", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_INSERT }, .flags = opt_flags, .unit = name }, \
- { "remove", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_REMOVE }, .flags = opt_flags, .unit = name }
-
-#define BSF_ELEMENT_OPTIONS_PIRE(name, help, field, opt_flags) \
- { name, help, OFFSET(field), AV_OPT_TYPE_INT, \
- { .i64 = BSF_ELEMENT_PASS }, \
- BSF_ELEMENT_PASS, BSF_ELEMENT_EXTRACT, opt_flags, name }, \
- { "pass", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_PASS }, .flags = opt_flags, .unit = name }, \
- { "insert", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_INSERT }, .flags = opt_flags, .unit = name }, \
- { "remove", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_REMOVE }, .flags = opt_flags, .unit = name }, \
- { "extract", NULL, 0, AV_OPT_TYPE_CONST, \
- { .i64 = BSF_ELEMENT_EXTRACT }, .flags = opt_flags, .unit = name } \
-
-
-#endif /* AVCODEC_CBS_BSF_H */
diff --git a/libavcodec/cbs_h264.h b/libavcodec/cbs_h264.h
index 9eb97ea..a6fe0a6 100644
--- a/libavcodec/cbs_h264.h
+++ b/libavcodec/cbs_h264.h
@@ -24,7 +24,6 @@
#include "cbs.h"
#include "cbs_h2645.h"
-#include "cbs_sei.h"
#include "h264.h"
@@ -275,6 +274,21 @@
uint16_t pan_scan_rect_repetition_period;
} H264RawSEIPanScanRect;
+typedef struct H264RawSEIUserDataRegistered {
+ uint8_t itu_t_t35_country_code;
+ uint8_t itu_t_t35_country_code_extension_byte;
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+} H264RawSEIUserDataRegistered;
+
+typedef struct H264RawSEIUserDataUnregistered {
+ uint8_t uuid_iso_iec_11578[16];
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+} H264RawSEIUserDataUnregistered;
+
typedef struct H264RawSEIRecoveryPoint {
uint16_t recovery_frame_cnt;
uint8_t exact_match_flag;
@@ -291,9 +305,47 @@
uint8_t display_orientation_extension_flag;
} H264RawSEIDisplayOrientation;
+typedef struct H264RawSEIMasteringDisplayColourVolume {
+ uint16_t display_primaries_x[3];
+ uint16_t display_primaries_y[3];
+ uint16_t white_point_x;
+ uint16_t white_point_y;
+ uint32_t max_display_mastering_luminance;
+ uint32_t min_display_mastering_luminance;
+} H264RawSEIMasteringDisplayColourVolume;
+
+typedef struct H264RawSEIAlternativeTransferCharacteristics {
+ uint8_t preferred_transfer_characteristics;
+} H264RawSEIAlternativeTransferCharacteristics;
+
+typedef struct H264RawSEIPayload {
+ uint32_t payload_type;
+ uint32_t payload_size;
+ union {
+ H264RawSEIBufferingPeriod buffering_period;
+ H264RawSEIPicTiming pic_timing;
+ H264RawSEIPanScanRect pan_scan_rect;
+ // H264RawSEIFiller filler -> no fields.
+ H264RawSEIUserDataRegistered user_data_registered;
+ H264RawSEIUserDataUnregistered user_data_unregistered;
+ H264RawSEIRecoveryPoint recovery_point;
+ H264RawSEIDisplayOrientation display_orientation;
+ H264RawSEIMasteringDisplayColourVolume mastering_display_colour_volume;
+ H264RawSEIAlternativeTransferCharacteristics
+ alternative_transfer_characteristics;
+ struct {
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+ } other;
+ } payload;
+} H264RawSEIPayload;
+
typedef struct H264RawSEI {
H264RawNALUnitHeader nal_unit_header;
- SEIRawMessageList message_list;
+
+ H264RawSEIPayload payload[H264_MAX_SEI_PAYLOADS];
+ uint8_t payload_count;
} H264RawSEI;
typedef struct H264RawSliceHeader {
@@ -413,4 +465,27 @@
uint8_t last_slice_nal_unit_type;
} CodedBitstreamH264Context;
+
+/**
+ * Add an SEI message to an access unit.
+ *
+ * On success, the payload will be owned by a unit in access_unit;
+ * on failure, the content of the payload will be freed.
+ */
+int ff_cbs_h264_add_sei_message(CodedBitstreamFragment *access_unit,
+ H264RawSEIPayload *payload);
+
+/**
+ * Delete an SEI message from an access unit.
+ *
+ * Deletes from nal_unit, which must be an SEI NAL unit. If this is the
+ * last message in nal_unit, also deletes it from access_unit.
+ *
+ * Requires nal_unit to be a unit in access_unit and position to be >= 0
+ * and < the payload count of the SEI nal_unit.
+ */
+void ff_cbs_h264_delete_sei_message(CodedBitstreamFragment *access_unit,
+ CodedBitstreamUnit *nal_unit,
+ int position);
+
#endif /* AVCODEC_CBS_H264_H */
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 6005d46..4343224 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -253,11 +253,9 @@
return err; \
} while (0)
-#define FUNC_NAME2(rw, codec, name) cbs_ ## codec ## _ ## rw ## _ ## name
-#define FUNC_NAME1(rw, codec, name) FUNC_NAME2(rw, codec, name)
-#define FUNC_H264(name) FUNC_NAME1(READWRITE, h264, name)
-#define FUNC_H265(name) FUNC_NAME1(READWRITE, h265, name)
-#define FUNC_SEI(name) FUNC_NAME1(READWRITE, sei, name)
+#define FUNC_NAME(rw, codec, name) cbs_ ## codec ## _ ## rw ## _ ## name
+#define FUNC_H264(rw, name) FUNC_NAME(rw, h264, name)
+#define FUNC_H265(rw, name) FUNC_NAME(rw, h265, name)
#define SUBSCRIPTS(subs, ...) (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL)
@@ -348,7 +346,6 @@
#define more_rbsp_data(var) ((var) = cbs_h2645_read_more_rbsp_data(rw))
-#define bit_position(rw) (get_bits_count(rw))
#define byte_alignment(rw) (get_bits_count(rw) % 8)
#define allocate(name, size) do { \
@@ -359,15 +356,11 @@
name = name ## _ref->data; \
} while (0)
-#define FUNC(name) FUNC_SEI(name)
-#include "cbs_sei_syntax_template.c"
-#undef FUNC
-
-#define FUNC(name) FUNC_H264(name)
+#define FUNC(name) FUNC_H264(READWRITE, name)
#include "cbs_h264_syntax_template.c"
#undef FUNC
-#define FUNC(name) FUNC_H265(name)
+#define FUNC(name) FUNC_H265(READWRITE, name)
#include "cbs_h265_syntax_template.c"
#undef FUNC
@@ -380,7 +373,6 @@
#undef xse
#undef infer
#undef more_rbsp_data
-#undef bit_position
#undef byte_alignment
#undef allocate
@@ -426,7 +418,6 @@
#define more_rbsp_data(var) (var)
-#define bit_position(rw) (put_bits_count(rw))
#define byte_alignment(rw) (put_bits_count(rw) % 8)
#define allocate(name, size) do { \
@@ -437,15 +428,11 @@
} \
} while (0)
-#define FUNC(name) FUNC_SEI(name)
-#include "cbs_sei_syntax_template.c"
-#undef FUNC
-
-#define FUNC(name) FUNC_H264(name)
+#define FUNC(name) FUNC_H264(READWRITE, name)
#include "cbs_h264_syntax_template.c"
#undef FUNC
-#define FUNC(name) FUNC_H265(name)
+#define FUNC(name) FUNC_H265(READWRITE, name)
#include "cbs_h265_syntax_template.c"
#undef FUNC
@@ -463,7 +450,6 @@
#undef se
#undef infer
#undef more_rbsp_data
-#undef bit_position
#undef byte_alignment
#undef allocate
@@ -1221,22 +1207,6 @@
return 0;
}
-static int cbs_h2645_unit_requires_zero_byte(enum AVCodecID codec_id,
- CodedBitstreamUnitType type,
- int nal_unit_index)
-{
- // Section B.1.2 in H.264, section B.2.2 in H.265.
- if (nal_unit_index == 0) {
- // Assume that this is the first NAL unit in an access unit.
- return 1;
- }
- if (codec_id == AV_CODEC_ID_H264)
- return type == H264_NAL_SPS || type == H264_NAL_PPS;
- if (codec_id == AV_CODEC_ID_HEVC)
- return type == HEVC_NAL_VPS || type == HEVC_NAL_SPS || type == HEVC_NAL_PPS;
- return 0;
-}
-
static int cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx,
CodedBitstreamFragment *frag)
{
@@ -1271,7 +1241,14 @@
frag->data_bit_padding = unit->data_bit_padding;
}
- if (cbs_h2645_unit_requires_zero_byte(ctx->codec->codec_id, unit->type, i)) {
+ if ((ctx->codec->codec_id == AV_CODEC_ID_H264 &&
+ (unit->type == H264_NAL_SPS ||
+ unit->type == H264_NAL_PPS)) ||
+ (ctx->codec->codec_id == AV_CODEC_ID_HEVC &&
+ (unit->type == HEVC_NAL_VPS ||
+ unit->type == HEVC_NAL_SPS ||
+ unit->type == HEVC_NAL_PPS)) ||
+ i == 0 /* (Assume this is the start of an access unit.) */) {
// zero_byte
data[dp++] = 0;
}
@@ -1385,11 +1362,36 @@
av_buffer_unref(&h265->pps_ref[i]);
}
+static void cbs_h264_free_sei_payload(H264RawSEIPayload *payload)
+{
+ switch (payload->payload_type) {
+ case H264_SEI_TYPE_BUFFERING_PERIOD:
+ case H264_SEI_TYPE_PIC_TIMING:
+ case H264_SEI_TYPE_PAN_SCAN_RECT:
+ case H264_SEI_TYPE_RECOVERY_POINT:
+ case H264_SEI_TYPE_DISPLAY_ORIENTATION:
+ case H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME:
+ case H264_SEI_TYPE_ALTERNATIVE_TRANSFER:
+ break;
+ case H264_SEI_TYPE_USER_DATA_REGISTERED:
+ av_buffer_unref(&payload->payload.user_data_registered.data_ref);
+ break;
+ case H264_SEI_TYPE_USER_DATA_UNREGISTERED:
+ av_buffer_unref(&payload->payload.user_data_unregistered.data_ref);
+ break;
+ default:
+ av_buffer_unref(&payload->payload.other.data_ref);
+ break;
+ }
+}
+
static void cbs_h264_free_sei(void *opaque, uint8_t *content)
{
H264RawSEI *sei = (H264RawSEI*)content;
- ff_cbs_sei_free_message_list(&sei->message_list);
- av_free(content);
+ int i;
+ for (i = 0; i < sei->payload_count; i++)
+ cbs_h264_free_sei_payload(&sei->payload[i]);
+ av_freep(&content);
}
static const CodedBitstreamUnitTypeDescriptor cbs_h264_unit_types[] = {
@@ -1421,11 +1423,42 @@
CBS_UNIT_TYPE_END_OF_LIST
};
+static void cbs_h265_free_sei_payload(H265RawSEIPayload *payload)
+{
+ switch (payload->payload_type) {
+ case HEVC_SEI_TYPE_BUFFERING_PERIOD:
+ case HEVC_SEI_TYPE_PICTURE_TIMING:
+ case HEVC_SEI_TYPE_PAN_SCAN_RECT:
+ case HEVC_SEI_TYPE_RECOVERY_POINT:
+ case HEVC_SEI_TYPE_DISPLAY_ORIENTATION:
+ case HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS:
+ case HEVC_SEI_TYPE_DECODED_PICTURE_HASH:
+ case HEVC_SEI_TYPE_TIME_CODE:
+ case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO:
+ case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
+ case HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+ case HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO:
+ break;
+ case HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35:
+ av_buffer_unref(&payload->payload.user_data_registered.data_ref);
+ break;
+ case HEVC_SEI_TYPE_USER_DATA_UNREGISTERED:
+ av_buffer_unref(&payload->payload.user_data_unregistered.data_ref);
+ break;
+ default:
+ av_buffer_unref(&payload->payload.other.data_ref);
+ break;
+ }
+ av_buffer_unref(&payload->extension_data.data_ref);
+}
+
static void cbs_h265_free_sei(void *opaque, uint8_t *content)
{
H265RawSEI *sei = (H265RawSEI*)content;
- ff_cbs_sei_free_message_list(&sei->message_list);
- av_free(content);
+ int i;
+ for (i = 0; i < sei->payload_count; i++)
+ cbs_h265_free_sei_payload(&sei->payload[i]);
+ av_freep(&content);
}
static const CodedBitstreamUnitTypeDescriptor cbs_h265_unit_types[] = {
@@ -1505,164 +1538,92 @@
.close = &cbs_h265_close,
};
-static const SEIMessageTypeDescriptor cbs_sei_common_types[] = {
- {
- SEI_TYPE_FILLER_PAYLOAD,
- 1, 1,
- sizeof(SEIRawFillerPayload),
- SEI_MESSAGE_RW(sei, filler_payload),
- },
- {
- SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35,
- 1, 1,
- sizeof(SEIRawUserDataRegistered),
- SEI_MESSAGE_RW(sei, user_data_registered),
- },
- {
- SEI_TYPE_USER_DATA_UNREGISTERED,
- 1, 1,
- sizeof(SEIRawUserDataUnregistered),
- SEI_MESSAGE_RW(sei, user_data_unregistered),
- },
- {
- SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME,
- 1, 0,
- sizeof(SEIRawMasteringDisplayColourVolume),
- SEI_MESSAGE_RW(sei, mastering_display_colour_volume),
- },
- {
- SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO,
- 1, 0,
- sizeof(SEIRawContentLightLevelInfo),
- SEI_MESSAGE_RW(sei, content_light_level_info),
- },
- {
- SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS,
- 1, 0,
- sizeof(SEIRawAlternativeTransferCharacteristics),
- SEI_MESSAGE_RW(sei, alternative_transfer_characteristics),
- },
- SEI_MESSAGE_TYPE_END,
-};
-
-static const SEIMessageTypeDescriptor cbs_sei_h264_types[] = {
- {
- SEI_TYPE_BUFFERING_PERIOD,
- 1, 0,
- sizeof(H264RawSEIBufferingPeriod),
- SEI_MESSAGE_RW(h264, sei_buffering_period),
- },
- {
- SEI_TYPE_PIC_TIMING,
- 1, 0,
- sizeof(H264RawSEIPicTiming),
- SEI_MESSAGE_RW(h264, sei_pic_timing),
- },
- {
- SEI_TYPE_PAN_SCAN_RECT,
- 1, 0,
- sizeof(H264RawSEIPanScanRect),
- SEI_MESSAGE_RW(h264, sei_pan_scan_rect),
- },
- {
- SEI_TYPE_RECOVERY_POINT,
- 1, 0,
- sizeof(H264RawSEIRecoveryPoint),
- SEI_MESSAGE_RW(h264, sei_recovery_point),
- },
- {
- SEI_TYPE_DISPLAY_ORIENTATION,
- 1, 0,
- sizeof(H264RawSEIDisplayOrientation),
- SEI_MESSAGE_RW(h264, sei_display_orientation),
- },
- SEI_MESSAGE_TYPE_END
-};
-
-static const SEIMessageTypeDescriptor cbs_sei_h265_types[] = {
- {
- SEI_TYPE_BUFFERING_PERIOD,
- 1, 0,
- sizeof(H265RawSEIBufferingPeriod),
- SEI_MESSAGE_RW(h265, sei_buffering_period),
- },
- {
- SEI_TYPE_PIC_TIMING,
- 1, 0,
- sizeof(H265RawSEIPicTiming),
- SEI_MESSAGE_RW(h265, sei_pic_timing),
- },
- {
- SEI_TYPE_PAN_SCAN_RECT,
- 1, 0,
- sizeof(H265RawSEIPanScanRect),
- SEI_MESSAGE_RW(h265, sei_pan_scan_rect),
- },
- {
- SEI_TYPE_RECOVERY_POINT,
- 1, 0,
- sizeof(H265RawSEIRecoveryPoint),
- SEI_MESSAGE_RW(h265, sei_recovery_point),
- },
- {
- SEI_TYPE_DISPLAY_ORIENTATION,
- 1, 0,
- sizeof(H265RawSEIDisplayOrientation),
- SEI_MESSAGE_RW(h265, sei_display_orientation),
- },
- {
- SEI_TYPE_ACTIVE_PARAMETER_SETS,
- 1, 0,
- sizeof(H265RawSEIActiveParameterSets),
- SEI_MESSAGE_RW(h265, sei_active_parameter_sets),
- },
- {
- SEI_TYPE_DECODED_PICTURE_HASH,
- 0, 1,
- sizeof(H265RawSEIDecodedPictureHash),
- SEI_MESSAGE_RW(h265, sei_decoded_picture_hash),
- },
- {
- SEI_TYPE_TIME_CODE,
- 1, 0,
- sizeof(H265RawSEITimeCode),
- SEI_MESSAGE_RW(h265, sei_time_code),
- },
- {
- SEI_TYPE_ALPHA_CHANNEL_INFO,
- 1, 0,
- sizeof(H265RawSEIAlphaChannelInfo),
- SEI_MESSAGE_RW(h265, sei_alpha_channel_info),
- },
- SEI_MESSAGE_TYPE_END
-};
-
-const SEIMessageTypeDescriptor *ff_cbs_sei_find_type(CodedBitstreamContext *ctx,
- int payload_type)
+int ff_cbs_h264_add_sei_message(CodedBitstreamFragment *au,
+ H264RawSEIPayload *payload)
{
- const SEIMessageTypeDescriptor *codec_list;
- int i;
+ H264RawSEI *sei = NULL;
+ int err, i;
- for (i = 0; cbs_sei_common_types[i].type >= 0; i++) {
- if (cbs_sei_common_types[i].type == payload_type)
- return &cbs_sei_common_types[i];
+ // Find an existing SEI NAL unit to add to.
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SEI) {
+ sei = au->units[i].content;
+ if (sei->payload_count < H264_MAX_SEI_PAYLOADS)
+ break;
+
+ sei = NULL;
+ }
}
- switch (ctx->codec->codec_id) {
- case AV_CODEC_ID_H264:
- codec_list = cbs_sei_h264_types;
- break;
- case AV_CODEC_ID_H265:
- codec_list = cbs_sei_h265_types;
- break;
- default:
- return NULL;
+ if (!sei) {
+ // Need to make a new SEI NAL unit. Insert it before the first
+ // slice data NAL unit; if no slice data, add at the end.
+ AVBufferRef *sei_ref;
+
+ sei = av_mallocz(sizeof(*sei));
+ if (!sei) {
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ sei->nal_unit_header.nal_unit_type = H264_NAL_SEI;
+ sei->nal_unit_header.nal_ref_idc = 0;
+
+ sei_ref = av_buffer_create((uint8_t*)sei, sizeof(*sei),
+ &cbs_h264_free_sei, NULL, 0);
+ if (!sei_ref) {
+ av_freep(&sei);
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SLICE ||
+ au->units[i].type == H264_NAL_IDR_SLICE)
+ break;
+ }
+
+ err = ff_cbs_insert_unit_content(au, i, H264_NAL_SEI,
+ sei, sei_ref);
+ av_buffer_unref(&sei_ref);
+ if (err < 0)
+ goto fail;
}
- for (i = 0; codec_list[i].type >= 0; i++) {
- if (codec_list[i].type == payload_type)
- return &codec_list[i];
- }
+ memcpy(&sei->payload[sei->payload_count], payload, sizeof(*payload));
+ ++sei->payload_count;
- return NULL;
+ return 0;
+fail:
+ cbs_h264_free_sei_payload(payload);
+ return err;
+}
+
+void ff_cbs_h264_delete_sei_message(CodedBitstreamFragment *au,
+ CodedBitstreamUnit *nal,
+ int position)
+{
+ H264RawSEI *sei = nal->content;
+
+ av_assert0(nal->type == H264_NAL_SEI);
+ av_assert0(position >= 0 && position < sei->payload_count);
+
+ if (position == 0 && sei->payload_count == 1) {
+ // Deleting NAL unit entirely.
+ int i;
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (&au->units[i] == nal)
+ break;
+ }
+
+ ff_cbs_delete_unit(au, i);
+ } else {
+ cbs_h264_free_sei_payload(&sei->payload[position]);
+
+ --sei->payload_count;
+ memmove(sei->payload + position,
+ sei->payload + position + 1,
+ (sei->payload_count - position) * sizeof(*sei->payload));
+ }
}
diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c
index 9587f33..b654609 100644
--- a/libavcodec/cbs_h264_syntax_template.c
+++ b/libavcodec/cbs_h264_syntax_template.c
@@ -511,8 +511,7 @@
}
static int FUNC(sei_buffering_period)(CodedBitstreamContext *ctx, RWContext *rw,
- H264RawSEIBufferingPeriod *current,
- SEIMessageState *sei)
+ H264RawSEIBufferingPeriod *current)
{
CodedBitstreamH264Context *h264 = ctx->priv_data;
const H264RawSPS *sps;
@@ -605,8 +604,7 @@
}
static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw,
- H264RawSEIPicTiming *current,
- SEIMessageState *sei)
+ H264RawSEIPicTiming *current)
{
CodedBitstreamH264Context *h264 = ctx->priv_data;
const H264RawSPS *sps;
@@ -677,8 +675,7 @@
}
static int FUNC(sei_pan_scan_rect)(CodedBitstreamContext *ctx, RWContext *rw,
- H264RawSEIPanScanRect *current,
- SEIMessageState *sei)
+ H264RawSEIPanScanRect *current)
{
int err, i;
@@ -703,9 +700,72 @@
return 0;
}
+static int FUNC(sei_user_data_registered)(CodedBitstreamContext *ctx, RWContext *rw,
+ H264RawSEIUserDataRegistered *current,
+ uint32_t *payload_size)
+{
+ int err, i, j;
+
+ HEADER("User Data Registered ITU-T T.35");
+
+ u(8, itu_t_t35_country_code, 0x00, 0xff);
+ if (current->itu_t_t35_country_code != 0xff)
+ i = 1;
+ else {
+ u(8, itu_t_t35_country_code_extension_byte, 0x00, 0xff);
+ i = 2;
+ }
+
+#ifdef READ
+ if (*payload_size < i) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR,
+ "Invalid SEI user data registered payload.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ current->data_length = *payload_size - i;
+#else
+ *payload_size = i + current->data_length;
+#endif
+
+ allocate(current->data, current->data_length);
+ for (j = 0; j < current->data_length; j++)
+ xu(8, itu_t_t35_payload_byte[i], current->data[j], 0x00, 0xff, 1, i + j);
+
+ return 0;
+}
+
+static int FUNC(sei_user_data_unregistered)(CodedBitstreamContext *ctx, RWContext *rw,
+ H264RawSEIUserDataUnregistered *current,
+ uint32_t *payload_size)
+{
+ int err, i;
+
+ HEADER("User Data Unregistered");
+
+#ifdef READ
+ if (*payload_size < 16) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR,
+ "Invalid SEI user data unregistered payload.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ current->data_length = *payload_size - 16;
+#else
+ *payload_size = 16 + current->data_length;
+#endif
+
+ for (i = 0; i < 16; i++)
+ us(8, uuid_iso_iec_11578[i], 0x00, 0xff, 1, i);
+
+ allocate(current->data, current->data_length);
+
+ for (i = 0; i < current->data_length; i++)
+ xu(8, user_data_payload_byte[i], current->data[i], 0x00, 0xff, 1, i);
+
+ return 0;
+}
+
static int FUNC(sei_recovery_point)(CodedBitstreamContext *ctx, RWContext *rw,
- H264RawSEIRecoveryPoint *current,
- SEIMessageState *sei)
+ H264RawSEIRecoveryPoint *current)
{
int err;
@@ -720,8 +780,7 @@
}
static int FUNC(sei_display_orientation)(CodedBitstreamContext *ctx, RWContext *rw,
- H264RawSEIDisplayOrientation *current,
- SEIMessageState *sei)
+ H264RawSEIDisplayOrientation *current)
{
int err;
@@ -739,17 +798,205 @@
return 0;
}
+static int FUNC(sei_mastering_display_colour_volume)(CodedBitstreamContext *ctx, RWContext *rw,
+ H264RawSEIMasteringDisplayColourVolume *current)
+{
+ int err, c;
+
+ HEADER("Mastering Display Colour Volume");
+
+ for (c = 0; c < 3; c++) {
+ us(16, display_primaries_x[c], 0, 50000, 1, c);
+ us(16, display_primaries_y[c], 0, 50000, 1, c);
+ }
+
+ u(16, white_point_x, 0, 50000);
+ u(16, white_point_y, 0, 50000);
+
+ u(32, max_display_mastering_luminance, 1, MAX_UINT_BITS(32));
+ u(32, min_display_mastering_luminance, 0, current->max_display_mastering_luminance - 1);
+
+ return 0;
+}
+
+static int FUNC(sei_alternative_transfer_characteristics)(CodedBitstreamContext *ctx,
+ RWContext *rw,
+ H264RawSEIAlternativeTransferCharacteristics *current)
+{
+ int err;
+
+ HEADER("Alternative Transfer Characteristics");
+
+ ub(8, preferred_transfer_characteristics);
+
+ return 0;
+}
+
+static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
+ H264RawSEIPayload *current)
+{
+ int err, i;
+ int start_position, end_position;
+
+#ifdef READ
+ start_position = get_bits_count(rw);
+#else
+ start_position = put_bits_count(rw);
+#endif
+
+ switch (current->payload_type) {
+ case H264_SEI_TYPE_BUFFERING_PERIOD:
+ CHECK(FUNC(sei_buffering_period)
+ (ctx, rw, ¤t->payload.buffering_period));
+ break;
+ case H264_SEI_TYPE_PIC_TIMING:
+ CHECK(FUNC(sei_pic_timing)
+ (ctx, rw, ¤t->payload.pic_timing));
+ break;
+ case H264_SEI_TYPE_PAN_SCAN_RECT:
+ CHECK(FUNC(sei_pan_scan_rect)
+ (ctx, rw, ¤t->payload.pan_scan_rect));
+ break;
+ case H264_SEI_TYPE_FILLER_PAYLOAD:
+ {
+ for (i = 0; i < current->payload_size; i++)
+ fixed(8, ff_byte, 0xff);
+ }
+ break;
+ case H264_SEI_TYPE_USER_DATA_REGISTERED:
+ CHECK(FUNC(sei_user_data_registered)
+ (ctx, rw, ¤t->payload.user_data_registered, ¤t->payload_size));
+ break;
+ case H264_SEI_TYPE_USER_DATA_UNREGISTERED:
+ CHECK(FUNC(sei_user_data_unregistered)
+ (ctx, rw, ¤t->payload.user_data_unregistered, ¤t->payload_size));
+ break;
+ case H264_SEI_TYPE_RECOVERY_POINT:
+ CHECK(FUNC(sei_recovery_point)
+ (ctx, rw, ¤t->payload.recovery_point));
+ break;
+ case H264_SEI_TYPE_DISPLAY_ORIENTATION:
+ CHECK(FUNC(sei_display_orientation)
+ (ctx, rw, ¤t->payload.display_orientation));
+ break;
+ case H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME:
+ CHECK(FUNC(sei_mastering_display_colour_volume)
+ (ctx, rw, ¤t->payload.mastering_display_colour_volume));
+ break;
+ case H264_SEI_TYPE_ALTERNATIVE_TRANSFER:
+ CHECK(FUNC(sei_alternative_transfer_characteristics)
+ (ctx, rw, ¤t->payload.alternative_transfer_characteristics));
+ break;
+ default:
+ {
+#ifdef READ
+ current->payload.other.data_length = current->payload_size;
+#endif
+ allocate(current->payload.other.data, current->payload.other.data_length);
+ for (i = 0; i < current->payload.other.data_length; i++)
+ xu(8, payload_byte[i], current->payload.other.data[i], 0, 255, 1, i);
+ }
+ }
+
+ if (byte_alignment(rw)) {
+ fixed(1, bit_equal_to_one, 1);
+ while (byte_alignment(rw))
+ fixed(1, bit_equal_to_zero, 0);
+ }
+
+#ifdef READ
+ end_position = get_bits_count(rw);
+ if (end_position < start_position + 8 * current->payload_size) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR, "Incorrect SEI payload length: "
+ "header %"PRIu32" bits, actually %d bits.\n",
+ 8 * current->payload_size,
+ end_position - start_position);
+ return AVERROR_INVALIDDATA;
+ }
+#else
+ end_position = put_bits_count(rw);
+ current->payload_size = (end_position - start_position) / 8;
+#endif
+
+ return 0;
+}
+
static int FUNC(sei)(CodedBitstreamContext *ctx, RWContext *rw,
H264RawSEI *current)
{
- int err;
+ int err, k;
HEADER("Supplemental Enhancement Information");
CHECK(FUNC(nal_unit_header)(ctx, rw, ¤t->nal_unit_header,
1 << H264_NAL_SEI));
- CHECK(FUNC_SEI(message_list)(ctx, rw, ¤t->message_list, 1));
+#ifdef READ
+ for (k = 0; k < H264_MAX_SEI_PAYLOADS; k++) {
+ uint32_t payload_type = 0;
+ uint32_t payload_size = 0;
+ uint32_t tmp;
+
+ while (show_bits(rw, 8) == 0xff) {
+ fixed(8, ff_byte, 0xff);
+ payload_type += 255;
+ }
+ xu(8, last_payload_type_byte, tmp, 0, 254, 0);
+ payload_type += tmp;
+
+ while (show_bits(rw, 8) == 0xff) {
+ fixed(8, ff_byte, 0xff);
+ payload_size += 255;
+ }
+ xu(8, last_payload_size_byte, tmp, 0, 254, 0);
+ payload_size += tmp;
+
+ current->payload[k].payload_type = payload_type;
+ current->payload[k].payload_size = payload_size;
+
+ current->payload_count++;
+ CHECK(FUNC(sei_payload)(ctx, rw, ¤t->payload[k]));
+
+ if (!cbs_h2645_read_more_rbsp_data(rw))
+ break;
+ }
+ if (k >= H264_MAX_SEI_PAYLOADS) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR, "Too many payloads in "
+ "SEI message: found %d.\n", k);
+ return AVERROR_INVALIDDATA;
+ }
+#else
+ for (k = 0; k < current->payload_count; k++) {
+ PutBitContext start_state;
+ uint32_t tmp;
+ int need_size, i;
+
+ // Somewhat clumsy: we write the payload twice when
+ // we don't know the size in advance. This will mess
+ // with trace output, but is otherwise harmless.
+ start_state = *rw;
+ need_size = !current->payload[k].payload_size;
+ for (i = 0; i < 1 + need_size; i++) {
+ *rw = start_state;
+
+ tmp = current->payload[k].payload_type;
+ while (tmp >= 255) {
+ fixed(8, ff_byte, 0xff);
+ tmp -= 255;
+ }
+ xu(8, last_payload_type_byte, tmp, 0, 254, 0);
+
+ tmp = current->payload[k].payload_size;
+ while (tmp >= 255) {
+ fixed(8, ff_byte, 0xff);
+ tmp -= 255;
+ }
+ xu(8, last_payload_size_byte, tmp, 0, 254, 0);
+
+ CHECK(FUNC(sei_payload)(ctx, rw, ¤t->payload[k]));
+ }
+ }
+#endif
CHECK(FUNC(rbsp_trailing_bits)(ctx, rw));
diff --git a/libavcodec/cbs_h265.h b/libavcodec/cbs_h265.h
index 738cbee..15b22bb 100644
--- a/libavcodec/cbs_h265.h
+++ b/libavcodec/cbs_h265.h
@@ -23,7 +23,6 @@
#include <stdint.h>
#include "cbs_h2645.h"
-#include "cbs_sei.h"
#include "hevc.h"
enum {
@@ -597,6 +596,21 @@
uint16_t pan_scan_rect_persistence_flag;
} H265RawSEIPanScanRect;
+typedef struct H265RawSEIUserDataRegistered {
+ uint8_t itu_t_t35_country_code;
+ uint8_t itu_t_t35_country_code_extension_byte;
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+} H265RawSEIUserDataRegistered;
+
+typedef struct H265RawSEIUserDataUnregistered {
+ uint8_t uuid_iso_iec_11578[16];
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+} H265RawSEIUserDataUnregistered;
+
typedef struct H265RawSEIRecoveryPoint {
int16_t recovery_poc_cnt;
uint8_t exact_match_flag;
@@ -647,6 +661,24 @@
int32_t time_offset_value[3];
} H265RawSEITimeCode;
+typedef struct H265RawSEIMasteringDisplayColourVolume {
+ uint16_t display_primaries_x[3];
+ uint16_t display_primaries_y[3];
+ uint16_t white_point_x;
+ uint16_t white_point_y;
+ uint32_t max_display_mastering_luminance;
+ uint32_t min_display_mastering_luminance;
+} H265RawSEIMasteringDisplayColourVolume;
+
+typedef struct H265RawSEIContentLightLevelInfo {
+ uint16_t max_content_light_level;
+ uint16_t max_pic_average_light_level;
+} H265RawSEIContentLightLevelInfo;
+
+typedef struct H265RawSEIAlternativeTransferCharacteristics {
+ uint8_t preferred_transfer_characteristics;
+} H265RawSEIAlternativeTransferCharacteristics;
+
typedef struct H265RawSEIAlphaChannelInfo {
uint8_t alpha_channel_cancel_flag;
uint8_t alpha_channel_use_idc;
@@ -658,9 +690,39 @@
uint8_t alpha_channel_clip_type_flag;
} H265RawSEIAlphaChannelInfo;
+typedef struct H265RawSEIPayload {
+ uint32_t payload_type;
+ uint32_t payload_size;
+ union {
+ H265RawSEIBufferingPeriod buffering_period;
+ H265RawSEIPicTiming pic_timing;
+ H265RawSEIPanScanRect pan_scan_rect;
+ H265RawSEIUserDataRegistered user_data_registered;
+ H265RawSEIUserDataUnregistered user_data_unregistered;
+ H265RawSEIRecoveryPoint recovery_point;
+ H265RawSEIDisplayOrientation display_orientation;
+ H265RawSEIActiveParameterSets active_parameter_sets;
+ H265RawSEIDecodedPictureHash decoded_picture_hash;
+ H265RawSEITimeCode time_code;
+ H265RawSEIMasteringDisplayColourVolume mastering_display;
+ H265RawSEIContentLightLevelInfo content_light_level;
+ H265RawSEIAlternativeTransferCharacteristics
+ alternative_transfer_characteristics;
+ H265RawSEIAlphaChannelInfo alpha_channel_info;
+ struct {
+ uint8_t *data;
+ AVBufferRef *data_ref;
+ size_t data_length;
+ } other;
+ } payload;
+ H265RawExtensionData extension_data;
+} H265RawSEIPayload;
+
typedef struct H265RawSEI {
H265RawNALUnitHeader nal_unit_header;
- SEIRawMessageList message_list;
+
+ H265RawSEIPayload payload[H265_MAX_SEI_PAYLOADS];
+ uint8_t payload_count;
} H265RawSEI;
typedef struct CodedBitstreamH265Context {
diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c
index d09934c..48fae82 100644
--- a/libavcodec/cbs_h265_syntax_template.c
+++ b/libavcodec/cbs_h265_syntax_template.c
@@ -1596,9 +1596,10 @@
return 0;
}
-static int FUNC(sei_buffering_period)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIBufferingPeriod *current, SEIMessageState *sei)
+static int FUNC(sei_buffering_period)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIBufferingPeriod *current,
+ uint32_t *payload_size,
+ int *more_data)
{
CodedBitstreamH265Context *h265 = ctx->priv_data;
const H265RawSPS *sps;
@@ -1686,7 +1687,7 @@
#ifdef READ
end_pos = get_bits_count(rw);
- if (cbs_h265_payload_extension_present(rw, sei->payload_size,
+ if (cbs_h265_payload_extension_present(rw, *payload_size,
end_pos - start_pos))
flag(use_alt_cpb_params_flag);
else
@@ -1694,21 +1695,20 @@
#else
// If unknown extension data exists, then use_alt_cpb_params_flag is
// coded in the bitstream and must be written even if it's 0.
- if (current->use_alt_cpb_params_flag || sei->extension_present) {
+ if (current->use_alt_cpb_params_flag || *more_data) {
flag(use_alt_cpb_params_flag);
// Ensure this bit is not the last in the payload by making the
// more_data_in_payload() check evaluate to true, so it may not
// be mistaken as something else by decoders.
- sei->extension_present = 1;
+ *more_data = 1;
}
#endif
return 0;
}
-static int FUNC(sei_pic_timing)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIPicTiming *current, SEIMessageState *sei)
+static int FUNC(sei_pic_timing)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIPicTiming *current)
{
CodedBitstreamH265Context *h265 = ctx->priv_data;
const H265RawSPS *sps;
@@ -1782,9 +1782,8 @@
return 0;
}
-static int FUNC(sei_pan_scan_rect)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIPanScanRect *current, SEIMessageState *sei)
+static int FUNC(sei_pan_scan_rect)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIPanScanRect *current)
{
int err, i;
@@ -1809,9 +1808,72 @@
return 0;
}
-static int FUNC(sei_recovery_point)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIRecoveryPoint *current, SEIMessageState *sei)
+static int FUNC(sei_user_data_registered)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIUserDataRegistered *current,
+ uint32_t *payload_size)
+{
+ int err, i, j;
+
+ HEADER("User Data Registered ITU-T T.35");
+
+ u(8, itu_t_t35_country_code, 0x00, 0xff);
+ if (current->itu_t_t35_country_code != 0xff)
+ i = 1;
+ else {
+ u(8, itu_t_t35_country_code_extension_byte, 0x00, 0xff);
+ i = 2;
+ }
+
+#ifdef READ
+ if (*payload_size < i) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR,
+ "Invalid SEI user data registered payload.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ current->data_length = *payload_size - i;
+#else
+ *payload_size = i + current->data_length;
+#endif
+
+ allocate(current->data, current->data_length);
+ for (j = 0; j < current->data_length; j++)
+ xu(8, itu_t_t35_payload_byte[i], current->data[j], 0x00, 0xff, 1, i + j);
+
+ return 0;
+}
+
+static int FUNC(sei_user_data_unregistered)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIUserDataUnregistered *current,
+ uint32_t *payload_size)
+{
+ int err, i;
+
+ HEADER("User Data Unregistered");
+
+#ifdef READ
+ if (*payload_size < 16) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR,
+ "Invalid SEI user data unregistered payload.\n");
+ return AVERROR_INVALIDDATA;
+ }
+ current->data_length = *payload_size - 16;
+#else
+ *payload_size = 16 + current->data_length;
+#endif
+
+ for (i = 0; i < 16; i++)
+ us(8, uuid_iso_iec_11578[i], 0x00, 0xff, 1, i);
+
+ allocate(current->data, current->data_length);
+
+ for (i = 0; i < current->data_length; i++)
+ xu(8, user_data_payload_byte[i], current->data[i], 0x00, 0xff, 1, i);
+
+ return 0;
+}
+
+static int FUNC(sei_recovery_point)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIRecoveryPoint *current)
{
int err;
@@ -1825,9 +1887,8 @@
return 0;
}
-static int FUNC(sei_display_orientation)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIDisplayOrientation *current, SEIMessageState *sei)
+static int FUNC(sei_display_orientation)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIDisplayOrientation *current)
{
int err;
@@ -1844,9 +1905,8 @@
return 0;
}
-static int FUNC(sei_active_parameter_sets)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIActiveParameterSets *current, SEIMessageState *sei)
+static int FUNC(sei_active_parameter_sets)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIActiveParameterSets *current)
{
CodedBitstreamH265Context *h265 = ctx->priv_data;
const H265RawVPS *vps;
@@ -1881,9 +1941,8 @@
return 0;
}
-static int FUNC(sei_decoded_picture_hash)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIDecodedPictureHash *current, SEIMessageState *sei)
+static int FUNC(sei_decoded_picture_hash)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIDecodedPictureHash *current)
{
CodedBitstreamH265Context *h265 = ctx->priv_data;
const H265RawSPS *sps = h265->active_sps;
@@ -1913,9 +1972,8 @@
return 0;
}
-static int FUNC(sei_time_code)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEITimeCode *current, SEIMessageState *sei)
+static int FUNC(sei_time_code)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEITimeCode *current)
{
int err, i;
@@ -1964,9 +2022,58 @@
return 0;
}
-static int FUNC(sei_alpha_channel_info)
- (CodedBitstreamContext *ctx, RWContext *rw,
- H265RawSEIAlphaChannelInfo *current, SEIMessageState *sei)
+static int FUNC(sei_mastering_display)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIMasteringDisplayColourVolume *current)
+{
+ int err, c;
+
+ HEADER("Mastering Display Colour Volume");
+
+ for (c = 0; c < 3; c++) {
+ us(16, display_primaries_x[c], 0, 50000, 1, c);
+ us(16, display_primaries_y[c], 0, 50000, 1, c);
+ }
+
+ u(16, white_point_x, 0, 50000);
+ u(16, white_point_y, 0, 50000);
+
+ u(32, max_display_mastering_luminance,
+ 1, MAX_UINT_BITS(32));
+ u(32, min_display_mastering_luminance,
+ 0, current->max_display_mastering_luminance - 1);
+
+ return 0;
+}
+
+static int FUNC(sei_content_light_level)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIContentLightLevelInfo *current)
+{
+ int err;
+
+ HEADER("Content Light Level");
+
+ ub(16, max_content_light_level);
+ ub(16, max_pic_average_light_level);
+
+ return 0;
+}
+
+static int FUNC(sei_alternative_transfer_characteristics)(CodedBitstreamContext *ctx,
+ RWContext *rw,
+ H265RawSEIAlternativeTransferCharacteristics *current)
+{
+ int err;
+
+ HEADER("Alternative Transfer Characteristics");
+
+ ub(8, preferred_transfer_characteristics);
+
+ return 0;
+}
+
+static int FUNC(sei_alpha_channel_info)(CodedBitstreamContext *ctx,
+ RWContext *rw,
+ H265RawSEIAlphaChannelInfo *current)
{
int err, length;
@@ -1992,10 +2099,144 @@
return 0;
}
+static int FUNC(payload_extension)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawExtensionData *current, uint32_t payload_size,
+ int cur_pos)
+{
+ int err;
+ size_t byte_length, k;
+
+#ifdef READ
+ GetBitContext tmp;
+ int bits_left, payload_zero_bits;
+
+ if (!cbs_h265_payload_extension_present(rw, payload_size, cur_pos))
+ return 0;
+
+ bits_left = 8 * payload_size - cur_pos;
+ tmp = *rw;
+ if (bits_left > 8)
+ skip_bits_long(&tmp, bits_left - 8);
+ payload_zero_bits = get_bits(&tmp, FFMIN(bits_left, 8));
+ if (!payload_zero_bits)
+ return AVERROR_INVALIDDATA;
+ payload_zero_bits = ff_ctz(payload_zero_bits);
+ current->bit_length = bits_left - payload_zero_bits - 1;
+ allocate(current->data, (current->bit_length + 7) / 8);
+#endif
+
+ byte_length = (current->bit_length + 7) / 8;
+ for (k = 0; k < byte_length; k++) {
+ int length = FFMIN(current->bit_length - k * 8, 8);
+ xu(length, reserved_payload_extension_data, current->data[k],
+ 0, MAX_UINT_BITS(length), 0);
+ }
+
+ return 0;
+}
+
+static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw,
+ H265RawSEIPayload *current, int prefix)
+{
+ int err, i;
+ int start_position, current_position;
+ int more_data = !!current->extension_data.bit_length;
+
+#ifdef READ
+ start_position = get_bits_count(rw);
+#else
+ start_position = put_bits_count(rw);
+#endif
+
+ switch (current->payload_type) {
+#define SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid) do { \
+ if (prefix && !prefix_valid) { \
+ av_log(ctx->log_ctx, AV_LOG_ERROR, "SEI type %s invalid " \
+ "as prefix SEI!\n", #name); \
+ return AVERROR_INVALIDDATA; \
+ } \
+ if (!prefix && !suffix_valid) { \
+ av_log(ctx->log_ctx, AV_LOG_ERROR, "SEI type %s invalid " \
+ "as suffix SEI!\n", #name); \
+ return AVERROR_INVALIDDATA; \
+ } \
+ } while (0)
+#define SEI_TYPE_N(type, prefix_valid, suffix_valid, name) \
+ case HEVC_SEI_TYPE_ ## type: \
+ SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
+ CHECK(FUNC(sei_ ## name)(ctx, rw, ¤t->payload.name)); \
+ break
+#define SEI_TYPE_S(type, prefix_valid, suffix_valid, name) \
+ case HEVC_SEI_TYPE_ ## type: \
+ SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
+ CHECK(FUNC(sei_ ## name)(ctx, rw, ¤t->payload.name, \
+ ¤t->payload_size)); \
+ break
+#define SEI_TYPE_E(type, prefix_valid, suffix_valid, name) \
+ case HEVC_SEI_TYPE_ ## type: \
+ SEI_TYPE_CHECK_VALID(name, prefix_valid, suffix_valid); \
+ CHECK(FUNC(sei_ ## name)(ctx, rw, ¤t->payload.name, \
+ ¤t->payload_size, \
+ &more_data)); \
+ break
+
+ SEI_TYPE_E(BUFFERING_PERIOD, 1, 0, buffering_period);
+ SEI_TYPE_N(PICTURE_TIMING, 1, 0, pic_timing);
+ SEI_TYPE_N(PAN_SCAN_RECT, 1, 0, pan_scan_rect);
+ SEI_TYPE_S(USER_DATA_REGISTERED_ITU_T_T35,
+ 1, 1, user_data_registered);
+ SEI_TYPE_S(USER_DATA_UNREGISTERED, 1, 1, user_data_unregistered);
+ SEI_TYPE_N(RECOVERY_POINT, 1, 0, recovery_point);
+ SEI_TYPE_N(DISPLAY_ORIENTATION, 1, 0, display_orientation);
+ SEI_TYPE_N(ACTIVE_PARAMETER_SETS, 1, 0, active_parameter_sets);
+ SEI_TYPE_N(DECODED_PICTURE_HASH, 0, 1, decoded_picture_hash);
+ SEI_TYPE_N(TIME_CODE, 1, 0, time_code);
+ SEI_TYPE_N(MASTERING_DISPLAY_INFO, 1, 0, mastering_display);
+ SEI_TYPE_N(CONTENT_LIGHT_LEVEL_INFO, 1, 0, content_light_level);
+ SEI_TYPE_N(ALTERNATIVE_TRANSFER_CHARACTERISTICS,
+ 1, 0, alternative_transfer_characteristics);
+ SEI_TYPE_N(ALPHA_CHANNEL_INFO, 1, 0, alpha_channel_info);
+
+#undef SEI_TYPE
+ default:
+ {
+#ifdef READ
+ current->payload.other.data_length = current->payload_size;
+#endif
+ allocate(current->payload.other.data, current->payload.other.data_length);
+
+ for (i = 0; i < current->payload_size; i++)
+ xu(8, payload_byte[i], current->payload.other.data[i], 0, 255,
+ 1, i);
+ }
+ }
+
+ // more_data_in_payload()
+#ifdef READ
+ current_position = get_bits_count(rw) - start_position;
+ if (current_position < 8 * current->payload_size) {
+#else
+ current_position = put_bits_count(rw) - start_position;
+ if (byte_alignment(rw) || more_data) {
+#endif
+ CHECK(FUNC(payload_extension)(ctx, rw, ¤t->extension_data,
+ current->payload_size, current_position));
+ fixed(1, bit_equal_to_one, 1);
+ while (byte_alignment(rw))
+ fixed(1, bit_equal_to_zero, 0);
+ }
+
+#ifdef WRITE
+ current->payload_size = (put_bits_count(rw) - start_position) >> 3;
+#endif
+
+ return 0;
+}
+
static int FUNC(sei)(CodedBitstreamContext *ctx, RWContext *rw,
H265RawSEI *current, int prefix)
{
- int err;
+ int err, k;
if (prefix)
HEADER("Prefix Supplemental Enhancement Information");
@@ -2006,7 +2247,72 @@
prefix ? HEVC_NAL_SEI_PREFIX
: HEVC_NAL_SEI_SUFFIX));
- CHECK(FUNC_SEI(message_list)(ctx, rw, ¤t->message_list, prefix));
+#ifdef READ
+ for (k = 0; k < H265_MAX_SEI_PAYLOADS; k++) {
+ uint32_t payload_type = 0;
+ uint32_t payload_size = 0;
+ uint32_t tmp;
+
+ while (show_bits(rw, 8) == 0xff) {
+ fixed(8, ff_byte, 0xff);
+ payload_type += 255;
+ }
+ xu(8, last_payload_type_byte, tmp, 0, 254, 0);
+ payload_type += tmp;
+
+ while (show_bits(rw, 8) == 0xff) {
+ fixed(8, ff_byte, 0xff);
+ payload_size += 255;
+ }
+ xu(8, last_payload_size_byte, tmp, 0, 254, 0);
+ payload_size += tmp;
+
+ current->payload[k].payload_type = payload_type;
+ current->payload[k].payload_size = payload_size;
+
+ current->payload_count++;
+ CHECK(FUNC(sei_payload)(ctx, rw, ¤t->payload[k], prefix));
+
+ if (!cbs_h2645_read_more_rbsp_data(rw))
+ break;
+ }
+ if (k >= H265_MAX_SEI_PAYLOADS) {
+ av_log(ctx->log_ctx, AV_LOG_ERROR, "Too many payloads in "
+ "SEI message: found %d.\n", k);
+ return AVERROR_INVALIDDATA;
+ }
+#else
+ for (k = 0; k < current->payload_count; k++) {
+ PutBitContext start_state;
+ uint32_t tmp;
+ int need_size, i;
+
+ // Somewhat clumsy: we write the payload twice when
+ // we don't know the size in advance. This will mess
+ // with trace output, but is otherwise harmless.
+ start_state = *rw;
+ need_size = !current->payload[k].payload_size;
+ for (i = 0; i < 1 + need_size; i++) {
+ *rw = start_state;
+
+ tmp = current->payload[k].payload_type;
+ while (tmp >= 255) {
+ fixed(8, ff_byte, 0xff);
+ tmp -= 255;
+ }
+ xu(8, last_payload_type_byte, tmp, 0, 254, 0);
+
+ tmp = current->payload[k].payload_size;
+ while (tmp >= 255) {
+ fixed(8, ff_byte, 0xff);
+ tmp -= 255;
+ }
+ xu(8, last_payload_size_byte, tmp, 0, 254, 0);
+
+ CHECK(FUNC(sei_payload)(ctx, rw, ¤t->payload[k], prefix));
+ }
+ }
+#endif
CHECK(FUNC(rbsp_trailing_bits)(ctx, rw));
diff --git a/libavcodec/cbs_internal.h b/libavcodec/cbs_internal.h
index a392880..faa847a 100644
--- a/libavcodec/cbs_internal.h
+++ b/libavcodec/cbs_internal.h
@@ -86,12 +86,6 @@
typedef struct CodedBitstreamType {
enum AVCodecID codec_id;
- // A class for the private data, used to declare private AVOptions.
- // This field is NULL for types that do not declare any options.
- // If this field is non-NULL, the first member of the filter private data
- // must be a pointer to AVClass.
- const AVClass *priv_class;
-
size_t priv_data_size;
// List of unit type descriptors for this codec.
diff --git a/libavcodec/cbs_sei.c b/libavcodec/cbs_sei.c
deleted file mode 100644
index c49830a..0000000
--- a/libavcodec/cbs_sei.c
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- * 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
- */
-
-#include "cbs.h"
-#include "cbs_internal.h"
-#include "cbs_h264.h"
-#include "cbs_h265.h"
-#include "cbs_sei.h"
-
-static void cbs_free_user_data_registered(void *opaque, uint8_t *data)
-{
- SEIRawUserDataRegistered *udr = (SEIRawUserDataRegistered*)data;
- av_buffer_unref(&udr->data_ref);
- av_free(udr);
-}
-
-static void cbs_free_user_data_unregistered(void *opaque, uint8_t *data)
-{
- SEIRawUserDataUnregistered *udu = (SEIRawUserDataUnregistered*)data;
- av_buffer_unref(&udu->data_ref);
- av_free(udu);
-}
-
-int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message,
- const SEIMessageTypeDescriptor *desc)
-{
- void (*free_func)(void*, uint8_t*);
-
- av_assert0(message->payload == NULL &&
- message->payload_ref == NULL);
- message->payload_type = desc->type;
-
- if (desc->type == SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35)
- free_func = &cbs_free_user_data_registered;
- else if (desc->type == SEI_TYPE_USER_DATA_UNREGISTERED)
- free_func = &cbs_free_user_data_unregistered;
- else
- free_func = NULL;
-
- if (free_func) {
- message->payload = av_mallocz(desc->size);
- if (!message->payload)
- return AVERROR(ENOMEM);
- message->payload_ref =
- av_buffer_create(message->payload, desc->size,
- free_func, NULL, 0);
- } else {
- message->payload_ref = av_buffer_alloc(desc->size);
- }
- if (!message->payload_ref) {
- av_freep(&message->payload);
- return AVERROR(ENOMEM);
- }
- message->payload = message->payload_ref->data;
-
- return 0;
-}
-
-int ff_cbs_sei_list_add(SEIRawMessageList *list)
-{
- void *ptr;
- int old_count = list->nb_messages_allocated;
-
- av_assert0(list->nb_messages <= old_count);
- if (list->nb_messages + 1 > old_count) {
- int new_count = 2 * old_count + 1;
-
- ptr = av_realloc_array(list->messages,
- new_count, sizeof(*list->messages));
- if (!ptr)
- return AVERROR(ENOMEM);
-
- list->messages = ptr;
- list->nb_messages_allocated = new_count;
-
- // Zero the newly-added entries.
- memset(list->messages + old_count, 0,
- (new_count - old_count) * sizeof(*list->messages));
- }
- ++list->nb_messages;
- return 0;
-}
-
-void ff_cbs_sei_free_message_list(SEIRawMessageList *list)
-{
- for (int i = 0; i < list->nb_messages; i++) {
- SEIRawMessage *message = &list->messages[i];
- av_buffer_unref(&message->payload_ref);
- av_buffer_unref(&message->extension_data_ref);
- }
- av_free(list->messages);
-}
-
-static int cbs_sei_get_unit(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- int prefix,
- CodedBitstreamUnit **sei_unit)
-{
- CodedBitstreamUnit *unit;
- int sei_type, highest_vcl_type, err, i, position;
-
- switch (ctx->codec->codec_id) {
- case AV_CODEC_ID_H264:
- // (We can ignore auxiliary slices because we only have prefix
- // SEI in H.264 and an auxiliary picture must always follow a
- // primary picture.)
- highest_vcl_type = H264_NAL_IDR_SLICE;
- if (prefix)
- sei_type = H264_NAL_SEI;
- else
- return AVERROR(EINVAL);
- break;
- case AV_CODEC_ID_H265:
- highest_vcl_type = HEVC_NAL_RSV_VCL31;
- if (prefix)
- sei_type = HEVC_NAL_SEI_PREFIX;
- else
- sei_type = HEVC_NAL_SEI_SUFFIX;
- break;
- default:
- return AVERROR(EINVAL);
- }
-
- // Find an existing SEI NAL unit of the right type.
- unit = NULL;
- for (i = 0; i < au->nb_units; i++) {
- if (au->units[i].type == sei_type) {
- unit = &au->units[i];
- break;
- }
- }
-
- if (unit) {
- *sei_unit = unit;
- return 0;
- }
-
- // Need to add a new SEI NAL unit ...
- if (prefix) {
- // ... before the first VCL NAL unit.
- for (i = 0; i < au->nb_units; i++) {
- if (au->units[i].type < highest_vcl_type)
- break;
- }
- position = i;
- } else {
- // ... after the last VCL NAL unit.
- for (i = au->nb_units - 1; i >= 0; i--) {
- if (au->units[i].type < highest_vcl_type)
- break;
- }
- if (i < 0) {
- // No VCL units; just put it at the end.
- position = -1;
- } else {
- position = i + 1;
- }
- }
-
- err = ff_cbs_insert_unit_content(au, position, sei_type,
- NULL, NULL);
- if (err < 0)
- return err;
- unit = &au->units[position];
- unit->type = sei_type;
-
- err = ff_cbs_alloc_unit_content2(ctx, unit);
- if (err < 0)
- return err;
-
- switch (ctx->codec->codec_id) {
- case AV_CODEC_ID_H264:
- {
- H264RawSEI sei = {
- .nal_unit_header = {
- .nal_ref_idc = 0,
- .nal_unit_type = sei_type,
- },
- };
- memcpy(unit->content, &sei, sizeof(sei));
- }
- break;
- case AV_CODEC_ID_H265:
- {
- H265RawSEI sei = {
- .nal_unit_header = {
- .nal_unit_type = sei_type,
- .nuh_layer_id = 0,
- .nuh_temporal_id_plus1 = 1,
- },
- };
- memcpy(unit->content, &sei, sizeof(sei));
- }
- break;
- default:
- av_assert0(0);
- }
-
- *sei_unit = unit;
- return 0;
-}
-
-static int cbs_sei_get_message_list(CodedBitstreamContext *ctx,
- CodedBitstreamUnit *unit,
- SEIRawMessageList **list)
-{
- switch (ctx->codec->codec_id) {
- case AV_CODEC_ID_H264:
- {
- H264RawSEI *sei = unit->content;
- if (unit->type != H264_NAL_SEI)
- return AVERROR(EINVAL);
- *list = &sei->message_list;
- }
- break;
- case AV_CODEC_ID_H265:
- {
- H265RawSEI *sei = unit->content;
- if (unit->type != HEVC_NAL_SEI_PREFIX &&
- unit->type != HEVC_NAL_SEI_SUFFIX)
- return AVERROR(EINVAL);
- *list = &sei->message_list;
- }
- break;
- default:
- return AVERROR(EINVAL);
- }
-
- return 0;
-}
-
-int ff_cbs_sei_add_message(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- int prefix,
- uint32_t payload_type,
- void *payload_data,
- AVBufferRef *payload_buf)
-{
- const SEIMessageTypeDescriptor *desc;
- CodedBitstreamUnit *unit;
- SEIRawMessageList *list;
- SEIRawMessage *message;
- AVBufferRef *payload_ref;
- int err;
-
- desc = ff_cbs_sei_find_type(ctx, payload_type);
- if (!desc)
- return AVERROR(EINVAL);
-
- if (payload_buf) {
- payload_ref = av_buffer_ref(payload_buf);
- if (!payload_ref)
- return AVERROR(ENOMEM);
- } else {
- payload_ref = NULL;
- }
-
- // Find an existing SEI unit or make a new one to add to.
- err = cbs_sei_get_unit(ctx, au, prefix, &unit);
- if (err < 0)
- return err;
-
- // Find the message list inside the codec-dependent unit.
- err = cbs_sei_get_message_list(ctx, unit, &list);
- if (err < 0)
- return err;
-
- // Add a new message to the message list.
- err = ff_cbs_sei_list_add(list);
- if (err < 0)
- return err;
-
- message = &list->messages[list->nb_messages - 1];
-
- message->payload_type = payload_type;
- message->payload = payload_data;
- message->payload_ref = payload_ref;
-
- return 0;
-}
-
-int ff_cbs_sei_find_message(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- uint32_t payload_type,
- SEIRawMessage **iter)
-{
- int err, i, j, found;
-
- found = 0;
- for (i = 0; i < au->nb_units; i++) {
- CodedBitstreamUnit *unit = &au->units[i];
- SEIRawMessageList *list;
-
- err = cbs_sei_get_message_list(ctx, unit, &list);
- if (err < 0)
- continue;
-
- for (j = 0; j < list->nb_messages; j++) {
- SEIRawMessage *message = &list->messages[j];
-
- if (message->payload_type == payload_type) {
- if (!*iter || found) {
- *iter = message;
- return 0;
- }
- if (message == *iter)
- found = 1;
- }
- }
- }
-
- return AVERROR(ENOENT);
-}
-
-static void cbs_sei_delete_message(SEIRawMessageList *list,
- int position)
-{
- SEIRawMessage *message;
-
- av_assert0(0 <= position && position < list->nb_messages);
-
- message = &list->messages[position];
- av_buffer_unref(&message->payload_ref);
- av_buffer_unref(&message->extension_data_ref);
-
- --list->nb_messages;
-
- if (list->nb_messages > 0) {
- memmove(list->messages + position,
- list->messages + position + 1,
- (list->nb_messages - position) * sizeof(*list->messages));
- }
-}
-
-void ff_cbs_sei_delete_message_type(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- uint32_t payload_type)
-{
- int err, i, j;
-
- for (i = 0; i < au->nb_units; i++) {
- CodedBitstreamUnit *unit = &au->units[i];
- SEIRawMessageList *list;
-
- err = cbs_sei_get_message_list(ctx, unit, &list);
- if (err < 0)
- continue;
-
- for (j = list->nb_messages - 1; j >= 0; j--) {
- if (list->messages[j].payload_type == payload_type)
- cbs_sei_delete_message(list, j);
- }
- }
-}
diff --git a/libavcodec/cbs_sei.h b/libavcodec/cbs_sei.h
deleted file mode 100644
index c7a7a95..0000000
--- a/libavcodec/cbs_sei.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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 AVCODEC_CBS_SEI_H
-#define AVCODEC_CBS_SEI_H
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include "libavutil/buffer.h"
-
-#include "cbs.h"
-#include "sei.h"
-
-
-typedef struct SEIRawFillerPayload {
- uint32_t payload_size;
-} SEIRawFillerPayload;
-
-typedef struct SEIRawUserDataRegistered {
- uint8_t itu_t_t35_country_code;
- uint8_t itu_t_t35_country_code_extension_byte;
- uint8_t *data;
- AVBufferRef *data_ref;
- size_t data_length;
-} SEIRawUserDataRegistered;
-
-typedef struct SEIRawUserDataUnregistered {
- uint8_t uuid_iso_iec_11578[16];
- uint8_t *data;
- AVBufferRef *data_ref;
- size_t data_length;
-} SEIRawUserDataUnregistered;
-
-typedef struct SEIRawMasteringDisplayColourVolume {
- uint16_t display_primaries_x[3];
- uint16_t display_primaries_y[3];
- uint16_t white_point_x;
- uint16_t white_point_y;
- uint32_t max_display_mastering_luminance;
- uint32_t min_display_mastering_luminance;
-} SEIRawMasteringDisplayColourVolume;
-
-typedef struct SEIRawContentLightLevelInfo {
- uint16_t max_content_light_level;
- uint16_t max_pic_average_light_level;
-} SEIRawContentLightLevelInfo;
-
-typedef struct SEIRawAlternativeTransferCharacteristics {
- uint8_t preferred_transfer_characteristics;
-} SEIRawAlternativeTransferCharacteristics;
-
-typedef struct SEIRawMessage {
- uint32_t payload_type;
- uint32_t payload_size;
- void *payload;
- AVBufferRef *payload_ref;
- uint8_t *extension_data;
- AVBufferRef *extension_data_ref;
- size_t extension_bit_length;
-} SEIRawMessage;
-
-typedef struct SEIRawMessageList {
- SEIRawMessage *messages;
- int nb_messages;
- int nb_messages_allocated;
-} SEIRawMessageList;
-
-
-typedef struct SEIMessageState {
- // The type of the payload being written.
- uint32_t payload_type;
- // When reading, contains the size of the payload to allow finding the
- // end of variable-length fields (such as user_data_payload_byte[]).
- // (When writing, the size will be derived from the total number of
- // bytes actually written.)
- uint32_t payload_size;
- // When writing, indicates that payload extension data is present so
- // all extended fields must be written. May be updated by the writer
- // to indicate that extended fields have been written, so the extension
- // end bits must be written too.
- uint8_t extension_present;
-} SEIMessageState;
-
-struct GetBitContext;
-struct PutBitContext;
-
-typedef int (*SEIMessageReadFunction)(CodedBitstreamContext *ctx,
- struct GetBitContext *rw,
- void *current,
- SEIMessageState *sei);
-
-typedef int (*SEIMessageWriteFunction)(CodedBitstreamContext *ctx,
- struct PutBitContext *rw,
- void *current,
- SEIMessageState *sei);
-
-typedef struct SEIMessageTypeDescriptor {
- // Payload type for the message. (-1 in this field ends a list.)
- int type;
- // Valid in a prefix SEI NAL unit (always for H.264).
- uint8_t prefix;
- // Valid in a suffix SEI NAL unit (never for H.264).
- uint8_t suffix;
- // Size of the decomposed structure.
- size_t size;
- // Read bitstream into SEI message.
- SEIMessageReadFunction read;
- // Write bitstream from SEI message.
- SEIMessageWriteFunction write;
-} SEIMessageTypeDescriptor;
-
-// Macro for the read/write pair. The clumsy cast is needed because the
-// current pointer is typed in all of the read/write functions but has to
-// be void here to fit all cases.
-#define SEI_MESSAGE_RW(codec, name) \
- .read = (SEIMessageReadFunction) cbs_ ## codec ## _read_ ## name, \
- .write = (SEIMessageWriteFunction)cbs_ ## codec ## _write_ ## name
-
-// End-of-list sentinel element.
-#define SEI_MESSAGE_TYPE_END { .type = -1 }
-
-
-/**
- * Find the type descriptor for the given payload type.
- *
- * Returns NULL if the payload type is not known.
- */
-const SEIMessageTypeDescriptor *ff_cbs_sei_find_type(CodedBitstreamContext *ctx,
- int payload_type);
-
-/**
- * Allocate a new payload for the given SEI message.
- */
-int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message,
- const SEIMessageTypeDescriptor *desc);
-
-/**
- * Allocate a new empty SEI message in a message list.
- *
- * The new message is in place nb_messages - 1.
- */
-int ff_cbs_sei_list_add(SEIRawMessageList *list);
-
-/**
- * Free all SEI messages in a message list.
- */
-void ff_cbs_sei_free_message_list(SEIRawMessageList *list);
-
-/**
- * Add an SEI message to an access unit.
- *
- * Will add to an existing SEI NAL unit, or create a new one for the
- * message if there is no suitable existing one.
- *
- * Takes a new reference to payload_buf, if set. If payload_buf is
- * NULL then the new message will not be reference counted.
- */
-int ff_cbs_sei_add_message(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- int prefix,
- uint32_t payload_type,
- void *payload_data,
- AVBufferRef *payload_buf);
-
-/**
- * Iterate over messages with the given payload type in an access unit.
- *
- * Set message to NULL in the first call. Returns 0 while more messages
- * are available, AVERROR(ENOENT) when all messages have been found.
- */
-int ff_cbs_sei_find_message(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- uint32_t payload_type,
- SEIRawMessage **message);
-
-/**
- * Delete all messages with the given payload type from an access unit.
- */
-void ff_cbs_sei_delete_message_type(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- uint32_t payload_type);
-
-#endif /* AVCODEC_CBS_SEI_H */
diff --git a/libavcodec/cbs_sei_syntax_template.c b/libavcodec/cbs_sei_syntax_template.c
deleted file mode 100644
index 9114e61..0000000
--- a/libavcodec/cbs_sei_syntax_template.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * 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
- */
-
-static int FUNC(filler_payload)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawFillerPayload *current, SEIMessageState *state)
-{
- int err, i;
-
- HEADER("Filler Payload");
-
-#ifdef READ
- current->payload_size = state->payload_size;
-#endif
-
- for (i = 0; i < current->payload_size; i++)
- fixed(8, ff_byte, 0xff);
-
- return 0;
-}
-
-static int FUNC(user_data_registered)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawUserDataRegistered *current, SEIMessageState *state)
-{
- int err, i, j;
-
- HEADER("User Data Registered ITU-T T.35");
-
- u(8, itu_t_t35_country_code, 0x00, 0xff);
- if (current->itu_t_t35_country_code != 0xff)
- i = 1;
- else {
- u(8, itu_t_t35_country_code_extension_byte, 0x00, 0xff);
- i = 2;
- }
-
-#ifdef READ
- if (state->payload_size < i) {
- av_log(ctx->log_ctx, AV_LOG_ERROR,
- "Invalid SEI user data registered payload.\n");
- return AVERROR_INVALIDDATA;
- }
- current->data_length = state->payload_size - i;
-#endif
-
- allocate(current->data, current->data_length);
- for (j = 0; j < current->data_length; j++)
- xu(8, itu_t_t35_payload_byte[], current->data[j], 0x00, 0xff, 1, i + j);
-
- return 0;
-}
-
-static int FUNC(user_data_unregistered)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawUserDataUnregistered *current, SEIMessageState *state)
-{
- int err, i;
-
- HEADER("User Data Unregistered");
-
-#ifdef READ
- if (state->payload_size < 16) {
- av_log(ctx->log_ctx, AV_LOG_ERROR,
- "Invalid SEI user data unregistered payload.\n");
- return AVERROR_INVALIDDATA;
- }
- current->data_length = state->payload_size - 16;
-#endif
-
- for (i = 0; i < 16; i++)
- us(8, uuid_iso_iec_11578[i], 0x00, 0xff, 1, i);
-
- allocate(current->data, current->data_length);
-
- for (i = 0; i < current->data_length; i++)
- xu(8, user_data_payload_byte[i], current->data[i], 0x00, 0xff, 1, i);
-
- return 0;
-}
-
-static int FUNC(mastering_display_colour_volume)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawMasteringDisplayColourVolume *current, SEIMessageState *state)
-{
- int err, c;
-
- HEADER("Mastering Display Colour Volume");
-
- for (c = 0; c < 3; c++) {
- ubs(16, display_primaries_x[c], 1, c);
- ubs(16, display_primaries_y[c], 1, c);
- }
-
- ub(16, white_point_x);
- ub(16, white_point_y);
-
- ub(32, max_display_mastering_luminance);
- ub(32, min_display_mastering_luminance);
-
- return 0;
-}
-
-static int FUNC(content_light_level_info)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawContentLightLevelInfo *current, SEIMessageState *state)
-{
- int err;
-
- HEADER("Content Light Level Information");
-
- ub(16, max_content_light_level);
- ub(16, max_pic_average_light_level);
-
- return 0;
-}
-
-static int FUNC(alternative_transfer_characteristics)
- (CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawAlternativeTransferCharacteristics *current,
- SEIMessageState *state)
-{
- int err;
-
- HEADER("Alternative Transfer Characteristics");
-
- ub(8, preferred_transfer_characteristics);
-
- return 0;
-}
-
-static int FUNC(message)(CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawMessage *current)
-{
- const SEIMessageTypeDescriptor *desc;
- int err, i;
-
- desc = ff_cbs_sei_find_type(ctx, current->payload_type);
- if (desc) {
- SEIMessageState state = {
- .payload_type = current->payload_type,
- .payload_size = current->payload_size,
- .extension_present = current->extension_bit_length > 0,
- };
- int start_position, current_position, bits_written;
-
-#ifdef READ
- CHECK(ff_cbs_sei_alloc_message_payload(current, desc));
-#endif
-
- start_position = bit_position(rw);
-
- CHECK(desc->READWRITE(ctx, rw, current->payload, &state));
-
- current_position = bit_position(rw);
- bits_written = current_position - start_position;
-
- if (byte_alignment(rw) || state.extension_present ||
- bits_written < 8 * current->payload_size) {
- size_t bits_left;
-
-#ifdef READ
- GetBitContext tmp = *rw;
- int trailing_bits, trailing_zero_bits;
-
- bits_left = 8 * current->payload_size - bits_written;
- if (bits_left > 8)
- skip_bits_long(&tmp, bits_left - 8);
- trailing_bits = get_bits(&tmp, FFMIN(bits_left, 8));
- if (trailing_bits == 0) {
- // The trailing bits must contain a bit_equal_to_one, so
- // they can't all be zero.
- return AVERROR_INVALIDDATA;
- }
- trailing_zero_bits = ff_ctz(trailing_bits);
- current->extension_bit_length =
- bits_left - 1 - trailing_zero_bits;
-#endif
-
- if (current->extension_bit_length > 0) {
- allocate(current->extension_data,
- (current->extension_bit_length + 7) / 8);
-
- bits_left = current->extension_bit_length;
- for (i = 0; bits_left > 0; i++) {
- int length = FFMIN(bits_left, 8);
- xu(length, reserved_payload_extension_data,
- current->extension_data[i],
- 0, MAX_UINT_BITS(length), 0);
- bits_left -= length;
- }
- }
-
- fixed(1, bit_equal_to_one, 1);
- while (byte_alignment(rw))
- fixed(1, bit_equal_to_zero, 0);
- }
-
-#ifdef WRITE
- current->payload_size = (put_bits_count(rw) - start_position) / 8;
-#endif
- } else {
- uint8_t *data;
-
- allocate(current->payload, current->payload_size);
- data = current->payload;
-
- for (i = 0; i < current->payload_size; i++)
- xu(8, payload_byte[i], data[i], 0, 255, 1, i);
- }
-
- return 0;
-}
-
-static int FUNC(message_list)(CodedBitstreamContext *ctx, RWContext *rw,
- SEIRawMessageList *current, int prefix)
-{
- SEIRawMessage *message;
- int err, k;
-
-#ifdef READ
- for (k = 0;; k++) {
- uint32_t payload_type = 0;
- uint32_t payload_size = 0;
- uint32_t tmp;
-
- while (show_bits(rw, 8) == 0xff) {
- fixed(8, ff_byte, 0xff);
- payload_type += 255;
- }
- xu(8, last_payload_type_byte, tmp, 0, 254, 0);
- payload_type += tmp;
-
- while (show_bits(rw, 8) == 0xff) {
- fixed(8, ff_byte, 0xff);
- payload_size += 255;
- }
- xu(8, last_payload_size_byte, tmp, 0, 254, 0);
- payload_size += tmp;
-
- CHECK(ff_cbs_sei_list_add(current));
- message = ¤t->messages[k];
-
- message->payload_type = payload_type;
- message->payload_size = payload_size;
-
- CHECK(FUNC(message)(ctx, rw, message));
-
- if (!cbs_h2645_read_more_rbsp_data(rw))
- break;
- }
-#else
- for (k = 0; k < current->nb_messages; k++) {
- PutBitContext start_state;
- uint32_t tmp;
- int trace, i;
-
- message = ¤t->messages[k];
-
- // We write the payload twice in order to find the size. Trace
- // output is switched off for the first write.
- trace = ctx->trace_enable;
- ctx->trace_enable = 0;
-
- start_state = *rw;
- for (i = 0; i < 2; i++) {
- *rw = start_state;
-
- tmp = message->payload_type;
- while (tmp >= 255) {
- fixed(8, ff_byte, 0xff);
- tmp -= 255;
- }
- xu(8, last_payload_type_byte, tmp, 0, 254, 0);
-
- tmp = message->payload_size;
- while (tmp >= 255) {
- fixed(8, ff_byte, 0xff);
- tmp -= 255;
- }
- xu(8, last_payload_size_byte, tmp, 0, 254, 0);
-
- err = FUNC(message)(ctx, rw, message);
- ctx->trace_enable = trace;
- if (err < 0)
- return err;
- }
- }
-#endif
-
- return 0;
-}
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index 39b2bd1..82fcda9 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -41,7 +41,6 @@
typedef struct CDXLVideoContext {
AVCodecContext *avctx;
int bpp;
- int type;
int format;
int padded_bits;
const uint8_t *palette;
@@ -64,19 +63,14 @@
static void import_palette(CDXLVideoContext *c, uint32_t *new_palette)
{
- if (c->type == 1) {
- for (int i = 0; i < c->palette_size / 2; i++) {
- unsigned rgb = AV_RB16(&c->palette[i * 2]);
- unsigned r = ((rgb >> 8) & 0xF) * 0x11;
- unsigned g = ((rgb >> 4) & 0xF) * 0x11;
- unsigned b = (rgb & 0xF) * 0x11;
- AV_WN32(&new_palette[i], (0xFFU << 24) | (r << 16) | (g << 8) | b);
- }
- } else {
- for (int i = 0; i < c->palette_size / 3; i++) {
- unsigned rgb = AV_RB24(&c->palette[i * 3]);
- AV_WN32(&new_palette[i], (0xFFU << 24) | rgb);
- }
+ int i;
+
+ for (i = 0; i < c->palette_size / 2; i++) {
+ unsigned rgb = AV_RB16(&c->palette[i * 2]);
+ unsigned r = ((rgb >> 8) & 0xF) * 0x11;
+ unsigned g = ((rgb >> 4) & 0xF) * 0x11;
+ unsigned b = (rgb & 0xF) * 0x11;
+ AV_WN32(&new_palette[i], (0xFFU << 24) | (r << 16) | (g << 8) | b);
}
}
@@ -250,7 +244,6 @@
if (buf_size < 32)
return AVERROR_INVALIDDATA;
- c->type = buf[0];
encoding = buf[1] & 7;
c->format = buf[1] & 0xE0;
w = AV_RB16(&buf[14]);
@@ -261,11 +254,7 @@
c->video = c->palette + c->palette_size;
c->video_size = buf_size - c->palette_size - 32;
- if (c->type > 1)
- return AVERROR_INVALIDDATA;
- if (c->type == 1 && c->palette_size > 512)
- return AVERROR_INVALIDDATA;
- if (c->type == 0 && c->palette_size > 768)
+ if (c->palette_size > 512)
return AVERROR_INVALIDDATA;
if (buf_size < c->palette_size + 32)
return AVERROR_INVALIDDATA;
diff --git a/libavcodec/celp_math.c b/libavcodec/celp_math.c
index 920995a..a96b1ae 100644
--- a/libavcodec/celp_math.c
+++ b/libavcodec/celp_math.c
@@ -29,7 +29,6 @@
#include "celp_math.h"
#include "libavutil/common.h"
-#ifdef G729_BITEXACT
static const uint16_t exp2a[]=
{
0, 1435, 2901, 4400, 5931, 7496, 9096, 10730,
@@ -55,7 +54,6 @@
result= (result<<3) + ((result*exp2b[(power>>5)&31])>>17);
return result + ((result*(power&31)*89)>>22);
}
-#endif
/**
* Table used to compute log2(x)
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index dfd56ae..a2b9c7c 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -436,7 +436,7 @@
}
init_plane_defaults(s);
} else if (tag == SubbandNumber) {
- if (s->subband_num != 0 && data == 1 && (s->transform_type == 0 || s->transform_type == 2)) // hack
+ if (s->subband_num != 0 && data == 1) // hack
s->level++;
av_log(avctx, AV_LOG_DEBUG, "Subband number %"PRIu16"\n", data);
s->subband_num = data;
@@ -617,12 +617,6 @@
s->peak.level = 0;
} else if (tag == -PeakLevel && s->peak.offset) {
s->peak.level = data;
- if (s->peak.offset < 4 - bytestream2_tell(&s->peak.base) ||
- s->peak.offset > 4 + bytestream2_get_bytes_left(&s->peak.base)
- ) {
- ret = AVERROR_INVALIDDATA;
- goto end;
- }
bytestream2_seek(&s->peak.base, s->peak.offset - 4, SEEK_CUR);
} else
av_log(avctx, AV_LOG_DEBUG, "Unknown tag %i data %x\n", tag, data);
@@ -1378,12 +1372,6 @@
if (dst == src || psrc->transform_type == 0)
return 0;
- if (pdst->plane[0].idwt_size != psrc->plane[0].idwt_size ||
- pdst->a_format != psrc->a_format ||
- pdst->a_width != psrc->a_width ||
- pdst->a_height != psrc->a_height)
- free_buffers(pdst);
-
pdst->a_format = psrc->a_format;
pdst->a_width = psrc->a_width;
pdst->a_height = psrc->a_height;
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index 42bbf99..5554bae 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -33,7 +33,6 @@
#include "avcodec.h"
#include "bytestream.h"
#include "cfhd.h"
-#include "cfhdencdsp.h"
#include "put_bits.h"
#include "internal.h"
#include "thread.h"
@@ -240,8 +239,6 @@
Runbook rb[321];
Codebook cb[513];
int16_t *alpha;
-
- CFHDEncDSPContext dsp;
} CFHDEncContext;
static av_cold int cfhd_encode_init(AVCodecContext *avctx)
@@ -270,10 +267,10 @@
int width = i ? avctx->width >> s->chroma_h_shift : avctx->width;
int height = i ? FFALIGN(avctx->height >> s->chroma_v_shift, 8) :
FFALIGN(avctx->height >> s->chroma_v_shift, 8);
- ptrdiff_t stride = (FFALIGN(width / 8, 8) + 64) * 8;
+ ptrdiff_t stride = FFALIGN(width / 8, 8) * 8;
- w8 = FFALIGN(width / 8, 8) + 64;
- h8 = FFALIGN(height, 8) / 8;
+ w8 = FFALIGN(width / 8, 8);
+ h8 = height / 8;
w4 = w8 * 2;
h4 = h8 * 2;
w2 = w4 * 2;
@@ -362,8 +359,6 @@
s->lut[i] = last;
}
- ff_cfhdencdsp_init(&s->dsp);
-
if (s->planes != 4)
return 0;
@@ -374,6 +369,42 @@
return 0;
}
+static av_always_inline void filter(int16_t *input, ptrdiff_t in_stride,
+ int16_t *low, ptrdiff_t low_stride,
+ int16_t *high, ptrdiff_t high_stride,
+ int len)
+{
+ low[(0>>1) * low_stride] = av_clip_int16(input[0*in_stride] + input[1*in_stride]);
+ high[(0>>1) * high_stride] = av_clip_int16((5 * input[0*in_stride] - 11 * input[1*in_stride] +
+ 4 * input[2*in_stride] + 4 * input[3*in_stride] -
+ 1 * input[4*in_stride] - 1 * input[5*in_stride] + 4) >> 3);
+
+ for (int i = 2; i < len - 2; i += 2) {
+ low[(i>>1) * low_stride] = av_clip_int16(input[i*in_stride] + input[(i+1)*in_stride]);
+ high[(i>>1) * high_stride] = av_clip_int16(((-input[(i-2)*in_stride] - input[(i-1)*in_stride] +
+ input[(i+2)*in_stride] + input[(i+3)*in_stride] + 4) >> 3) +
+ input[(i+0)*in_stride] - input[(i+1)*in_stride]);
+ }
+
+ low[((len-2)>>1) * low_stride] = av_clip_int16(input[((len-2)+0)*in_stride] + input[((len-2)+1)*in_stride]);
+ high[((len-2)>>1) * high_stride] = av_clip_int16((11* input[((len-2)+0)*in_stride] - 5 * input[((len-2)+1)*in_stride] -
+ 4 * input[((len-2)-1)*in_stride] - 4 * input[((len-2)-2)*in_stride] +
+ 1 * input[((len-2)-3)*in_stride] + 1 * input[((len-2)-4)*in_stride] + 4) >> 3);
+}
+
+static void horiz_filter(int16_t *input, int16_t *low, int16_t *high,
+ int width)
+{
+ filter(input, 1, low, 1, high, 1, width);
+}
+
+static void vert_filter(int16_t *input, ptrdiff_t in_stride,
+ int16_t *low, ptrdiff_t low_stride,
+ int16_t *high, ptrdiff_t high_stride, int len)
+{
+ filter(input, in_stride, low, low_stride, high, high_stride, len);
+}
+
static void quantize_band(int16_t *input, int width, int a_width,
int height, unsigned quantization)
{
@@ -423,7 +454,6 @@
const AVFrame *frame, int *got_packet)
{
CFHDEncContext *s = avctx->priv_data;
- CFHDEncDSPContext *dsp = &s->dsp;
PutByteContext *pby = &s->pby;
PutBitContext *pb = &s->pb;
const Codebook *const cb = s->cb;
@@ -450,9 +480,12 @@
in_stride = avctx->width;
}
- dsp->horiz_filter(input, low, high,
- in_stride, a_width, a_width,
- width * 2, height * 2);
+ for (int i = 0; i < height * 2; i++) {
+ horiz_filter(input, low, high, width * 2);
+ input += in_stride;
+ low += a_width;
+ high += a_width;
+ }
input = s->plane[plane].l_h[7];
low = s->plane[plane].subband[7];
@@ -460,17 +493,23 @@
high = s->plane[plane].subband[9];
high_stride = s->plane[plane].band[2][0].a_width;
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
input = s->plane[plane].l_h[6];
low = s->plane[plane].l_h[7];
high = s->plane[plane].subband[8];
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
a_width = s->plane[plane].band[1][0].a_width;
width = s->plane[plane].band[1][0].width;
@@ -488,25 +527,34 @@
}
input = s->plane[plane].l_h[7];
- dsp->horiz_filter(input, low, high,
- a_width * 2, low_stride, high_stride,
- width * 2, height * 2);
+ for (int i = 0; i < height * 2; i++) {
+ horiz_filter(input, low, high, width * 2);
+ input += a_width * 2;
+ low += low_stride;
+ high += high_stride;
+ }
input = s->plane[plane].l_h[4];
low = s->plane[plane].subband[4];
high = s->plane[plane].subband[6];
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
input = s->plane[plane].l_h[3];
low = s->plane[plane].l_h[4];
high = s->plane[plane].subband[5];
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
a_width = s->plane[plane].band[0][0].a_width;
width = s->plane[plane].band[0][0].width;
@@ -526,25 +574,34 @@
}
input = s->plane[plane].l_h[4];
- dsp->horiz_filter(input, low, high,
- a_width * 2, low_stride, high_stride,
- width * 2, height * 2);
+ for (int i = 0; i < height * 2; i++) {
+ horiz_filter(input, low, high, width * 2);
+ input += a_width * 2;
+ low += low_stride;
+ high += high_stride;
+ }
low = s->plane[plane].subband[1];
high = s->plane[plane].subband[3];
input = s->plane[plane].l_h[1];
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
low = s->plane[plane].subband[0];
high = s->plane[plane].subband[2];
input = s->plane[plane].l_h[0];
- dsp->vert_filter(input, low, high,
- a_width, low_stride, high_stride,
- width, height * 2);
+ for (int i = 0; i < width; i++) {
+ vert_filter(input, a_width, low, low_stride, high, high_stride, height * 2);
+ input++;
+ low++;
+ high++;
+ }
}
ret = ff_alloc_packet2(avctx, pkt, 64LL + s->planes * (2LL * avctx->width * avctx->height + 1000LL), 0);
@@ -593,7 +650,7 @@
bytestream2_put_be16(pby, avctx->height);
bytestream2_put_be16(pby, -FrameNumber);
- bytestream2_put_be16(pby, frame->pts & 0xFFFF);
+ bytestream2_put_be16(pby, avctx->frame_number);
bytestream2_put_be16(pby, Precision);
bytestream2_put_be16(pby, avctx->pix_fmt == AV_PIX_FMT_YUV422P10 ? 10 : 12);
@@ -742,7 +799,7 @@
for (int m = 0; m < height; m++) {
for (int j = 0; j < stride; j++) {
- int16_t index = j >= width ? 0 : FFSIGN(data[j]) * lut[FFABS(data[j])];
+ int16_t index = FFSIGN(data[j]) * lut[FFABS(data[j])];
if (index < 0)
index += 512;
diff --git a/libavcodec/cfhdencdsp.c b/libavcodec/cfhdencdsp.c
deleted file mode 100644
index b979e9e..0000000
--- a/libavcodec/cfhdencdsp.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2015-2016 Kieran Kunhya <kieran@kunhya.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
- */
-
-#include "libavutil/attributes.h"
-#include "libavutil/common.h"
-#include "libavutil/avassert.h"
-
-#include "cfhdencdsp.h"
-
-static av_always_inline void filter(int16_t *input, ptrdiff_t in_stride,
- int16_t *low, ptrdiff_t low_stride,
- int16_t *high, ptrdiff_t high_stride,
- int len)
-{
- low[(0>>1) * low_stride] = av_clip_int16(input[0*in_stride] + input[1*in_stride]);
- high[(0>>1) * high_stride] = av_clip_int16((5 * input[0*in_stride] - 11 * input[1*in_stride] +
- 4 * input[2*in_stride] + 4 * input[3*in_stride] -
- 1 * input[4*in_stride] - 1 * input[5*in_stride] + 4) >> 3);
-
- for (int i = 2; i < len - 2; i += 2) {
- low[(i>>1) * low_stride] = av_clip_int16(input[i*in_stride] + input[(i+1)*in_stride]);
- high[(i>>1) * high_stride] = av_clip_int16(((-input[(i-2)*in_stride] - input[(i-1)*in_stride] +
- input[(i+2)*in_stride] + input[(i+3)*in_stride] + 4) >> 3) +
- input[(i+0)*in_stride] - input[(i+1)*in_stride]);
- }
-
- low[((len-2)>>1) * low_stride] = av_clip_int16(input[((len-2)+0)*in_stride] + input[((len-2)+1)*in_stride]);
- high[((len-2)>>1) * high_stride] = av_clip_int16((11* input[((len-2)+0)*in_stride] - 5 * input[((len-2)+1)*in_stride] -
- 4 * input[((len-2)-1)*in_stride] - 4 * input[((len-2)-2)*in_stride] +
- 1 * input[((len-2)-3)*in_stride] + 1 * input[((len-2)-4)*in_stride] + 4) >> 3);
-}
-
-static void horiz_filter(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height)
-{
- for (int i = 0; i < height; i++) {
- filter(input, 1, low, 1, high, 1, width);
- input += in_stride;
- low += low_stride;
- high += high_stride;
- }
-}
-
-static void vert_filter(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height)
-{
- for (int i = 0; i < width; i++)
- filter(&input[i], in_stride, &low[i], low_stride, &high[i], high_stride, height);
-}
-
-av_cold void ff_cfhdencdsp_init(CFHDEncDSPContext *c)
-{
- c->horiz_filter = horiz_filter;
- c->vert_filter = vert_filter;
-
- if (ARCH_X86)
- ff_cfhdencdsp_init_x86(c);
-}
diff --git a/libavcodec/cfhdencdsp.h b/libavcodec/cfhdencdsp.h
deleted file mode 100644
index b3aac8d..0000000
--- a/libavcodec/cfhdencdsp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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 AVCODEC_CFHDENCDSP_H
-#define AVCODEC_CFHDENCDSP_H
-
-#include <stddef.h>
-#include <stdint.h>
-
-typedef struct CFHDEncDSPContext {
- void (*horiz_filter)(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height);
-
- void (*vert_filter)(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height);
-} CFHDEncDSPContext;
-
-void ff_cfhdencdsp_init(CFHDEncDSPContext *c);
-
-void ff_cfhdencdsp_init_x86(CFHDEncDSPContext *c);
-
-#endif /* AVCODEC_CFHDENCDSP_H */
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index d70cb4b..17148a3 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -477,7 +477,7 @@
return ret;
if (s->palette_video) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
s->frame->palette_has_changed = 1;
diff --git a/libavcodec/cinepakenc.c b/libavcodec/cinepakenc.c
index 4c9b961..9eaa972 100644
--- a/libavcodec/cinepakenc.c
+++ b/libavcodec/cinepakenc.c
@@ -182,7 +182,7 @@
return AVERROR(ENOMEM);
if (!(s->codebook_closest = av_malloc_array((avctx->width * avctx->height) >> 2, sizeof(*s->codebook_closest))))
- return AVERROR(ENOMEM);
+ return AVERROR(ENOMEM);;
for (x = 0; x < (avctx->pix_fmt == AV_PIX_FMT_RGB24 ? 4 : 3); x++)
if (!(s->pict_bufs[x] = av_malloc((avctx->pix_fmt == AV_PIX_FMT_RGB24 ? 6 : 4) * (avctx->width * avctx->height) >> 2)))
diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c
index 79ba888..7342557 100644
--- a/libavcodec/clearvideo.c
+++ b/libavcodec/clearvideo.c
@@ -24,7 +24,6 @@
* ClearVideo decoder
*/
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
diff --git a/libavcodec/codec.h b/libavcodec/codec.h
index 729df0e..0ccbf0e 100644
--- a/libavcodec/codec.h
+++ b/libavcodec/codec.h
@@ -259,7 +259,7 @@
const AVCodecDefault *defaults;
/**
- * Initialize codec static data, called from av_codec_iterate().
+ * Initialize codec static data, called from avcodec_register().
*
* This is not intended for time consuming operations as it is
* run for every codec regardless of that codec being used.
@@ -273,7 +273,7 @@
* Encode data to an AVPacket.
*
* @param avctx codec context
- * @param avpkt output AVPacket
+ * @param avpkt output AVPacket (may contain a user-provided buffer)
* @param[in] frame AVFrame containing the raw data to be encoded
* @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a
* non-empty packet was returned in avpkt.
@@ -281,20 +281,7 @@
*/
int (*encode2)(struct AVCodecContext *avctx, struct AVPacket *avpkt,
const struct AVFrame *frame, int *got_packet_ptr);
- /**
- * Decode picture or subtitle data.
- *
- * @param avctx codec context
- * @param outdata codec type dependent output struct
- * @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that a
- * non-empty frame or subtitle was returned in
- * outdata.
- * @param[in] avpkt AVPacket containing the data to be decoded
- * @return amount of bytes read from the packet on success, negative error
- * code on failure
- */
- int (*decode)(struct AVCodecContext *avctx, void *outdata,
- int *got_frame_ptr, struct AVPacket *avpkt);
+ int (*decode)(struct AVCodecContext *, void *outdata, int *outdata_size, struct AVPacket *avpkt);
int (*close)(struct AVCodecContext *);
/**
* Encode API with decoupled frame/packet dataflow. This function is called
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 17f8a14..404c460 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1427,14 +1427,6 @@
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
},
{
- .id = AV_CODEC_ID_VVC,
- .type = AVMEDIA_TYPE_VIDEO,
- .name = "vvc",
- .long_name = NULL_IF_CONFIG_SMALL("H.266 / VVC (Versatile Video Coding)"),
- .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER,
- .profiles = NULL_IF_CONFIG_SMALL(ff_vvc_profiles),
- },
- {
.id = AV_CODEC_ID_Y41P,
.type = AVMEDIA_TYPE_VIDEO,
.name = "y41p",
@@ -1842,20 +1834,6 @@
.long_name = NULL_IF_CONFIG_SMALL("Cintel RAW"),
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS,
},
- {
- .id = AV_CODEC_ID_SIMBIOSIS_IMX,
- .type = AVMEDIA_TYPE_VIDEO,
- .name = "simbiosis_imx",
- .long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX Video"),
- .props = AV_CODEC_PROP_LOSSY,
- },
- {
- .id = AV_CODEC_ID_SGA_VIDEO,
- .type = AVMEDIA_TYPE_VIDEO,
- .name = "sga",
- .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"),
- .props = AV_CODEC_PROP_LOSSY,
- },
/* various PCM "codecs" */
{
@@ -2103,13 +2081,6 @@
.long_name = NULL_IF_CONFIG_SMALL("PCM Archimedes VIDC"),
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
},
- {
- .id = AV_CODEC_ID_PCM_SGA,
- .type = AVMEDIA_TYPE_AUDIO,
- .name = "pcm_sga",
- .long_name = NULL_IF_CONFIG_SMALL("PCM SGA"),
- .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
- },
/* various ADPCM codecs */
{
@@ -3475,13 +3446,6 @@
.mime_types= MT("application/octet-stream"),
},
{
- .id = AV_CODEC_ID_MPEG2TS,
- .type = AVMEDIA_TYPE_DATA,
- .name = "mpegts",
- .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-TS stream"),
- .mime_types= MT("application/MP2T"),
- },
- {
.id = AV_CODEC_ID_WRAPPED_AVFRAME,
.type = AVMEDIA_TYPE_VIDEO,
.name = "wrapped_avframe",
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index ab7bc68..6133e03 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -244,8 +244,6 @@
AV_CODEC_ID_PGX,
AV_CODEC_ID_AVS3,
AV_CODEC_ID_MSP2,
- AV_CODEC_ID_VVC,
-#define AV_CODEC_ID_H266 AV_CODEC_ID_VVC
AV_CODEC_ID_Y41P = 0x8000,
AV_CODEC_ID_AVRP,
@@ -305,8 +303,6 @@
AV_CODEC_ID_IPU,
AV_CODEC_ID_ARGO,
AV_CODEC_ID_CRI,
- AV_CODEC_ID_SIMBIOSIS_IMX,
- AV_CODEC_ID_SGA_VIDEO,
/* various PCM "codecs" */
AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
@@ -347,7 +343,6 @@
AV_CODEC_ID_PCM_F16LE,
AV_CODEC_ID_PCM_F24LE,
AV_CODEC_ID_PCM_VIDC,
- AV_CODEC_ID_PCM_SGA,
/* various ADPCM codecs */
AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index a9de3c8..1968f2f 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -44,7 +44,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
#include "audiodsp.h"
#include "avcodec.h"
diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c
index 5f12a99..bf09e1a 100644
--- a/libavcodec/cpia.c
+++ b/libavcodec/cpia.c
@@ -230,5 +230,4 @@
.close = cpia_decode_end,
.decode = cpia_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
diff --git a/libavcodec/cri.c b/libavcodec/cri.c
index 3312606..5234f49 100644
--- a/libavcodec/cri.c
+++ b/libavcodec/cri.c
@@ -80,13 +80,10 @@
int pos = 0;
while (count > 0) {
- uint32_t a0, a1, a2, a3;
- if (bytestream2_get_bytes_left(gb) < 4)
- break;
- a0 = bytestream2_get_le32(gb);
- a1 = bytestream2_get_le32(gb);
- a2 = bytestream2_get_le32(gb);
- a3 = bytestream2_get_le32(gb);
+ uint32_t a0 = bytestream2_get_le32(gb);
+ uint32_t a1 = bytestream2_get_le32(gb);
+ uint32_t a2 = bytestream2_get_le32(gb);
+ uint32_t a3 = bytestream2_get_le32(gb);
dst[pos] = (((a0 >> 1) & 0xE00) | (a0 & 0x1FF)) << shift;
pos++;
if (pos >= w) {
@@ -184,7 +181,6 @@
char codec_name[1024];
uint32_t key, length;
float framerate;
- int width, height;
key = bytestream2_get_le32(gb);
length = bytestream2_get_le32(gb);
@@ -200,14 +196,11 @@
case 100:
if (length < 16)
return AVERROR_INVALIDDATA;
- width = bytestream2_get_le32(gb);
- height = bytestream2_get_le32(gb);
+ avctx->width = bytestream2_get_le32(gb);
+ avctx->height = bytestream2_get_le32(gb);
s->color_model = bytestream2_get_le32(gb);
if (bytestream2_get_le32(gb) != 1)
return AVERROR_INVALIDDATA;
- ret = ff_set_dimensions(avctx, width, height);
- if (ret < 0)
- return ret;
length -= 16;
goto skip;
case 101:
@@ -335,9 +328,6 @@
for (int y = 0; y < avctx->height; y++) {
uint16_t *dst = (uint16_t *)(p->data[0] + y * p->linesize[0]);
- if (get_bits_left(&gbit) < avctx->width * bps)
- break;
-
for (int x = 0; x < avctx->width; x++)
dst[x] = get_bits(&gbit, bps) << shift;
}
diff --git a/libavcodec/cri_parser.c b/libavcodec/cri_parser.c
deleted file mode 100644
index 9790747..0000000
--- a/libavcodec/cri_parser.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * CRI parser
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-/**
- * @file
- * CRI parser
- */
-
-#include "libavutil/bswap.h"
-#include "libavutil/common.h"
-
-#include "parser.h"
-
-typedef struct CRIParser {
- ParseContext pc;
- int count;
- int chunk;
- int read_bytes;
- int skip_bytes;
-} CRIParser;
-
-#define KEY (((uint64_t)'\1' << 56) | ((uint64_t)'\0' << 48) | \
- ((uint64_t)'\0' << 40) | ((uint64_t)'\0' << 32) | \
- ((uint64_t)'\4' << 24) | ((uint64_t)'\0' << 16) | \
- ((uint64_t)'\0' << 8) | ((uint64_t)'\0' << 0))
-
-static int cri_parse(AVCodecParserContext *s, AVCodecContext *avctx,
- const uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size)
-{
- CRIParser *bpc = s->priv_data;
- uint64_t state = bpc->pc.state64;
- int next = END_NOT_FOUND, i = 0;
-
- s->pict_type = AV_PICTURE_TYPE_I;
- s->key_frame = 1;
- s->duration = 1;
-
- *poutbuf_size = 0;
- *poutbuf = NULL;
-
- for (; i < buf_size; i++) {
- state = (state << 8) | buf[i];
- bpc->read_bytes++;
-
- if (bpc->skip_bytes > 0) {
- bpc->skip_bytes--;
- if (bpc->skip_bytes == 0)
- bpc->read_bytes = 0;
- } else {
- if (state != KEY)
- continue;
- }
-
- if (bpc->skip_bytes == 0 && bpc->read_bytes >= 8) {
- bpc->skip_bytes = av_bswap32(state & 0xFFFFFFFF);
- bpc->chunk = state >> 32;
- bpc->read_bytes = 0;
- bpc->count++;
- }
-
- if (bpc->chunk == 0x01000000 && bpc->skip_bytes == 4 &&
- bpc->read_bytes == 0 && bpc->count > 1) {
- next = i - 7;
- break;
- }
- }
-
- bpc->pc.state64 = state;
- if (ff_combine_frame(&bpc->pc, next, &buf, &buf_size) < 0) {
- *poutbuf = NULL;
- *poutbuf_size = 0;
- return buf_size;
- }
-
- *poutbuf = buf;
- *poutbuf_size = buf_size;
-
- return next;
-}
-
-AVCodecParser ff_cri_parser = {
- .codec_ids = { AV_CODEC_ID_CRI },
- .priv_data_size = sizeof(CRIParser),
- .parser_parse = cri_parse,
- .parser_close = ff_parse_close,
-};
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index f5c93e9..d50ddd6 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -93,7 +93,7 @@
case 1: { // zlib compression
#if CONFIG_ZLIB
unsigned long dlen = c->decomp_size;
- if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK || dlen != c->decomp_size) {
+ if (uncompress(c->decomp_buf, &dlen, &buf[2], buf_size - 2) != Z_OK) {
av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
return AVERROR_INVALIDDATA;
}
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index ec57afd..61d7f36 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -553,12 +553,6 @@
tmp_frame->format = AV_PIX_FMT_CUDA;
tmp_frame->hw_frames_ctx = av_buffer_ref(ctx->hwframe);
- if (!tmp_frame->hw_frames_ctx) {
- ret = AVERROR(ENOMEM);
- av_frame_free(&tmp_frame);
- goto error;
- }
-
tmp_frame->width = avctx->width;
tmp_frame->height = avctx->height;
@@ -634,9 +628,6 @@
}
error:
- if (ret < 0)
- av_frame_unref(frame);
-
if (mapped_frame)
eret = CHECK_CU(ctx->cvdl->cuvidUnmapVideoFrame(ctx->cudecoder, mapped_frame));
@@ -999,7 +990,7 @@
}
ctx->cuparseinfo.ulMaxNumDecodeSurfaces = ctx->nb_surfaces;
- ctx->cuparseinfo.ulMaxDisplayDelay = (avctx->flags & AV_CODEC_FLAG_LOW_DELAY) ? 0 : 4;
+ ctx->cuparseinfo.ulMaxDisplayDelay = 4;
ctx->cuparseinfo.pUserData = avctx;
ctx->cuparseinfo.pfnSequenceCallback = cuvid_handle_video_sequence;
ctx->cuparseinfo.pfnDecodePicture = cuvid_handle_picture_decode;
diff --git a/libavcodec/dca_core.h b/libavcodec/dca_core.h
index 86bfa62..10128d1 100644
--- a/libavcodec/dca_core.h
+++ b/libavcodec/dca_core.h
@@ -24,7 +24,7 @@
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/fixed_dsp.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/dca_lbr.c b/libavcodec/dca_lbr.c
index 2f8060d..747fdaf 100644
--- a/libavcodec/dca_lbr.c
+++ b/libavcodec/dca_lbr.c
@@ -21,7 +21,6 @@
#define BITSTREAM_READER_LE
#include "libavutil/channel_layout.h"
-#include "libavutil/mem_internal.h"
#include "dcadec.h"
#include "dcadata.h"
diff --git a/libavcodec/dca_lbr.h b/libavcodec/dca_lbr.h
index e6856a2..6d4c0a8 100644
--- a/libavcodec/dca_lbr.h
+++ b/libavcodec/dca_lbr.h
@@ -23,7 +23,7 @@
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/dca_xll.h b/libavcodec/dca_xll.h
index 3aaad6d..bc0aa65 100644
--- a/libavcodec/dca_xll.h
+++ b/libavcodec/dca_xll.h
@@ -22,7 +22,7 @@
#define AVCODEC_DCA_XLL_H
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/dcadata.c b/libavcodec/dcadata.c
index 643b0cc..1b646a7 100644
--- a/libavcodec/dcadata.c
+++ b/libavcodec/dcadata.c
@@ -22,7 +22,7 @@
#include <stdint.h>
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "dca.h"
#include "dcadata.h"
diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c
index 9d00ebd..fade1a6 100644
--- a/libavcodec/dcadsp.c
+++ b/libavcodec/dcadsp.c
@@ -19,7 +19,6 @@
*/
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "dcadsp.h"
#include "dcamath.h"
@@ -329,7 +328,7 @@
int i;
for (i = 0; i < len; i++)
- dst[i] += (unsigned)mul15(src[i], coeff);
+ dst[i] += mul15(src[i], coeff);
}
static void dmix_scale_c(int32_t *dst, int scale, ptrdiff_t len)
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index a40d2e0..34b3e94 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -28,7 +28,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/ffmath.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dca.h"
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index c7dbf7b..5a1849f 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -43,6 +43,7 @@
#include "decode.h"
#include "hwconfig.h"
#include "internal.h"
+#include "packet_internal.h"
#include "thread.h"
typedef struct FramePool {
@@ -66,8 +67,7 @@
static int apply_param_change(AVCodecContext *avctx, const AVPacket *avpkt)
{
- int ret;
- buffer_size_t size;
+ int size, ret;
const uint8_t *data;
uint32_t flags;
int64_t val;
@@ -145,42 +145,68 @@
#define IS_EMPTY(pkt) (!(pkt)->data)
-static int copy_packet_props(AVPacket *dst, const AVPacket *src)
+static int extract_packet_props(AVCodecInternal *avci, AVPacket *pkt)
{
- int ret = av_packet_copy_props(dst, src);
- if (ret < 0)
- return ret;
-
- dst->size = src->size; // HACK: Needed for ff_decode_frame_props().
- dst->data = (void*)1; // HACK: Needed for IS_EMPTY().
-
- return 0;
-}
-
-static int extract_packet_props(AVCodecInternal *avci, const AVPacket *pkt)
-{
- AVPacket tmp = { 0 };
int ret = 0;
+ ret = avpriv_packet_list_put(&avci->pkt_props, &avci->pkt_props_tail, pkt,
+ av_packet_copy_props, 0);
+ if (ret < 0)
+ return ret;
+ avci->pkt_props_tail->pkt.size = pkt->size; // HACK: Needed for ff_decode_frame_props().
+ avci->pkt_props_tail->pkt.data = (void*)1; // HACK: Needed for IS_EMPTY().
+
if (IS_EMPTY(avci->last_pkt_props)) {
- if (av_fifo_size(avci->pkt_props) >= sizeof(*pkt)) {
- av_fifo_generic_read(avci->pkt_props, avci->last_pkt_props,
- sizeof(*avci->last_pkt_props), NULL);
- } else
- return copy_packet_props(avci->last_pkt_props, pkt);
+ ret = avpriv_packet_list_get(&avci->pkt_props,
+ &avci->pkt_props_tail,
+ avci->last_pkt_props);
+ av_assert0(ret != AVERROR(EAGAIN));
}
+ return ret;
+}
- if (av_fifo_space(avci->pkt_props) < sizeof(*pkt)) {
- ret = av_fifo_grow(avci->pkt_props, sizeof(*pkt));
- if (ret < 0)
- return ret;
- }
+static int unrefcount_frame(AVCodecInternal *avci, AVFrame *frame)
+{
+ int ret;
- ret = copy_packet_props(&tmp, pkt);
+ /* move the original frame to our backup */
+ av_frame_unref(avci->to_free);
+ av_frame_move_ref(avci->to_free, frame);
+
+ /* now copy everything except the AVBufferRefs back
+ * note that we make a COPY of the side data, so calling av_frame_free() on
+ * the caller's frame will work properly */
+ ret = av_frame_copy_props(frame, avci->to_free);
if (ret < 0)
return ret;
- av_fifo_generic_write(avci->pkt_props, &tmp, sizeof(tmp), NULL);
+ memcpy(frame->data, avci->to_free->data, sizeof(frame->data));
+ memcpy(frame->linesize, avci->to_free->linesize, sizeof(frame->linesize));
+ if (avci->to_free->extended_data != avci->to_free->data) {
+ int planes = avci->to_free->channels;
+ int size = planes * sizeof(*frame->extended_data);
+
+ if (!size) {
+ av_frame_unref(frame);
+ return AVERROR_BUG;
+ }
+
+ frame->extended_data = av_malloc(size);
+ if (!frame->extended_data) {
+ av_frame_unref(frame);
+ return AVERROR(ENOMEM);
+ }
+ memcpy(frame->extended_data, avci->to_free->extended_data,
+ size);
+ } else
+ frame->extended_data = frame->data;
+
+ frame->format = avci->to_free->format;
+ frame->width = avci->to_free->width;
+ frame->height = avci->to_free->height;
+ frame->channel_layout = avci->to_free->channel_layout;
+ frame->nb_samples = avci->to_free->nb_samples;
+ frame->channels = avci->to_free->channels;
return 0;
}
@@ -241,10 +267,8 @@
if (ret < 0)
goto finish;
-#if FF_API_OLD_ENCDEC
if (avctx->codec->receive_frame)
avci->compat_decode_consumed += pkt->size;
-#endif
return 0;
finish:
@@ -348,14 +372,21 @@
if (avctx->codec->type == AVMEDIA_TYPE_VIDEO) {
if (frame->flags & AV_FRAME_FLAG_DISCARD)
got_frame = 0;
+ if (got_frame)
+ frame->best_effort_timestamp = guess_correct_pts(avctx,
+ frame->pts,
+ frame->pkt_dts);
} else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) {
uint8_t *side;
- buffer_size_t side_size;
+ int side_size;
uint32_t discard_padding = 0;
uint8_t skip_reason = 0;
uint8_t discard_reason = 0;
if (ret >= 0 && got_frame) {
+ frame->best_effort_timestamp = guess_correct_pts(avctx,
+ frame->pts,
+ frame->pkt_dts);
if (frame->format == AV_SAMPLE_FMT_NONE)
frame->format = avctx->sample_fmt;
if (!frame->channel_layout)
@@ -491,9 +522,7 @@
}
}
-#if FF_API_OLD_ENCDEC
avci->compat_decode_consumed += ret;
-#endif
if (ret >= pkt->size || ret < 0) {
av_packet_unref(pkt);
@@ -550,10 +579,6 @@
avci->draining_done = 1;
if (!ret) {
- frame->best_effort_timestamp = guess_correct_pts(avctx,
- frame->pts,
- frame->pkt_dts);
-
/* the only case where decode data is not set should be decoders
* that do not call ff_get_buffer() */
av_assert0((frame->private_ref && frame->private_ref->size == sizeof(FrameDecodeData)) ||
@@ -717,54 +742,6 @@
return 0;
}
-#if FF_API_OLD_ENCDEC
-FF_DISABLE_DEPRECATION_WARNINGS
-static int unrefcount_frame(AVCodecInternal *avci, AVFrame *frame)
-{
- int ret;
-
- /* move the original frame to our backup */
- av_frame_unref(avci->to_free);
- av_frame_move_ref(avci->to_free, frame);
-
- /* now copy everything except the AVBufferRefs back
- * note that we make a COPY of the side data, so calling av_frame_free() on
- * the caller's frame will work properly */
- ret = av_frame_copy_props(frame, avci->to_free);
- if (ret < 0)
- return ret;
-
- memcpy(frame->data, avci->to_free->data, sizeof(frame->data));
- memcpy(frame->linesize, avci->to_free->linesize, sizeof(frame->linesize));
- if (avci->to_free->extended_data != avci->to_free->data) {
- int planes = avci->to_free->channels;
- int size = planes * sizeof(*frame->extended_data);
-
- if (!size) {
- av_frame_unref(frame);
- return AVERROR_BUG;
- }
-
- frame->extended_data = av_malloc(size);
- if (!frame->extended_data) {
- av_frame_unref(frame);
- return AVERROR(ENOMEM);
- }
- memcpy(frame->extended_data, avci->to_free->extended_data,
- size);
- } else
- frame->extended_data = frame->data;
-
- frame->format = avci->to_free->format;
- frame->width = avci->to_free->width;
- frame->height = avci->to_free->height;
- frame->channel_layout = avci->to_free->channel_layout;
- frame->nb_samples = avci->to_free->nb_samples;
- frame->channels = avci->to_free->channels;
-
- return 0;
-}
-
static int compat_decode(AVCodecContext *avctx, AVFrame *frame,
int *got_frame, const AVPacket *pkt)
{
@@ -860,8 +837,6 @@
{
return compat_decode(avctx, frame, got_frame_ptr, avpkt);
}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
static void get_subtitle_defaults(AVSubtitle *sub)
{
@@ -870,58 +845,55 @@
}
#define UTF8_MAX_BYTES 4 /* 5 and 6 bytes sequences should not be used */
-static int recode_subtitle(AVCodecContext *avctx, AVPacket **outpkt,
- AVPacket *inpkt, AVPacket *buf_pkt)
+static int recode_subtitle(AVCodecContext *avctx,
+ AVPacket *outpkt, const AVPacket *inpkt)
{
#if CONFIG_ICONV
iconv_t cd = (iconv_t)-1;
int ret = 0;
char *inb, *outb;
size_t inl, outl;
+ AVPacket tmp;
#endif
- if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_PRE_DECODER || inpkt->size == 0) {
- *outpkt = inpkt;
+ if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_PRE_DECODER || inpkt->size == 0)
return 0;
- }
#if CONFIG_ICONV
+ cd = iconv_open("UTF-8", avctx->sub_charenc);
+ av_assert0(cd != (iconv_t)-1);
+
inb = inpkt->data;
inl = inpkt->size;
if (inl >= INT_MAX / UTF8_MAX_BYTES - AV_INPUT_BUFFER_PADDING_SIZE) {
av_log(avctx, AV_LOG_ERROR, "Subtitles packet is too big for recoding\n");
- return AVERROR(ERANGE);
+ ret = AVERROR(ENOMEM);
+ goto end;
}
- cd = iconv_open("UTF-8", avctx->sub_charenc);
- av_assert0(cd != (iconv_t)-1);
-
- ret = av_new_packet(buf_pkt, inl * UTF8_MAX_BYTES);
+ ret = av_new_packet(&tmp, inl * UTF8_MAX_BYTES);
if (ret < 0)
goto end;
- ret = av_packet_copy_props(buf_pkt, inpkt);
- if (ret < 0)
- goto end;
- outb = buf_pkt->data;
- outl = buf_pkt->size;
+ outpkt->buf = tmp.buf;
+ outpkt->data = tmp.data;
+ outpkt->size = tmp.size;
+ outb = outpkt->data;
+ outl = outpkt->size;
if (iconv(cd, &inb, &inl, &outb, &outl) == (size_t)-1 ||
iconv(cd, NULL, NULL, &outb, &outl) == (size_t)-1 ||
- outl >= buf_pkt->size || inl != 0) {
+ outl >= outpkt->size || inl != 0) {
ret = FFMIN(AVERROR(errno), -1);
av_log(avctx, AV_LOG_ERROR, "Unable to recode subtitle event \"%s\" "
"from %s to UTF-8\n", inpkt->data, avctx->sub_charenc);
+ av_packet_unref(&tmp);
goto end;
}
- buf_pkt->size -= outl;
- memset(buf_pkt->data + buf_pkt->size, 0, outl);
- *outpkt = buf_pkt;
+ outpkt->size -= outl;
+ memset(outpkt->data + outpkt->size, 0, outl);
- ret = 0;
end:
- if (ret < 0)
- av_packet_unref(buf_pkt);
if (cd != (iconv_t)-1)
iconv_close(cd);
return ret;
@@ -1027,7 +999,7 @@
int *got_sub_ptr,
AVPacket *avpkt)
{
- int ret = 0;
+ int i, ret = 0;
if (!avpkt->data && avpkt->size) {
av_log(avctx, AV_LOG_ERROR, "invalid packet: NULL data, size != 0\n");
@@ -1044,60 +1016,69 @@
get_subtitle_defaults(sub);
if ((avctx->codec->capabilities & AV_CODEC_CAP_DELAY) || avpkt->size) {
- AVCodecInternal *avci = avctx->internal;
- AVPacket *pkt;
+ AVPacket pkt_recoded = *avpkt;
- ret = recode_subtitle(avctx, &pkt, avpkt, avci->buffer_pkt);
- if (ret < 0)
- return ret;
+ ret = recode_subtitle(avctx, &pkt_recoded, avpkt);
+ if (ret < 0) {
+ *got_sub_ptr = 0;
+ } else {
+ ret = extract_packet_props(avctx->internal, &pkt_recoded);
+ if (ret < 0)
+ return ret;
- if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
- sub->pts = av_rescale_q(avpkt->pts,
- avctx->pkt_timebase, AV_TIME_BASE_Q);
- ret = avctx->codec->decode(avctx, sub, got_sub_ptr, pkt);
- av_assert1((ret >= 0) >= !!*got_sub_ptr &&
- !!*got_sub_ptr >= !!sub->num_rects);
+ if (avctx->pkt_timebase.num && avpkt->pts != AV_NOPTS_VALUE)
+ sub->pts = av_rescale_q(avpkt->pts,
+ avctx->pkt_timebase, AV_TIME_BASE_Q);
+ ret = avctx->codec->decode(avctx, sub, got_sub_ptr, &pkt_recoded);
+ av_assert1((ret >= 0) >= !!*got_sub_ptr &&
+ !!*got_sub_ptr >= !!sub->num_rects);
#if FF_API_ASS_TIMING
- if (avctx->sub_text_format == FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS
- && *got_sub_ptr && sub->num_rects) {
- const AVRational tb = avctx->pkt_timebase.num ? avctx->pkt_timebase
- : avctx->time_base;
- int err = convert_sub_to_old_ass_form(sub, avpkt, tb);
- if (err < 0)
- ret = err;
- }
+ if (avctx->sub_text_format == FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS
+ && *got_sub_ptr && sub->num_rects) {
+ const AVRational tb = avctx->pkt_timebase.num ? avctx->pkt_timebase
+ : avctx->time_base;
+ int err = convert_sub_to_old_ass_form(sub, avpkt, tb);
+ if (err < 0)
+ ret = err;
+ }
#endif
- if (sub->num_rects && !sub->end_display_time && avpkt->duration &&
- avctx->pkt_timebase.num) {
- AVRational ms = { 1, 1000 };
- sub->end_display_time = av_rescale_q(avpkt->duration,
- avctx->pkt_timebase, ms);
- }
+ if (sub->num_rects && !sub->end_display_time && avpkt->duration &&
+ avctx->pkt_timebase.num) {
+ AVRational ms = { 1, 1000 };
+ sub->end_display_time = av_rescale_q(avpkt->duration,
+ avctx->pkt_timebase, ms);
+ }
- if (avctx->codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB)
- sub->format = 0;
- else if (avctx->codec_descriptor->props & AV_CODEC_PROP_TEXT_SUB)
- sub->format = 1;
+ if (avctx->codec_descriptor->props & AV_CODEC_PROP_BITMAP_SUB)
+ sub->format = 0;
+ else if (avctx->codec_descriptor->props & AV_CODEC_PROP_TEXT_SUB)
+ sub->format = 1;
- for (unsigned i = 0; i < sub->num_rects; i++) {
- if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_IGNORE &&
- sub->rects[i]->ass && !utf8_check(sub->rects[i]->ass)) {
- av_log(avctx, AV_LOG_ERROR,
- "Invalid UTF-8 in decoded subtitles text; "
- "maybe missing -sub_charenc option\n");
- avsubtitle_free(sub);
- ret = AVERROR_INVALIDDATA;
- break;
+ for (i = 0; i < sub->num_rects; i++) {
+ if (avctx->sub_charenc_mode != FF_SUB_CHARENC_MODE_IGNORE &&
+ sub->rects[i]->ass && !utf8_check(sub->rects[i]->ass)) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Invalid UTF-8 in decoded subtitles text; "
+ "maybe missing -sub_charenc option\n");
+ avsubtitle_free(sub);
+ ret = AVERROR_INVALIDDATA;
+ break;
+ }
+ }
+
+ if (avpkt->data != pkt_recoded.data) { // did we recode?
+ /* prevent from destroying side data from original packet */
+ pkt_recoded.side_data = NULL;
+ pkt_recoded.side_data_elems = 0;
+
+ av_packet_unref(&pkt_recoded);
}
}
if (*got_sub_ptr)
avctx->frame_number++;
-
- if (pkt == avci->buffer_pkt) // did we recode?
- av_packet_unref(avci->buffer_pkt);
}
return ret;
@@ -1710,7 +1691,7 @@
static int add_metadata_from_side_data(const AVPacket *avpkt, AVFrame *frame)
{
- buffer_size_t size;
+ int size;
const uint8_t *side_metadata;
AVDictionary **frame_md = &frame->metadata;
@@ -1740,9 +1721,10 @@
{ AV_PKT_DATA_S12M_TIMECODE, AV_FRAME_DATA_S12M_TIMECODE },
};
- if (IS_EMPTY(pkt) && av_fifo_size(avctx->internal->pkt_props) >= sizeof(*pkt))
- av_fifo_generic_read(avctx->internal->pkt_props,
- pkt, sizeof(*pkt), NULL);
+ if (IS_EMPTY(pkt))
+ avpriv_packet_list_get(&avctx->internal->pkt_props,
+ &avctx->internal->pkt_props_tail,
+ pkt);
if (pkt) {
frame->pts = pkt->pts;
@@ -1756,7 +1738,7 @@
frame->pkt_size = pkt->size;
for (i = 0; i < FF_ARRAY_ELEMS(sd); i++) {
- buffer_size_t size;
+ int size;
uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size);
if (packet_sd) {
AVFrameSideData *frame_sd = av_frame_new_side_data(frame,
diff --git a/libavcodec/dirac_arith.c b/libavcodec/dirac_arith.c
index 69b6280..36142fe 100644
--- a/libavcodec/dirac_arith.c
+++ b/libavcodec/dirac_arith.c
@@ -28,7 +28,7 @@
#include "dirac_arith.h"
-static const uint16_t dirac_prob[256] = {
+const uint16_t ff_dirac_prob[256] = {
0, 2, 5, 8, 11, 15, 20, 24,
29, 35, 41, 47, 53, 60, 67, 74,
82, 89, 97, 106, 114, 123, 132, 141,
@@ -88,8 +88,8 @@
int i;
for (i = 0; i < 256; i++) {
- ff_dirac_prob_branchless[i][0] = dirac_prob[255-i];
- ff_dirac_prob_branchless[i][1] = -dirac_prob[i];
+ ff_dirac_prob_branchless[i][0] = ff_dirac_prob[255-i];
+ ff_dirac_prob_branchless[i][1] = -ff_dirac_prob[i];
}
}
diff --git a/libavcodec/dirac_arith.h b/libavcodec/dirac_arith.h
index 350a58f..79526a7 100644
--- a/libavcodec/dirac_arith.h
+++ b/libavcodec/dirac_arith.h
@@ -86,6 +86,7 @@
} DiracArith;
extern const uint8_t ff_dirac_next_ctx[DIRAC_CTX_COUNT];
+extern const uint16_t ff_dirac_prob[256];
extern int16_t ff_dirac_prob_branchless[256][2];
static inline void renorm(DiracArith *c)
diff --git a/libavcodec/dirac_vlc.c b/libavcodec/dirac_vlc.c
index c5a0371..2e2fa7e 100644
--- a/libavcodec/dirac_vlc.c
+++ b/libavcodec/dirac_vlc.c
@@ -16,8 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
-
#include "dirac_vlc.h"
enum {
@@ -45,7 +43,7 @@
uint16_t state; /* Expected state for the next byte */
} LUTState;
-static const DECLARE_ALIGNED(32, LUTState, dirac_golomb_lut)[1024] = {
+const DECLARE_ALIGNED(32, LUTState, ff_dirac_golomb_lut)[1024] = {
{ +16, 0, 0, 0, 0, 5, +1, 0, 0, STATE_FOLLOW },
{ +17, 0, 0, 0, 0, 5, +1, 0, 0, STATE_FOLLOW },
{ +8, 0, 0, 0, 0, 4, +1, 1, 0, STATE_START },
@@ -1089,13 +1087,13 @@
dst += lut.num; \
if (dst >= last) \
return coeffs; \
- lut = dirac_golomb_lut[lut.state + *buf++]; \
+ lut = ff_dirac_golomb_lut[lut.state + *buf++]; \
} while (0)
int ff_dirac_golomb_read_16bit(const uint8_t *buf, int bytes,
uint8_t *_dst, int coeffs)
{
- LUTState lut = dirac_golomb_lut[*buf++];
+ LUTState lut = ff_dirac_golomb_lut[*buf++];
int16_t *dst = (int16_t *)_dst, *last = dst + coeffs;
uint16_t val = 0;
@@ -1115,7 +1113,7 @@
int ff_dirac_golomb_read_32bit(const uint8_t *buf, int bytes,
uint8_t *_dst, int coeffs)
{
- LUTState lut = dirac_golomb_lut[*buf++];
+ LUTState lut = ff_dirac_golomb_lut[*buf++];
int32_t *dst = (int32_t *)_dst, *last = dst + coeffs;
uint32_t val = 0;
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index b9999cd..ed42bc3 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -26,7 +26,6 @@
* @author Marco Gerards <marco@gnu.org>, David Conrad, Jordi Ortiz <nenjordi@gmail.com>
*/
-#include "libavutil/mem_internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/thread.h"
#include "avcodec.h"
diff --git a/libavcodec/dnxhddata.c b/libavcodec/dnxhddata.c
index 3a69a0f..154be89 100644
--- a/libavcodec/dnxhddata.c
+++ b/libavcodec/dnxhddata.c
@@ -932,7 +932,7 @@
49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
};
-static const CIDEntry dnxhd_cid_table[] = {
+const CIDEntry ff_dnxhd_cid_table[] = {
{ 1235, 1920, 1080, 917504, 917504,
0, 6, 10, 4,
dnxhd_1235_luma_weight, dnxhd_1235_chroma_weight,
@@ -1075,31 +1075,31 @@
{ 0 }, { 5888, 255} },
};
-const CIDEntry *ff_dnxhd_get_cid_table(int cid)
+int ff_dnxhd_get_cid_table(int cid)
{
- for (int i = 0; i < FF_ARRAY_ELEMS(dnxhd_cid_table); i++)
- if (dnxhd_cid_table[i].cid == cid)
- return &dnxhd_cid_table[i];
- return NULL;
+ int i;
+ for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++)
+ if (ff_dnxhd_cid_table[i].cid == cid)
+ return i;
+ return -1;
}
int avpriv_dnxhd_get_frame_size(int cid)
{
- const CIDEntry *entry = ff_dnxhd_get_cid_table(cid);
- if (!entry)
- return -1;
- return entry->frame_size;
+ int i = ff_dnxhd_get_cid_table(cid);
+ if (i<0)
+ return i;
+ return ff_dnxhd_cid_table[i].frame_size;
}
int avpriv_dnxhd_get_hr_frame_size(int cid, int w, int h)
{
- const CIDEntry *entry = ff_dnxhd_get_cid_table(cid);
- int result;
+ int result, i = ff_dnxhd_get_cid_table(cid);
- if (!entry)
- return -1;
+ if (i < 0)
+ return i;
- result = ((h + 15) / 16) * ((w + 15) / 16) * (int64_t)entry->packet_scale.num / entry->packet_scale.den;
+ result = ((h + 15) / 16) * ((w + 15) / 16) * (int64_t)ff_dnxhd_cid_table[i].packet_scale.num / ff_dnxhd_cid_table[i].packet_scale.den;
result = (result + 2048) / 4096 * 4096;
return FFMAX(result, 8192);
@@ -1107,10 +1107,10 @@
int avpriv_dnxhd_get_interlaced(int cid)
{
- const CIDEntry *entry = ff_dnxhd_get_cid_table(cid);
- if (!entry)
- return -1;
- return entry->flags & DNXHD_INTERLACED ? 1 : 0;
+ int i = ff_dnxhd_get_cid_table(cid);
+ if (i < 0)
+ return i;
+ return ff_dnxhd_cid_table[i].flags & DNXHD_INTERLACED ? 1 : 0;
}
static int dnxhd_find_hr_cid(AVCodecContext *avctx)
@@ -1140,8 +1140,8 @@
if (!mbs)
return 0;
- for (i = 0; i < FF_ARRAY_ELEMS(dnxhd_cid_table); i++) {
- const CIDEntry *cid = &dnxhd_cid_table[i];
+ for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) {
+ const CIDEntry *cid = &ff_dnxhd_cid_table[i];
int interlaced = cid->flags & DNXHD_INTERLACED ? 1 : 0;
if (cid->width == avctx->width && cid->height == avctx->height &&
interlaced == !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT) &&
@@ -1163,8 +1163,8 @@
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel)
{
int i, j;
- for (i = 0; i < FF_ARRAY_ELEMS(dnxhd_cid_table); i++) {
- const CIDEntry *cid = &dnxhd_cid_table[i];
+ for (i = 0; i < FF_ARRAY_ELEMS(ff_dnxhd_cid_table); i++) {
+ const CIDEntry *cid = &ff_dnxhd_cid_table[i];
for (j = 0; j < FF_ARRAY_ELEMS(cid->bit_rates); j++) {
if (!cid->bit_rates[j])
break;
diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
index 898079c..cfa6b0c 100644
--- a/libavcodec/dnxhddata.h
+++ b/libavcodec/dnxhddata.h
@@ -58,7 +58,9 @@
AVRational packet_scale;
} CIDEntry;
-const CIDEntry *ff_dnxhd_get_cid_table(int cid);
+extern const CIDEntry ff_dnxhd_cid_table[];
+
+int ff_dnxhd_get_cid_table(int cid);
int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth);
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel);
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index cb0fdd3..f6dfa4a 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -25,8 +25,6 @@
*/
#include "libavutil/imgutils.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "blockdsp.h"
#include "get_bits.h"
@@ -112,19 +110,18 @@
static int dnxhd_init_vlc(DNXHDContext *ctx, uint32_t cid, int bitdepth)
{
if (cid != ctx->cid) {
- const CIDEntry *cid_table = ff_dnxhd_get_cid_table(cid);
+ int index;
- if (!cid_table) {
+ if ((index = ff_dnxhd_get_cid_table(cid)) < 0) {
av_log(ctx->avctx, AV_LOG_ERROR, "unsupported cid %"PRIu32"\n", cid);
return AVERROR(ENOSYS);
}
- if (cid_table->bit_depth != bitdepth &&
- cid_table->bit_depth != DNXHD_VARIABLE) {
- av_log(ctx->avctx, AV_LOG_ERROR, "bit depth mismatches %d %d\n",
- cid_table->bit_depth, bitdepth);
+ if (ff_dnxhd_cid_table[index].bit_depth != bitdepth &&
+ ff_dnxhd_cid_table[index].bit_depth != DNXHD_VARIABLE) {
+ av_log(ctx->avctx, AV_LOG_ERROR, "bit depth mismatches %d %d\n", ff_dnxhd_cid_table[index].bit_depth, bitdepth);
return AVERROR_INVALIDDATA;
}
- ctx->cid_table = cid_table;
+ ctx->cid_table = &ff_dnxhd_cid_table[index];
av_log(ctx->avctx, AV_LOG_VERBOSE, "Profile cid %"PRIu32".\n", cid);
ff_free_vlc(&ctx->ac_vlc);
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 2461c51..91eeb47 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -25,7 +25,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
@@ -351,7 +350,7 @@
static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
{
DNXHDEncContext *ctx = avctx->priv_data;
- int i, ret;
+ int i, index, ret;
switch (avctx->pix_fmt) {
case AV_PIX_FMT_YUV422P:
@@ -411,8 +410,10 @@
return AVERROR(EINVAL);
}
- ctx->cid_table = ff_dnxhd_get_cid_table(ctx->cid);
- av_assert0(ctx->cid_table);
+ index = ff_dnxhd_get_cid_table(ctx->cid);
+ av_assert0(index >= 0);
+
+ ctx->cid_table = &ff_dnxhd_cid_table[index];
ctx->m.avctx = avctx;
ctx->m.mb_intra = 1;
diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h
index 9e4c869..7b0d862 100644
--- a/libavcodec/dnxhdenc.h
+++ b/libavcodec/dnxhdenc.h
@@ -28,8 +28,6 @@
#include "config.h"
-#include "libavutil/mem_internal.h"
-
#include "mpegvideo.h"
#include "dnxhddata.h"
diff --git a/libavcodec/dolby_e.c b/libavcodec/dolby_e.c
index ecb2f48..429612e 100644
--- a/libavcodec/dolby_e.c
+++ b/libavcodec/dolby_e.c
@@ -21,586 +21,13 @@
#include "libavutil/float_dsp.h"
#include "libavutil/thread.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "internal.h"
#include "get_bits.h"
+#include "put_bits.h"
#include "dolby_e.h"
-#include "kbdwin.h"
#include "fft.h"
-#define MAX_SEGMENTS 2
-
-#define MAX_GROUPS 8
-#define MAX_EXPONENTS 304
-#define MAX_MANTISSAS 1024
-
-#define MAX_MSTR_EXP 2
-#define MAX_BIAS_EXP 50
-
-typedef struct DBEGroup {
- uint8_t nb_exponent;
- uint8_t nb_bias_exp[MAX_MSTR_EXP];
- uint16_t exp_ofs;
- uint16_t mnt_ofs;
- const uint8_t *nb_mantissa;
- uint8_t imdct_idx;
- uint8_t imdct_phs;
- uint16_t win_len;
- uint16_t dst_ofs;
- uint16_t win_ofs;
- uint16_t src_ofs;
-} DBEGroup;
-
-typedef struct DBEChannel {
- int gr_code;
- int bw_code;
-
- int nb_groups;
- int nb_mstr_exp;
- DBEGroup groups[MAX_GROUPS];
-
- int exp_strategy[MAX_GROUPS];
- int exponents[MAX_EXPONENTS];
- int bap[MAX_EXPONENTS];
- int idx[MAX_EXPONENTS];
-
- DECLARE_ALIGNED(32, float, mantissas)[MAX_MANTISSAS];
-} DBEChannel;
-
-typedef struct DBEDecodeContext {
- AVCodecContext *avctx;
- DBEContext dectx;
-
- DBEChannel channels[MAX_SEGMENTS][MAX_CHANNELS];
-
- DECLARE_ALIGNED(32, float, history)[MAX_CHANNELS][256];
-
- FFTContext imdct[3];
- AVFloatDSPContext *fdsp;
-} DBEDecodeContext;
-
-static const int8_t lfe_channel_tab[MAX_PROG_CONF + 1] = {
- 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5
-};
-
-static const uint8_t ch_reorder_4[4] = { 0, 2, 1, 3 };
-static const uint8_t ch_reorder_6[6] = { 0, 2, 4, 1, 3, 5 };
-static const uint8_t ch_reorder_8[8] = { 0, 2, 6, 4, 1, 3, 7, 5 };
-static const uint8_t ch_reorder_n[8] = { 0, 2, 4, 6, 1, 3, 5, 7 };
-
-
-static const uint8_t nb_groups_tab[4] = { 1, 8, 7, 1 };
-
-static const uint8_t nb_mstr_exp_tab[4] = { 2, 2, 2, 1 };
-
-static const uint8_t nb_mantissa_38[38] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6,
- 7, 8, 9, 10, 11, 12,
-};
-
-static const uint8_t nb_mantissa_44[44] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
- 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7,
- 8, 9, 10, 11, 12, 13, 15, 16, 18, 20, 22, 25,
-};
-
-static const uint8_t nb_mantissa_50[50] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3,
- 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 12, 13, 14, 16,
- 18, 19, 22, 24, 27, 29, 32, 36, 40, 44, 49, 54, 60, 66, 74, 82,
- 90, 100,
-};
-
-static const uint8_t imdct_bits_tab[3] = { 8, 9, 11 };
-
-static const DBEGroup grp_tab_0[1] = {
- { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
-};
-
-static const DBEGroup grp_tab_1[8] = {
- { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
- { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
- { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
- { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
- { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
- { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
- { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 704, 0, 0 },
- { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 1, 256, 832, 0, 0 },
-};
-
-static const DBEGroup grp_tab_2[7] = {
- { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
- { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
- { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
- { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
- { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
- { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
- { 44, { 19, 25 }, 228, 768, nb_mantissa_44, 1, 1, 448, 704, 960, 64 },
-};
-
-static const DBEGroup grp_tab_3[1] = {
- { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
-};
-
-static const DBEGroup grp_tab_4[1] = {
- { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
-};
-
-static const DBEGroup grp_tab_5[8] = {
- { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 1, 256, 64, 0, 0 },
- { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 192, 0, 0 },
- { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
- { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
- { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
- { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
- { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
- { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
-};
-
-static const DBEGroup grp_tab_6[7] = {
- { 44, { 19, 25 }, 0, 0, nb_mantissa_44, 1, 1, 448, 0, 3264, 0 },
- { 38, { 12, 26 }, 44, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
- { 38, { 12, 26 }, 82, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
- { 38, { 12, 26 }, 120, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
- { 38, { 12, 26 }, 158, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
- { 38, { 12, 26 }, 196, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
- { 38, { 12, 26 }, 234, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
-};
-
-static const DBEGroup grp_tab_7[1] = {
- { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
-};
-
-static const DBEGroup *const frm_ofs_tab[2][4] = {
- { grp_tab_0, grp_tab_1, grp_tab_2, grp_tab_3 },
- { grp_tab_4, grp_tab_5, grp_tab_6, grp_tab_7 }
-};
-
-static const uint8_t mantissa_size1[16][4] = {
- { 0, 0, 0, 0 }, { 2, 1, 1, 1 }, { 3, 2, 1, 1 }, { 4, 3, 2, 1 },
- { 5, 4, 3, 2 }, { 6, 5, 4, 3 }, { 7, 6, 5, 4 }, { 8, 7, 6, 5 },
- { 9, 8, 7, 6 }, { 10, 9, 8, 7 }, { 11, 10, 9, 8 }, { 12, 11, 10, 9 },
- { 13, 12, 11, 10 }, { 14, 13, 12, 11 }, { 15, 14, 13, 12 }, { 16, 15, 14, 13 },
-};
-
-static const uint8_t mantissa_size2[16][4] = {
- { 0, 0, 0, 0 }, { 2, 1, 2, 2 }, { 3, 2, 3, 3 }, { 4, 3, 4, 4 },
- { 5, 4, 5, 5 }, { 6, 5, 6, 6 }, { 7, 6, 7, 7 }, { 8, 7, 8, 8 },
- { 9, 8, 9, 9 }, { 10, 9, 10, 10 }, { 11, 10, 11, 11 }, { 12, 11, 12, 12 },
- { 13, 12, 13, 13 }, { 14, 13, 14, 14 }, { 15, 14, 15, 15 }, { 16, 15, 16, 16 },
-};
-
-static const float start_window[192] = {
- 0.00161569379826, 0.00185748233347, 0.00198562758548, 0.00207834078104,
- 0.00215717748523, 0.00223067096393, 0.00230299213147, 0.00237651215396,
- 0.00245275561606, 0.00253281402069, 0.00261754673613, 0.00270768786168,
- 0.00280390761895, 0.00290684998656, 0.00301715751161, 0.00313548872798,
- 0.00326253122934, 0.00339901215995, 0.00354570716636, 0.00370344845023,
- 0.00387313232586, 0.00405572653911, 0.00425227750970, 0.00446391759265,
- 0.00469187240551, 0.00493746822816, 0.00520213944619, 0.00548743597507,
- 0.00579503056737, 0.00612672586953, 0.00648446105606, 0.00687031782873,
- 0.00728652552677, 0.00773546505205, 0.00821967127415, 0.00874183354619,
- 0.00930479393832, 0.00991154278653, 0.01056521116692, 0.01126905994567,
- 0.01202646513050, 0.01284089936559, 0.01371590957417, 0.01465509096066,
- 0.01566205783408, 0.01674041199523, 0.01789370972358, 0.01912542867865,
- 0.02043893626265, 0.02183746113793, 0.02332406961796, 0.02490164852364,
- 0.02657289580178, 0.02834031974193, 0.03020624702903, 0.03217283918354,
- 0.03424211623810, 0.03641598586180, 0.03869627565015, 0.04108476601498,
- 0.04358322107390, 0.04619341515939, 0.04891715301882, 0.05175628239149,
-
- 0.05471237327267, 0.05778734733755, 0.06098291402413, 0.06430101352084,
- 0.06774345212186, 0.07131188644726, 0.07500780649199, 0.07883251748595,
- 0.08278712056651, 0.08687249228061, 0.09108926295730, 0.09543779401074,
- 0.09991815425851, 0.10453009536427, 0.10927302653894, 0.11414598865987,
- 0.11914762799220, 0.12427616972097, 0.12952939152560, 0.13490459744934,
- 0.14039859233595, 0.14600765712201, 0.15172752528722, 0.15755336077528,
- 0.16347973770491, 0.16950062219342, 0.17560935661442, 0.18179864660619,
- 0.18806055113821, 0.19438647593012, 0.20076717050010, 0.20719272909882,
- 0.21365259576030, 0.22013557367283, 0.22662983904194, 0.23312295958328,
- 0.23960191774666, 0.24605313873388, 0.25246252333253, 0.25881548554631,
- 0.26509699495987, 0.27129162373316, 0.27738359807707, 0.28335685401987,
- 0.28919509723179, 0.29488186663467, 0.30040060148455, 0.30573471157819,
- 0.31086765019993, 0.31578298939317, 0.32046449711227, 0.32489621578468,
- 0.32906254179156, 0.33294830535654, 0.33653885031840, 0.33982011325336,
- 0.34277870140679, 0.34540196889300, 0.34767809062480, 0.34959613344194,
- 0.35114612391958, 0.35231911235422, 0.35310723244504, 0.35350375621308,
-
- 0.35350314372945, 0.35310108725579, 0.35229454943591, 0.35108179521634,
- 0.34946241721522, 0.34743735430290, 0.34500890320420, 0.34218072298001,
- 0.33895783229541, 0.33534659943168, 0.33135472505060, 0.32699121776996,
- 0.32226636266000, 0.31719168282019, 0.31177989424432, 0.30604485422875,
- 0.30000150362379, 0.29366580327088, 0.28705466500775, 0.28018587766131,
- 0.27307802848095, 0.26575042049535, 0.25822298630189, 0.25051619882000,
- 0.24265097955783, 0.23464860495522, 0.22653061137548, 0.21831869932335,
- 0.21003463746705, 0.20170016703857, 0.19333690717811, 0.18496626177620,
- 0.17660932835062, 0.16828680947474, 0.16001892724986, 0.15182534128597,
- 0.14372507062477, 0.13573642000364, 0.12787691082233, 0.12016321713317,
- 0.11261110693234, 0.10523538898282, 0.09804986534955, 0.09106728977263,
- 0.08429933194438, 0.07775654768810, 0.07144835495683, 0.06538301547324,
- 0.05956762170687, 0.05400808871425, 0.04870915012107, 0.04367435714993,
- 0.03890607899172, 0.03440550179663, 0.03017262174627, 0.02620622428513,
- 0.02250383492507, 0.01906161305732, 0.01587412848221, 0.01293388032354,
- 0.01023019677288, 0.00774641320626, 0.00545109736891, 0.00325868651263,
-};
-
-static const float short_window2[192] = {
- 0.00018861094606, 0.00033433010202, 0.00050309624485, 0.00070306161748,
- 0.00093995174533, 0.00121913067128, 0.00154606505568, 0.00192647806126,
- 0.00236641248692, 0.00287225985240, 0.00345077377440, 0.00410907465023,
- 0.00485464855241, 0.00569534163219, 0.00663935063508, 0.00769520981249,
- 0.00887177436246, 0.01017820046395, 0.01162392194150, 0.01321862359335,
- 0.01497221122468, 0.01689477844427, 0.01899657030441, 0.02128794388846,
- 0.02377932597692, 0.02648116795039, 0.02940389811590, 0.03255787167130,
- 0.03595331854986, 0.03960028941437, 0.04350860009563, 0.04768777479454,
- 0.05214698838949, 0.05689500821121, 0.06194013566525, 0.06729014809766,
- 0.07295224131210, 0.07893297315602, 0.08523820859989, 0.09187306673620,
- 0.09884187012422, 0.10614809690222, 0.11379433608064, 0.12178224641797,
- 0.13011251926531, 0.13878484574660, 0.14779788861830, 0.15714925912610,
- 0.16683549914631, 0.17685206886673, 0.18719334022589, 0.19785259629099,
- 0.20882203671372, 0.22009278936030, 0.23165492816694, 0.24349749722585,
- 0.25560854105961, 0.26797514099368, 0.28058345748882, 0.29341877824732,
- 0.30646557185942, 0.31970754671026, 0.33312771482295, 0.34670846027024,
-
- 0.36043161174692, 0.37427851885723, 0.38823013163645, 0.40226708279486,
- 0.41636977214436, 0.43051845264462, 0.44469331748632, 0.45887458761470,
- 0.47304259908636, 0.48717788964798, 0.50126128392546, 0.51527397661778,
- 0.52919761310050, 0.54301436685998, 0.55670701320069, 0.57025899869448,
- 0.58365450587230, 0.59687851269542, 0.60991684638414, 0.62275623122793,
- 0.63538433005035, 0.64778977905593, 0.65996221584264, 0.67189230042379,
- 0.68357172916486, 0.69499324160511, 0.70615062019861, 0.71703868307548,
- 0.72765326998919, 0.73799122168099, 0.74805035295521, 0.75782941981995,
- 0.76732808110520, 0.77654685502339, 0.78548707118622, 0.79415081863423,
- 0.80254089047207, 0.81066072573188, 0.81851434910893, 0.82610630922734,
- 0.83344161609862, 0.84052567843230, 0.84736424144524, 0.85396332579459,
- 0.86032916822973, 0.86646816451999, 0.87238681516918, 0.87809167437532,
- 0.88358930263537, 0.88888622333073, 0.89398888356256, 0.89890361943564,
- 0.90363662591861, 0.90819393133744, 0.91258137648979, 0.91680459830070,
- 0.92086901787718, 0.92477983276087, 0.92854201312583, 0.93216030163834,
- 0.93563921662343, 0.93898305819384, 0.94219591693690, 0.94528168477979,
-
- 0.94823843319821, 0.95106834367330, 0.95377776558539, 0.95636718335775,
- 0.95883679961479, 0.96118650212341, 0.96341583179195, 0.96552395212906,
- 0.96750962060547, 0.96937116231768, 0.97110644638309, 0.97271286544154,
- 0.97418731862798, 0.97552619834964, 0.97672538116257, 0.97778022299974,
- 0.97868555895586, 0.97943570778357, 0.98002448120255, 0.98044519806866,
- 0.98069070339493, 0.98075339216123, 0.98062523779637, 0.98029782516478,
- 0.97976238784222, 0.97900984942031, 0.97803086854002, 0.97681588731895,
- 0.97535518280755, 0.97363892108474, 0.97165721358452, 0.96940017523145,
- 0.96685798395452, 0.96402094114589, 0.96087953263194, 0.95742448973047,
- 0.95364684997699, 0.94953801711660, 0.94508981997396, 0.94029456983253,
- 0.93514511597504, 0.92963489905951, 0.92375800202883, 0.91750919827624,
- 0.91088399681406, 0.90387868421832, 0.89649036314692, 0.88871698725397,
- 0.88055739234735, 0.87201132366062, 0.86307945913336, 0.85376342861693,
- 0.84406582894455, 0.83399023482637, 0.82354120554757, 0.81272428745995,
- 0.80154601230457, 0.79001389138101, 0.77813640562199, 0.76592299164227,
- 0.75338402384395, 0.74053079267526, 0.72737547915460, 0.71393112578527,
-};
-
-static const float short_window3[64] = {
- 0.00326887936450, 0.00550242900936, 0.00786846643791, 0.01045683453520,
- 0.01330402120132, 0.01643221072863, 0.01985798040609, 0.02359509464766,
- 0.02765559221954, 0.03205025893128, 0.03678884369614, 0.04188015679495,
- 0.04733210987781, 0.05315172583924, 0.05934513287609, 0.06591755045290,
- 0.07287327156378, 0.08021564389822, 0.08794705152307, 0.09606889811179,
- 0.10458159240070, 0.11348453632940, 0.12277611617809, 0.13245369691511,
- 0.14251361989876, 0.15295120402567, 0.16376075037904, 0.17493555039885,
- 0.18646789757072, 0.19834910260891, 0.21056951208995, 0.22311853047787,
- 0.23598464546683, 0.24915545655419, 0.26261770674500, 0.27635731727778,
- 0.29035942525136, 0.30460842402318, 0.31908800624032, 0.33378120935681,
- 0.34867046348260, 0.36373764140285, 0.37896411059909, 0.39433078709788,
- 0.40981819096657, 0.42540650327031, 0.44107562429959, 0.45680523287270,
- 0.47257484651351, 0.48836388230077, 0.50415171818214, 0.51991775454258,
- 0.53564147581496, 0.55130251191887, 0.56688069931047, 0.58235614142007,
- 0.59770926827271, 0.61292089506118, 0.62797227945823, 0.64284517745255,
- 0.65752189749349, 0.67198535273209, 0.68621911114984, 0.70020744337099,
-};
-
-static const uint8_t dc_code_tab[5] = { 0, 0, 0, 1, 1 };
-
-static const uint8_t ht_code_tab[5] = { 0, 0, 1, 2, 2 };
-
-static const uint8_t band_ofs_tab[3][4] = {
- { 12, 8, 4, 0 }, { 14, 10, 6, 0 }, { 12, 8, 4, 0 }
-};
-
-static const uint8_t band_low_tab[3] = { 9, 17, 24 };
-
-static const uint16_t fast_gain_tab[8] = {
- 128, 256, 384, 512, 640, 768, 896, 1024
-};
-
-static const uint16_t slow_decay_tab[2][2] = { { 27, -1 }, { 32, 21 } };
-
-static const uint16_t misc_decay_tab[3][2][2] = {
- { { 354, -1 }, { 425, 425 } },
- { { 266, -1 }, { 320, -1 } },
- { { 213, -1 }, { 256, -1 } }
-};
-
-static const uint16_t fast_decay_tab[3][2][2][50] = {
- {{{
- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
- 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
- 142, 142, 142, 142, 142, 142, 142, 142,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- }}, {{
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170,
- }, {
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- }}}, {{{
- 266, 266, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- }}, {{
- 319, 319, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- }}}, {{{
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- }}, {{
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- }}}
-};
-
-static const uint16_t fast_gain_adj_tab[3][2][62] = {
- {{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 4, 7, 11, 16, 29, 44, 59,
- 76, 94, 116, 142, 179, 221, 252, 285, 312, 334,
- }, {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 5, 8, 10, 15, 28, 42, 57, 75, 93,
- 115, 140, 177, 219, 247, 280, 308, 330, 427, 533,
- }}, {{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 2, 5, 8, 12, 21, 35, 51, 69, 89,
- 111, 138, 176, 220, 251, 284, 312, 334,
- }, {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
- 5, 8, 11, 18, 33, 49, 65, 84, 106, 132,
- 168, 214, 245, 279, 308, 329, 427, 533,
- }}, {{
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 4, 7, 10, 17,
- 31, 47, 65, 84, 107, 134, 171, 215, 250, 283,
- 312, 334,
- }, {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 6, 9, 13, 27, 43,
- 60, 79, 100, 126, 160, 207, 242, 276, 307, 329,
- 427, 533,
- }}
-};
-
-static const uint16_t slow_gain_tab[3][2][50] = {
- {{
- 3072, 3072, 3072, 3072, 3072, 3072, 1063, 1063, 1063, 1063,
- 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
- 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
- 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
- }, {
- 3072, 3072, 3072, 3072, 3072, 3072, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
- 850, 850, 850, 850, 850, 850, 850, 850,
- }}, {{
- 3072, 1212, 1212, 1212, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1,
- }}, {{
- 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
- }, {
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- }}
-};
-
-static const uint16_t hearing_thresh_tab[3][3][50] = {
- {{
- 1403, 1141, 1000, 959, 948, 957, 946, 925, 899, 871,
- 843, 815, 789, 766, 745, 727, 705, 687, 681, 686,
- 701, 725, 768, 854, 940, 1018, 1075, 1103, 1111, 1106,
- 1098, 1105, 1142, 1237, 1419, 1721, 2169, 2805,
- }, {
- 1401, 1130, 995, 957, 947, 955, 941, 918, 890, 861,
- 831, 803, 777, 754, 734, 717, 698, 684, 682, 692,
- 712, 743, 798, 894, 976, 1045, 1091, 1109, 1110, 1102,
- 1098, 1116, 1174, 1300, 1526, 1884, 2401, 3072,
- }, {
- 1393, 1086, 974, 949, 957, 941, 913, 878, 843, 808,
- 777, 750, 727, 708, 695, 686, 681, 689, 714, 752,
- 811, 888, 971, 1044, 1087, 1108, 1110, 1102, 1098, 1115,
- 1172, 1290, 1489, 1812, 2293, 2964, 3072, 3072,
- }}, {{
- 1412, 1343, 1141, 1047, 1000, 974, 959, 951, 948, 947,
- 957, 953, 946, 936, 925, 906, 878, 850, 822, 795,
- 771, 745, 719, 700, 687, 681, 685, 701, 733, 784,
- 885, 977, 1047, 1092, 1110, 1108, 1099, 1102, 1138, 1233,
- 1413, 1711, 2157, 2797,
- }, {
- 1412, 1336, 1130, 1040, 995, 970, 957, 950, 947, 947,
- 955, 950, 941, 930, 918, 897, 868, 838, 810, 783,
- 759, 734, 710, 693, 684, 681, 690, 712, 752, 823,
- 924, 1009, 1069, 1102, 1111, 1104, 1098, 1111, 1168, 1295,
- 1518, 1873, 2388, 3072,
- }, {
- 1411, 1293, 1086, 1009, 974, 957, 949, 947, 957, 951,
- 941, 928, 913, 896, 878, 852, 817, 785, 756, 732,
- 713, 695, 683, 682, 689, 710, 746, 811, 906, 992,
- 1061, 1099, 1111, 1106, 1098, 1107, 1155, 1266, 1471, 1799,
- 2277, 2945, 3072, 3072,
- }}, {{
- 1431, 1412, 1403, 1379, 1343, 1293, 1229, 1180, 1125, 1075,
- 1040, 1014, 996, 979, 965, 957, 951, 948, 947, 957,
- 951, 940, 924, 903, 877, 846, 815, 785, 753, 725,
- 702, 686, 681, 689, 714, 760, 847, 947, 1028, 1083,
- 1108, 1109, 1101, 1100, 1132, 1222, 1402, 1705, 2160, 2803,
- }, {
- 1431, 1412, 1401, 1375, 1336, 1278, 1215, 1168, 1115, 1066,
- 1032, 1008, 991, 975, 962, 954, 950, 947, 947, 955,
- 948, 935, 916, 894, 866, 835, 803, 772, 742, 715,
- 695, 683, 683, 697, 729, 784, 887, 982, 1054, 1096,
- 1111, 1106, 1098, 1107, 1159, 1281, 1505, 1865, 2391, 3072,
- }, {
- 1427, 1411, 1393, 1353, 1293, 1215, 1160, 1118, 1072, 1031,
- 1003, 984, 971, 960, 952, 948, 947, 957, 952, 941,
- 924, 902, 876, 847, 815, 781, 750, 723, 700, 685,
- 681, 691, 719, 766, 858, 958, 1039, 1089, 1109, 1108,
- 1099, 1102, 1141, 1245, 1442, 1766, 2250, 2930, 3072, 3072,
- }}
-};
-
-static const int16_t lwc_gain_tab[11][7] = {
- { -21, -197, -271, -466, 32767, 32767, 32767 },
- { -197, -29, -244, -271, -540, 32767, 32767 },
- { -271, -244, -29, -249, -271, -593, 32767 },
- { -466, -271, -249, -29, -251, -271, -632 },
- { -540, -271, -251, -29, -251, -271, -664 },
- { -593, -271, -251, -29, -252, -271, -690 },
- { -632, -271, -252, -29, -252, -271, -711 },
- { -664, -271, -252, -29, -252, -271, -730 },
- { -690, -271, -252, -29, -252, -271, -745 },
- { -711, -271, -252, -29, -253, -271, -759 },
- { -730, -271, -253, -29, -253, -271, -771 },
-};
-
-static const int16_t lwc_adj_tab[7] = {
- -192, -320, -448, -512, -448, -320, -192,
-};
-
-static const uint8_t log_add_tab[212] = {
- 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50,
- 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38,
- 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28,
- 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21,
- 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15, 15,
- 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11,
- 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
- 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5,
- 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 0, 0,
-};
-
-static const uint8_t bap_tab[64] = {
- 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4,
- 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
- 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
- 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15,
-};
-
-static float mantissa_tab1[17][4];
-static float mantissa_tab2[17][4];
-static float mantissa_tab3[17][4];
-static float exponent_tab[50];
-static float gain_tab[1024];
-
-DECLARE_ALIGNED(32, static float, window)[3712];
-
static int skip_input(DBEContext *s, int nb_words)
{
if (nb_words > s->input_size) {
@@ -616,7 +43,7 @@
static int parse_key(DBEContext *s)
{
if (s->key_present) {
- const uint8_t *key = s->input;
+ uint8_t *key = s->input;
int ret = skip_input(s, 1);
if (ret < 0)
return ret;
@@ -625,11 +52,105 @@
return 0;
}
-static int parse_metadata_ext(DBEDecodeContext *s1)
+static int convert_input(DBEContext *s, int nb_words, int key)
{
- DBEContext *s = &s1->dectx;
- if (s->metadata.mtd_ext_size)
- return skip_input(s, s->key_present + s->metadata.mtd_ext_size + 1);
+ uint8_t *src = s->input;
+ uint8_t *dst = s->buffer;
+ PutBitContext pb;
+ int i;
+
+ av_assert0(nb_words <= 1024u);
+
+ if (nb_words > s->input_size) {
+ av_log(s->avctx, AV_LOG_ERROR, "Packet too short\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ switch (s->word_bits) {
+ case 16:
+ for (i = 0; i < nb_words; i++, src += 2, dst += 2)
+ AV_WB16(dst, AV_RB16(src) ^ key);
+ break;
+ case 20:
+ init_put_bits(&pb, s->buffer, sizeof(s->buffer));
+ for (i = 0; i < nb_words; i++, src += 3)
+ put_bits(&pb, 20, AV_RB24(src) >> 4 ^ key);
+ flush_put_bits(&pb);
+ break;
+ case 24:
+ for (i = 0; i < nb_words; i++, src += 3, dst += 3)
+ AV_WB24(dst, AV_RB24(src) ^ key);
+ break;
+ default:
+ av_assert0(0);
+ }
+
+ return init_get_bits(&s->gb, s->buffer, nb_words * s->word_bits);
+}
+
+static int parse_metadata(DBEContext *s)
+{
+ int i, ret, key, mtd_size;
+
+ if ((key = parse_key(s)) < 0)
+ return key;
+ if ((ret = convert_input(s, 1, key)) < 0)
+ return ret;
+
+ skip_bits(&s->gb, 4);
+ mtd_size = get_bits(&s->gb, 10);
+ if (!mtd_size) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid metadata size\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ if ((ret = convert_input(s, mtd_size, key)) < 0)
+ return ret;
+
+ skip_bits(&s->gb, 14);
+ s->prog_conf = get_bits(&s->gb, 6);
+ if (s->prog_conf > MAX_PROG_CONF) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid program configuration\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ s->nb_channels = nb_channels_tab[s->prog_conf];
+ s->nb_programs = nb_programs_tab[s->prog_conf];
+
+ s->fr_code = get_bits(&s->gb, 4);
+ s->fr_code_orig = get_bits(&s->gb, 4);
+ if (!sample_rate_tab[s->fr_code] ||
+ !sample_rate_tab[s->fr_code_orig]) {
+ av_log(s->avctx, AV_LOG_ERROR, "Invalid frame rate code\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ skip_bits_long(&s->gb, 88);
+ for (i = 0; i < s->nb_channels; i++)
+ s->ch_size[i] = get_bits(&s->gb, 10);
+ s->mtd_ext_size = get_bits(&s->gb, 8);
+ s->meter_size = get_bits(&s->gb, 8);
+
+ skip_bits_long(&s->gb, 10 * s->nb_programs);
+ for (i = 0; i < s->nb_channels; i++) {
+ s->rev_id[i] = get_bits(&s->gb, 4);
+ skip_bits1(&s->gb);
+ s->begin_gain[i] = get_bits(&s->gb, 10);
+ s->end_gain[i] = get_bits(&s->gb, 10);
+ }
+
+ if (get_bits_left(&s->gb) < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Read past end of metadata\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ return skip_input(s, mtd_size + 1);
+}
+
+static int parse_metadata_ext(DBEContext *s)
+{
+ if (s->mtd_ext_size)
+ return skip_input(s, s->key_present + s->mtd_ext_size + 1);
return 0;
}
@@ -757,9 +278,8 @@
}
}
-static int parse_bit_alloc(DBEDecodeContext *s1, DBEChannel *c)
+static int parse_bit_alloc(DBEContext *s, DBEChannel *c)
{
- DBEContext *s = &s1->dectx;
DBEGroup *p, *g;
int bap_strategy[MAX_GROUPS], fg_spc[MAX_GROUPS];
int fg_ofs[MAX_GROUPS], msk_mod[MAX_GROUPS];
@@ -791,7 +311,7 @@
for (i = 0, p = NULL, g = c->groups; i < c->nb_groups; i++, p = g, g++) {
if (c->exp_strategy[i] || bap_strategy[i]) {
- bit_allocate(g->nb_exponent, g->imdct_idx, s->metadata.fr_code,
+ bit_allocate(g->nb_exponent, g->imdct_idx, s->fr_code,
c->exponents + g->exp_ofs, c->bap + g->exp_ofs,
fg_spc[i], fg_ofs[i], msk_mod[i], snr_ofs);
} else {
@@ -891,18 +411,17 @@
return 0;
}
-static int parse_channel(DBEDecodeContext *s1, int ch, int seg_id)
+static int parse_channel(DBEContext *s, int ch, int seg_id)
{
- DBEContext *s = &s1->dectx;
- DBEChannel *c = &s1->channels[seg_id][ch];
+ DBEChannel *c = &s->channels[seg_id][ch];
int i, ret;
- if (s->metadata.rev_id[ch] > 1) {
- avpriv_report_missing_feature(s->avctx, "Encoder revision %d", s->metadata.rev_id[ch]);
+ if (s->rev_id[ch] > 1) {
+ avpriv_report_missing_feature(s->avctx, "Encoder revision %d", s->rev_id[ch]);
return AVERROR_PATCHWELCOME;
}
- if (ch == lfe_channel_tab[s->metadata.prog_conf]) {
+ if (ch == lfe_channel_tab[s->prog_conf]) {
c->gr_code = 3;
c->bw_code = 29;
} else {
@@ -927,7 +446,7 @@
if ((ret = parse_exponents(s, c)) < 0)
return ret;
- if ((ret = parse_bit_alloc(s1, c)) < 0)
+ if ((ret = parse_bit_alloc(s, c)) < 0)
return ret;
if ((ret = parse_indices(s, c)) < 0)
return ret;
@@ -942,45 +461,42 @@
return 0;
}
-static int parse_audio(DBEDecodeContext *s1, int start, int end, int seg_id)
+static int parse_audio(DBEContext *s, int start, int end, int seg_id)
{
- DBEContext *s = &s1->dectx;
int ch, ret, key;
if ((key = parse_key(s)) < 0)
return key;
for (ch = start; ch < end; ch++) {
- if (!s->metadata.ch_size[ch]) {
- s1->channels[seg_id][ch].nb_groups = 0;
+ if (!s->ch_size[ch]) {
+ s->channels[seg_id][ch].nb_groups = 0;
continue;
}
- ret = ff_dolby_e_convert_input(s, s->metadata.ch_size[ch], key);
- if (ret < 0)
+ if ((ret = convert_input(s, s->ch_size[ch], key)) < 0)
return ret;
- if ((ret = parse_channel(s1, ch, seg_id)) < 0) {
- if (s1->avctx->err_recognition & AV_EF_EXPLODE)
+ if ((ret = parse_channel(s, ch, seg_id)) < 0) {
+ if (s->avctx->err_recognition & AV_EF_EXPLODE)
return ret;
- s1->channels[seg_id][ch].nb_groups = 0;
+ s->channels[seg_id][ch].nb_groups = 0;
}
- if ((ret = skip_input(s, s->metadata.ch_size[ch])) < 0)
+ if ((ret = skip_input(s, s->ch_size[ch])) < 0)
return ret;
}
return skip_input(s, 1);
}
-static int parse_meter(DBEDecodeContext *s1)
+static int parse_meter(DBEContext *s)
{
- DBEContext *s = &s1->dectx;
- if (s->metadata.meter_size)
- return skip_input(s, s->key_present + s->metadata.meter_size + 1);
+ if (s->meter_size)
+ return skip_input(s, s->key_present + s->meter_size + 1);
return 0;
}
-static void imdct_calc(DBEDecodeContext *s1, DBEGroup *g, float *result, float *values)
+static void imdct_calc(DBEContext *s, DBEGroup *g, float *result, float *values)
{
- FFTContext *imdct = &s1->imdct[g->imdct_idx];
+ FFTContext *imdct = &s->imdct[g->imdct_idx];
int n = 1 << imdct_bits_tab[g->imdct_idx];
int n2 = n >> 1;
int i;
@@ -1004,7 +520,7 @@
}
}
-static void transform(DBEDecodeContext *s1, DBEChannel *c, float *history, float *output)
+static void transform(DBEContext *s, DBEChannel *c, float *history, float *output)
{
LOCAL_ALIGNED_32(float, buffer, [2048]);
LOCAL_ALIGNED_32(float, result, [1152]);
@@ -1017,8 +533,8 @@
float *dst = result + g->dst_ofs;
float *win = window + g->win_ofs;
- imdct_calc(s1, g, buffer, c->mantissas + g->mnt_ofs);
- s1->fdsp->vector_fmul_add(dst, src, win, dst, g->win_len);
+ imdct_calc(s, g, buffer, c->mantissas + g->mnt_ofs);
+ s->fdsp->vector_fmul_add(dst, src, win, dst, g->win_len);
}
for (i = 0; i < 256; i++)
@@ -1029,7 +545,7 @@
history[i] = result[896 + i];
}
-static void apply_gain(DBEDecodeContext *s, int begin, int end, float *output)
+static void apply_gain(DBEContext *s, int begin, int end, float *output)
{
if (begin == 960 && end == 960)
return;
@@ -1046,17 +562,16 @@
}
}
-static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
+static int filter_frame(DBEContext *s, AVFrame *frame)
{
- const DolbyEHeaderInfo *const metadata = &s->dectx.metadata;
const uint8_t *reorder;
int ch, ret;
- if (metadata->nb_channels == 4)
+ if (s->nb_channels == 4)
reorder = ch_reorder_4;
- else if (metadata->nb_channels == 6)
+ else if (s->nb_channels == 6)
reorder = ch_reorder_6;
- else if (metadata->nb_programs == 1 && !(s->avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE))
+ else if (s->nb_programs == 1 && !(s->avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE))
reorder = ch_reorder_8;
else
reorder = ch_reorder_n;
@@ -1065,11 +580,11 @@
if ((ret = ff_get_buffer(s->avctx, frame, 0)) < 0)
return ret;
- for (ch = 0; ch < metadata->nb_channels; ch++) {
+ for (ch = 0; ch < s->nb_channels; ch++) {
float *output = (float *)frame->extended_data[reorder[ch]];
transform(s, &s->channels[0][ch], s->history[ch], output);
transform(s, &s->channels[1][ch], s->history[ch], output + FRAME_SAMPLES / 2);
- apply_gain(s, metadata->begin_gain[ch], metadata->end_gain[ch], output);
+ apply_gain(s, s->begin_gain[ch], s->end_gain[ch], output);
}
return 0;
@@ -1078,21 +593,39 @@
static int dolby_e_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
- DBEDecodeContext *s1 = avctx->priv_data;
- DBEContext *s = &s1->dectx;
- int i, j, ret;
+ DBEContext *s = avctx->priv_data;
+ int i, j, hdr, ret;
- if ((ret = ff_dolby_e_parse_header(s, avpkt->data, avpkt->size)) < 0)
- return ret;
+ if (avpkt->size < 3)
+ return AVERROR_INVALIDDATA;
- if (s->metadata.nb_programs > 1 && !s->metadata.multi_prog_warned) {
- av_log(avctx, AV_LOG_WARNING, "Stream has %d programs (configuration %d), "
- "channels will be output in native order.\n",
- s->metadata.nb_programs, s->metadata.prog_conf);
- s->metadata.multi_prog_warned = 1;
+ hdr = AV_RB24(avpkt->data);
+ if ((hdr & 0xfffffe) == 0x7888e) {
+ s->word_bits = 24;
+ } else if ((hdr & 0xffffe0) == 0x788e0) {
+ s->word_bits = 20;
+ } else if ((hdr & 0xfffe00) == 0x78e00) {
+ s->word_bits = 16;
+ } else {
+ av_log(avctx, AV_LOG_ERROR, "Invalid frame header\n");
+ return AVERROR_INVALIDDATA;
}
- switch (s->metadata.nb_channels) {
+ s->word_bytes = s->word_bits + 7 >> 3;
+ s->input = avpkt->data + s->word_bytes;
+ s->input_size = avpkt->size / s->word_bytes - 1;
+ s->key_present = hdr >> 24 - s->word_bits & 1;
+
+ if ((ret = parse_metadata(s)) < 0)
+ return ret;
+
+ if (s->nb_programs > 1 && !s->multi_prog_warned) {
+ av_log(avctx, AV_LOG_WARNING, "Stream has %d programs (configuration %d), "
+ "channels will be output in native order.\n", s->nb_programs, s->prog_conf);
+ s->multi_prog_warned = 1;
+ }
+
+ switch (s->nb_channels) {
case 4:
avctx->channel_layout = AV_CH_LAYOUT_4POINT0;
break;
@@ -1104,25 +637,25 @@
break;
}
- avctx->channels = s->metadata.nb_channels;
- avctx->sample_rate = s->metadata.sample_rate;
+ avctx->channels = s->nb_channels;
+ avctx->sample_rate = sample_rate_tab[s->fr_code];
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
- i = s->metadata.nb_channels / 2;
- j = s->metadata.nb_channels;
- if ((ret = parse_audio(s1, 0, i, 0)) < 0)
+ i = s->nb_channels / 2;
+ j = s->nb_channels;
+ if ((ret = parse_audio(s, 0, i, 0)) < 0)
return ret;
- if ((ret = parse_audio(s1, i, j, 0)) < 0)
+ if ((ret = parse_audio(s, i, j, 0)) < 0)
return ret;
- if ((ret = parse_metadata_ext(s1)) < 0)
+ if ((ret = parse_metadata_ext(s)) < 0)
return ret;
- if ((ret = parse_audio(s1, 0, i, 1)) < 0)
+ if ((ret = parse_audio(s, 0, i, 1)) < 0)
return ret;
- if ((ret = parse_audio(s1, i, j, 1)) < 0)
+ if ((ret = parse_audio(s, i, j, 1)) < 0)
return ret;
- if ((ret = parse_meter(s1)) < 0)
+ if ((ret = parse_meter(s)) < 0)
return ret;
- if ((ret = filter_frame(s1, data)) < 0)
+ if ((ret = filter_frame(s, data)) < 0)
return ret;
*got_frame_ptr = 1;
@@ -1131,14 +664,14 @@
static av_cold void dolby_e_flush(AVCodecContext *avctx)
{
- DBEDecodeContext *s = avctx->priv_data;
+ DBEContext *s = avctx->priv_data;
memset(s->history, 0, sizeof(s->history));
}
static av_cold int dolby_e_close(AVCodecContext *avctx)
{
- DBEDecodeContext *s = avctx->priv_data;
+ DBEContext *s = avctx->priv_data;
int i;
for (i = 0; i < 3; i++)
@@ -1238,7 +771,7 @@
static av_cold int dolby_e_init(AVCodecContext *avctx)
{
static AVOnce init_once = AV_ONCE_INIT;
- DBEDecodeContext *s = avctx->priv_data;
+ DBEContext *s = avctx->priv_data;
int i;
if (ff_thread_once(&init_once, init_tables))
@@ -1251,8 +784,8 @@
if (!(s->fdsp = avpriv_float_dsp_alloc(0)))
return AVERROR(ENOMEM);
- s->dectx.metadata.multi_prog_warned = !!(avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE);
- s->dectx.avctx = s->avctx = avctx;
+ s->multi_prog_warned = !!(avctx->request_channel_layout & AV_CH_LAYOUT_NATIVE);
+ s->avctx = avctx;
return 0;
}
@@ -1261,7 +794,7 @@
.long_name = NULL_IF_CONFIG_SMALL("Dolby E"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_DOLBY_E,
- .priv_data_size = sizeof(DBEDecodeContext),
+ .priv_data_size = sizeof(DBEContext),
.init = dolby_e_init,
.decode = dolby_e_decode_frame,
.close = dolby_e_close,
diff --git a/libavcodec/dolby_e.h b/libavcodec/dolby_e.h
index 9f0c065..ae04bf6 100644
--- a/libavcodec/dolby_e.h
+++ b/libavcodec/dolby_e.h
@@ -21,23 +21,70 @@
#ifndef AVCODEC_DOLBY_E_H
#define AVCODEC_DOLBY_E_H
-#include <stdint.h>
+#include "libavutil/float_dsp.h"
+#include "libavutil/libm.h"
+#include "libavutil/mem.h"
+
+#include "internal.h"
#include "get_bits.h"
+#include "kbdwin.h"
+#include "fft.h"
#define FRAME_SAMPLES 1792
#define MAX_PROG_CONF 23
#define MAX_PROGRAMS 8
#define MAX_CHANNELS 8
+#define MAX_SEGMENTS 2
-/**
- * @struct DolbyEHeaderInfo
- * Coded Dolby E header values up to end_gain element, plus derived values.
- */
-typedef struct DolbyEHeaderInfo {
- /** @name Coded elements
- * @{
- */
+#define MAX_GROUPS 8
+#define MAX_EXPONENTS 304
+#define MAX_MANTISSAS 1024
+
+#define MAX_MSTR_EXP 2
+#define MAX_BIAS_EXP 50
+
+typedef struct DBEGroup {
+ uint8_t nb_exponent;
+ uint8_t nb_bias_exp[MAX_MSTR_EXP];
+ uint16_t exp_ofs;
+ uint16_t mnt_ofs;
+ const uint8_t *nb_mantissa;
+ uint8_t imdct_idx;
+ uint8_t imdct_phs;
+ uint16_t win_len;
+ uint16_t dst_ofs;
+ uint16_t win_ofs;
+ uint16_t src_ofs;
+} DBEGroup;
+
+typedef struct DBEChannel {
+ int gr_code;
+ int bw_code;
+
+ int nb_groups;
+ int nb_mstr_exp;
+ DBEGroup groups[MAX_GROUPS];
+
+ int exp_strategy[MAX_GROUPS];
+ int exponents[MAX_EXPONENTS];
+ int bap[MAX_EXPONENTS];
+ int idx[MAX_EXPONENTS];
+
+ DECLARE_ALIGNED(32, float, mantissas)[MAX_MANTISSAS];
+} DBEChannel;
+
+typedef struct DBEContext {
+ AVCodecContext *avctx;
+ GetBitContext gb;
+
+ uint8_t *input;
+ int input_size;
+
+ int word_bits;
+ int word_bytes;
+ int key_present;
+
int prog_conf;
int nb_channels;
int nb_programs;
@@ -52,52 +99,549 @@
int rev_id[MAX_CHANNELS];
int begin_gain[MAX_CHANNELS];
int end_gain[MAX_CHANNELS];
- /** @} */
- /** @name Derived values
- * @{
- */
int multi_prog_warned;
- int sample_rate;
- /** @} */
-} DolbyEHeaderInfo;
+ DBEChannel channels[MAX_SEGMENTS][MAX_CHANNELS];
-/**
- * @struct DBEContext
- * Dolby E reading context used by decoder and parser.
- */
-typedef struct DBEContext {
- void *avctx;
- GetBitContext gb;
+ DECLARE_ALIGNED(32, float, history)[MAX_CHANNELS][256];
- const uint8_t *input;
- int input_size;
-
- int word_bits;
- int word_bytes;
- int key_present;
-
- DolbyEHeaderInfo metadata;
+ FFTContext imdct[3];
+ AVFloatDSPContext *fdsp;
uint8_t buffer[1024 * 3 + AV_INPUT_BUFFER_PADDING_SIZE];
} DBEContext;
-/**
- * Use the provided key to transform the input into data (put into s->buffer)
- * suitable for further processing and initialize s->gb to read said data.
- */
-int ff_dolby_e_convert_input(DBEContext *s, int nb_words, int key);
+static const uint8_t nb_programs_tab[MAX_PROG_CONF + 1] = {
+ 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1
+};
-/**
- * Initialize DBEContext and parse Dolby E metadata.
- * Set word_bits/word_bytes, input, input_size, key_present
- * and parse the header up to the end_gain element.
- * @param[out] s DBEContext.
- * @param[in] buf raw input buffer.
- * @param[in] buf_size must be 3 bytes at least.
- * @return Returns 0 on success, AVERROR_INVALIDDATA on error
- */
-int ff_dolby_e_parse_header(DBEContext *s, const uint8_t *buf, int buf_size);
+static const uint8_t nb_channels_tab[MAX_PROG_CONF + 1] = {
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
+};
+
+static const int8_t lfe_channel_tab[MAX_PROG_CONF + 1] = {
+ 5, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 5
+};
+
+static const uint8_t ch_reorder_4[4] = { 0, 2, 1, 3 };
+static const uint8_t ch_reorder_6[6] = { 0, 2, 4, 1, 3, 5 };
+static const uint8_t ch_reorder_8[8] = { 0, 2, 6, 4, 1, 3, 7, 5 };
+static const uint8_t ch_reorder_n[8] = { 0, 2, 4, 6, 1, 3, 5, 7 };
+
+static const uint16_t sample_rate_tab[16] = {
+ 0, 42965, 43008, 44800, 53706, 53760
+};
+
+static const uint8_t nb_groups_tab[4] = { 1, 8, 7, 1 };
+
+static const uint8_t nb_mstr_exp_tab[4] = { 2, 2, 2, 1 };
+
+static const uint8_t nb_mantissa_38[38] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 6, 6,
+ 7, 8, 9, 10, 11, 12,
+};
+
+static const uint8_t nb_mantissa_44[44] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7,
+ 8, 9, 10, 11, 12, 13, 15, 16, 18, 20, 22, 25,
+};
+
+static const uint8_t nb_mantissa_50[50] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3,
+ 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 9, 10, 12, 13, 14, 16,
+ 18, 19, 22, 24, 27, 29, 32, 36, 40, 44, 49, 54, 60, 66, 74, 82,
+ 90, 100,
+};
+
+static const uint8_t imdct_bits_tab[3] = { 8, 9, 11 };
+
+static const DBEGroup grp_tab_0[1] = {
+ { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
+};
+
+static const DBEGroup grp_tab_1[8] = {
+ { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
+ { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
+ { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
+ { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
+ { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
+ { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
+ { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 704, 0, 0 },
+ { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 1, 256, 832, 0, 0 },
+};
+
+static const DBEGroup grp_tab_2[7] = {
+ { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 0, 192, 0, 256, 0 },
+ { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 64, 448, 0 },
+ { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 192, 704, 0 },
+ { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
+ { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
+ { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
+ { 44, { 19, 25 }, 228, 768, nb_mantissa_44, 1, 1, 448, 704, 960, 64 },
+};
+
+static const DBEGroup grp_tab_3[1] = {
+ { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 0, 1152, 0, 1408, 0 },
+};
+
+static const DBEGroup grp_tab_4[1] = {
+ { 50, { 27, 23 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
+};
+
+static const DBEGroup grp_tab_5[8] = {
+ { 38, { 12, 26 }, 0, 0, nb_mantissa_38, 0, 1, 256, 64, 0, 0 },
+ { 38, { 12, 26 }, 38, 128, nb_mantissa_38, 0, 1, 256, 192, 0, 0 },
+ { 38, { 12, 26 }, 76, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
+ { 38, { 12, 26 }, 114, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
+ { 38, { 12, 26 }, 152, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
+ { 38, { 12, 26 }, 190, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
+ { 38, { 12, 26 }, 228, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
+ { 38, { 12, 26 }, 266, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
+};
+
+static const DBEGroup grp_tab_6[7] = {
+ { 44, { 19, 25 }, 0, 0, nb_mantissa_44, 1, 1, 448, 0, 3264, 0 },
+ { 38, { 12, 26 }, 44, 256, nb_mantissa_38, 0, 1, 256, 320, 0, 0 },
+ { 38, { 12, 26 }, 82, 384, nb_mantissa_38, 0, 1, 256, 448, 0, 0 },
+ { 38, { 12, 26 }, 120, 512, nb_mantissa_38, 0, 1, 256, 576, 0, 0 },
+ { 38, { 12, 26 }, 158, 640, nb_mantissa_38, 0, 1, 256, 704, 3008, 0 },
+ { 38, { 12, 26 }, 196, 768, nb_mantissa_38, 0, 1, 256, 832, 2752, 0 },
+ { 38, { 12, 26 }, 234, 896, nb_mantissa_38, 0, 2, 192, 960, 2560, 64 },
+};
+
+static const DBEGroup grp_tab_7[1] = {
+ { 21, { 21 }, 0, 0, nb_mantissa_50, 2, 2, 1152, 0, 1408, 896 },
+};
+
+static const DBEGroup *const frm_ofs_tab[2][4] = {
+ { grp_tab_0, grp_tab_1, grp_tab_2, grp_tab_3 },
+ { grp_tab_4, grp_tab_5, grp_tab_6, grp_tab_7 }
+};
+
+static const uint8_t mantissa_size1[16][4] = {
+ { 0, 0, 0, 0 }, { 2, 1, 1, 1 }, { 3, 2, 1, 1 }, { 4, 3, 2, 1 },
+ { 5, 4, 3, 2 }, { 6, 5, 4, 3 }, { 7, 6, 5, 4 }, { 8, 7, 6, 5 },
+ { 9, 8, 7, 6 }, { 10, 9, 8, 7 }, { 11, 10, 9, 8 }, { 12, 11, 10, 9 },
+ { 13, 12, 11, 10 }, { 14, 13, 12, 11 }, { 15, 14, 13, 12 }, { 16, 15, 14, 13 },
+};
+
+static const uint8_t mantissa_size2[16][4] = {
+ { 0, 0, 0, 0 }, { 2, 1, 2, 2 }, { 3, 2, 3, 3 }, { 4, 3, 4, 4 },
+ { 5, 4, 5, 5 }, { 6, 5, 6, 6 }, { 7, 6, 7, 7 }, { 8, 7, 8, 8 },
+ { 9, 8, 9, 9 }, { 10, 9, 10, 10 }, { 11, 10, 11, 11 }, { 12, 11, 12, 12 },
+ { 13, 12, 13, 13 }, { 14, 13, 14, 14 }, { 15, 14, 15, 15 }, { 16, 15, 16, 16 },
+};
+
+static const float start_window[192] = {
+ 0.00161569379826, 0.00185748233347, 0.00198562758548, 0.00207834078104,
+ 0.00215717748523, 0.00223067096393, 0.00230299213147, 0.00237651215396,
+ 0.00245275561606, 0.00253281402069, 0.00261754673613, 0.00270768786168,
+ 0.00280390761895, 0.00290684998656, 0.00301715751161, 0.00313548872798,
+ 0.00326253122934, 0.00339901215995, 0.00354570716636, 0.00370344845023,
+ 0.00387313232586, 0.00405572653911, 0.00425227750970, 0.00446391759265,
+ 0.00469187240551, 0.00493746822816, 0.00520213944619, 0.00548743597507,
+ 0.00579503056737, 0.00612672586953, 0.00648446105606, 0.00687031782873,
+ 0.00728652552677, 0.00773546505205, 0.00821967127415, 0.00874183354619,
+ 0.00930479393832, 0.00991154278653, 0.01056521116692, 0.01126905994567,
+ 0.01202646513050, 0.01284089936559, 0.01371590957417, 0.01465509096066,
+ 0.01566205783408, 0.01674041199523, 0.01789370972358, 0.01912542867865,
+ 0.02043893626265, 0.02183746113793, 0.02332406961796, 0.02490164852364,
+ 0.02657289580178, 0.02834031974193, 0.03020624702903, 0.03217283918354,
+ 0.03424211623810, 0.03641598586180, 0.03869627565015, 0.04108476601498,
+ 0.04358322107390, 0.04619341515939, 0.04891715301882, 0.05175628239149,
+
+ 0.05471237327267, 0.05778734733755, 0.06098291402413, 0.06430101352084,
+ 0.06774345212186, 0.07131188644726, 0.07500780649199, 0.07883251748595,
+ 0.08278712056651, 0.08687249228061, 0.09108926295730, 0.09543779401074,
+ 0.09991815425851, 0.10453009536427, 0.10927302653894, 0.11414598865987,
+ 0.11914762799220, 0.12427616972097, 0.12952939152560, 0.13490459744934,
+ 0.14039859233595, 0.14600765712201, 0.15172752528722, 0.15755336077528,
+ 0.16347973770491, 0.16950062219342, 0.17560935661442, 0.18179864660619,
+ 0.18806055113821, 0.19438647593012, 0.20076717050010, 0.20719272909882,
+ 0.21365259576030, 0.22013557367283, 0.22662983904194, 0.23312295958328,
+ 0.23960191774666, 0.24605313873388, 0.25246252333253, 0.25881548554631,
+ 0.26509699495987, 0.27129162373316, 0.27738359807707, 0.28335685401987,
+ 0.28919509723179, 0.29488186663467, 0.30040060148455, 0.30573471157819,
+ 0.31086765019993, 0.31578298939317, 0.32046449711227, 0.32489621578468,
+ 0.32906254179156, 0.33294830535654, 0.33653885031840, 0.33982011325336,
+ 0.34277870140679, 0.34540196889300, 0.34767809062480, 0.34959613344194,
+ 0.35114612391958, 0.35231911235422, 0.35310723244504, 0.35350375621308,
+
+ 0.35350314372945, 0.35310108725579, 0.35229454943591, 0.35108179521634,
+ 0.34946241721522, 0.34743735430290, 0.34500890320420, 0.34218072298001,
+ 0.33895783229541, 0.33534659943168, 0.33135472505060, 0.32699121776996,
+ 0.32226636266000, 0.31719168282019, 0.31177989424432, 0.30604485422875,
+ 0.30000150362379, 0.29366580327088, 0.28705466500775, 0.28018587766131,
+ 0.27307802848095, 0.26575042049535, 0.25822298630189, 0.25051619882000,
+ 0.24265097955783, 0.23464860495522, 0.22653061137548, 0.21831869932335,
+ 0.21003463746705, 0.20170016703857, 0.19333690717811, 0.18496626177620,
+ 0.17660932835062, 0.16828680947474, 0.16001892724986, 0.15182534128597,
+ 0.14372507062477, 0.13573642000364, 0.12787691082233, 0.12016321713317,
+ 0.11261110693234, 0.10523538898282, 0.09804986534955, 0.09106728977263,
+ 0.08429933194438, 0.07775654768810, 0.07144835495683, 0.06538301547324,
+ 0.05956762170687, 0.05400808871425, 0.04870915012107, 0.04367435714993,
+ 0.03890607899172, 0.03440550179663, 0.03017262174627, 0.02620622428513,
+ 0.02250383492507, 0.01906161305732, 0.01587412848221, 0.01293388032354,
+ 0.01023019677288, 0.00774641320626, 0.00545109736891, 0.00325868651263,
+};
+
+static const float short_window2[192] = {
+ 0.00018861094606, 0.00033433010202, 0.00050309624485, 0.00070306161748,
+ 0.00093995174533, 0.00121913067128, 0.00154606505568, 0.00192647806126,
+ 0.00236641248692, 0.00287225985240, 0.00345077377440, 0.00410907465023,
+ 0.00485464855241, 0.00569534163219, 0.00663935063508, 0.00769520981249,
+ 0.00887177436246, 0.01017820046395, 0.01162392194150, 0.01321862359335,
+ 0.01497221122468, 0.01689477844427, 0.01899657030441, 0.02128794388846,
+ 0.02377932597692, 0.02648116795039, 0.02940389811590, 0.03255787167130,
+ 0.03595331854986, 0.03960028941437, 0.04350860009563, 0.04768777479454,
+ 0.05214698838949, 0.05689500821121, 0.06194013566525, 0.06729014809766,
+ 0.07295224131210, 0.07893297315602, 0.08523820859989, 0.09187306673620,
+ 0.09884187012422, 0.10614809690222, 0.11379433608064, 0.12178224641797,
+ 0.13011251926531, 0.13878484574660, 0.14779788861830, 0.15714925912610,
+ 0.16683549914631, 0.17685206886673, 0.18719334022589, 0.19785259629099,
+ 0.20882203671372, 0.22009278936030, 0.23165492816694, 0.24349749722585,
+ 0.25560854105961, 0.26797514099368, 0.28058345748882, 0.29341877824732,
+ 0.30646557185942, 0.31970754671026, 0.33312771482295, 0.34670846027024,
+
+ 0.36043161174692, 0.37427851885723, 0.38823013163645, 0.40226708279486,
+ 0.41636977214436, 0.43051845264462, 0.44469331748632, 0.45887458761470,
+ 0.47304259908636, 0.48717788964798, 0.50126128392546, 0.51527397661778,
+ 0.52919761310050, 0.54301436685998, 0.55670701320069, 0.57025899869448,
+ 0.58365450587230, 0.59687851269542, 0.60991684638414, 0.62275623122793,
+ 0.63538433005035, 0.64778977905593, 0.65996221584264, 0.67189230042379,
+ 0.68357172916486, 0.69499324160511, 0.70615062019861, 0.71703868307548,
+ 0.72765326998919, 0.73799122168099, 0.74805035295521, 0.75782941981995,
+ 0.76732808110520, 0.77654685502339, 0.78548707118622, 0.79415081863423,
+ 0.80254089047207, 0.81066072573188, 0.81851434910893, 0.82610630922734,
+ 0.83344161609862, 0.84052567843230, 0.84736424144524, 0.85396332579459,
+ 0.86032916822973, 0.86646816451999, 0.87238681516918, 0.87809167437532,
+ 0.88358930263537, 0.88888622333073, 0.89398888356256, 0.89890361943564,
+ 0.90363662591861, 0.90819393133744, 0.91258137648979, 0.91680459830070,
+ 0.92086901787718, 0.92477983276087, 0.92854201312583, 0.93216030163834,
+ 0.93563921662343, 0.93898305819384, 0.94219591693690, 0.94528168477979,
+
+ 0.94823843319821, 0.95106834367330, 0.95377776558539, 0.95636718335775,
+ 0.95883679961479, 0.96118650212341, 0.96341583179195, 0.96552395212906,
+ 0.96750962060547, 0.96937116231768, 0.97110644638309, 0.97271286544154,
+ 0.97418731862798, 0.97552619834964, 0.97672538116257, 0.97778022299974,
+ 0.97868555895586, 0.97943570778357, 0.98002448120255, 0.98044519806866,
+ 0.98069070339493, 0.98075339216123, 0.98062523779637, 0.98029782516478,
+ 0.97976238784222, 0.97900984942031, 0.97803086854002, 0.97681588731895,
+ 0.97535518280755, 0.97363892108474, 0.97165721358452, 0.96940017523145,
+ 0.96685798395452, 0.96402094114589, 0.96087953263194, 0.95742448973047,
+ 0.95364684997699, 0.94953801711660, 0.94508981997396, 0.94029456983253,
+ 0.93514511597504, 0.92963489905951, 0.92375800202883, 0.91750919827624,
+ 0.91088399681406, 0.90387868421832, 0.89649036314692, 0.88871698725397,
+ 0.88055739234735, 0.87201132366062, 0.86307945913336, 0.85376342861693,
+ 0.84406582894455, 0.83399023482637, 0.82354120554757, 0.81272428745995,
+ 0.80154601230457, 0.79001389138101, 0.77813640562199, 0.76592299164227,
+ 0.75338402384395, 0.74053079267526, 0.72737547915460, 0.71393112578527,
+};
+
+static const float short_window3[64] = {
+ 0.00326887936450, 0.00550242900936, 0.00786846643791, 0.01045683453520,
+ 0.01330402120132, 0.01643221072863, 0.01985798040609, 0.02359509464766,
+ 0.02765559221954, 0.03205025893128, 0.03678884369614, 0.04188015679495,
+ 0.04733210987781, 0.05315172583924, 0.05934513287609, 0.06591755045290,
+ 0.07287327156378, 0.08021564389822, 0.08794705152307, 0.09606889811179,
+ 0.10458159240070, 0.11348453632940, 0.12277611617809, 0.13245369691511,
+ 0.14251361989876, 0.15295120402567, 0.16376075037904, 0.17493555039885,
+ 0.18646789757072, 0.19834910260891, 0.21056951208995, 0.22311853047787,
+ 0.23598464546683, 0.24915545655419, 0.26261770674500, 0.27635731727778,
+ 0.29035942525136, 0.30460842402318, 0.31908800624032, 0.33378120935681,
+ 0.34867046348260, 0.36373764140285, 0.37896411059909, 0.39433078709788,
+ 0.40981819096657, 0.42540650327031, 0.44107562429959, 0.45680523287270,
+ 0.47257484651351, 0.48836388230077, 0.50415171818214, 0.51991775454258,
+ 0.53564147581496, 0.55130251191887, 0.56688069931047, 0.58235614142007,
+ 0.59770926827271, 0.61292089506118, 0.62797227945823, 0.64284517745255,
+ 0.65752189749349, 0.67198535273209, 0.68621911114984, 0.70020744337099,
+};
+
+static const uint8_t dc_code_tab[5] = { 0, 0, 0, 1, 1 };
+
+static const uint8_t ht_code_tab[5] = { 0, 0, 1, 2, 2 };
+
+static const uint8_t band_ofs_tab[3][4] = {
+ { 12, 8, 4, 0 }, { 14, 10, 6, 0 }, { 12, 8, 4, 0 }
+};
+
+static const uint8_t band_low_tab[3] = { 9, 17, 24 };
+
+static const uint16_t fast_gain_tab[8] = {
+ 128, 256, 384, 512, 640, 768, 896, 1024
+};
+
+static const uint16_t slow_decay_tab[2][2] = { { 27, -1 }, { 32, 21 } };
+
+static const uint16_t misc_decay_tab[3][2][2] = {
+ { { 354, -1 }, { 425, 425 } },
+ { { 266, -1 }, { 320, -1 } },
+ { { 213, -1 }, { 256, -1 } }
+};
+
+static const uint16_t fast_decay_tab[3][2][2][50] = {
+ {{{
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ }}, {{
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170,
+ }, {
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+ 64, 64, 64, 64, 64, 64, 64, 64,
+ }}}, {{{
+ 266, 266, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ }}, {{
+ 319, 319, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ }}}, {{{
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ }}, {{
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ }}}
+};
+
+static const uint16_t fast_gain_adj_tab[3][2][62] = {
+ {{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 2, 4, 7, 11, 16, 29, 44, 59,
+ 76, 94, 116, 142, 179, 221, 252, 285, 312, 334,
+ }, {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 5, 8, 10, 15, 28, 42, 57, 75, 93,
+ 115, 140, 177, 219, 247, 280, 308, 330, 427, 533,
+ }}, {{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2, 5, 8, 12, 21, 35, 51, 69, 89,
+ 111, 138, 176, 220, 251, 284, 312, 334,
+ }, {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,
+ 5, 8, 11, 18, 33, 49, 65, 84, 106, 132,
+ 168, 214, 245, 279, 308, 329, 427, 533,
+ }}, {{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1, 4, 7, 10, 17,
+ 31, 47, 65, 84, 107, 134, 171, 215, 250, 283,
+ 312, 334,
+ }, {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 6, 9, 13, 27, 43,
+ 60, 79, 100, 126, 160, 207, 242, 276, 307, 329,
+ 427, 533,
+ }}
+};
+
+static const uint16_t slow_gain_tab[3][2][50] = {
+ {{
+ 3072, 3072, 3072, 3072, 3072, 3072, 1063, 1063, 1063, 1063,
+ 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
+ 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
+ 1063, 1063, 1063, 1063, 1063, 1063, 1063, 1063,
+ }, {
+ 3072, 3072, 3072, 3072, 3072, 3072, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
+ 850, 850, 850, 850, 850, 850, 850, 850,
+ }}, {{
+ 3072, 1212, 1212, 1212, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ }}, {{
+ 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072, 3072,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ 999, 999, 999, 999, 999, 999, 999, 999, 999, 999,
+ }, {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ }}
+};
+
+static const uint16_t hearing_thresh_tab[3][3][50] = {
+ {{
+ 1403, 1141, 1000, 959, 948, 957, 946, 925, 899, 871,
+ 843, 815, 789, 766, 745, 727, 705, 687, 681, 686,
+ 701, 725, 768, 854, 940, 1018, 1075, 1103, 1111, 1106,
+ 1098, 1105, 1142, 1237, 1419, 1721, 2169, 2805,
+ }, {
+ 1401, 1130, 995, 957, 947, 955, 941, 918, 890, 861,
+ 831, 803, 777, 754, 734, 717, 698, 684, 682, 692,
+ 712, 743, 798, 894, 976, 1045, 1091, 1109, 1110, 1102,
+ 1098, 1116, 1174, 1300, 1526, 1884, 2401, 3072,
+ }, {
+ 1393, 1086, 974, 949, 957, 941, 913, 878, 843, 808,
+ 777, 750, 727, 708, 695, 686, 681, 689, 714, 752,
+ 811, 888, 971, 1044, 1087, 1108, 1110, 1102, 1098, 1115,
+ 1172, 1290, 1489, 1812, 2293, 2964, 3072, 3072,
+ }}, {{
+ 1412, 1343, 1141, 1047, 1000, 974, 959, 951, 948, 947,
+ 957, 953, 946, 936, 925, 906, 878, 850, 822, 795,
+ 771, 745, 719, 700, 687, 681, 685, 701, 733, 784,
+ 885, 977, 1047, 1092, 1110, 1108, 1099, 1102, 1138, 1233,
+ 1413, 1711, 2157, 2797,
+ }, {
+ 1412, 1336, 1130, 1040, 995, 970, 957, 950, 947, 947,
+ 955, 950, 941, 930, 918, 897, 868, 838, 810, 783,
+ 759, 734, 710, 693, 684, 681, 690, 712, 752, 823,
+ 924, 1009, 1069, 1102, 1111, 1104, 1098, 1111, 1168, 1295,
+ 1518, 1873, 2388, 3072,
+ }, {
+ 1411, 1293, 1086, 1009, 974, 957, 949, 947, 957, 951,
+ 941, 928, 913, 896, 878, 852, 817, 785, 756, 732,
+ 713, 695, 683, 682, 689, 710, 746, 811, 906, 992,
+ 1061, 1099, 1111, 1106, 1098, 1107, 1155, 1266, 1471, 1799,
+ 2277, 2945, 3072, 3072,
+ }}, {{
+ 1431, 1412, 1403, 1379, 1343, 1293, 1229, 1180, 1125, 1075,
+ 1040, 1014, 996, 979, 965, 957, 951, 948, 947, 957,
+ 951, 940, 924, 903, 877, 846, 815, 785, 753, 725,
+ 702, 686, 681, 689, 714, 760, 847, 947, 1028, 1083,
+ 1108, 1109, 1101, 1100, 1132, 1222, 1402, 1705, 2160, 2803,
+ }, {
+ 1431, 1412, 1401, 1375, 1336, 1278, 1215, 1168, 1115, 1066,
+ 1032, 1008, 991, 975, 962, 954, 950, 947, 947, 955,
+ 948, 935, 916, 894, 866, 835, 803, 772, 742, 715,
+ 695, 683, 683, 697, 729, 784, 887, 982, 1054, 1096,
+ 1111, 1106, 1098, 1107, 1159, 1281, 1505, 1865, 2391, 3072,
+ }, {
+ 1427, 1411, 1393, 1353, 1293, 1215, 1160, 1118, 1072, 1031,
+ 1003, 984, 971, 960, 952, 948, 947, 957, 952, 941,
+ 924, 902, 876, 847, 815, 781, 750, 723, 700, 685,
+ 681, 691, 719, 766, 858, 958, 1039, 1089, 1109, 1108,
+ 1099, 1102, 1141, 1245, 1442, 1766, 2250, 2930, 3072, 3072,
+ }}
+};
+
+static const int16_t lwc_gain_tab[11][7] = {
+ { -21, -197, -271, -466, 32767, 32767, 32767 },
+ { -197, -29, -244, -271, -540, 32767, 32767 },
+ { -271, -244, -29, -249, -271, -593, 32767 },
+ { -466, -271, -249, -29, -251, -271, -632 },
+ { -540, -271, -251, -29, -251, -271, -664 },
+ { -593, -271, -251, -29, -252, -271, -690 },
+ { -632, -271, -252, -29, -252, -271, -711 },
+ { -664, -271, -252, -29, -252, -271, -730 },
+ { -690, -271, -252, -29, -252, -271, -745 },
+ { -711, -271, -252, -29, -253, -271, -759 },
+ { -730, -271, -253, -29, -253, -271, -771 },
+};
+
+static const int16_t lwc_adj_tab[7] = {
+ -192, -320, -448, -512, -448, -320, -192,
+};
+
+static const uint8_t log_add_tab[212] = {
+ 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 52, 51, 50,
+ 49, 48, 47, 47, 46, 45, 44, 44, 43, 42, 41, 41, 40, 39, 38, 38,
+ 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 30, 30, 29, 29, 28,
+ 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21,
+ 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16, 16, 15, 15,
+ 15, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11,
+ 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8,
+ 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5,
+ 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 0,
+};
+
+static const uint8_t bap_tab[64] = {
+ 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4,
+ 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
+ 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
+ 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15,
+};
+
+static float mantissa_tab1[17][4];
+static float mantissa_tab2[17][4];
+static float mantissa_tab3[17][4];
+static float exponent_tab[50];
+static float gain_tab[1024];
+
+DECLARE_ALIGNED(32, static float, window)[3712];
#endif
diff --git a/libavcodec/dolby_e_parse.c b/libavcodec/dolby_e_parse.c
deleted file mode 100644
index ffedcd9..0000000
--- a/libavcodec/dolby_e_parse.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) 2017 foo86
- *
- * 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
- */
-
-#include "get_bits.h"
-#include "put_bits.h"
-#include "dolby_e.h"
-
-static const uint8_t nb_programs_tab[MAX_PROG_CONF + 1] = {
- 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 8, 1, 2, 3, 3, 4, 5, 6, 1, 2, 3, 4, 1, 1
-};
-
-static const uint8_t nb_channels_tab[MAX_PROG_CONF + 1] = {
- 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 8, 8
-};
-
-static const uint16_t sample_rate_tab[16] = {
- 0, 42965, 43008, 44800, 53706, 53760
-};
-
-static int skip_input(DBEContext *s, int nb_words)
-{
- if (nb_words > s->input_size) {
- return AVERROR_INVALIDDATA;
- }
-
- s->input += nb_words * s->word_bytes;
- s->input_size -= nb_words;
- return 0;
-}
-
-static int parse_key(DBEContext *s)
-{
- if (s->key_present) {
- const uint8_t *key = s->input;
- int ret = skip_input(s, 1);
- if (ret < 0)
- return ret;
- return AV_RB24(key) >> 24 - s->word_bits;
- }
- return 0;
-}
-
-int ff_dolby_e_convert_input(DBEContext *s, int nb_words, int key)
-{
- const uint8_t *src = s->input;
- uint8_t *dst = s->buffer;
- PutBitContext pb;
- int i;
-
- av_assert0(nb_words <= 1024u);
-
- if (nb_words > s->input_size) {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Packet too short\n");
- return AVERROR_INVALIDDATA;
- }
-
- switch (s->word_bits) {
- case 16:
- for (i = 0; i < nb_words; i++, src += 2, dst += 2)
- AV_WB16(dst, AV_RB16(src) ^ key);
- break;
- case 20:
- init_put_bits(&pb, s->buffer, sizeof(s->buffer));
- for (i = 0; i < nb_words; i++, src += 3)
- put_bits(&pb, 20, AV_RB24(src) >> 4 ^ key);
- flush_put_bits(&pb);
- break;
- case 24:
- for (i = 0; i < nb_words; i++, src += 3, dst += 3)
- AV_WB24(dst, AV_RB24(src) ^ key);
- break;
- default:
- av_assert0(0);
- }
-
- return init_get_bits(&s->gb, s->buffer, nb_words * s->word_bits);
-}
-
-int ff_dolby_e_parse_header(DBEContext *s, const uint8_t *buf, int buf_size)
-{
- DolbyEHeaderInfo *const header = &s->metadata;
- int hdr, ret, key, mtd_size;
-
- if (buf_size < 3)
- return AVERROR_INVALIDDATA;
-
- hdr = AV_RB24(buf);
- if ((hdr & 0xfffffe) == 0x7888e) {
- s->word_bits = 24;
- } else if ((hdr & 0xffffe0) == 0x788e0) {
- s->word_bits = 20;
- } else if ((hdr & 0xfffe00) == 0x78e00) {
- s->word_bits = 16;
- } else {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Invalid frame header\n");
- return AVERROR_INVALIDDATA;
- }
-
- s->word_bytes = s->word_bits + 7 >> 3;
- s->input = buf + s->word_bytes;
- s->input_size = buf_size / s->word_bytes - 1;
- s->key_present = hdr >> 24 - s->word_bits & 1;
-
- if ((key = parse_key(s)) < 0)
- return key;
- if ((ret = ff_dolby_e_convert_input(s, 1, key)) < 0)
- return ret;
-
- skip_bits(&s->gb, 4);
- mtd_size = get_bits(&s->gb, 10);
- if (!mtd_size) {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Invalid metadata size\n");
- return AVERROR_INVALIDDATA;
- }
-
- if ((ret = ff_dolby_e_convert_input(s, mtd_size, key)) < 0)
- return ret;
-
- skip_bits(&s->gb, 14);
- header->prog_conf = get_bits(&s->gb, 6);
- if (header->prog_conf > MAX_PROG_CONF) {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Invalid program configuration\n");
- return AVERROR_INVALIDDATA;
- }
-
- header->nb_channels = nb_channels_tab[header->prog_conf];
- header->nb_programs = nb_programs_tab[header->prog_conf];
-
- header->fr_code = get_bits(&s->gb, 4);
- header->fr_code_orig = get_bits(&s->gb, 4);
- if (!(header->sample_rate = sample_rate_tab[header->fr_code]) ||
- !sample_rate_tab[header->fr_code_orig]) {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Invalid frame rate code\n");
- return AVERROR_INVALIDDATA;
- }
-
- skip_bits_long(&s->gb, 88);
- for (int i = 0; i < header->nb_channels; i++)
- header->ch_size[i] = get_bits(&s->gb, 10);
- header->mtd_ext_size = get_bits(&s->gb, 8);
- header->meter_size = get_bits(&s->gb, 8);
-
- skip_bits_long(&s->gb, 10 * header->nb_programs);
- for (int i = 0; i < header->nb_channels; i++) {
- header->rev_id[i] = get_bits(&s->gb, 4);
- skip_bits1(&s->gb);
- header->begin_gain[i] = get_bits(&s->gb, 10);
- header->end_gain[i] = get_bits(&s->gb, 10);
- }
-
- if (get_bits_left(&s->gb) < 0) {
- if (s->avctx)
- av_log(s->avctx, AV_LOG_ERROR, "Read past end of metadata\n");
- return AVERROR_INVALIDDATA;
- }
-
- return skip_input(s, mtd_size + 1);
-}
diff --git a/libavcodec/dolby_e_parser.c b/libavcodec/dolby_e_parser.c
deleted file mode 100644
index 3ae973b..0000000
--- a/libavcodec/dolby_e_parser.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2017 foo86
- *
- * 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
- */
-
-#include "dolby_e.h"
-#include "get_bits.h"
-#include "put_bits.h"
-
-typedef struct DBEParseContext {
- DBEContext dectx;
-} DBEParseContext;
-
-static int dolby_e_parse(AVCodecParserContext *s2, AVCodecContext *avctx,
- const uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size)
-{
- DBEParseContext *s1 = s2->priv_data;
- DBEContext *s = &s1->dectx;
- int ret;
-
- if ((ret = ff_dolby_e_parse_header(s, buf, buf_size)) < 0)
- goto end;
-
- s2->duration = FRAME_SAMPLES;
- switch (s->metadata.nb_channels) {
- case 4:
- avctx->channel_layout = AV_CH_LAYOUT_4POINT0;
- break;
- case 6:
- avctx->channel_layout = AV_CH_LAYOUT_5POINT1;
- break;
- case 8:
- avctx->channel_layout = AV_CH_LAYOUT_7POINT1;
- break;
- }
-
- avctx->channels = s->metadata.nb_channels;
- avctx->sample_rate = s->metadata.sample_rate;
- avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
-
-end:
- /* always return the full packet. this parser isn't doing any splitting or
- combining, only packet analysis */
- *poutbuf = buf;
- *poutbuf_size = buf_size;
- return buf_size;
-}
-
-AVCodecParser ff_dolby_e_parser = {
- .codec_ids = { AV_CODEC_ID_DOLBY_E },
- .priv_data_size = sizeof(DBEParseContext),
- .parser_parse = dolby_e_parse,
-};
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 5372e3d..b1833ed 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -23,43 +23,10 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/imgutils.h"
-#include "libavutil/timecode.h"
#include "bytestream.h"
#include "avcodec.h"
#include "internal.h"
-enum DPX_TRC {
- DPX_TRC_USER_DEFINED = 0,
- DPX_TRC_PRINTING_DENSITY = 1,
- DPX_TRC_LINEAR = 2,
- DPX_TRC_LOGARITHMIC = 3,
- DPX_TRC_UNSPECIFIED_VIDEO = 4,
- DPX_TRC_SMPTE_274 = 5,
- DPX_TRC_ITU_R_709_4 = 6,
- DPX_TRC_ITU_R_601_625 = 7,
- DPX_TRC_ITU_R_601_525 = 8,
- DPX_TRC_SMPTE_170 = 9,
- DPX_TRC_ITU_R_624_4_PAL = 10,
- DPX_TRC_Z_LINEAR = 11,
- DPX_TRC_Z_HOMOGENEOUS = 12,
-};
-
-enum DPX_COL_SPEC {
- DPX_COL_SPEC_USER_DEFINED = 0,
- DPX_COL_SPEC_PRINTING_DENSITY = 1,
- /* 2 = N/A */
- /* 3 = N/A */
- DPX_COL_SPEC_UNSPECIFIED_VIDEO = 4,
- DPX_COL_SPEC_SMPTE_274 = 5,
- DPX_COL_SPEC_ITU_R_709_4 = 6,
- DPX_COL_SPEC_ITU_R_601_625 = 7,
- DPX_COL_SPEC_ITU_R_601_525 = 8,
- DPX_COL_SPEC_SMPTE_170 = 9,
- DPX_COL_SPEC_ITU_R_624_4_PAL = 10,
- /* 11 = N/A */
- /* 12 = N/A */
-};
-
static unsigned int read16(const uint8_t **ptr, int is_big)
{
unsigned int temp;
@@ -159,15 +126,14 @@
AVFrame *const p = data;
uint8_t *ptr[AV_NUM_DATA_POINTERS];
uint32_t header_version, version = 0;
- char creator[101] = { 0 };
- char input_device[33] = { 0 };
+ char creator[101];
+ char input_device[33];
unsigned int offset;
int magic_num, endian;
- int x, y, stride, i, j, ret;
+ int x, y, stride, i, ret;
int w, h, bits_per_color, descriptor, elements, packing;
- int yuv, color_trc, color_spec;
- int encoding, need_align = 0, unpadded_10bit = 0;
+ int encoding, need_align = 0;
unsigned int rgbBuffer = 0;
int n_datum = 0;
@@ -226,8 +192,6 @@
// Need to end in 0x320 to read the descriptor
buf += 20;
descriptor = buf[0];
- color_trc = buf[1];
- color_spec = buf[2];
// Need to end in 0x323 to read the bits per color
buf += 3;
@@ -252,109 +216,31 @@
else
avctx->sample_aspect_ratio = (AVRational){ 0, 1 };
- /* preferred frame rate from Motion-picture film header */
if (offset >= 1724 + 4) {
buf = avpkt->data + 1724;
i = read32(&buf, endian);
- if(i && i != 0xFFFFFFFF) {
+ if(i) {
AVRational q = av_d2q(av_int2float(i), 4096);
if (q.num > 0 && q.den > 0)
avctx->framerate = q;
}
}
- /* alternative frame rate from television header */
- if (offset >= 1940 + 4 &&
- !(avctx->framerate.num && avctx->framerate.den)) {
- buf = avpkt->data + 1940;
- i = read32(&buf, endian);
- if(i && i != 0xFFFFFFFF) {
- AVRational q = av_d2q(av_int2float(i), 4096);
- if (q.num > 0 && q.den > 0)
- avctx->framerate = q;
- }
- }
-
- /* SMPTE TC from television header */
- if (offset >= 1920 + 4) {
- uint32_t tc;
- uint32_t *tc_sd;
- char tcbuf[AV_TIMECODE_STR_SIZE];
-
- buf = avpkt->data + 1920;
- // read32 to native endian, av_bswap32 to opposite of native for
- // compatibility with av_timecode_make_smpte_tc_string2 etc
- tc = av_bswap32(read32(&buf, endian));
-
- if (i != 0xFFFFFFFF) {
- AVFrameSideData *tcside =
- av_frame_new_side_data(p, AV_FRAME_DATA_S12M_TIMECODE,
- sizeof(uint32_t) * 4);
- if (!tcside)
- return AVERROR(ENOMEM);
-
- tc_sd = (uint32_t*)tcside->data;
- tc_sd[0] = 1;
- tc_sd[1] = tc;
-
- av_timecode_make_smpte_tc_string2(tcbuf, avctx->framerate,
- tc_sd[1], 0, 0);
- av_dict_set(&p->metadata, "timecode", tcbuf, 0);
- }
- }
-
- /* color range from television header */
- if (offset >= 1964 + 4) {
- buf = avpkt->data + 1952;
- i = read32(&buf, endian);
-
- buf = avpkt->data + 1964;
- j = read32(&buf, endian);
-
- if (i != 0xFFFFFFFF && j != 0xFFFFFFFF) {
- float minCV, maxCV;
- minCV = av_int2float(i);
- maxCV = av_int2float(j);
- if (bits_per_color >= 1 &&
- minCV == 0.0f && maxCV == ((1<<bits_per_color) - 1)) {
- avctx->color_range = AVCOL_RANGE_JPEG;
- } else if (bits_per_color >= 8 &&
- minCV == (1 <<(bits_per_color - 4)) &&
- maxCV == (235<<(bits_per_color - 8))) {
- avctx->color_range = AVCOL_RANGE_MPEG;
- }
- }
- }
-
switch (descriptor) {
- case 1: // R
- case 2: // G
- case 3: // B
- case 4: // A
case 6: // Y
elements = 1;
- yuv = 1;
- break;
- case 50: // RGB
- elements = 3;
- yuv = 0;
break;
case 52: // ABGR
case 51: // RGBA
+ case 103: // UYVA4444
elements = 4;
- yuv = 0;
+ break;
+ case 50: // RGB
+ case 102: // UYV444
+ elements = 3;
break;
case 100: // UYVY422
elements = 2;
- yuv = 1;
- break;
- case 102: // UYV444
- elements = 3;
- yuv = 1;
- break;
- case 103: // UYVA4444
- elements = 4;
- yuv = 1;
break;
default:
avpriv_report_missing_feature(avctx, "Descriptor %d", descriptor);
@@ -389,10 +275,8 @@
case 16:
stride = 2 * avctx->width * elements;
break;
- case 32:
- stride = 4 * avctx->width * elements;
- break;
case 1:
+ case 32:
case 64:
avpriv_report_missing_feature(avctx, "Depth %d", bits_per_color);
return AVERROR_PATCHWELCOME;
@@ -400,82 +284,6 @@
return AVERROR_INVALIDDATA;
}
- switch (color_trc) {
- case DPX_TRC_LINEAR:
- avctx->color_trc = AVCOL_TRC_LINEAR;
- break;
- case DPX_TRC_SMPTE_274:
- case DPX_TRC_ITU_R_709_4:
- avctx->color_trc = AVCOL_TRC_BT709;
- break;
- case DPX_TRC_ITU_R_601_625:
- case DPX_TRC_ITU_R_601_525:
- case DPX_TRC_SMPTE_170:
- avctx->color_trc = AVCOL_TRC_SMPTE170M;
- break;
- case DPX_TRC_ITU_R_624_4_PAL:
- avctx->color_trc = AVCOL_TRC_GAMMA28;
- break;
- case DPX_TRC_USER_DEFINED:
- case DPX_TRC_UNSPECIFIED_VIDEO:
- /* Nothing to do */
- break;
- default:
- av_log(avctx, AV_LOG_VERBOSE, "Cannot map DPX transfer characteristic "
- "%d to color_trc.\n", color_trc);
- break;
- }
-
- switch (color_spec) {
- case DPX_COL_SPEC_SMPTE_274:
- case DPX_COL_SPEC_ITU_R_709_4:
- avctx->color_primaries = AVCOL_PRI_BT709;
- break;
- case DPX_COL_SPEC_ITU_R_601_625:
- case DPX_COL_SPEC_ITU_R_624_4_PAL:
- avctx->color_primaries = AVCOL_PRI_BT470BG;
- break;
- case DPX_COL_SPEC_ITU_R_601_525:
- case DPX_COL_SPEC_SMPTE_170:
- avctx->color_primaries = AVCOL_PRI_SMPTE170M;
- break;
- case DPX_COL_SPEC_USER_DEFINED:
- case DPX_COL_SPEC_UNSPECIFIED_VIDEO:
- /* Nothing to do */
- break;
- default:
- av_log(avctx, AV_LOG_VERBOSE, "Cannot map DPX color specification "
- "%d to color_primaries.\n", color_spec);
- break;
- }
-
- if (yuv) {
- switch (color_spec) {
- case DPX_COL_SPEC_SMPTE_274:
- case DPX_COL_SPEC_ITU_R_709_4:
- avctx->colorspace = AVCOL_SPC_BT709;
- break;
- case DPX_COL_SPEC_ITU_R_601_625:
- case DPX_COL_SPEC_ITU_R_624_4_PAL:
- avctx->colorspace = AVCOL_SPC_BT470BG;
- break;
- case DPX_COL_SPEC_ITU_R_601_525:
- case DPX_COL_SPEC_SMPTE_170:
- avctx->colorspace = AVCOL_SPC_SMPTE170M;
- break;
- case DPX_COL_SPEC_USER_DEFINED:
- case DPX_COL_SPEC_UNSPECIFIED_VIDEO:
- /* Nothing to do */
- break;
- default:
- av_log(avctx, AV_LOG_INFO, "Cannot map DPX color specification "
- "%d to colorspace.\n", color_spec);
- break;
- }
- } else {
- avctx->colorspace = AVCOL_SPC_RGB;
- }
-
// Table 3c: Runs will always break at scan line boundaries. Packing
// will always break to the next 32-bit word at scan-line boundaries.
// Unfortunately, the encoder produced invalid files, so attempt
@@ -497,14 +305,6 @@
}
switch (1000 * descriptor + 10 * bits_per_color + endian) {
- case 1081:
- case 1080:
- case 2081:
- case 2080:
- case 3081:
- case 3080:
- case 4081:
- case 4080:
case 6081:
case 6080:
avctx->pix_fmt = AV_PIX_FMT_GRAY8;
@@ -513,20 +313,6 @@
case 6120:
avctx->pix_fmt = AV_PIX_FMT_GRAY12;
break;
- case 1320:
- case 2320:
- case 3320:
- case 4320:
- case 6320:
- avctx->pix_fmt = AV_PIX_FMT_GRAYF32LE;
- break;
- case 1321:
- case 2321:
- case 3321:
- case 4321:
- case 6321:
- avctx->pix_fmt = AV_PIX_FMT_GRAYF32BE;
- break;
case 50081:
case 50080:
avctx->pix_fmt = AV_PIX_FMT_RGB24;
@@ -577,18 +363,6 @@
case 51160:
avctx->pix_fmt = AV_PIX_FMT_RGBA64LE;
break;
- case 50320:
- avctx->pix_fmt = AV_PIX_FMT_GBRPF32LE;
- break;
- case 50321:
- avctx->pix_fmt = AV_PIX_FMT_GBRPF32BE;
- break;
- case 51320:
- avctx->pix_fmt = AV_PIX_FMT_GBRAPF32LE;
- break;
- case 51321:
- avctx->pix_fmt = AV_PIX_FMT_GBRAPF32BE;
- break;
case 100081:
avctx->pix_fmt = AV_PIX_FMT_UYVY422;
break;
@@ -599,8 +373,7 @@
avctx->pix_fmt = AV_PIX_FMT_YUVA444P;
break;
default:
- av_log(avctx, AV_LOG_ERROR, "Unsupported format %d\n",
- 1000 * descriptor + 10 * bits_per_color + endian);
+ av_log(avctx, AV_LOG_ERROR, "Unsupported format\n");
return AVERROR_PATCHWELCOME;
}
@@ -617,12 +390,6 @@
input_device[32] = '\0';
av_dict_set(&p->metadata, "Input Device", input_device, 0);
- // Some devices do not pad 10bit samples to whole 32bit words per row
- if (!memcmp(input_device, "Scanity", 7) ||
- !memcmp(creator, "Lasergraphics Inc.", 18)) {
- unpadded_10bit = 1;
- }
-
// Move pointer to offset from start of file
buf = avpkt->data + offset;
@@ -655,7 +422,7 @@
read10in32(&buf, &rgbBuffer,
&n_datum, endian, shift);
}
- if (!unpadded_10bit)
+ if (memcmp(input_device, "Scanity", 7))
n_datum = 0;
for (i = 0; i < elements; i++)
ptr[i] += p->linesize[i];
@@ -698,36 +465,6 @@
buf += need_align;
}
break;
- case 32:
- if (elements == 1) {
- av_image_copy_plane(ptr[0], p->linesize[0],
- buf, stride,
- elements * avctx->width * 4, avctx->height);
- } else {
- for (y = 0; y < avctx->height; y++) {
- ptr[0] = p->data[0] + y * p->linesize[0];
- ptr[1] = p->data[1] + y * p->linesize[1];
- ptr[2] = p->data[2] + y * p->linesize[2];
- ptr[3] = p->data[3] + y * p->linesize[3];
- for (x = 0; x < avctx->width; x++) {
- AV_WN32(ptr[2], AV_RN32(buf));
- AV_WN32(ptr[0], AV_RN32(buf + 4));
- AV_WN32(ptr[1], AV_RN32(buf + 8));
- if (avctx->pix_fmt == AV_PIX_FMT_GBRAPF32BE ||
- avctx->pix_fmt == AV_PIX_FMT_GBRAPF32LE) {
- AV_WN32(ptr[3], AV_RN32(buf + 12));
- buf += 4;
- ptr[3] += 4;
- }
-
- buf += 12;
- ptr[2] += 4;
- ptr[0] += 4;
- ptr[1] += 4;
- }
- }
- }
- break;
case 16:
elements *= 2;
case 8:
diff --git a/libavcodec/dsddec.c b/libavcodec/dsddec.c
index 21d1d9f..9814c9e 100644
--- a/libavcodec/dsddec.c
+++ b/libavcodec/dsddec.c
@@ -66,7 +66,7 @@
typedef struct ThreadData {
AVFrame *frame;
- const AVPacket *avpkt;
+ AVPacket *avpkt;
} ThreadData;
static int dsd_channel(AVCodecContext *avctx, void *tdata, int j, int threadnr)
@@ -75,7 +75,7 @@
DSDContext *s = avctx->priv_data;
ThreadData *td = tdata;
AVFrame *frame = td->frame;
- const AVPacket *avpkt = td->avpkt;
+ AVPacket *avpkt = td->avpkt;
int src_next, src_stride;
float *dst = ((float **)frame->extended_data)[j];
diff --git a/libavcodec/dss_sp.c b/libavcodec/dss_sp.c
index 568757d..71da65c 100644
--- a/libavcodec/dss_sp.c
+++ b/libavcodec/dss_sp.c
@@ -22,7 +22,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c
index 84d19b9..3fd710d 100644
--- a/libavcodec/dstdec.c
+++ b/libavcodec/dstdec.c
@@ -27,7 +27,6 @@
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "internal.h"
#include "get_bits.h"
#include "avcodec.h"
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index a0647e5..c526091 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -38,7 +38,6 @@
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index 233e2b6..21a8b84 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -30,7 +30,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
@@ -318,8 +317,9 @@
65536, 65536, 32768, 21845, 16384, 13107, 10923, 9362, 8192, 4096, 3641, 3277, 2979, 2731, 2341, 1260,
};
-/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^16
+/* DV100 weights are pre-zigzagged, inverted and multiplied by 2^(dv100_weight_shift)
(in DV100 the AC components are divided by the spec weights) */
+static const int dv100_weight_shift = 16;
static const int dv_weight_1080[2][64] = {
{ 8192, 65536, 65536, 61681, 61681, 61681, 58254, 58254,
58254, 58254, 58254, 58254, 55188, 58254, 58254, 55188,
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index f314bce..7143a11 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -264,8 +264,8 @@
V[huvborder] = src[3] + 0x80;
src += 4;
}
- Y1 += pic->linesize[0] * 2;
- Y2 += pic->linesize[0] * 2;
+ Y1 += pic->linesize[0] << 1;
+ Y2 += pic->linesize[0] << 1;
U += pic->linesize[1];
V += pic->linesize[2];
}
diff --git a/libavcodec/dxva2_av1.c b/libavcodec/dxva2_av1.c
index aa14e47..72c38f5 100644
--- a/libavcodec/dxva2_av1.c
+++ b/libavcodec/dxva2_av1.c
@@ -62,7 +62,6 @@
const AV1RawFilmGrainParams *film_grain = &h->cur_frame.film_grain;
unsigned char remap_lr_type[4] = { AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ };
- int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;
memset(pp, 0, sizeof(*pp));
@@ -100,7 +99,7 @@
pp->coding.integer_mv = frame_header->force_integer_mv || !(frame_header->frame_type & 1);
pp->coding.cdef = seq->enable_cdef;
pp->coding.restoration = seq->enable_restoration;
- pp->coding.film_grain = seq->film_grain_params_present && !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN);
+ pp->coding.film_grain = seq->film_grain_params_present;
pp->coding.intrabc = frame_header->allow_intrabc;
pp->coding.high_precision_mv = frame_header->allow_high_precision_mv;
pp->coding.switchable_motion_mode = frame_header->is_motion_mode_switchable;
@@ -216,7 +215,7 @@
}
/* Film grain */
- if (apply_grain) {
+ if (film_grain->apply_grain) {
pp->film_grain.apply_grain = 1;
pp->film_grain.scaling_shift_minus8 = film_grain->grain_scaling_minus_8;
pp->film_grain.chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma;
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index 356bb67..8e1032f 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -24,7 +24,7 @@
* E-AC-3 encoder
*/
-#define AC3ENC_FLOAT 1
+#define CONFIG_AC3ENC_FLOAT 1
#include "libavutil/attributes.h"
#include "ac3enc.h"
@@ -32,10 +32,13 @@
#include "eac3_data.h"
+#define AC3ENC_TYPE AC3ENC_TYPE_EAC3
+#include "ac3enc_opts_template.c"
+
static const AVClass eac3enc_class = {
.class_name = "E-AC-3 Encoder",
.item_name = av_default_item_name,
- .option = &ff_ac3_enc_options[2], /* First two options are AC-3 only. */
+ .option = ac3_options,
.version = LIBAVUTIL_VERSION_INT,
};
@@ -262,6 +265,6 @@
.priv_class = &eac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
- .defaults = ff_ac3_enc_defaults,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .defaults = ac3_defaults,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 2c03aa5..7f28abb 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -28,8 +28,6 @@
* http://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD
*/
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "blockdsp.h"
#include "bytestream.h"
@@ -351,5 +349,4 @@
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index 197ba6f..1308c07 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -29,9 +29,6 @@
*/
#define BITSTREAM_READER_LE
-
-#include "libavutil/mem_internal.h"
-
#include "aandcttab.h"
#include "avcodec.h"
#include "bytestream.h"
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 2be2737..96536b1 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -26,8 +26,6 @@
* @see http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TQI
*/
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "blockdsp.h"
#include "bswapdsp.h"
@@ -191,5 +189,4 @@
.close = tqi_decode_end,
.decode = tqi_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 282337e..2e540ba 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -152,10 +152,6 @@
if (CONFIG_FRAME_THREAD_ENCODER &&
avci->frame_thread_encoder && (avctx->active_thread_type & FF_THREAD_FRAME))
- /* This might modify frame, but it doesn't matter, because
- * the frame properties used below are not used for video
- * (due to the delay inherent in frame threaded encoding, it makes
- * no sense to use the properties of the current frame anyway). */
ret = ff_thread_video_encode_frame(avctx, avpkt, frame, &got_packet);
else {
ret = avctx->codec->encode2(avctx, avpkt, frame, &got_packet);
@@ -360,7 +356,6 @@
return 0;
}
-#if FF_API_OLD_ENCDEC
static int compat_encode(AVCodecContext *avctx, AVPacket *avpkt,
int *got_packet, const AVFrame *frame)
{
@@ -461,4 +456,3 @@
return ret;
}
-#endif
diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index 0b656fd..2874772 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -95,15 +95,22 @@
ret = ff_exif_decode_ifd(logctx, gbytes, le, depth + 1, metadata);
} else {
const char *name = exif_get_tag_name(id);
- char buf[7];
+ char *use_name = (char*) name;
- if (!name) {
- name = buf;
- snprintf(buf, sizeof(buf), "0x%04X", id);
+ if (!use_name) {
+ use_name = av_malloc(7);
+ if (!use_name) {
+ return AVERROR(ENOMEM);
+ }
+ snprintf(use_name, 7, "0x%04X", id);
}
- ret = exif_add_metadata(logctx, count, type, name, NULL,
+ ret = exif_add_metadata(logctx, count, type, use_name, NULL,
gbytes, le, metadata);
+
+ if (!name) {
+ av_freep(&use_name);
+ }
}
bytestream2_seek(gbytes, cur_pos, SEEK_SET);
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 8a714c1..6e6ce42 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -29,6 +29,8 @@
*
* For more information on the OpenEXR format, visit:
* http://openexr.com/
+ *
+ * exr_half2float() is credited to Aaftab Munshi, Dan Ginsburg, Dave Shreiner.
*/
#include <float.h>
@@ -52,7 +54,6 @@
#include "exrdsp.h"
#include "get_bits.h"
#include "internal.h"
-#include "half2float.h"
#include "mathops.h"
#include "thread.h"
@@ -65,8 +66,8 @@
EXR_PXR24,
EXR_B44,
EXR_B44A,
- EXR_DWAA,
- EXR_DWAB,
+ EXR_DWA,
+ EXR_DWB,
EXR_UNKN,
};
@@ -90,12 +91,6 @@
EXR_TILE_ROUND_UNKNOWN,
};
-typedef struct HuffEntry {
- uint8_t len;
- uint16_t sym;
- uint32_t code;
-} HuffEntry;
-
typedef struct EXRChannel {
int xsub, ysub;
enum ExrPixelType pixel_type;
@@ -118,28 +113,9 @@
uint8_t *bitmap;
uint16_t *lut;
- uint8_t *ac_data;
- unsigned ac_size;
-
- uint8_t *dc_data;
- unsigned dc_size;
-
- uint8_t *rle_data;
- unsigned rle_size;
-
- uint8_t *rle_raw_data;
- unsigned rle_raw_size;
-
- float block[3][64];
-
int ysize, xsize;
int channel_line_size;
-
- int run_sym;
- HuffEntry *he;
- uint64_t *freq;
- VLC vlc;
} EXRThreadData;
typedef struct EXRContext {
@@ -158,7 +134,6 @@
const AVPixFmtDescriptor *desc;
int w, h;
- uint32_t sar;
int32_t xmax, xmin;
int32_t ymax, ymin;
uint32_t xdelta, ydelta;
@@ -167,8 +142,6 @@
EXRTileAttribute tile_attr; /* header data attribute of tile */
int is_tile; /* 0 if scanline, 1 if tile */
- int is_multipart;
- int current_part;
int is_luma;/* 1 if there is an Y plane */
@@ -179,22 +152,77 @@
EXRChannel *channels;
int nb_channels;
int current_channel_offset;
- uint32_t chunk_count;
EXRThreadData *thread_data;
const char *layer;
- int selected_part;
enum AVColorTransferCharacteristic apply_trc_type;
float gamma;
union av_intfloat32 gamma_table[65536];
-
- uint32_t mantissatable[2048];
- uint32_t exponenttable[64];
- uint16_t offsettable[64];
} EXRContext;
+/* -15 stored using a single precision bias of 127 */
+#define HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP 0x38000000
+
+/* max exponent value in single precision that will be converted
+ * to Inf or Nan when stored as a half-float */
+#define HALF_FLOAT_MAX_BIASED_EXP_AS_SINGLE_FP_EXP 0x47800000
+
+/* 255 is the max exponent biased value */
+#define FLOAT_MAX_BIASED_EXP (0xFF << 23)
+
+#define HALF_FLOAT_MAX_BIASED_EXP (0x1F << 10)
+
+/**
+ * Convert a half float as a uint16_t into a full float.
+ *
+ * @param hf half float as uint16_t
+ *
+ * @return float value
+ */
+static union av_intfloat32 exr_half2float(uint16_t hf)
+{
+ unsigned int sign = (unsigned int) (hf >> 15);
+ unsigned int mantissa = (unsigned int) (hf & ((1 << 10) - 1));
+ unsigned int exp = (unsigned int) (hf & HALF_FLOAT_MAX_BIASED_EXP);
+ union av_intfloat32 f;
+
+ if (exp == HALF_FLOAT_MAX_BIASED_EXP) {
+ // we have a half-float NaN or Inf
+ // half-float NaNs will be converted to a single precision NaN
+ // half-float Infs will be converted to a single precision Inf
+ exp = FLOAT_MAX_BIASED_EXP;
+ mantissa <<= 13; // preserve half-float NaN bits if set
+ } else if (exp == 0x0) {
+ // convert half-float zero/denorm to single precision value
+ if (mantissa) {
+ mantissa <<= 1;
+ exp = HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
+ // check for leading 1 in denorm mantissa
+ while (!(mantissa & (1 << 10))) {
+ // for every leading 0, decrement single precision exponent by 1
+ // and shift half-float mantissa value to the left
+ mantissa <<= 1;
+ exp -= (1 << 23);
+ }
+ // clamp the mantissa to 10 bits
+ mantissa &= ((1 << 10) - 1);
+ // shift left to generate single-precision mantissa of 23 bits
+ mantissa <<= 13;
+ }
+ } else {
+ // shift left to generate single-precision mantissa of 23 bits
+ mantissa <<= 13;
+ // generate single precision biased exponent value
+ exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
+ }
+
+ f.i = (sign << 31) | exp | mantissa;
+
+ return f;
+}
+
static int zip_uncompress(EXRContext *s, const uint8_t *src, int compressed_size,
int uncompressed_size, EXRThreadData *td)
{
@@ -212,10 +240,10 @@
return 0;
}
-static int rle(uint8_t *dst, const uint8_t *src,
- int compressed_size, int uncompressed_size)
+static int rle_uncompress(EXRContext *ctx, const uint8_t *src, int compressed_size,
+ int uncompressed_size, EXRThreadData *td)
{
- uint8_t *d = dst;
+ uint8_t *d = td->tmp;
const int8_t *s = src;
int ssize = compressed_size;
int dsize = uncompressed_size;
@@ -251,14 +279,6 @@
if (dend != d)
return AVERROR_INVALIDDATA;
- return 0;
-}
-
-static int rle_uncompress(EXRContext *ctx, const uint8_t *src, int compressed_size,
- int uncompressed_size, EXRThreadData *td)
-{
- rle(td->tmp, src, compressed_size, uncompressed_size);
-
av_assert1(uncompressed_size % 2 == 0);
ctx->dsp.predictor(td->tmp, uncompressed_size);
@@ -294,15 +314,25 @@
}
#define HUF_ENCBITS 16 // literal (value) bit length
-#define HUF_ENCSIZE ((1 << HUF_ENCBITS) + 1) // encoding table size
+#define HUF_DECBITS 14 // decoding bit size (>= 8)
-static void huf_canonical_code_table(uint64_t *freq)
+#define HUF_ENCSIZE ((1 << HUF_ENCBITS) + 1) // encoding table size
+#define HUF_DECSIZE (1 << HUF_DECBITS) // decoding table size
+#define HUF_DECMASK (HUF_DECSIZE - 1)
+
+typedef struct HufDec {
+ int len;
+ int lit;
+ int *p;
+} HufDec;
+
+static void huf_canonical_code_table(uint64_t *hcode)
{
uint64_t c, n[59] = { 0 };
int i;
- for (i = 0; i < HUF_ENCSIZE; i++)
- n[freq[i]] += 1;
+ for (i = 0; i < HUF_ENCSIZE; ++i)
+ n[hcode[i]] += 1;
c = 0;
for (i = 58; i > 0; --i) {
@@ -312,10 +342,10 @@
}
for (i = 0; i < HUF_ENCSIZE; ++i) {
- int l = freq[i];
+ int l = hcode[i];
if (l > 0)
- freq[i] = l | (n[l]++ << 6);
+ hcode[i] = l | (n[l]++ << 6);
}
}
@@ -325,7 +355,7 @@
#define LONGEST_LONG_RUN (255 + SHORTEST_LONG_RUN)
static int huf_unpack_enc_table(GetByteContext *gb,
- int32_t im, int32_t iM, uint64_t *freq)
+ int32_t im, int32_t iM, uint64_t *hcode)
{
GetBitContext gbit;
int ret = init_get_bits8(&gbit, gb->buffer, bytestream2_get_bytes_left(gb));
@@ -333,7 +363,7 @@
return ret;
for (; im <= iM; im++) {
- uint64_t l = freq[im] = get_bits(&gbit, 6);
+ uint64_t l = hcode[im] = get_bits(&gbit, 6);
if (l == LONG_ZEROCODE_RUN) {
int zerun = get_bits(&gbit, 8) + SHORTEST_LONG_RUN;
@@ -342,7 +372,7 @@
return AVERROR_INVALIDDATA;
while (zerun--)
- freq[im++] = 0;
+ hcode[im++] = 0;
im--;
} else if (l >= SHORT_ZEROCODE_RUN) {
@@ -352,128 +382,202 @@
return AVERROR_INVALIDDATA;
while (zerun--)
- freq[im++] = 0;
+ hcode[im++] = 0;
im--;
}
}
bytestream2_skip(gb, (get_bits_count(&gbit) + 7) / 8);
- huf_canonical_code_table(freq);
+ huf_canonical_code_table(hcode);
return 0;
}
-static int huf_build_dec_table(EXRContext *s,
- EXRThreadData *td, int im, int iM)
+static int huf_build_dec_table(const uint64_t *hcode, int im,
+ int iM, HufDec *hdecod)
{
- int j = 0;
+ for (; im <= iM; im++) {
+ uint64_t c = hcode[im] >> 6;
+ int i, l = hcode[im] & 63;
- td->run_sym = -1;
- for (int i = im; i < iM; i++) {
- td->he[j].sym = i;
- td->he[j].len = td->freq[i] & 63;
- td->he[j].code = td->freq[i] >> 6;
- if (td->he[j].len > 32) {
- avpriv_request_sample(s->avctx, "Too big code length");
- return AVERROR_PATCHWELCOME;
+ if (c >> l)
+ return AVERROR_INVALIDDATA;
+
+ if (l > HUF_DECBITS) {
+ HufDec *pl = hdecod + (c >> (l - HUF_DECBITS));
+ if (pl->len)
+ return AVERROR_INVALIDDATA;
+
+ pl->lit++;
+
+ pl->p = av_realloc(pl->p, pl->lit * sizeof(int));
+ if (!pl->p)
+ return AVERROR(ENOMEM);
+
+ pl->p[pl->lit - 1] = im;
+ } else if (l) {
+ HufDec *pl = hdecod + (c << (HUF_DECBITS - l));
+
+ for (i = 1 << (HUF_DECBITS - l); i > 0; i--, pl++) {
+ if (pl->len || pl->p)
+ return AVERROR_INVALIDDATA;
+ pl->len = l;
+ pl->lit = im;
+ }
}
- if (td->he[j].len > 0)
- j++;
- else
- td->run_sym = i;
}
- if (im > 0)
- td->run_sym = 0;
- else if (iM < 65535)
- td->run_sym = 65535;
-
- if (td->run_sym == -1) {
- avpriv_request_sample(s->avctx, "No place for run symbol");
- return AVERROR_PATCHWELCOME;
- }
-
- td->he[j].sym = td->run_sym;
- td->he[j].len = td->freq[iM] & 63;
- if (td->he[j].len > 32) {
- avpriv_request_sample(s->avctx, "Too big code length");
- return AVERROR_PATCHWELCOME;
- }
- td->he[j].code = td->freq[iM] >> 6;
- j++;
-
- ff_free_vlc(&td->vlc);
- return ff_init_vlc_sparse(&td->vlc, 12, j,
- &td->he[0].len, sizeof(td->he[0]), sizeof(td->he[0].len),
- &td->he[0].code, sizeof(td->he[0]), sizeof(td->he[0].code),
- &td->he[0].sym, sizeof(td->he[0]), sizeof(td->he[0].sym), 0);
+ return 0;
}
-static int huf_decode(VLC *vlc, GetByteContext *gb, int nbits, int run_sym,
- int no, uint16_t *out)
+#define get_char(c, lc, gb) \
+{ \
+ c = (c << 8) | bytestream2_get_byte(gb); \
+ lc += 8; \
+}
+
+#define get_code(po, rlc, c, lc, gb, out, oe, outb) \
+{ \
+ if (po == rlc) { \
+ if (lc < 8) \
+ get_char(c, lc, gb); \
+ lc -= 8; \
+ \
+ cs = c >> lc; \
+ \
+ if (out + cs > oe || out == outb) \
+ return AVERROR_INVALIDDATA; \
+ \
+ s = out[-1]; \
+ \
+ while (cs-- > 0) \
+ *out++ = s; \
+ } else if (out < oe) { \
+ *out++ = po; \
+ } else { \
+ return AVERROR_INVALIDDATA; \
+ } \
+}
+
+static int huf_decode(const uint64_t *hcode, const HufDec *hdecod,
+ GetByteContext *gb, int nbits,
+ int rlc, int no, uint16_t *out)
{
- GetBitContext gbit;
- int oe = 0;
+ uint64_t c = 0;
+ uint16_t *outb = out;
+ uint16_t *oe = out + no;
+ const uint8_t *ie = gb->buffer + (nbits + 7) / 8; // input byte size
+ uint8_t cs;
+ uint16_t s;
+ int i, lc = 0;
- init_get_bits(&gbit, gb->buffer, nbits);
- while (get_bits_left(&gbit) > 0 && oe < no) {
- uint16_t x = get_vlc2(&gbit, vlc->table, 12, 2);
+ while (gb->buffer < ie) {
+ get_char(c, lc, gb);
- if (x == run_sym) {
- int run = get_bits(&gbit, 8);
- uint16_t fill = out[oe - 1];
+ while (lc >= HUF_DECBITS) {
+ const HufDec pl = hdecod[(c >> (lc - HUF_DECBITS)) & HUF_DECMASK];
- while (run-- > 0)
- out[oe++] = fill;
+ if (pl.len) {
+ lc -= pl.len;
+ get_code(pl.lit, rlc, c, lc, gb, out, oe, outb);
+ } else {
+ int j;
+
+ if (!pl.p)
+ return AVERROR_INVALIDDATA;
+
+ for (j = 0; j < pl.lit; j++) {
+ int l = hcode[pl.p[j]] & 63;
+
+ while (lc < l && bytestream2_get_bytes_left(gb) > 0)
+ get_char(c, lc, gb);
+
+ if (lc >= l) {
+ if ((hcode[pl.p[j]] >> 6) ==
+ ((c >> (lc - l)) & ((1LL << l) - 1))) {
+ lc -= l;
+ get_code(pl.p[j], rlc, c, lc, gb, out, oe, outb);
+ break;
+ }
+ }
+ }
+
+ if (j == pl.lit)
+ return AVERROR_INVALIDDATA;
+ }
+ }
+ }
+
+ i = (8 - nbits) & 7;
+ c >>= i;
+ lc -= i;
+
+ while (lc > 0) {
+ const HufDec pl = hdecod[(c << (HUF_DECBITS - lc)) & HUF_DECMASK];
+
+ if (pl.len && lc >= pl.len) {
+ lc -= pl.len;
+ get_code(pl.lit, rlc, c, lc, gb, out, oe, outb);
} else {
- out[oe++] = x;
+ return AVERROR_INVALIDDATA;
}
}
+ if (out - outb != no)
+ return AVERROR_INVALIDDATA;
return 0;
}
-static int huf_uncompress(EXRContext *s,
- EXRThreadData *td,
- GetByteContext *gb,
+static int huf_uncompress(GetByteContext *gb,
uint16_t *dst, int dst_size)
{
- int32_t im, iM;
+ int32_t src_size, im, iM;
uint32_t nBits;
- int ret;
+ uint64_t *freq;
+ HufDec *hdec;
+ int ret, i;
+ src_size = bytestream2_get_le32(gb);
im = bytestream2_get_le32(gb);
iM = bytestream2_get_le32(gb);
bytestream2_skip(gb, 4);
nBits = bytestream2_get_le32(gb);
if (im < 0 || im >= HUF_ENCSIZE ||
- iM < 0 || iM >= HUF_ENCSIZE)
+ iM < 0 || iM >= HUF_ENCSIZE ||
+ src_size < 0)
return AVERROR_INVALIDDATA;
bytestream2_skip(gb, 4);
- if (!td->freq)
- td->freq = av_malloc_array(HUF_ENCSIZE, sizeof(*td->freq));
- if (!td->he)
- td->he = av_calloc(HUF_ENCSIZE, sizeof(*td->he));
- if (!td->freq || !td->he) {
+ freq = av_mallocz_array(HUF_ENCSIZE, sizeof(*freq));
+ hdec = av_mallocz_array(HUF_DECSIZE, sizeof(*hdec));
+ if (!freq || !hdec) {
ret = AVERROR(ENOMEM);
- return ret;
+ goto fail;
}
- memset(td->freq, 0, sizeof(*td->freq) * HUF_ENCSIZE);
- if ((ret = huf_unpack_enc_table(gb, im, iM, td->freq)) < 0)
- return ret;
+ if ((ret = huf_unpack_enc_table(gb, im, iM, freq)) < 0)
+ goto fail;
if (nBits > 8 * bytestream2_get_bytes_left(gb)) {
ret = AVERROR_INVALIDDATA;
- return ret;
+ goto fail;
}
- if ((ret = huf_build_dec_table(s, td, im, iM)) < 0)
- return ret;
- return huf_decode(&td->vlc, gb, nBits, td->run_sym, dst_size, dst);
+ if ((ret = huf_build_dec_table(freq, im, iM, hdec)) < 0)
+ goto fail;
+ ret = huf_decode(freq, hdec, gb, nBits, iM, dst_size, dst);
+
+fail:
+ for (i = 0; i < HUF_DECSIZE; i++)
+ if (hdec)
+ av_freep(&hdec[i].p);
+
+ av_free(freq);
+ av_free(hdec);
+
+ return ret;
}
static inline void wdec14(uint16_t l, uint16_t h, uint16_t *a, uint16_t *b)
@@ -621,8 +725,7 @@
maxval = reverse_lut(td->bitmap, td->lut);
- bytestream2_skip(&gb, 4);
- ret = huf_uncompress(s, td, &gb, tmp, dsize / sizeof(uint16_t));
+ ret = huf_uncompress(&gb, tmp, dsize / sizeof(uint16_t));
if (ret)
return ret;
@@ -880,292 +983,6 @@
return 0;
}
-static int ac_uncompress(EXRContext *s, GetByteContext *gb, float *block)
-{
- int ret = 0, n = 1;
-
- while (n < 64) {
- uint16_t val = bytestream2_get_ne16(gb);
-
- if (val == 0xff00) {
- n = 64;
- } else if ((val >> 8) == 0xff) {
- n += val & 0xff;
- } else {
- ret = n;
- block[ff_zigzag_direct[n]] = av_int2float(half2float(val,
- s->mantissatable,
- s->exponenttable,
- s->offsettable));
- n++;
- }
- }
-
- return ret;
-}
-
-static void idct_1d(float *blk, int step)
-{
- const float a = .5f * cosf( M_PI / 4.f);
- const float b = .5f * cosf( M_PI / 16.f);
- const float c = .5f * cosf( M_PI / 8.f);
- const float d = .5f * cosf(3.f*M_PI / 16.f);
- const float e = .5f * cosf(5.f*M_PI / 16.f);
- const float f = .5f * cosf(3.f*M_PI / 8.f);
- const float g = .5f * cosf(7.f*M_PI / 16.f);
-
- float alpha[4], beta[4], theta[4], gamma[4];
-
- alpha[0] = c * blk[2 * step];
- alpha[1] = f * blk[2 * step];
- alpha[2] = c * blk[6 * step];
- alpha[3] = f * blk[6 * step];
-
- beta[0] = b * blk[1 * step] + d * blk[3 * step] + e * blk[5 * step] + g * blk[7 * step];
- beta[1] = d * blk[1 * step] - g * blk[3 * step] - b * blk[5 * step] - e * blk[7 * step];
- beta[2] = e * blk[1 * step] - b * blk[3 * step] + g * blk[5 * step] + d * blk[7 * step];
- beta[3] = g * blk[1 * step] - e * blk[3 * step] + d * blk[5 * step] - b * blk[7 * step];
-
- theta[0] = a * (blk[0 * step] + blk[4 * step]);
- theta[3] = a * (blk[0 * step] - blk[4 * step]);
-
- theta[1] = alpha[0] + alpha[3];
- theta[2] = alpha[1] - alpha[2];
-
- gamma[0] = theta[0] + theta[1];
- gamma[1] = theta[3] + theta[2];
- gamma[2] = theta[3] - theta[2];
- gamma[3] = theta[0] - theta[1];
-
- blk[0 * step] = gamma[0] + beta[0];
- blk[1 * step] = gamma[1] + beta[1];
- blk[2 * step] = gamma[2] + beta[2];
- blk[3 * step] = gamma[3] + beta[3];
-
- blk[4 * step] = gamma[3] - beta[3];
- blk[5 * step] = gamma[2] - beta[2];
- blk[6 * step] = gamma[1] - beta[1];
- blk[7 * step] = gamma[0] - beta[0];
-}
-
-static void dct_inverse(float *block)
-{
- for (int i = 0; i < 8; i++)
- idct_1d(block + i, 8);
-
- for (int i = 0; i < 8; i++) {
- idct_1d(block, 1);
- block += 8;
- }
-}
-
-static void convert(float y, float u, float v,
- float *b, float *g, float *r)
-{
- *r = y + 1.5747f * v;
- *g = y - 0.1873f * u - 0.4682f * v;
- *b = y + 1.8556f * u;
-}
-
-static float to_linear(float x, float scale)
-{
- float ax = fabsf(x);
-
- if (ax <= 1.f) {
- return FFSIGN(x) * powf(ax, 2.2f * scale);
- } else {
- const float log_base = expf(2.2f * scale);
-
- return FFSIGN(x) * powf(log_base, ax - 1.f);
- }
-}
-
-static int dwa_uncompress(EXRContext *s, const uint8_t *src, int compressed_size,
- int uncompressed_size, EXRThreadData *td)
-{
- int64_t version, lo_usize, lo_size;
- int64_t ac_size, dc_size, rle_usize, rle_csize, rle_raw_size;
- int64_t ac_count, dc_count, ac_compression;
- const int dc_w = td->xsize >> 3;
- const int dc_h = td->ysize >> 3;
- GetByteContext gb, agb;
- int skip, ret;
-
- if (compressed_size <= 88)
- return AVERROR_INVALIDDATA;
-
- version = AV_RL64(src + 0);
- if (version != 2)
- return AVERROR_INVALIDDATA;
-
- lo_usize = AV_RL64(src + 8);
- lo_size = AV_RL64(src + 16);
- ac_size = AV_RL64(src + 24);
- dc_size = AV_RL64(src + 32);
- rle_csize = AV_RL64(src + 40);
- rle_usize = AV_RL64(src + 48);
- rle_raw_size = AV_RL64(src + 56);
- ac_count = AV_RL64(src + 64);
- dc_count = AV_RL64(src + 72);
- ac_compression = AV_RL64(src + 80);
-
- if (compressed_size < 88LL + lo_size + ac_size + dc_size + rle_csize)
- return AVERROR_INVALIDDATA;
-
- bytestream2_init(&gb, src + 88, compressed_size - 88);
- skip = bytestream2_get_le16(&gb);
- if (skip < 2)
- return AVERROR_INVALIDDATA;
-
- bytestream2_skip(&gb, skip - 2);
-
- if (lo_size > 0) {
- if (lo_usize > uncompressed_size)
- return AVERROR_INVALIDDATA;
- bytestream2_skip(&gb, lo_size);
- }
-
- if (ac_size > 0) {
- unsigned long dest_len = ac_count * 2LL;
- GetByteContext agb = gb;
-
- if (ac_count > 3LL * td->xsize * s->scan_lines_per_block)
- return AVERROR_INVALIDDATA;
-
- av_fast_padded_malloc(&td->ac_data, &td->ac_size, dest_len);
- if (!td->ac_data)
- return AVERROR(ENOMEM);
-
- switch (ac_compression) {
- case 0:
- ret = huf_uncompress(s, td, &agb, (int16_t *)td->ac_data, ac_count);
- if (ret < 0)
- return ret;
- break;
- case 1:
- if (uncompress(td->ac_data, &dest_len, agb.buffer, ac_size) != Z_OK ||
- dest_len != ac_count * 2LL)
- return AVERROR_INVALIDDATA;
- break;
- default:
- return AVERROR_INVALIDDATA;
- }
-
- bytestream2_skip(&gb, ac_size);
- }
-
- if (dc_size > 0) {
- unsigned long dest_len = dc_count * 2LL;
- GetByteContext agb = gb;
-
- if (dc_count > (6LL * td->xsize * td->ysize + 63) / 64)
- return AVERROR_INVALIDDATA;
-
- av_fast_padded_malloc(&td->dc_data, &td->dc_size, FFALIGN(dest_len, 64) * 2);
- if (!td->dc_data)
- return AVERROR(ENOMEM);
-
- if (uncompress(td->dc_data + FFALIGN(dest_len, 64), &dest_len, agb.buffer, dc_size) != Z_OK ||
- (dest_len != dc_count * 2LL))
- return AVERROR_INVALIDDATA;
-
- s->dsp.predictor(td->dc_data + FFALIGN(dest_len, 64), dest_len);
- s->dsp.reorder_pixels(td->dc_data, td->dc_data + FFALIGN(dest_len, 64), dest_len);
-
- bytestream2_skip(&gb, dc_size);
- }
-
- if (rle_raw_size > 0 && rle_csize > 0 && rle_usize > 0) {
- unsigned long dest_len = rle_usize;
-
- av_fast_padded_malloc(&td->rle_data, &td->rle_size, rle_usize);
- if (!td->rle_data)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&td->rle_raw_data, &td->rle_raw_size, rle_raw_size);
- if (!td->rle_raw_data)
- return AVERROR(ENOMEM);
-
- if (uncompress(td->rle_data, &dest_len, gb.buffer, rle_csize) != Z_OK ||
- (dest_len != rle_usize))
- return AVERROR_INVALIDDATA;
-
- ret = rle(td->rle_raw_data, td->rle_data, rle_usize, rle_raw_size);
- if (ret < 0)
- return ret;
- bytestream2_skip(&gb, rle_csize);
- }
-
- bytestream2_init(&agb, td->ac_data, ac_count * 2);
-
- for (int y = 0; y < td->ysize; y += 8) {
- for (int x = 0; x < td->xsize; x += 8) {
- memset(td->block, 0, sizeof(td->block));
-
- for (int j = 0; j < 3; j++) {
- float *block = td->block[j];
- const int idx = (x >> 3) + (y >> 3) * dc_w + dc_w * dc_h * j;
- uint16_t *dc = (uint16_t *)td->dc_data;
- union av_intfloat32 dc_val;
-
- dc_val.i = half2float(dc[idx], s->mantissatable,
- s->exponenttable, s->offsettable);
-
- block[0] = dc_val.f;
- ac_uncompress(s, &agb, block);
- dct_inverse(block);
- }
-
- {
- const float scale = s->pixel_type == EXR_FLOAT ? 2.f : 1.f;
- const int o = s->nb_channels == 4;
- float *bo = ((float *)td->uncompressed_data) +
- y * td->xsize * s->nb_channels + td->xsize * (o + 0) + x;
- float *go = ((float *)td->uncompressed_data) +
- y * td->xsize * s->nb_channels + td->xsize * (o + 1) + x;
- float *ro = ((float *)td->uncompressed_data) +
- y * td->xsize * s->nb_channels + td->xsize * (o + 2) + x;
- float *yb = td->block[0];
- float *ub = td->block[1];
- float *vb = td->block[2];
-
- for (int yy = 0; yy < 8; yy++) {
- for (int xx = 0; xx < 8; xx++) {
- const int idx = xx + yy * 8;
-
- convert(yb[idx], ub[idx], vb[idx], &bo[xx], &go[xx], &ro[xx]);
-
- bo[xx] = to_linear(bo[xx], scale);
- go[xx] = to_linear(go[xx], scale);
- ro[xx] = to_linear(ro[xx], scale);
- }
-
- bo += td->xsize * s->nb_channels;
- go += td->xsize * s->nb_channels;
- ro += td->xsize * s->nb_channels;
- }
- }
- }
- }
-
- if (s->nb_channels < 4)
- return 0;
-
- for (int y = 0; y < td->ysize && td->rle_raw_data; y++) {
- uint32_t *ao = ((uint32_t *)td->uncompressed_data) + y * td->xsize * s->nb_channels;
- uint8_t *ai0 = td->rle_raw_data + y * td->xsize;
- uint8_t *ai1 = td->rle_raw_data + y * td->xsize + rle_raw_size / 2;
-
- for (int x = 0; x < td->xsize; x++) {
- uint16_t ha = ai0[x] | (ai1[x] << 8);
-
- ao[x] = half2float(ha, s->mantissatable, s->exponenttable, s->offsettable);
- }
- }
-
- return 0;
-}
-
static int decode_block(AVCodecContext *avctx, void *tdata,
int jobnr, int threadnr)
{
@@ -1197,8 +1014,6 @@
return AVERROR_INVALIDDATA;
src = buf + line_offset + 20;
- if (s->is_multipart)
- src += 4;
tile_x = AV_RL32(src - 20);
tile_y = AV_RL32(src - 16);
@@ -1234,8 +1049,6 @@
return AVERROR_INVALIDDATA;
src = buf + line_offset + 8;
- if (s->is_multipart)
- src += 4;
line = AV_RL32(src - 8);
if (line < s->ymin || line > s->ymax)
@@ -1321,10 +1134,6 @@
case EXR_B44A:
ret = b44_uncompress(s, src, data_size, uncompressed_size, td);
break;
- case EXR_DWAA:
- case EXR_DWAB:
- ret = dwa_uncompress(s, src, data_size, uncompressed_size, td);
- break;
}
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "decode_block() failed.\n");
@@ -1351,6 +1160,7 @@
channel_buffer[3] = src + (td->xsize * s->channel_offsets[3]) + data_window_offset;
if (s->desc->flags & AV_PIX_FMT_FLAG_FLOAT) {
+
/* todo: change this when a floating point pixel format with luma with alpha is implemented */
int channel_count = s->channel_offsets[3] >= 0 ? 4 : rgb_channel_count;
if (s->is_luma) {
@@ -1373,9 +1183,7 @@
memset(ptr_x, 0, bxmin);
ptr_x += window_xoffset;
- if (s->pixel_type == EXR_FLOAT ||
- s->compression == EXR_DWAA ||
- s->compression == EXR_DWAB) {
+ if (s->pixel_type == EXR_FLOAT) {
// 32-bit
union av_intfloat32 t;
if (trc_func && c < 3) {
@@ -1384,18 +1192,13 @@
t.f = trc_func(t.f);
*ptr_x++ = t;
}
- } else if (one_gamma != 1.f) {
+ } else {
for (x = 0; x < xsize; x++) {
t.i = bytestream_get_le32(&src);
if (t.f > 0.0f && c < 3) /* avoid negative values */
t.f = powf(t.f, one_gamma);
*ptr_x++ = t;
}
- } else {
- for (x = 0; x < xsize; x++) {
- t.i = bytestream_get_le32(&src);
- *ptr_x++ = t;
- }
}
} else if (s->pixel_type == EXR_HALF) {
// 16-bit
@@ -1405,11 +1208,7 @@
}
} else {
for (x = 0; x < xsize; x++) {
- ptr_x[0].i = half2float(bytestream_get_le16(&src),
- s->mantissatable,
- s->exponenttable,
- s->offsettable);
- ptr_x++;
+ *ptr_x++ = exr_half2float(bytestream_get_le16(&src));;
}
}
}
@@ -1466,23 +1265,6 @@
return 0;
}
-static void skip_header_chunk(EXRContext *s)
-{
- GetByteContext *gb = &s->gb;
-
- while (bytestream2_get_bytes_left(gb) > 0) {
- if (!bytestream2_peek_byte(gb))
- break;
-
- // Process unknown variables
- for (int i = 0; i < 2; i++) // value_name and value_type
- while (bytestream2_get_byte(gb) != 0);
-
- // Skip variable length
- bytestream2_skip(gb, bytestream2_get_le32(gb));
- }
-}
-
/**
* Check if the variable name corresponds to its data type.
*
@@ -1500,22 +1282,21 @@
const char *value_type,
unsigned int minimum_length)
{
- GetByteContext *gb = &s->gb;
int var_size = -1;
- if (bytestream2_get_bytes_left(gb) >= minimum_length &&
- !strcmp(gb->buffer, value_name)) {
+ if (bytestream2_get_bytes_left(&s->gb) >= minimum_length &&
+ !strcmp(s->gb.buffer, value_name)) {
// found value_name, jump to value_type (null terminated strings)
- gb->buffer += strlen(value_name) + 1;
- if (!strcmp(gb->buffer, value_type)) {
- gb->buffer += strlen(value_type) + 1;
- var_size = bytestream2_get_le32(gb);
+ s->gb.buffer += strlen(value_name) + 1;
+ if (!strcmp(s->gb.buffer, value_type)) {
+ s->gb.buffer += strlen(value_type) + 1;
+ var_size = bytestream2_get_le32(&s->gb);
// don't go read past boundaries
- if (var_size > bytestream2_get_bytes_left(gb))
+ if (var_size > bytestream2_get_bytes_left(&s->gb))
var_size = 0;
} else {
// value_type not found, reset the buffer
- gb->buffer -= strlen(value_name) + 1;
+ s->gb.buffer -= strlen(value_name) + 1;
av_log(s->avctx, AV_LOG_WARNING,
"Unknown data type %s for header variable %s.\n",
value_type, value_name);
@@ -1528,8 +1309,7 @@
static int decode_header(EXRContext *s, AVFrame *frame)
{
AVDictionary *metadata = NULL;
- GetByteContext *gb = &s->gb;
- int magic_number, version, flags;
+ int magic_number, version, i, flags, sar = 0;
int layer_match = 0;
int ret;
int dup_channels = 0;
@@ -1553,16 +1333,14 @@
s->tile_attr.xSize = -1;
s->tile_attr.ySize = -1;
s->is_tile = 0;
- s->is_multipart = 0;
s->is_luma = 0;
- s->current_part = 0;
- if (bytestream2_get_bytes_left(gb) < 10) {
+ if (bytestream2_get_bytes_left(&s->gb) < 10) {
av_log(s->avctx, AV_LOG_ERROR, "Header too short to parse.\n");
return AVERROR_INVALIDDATA;
}
- magic_number = bytestream2_get_le32(gb);
+ magic_number = bytestream2_get_le32(&s->gb);
if (magic_number != 20000630) {
/* As per documentation of OpenEXR, it is supposed to be
* int 20000630 little-endian */
@@ -1570,60 +1348,28 @@
return AVERROR_INVALIDDATA;
}
- version = bytestream2_get_byte(gb);
+ version = bytestream2_get_byte(&s->gb);
if (version != 2) {
avpriv_report_missing_feature(s->avctx, "Version %d", version);
return AVERROR_PATCHWELCOME;
}
- flags = bytestream2_get_le24(gb);
+ flags = bytestream2_get_le24(&s->gb);
if (flags & 0x02)
s->is_tile = 1;
- if (flags & 0x10)
- s->is_multipart = 1;
if (flags & 0x08) {
avpriv_report_missing_feature(s->avctx, "deep data");
return AVERROR_PATCHWELCOME;
}
+ if (flags & 0x10) {
+ avpriv_report_missing_feature(s->avctx, "multipart");
+ return AVERROR_PATCHWELCOME;
+ }
// Parse the header
- while (bytestream2_get_bytes_left(gb) > 0) {
+ while (bytestream2_get_bytes_left(&s->gb) > 0 && *s->gb.buffer) {
int var_size;
-
- while (s->is_multipart && s->current_part < s->selected_part &&
- bytestream2_get_bytes_left(gb) > 0) {
- if (bytestream2_peek_byte(gb)) {
- skip_header_chunk(s);
- } else {
- bytestream2_skip(gb, 1);
- if (!bytestream2_peek_byte(gb))
- break;
- }
- bytestream2_skip(gb, 1);
- s->current_part++;
- }
-
- if (!bytestream2_peek_byte(gb)) {
- if (!s->is_multipart)
- break;
- bytestream2_skip(gb, 1);
- if (s->current_part == s->selected_part) {
- while (bytestream2_get_bytes_left(gb) > 0) {
- if (bytestream2_peek_byte(gb)) {
- skip_header_chunk(s);
- } else {
- bytestream2_skip(gb, 1);
- if (!bytestream2_peek_byte(gb))
- break;
- }
- }
- }
- if (!bytestream2_peek_byte(gb))
- break;
- s->current_part++;
- }
-
if ((var_size = check_header_variable(s, "channels",
"chlist", 38)) >= 0) {
GetByteContext ch_gb;
@@ -1632,7 +1378,7 @@
goto fail;
}
- bytestream2_init(&ch_gb, gb->buffer, var_size);
+ bytestream2_init(&ch_gb, s->gb.buffer, var_size);
while (bytestream2_get_bytes_left(&ch_gb) >= 19) {
EXRChannel *channel;
@@ -1769,7 +1515,7 @@
}
// skip one last byte and update main gb
- gb->buffer = ch_gb.buffer + 1;
+ s->gb.buffer = ch_gb.buffer + 1;
continue;
} else if ((var_size = check_header_variable(s, "dataWindow", "box2i",
31)) >= 0) {
@@ -1779,10 +1525,10 @@
goto fail;
}
- xmin = bytestream2_get_le32(gb);
- ymin = bytestream2_get_le32(gb);
- xmax = bytestream2_get_le32(gb);
- ymax = bytestream2_get_le32(gb);
+ xmin = bytestream2_get_le32(&s->gb);
+ ymin = bytestream2_get_le32(&s->gb);
+ xmax = bytestream2_get_le32(&s->gb);
+ ymax = bytestream2_get_le32(&s->gb);
if (xmin > xmax || ymin > ymax ||
(unsigned)xmax - xmin >= INT_MAX ||
@@ -1800,20 +1546,14 @@
continue;
} else if ((var_size = check_header_variable(s, "displayWindow",
"box2i", 34)) >= 0) {
- int32_t sx, sy, dx, dy;
-
if (!var_size) {
ret = AVERROR_INVALIDDATA;
goto fail;
}
- sx = bytestream2_get_le32(gb);
- sy = bytestream2_get_le32(gb);
- dx = bytestream2_get_le32(gb);
- dy = bytestream2_get_le32(gb);
-
- s->w = dx - sx + 1;
- s->h = dy - sy + 1;
+ bytestream2_skip(&s->gb, 8);
+ s->w = bytestream2_get_le32(&s->gb) + 1;
+ s->h = bytestream2_get_le32(&s->gb) + 1;
continue;
} else if ((var_size = check_header_variable(s, "lineOrder",
@@ -1824,7 +1564,7 @@
goto fail;
}
- line_order = bytestream2_get_byte(gb);
+ line_order = bytestream2_get_byte(&s->gb);
av_log(s->avctx, AV_LOG_DEBUG, "line order: %d.\n", line_order);
if (line_order > 2) {
av_log(s->avctx, AV_LOG_ERROR, "Unknown line order.\n");
@@ -1840,7 +1580,7 @@
goto fail;
}
- s->sar = bytestream2_get_le32(gb);
+ sar = bytestream2_get_le32(&s->gb);
continue;
} else if ((var_size = check_header_variable(s, "compression",
@@ -1851,12 +1591,10 @@
}
if (s->compression == EXR_UNKN)
- s->compression = bytestream2_get_byte(gb);
- else {
- bytestream2_skip(gb, 1);
+ s->compression = bytestream2_get_byte(&s->gb);
+ else
av_log(s->avctx, AV_LOG_WARNING,
"Found more than one compression attribute.\n");
- }
continue;
} else if ((var_size = check_header_variable(s, "tiles",
@@ -1867,10 +1605,10 @@
av_log(s->avctx, AV_LOG_WARNING,
"Found tile attribute and scanline flags. Exr will be interpreted as scanline.\n");
- s->tile_attr.xSize = bytestream2_get_le32(gb);
- s->tile_attr.ySize = bytestream2_get_le32(gb);
+ s->tile_attr.xSize = bytestream2_get_le32(&s->gb);
+ s->tile_attr.ySize = bytestream2_get_le32(&s->gb);
- tileLevel = bytestream2_get_byte(gb);
+ tileLevel = bytestream2_get_byte(&s->gb);
s->tile_attr.level_mode = tileLevel & 0x0f;
s->tile_attr.level_round = (tileLevel >> 4) & 0x0f;
@@ -1893,85 +1631,29 @@
"string", 1)) >= 0) {
uint8_t key[256] = { 0 };
- bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size));
+ bytestream2_get_buffer(&s->gb, key, FFMIN(sizeof(key) - 1, var_size));
av_dict_set(&metadata, "writer", key, 0);
continue;
- } else if ((var_size = check_header_variable(s, "framesPerSecond",
- "rational", 33)) >= 0) {
- if (!var_size) {
- ret = AVERROR_INVALIDDATA;
- goto fail;
- }
-
- s->avctx->framerate.num = bytestream2_get_le32(gb);
- s->avctx->framerate.den = bytestream2_get_le32(gb);
-
- continue;
- } else if ((var_size = check_header_variable(s, "chunkCount",
- "int", 23)) >= 0) {
-
- s->chunk_count = bytestream2_get_le32(gb);
-
- continue;
- } else if ((var_size = check_header_variable(s, "type",
- "string", 16)) >= 0) {
- uint8_t key[256] = { 0 };
-
- bytestream2_get_buffer(gb, key, FFMIN(sizeof(key) - 1, var_size));
- if (strncmp("scanlineimage", key, var_size) &&
- strncmp("tiledimage", key, var_size))
- return AVERROR_PATCHWELCOME;
-
- continue;
- } else if ((var_size = check_header_variable(s, "preview",
- "preview", 16)) >= 0) {
- uint32_t pw = bytestream2_get_le32(gb);
- uint32_t ph = bytestream2_get_le32(gb);
- int64_t psize = 4LL * pw * ph;
-
- if (psize >= bytestream2_get_bytes_left(gb))
- return AVERROR_INVALIDDATA;
-
- bytestream2_skip(gb, psize);
-
- continue;
}
// Check if there are enough bytes for a header
- if (bytestream2_get_bytes_left(gb) <= 9) {
+ if (bytestream2_get_bytes_left(&s->gb) <= 9) {
av_log(s->avctx, AV_LOG_ERROR, "Incomplete header\n");
ret = AVERROR_INVALIDDATA;
goto fail;
}
// Process unknown variables
- {
- uint8_t name[256] = { 0 };
- uint8_t type[256] = { 0 };
- uint8_t value[256] = { 0 };
- int i = 0, size;
+ for (i = 0; i < 2; i++) // value_name and value_type
+ while (bytestream2_get_byte(&s->gb) != 0);
- while (bytestream2_get_bytes_left(gb) > 0 &&
- bytestream2_peek_byte(gb) && i < 255) {
- name[i++] = bytestream2_get_byte(gb);
- }
-
- bytestream2_skip(gb, 1);
- i = 0;
- while (bytestream2_get_bytes_left(gb) > 0 &&
- bytestream2_peek_byte(gb) && i < 255) {
- type[i++] = bytestream2_get_byte(gb);
- }
- bytestream2_skip(gb, 1);
- size = bytestream2_get_le32(gb);
-
- bytestream2_get_buffer(gb, value, FFMIN(sizeof(value) - 1, size));
- if (!strcmp(type, "string"))
- av_dict_set(&metadata, name, value, 0);
- }
+ // Skip variable length
+ bytestream2_skip(&s->gb, bytestream2_get_le32(&s->gb));
}
+ ff_set_sar(s->avctx, av_d2q(av_int2float(sar), 255));
+
if (s->compression == EXR_UNKN) {
av_log(s->avctx, AV_LOG_ERROR, "Missing compression attribute.\n");
ret = AVERROR_INVALIDDATA;
@@ -1986,7 +1668,7 @@
}
}
- if (bytestream2_get_bytes_left(gb) <= 0) {
+ if (bytestream2_get_bytes_left(&s->gb) <= 0) {
av_log(s->avctx, AV_LOG_ERROR, "Incomplete frame.\n");
ret = AVERROR_INVALIDDATA;
goto fail;
@@ -1995,7 +1677,7 @@
frame->metadata = metadata;
// aaand we are done
- bytestream2_skip(gb, 1);
+ bytestream2_skip(&s->gb, 1);
return 0;
fail:
av_dict_free(&metadata);
@@ -2006,7 +1688,6 @@
int *got_frame, AVPacket *avpkt)
{
EXRContext *s = avctx->priv_data;
- GetByteContext *gb = &s->gb;
ThreadFrame frame = { .f = data };
AVFrame *picture = data;
uint8_t *ptr;
@@ -2019,18 +1700,11 @@
uint64_t start_next_scanline;
PutByteContext offset_table_writer;
- bytestream2_init(gb, avpkt->data, avpkt->size);
+ bytestream2_init(&s->gb, avpkt->data, avpkt->size);
if ((ret = decode_header(s, picture)) < 0)
return ret;
- if ((s->compression == EXR_DWAA || s->compression == EXR_DWAB) &&
- s->pixel_type == EXR_HALF) {
- s->current_channel_offset *= 2;
- for (int i = 0; i < 4; i++)
- s->channel_offsets[i] *= 2;
- }
-
switch (s->pixel_type) {
case EXR_FLOAT:
case EXR_HALF:
@@ -2085,12 +1759,8 @@
case EXR_PIZ:
case EXR_B44:
case EXR_B44A:
- case EXR_DWAA:
s->scan_lines_per_block = 32;
break;
- case EXR_DWAB:
- s->scan_lines_per_block = 256;
- break;
default:
avpriv_report_missing_feature(avctx, "Compression %d", s->compression);
return AVERROR_PATCHWELCOME;
@@ -2107,8 +1777,6 @@
if ((ret = ff_set_dimensions(avctx, s->w, s->h)) < 0)
return ret;
- ff_set_sar(s->avctx, av_d2q(av_int2float(s->sar), 255));
-
s->desc = av_pix_fmt_desc_get(avctx->pix_fmt);
if (!s->desc)
return AVERROR_INVALIDDATA;
@@ -2132,14 +1800,14 @@
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
return ret;
- if (bytestream2_get_bytes_left(gb)/8 < nb_blocks)
+ if (bytestream2_get_bytes_left(&s->gb)/8 < nb_blocks)
return AVERROR_INVALIDDATA;
// check offset table and recreate it if need
- if (!s->is_tile && bytestream2_peek_le64(gb) == 0) {
+ if (!s->is_tile && bytestream2_peek_le64(&s->gb) == 0) {
av_log(s->avctx, AV_LOG_DEBUG, "recreating invalid scanline offset table\n");
- start_offset_table = bytestream2_tell(gb);
+ start_offset_table = bytestream2_tell(&s->gb);
start_next_scanline = start_offset_table + nb_blocks * 8;
bytestream2_init_writer(&offset_table_writer, &avpkt->data[start_offset_table], nb_blocks * 8);
@@ -2148,10 +1816,10 @@
bytestream2_put_le64(&offset_table_writer, start_next_scanline);
/* get len of next scanline */
- bytestream2_seek(gb, start_next_scanline + 4, SEEK_SET);/* skip line number */
- start_next_scanline += (bytestream2_get_le32(gb) + 8);
+ bytestream2_seek(&s->gb, start_next_scanline + 4, SEEK_SET);/* skip line number */
+ start_next_scanline += (bytestream2_get_le32(&s->gb) + 8);
}
- bytestream2_seek(gb, start_offset_table, SEEK_SET);
+ bytestream2_seek(&s->gb, start_offset_table, SEEK_SET);
}
// save pointer we are going to use in decode_block
@@ -2196,8 +1864,6 @@
float one_gamma = 1.0f / s->gamma;
avpriv_trc_function trc_func = NULL;
- half2float_table(s->mantissatable, s->exponenttable, s->offsettable);
-
s->avctx = avctx;
ff_exrdsp_init(&s->dsp);
@@ -2209,18 +1875,18 @@
trc_func = avpriv_get_trc_function_from_trc(s->apply_trc_type);
if (trc_func) {
for (i = 0; i < 65536; ++i) {
- t.i = half2float(i, s->mantissatable, s->exponenttable, s->offsettable);
+ t = exr_half2float(i);
t.f = trc_func(t.f);
s->gamma_table[i] = t;
}
} else {
if (one_gamma > 0.9999f && one_gamma < 1.0001f) {
for (i = 0; i < 65536; ++i) {
- s->gamma_table[i].i = half2float(i, s->mantissatable, s->exponenttable, s->offsettable);
+ s->gamma_table[i] = exr_half2float(i);
}
} else {
for (i = 0; i < 65536; ++i) {
- t.i = half2float(i, s->mantissatable, s->exponenttable, s->offsettable);
+ t = exr_half2float(i);
/* If negative value we reuse half value */
if (t.f <= 0.0f) {
s->gamma_table[i] = t;
@@ -2250,13 +1916,6 @@
av_freep(&td->tmp);
av_freep(&td->bitmap);
av_freep(&td->lut);
- av_freep(&td->he);
- av_freep(&td->freq);
- av_freep(&td->ac_data);
- av_freep(&td->dc_data);
- av_freep(&td->rle_data);
- av_freep(&td->rle_raw_data);
- ff_free_vlc(&td->vlc);
}
av_freep(&s->thread_data);
@@ -2270,8 +1929,6 @@
static const AVOption options[] = {
{ "layer", "Set the decoding layer", OFFSET(layer),
AV_OPT_TYPE_STRING, { .str = "" }, 0, 0, VD },
- { "part", "Set the decoding part", OFFSET(selected_part),
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VD },
{ "gamma", "Set the float gamma value when decoding", OFFSET(gamma),
AV_OPT_TYPE_FLOAT, { .dbl = 1.0f }, 0.001, FLT_MAX, VD },
diff --git a/libavcodec/exrenc.c b/libavcodec/exrenc.c
deleted file mode 100644
index db9000a..0000000
--- a/libavcodec/exrenc.c
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-/**
- * @file
- * OpenEXR encoder
- */
-
-#include <float.h>
-#include <zlib.h>
-
-#include "libavutil/avassert.h"
-#include "libavutil/opt.h"
-#include "libavutil/intreadwrite.h"
-#include "libavutil/imgutils.h"
-#include "libavutil/pixdesc.h"
-#include "avcodec.h"
-#include "bytestream.h"
-#include "internal.h"
-#include "float2half.h"
-
-enum ExrCompr {
- EXR_RAW,
- EXR_RLE,
- EXR_ZIP1,
- EXR_ZIP16,
- EXR_NBCOMPR,
-};
-
-enum ExrPixelType {
- EXR_UINT,
- EXR_HALF,
- EXR_FLOAT,
- EXR_UNKNOWN,
-};
-
-static const char abgr_chlist[4] = { 'A', 'B', 'G', 'R' };
-static const char bgr_chlist[4] = { 'B', 'G', 'R', 'A' };
-static const uint8_t gbra_order[4] = { 3, 1, 0, 2 };
-static const uint8_t gbr_order[4] = { 1, 0, 2, 0 };
-
-typedef struct EXRScanlineData {
- uint8_t *compressed_data;
- unsigned int compressed_size;
-
- uint8_t *uncompressed_data;
- unsigned int uncompressed_size;
-
- uint8_t *tmp;
- unsigned int tmp_size;
-
- int64_t actual_size;
-} EXRScanlineData;
-
-typedef struct EXRContext {
- const AVClass *class;
-
- int compression;
- int pixel_type;
- int planes;
- int nb_scanlines;
- int scanline_height;
- float gamma;
- const char *ch_names;
- const uint8_t *ch_order;
- PutByteContext pb;
-
- EXRScanlineData *scanline;
-
- uint16_t basetable[512];
- uint8_t shifttable[512];
-} EXRContext;
-
-static int encode_init(AVCodecContext *avctx)
-{
- EXRContext *s = avctx->priv_data;
-
- float2half_tables(s->basetable, s->shifttable);
-
- switch (avctx->pix_fmt) {
- case AV_PIX_FMT_GBRPF32:
- s->planes = 3;
- s->ch_names = bgr_chlist;
- s->ch_order = gbr_order;
- break;
- case AV_PIX_FMT_GBRAPF32:
- s->planes = 4;
- s->ch_names = abgr_chlist;
- s->ch_order = gbra_order;
- break;
- default:
- av_assert0(0);
- }
-
- switch (s->compression) {
- case EXR_RAW:
- case EXR_RLE:
- case EXR_ZIP1:
- s->scanline_height = 1;
- s->nb_scanlines = avctx->height;
- break;
- case EXR_ZIP16:
- s->scanline_height = 16;
- s->nb_scanlines = (avctx->height + s->scanline_height - 1) / s->scanline_height;
- break;
- default:
- av_assert0(0);
- }
-
- s->scanline = av_calloc(s->nb_scanlines, sizeof(*s->scanline));
- if (!s->scanline)
- return AVERROR(ENOMEM);
-
- return 0;
-}
-
-static int encode_close(AVCodecContext *avctx)
-{
- EXRContext *s = avctx->priv_data;
-
- for (int y = 0; y < s->nb_scanlines && s->scanline; y++) {
- EXRScanlineData *scanline = &s->scanline[y];
-
- av_freep(&scanline->tmp);
- av_freep(&scanline->compressed_data);
- av_freep(&scanline->uncompressed_data);
- }
-
- av_freep(&s->scanline);
-
- return 0;
-}
-
-static void reorder_pixels(uint8_t *dst, const uint8_t *src, ptrdiff_t size)
-{
- const ptrdiff_t half_size = (size + 1) / 2;
- uint8_t *t1 = dst;
- uint8_t *t2 = dst + half_size;
-
- for (ptrdiff_t i = 0; i < half_size; i++) {
- t1[i] = *(src++);
- t2[i] = *(src++);
- }
-}
-
-static void predictor(uint8_t *src, ptrdiff_t size)
-{
- int p = src[0];
-
- for (ptrdiff_t i = 1; i < size; i++) {
- int d = src[i] - p + 384;
-
- p = src[i];
- src[i] = d;
- }
-}
-
-static int64_t rle_compress(uint8_t *out, int64_t out_size,
- const uint8_t *in, int64_t in_size)
-{
- int64_t i = 0, o = 0, run = 1, copy = 0;
-
- while (i < in_size) {
- while (i + run < in_size && in[i] == in[i + run] && run < 128)
- run++;
-
- if (run >= 3) {
- if (o + 2 >= out_size)
- return -1;
- out[o++] = run - 1;
- out[o++] = in[i];
- i += run;
- } else {
- if (i + run < in_size)
- copy += run;
- while (i + copy < in_size && copy < 127 && in[i + copy] != in[i + copy - 1])
- copy++;
-
- if (o + 1 + copy >= out_size)
- return -1;
- out[o++] = -copy;
-
- for (int x = 0; x < copy; x++)
- out[o + x] = in[i + x];
-
- o += copy;
- i += copy;
- copy = 0;
- }
-
- run = 1;
- }
-
- return o;
-}
-
-static int encode_scanline_rle(EXRContext *s, const AVFrame *frame)
-{
- const int64_t element_size = s->pixel_type == EXR_HALF ? 2LL : 4LL;
-
- for (int y = 0; y < frame->height; y++) {
- EXRScanlineData *scanline = &s->scanline[y];
- int64_t tmp_size = element_size * s->planes * frame->width;
- int64_t max_compressed_size = tmp_size * 3 / 2;
-
- av_fast_padded_malloc(&scanline->uncompressed_data, &scanline->uncompressed_size, tmp_size);
- if (!scanline->uncompressed_data)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&scanline->tmp, &scanline->tmp_size, tmp_size);
- if (!scanline->tmp)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&scanline->compressed_data, &scanline->compressed_size, max_compressed_size);
- if (!scanline->compressed_data)
- return AVERROR(ENOMEM);
-
- switch (s->pixel_type) {
- case EXR_FLOAT:
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
-
- memcpy(scanline->uncompressed_data + frame->width * 4 * p,
- frame->data[ch] + y * frame->linesize[ch], frame->width * 4);
- }
- break;
- case EXR_HALF:
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
- uint16_t *dst = (uint16_t *)(scanline->uncompressed_data + frame->width * 2 * p);
- uint32_t *src = (uint32_t *)(frame->data[ch] + y * frame->linesize[ch]);
-
- for (int x = 0; x < frame->width; x++)
- dst[x] = float2half(src[x], s->basetable, s->shifttable);
- }
- break;
- }
-
- reorder_pixels(scanline->tmp, scanline->uncompressed_data, tmp_size);
- predictor(scanline->tmp, tmp_size);
- scanline->actual_size = rle_compress(scanline->compressed_data,
- max_compressed_size,
- scanline->tmp, tmp_size);
-
- if (scanline->actual_size <= 0 || scanline->actual_size >= tmp_size) {
- FFSWAP(uint8_t *, scanline->uncompressed_data, scanline->compressed_data);
- FFSWAP(int, scanline->uncompressed_size, scanline->compressed_size);
- scanline->actual_size = tmp_size;
- }
- }
-
- return 0;
-}
-
-static int encode_scanline_zip(EXRContext *s, const AVFrame *frame)
-{
- const int64_t element_size = s->pixel_type == EXR_HALF ? 2LL : 4LL;
-
- for (int y = 0; y < s->nb_scanlines; y++) {
- EXRScanlineData *scanline = &s->scanline[y];
- const int scanline_height = FFMIN(s->scanline_height, frame->height - y * s->scanline_height);
- int64_t tmp_size = element_size * s->planes * frame->width * scanline_height;
- int64_t max_compressed_size = tmp_size * 3 / 2;
- unsigned long actual_size, source_size;
-
- av_fast_padded_malloc(&scanline->uncompressed_data, &scanline->uncompressed_size, tmp_size);
- if (!scanline->uncompressed_data)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&scanline->tmp, &scanline->tmp_size, tmp_size);
- if (!scanline->tmp)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&scanline->compressed_data, &scanline->compressed_size, max_compressed_size);
- if (!scanline->compressed_data)
- return AVERROR(ENOMEM);
-
- switch (s->pixel_type) {
- case EXR_FLOAT:
- for (int l = 0; l < scanline_height; l++) {
- const int scanline_size = frame->width * 4 * s->planes;
-
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
-
- memcpy(scanline->uncompressed_data + scanline_size * l + p * frame->width * 4,
- frame->data[ch] + (y * s->scanline_height + l) * frame->linesize[ch],
- frame->width * 4);
- }
- }
- break;
- case EXR_HALF:
- for (int l = 0; l < scanline_height; l++) {
- const int scanline_size = frame->width * 2 * s->planes;
-
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
- uint16_t *dst = (uint16_t *)(scanline->uncompressed_data + scanline_size * l + p * frame->width * 2);
- uint32_t *src = (uint32_t *)(frame->data[ch] + (y * s->scanline_height + l) * frame->linesize[ch]);
-
- for (int x = 0; x < frame->width; x++)
- dst[x] = float2half(src[x], s->basetable, s->shifttable);
- }
- }
- break;
- }
-
- reorder_pixels(scanline->tmp, scanline->uncompressed_data, tmp_size);
- predictor(scanline->tmp, tmp_size);
- source_size = tmp_size;
- actual_size = max_compressed_size;
- compress(scanline->compressed_data, &actual_size,
- scanline->tmp, source_size);
-
- scanline->actual_size = actual_size;
- if (scanline->actual_size >= tmp_size) {
- FFSWAP(uint8_t *, scanline->uncompressed_data, scanline->compressed_data);
- FFSWAP(int, scanline->uncompressed_size, scanline->compressed_size);
- scanline->actual_size = tmp_size;
- }
- }
-
- return 0;
-}
-
-static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
- const AVFrame *frame, int *got_packet)
-{
- EXRContext *s = avctx->priv_data;
- PutByteContext *pb = &s->pb;
- int64_t offset;
- int ret;
- int64_t out_size = 2048LL + avctx->height * 16LL +
- av_image_get_buffer_size(avctx->pix_fmt,
- avctx->width,
- avctx->height, 64) * 3LL / 2;
-
- if ((ret = ff_alloc_packet2(avctx, pkt, out_size, out_size)) < 0)
- return ret;
-
- bytestream2_init_writer(pb, pkt->data, pkt->size);
-
- bytestream2_put_le32(pb, 20000630);
- bytestream2_put_byte(pb, 2);
- bytestream2_put_le24(pb, 0);
- bytestream2_put_buffer(pb, "channels\0chlist\0", 16);
- bytestream2_put_le32(pb, s->planes * 18 + 1);
-
- for (int p = 0; p < s->planes; p++) {
- bytestream2_put_byte(pb, s->ch_names[p]);
- bytestream2_put_byte(pb, 0);
- bytestream2_put_le32(pb, s->pixel_type);
- bytestream2_put_le32(pb, 0);
- bytestream2_put_le32(pb, 1);
- bytestream2_put_le32(pb, 1);
- }
- bytestream2_put_byte(pb, 0);
-
- bytestream2_put_buffer(pb, "compression\0compression\0", 24);
- bytestream2_put_le32(pb, 1);
- bytestream2_put_byte(pb, s->compression);
-
- bytestream2_put_buffer(pb, "dataWindow\0box2i\0", 17);
- bytestream2_put_le32(pb, 16);
- bytestream2_put_le32(pb, 0);
- bytestream2_put_le32(pb, 0);
- bytestream2_put_le32(pb, avctx->width - 1);
- bytestream2_put_le32(pb, avctx->height - 1);
-
- bytestream2_put_buffer(pb, "displayWindow\0box2i\0", 20);
- bytestream2_put_le32(pb, 16);
- bytestream2_put_le32(pb, 0);
- bytestream2_put_le32(pb, 0);
- bytestream2_put_le32(pb, avctx->width - 1);
- bytestream2_put_le32(pb, avctx->height - 1);
-
- bytestream2_put_buffer(pb, "lineOrder\0lineOrder\0", 20);
- bytestream2_put_le32(pb, 1);
- bytestream2_put_byte(pb, 0);
-
- bytestream2_put_buffer(pb, "screenWindowCenter\0v2f\0", 23);
- bytestream2_put_le32(pb, 8);
- bytestream2_put_le64(pb, 0);
-
- bytestream2_put_buffer(pb, "screenWindowWidth\0float\0", 24);
- bytestream2_put_le32(pb, 4);
- bytestream2_put_le32(pb, av_float2int(1.f));
-
- if (avctx->sample_aspect_ratio.num && avctx->sample_aspect_ratio.den) {
- bytestream2_put_buffer(pb, "pixelAspectRatio\0float\0", 23);
- bytestream2_put_le32(pb, 4);
- bytestream2_put_le32(pb, av_float2int(av_q2d(avctx->sample_aspect_ratio)));
- }
-
- if (avctx->framerate.num && avctx->framerate.den) {
- bytestream2_put_buffer(pb, "framesPerSecond\0rational\0", 25);
- bytestream2_put_le32(pb, 8);
- bytestream2_put_le32(pb, avctx->framerate.num);
- bytestream2_put_le32(pb, avctx->framerate.den);
- }
-
- bytestream2_put_buffer(pb, "gamma\0float\0", 12);
- bytestream2_put_le32(pb, 4);
- bytestream2_put_le32(pb, av_float2int(s->gamma));
-
- bytestream2_put_buffer(pb, "writer\0string\0", 14);
- bytestream2_put_le32(pb, 4);
- bytestream2_put_buffer(pb, "lavc", 4);
- bytestream2_put_byte(pb, 0);
-
- switch (s->compression) {
- case EXR_RAW:
- /* nothing to do */
- break;
- case EXR_RLE:
- encode_scanline_rle(s, frame);
- break;
- case EXR_ZIP16:
- case EXR_ZIP1:
- encode_scanline_zip(s, frame);
- break;
- default:
- av_assert0(0);
- }
-
- switch (s->compression) {
- case EXR_RAW:
- offset = bytestream2_tell_p(pb) + avctx->height * 8LL;
-
- if (s->pixel_type == EXR_FLOAT) {
-
- for (int y = 0; y < avctx->height; y++) {
- bytestream2_put_le64(pb, offset);
- offset += avctx->width * s->planes * 4 + 8;
- }
-
- for (int y = 0; y < avctx->height; y++) {
- bytestream2_put_le32(pb, y);
- bytestream2_put_le32(pb, s->planes * avctx->width * 4);
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
- bytestream2_put_buffer(pb, frame->data[ch] + y * frame->linesize[ch],
- avctx->width * 4);
- }
- }
- } else {
- for (int y = 0; y < avctx->height; y++) {
- bytestream2_put_le64(pb, offset);
- offset += avctx->width * s->planes * 2 + 8;
- }
-
- for (int y = 0; y < avctx->height; y++) {
- bytestream2_put_le32(pb, y);
- bytestream2_put_le32(pb, s->planes * avctx->width * 2);
- for (int p = 0; p < s->planes; p++) {
- int ch = s->ch_order[p];
- uint32_t *src = (uint32_t *)(frame->data[ch] + y * frame->linesize[ch]);
-
- for (int x = 0; x < frame->width; x++)
- bytestream2_put_le16(pb, float2half(src[x], s->basetable, s->shifttable));
- }
- }
- }
- break;
- case EXR_ZIP16:
- case EXR_ZIP1:
- case EXR_RLE:
- offset = bytestream2_tell_p(pb) + s->nb_scanlines * 8LL;
-
- for (int y = 0; y < s->nb_scanlines; y++) {
- EXRScanlineData *scanline = &s->scanline[y];
-
- bytestream2_put_le64(pb, offset);
- offset += scanline->actual_size + 8;
- }
-
- for (int y = 0; y < s->nb_scanlines; y++) {
- EXRScanlineData *scanline = &s->scanline[y];
-
- bytestream2_put_le32(pb, y * s->scanline_height);
- bytestream2_put_le32(pb, scanline->actual_size);
- bytestream2_put_buffer(pb, scanline->compressed_data,
- scanline->actual_size);
- }
- break;
- default:
- av_assert0(0);
- }
-
- av_shrink_packet(pkt, bytestream2_tell_p(pb));
-
- pkt->flags |= AV_PKT_FLAG_KEY;
- *got_packet = 1;
-
- return 0;
-}
-
-#define OFFSET(x) offsetof(EXRContext, x)
-#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
-static const AVOption options[] = {
- { "compression", "set compression type", OFFSET(compression), AV_OPT_TYPE_INT, {.i64=0}, 0, EXR_NBCOMPR-1, VE, "compr" },
- { "none", "none", 0, AV_OPT_TYPE_CONST, {.i64=EXR_RAW}, 0, 0, VE, "compr" },
- { "rle" , "RLE", 0, AV_OPT_TYPE_CONST, {.i64=EXR_RLE}, 0, 0, VE, "compr" },
- { "zip1", "ZIP1", 0, AV_OPT_TYPE_CONST, {.i64=EXR_ZIP1}, 0, 0, VE, "compr" },
- { "zip16", "ZIP16", 0, AV_OPT_TYPE_CONST, {.i64=EXR_ZIP16}, 0, 0, VE, "compr" },
- { "format", "set pixel type", OFFSET(pixel_type), AV_OPT_TYPE_INT, {.i64=EXR_FLOAT}, EXR_HALF, EXR_UNKNOWN-1, VE, "pixel" },
- { "half" , NULL, 0, AV_OPT_TYPE_CONST, {.i64=EXR_HALF}, 0, 0, VE, "pixel" },
- { "float", NULL, 0, AV_OPT_TYPE_CONST, {.i64=EXR_FLOAT}, 0, 0, VE, "pixel" },
- { "gamma", "set gamma", OFFSET(gamma), AV_OPT_TYPE_FLOAT, {.dbl=1.f}, 0.001, FLT_MAX, VE },
- { NULL},
-};
-
-static const AVClass exr_class = {
- .class_name = "exr",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
-AVCodec ff_exr_encoder = {
- .name = "exr",
- .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"),
- .priv_data_size = sizeof(EXRContext),
- .priv_class = &exr_class,
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_EXR,
- .init = encode_init,
- .encode2 = encode_frame,
- .close = encode_close,
- .capabilities = AV_CODEC_CAP_FRAME_THREADS,
- .pix_fmts = (const enum AVPixelFormat[]) {
- AV_PIX_FMT_GBRPF32,
- AV_PIX_FMT_GBRAPF32,
- AV_PIX_FMT_NONE },
-};
diff --git a/libavcodec/fastaudio.c b/libavcodec/fastaudio.c
index 9de42d2..1dda310 100644
--- a/libavcodec/fastaudio.c
+++ b/libavcodec/fastaudio.c
@@ -1,7 +1,5 @@
/*
* MOFLEX Fast Audio decoder
- * Copyright (c) 2015-2016 Florian Nouwt
- * Copyright (c) 2017 Adib Surani
* Copyright (c) 2020 Paul B Mahol
*
* This file is part of FFmpeg.
@@ -91,7 +89,7 @@
pos = *ppos;
pos += bits;
- r = src[(pos - 1) / 32] >> ((-pos) & 31);
+ r = src[(pos - 1) / 32] >> (32 - pos % 32);
*ppos = pos;
return r & ((1 << bits) - 1);
diff --git a/libavcodec/fft-internal.h b/libavcodec/fft-internal.h
index 3bd5a11..0a8f7d0 100644
--- a/libavcodec/fft-internal.h
+++ b/libavcodec/fft-internal.h
@@ -34,7 +34,7 @@
(dim) = (are) * (bim) + (aim) * (bre); \
} while (0)
-#else /* FFT_FLOAT */
+#else
#define SCALE_FLOAT(a, bits) lrint((a) * (double)(1 << (bits)))
@@ -52,6 +52,33 @@
#define FIX15(a) av_clip(SCALE_FLOAT(a, 31), -2147483647, 2147483647)
+#else /* FFT_FIXED_32 */
+
+#include "fft.h"
+#include "mathops.h"
+
+void ff_mdct_calcw_c(FFTContext *s, FFTDouble *output, const FFTSample *input);
+
+#define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767)
+
+#define sqrthalf ((int16_t)((1<<15)*M_SQRT1_2))
+
+#define BF(x, y, a, b) do { \
+ x = (a - b) >> 1; \
+ y = (a + b) >> 1; \
+ } while (0)
+
+#define CMULS(dre, dim, are, aim, bre, bim, sh) do { \
+ (dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> sh; \
+ (dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> sh; \
+ } while (0)
+
+#define CMUL(dre, dim, are, aim, bre, bim) \
+ CMULS(dre, dim, are, aim, bre, bim, 15)
+
+#define CMULL(dre, dim, are, aim, bre, bim) \
+ CMULS(dre, dim, are, aim, bre, bim, 0)
+
#endif /* FFT_FIXED_32 */
#endif /* FFT_FLOAT */
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index e03ca01..c858570 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -32,8 +32,7 @@
#include <stdint.h>
#include "config.h"
-
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#if FFT_FLOAT
@@ -52,6 +51,12 @@
typedef int32_t FFTSample;
+#else /* FFT_FIXED_32 */
+
+#define FFT_NAME(x) x ## _fixed
+
+typedef int16_t FFTSample;
+
#endif /* FFT_FIXED_32 */
typedef struct FFTComplex {
@@ -102,6 +107,7 @@
void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
+ void (*mdct_calcw)(struct FFTContext *s, FFTDouble *output, const FFTSample *input);
enum fft_permutation_type fft_permutation;
enum mdct_permutation_type mdct_permutation;
uint32_t *revtab32;
@@ -109,16 +115,8 @@
#if CONFIG_HARDCODED_TABLES
#define COSTABLE_CONST const
-#define ff_init_ff_cos_tabs(index)
#else
#define COSTABLE_CONST
-#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs)
-
-/**
- * Initialize the cosine table in ff_cos_tabs[index]
- * @param index index in ff_cos_tabs array of the table to initialize
- */
-void ff_init_ff_cos_tabs(int index);
#endif
#define COSTABLE(size) \
@@ -140,6 +138,14 @@
extern COSTABLE(131072);
extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[18];
+#define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs)
+
+/**
+ * Initialize the cosine table in ff_cos_tabs[index]
+ * @param index index in ff_cos_tabs array of the table to initialize
+ */
+void ff_init_ff_cos_tabs(int index);
+
#define ff_fft_init FFT_NAME(ff_fft_init)
#define ff_fft_end FFT_NAME(ff_fft_end)
@@ -156,6 +162,8 @@
void ff_fft_init_mips(FFTContext *s);
void ff_fft_init_ppc(FFTContext *s);
+void ff_fft_fixed_init_arm(FFTContext *s);
+
void ff_fft_end(FFTContext *s);
#define ff_mdct_init FFT_NAME(ff_mdct_init)
diff --git a/libavcodec/ttmlenc.h b/libavcodec/fft_fixed.c
similarity index 71%
copy from libavcodec/ttmlenc.h
copy to libavcodec/fft_fixed.c
index c1dd5ec..3d3bd2f 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/fft_fixed.c
@@ -1,7 +1,4 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
- *
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@@ -19,10 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
-
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
-
-#endif /* AVCODEC_TTMLENC_H */
+#define FFT_FLOAT 0
+#define FFT_FIXED_32 0
+#include "fft_template.c"
diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c
index 3012372..8825e39 100644
--- a/libavcodec/fft_template.c
+++ b/libavcodec/fft_template.c
@@ -113,10 +113,6 @@
{ init_ff_cos_tabs_131072, AV_ONCE_INIT },
};
-av_cold void ff_init_ff_cos_tabs(int index)
-{
- ff_thread_once(&cos_tabs_init_once[index].control, cos_tabs_init_once[index].func);
-}
#endif
COSTABLE_CONST FFTSample * const FFT_NAME(ff_cos_tabs)[] = {
NULL, NULL, NULL, NULL,
@@ -152,6 +148,12 @@
else return split_radix_permutation(i, m, inverse)*4 - 1;
}
+av_cold void ff_init_ff_cos_tabs(int index)
+{
+#if (!CONFIG_HARDCODED_TABLES) && (!FFT_FIXED_32)
+ ff_thread_once(&cos_tabs_init_once[index].control, cos_tabs_init_once[index].func);
+#endif
+}
static const int avx_tab[] = {
0, 4, 1, 5, 8, 12, 9, 13, 2, 6, 3, 7, 10, 14, 11, 15
@@ -234,7 +236,11 @@
if (ARCH_ARM) ff_fft_init_arm(s);
if (ARCH_PPC) ff_fft_init_ppc(s);
if (ARCH_X86) ff_fft_init_x86(s);
+ if (CONFIG_MDCT) s->mdct_calcw = s->mdct_calc;
if (HAVE_MIPSFPU) ff_fft_init_mips(s);
+#else
+ if (CONFIG_MDCT) s->mdct_calcw = ff_mdct_calcw_c;
+ if (ARCH_ARM) ff_fft_fixed_init_arm(s);
#endif
for(j=4; j<=nbits; j++) {
ff_init_ff_cos_tabs(j);
@@ -242,7 +248,7 @@
#endif /* FFT_FIXED_32 */
- if (ARCH_X86 && FFT_FLOAT && s->fft_permutation == FF_FFT_PERM_AVX) {
+ if (s->fft_permutation == FF_FFT_PERM_AVX) {
fft_perm_avx(s);
} else {
#define PROCESS_FFT_PERM_SWAP_LSBS(num) do {\
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 0a3f425..c704373 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -786,7 +786,7 @@
if (f->version == 2) {
int idx = get_symbol(c, state, 0);
- if (idx >= (unsigned)f->quant_table_count) {
+ if (idx > (unsigned)f->quant_table_count) {
av_log(f->avctx, AV_LOG_ERROR,
"quant_table_index out of range\n");
return AVERROR_INVALIDDATA;
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index ef5f3f4..95baaed 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -22,7 +22,6 @@
*/
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/fits.c b/libavcodec/fits.c
index 97fa7ab..25c33e0 100644
--- a/libavcodec/fits.c
+++ b/libavcodec/fits.c
@@ -205,12 +205,8 @@
} else if (!strcmp(keyword, "GROUPS") && sscanf(value, "%c", &c) == 1) {
header->groups = (c == 'T');
} else if (!strcmp(keyword, "GCOUNT") && sscanf(value, "%"SCNd64"", &t) == 1) {
- if (t < 0 || t > INT_MAX)
- return AVERROR_INVALIDDATA;
header->gcount = t;
} else if (!strcmp(keyword, "PCOUNT") && sscanf(value, "%"SCNd64"", &t) == 1) {
- if (t < 0 || t > INT_MAX)
- return AVERROR_INVALIDDATA;
header->pcount = t;
}
dict_set_if_not_null(metadata, keyword, value);
diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c
index 802aa5b..32a79cd 100644
--- a/libavcodec/fitsdec.c
+++ b/libavcodec/fitsdec.c
@@ -63,7 +63,7 @@
int i, j;
header->data_min = DBL_MAX;
- header->data_max = -DBL_MAX;
+ header->data_max = DBL_MIN;
switch (header->bitpix) {
#define CASE_N(a, t, rd) \
case a: \
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 9481f80..f55cb0f 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -179,7 +179,7 @@
return 0;
}
-static int flashsv_decode_block(AVCodecContext *avctx, const AVPacket *avpkt,
+static int flashsv_decode_block(AVCodecContext *avctx, AVPacket *avpkt,
GetBitContext *gb, int block_size,
int width, int height, int x_pos, int y_pos,
int blk_idx)
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 430b680..6603d0d 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -142,7 +142,6 @@
{
int row, col;
Block *b;
- memset(blocks, 0, s->cols * s->rows * sizeof(*blocks));
for (col = 0; col < s->cols; col++) {
for (row = 0; row < s->rows; row++) {
b = blocks + (col + row * s->cols);
@@ -175,33 +174,6 @@
#endif
}
-static int update_block_dimensions(FlashSV2Context *s, int block_width, int block_height)
-{
- s->block_width = block_width;
- s->block_height = block_height;
- s->rows = (s->image_height + s->block_height - 1) / s->block_height;
- s->cols = (s->image_width + s->block_width - 1) / s->block_width;
- if (s->rows * s->cols > s->blocks_size / sizeof(Block)) {
- s->frame_blocks = av_realloc_array(s->frame_blocks, s->rows, s->cols * sizeof(Block));
- s->key_blocks = av_realloc_array(s->key_blocks, s->cols, s->rows * sizeof(Block));
- if (!s->frame_blocks || !s->key_blocks) {
- av_log(s->avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
- return AVERROR(ENOMEM);
- }
- s->blocks_size = s->rows * s->cols * sizeof(Block);
- }
- init_blocks(s, s->frame_blocks, s->encbuffer, s->databuffer);
- init_blocks(s, s->key_blocks, s->keybuffer, 0);
-
- av_fast_malloc(&s->blockbuffer, &s->blockbuffer_size, block_width * block_height * 6);
- if (!s->blockbuffer) {
- av_log(s->avctx, AV_LOG_ERROR, "Could not allocate block buffer.\n");
- return AVERROR(ENOMEM);
- }
- return 0;
-}
-
-
static av_cold int flashsv2_encode_init(AVCodecContext * avctx)
{
FlashSV2Context *s = avctx->priv_data;
@@ -239,19 +211,39 @@
s->image_width = avctx->width;
s->image_height = avctx->height;
+ s->block_width = (s->image_width / 12) & ~15;
+ s->block_height = (s->image_height / 12) & ~15;
+
+ if(!s->block_width)
+ s->block_width = 1;
+ if(!s->block_height)
+ s->block_height = 1;
+
+ s->rows = (s->image_height + s->block_height - 1) / s->block_height;
+ s->cols = (s->image_width + s->block_width - 1) / s->block_width;
+
s->frame_size = s->image_width * s->image_height * 3;
+ s->blocks_size = s->rows * s->cols * sizeof(Block);
s->encbuffer = av_mallocz(s->frame_size);
s->keybuffer = av_mallocz(s->frame_size);
s->databuffer = av_mallocz(s->frame_size * 6);
s->current_frame = av_mallocz(s->frame_size);
s->key_frame = av_mallocz(s->frame_size);
+ s->frame_blocks = av_mallocz(s->blocks_size);
+ s->key_blocks = av_mallocz(s->blocks_size);
if (!s->encbuffer || !s->keybuffer || !s->databuffer
- || !s->current_frame || !s->key_frame) {
+ || !s->current_frame || !s->key_frame || !s->key_blocks
+ || !s->frame_blocks) {
av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
return AVERROR(ENOMEM);
}
+ s->blockbuffer = NULL;
+ s->blockbuffer_size = 0;
+
+ init_blocks(s, s->frame_blocks, s->encbuffer, s->databuffer);
+ init_blocks(s, s->key_blocks, s->keybuffer, 0);
reset_stats(s);
#ifndef FLASHSV2_DUMB
s->total_bits = 1;
@@ -260,7 +252,7 @@
s->use_custom_palette = 0;
s->palette_type = -1; // so that the palette will be generated in reconfigure_at_keyframe
- return update_block_dimensions(s, 64, 64);
+ return 0;
}
static int new_key_frame(FlashSV2Context * s)
@@ -808,10 +800,29 @@
int block_width = optimum_block_width (s);
int block_height = optimum_block_height(s);
+ s->rows = (s->image_height + block_height - 1) / block_height;
+ s->cols = (s->image_width + block_width - 1) / block_width;
+
if (block_width != s->block_width || block_height != s->block_height) {
- res = update_block_dimensions(s, block_width, block_height);
- if (res < 0)
- return res;
+ s->block_width = block_width;
+ s->block_height = block_height;
+ if (s->rows * s->cols > s->blocks_size / sizeof(Block)) {
+ s->frame_blocks = av_realloc_array(s->frame_blocks, s->rows, s->cols * sizeof(Block));
+ s->key_blocks = av_realloc_array(s->key_blocks, s->cols, s->rows * sizeof(Block));
+ if (!s->frame_blocks || !s->key_blocks) {
+ av_log(s->avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
+ return -1;
+ }
+ s->blocks_size = s->rows * s->cols * sizeof(Block);
+ }
+ init_blocks(s, s->frame_blocks, s->encbuffer, s->databuffer);
+ init_blocks(s, s->key_blocks, s->keybuffer, 0);
+
+ av_fast_malloc(&s->blockbuffer, &s->blockbuffer_size, block_width * block_height * 6);
+ if (!s->blockbuffer) {
+ av_log(s->avctx, AV_LOG_ERROR, "Could not allocate block buffer.\n");
+ return AVERROR(ENOMEM);
+ }
}
s->use15_7 = optimum_use15_7(s);
diff --git a/libavcodec/float2half.h b/libavcodec/float2half.h
deleted file mode 100644
index e051250..0000000
--- a/libavcodec/float2half.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * 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 AVCODEC_FLOAT2HALF_H
-#define AVCODEC_FLOAT2HALF_H
-
-#include <stdint.h>
-
-static void float2half_tables(uint16_t *basetable, uint8_t *shifttable)
-{
- for (int i = 0; i < 256; i++) {
- int e = i - 127;
-
- if (e < -24) { // Very small numbers map to zero
- basetable[i|0x000] = 0x0000;
- basetable[i|0x100] = 0x8000;
- shifttable[i|0x000] = 24;
- shifttable[i|0x100] = 24;
- } else if (e < -14) { // Small numbers map to denorms
- basetable[i|0x000] = (0x0400>>(-e-14));
- basetable[i|0x100] = (0x0400>>(-e-14)) | 0x8000;
- shifttable[i|0x000] = -e-1;
- shifttable[i|0x100] = -e-1;
- } else if (e <= 15) { // Normal numbers just lose precision
- basetable[i|0x000] = ((e + 15) << 10);
- basetable[i|0x100] = ((e + 15) << 10) | 0x8000;
- shifttable[i|0x000] = 13;
- shifttable[i|0x100] = 13;
- } else if (e < 128) { // Large numbers map to Infinity
- basetable[i|0x000] = 0x7C00;
- basetable[i|0x100] = 0xFC00;
- shifttable[i|0x000] = 24;
- shifttable[i|0x100] = 24;
- } else { // Infinity and NaN's stay Infinity and NaN's
- basetable[i|0x000] = 0x7C00;
- basetable[i|0x100] = 0xFC00;
- shifttable[i|0x000] = 13;
- shifttable[i|0x100] = 13;
- }
- }
-}
-
-static uint16_t float2half(uint32_t f, uint16_t *basetable, uint8_t *shifttable)
-{
- uint16_t h;
-
- h = basetable[(f >> 23) & 0x1ff] + ((f & 0x007fffff) >> shifttable[(f >> 23) & 0x1ff]);
-
- return h;
-}
-
-#endif /* AVCODEC_FLOAT2HALF_H */
diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c
index 3701b08..5bee96a 100644
--- a/libavcodec/fmvc.c
+++ b/libavcodec/fmvc.c
@@ -440,8 +440,6 @@
memcpy(dst, src, avctx->width * s->bpp);
dst -= frame->linesize[0];
src += s->stride * 4;
- if (bytestream2_tell_p(pb) < y*s->stride * 4)
- break;
}
} else {
unsigned block, nb_blocks;
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index 778317d..83229f6 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -22,6 +22,7 @@
#include "frame_thread_encoder.h"
+#include "libavutil/fifo.h"
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
@@ -31,32 +32,27 @@
#include "thread.h"
#define MAX_THREADS 64
-/* There can be as many as MAX_THREADS + 1 outstanding tasks.
- * An additional + 1 is needed so that one can distinguish
- * the case of zero and MAX_THREADS + 1 outstanding tasks modulo
- * the number of buffers. */
-#define BUFFER_SIZE (MAX_THREADS + 2)
+#define BUFFER_SIZE (2*MAX_THREADS)
typedef struct{
- AVFrame *indata;
- AVPacket *outdata;
- int return_code;
- int finished;
+ void *indata;
+ void *outdata;
+ int64_t return_code;
+ unsigned index;
} Task;
typedef struct{
AVCodecContext *parent_avctx;
pthread_mutex_t buffer_mutex;
- pthread_mutex_t task_fifo_mutex; /* Used to guard (next_)task_index */
+ AVFifoBuffer *task_fifo;
+ pthread_mutex_t task_fifo_mutex;
pthread_cond_t task_fifo_cond;
- unsigned max_tasks;
- Task tasks[BUFFER_SIZE];
- pthread_mutex_t finished_task_mutex; /* Guards tasks[i].finished */
+ Task finished_tasks[BUFFER_SIZE];
+ pthread_mutex_t finished_task_mutex;
pthread_cond_t finished_task_cond;
- unsigned next_task_index;
unsigned task_index;
unsigned finished_task_index;
@@ -67,32 +63,28 @@
static void * attribute_align_arg worker(void *v){
AVCodecContext *avctx = v;
ThreadContext *c = avctx->internal->frame_thread_encoder;
+ AVPacket *pkt = NULL;
while (!atomic_load(&c->exit)) {
int got_packet = 0, ret;
- AVPacket *pkt;
AVFrame *frame;
- Task *task;
- unsigned task_index;
+ Task task;
+
+ if(!pkt) pkt = av_packet_alloc();
+ if(!pkt) continue;
+ av_init_packet(pkt);
pthread_mutex_lock(&c->task_fifo_mutex);
- while (c->next_task_index == c->task_index || atomic_load(&c->exit)) {
+ while (av_fifo_size(c->task_fifo) <= 0 || atomic_load(&c->exit)) {
if (atomic_load(&c->exit)) {
pthread_mutex_unlock(&c->task_fifo_mutex);
goto end;
}
pthread_cond_wait(&c->task_fifo_cond, &c->task_fifo_mutex);
}
- task_index = c->next_task_index;
- c->next_task_index = (c->next_task_index + 1) % c->max_tasks;
+ av_fifo_generic_read(c->task_fifo, &task, sizeof(task), NULL);
pthread_mutex_unlock(&c->task_fifo_mutex);
- /* The main thread ensures that any two outstanding tasks have
- * different indices, ergo each worker thread owns its element
- * of c->tasks with the exception of finished, which is shared
- * with the main thread and guarded by finished_task_mutex. */
- task = &c->tasks[task_index];
- frame = task->indata;
- pkt = task->outdata;
+ frame = task.indata;
ret = avctx->codec->encode2(avctx, pkt, frame, &got_packet);
if(got_packet) {
@@ -107,13 +99,15 @@
pthread_mutex_lock(&c->buffer_mutex);
av_frame_unref(frame);
pthread_mutex_unlock(&c->buffer_mutex);
+ av_frame_free(&frame);
pthread_mutex_lock(&c->finished_task_mutex);
- task->return_code = ret;
- task->finished = 1;
+ c->finished_tasks[task.index].outdata = pkt; pkt = NULL;
+ c->finished_tasks[task.index].return_code = ret;
pthread_cond_signal(&c->finished_task_cond);
pthread_mutex_unlock(&c->finished_task_mutex);
}
end:
+ av_free(pkt);
pthread_mutex_lock(&c->buffer_mutex);
avcodec_close(avctx);
pthread_mutex_unlock(&c->buffer_mutex);
@@ -187,6 +181,10 @@
c->parent_avctx = avctx;
+ c->task_fifo = av_fifo_alloc_array(BUFFER_SIZE, sizeof(Task));
+ if(!c->task_fifo)
+ goto fail;
+
pthread_mutex_init(&c->task_fifo_mutex, NULL);
pthread_mutex_init(&c->finished_task_mutex, NULL);
pthread_mutex_init(&c->buffer_mutex, NULL);
@@ -194,13 +192,6 @@
pthread_cond_init(&c->finished_task_cond, NULL);
atomic_init(&c->exit, 0);
- c->max_tasks = avctx->thread_count + 2;
- for (unsigned i = 0; i < c->max_tasks; i++) {
- if (!(c->tasks[i].indata = av_frame_alloc()) ||
- !(c->tasks[i].outdata = av_packet_alloc()))
- goto fail;
- }
-
for(i=0; i<avctx->thread_count ; i++){
AVDictionary *tmp = NULL;
int ret;
@@ -262,9 +253,21 @@
pthread_join(c->worker[i], NULL);
}
- for (unsigned i = 0; i < c->max_tasks; i++) {
- av_frame_free(&c->tasks[i].indata);
- av_packet_free(&c->tasks[i].outdata);
+ while (av_fifo_size(c->task_fifo) > 0) {
+ Task task;
+ AVFrame *frame;
+ av_fifo_generic_read(c->task_fifo, &task, sizeof(task), NULL);
+ frame = task.indata;
+ av_frame_free(&frame);
+ task.indata = NULL;
+ }
+
+ for (i=0; i<BUFFER_SIZE; i++) {
+ if (c->finished_tasks[i].outdata != NULL) {
+ AVPacket *pkt = c->finished_tasks[i].outdata;
+ av_packet_free(&pkt);
+ c->finished_tasks[i].outdata = NULL;
+ }
}
pthread_mutex_destroy(&c->task_fifo_mutex);
@@ -272,47 +275,55 @@
pthread_mutex_destroy(&c->buffer_mutex);
pthread_cond_destroy(&c->task_fifo_cond);
pthread_cond_destroy(&c->finished_task_cond);
+ av_fifo_freep(&c->task_fifo);
av_freep(&avctx->internal->frame_thread_encoder);
}
-int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
- AVFrame *frame, int *got_packet_ptr)
-{
+int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet_ptr){
ThreadContext *c = avctx->internal->frame_thread_encoder;
- Task *outtask;
+ Task task;
+ int ret;
av_assert1(!*got_packet_ptr);
if(frame){
- av_frame_move_ref(c->tasks[c->task_index].indata, frame);
+ AVFrame *new = av_frame_alloc();
+ if(!new)
+ return AVERROR(ENOMEM);
+ ret = av_frame_ref(new, frame);
+ if(ret < 0) {
+ av_frame_free(&new);
+ return ret;
+ }
+ task.index = c->task_index;
+ task.indata = (void*)new;
pthread_mutex_lock(&c->task_fifo_mutex);
- c->task_index = (c->task_index + 1) % c->max_tasks;
+ av_fifo_generic_write(c->task_fifo, &task, sizeof(task), NULL);
pthread_cond_signal(&c->task_fifo_cond);
pthread_mutex_unlock(&c->task_fifo_mutex);
+
+ c->task_index = (c->task_index+1) % BUFFER_SIZE;
}
- outtask = &c->tasks[c->finished_task_index];
pthread_mutex_lock(&c->finished_task_mutex);
- /* The access to task_index in the following code is ok,
- * because it is only ever changed by the main thread. */
if (c->task_index == c->finished_task_index ||
- (frame && !outtask->finished &&
- (c->task_index - c->finished_task_index + c->max_tasks) % c->max_tasks <= avctx->thread_count)) {
+ (frame && !c->finished_tasks[c->finished_task_index].outdata &&
+ (c->task_index - c->finished_task_index) % BUFFER_SIZE <= avctx->thread_count)) {
pthread_mutex_unlock(&c->finished_task_mutex);
return 0;
}
- while (!outtask->finished) {
+
+ while (!c->finished_tasks[c->finished_task_index].outdata) {
pthread_cond_wait(&c->finished_task_cond, &c->finished_task_mutex);
}
- pthread_mutex_unlock(&c->finished_task_mutex);
- /* We now own outtask completely: No worker thread touches it any more,
- * because there is no outstanding task with this index. */
- outtask->finished = 0;
- av_packet_move_ref(pkt, outtask->outdata);
+ task = c->finished_tasks[c->finished_task_index];
+ *pkt = *(AVPacket*)(task.outdata);
if(pkt->data)
*got_packet_ptr = 1;
- c->finished_task_index = (c->finished_task_index + 1) % c->max_tasks;
+ av_freep(&c->finished_tasks[c->finished_task_index].outdata);
+ c->finished_task_index = (c->finished_task_index+1) % BUFFER_SIZE;
+ pthread_mutex_unlock(&c->finished_task_mutex);
- return outtask->return_code;
+ return task.return_code;
}
diff --git a/libavcodec/frame_thread_encoder.h b/libavcodec/frame_thread_encoder.h
index c400d6b..1f79553 100644
--- a/libavcodec/frame_thread_encoder.h
+++ b/libavcodec/frame_thread_encoder.h
@@ -25,7 +25,6 @@
int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options);
void ff_frame_thread_encoder_free(AVCodecContext *avctx);
-int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
- AVFrame *frame, int *got_packet_ptr);
+int ff_thread_video_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet_ptr);
#endif /* AVCODEC_FRAME_THREAD_ENCODER_H */
diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c
index 68b1b9d..f6aa636 100644
--- a/libavcodec/g2meet.c
+++ b/libavcodec/g2meet.c
@@ -30,7 +30,6 @@
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "blockdsp.h"
@@ -41,7 +40,6 @@
#include "internal.h"
#include "jpegtables.h"
#include "mjpeg.h"
-#include "mjpegdec.h"
#define EPIC_PIX_STACK_SIZE 1024
#define EPIC_PIX_STACK_MAX (EPIC_PIX_STACK_SIZE - 1)
@@ -160,24 +158,45 @@
int cursor_hot_x, cursor_hot_y;
} G2MContext;
+static av_cold int build_vlc(VLC *vlc, const uint8_t *bits_table,
+ const uint8_t *val_table, int nb_codes,
+ int is_ac)
+{
+ uint8_t huff_size[256] = { 0 };
+ uint16_t huff_code[256];
+ uint16_t huff_sym[256];
+ int i;
+
+ ff_mjpeg_build_huffman_codes(huff_size, huff_code, bits_table, val_table);
+
+ for (i = 0; i < 256; i++)
+ huff_sym[i] = i + 16 * is_ac;
+
+ if (is_ac)
+ huff_sym[0] = 16 * 256;
+
+ return ff_init_vlc_sparse(vlc, 9, nb_codes, huff_size, 1, 1,
+ huff_code, 2, 2, huff_sym, 2, 2, 0);
+}
+
static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c)
{
int ret;
- ret = ff_mjpeg_build_vlc(&c->dc_vlc[0], avpriv_mjpeg_bits_dc_luminance,
- avpriv_mjpeg_val_dc, 0, avctx);
+ ret = build_vlc(&c->dc_vlc[0], avpriv_mjpeg_bits_dc_luminance,
+ avpriv_mjpeg_val_dc, 12, 0);
if (ret)
return ret;
- ret = ff_mjpeg_build_vlc(&c->dc_vlc[1], avpriv_mjpeg_bits_dc_chrominance,
- avpriv_mjpeg_val_dc, 0, avctx);
+ ret = build_vlc(&c->dc_vlc[1], avpriv_mjpeg_bits_dc_chrominance,
+ avpriv_mjpeg_val_dc, 12, 0);
if (ret)
return ret;
- ret = ff_mjpeg_build_vlc(&c->ac_vlc[0], avpriv_mjpeg_bits_ac_luminance,
- avpriv_mjpeg_val_ac_luminance, 1, avctx);
+ ret = build_vlc(&c->ac_vlc[0], avpriv_mjpeg_bits_ac_luminance,
+ avpriv_mjpeg_val_ac_luminance, 251, 1);
if (ret)
return ret;
- ret = ff_mjpeg_build_vlc(&c->ac_vlc[1], avpriv_mjpeg_bits_ac_chrominance,
- avpriv_mjpeg_val_ac_chrominance, 1, avctx);
+ ret = build_vlc(&c->ac_vlc[1], avpriv_mjpeg_bits_ac_chrominance,
+ avpriv_mjpeg_val_ac_chrominance, 251, 1);
if (ret)
return ret;
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c
index 9e2ebf6..9357f17 100644
--- a/libavcodec/g722enc.c
+++ b/libavcodec/g722enc.c
@@ -64,6 +64,19 @@
c->band[1].scale_factor = 2;
c->prev_samples_pos = 22;
+ if (avctx->trellis) {
+ int frontier = 1 << avctx->trellis;
+ int max_paths = frontier * FREEZE_INTERVAL;
+ int i;
+ for (i = 0; i < 2; i++) {
+ c->paths[i] = av_mallocz_array(max_paths, sizeof(**c->paths));
+ c->node_buf[i] = av_mallocz_array(frontier, 2 * sizeof(**c->node_buf));
+ c->nodep_buf[i] = av_mallocz_array(frontier, 2 * sizeof(**c->nodep_buf));
+ if (!c->paths[i] || !c->node_buf[i] || !c->nodep_buf[i])
+ return AVERROR(ENOMEM);
+ }
+ }
+
if (avctx->frame_size) {
/* validate frame size */
if (avctx->frame_size & 1 || avctx->frame_size > MAX_FRAME_SIZE) {
@@ -97,18 +110,6 @@
avctx->trellis);
avctx->trellis = new_trellis;
}
- if (avctx->trellis) {
- int frontier = 1 << avctx->trellis;
- int max_paths = frontier * FREEZE_INTERVAL;
-
- for (int i = 0; i < 2; i++) {
- c->paths[i] = av_calloc(max_paths, sizeof(**c->paths));
- c->node_buf[i] = av_calloc(frontier, 2 * sizeof(**c->node_buf));
- c->nodep_buf[i] = av_calloc(frontier, 2 * sizeof(**c->nodep_buf));
- if (!c->paths[i] || !c->node_buf[i] || !c->nodep_buf[i])
- return AVERROR(ENOMEM);
- }
- }
}
ff_g722dsp_init(&c->dsp);
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 0c47458..1deff49 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -29,1077 +29,6 @@
#include "celp_math.h"
#include "g723_1.h"
-const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE + 1] = {
- 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324,
- 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107,
- 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736,
- 15679, 15619, 15557, 15493, 15426, 15357, 15286, 15213,
- 15137, 15059, 14978, 14896, 14811, 14724, 14635, 14543,
- 14449, 14354, 14256, 14155, 14053, 13949, 13842, 13733,
- 13623, 13510, 13395, 13279, 13160, 13039, 12916, 12792,
- 12665, 12537, 12406, 12274, 12140, 12004, 11866, 11727,
- 11585, 11442, 11297, 11151, 11003, 10853, 10702, 10549,
- 10394, 10238, 10080, 9921, 9760, 9598, 9434, 9269,
- 9102, 8935, 8765, 8595, 8423, 8250, 8076, 7900,
- 7723, 7545, 7366, 7186, 7005, 6823, 6639, 6455,
- 6270, 6084, 5897, 5708, 5520, 5330, 5139, 4948,
- 4756, 4563, 4370, 4176, 3981, 3786, 3590, 3393,
- 3196, 2999, 2801, 2603, 2404, 2205, 2006, 1806,
- 1606, 1406, 1205, 1005, 804, 603, 402, 201,
- 0, -201, -402, -603, -804, -1005, -1205, -1406,
- -1606, -1806, -2006, -2205, -2404, -2603, -2801, -2999,
- -3196, -3393, -3590, -3786, -3981, -4176, -4370, -4563,
- -4756, -4948, -5139, -5330, -5520, -5708, -5897, -6084,
- -6270, -6455, -6639, -6823, -7005, -7186, -7366, -7545,
- -7723, -7900, -8076, -8250, -8423, -8595, -8765, -8935,
- -9102, -9269, -9434, -9598, -9760, -9921, -10080, -10238,
- -10394, -10549, -10702, -10853, -11003, -11151, -11297, -11442,
- -11585, -11727, -11866, -12004, -12140, -12274, -12406, -12537,
- -12665, -12792, -12916, -13039, -13160, -13279, -13395, -13510,
- -13623, -13733, -13842, -13949, -14053, -14155, -14256, -14354,
- -14449, -14543, -14635, -14724, -14811, -14896, -14978, -15059,
- -15137, -15213, -15286, -15357, -15426, -15493, -15557, -15619,
- -15679, -15736, -15791, -15843, -15893, -15941, -15986, -16029,
- -16069, -16107, -16143, -16176, -16207, -16235, -16261, -16284,
- -16305, -16324, -16340, -16353, -16364, -16373, -16379, -16383,
- -16384, -16383, -16379, -16373, -16364, -16353, -16340, -16324,
- -16305, -16284, -16261, -16235, -16207, -16176, -16143, -16107,
- -16069, -16029, -15986, -15941, -15893, -15843, -15791, -15736,
- -15679, -15619, -15557, -15493, -15426, -15357, -15286, -15213,
- -15137, -15059, -14978, -14896, -14811, -14724, -14635, -14543,
- -14449, -14354, -14256, -14155, -14053, -13949, -13842, -13733,
- -13623, -13510, -13395, -13279, -13160, -13039, -12916, -12792,
- -12665, -12537, -12406, -12274, -12140, -12004, -11866, -11727,
- -11585, -11442, -11297, -11151, -11003, -10853, -10702, -10549,
- -10394, -10238, -10080, -9921, -9760, -9598, -9434, -9269,
- -9102, -8935, -8765, -8595, -8423, -8250, -8076, -7900,
- -7723, -7545, -7366, -7186, -7005, -6823, -6639, -6455,
- -6270, -6084, -5897, -5708, -5520, -5330, -5139, -4948,
- -4756, -4563, -4370, -4176, -3981, -3786, -3590, -3393,
- -3196, -2999, -2801, -2603, -2404, -2205, -2006, -1806,
- -1606, -1406, -1205, -1005, -804, -603, -402, -201,
- 0, 201, 402, 603, 804, 1005, 1205, 1406,
- 1606, 1806, 2006, 2205, 2404, 2603, 2801, 2999,
- 3196, 3393, 3590, 3786, 3981, 4176, 4370, 4563,
- 4756, 4948, 5139, 5330, 5520, 5708, 5897, 6084,
- 6270, 6455, 6639, 6823, 7005, 7186, 7366, 7545,
- 7723, 7900, 8076, 8250, 8423, 8595, 8765, 8935,
- 9102, 9269, 9434, 9598, 9760, 9921, 10080, 10238,
- 10394, 10549, 10702, 10853, 11003, 11151, 11297, 11442,
- 11585, 11727, 11866, 12004, 12140, 12274, 12406, 12537,
- 12665, 12792, 12916, 13039, 13160, 13279, 13395, 13510,
- 13623, 13733, 13842, 13949, 14053, 14155, 14256, 14354,
- 14449, 14543, 14635, 14724, 14811, 14896, 14978, 15059,
- 15137, 15213, 15286, 15357, 15426, 15493, 15557, 15619,
- 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029,
- 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284,
- 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383,
- 16384
-};
-
-const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3] = {
- { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382},
- { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454},
- { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300},
- { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471},
- { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160},
- { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415},
- { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972},
- { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955},
- { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954},
- { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258},
- { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801},
- { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909},
- { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11},
- { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388},
- { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178},
- { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95},
- { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516},
- { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676},
- { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543},
- {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823},
- {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57},
- { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536},
- {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904},
- {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217},
- { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443},
- { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449},
- { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649},
- { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525},
- { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357},
- { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079},
- { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299},
- { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746},
- { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250},
- { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427},
- { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166},
- { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960},
- { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855},
- { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847},
- { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671},
- { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292},
- { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393},
- { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325},
- { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292},
- { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243},
- { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646},
- { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477},
- { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99},
- { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279},
- { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428},
- { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222},
- { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817},
- { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858},
- { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053},
- { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39},
- { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155},
- { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182},
- { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713},
- { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136},
- { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035},
- { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136},
- { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446},
- {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144},
- { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374},
- {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158},
- {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756},
- { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344},
- { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252},
- { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381},
- { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806},
- { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406},
- { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002},
- { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616},
- { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283},
- { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169},
- { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209},
- { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141},
- { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505},
- { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867},
- { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011},
- { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337},
- { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010},
- { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780},
- { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704},
- { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568},
- { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922},
- { 1693, 4793, 6012}
-};
-
-const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3] = {
- { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368},
- {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449},
- {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84},
- { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390},
- { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411},
- {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311},
- { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280},
- {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408},
- {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843},
- {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744},
- {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861},
- { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532},
- { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060},
- { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430},
- { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666},
- { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009},
- { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815},
- { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116},
- { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954},
- { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102},
- { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649},
- {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435},
- { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057},
- { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262},
- { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853},
- { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024},
- { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186},
- {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825},
- {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564},
- {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874},
- { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324},
- {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634},
- { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159},
- { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358},
- { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383},
- { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415},
- { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187},
- { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612},
- { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779},
- { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871},
- { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571},
- { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097},
- { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444},
- { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226},
- { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196},
- { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508},
- { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232},
- { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279},
- { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240},
- { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060},
- { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421},
- { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110},
- { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232},
- { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992},
- { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037},
- { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959},
- {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269},
- { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96},
- {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784},
- {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316},
- {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000},
- { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756},
- {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673},
- {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393},
- {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624},
- {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186},
- {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887},
- {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337},
- {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545},
- { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462},
- { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978},
- { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863},
- { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384},
- { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955},
- { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428},
- { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488},
- { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233},
- { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866},
- { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338},
- { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585},
- { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816},
- { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318},
- { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682},
- { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069},
- { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664},
- { 4035, 5334, 4912}
-};
-
-const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4] = {
- { 0, 0, 0, 0}, { 601, 512, -542, 334},
- { 428, 1087, -484, -132}, { 652, 622, -391, -572},
- { 378, 799, 141, -860}, { 1040, 409, 112, -554},
- { 1123, 670, -75, -847}, { 1421, 494, -315, -1095},
- { 787, 1001, 114, -460}, { 988, 1672, 216, -681},
- { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5},
- { 1262, 193, -694, -129}, { 325, 196, 51, -641},
- { 861, -59, 350, -458}, { 1261, 567, 586, -346},
- { 1532, 885, 210, -517}, { 2027, 937, 113, -792},
- { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133},
- { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373},
- { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138},
- { 3581, 2360, 649, -414}, { 219, 176, -398, -309},
- { 434, -78, -435, -880}, { -344, 301, 265, -552},
- { -915, 470, 657, -380}, { 419, -432, -163, -453},
- { 351, -953, 8, -562}, { 789, -43, 20, -958},
- { 302, -594, -352, -1159}, { 1040, 108, -668, -924},
- { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140},
- { 1003, 824, -802, -1184}, { 745, 58, -589, -1443},
- { 346, 247, -915, -1683}, { 270, 796, -720, -2043},
- { 1208, 722, -222, -193}, { 1486, 1180, -412, -672},
- { 1722, 179, -69, -521}, { 2047, 860, -666, -1410},
- { -146, 222, -281, -805}, { -189, 90, -114, -1307},
- { -152, 1086, -241, -764}, { -439, 733, -601, -1302},
- { -833, -167, -351, -601}, { -856, -422, -411, -1059},
- { -747, -355, -582, -1644}, { -837, 210, -916, -1144},
- {-1800, 32, -878, -1687}, { -48, -23, -1146, 52},
- { -350, -409, -1656, -364}, { 265, -728, -858, -577},
- { 458, -247, -1141, -997}, { 691, -407, -1988, -1161},
- { -66, -104, -705, -1249}, { -431, -93, -1191, -1844},
- { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819},
- { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540},
- { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533},
- { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523},
- { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131},
- { -40, -911, -2106, -441}, { -471, -484, -2267, -1549},
- { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342},
- {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72},
- {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637},
- {-3907, -4138, -865, 803}, {-1287, -845, -375, -548},
- {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418},
- {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128},
- {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185},
- {-1616, -915, -2205, -549}, { 19, -821, -1145, 352},
- { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911},
- { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451},
- { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885},
- {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573},
- {-3460, -2141, 49, -113}, {-2231, -448, 675, -146},
- {-2805, -532, 1231, 479}, {-2684, -486, -200, 611},
- {-3525, -971, -198, 704}, {-3707, 173, 349, 254},
- {-4734, -1447, -34, 880}, { 777, -512, 114, -10},
- { 1250, -66, 442, -5}, { 604, 613, 452, -352},
- { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238},
- {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060},
- {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105},
- {-3190, -899, -1817, -194}, { -156, -886, 394, -318},
- { -258, -1283, 551, 202}, { -536, -1729, 910, 331},
- { -847, -1109, 795, -163}, {-1171, -1128, 715, 519},
- {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211},
- {-1487, -2148, 831, 174}, {-1139, -374, 414, -4},
- {-1517, -1383, 396, -352}, {-1012, 439, -59, -967},
- {-1812, 706, -440, -1030}, {-1971, -329, -34, -827},
- {-2472, -1588, -151, -606}, {-2161, 374, -281, 76},
- {-3012, 231, -15, -690}, { 1104, 566, 721, 209},
- { 1685, 564, 383, 98}, { 1898, 750, 792, -97},
- { 556, -64, 561, -93}, { 876, 162, 913, -22},
- { 961, 675, 1296, 140}, { 756, -396, 851, 544},
- { 360, -303, 1341, 396}, { 878, -22, 1464, 863},
- { -309, -273, 642, -129}, { -686, -82, 842, 454},
- { -5, -47, 1069, 998}, { -94, 967, 1277, 298},
- { -489, 385, 1473, 746}, { -369, -717, 1333, 242},
- { 281, -993, 1726, 924}, { 464, 601, 1575, 1376},
- { -250, 206, 2339, 1175}, { -438, 377, -597, -285},
- {-1020, 787, -790, -287}, { -458, -410, 215, 295},
- { -589, -860, -121, 797}, {-1175, 122, -437, 466},
- {-1480, -121, 367, 924}, { 234, 323, 770, -555},
- { 145, 30, 996, 26}, { 66, 849, 93, -145},
- { -117, 1261, 474, -399}, {-1495, 1051, 218, -506},
- {-1390, 694, 994, 88}, { 616, 7, 78, 304},
- { 1060, 52, -62, 835}, { 833, 454, 649, 1359},
- { -770, 464, 47, 93}, { -574, 1199, -39, 379},
- { 114, -98, 488, 485}, { 727, 244, 606, 696},
- { -76, 455, 671, 546}, { -565, -13, 145, 819},
- { -376, 569, 448, 1128}, { 218, 122, 265, 1167},
- { 230, 738, 932, 1003}, { 138, 477, 36, 450},
- { 404, 787, -73, 1000}, { 497, 1259, 387, 1231},
- { 17, 207, 195, -79}, { 562, 358, 53, -158},
- { 493, 387, 478, 189}, { 678, 831, 640, 558},
- { -197, 523, 613, 57}, { 429, 894, 769, 111},
- { 67, 1174, 568, 511}, { 1242, 824, 251, 840},
- { 1419, 1074, 864, 481}, { 924, 1474, 669, 724},
- { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541},
- { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668},
- { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798},
- { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391},
- { 726, 872, 1812, 601}, { 1469, 280, 1008, 616},
- { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072},
- { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189},
- { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106},
- { 290, -339, 428, -444}, { -68, -783, 735, 772},
- { 245, -555, 468, 47}, { 334, -895, 814, 146},
- { 235, 368, -964, -959}, { -203, 315, -1566, -1217},
- { 801, 17, -276, -354}, { 894, -495, -789, -635},
- { 716, 291, -1189, -357}, { 560, -260, -733, -2},
- { 679, -508, -1429, 211}, { -51, -62, -428, 557},
- { 322, -638, -211, 614}, { -878, -1057, -84, -71},
- { -388, -1415, -167, -318}, { -754, -1574, 214, -539},
- {-1419, -2004, -92, -787}, { -47, -856, -347, -255},
- { 23, -1211, -173, 320}, { -658, -487, -893, 353},
- { -783, -1587, -584, 507}, {-1420, -859, -378, 441},
- {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12},
- { -359, -2113, -553, -8}, { -831, -1918, -1561, 32},
- {-1014, -2487, -1359, -939}, { -475, -311, -169, -236},
- { -907, -426, 276, -611}, { -96, -400, 50, -710},
- { -426, -1022, -10, -985}, { -197, -258, -744, -575},
- { -611, -930, -771, -394}, { -267, -776, -612, -939},
- { -256, -1346, -802, -1122}, { -796, -1570, -825, -754},
- { 712, 876, 141, 227}, { 981, 1509, 85, 124},
- { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440},
- { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356},
- { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134},
- { 509, 1809, 781, -123}, { 1712, 1506, 559, -423},
- { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331},
- { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183},
- { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659},
- { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996},
- { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318},
-};
-
-const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] = {
- {118755, 98280, 80730, 65780, 53130,
- 42504, 33649, 26334, 20349, 15504,
- 11628, 8568, 6188, 4368, 3003,
- 2002, 1287, 792, 462, 252,
- 126, 56, 21, 6, 1,
- 0, 0, 0, 0, 0},
-
- { 23751, 20475, 17550, 14950, 12650,
- 10626, 8855, 7315, 5985, 4845,
- 3876, 3060, 2380, 1820, 1365,
- 1001, 715, 495, 330, 210,
- 126, 70, 35, 15, 5,
- 1, 0, 0, 0, 0},
-
- { 3654, 3276, 2925, 2600, 2300,
- 2024, 1771, 1540, 1330, 1140,
- 969, 816, 680, 560, 455,
- 364, 286, 220, 165, 120,
- 84, 56, 35, 20, 10,
- 4, 1, 0, 0, 0},
-
- { 406, 378, 351, 325, 300,
- 276, 253, 231, 210, 190,
- 171, 153, 136, 120, 105,
- 91, 78, 66, 55, 45,
- 36, 28, 21, 15, 10,
- 6, 3, 1, 0, 0},
-
- { 29, 28, 27, 26, 25,
- 24, 23, 22, 21, 20,
- 19, 18, 17, 16, 15,
- 14, 13, 12, 11, 10,
- 9, 8, 7, 6, 5,
- 4, 3, 2, 1, 0},
-
- { 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1},
-};
-
-const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS] = {
- 1, 2, 3, 4, 6, 9, 13, 18,
- 26, 38, 55, 80, 115, 166, 240, 348,
- 502, 726, 1050, 1517, 2193, 3170, 4582, 6623,
-};
-
-const int16_t ff_g723_1_adaptive_cb_gain85[85 * 20] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 800, 1496, 167, -256,
- -338, -39, -136, -1, -4, -6, -73, -8,
- -15, 12, 23, 2, 16, 30, 3, -5,
- -462, -686, 493, 2575, 311, -13, -28, -14,
- -404, -5, -19, 13, 20, 72, 107, -77,
- 8, 13, -9, -48, 1483, 144, 784, 928,
- 1243, -134, -1, -37, -52, -94, -13, -71,
- -6, -84, -8, -44, -112, -10, -59, -70,
- -77, 275, 3522, 1056, -1254, 0, -4, -757,
- -68, -95, 1, 16, -59, 4, -17, -227,
- -5, 21, 269, 80, -125, -40, -264, 381,
- 5027, 0, 0, -4, -8, -1542, 0, -2,
- 0, 2, 0, 6, 38, 12, 81, -117,
- 138, 332, 2215, 2574, 1339, -1, -6, -299,
- -404, -109, -2, -18, -44, -21, -52, -348,
- -11, -27, -181, -210, 3685, 2883, -887, 866,
- -1639, -828, -507, -48, -45, -164, -648, 199,
- 156, -194, -152, 46, 368, 288, -88, 86,
- 1396, 2146, 2235, 345, 942, -118, -281, -305,
- -7, -54, -182, -190, -292, -29, -45, -47,
- -80, -123, -128, -19, 13, 4475, 3549, -804,
- -655, 0, -1222, -768, -39, -26, -3, -2,
- -969, 0, 219, 174, 0, 179, 141, -32,
- -724, 254, 242, 6049, 2462, -32, -3, -3,
- -2233, -370, 11, 10, -3, 267, -94, -89,
- 108, -38, -36, -909, 626, -1713, 6121, 4561,
- -1061, -23, -179, -2287, -1270, -68, 65, -233,
- 640, -174, 477, -1704, 40, -111, 396, 295,
- -350, 1391, 7985, 511, -405, -7, -118, -3892,
- -15, -10, 29, 170, -678, 10, -43, -249,
- -8, 34, 197, 12, 3144, -529, 608, 2530,
- 3878, -603, -17, -22, -390, -918, 101, -116,
- 19, -485, 81, -93, -744, 125, -144, -599,
- 2589, -689, 3045, 5603, -404, -409, -29, -566,
- -1916, -10, 108, -481, 128, -885, 235, -1041,
- 63, -17, 75, 138, 3107, 513, 1374, -3594,
- -4922, -589, -16, -115, -788, -1478, -97, -260,
- -43, 681, 112, 301, 933, 154, 413, -1079,
- 2468, 6010, 1107, -390, 1961, -372, -2204, -74,
- -9, -234, -905, -166, -406, 58, 143, 26,
- -295, -719, -132, 46, 4773, 2766, 2368, 4862,
- -4044, -1390, -467, -342, -1443, -998, -806, -690,
- -399, -1416, -821, -702, 1178, 682, 584, 1200,
- 1665, -1879, 1443, 1701, 8562, -169, -215, -127,
- -176, -4475, 190, -146, 165, -172, 195, -149,
- -870, 982, -754, -889, 2716, 9011, -1007, 755,
- -1785, -450, -4956, -61, -34, -194, -1493, 167,
- 554, -125, -415, 46, 296, 982, -109, 82,
- -2727, 7548, 1285, 938, 3420, -453, -3478, -100,
- -53, -714, 1256, 213, -592, 156, -432, -73,
- 569, -1576, -268, -196, 3677, 882, 4050, 1202,
- 2323, -825, -47, -1001, -88, -329, -198, -909,
- -218, -269, -64, -297, -521, -125, -574, -170,
- 2046, -753, 122, 10102, 603, -255, -34, 0,
- -6229, -22, 94, -15, 5, -1261, 464, -75,
- -75, 27, -4, -372, 449, -1815, 10690, 3870,
- -527, -12, -201, -6976, -914, -16, 49, -293,
- 1184, -106, 428, -2525, 14, -58, 344, 124,
- -941, 2352, 5049, 3650, 2637, -54, -337, -1556,
- -813, -424, 135, 290, -725, 209, -524, -1125,
- 151, -378, -812, -587, -1879, 796, 3117, 9569,
- -404, -215, -38, -593, -5589, -9, 91, 357,
- -151, 1097, -464, -1821, -46, 19, 76, 236,
- -1715, 2043, -2096, 9946, 4001, -179, -254, -268,
- -6038, -977, 213, -219, 261, 1041, -1240, 1272,
- 418, -498, 511, -2429, -5772, -618, -3921, 284,
- -3155, -2033, -23, -938, -4, -607, -218, -1381,
- -148, 100, 10, 68, -1111, -119, -755, 54,
- 382, 4748, 8003, -2064, 2198, -8, -1376, -3909,
- -260, -294, -110, -186, -2319, 48, 598, 1008,
- -51, -637, -1073, 277, -867, 3015, 11926, -1675,
- 947, -45, -555, -8681, -171, -54, 159, 631,
- -2195, -88, 308, 1219, 50, -174, -690, 96,
- -4933, -432, 6757, 3771, 1352, -1485, -11, -2786,
- -867, -111, -130, 2034, 178, 1135, 99, -1555,
- 407, 35, -557, -311, 152, 9726, 4231, -1928,
- 1490, -1, -5774, -1092, -226, -135, -90, -39,
- -2511, 17, 1144, 498, -13, -884, -384, 175,
- 2512, 193, 9033, 5361, -3148, -385, -2, -4980,
- -1754, -605, -29, -1385, -106, -822, -63, -2956,
- 482, 37, 1735, 1030, 8464, 2844, 12, 549,
- 2132, -4373, -493, 0, -18, -277, -1469, -6,
- -2, -284, -95, 0, -1101, -370, -1, -71,
- 2141, -2602, 7166, 9046, -1350, -279, -413, -3134,
- -4994, -111, 340, -936, 1138, -1182, 1436, -3957,
- 176, -214, 590, 745, -244, 278, 13307, 1227,
- -161, -3, -4, -10808, -91, -1, 4, 198,
- -226, 18, -20, -997, -2, 2, 131, 12,
- -1947, 8217, 6269, 917, -2559, -231, -4121, -2399,
- -51, -399, 976, 745, -3144, 108, -460, -350,
- -304, 1283, 979, 143, -1810, 2061, -2781, 6056,
- 10058, -200, -259, -472, -2238, -6174, 227, -307,
- 349, 669, -761, 1028, 1111, -1265, 1707, -3717,
- 7827, 9161, -3409, 2473, -1510, -3739, -5122, -709,
- -373, -139, -4376, 1628, 1906, -1181, -1382, 514,
- 721, 844, -314, 228, -1430, 8313, 9541, -2955,
- 1626, -124, -4218, -5556, -533, -161, 725, 832,
- -4841, -257, 1499, 1721, 142, -825, -947, 293,
- 2819, -4247, 5391, 8673, 2756, -485, -1101, -1774,
- -4591, -463, 730, -927, 1397, -1492, 2248, -2854,
- -474, 714, -907, -1459, 141, 14552, 690, 257,
- -112, -1, -12926, -29, -4, 0, -125, -5,
- -613, -2, -228, -10, 0, 99, 4, 1,
- 11938, -1859, 1806, -962, -884, -8699, -211, -199,
- -56, -47, 1355, -1316, 205, 701, -109, 106,
- 644, -100, 97, -51, 3728, 1982, 2264, 4584,
- 3131, -848, -239, -312, -1282, -598, -451, -515,
- -273, -1043, -554, -633, -712, -378, -432, -876,
- -1181, 766, 720, 14303, -216, -85, -35, -31,
- -12486, -2, 55, 51, -33, 1031, -668, -628,
- -15, 10, 9, 189, -4385, 4826, 10112, 1569,
- 3388, -1173, -1421, -6242, -150, -700, 1291, 2706,
- -2979, 420, -462, -969, 906, -998, -2091, -324,
- -448, 1932, 15591, -1842, 657, -12, -227, -14837,
- -207, -26, 52, 427, -1838, -50, 217, 1753,
- 18, -77, -626, 74, -4141, 1844, 3962, 5517,
- 6220, -1046, -207, -958, -1858, -2361, 466, 1001,
- -446, 1394, -621, -1334, 1572, -700, -1504, -2094,
- 729, -2299, 14755, 3657, -952, -32, -322, -13288,
- -816, -55, 102, -656, 2071, -162, 513, -3294,
- 42, -133, 857, 212, -1385, 5801, 13339, -3137,
- 1344, -117, -2054, -10861, -600, -110, 490, 1127,
- -4723, -265, 1111, 2554, 113, -476, -1094, 257,
- 4710, 9661, 1073, -2467, 3274, -1354, -5697, -70,
- -371, -654, -2777, -308, -633, 709, 1455, 161,
- -941, -1930, -214, 493, 1843, -3624, 12422, 6898,
- -1559, -207, -802, -9419, -2904, -148, 407, -1397,
- 2748, -775, 1526, -5230, 175, -344, 1182, 656,
- 1433, 2394, 2507, 1380, 8780, -125, -349, -383,
- -116, -4705, -209, -219, -366, -120, -201, -211,
- -768, -1283, -1343, -740, -1712, 12915, 5883, -2197,
- 991, -179, -10181, -2112, -294, -60, 1350, 615,
- -4638, -229, 1732, 789, 103, -781, -356, 133,
- 15072, 2158, -1245, 910, -496, -13865, -284, -94,
- -50, -15, -1986, 1145, 164, -837, -119, 69,
- 456, 65, -37, 27, 4655, 7319, 4916, 586,
- -3381, -1322, -3270, -1475, -20, -697, -2079, -1396,
- -2196, -166, -261, -175, 960, 1510, 1014, 120,
- 1191, -2140, 5120, 13498, -1418, -86, -279, -1600,
- -11121, -122, 155, -372, 669, -981, 1763, -4218,
- 103, -185, 443, 1168, -1530, -817, 8191, 9632,
- -1452, -143, -40, -4095, -5663, -128, -76, 765,
- 408, 900, 480, -4815, -135, -72, 726, 854,
- -3236, 607, 1696, -2106, 11485, -639, -22, -175,
- -270, -8051, 119, 335, -62, -416, 78, 218,
- 2268, -425, -1189, 1476, 3203, -1903, -837, 9679,
- 7057, -626, -221, -42, -5718, -3039, 372, 163,
- -97, -1892, 1124, 494, -1380, 819, 360, -4169,
- 213, -655, 17015, 620, -384, -2, -26, -17671,
- -23, -9, 8, -221, 681, -8, 24, -644,
- 5, -15, 399, 14, 5088, 35, -3339, 3726,
- 8488, -1580, 0, -680, -847, -4397, -10, 1037,
- 7, -1157, -8, 759, -2636, -18, 1730, -1930,
- -988, 1454, -2688, 15039, 2682, -59, -129, -441,
- -13805, -439, 87, -162, 238, 907, -1335, 2467,
- 161, -238, 440, -2462, -4865, -2842, -53, 5495,
- 6523, -1445, -493, 0, -1843, -2597, -844, -16,
- -9, 1632, 953, 18, 1937, 1131, 21, -2188,
- 3076, 15069, -2914, 1810, -971, -577, -13860, -518,
- -200, -57, -2829, 547, 2680, -339, -1665, 322,
- 182, 893, -172, 107, 1311, 5355, 11054, 2299,
- -3654, -105, -1750, -7458, -322, -814, -428, -885,
- -3613, -184, -751, -1551, 292, 1194, 2465, 512,
- 4035, 5619, 4618, 1815, 1912, -994, -1927, -1301,
- -201, -223, -1384, -1137, -1583, -447, -622, -511,
- -471, -656, -539, -211, -2131, 2754, -4501, 12879,
- 7432, -277, -463, -1236, -10124, -3371, 358, -585,
- 756, 1675, -2165, 3538, 967, -1249, 2042, -5842,
- 5618, -515, 3219, -4149, 4857, -1926, -16, -632,
- -1050, -1440, 176, -1104, 101, 1422, -130, 815,
- -1666, 152, -954, 1230, 1838, -1709, 1139, 16867,
- 716, -206, -178, -79, -17366, -31, 191, -127,
- 118, -1892, 1759, -1173, -80, 74, -49, -737,
- 1978, -3845, 10050, 11854, -2492, -238, -902, -6164,
- -8576, -379, 464, -1213, 2358, -1431, 2782, -7271,
- 301, -585, 1529, 1803, -2600, 11246, 11289, -3647,
- 1463, -412, -7720, -7778, -812, -130, 1784, 1791,
- -7749, -578, 2504, 2513, 232, -1004, -1008, 325,
- 3442, 907, 2725, 8970, 3638, -723, -50, -453,
- -4911, -808, -190, -572, -150, -1884, -496, -1492,
- -764, -201, -605, -1992, -126, 17498, 3481, -2003,
- 1090, 0, -18689, -739, -244, -72, 135, 26,
- -3717, -15, 2139, 425, 8, -1165, -231, 133,
- -1814, 1048, -2164, 4070, 16272, -200, -67, -285,
- -1011, -16160, 116, -239, 138, 450, -260, 537,
- 1801, -1041, 2149, -4042, 9354, 12580, -1883, 962,
- -617, -5341, -9660, -216, -56, -23, -7183, 1075,
- 1446, -549, -738, 110, 352, 474, -71, 36,
- 1708, 4199, 7387, 6335, 1003, -178, -1076, -3330,
- -2449, -61, -437, -770, -1893, -660, -1623, -2856,
- -104, -257, -452, -388, -2624, 5623, 17310, -2353,
- 592, -420, -1930, -18288, -338, -21, 900, 2772,
- -5941, -376, 807, 2486, 94, -203, -625, 85,
- 1211, -850, 1193, -1926, 15992, -89, -44, -86,
- -226, -15609, 62, -88, 61, 142, -100, 140,
- -1182, 830, -1165, 1880, 3983, -2054, 11506, -19,
- 3622, -968, -257, -8080, 0, -801, 499, -2797,
- 1442, 4, -2, 13, -880, 454, -2544, 4,
- -786, -1354, 16092, 7246, -1665, -37, -111, -15805,
- -3205, -169, -65, 772, 1330, 348, 599, -7117,
- -80, -137, 1636, 736, -4316, -511, 6674, 11665,
- 4633, -1137, -15, -2719, -8305, -1310, -134, 1758,
- 208, 3073, 364, -4752, 1220, 144, -1887, -3299,
- 7912, 4557, 1937, 1885, 7037, -3821, -1267, -229,
- -216, -3022, -2200, -935, -538, -910, -524, -222,
- -3398, -1957, -832, -809, 3434, 2967, 5867, 8196,
- 8766, -720, -537, -2101, -4100, -4690, -622, -1230,
- -1062, -1718, -1484, -2935, -1837, -1588, -3139, -4385,
- 5881, 9176, 8119, 3934, 3355, -2111, -5139, -4023,
- -944, -687, -3294, -2914, -4547, -1412, -2203, -1949,
- -1204, -1879, -1662, -805
-};
-
-const int16_t ff_g723_1_adaptive_cb_gain170[170 * 20] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 776, 212, 715, 670,
- 809, -36, -2, -31, -27, -39, -10, -33,
- -9, -31, -8, -29, -38, -10, -35, -33,
- 1296, 1316, -168, -320, -815, -102, -105, -1,
- -6, -40, -104, 13, 13, 25, 25, -3,
- 64, 65, -8, -15, -589, 680, 2478, 308,
- -596, -21, -28, -375, -5, -21, 24, 89,
- -102, 11, -12, -46, -21, 24, 90, 11,
- -735, -487, -5, 2948, 468, -33, -14, 0,
- -530, -13, -21, 0, 0, 132, 87, 0,
- 21, 13, 0, -84, 1042, 1730, 1068, 333,
- 626, -66, -182, -69, -6, -23, -110, -67,
- -112, -21, -35, -21, -39, -66, -40, -12,
- 486, -769, 4074, 2825, -1107, -14, -36, -1013,
- -487, -74, 22, -120, 191, -83, 132, -702,
- 32, -52, 275, 191, 1521, -767, -124, 4320,
- 1026, -141, -35, 0, -1139, -64, 71, 11,
- -5, -401, 202, 32, -95, 48, 7, -270,
- 2425, 1267, 3439, -91, -1166, -359, -98, -722,
- 0, -83, -187, -509, -266, 13, 7, 19,
- 172, 90, 244, -6, -1251, 975, 173, 4039,
- 2005, -95, -58, -1, -996, -245, 74, 13,
- -10, 308, -240, -42, 153, -119, -21, -494,
- 1820, 632, 1322, 2062, 1031, -202, -24, -106,
- -259, -64, -70, -146, -51, -229, -79, -166,
- -114, -39, -83, -129, -447, 4904, 244, -315,
- -2038, -12, -1467, -3, -6, -253, 134, 6,
- -73, -8, 94, 4, -55, 610, 30, -39,
- -208, -1102, 463, -448, 5653, -2, -74, -13,
- -12, -1950, -14, 5, 31, -5, -30, 12,
- 71, 380, -159, 154, 4739, 2600, -1864, 856,
- -1554, -1371, -412, -212, -44, -147, -752, 539,
- 295, -247, -135, 97, 449, 246, -176, 81,
- 1894, 3533, 35, -26, 2145, -219, -762, 0,
- 0, -280, -408, -4, -7, 3, 5, 0,
- -248, -462, -4, 3, -2699, 1841, 4072, 2443,
- 1582, -444, -207, -1012, -364, -152, 303, 670,
- -457, 402, -274, -607, 260, -177, -393, -236,
- -844, 3358, 6106, -1059, -537, -43, -688, -2275,
- -68, -17, 173, 314, -1251, -54, 217, 395,
- -27, 110, 200, -34, 1251, 1016, 3020, 2210,
- 1445, -95, -63, -556, -298, -127, -77, -230,
- -187, -168, -137, -407, -110, -89, -266, -194,
- 2099, 2277, 4038, 3533, -2870, -269, -316, -995,
- -762, -503, -291, -517, -561, -452, -491, -871,
- 367, 399, 707, 619, 400, -1114, 8516, 2422,
- -1117, -9, -75, -4426, -358, -76, 27, -208,
- 579, -59, 164, -1259, 27, -75, 580, 165,
- -4398, -2011, 3912, -2407, 2258, -1180, -247, -934,
- -353, -311, -540, 1050, 480, -646, -295, 575,
- 606, 277, -539, 331, 1767, -1447, 4240, 6160,
- -757, -190, -127, -1097, -2316, -35, 156, -457,
- 374, -664, 544, -1594, 81, -66, 195, 284,
- 1594, -1463, 1035, 6938, 1920, -155, -130, -65,
- -2938, -225, 142, -100, 92, -675, 619, -438,
- -186, 171, -121, -813, -562, 4716, 4085, -591,
- 2421, -19, -1357, -1018, -21, -357, 162, 140,
- -1175, -20, 170, 147, 83, -696, -603, 87,
- 1552, 8778, -935, 354, -1424, -147, -4703, -53,
- -7, -123, -831, 88, 501, -33, -189, 20,
- 134, 763, -81, 30, 4831, -4431, 41, -1479,
- -2976, -1424, -1198, 0, -133, -540, 1306, -12,
- 11, 436, -400, 3, 877, -804, 7, -268,
- 2090, 1192, 1006, 1645, 4853, -266, -86, -61,
- -165, -1437, -152, -128, -73, -210, -119, -101,
- -619, -353, -298, -487, 2386, 5712, 1426, -94,
- 1350, -347, -1991, -124, 0, -111, -832, -207,
- -497, 13, 32, 8, -196, -470, -117, 7,
- -1349, 1091, 1659, 8891, 313, -111, -72, -168,
- -4825, -5, 89, 136, -110, 732, -592, -900,
- 25, -20, -31, -170, 9980, 916, -381, -808,
- 88, -6080, -51, -8, -39, 0, -558, 232,
- 21, 492, 45, -18, -53, -4, 2, 4,
- 2338, -1031, -248, 3928, 6484, -333, -64, -3,
- -942, -2566, 147, 35, -15, -560, 247, 59,
- -925, 408, 98, -1555, 6166, -1240, -337, 3672,
- -1277, -2320, -93, -6, -823, -99, 466, 126,
- -25, -1382, 278, 75, 480, -96, -26, 286,
- 4377, -132, -2588, 1701, 4865, -1169, -1, -409,
- -176, -1444, 35, 691, -20, -454, 13, 268,
- -1299, 39, 768, -505, 2594, 3295, 3944, 1481,
- 682, -410, -662, -949, -133, -28, -521, -624,
- -793, -234, -297, -356, -108, -137, -164, -61,
- 4151, 624, 815, 4485, 2229, -1052, -23, -40,
- -1228, -303, -158, -206, -31, -1136, -170, -223,
- -565, -84, -111, -610, -3575, -361, 4924, 2791,
- 4698, -780, -7, -1480, -475, -1347, -78, 1074,
- 108, 609, 61, -839, 1025, 103, -1412, -800,
- -2518, 3791, 8623, 315, 2465, -387, -877, -4538,
- -6, -370, 582, 1325, -1995, 48, -73, -166,
- 378, -570, -1297, -47, -691, 2989, 9957, -421,
- -1142, -29, -545, -6051, -10, -79, 126, 420,
- -1817, -17, 76, 256, -48, 208, 694, -29,
- -1918, 104, -3190, -3410, -4440, -224, 0, -621,
- -709, -1203, 12, -373, 20, -399, 21, -664,
- -519, 28, -864, -924, -3359, -1668, 1854, 6939,
- 1430, -688, -169, -209, -2939, -124, -341, 380,
- 188, 1422, 706, -785, 293, 145, -161, -606,
- 42, 9706, 3164, -952, 907, 0, -5750, -611,
- -55, -50, -25, -8, -1874, 2, 564, 183,
- -2, -537, -175, 52, 1607, 785, 2862, 4327,
- 3307, -157, -37, -500, -1143, -667, -77, -280,
- -137, -424, -207, -756, -324, -158, -577, -873,
- 6801, 3416, 2227, 1682, -3217, -2823, -712, -302,
- -172, -631, -1418, -924, -464, -698, -350, -228,
- 1335, 670, 437, 330, 3459, 3898, 364, 7841,
- -2640, -730, -927, -8, -3753, -425, -823, -76,
- -86, -1655, -1865, -174, 557, 628, 58, 1263,
- -5902, -3458, -2465, -1886, 4334, -2126, -730, -371,
- -217, -1146, -1245, -888, -520, -679, -398, -283,
- 1561, 915, 652, 499, -3710, 1133, 7849, 3443,
- -215, -840, -78, -3760, -723, -2, 256, 1777,
- -543, 779, -238, -1649, -48, 14, 103, 45,
- 4132, 2828, 2, -4212, -4116, -1042, -488, 0,
- -1083, -1034, -713, 0, 0, 1062, 727, 0,
- 1038, 710, 0, -1058, 5875, 8496, -1796, 1376,
- -1786, -2107, -4406, -197, -115, -194, -3047, 644,
- 931, -493, -713, 150, 640, 926, -195, 150,
- 3143, 3483, 3546, -793, 4489, -603, -740, -767,
- -38, -1230, -668, -680, -754, 152, 168, 171,
- -861, -954, -971, 217, 2845, 7965, 3695, -5432,
- 3978, -494, -3873, -833, -1801, -966, -1383, -641,
- -1796, 943, 2641, 1225, -691, -1934, -897, 1319,
- 1538, 150, 7139, 2049, 3097, -144, -1, -3110,
- -256, -585, -14, -670, -65, -192, -18, -892,
- -290, -28, -1349, -387, 618, 7520, 4729, -238,
- -3373, -23, -3452, -1365, -3, -694, -283, -178,
- -2170, 8, 109, 68, 127, 1548, 973, -49,
- 2965, -3013, 7912, 7076, -1997, -536, -554, -3821,
- -3056, -243, 545, -1431, 1455, -1280, 1301, -3417,
- 361, -367, 964, 862, 2443, -929, -1113, 9677,
- 4138, -364, -52, -75, -5716, -1045, 138, 166,
- -63, -1443, 549, 657, -617, 234, 281, -2444,
- 1966, 3309, 10085, -3399, 2105, -236, -668, -6207,
- -705, -270, -397, -1210, -2037, 408, 686, 2092,
- -252, -425, -1295, 436, -112, -1368, 8868, 4822,
- 2048, 0, -114, -4800, -1419, -256, -9, 61,
- 740, 33, 402, -2610, 14, 171, -1108, -602,
- -2597, 438, -1839, 6229, 7266, -411, -11, -206,
- -2368, -3223, 69, -291, 49, 987, -166, 699,
- 1152, -194, 816, -2763, 3454, 553, 9127, 4946,
- -5596, -728, -18, -5084, -1493, -1911, -116, -1924,
- -308, -1042, -166, -2755, 1179, 188, 3117, 1689,
- -532, -663, 12262, 2495, -1004, -17, -26, -9177,
- -380, -61, -21, 398, 496, 81, 101, -1867,
- -32, -40, 751, 152, -2100, 1317, -1509, 11425,
- 2997, -269, -105, -139, -7967, -548, 168, -193,
- 121, 1464, -918, 1052, 384, -240, 276, -2090,
- 1193, -2697, 11259, 5373, -763, -86, -444, -7737,
- -1762, -35, 196, -819, 1853, -391, 884, -3692,
- 55, -125, 525, 250, 2405, -471, 11079, 203,
- 782, -353, -13, -7491, -2, -37, 69, -1626,
- 318, -29, 5, -137, -114, 22, -529, -9,
- -1871, 5685, 11290, -2662, 1353, -213, -1972, -7780,
- -432, -111, 649, 1289, -3917, -304, 923, 1834,
- 154, -469, -932, 220, -3768, 5927, -3093, 5041,
- 5212, -866, -2144, -584, -1551, -1658, 1363, -711,
- 1119, 1159, -1824, 951, 1198, -1885, 984, -1603,
- -2546, 9502, 5969, -2440, 1928, -395, -5511, -2175,
- -363, -226, 1477, 927, -3462, -379, 1415, 889,
- 299, -1118, -702, 287, -4963, 3568, 4592, 5508,
- 3451, -1503, -777, -1287, -1851, -727, 1080, 1391,
- -1000, 1668, -1199, -1543, 1045, -751, -967, -1160,
- 1745, -2586, 3983, 10899, -1551, -186, -408, -968,
- -7250, -146, 275, -424, 628, -1161, 1720, -2649,
- 165, -244, 377, 1032, 867, -456, -727, 3369,
- 11822, -45, -12, -32, -692, -8531, 24, 38,
- -20, -178, 93, 149, -625, 329, 525, -2431,
- 7535, 2422, 1926, 1405, 1599, -3466, -358, -226,
- -120, -156, -1114, -886, -284, -646, -207, -165,
- -735, -236, -188, -137, 1041, -735, -142, 13209,
- 1515, -66, -33, -1, -10649, -140, 46, 9,
- -6, -839, 593, 114, -96, 68, 13, -1222,
- 7950, 6745, -1444, -1008, 2721, -3857, -2777, -127,
- -62, -452, -3273, 700, 594, 489, 415, -88,
- -1320, -1120, 239, 167, -4754, -1379, 4522, -578,
- -5733, -1379, -116, -1248, -20, -2006, -400, 1312,
- 380, -167, -48, 159, -1663, -482, 1582, -202,
- 3220, 5978, 5923, 2430, -2689, -633, -2181, -2141,
- -360, -441, -1175, -1164, -2161, -477, -886, -878,
- 528, 981, 972, 398, 377, 1312, 13978, -1470,
- 677, -8, -105, -11925, -132, -28, -30, -321,
- -1119, 33, 117, 1254, -15, -54, -577, 60,
- -3435, 6770, 314, -885, 5686, -720, -2797, -6,
- -47, -1973, 1419, 65, -129, -185, 366, 16,
- 1192, -2349, -109, 307, 3171, 8774, -2260, 2679,
- 3069, -613, -4699, -312, -438, -575, -1698, 437,
- 1210, -518, -1435, 369, -594, -1643, 423, -501,
- 5557, 1509, 5407, -125, -7386, -1884, -139, -1784,
- 0, -3330, -511, -1834, -498, 42, 11, 41,
- 2505, 680, 2438, -56, -2838, 2595, 13228, 271,
- 1793, -491, -411, -10680, -4, -196, 449, 2291,
- -2095, 47, -42, -219, 310, -284, -1447, -29,
- 664, -278, 14966, 951, -711, -26, -4, -13672,
- -55, -30, 11, -606, 253, -38, 16, -869,
- 28, -12, 650, 41, 808, 1770, 8658, 5863,
- -1486, -39, -191, -4576, -2098, -134, -87, -427,
- -935, -289, -633, -3098, 73, 160, 785, 531,
- 3063, 1539, 2000, -542, 9576, -572, -144, -244,
- -17, -5597, -287, -374, -188, 101, 51, 66,
- -1790, -900, -1169, 317, 514, 14083, -323, 896,
- -891, -16, -12106, -6, -49, -48, -442, 10,
- 277, -28, -770, 17, 27, 766, -17, 48,
- 892, 158, 5237, 11057, -1603, -48, -1, -1674,
- -7462, -156, -8, -285, -50, -602, -106, -3534,
- 87, 15, 512, 1082, -1612, 2564, -4296, 12526,
- 5710, -158, -401, -1126, -9576, -1990, 252, -422,
- 672, 1232, -1960, 3284, 561, -893, 1497, -4365,
- 4889, -6878, 612, 6109, 4753, -1459, -2887, -22,
- -2277, -1379, 2052, -182, 257, -1823, 2564, -228,
- -1418, 1995, -177, -1772, 3053, -506, 2403, 9625,
- 1322, -569, -15, -352, -5655, -106, 94, -448,
- 74, -1794, 297, -1412, -246, 40, -194, -777,
- -754, 12904, 4480, -2113, 1471, -34, -10163, -1225,
- -272, -132, 594, 206, -3529, -97, 1664, 577,
- 67, -1159, -402, 189, 4255, 1476, 5055, 2393,
- 2912, -1105, -132, -1559, -349, -517, -383, -1313,
- -455, -621, -215, -738, -756, -262, -898, -425,
- -1371, 535, 1417, 14604, -997, -114, -17, -122,
- -13017, -60, 44, 118, -46, 1222, -477, -1263,
- -83, 32, 86, 888, 5368, -1744, 4083, -1236,
- 3753, -1758, -185, -1017, -93, -860, 571, -1338,
- 434, 405, -131, 308, -1229, 399, -935, 283,
- 1588, -3097, 14415, 3699, -1171, -154, -585, -12683,
- -835, -83, 300, -1397, 2725, -358, 699, -3255,
- 113, -221, 1030, 264, 212, 7989, 9471, -3344,
- 2009, -2, -3895, -5475, -682, -246, -103, -123,
- -4618, 43, 1630, 1933, -26, -979, -1161, 410,
- 856, 2294, -627, 6930, 6929, -44, -321, -24,
- -2931, -2930, -119, 32, 87, -362, -970, 265,
- -362, -970, 265, -2931, 2357, -4187, 7162, 7683,
- 3371, -339, -1070, -3131, -3603, -693, 602, -1030,
- 1830, -1105, 1963, -3359, -485, 861, -1474, -1581,
- 350, 4585, 14053, -3819, 1218, -7, -1283, -12054,
- -890, -90, -97, -300, -3933, 81, 1068, 3275,
- -26, -341, -1045, 284, -3248, 3531, 475, 2137,
- 11711, -644, -761, -13, -278, -8372, 700, 94,
- -102, 423, -460, -62, 2322, -2524, -340, -1528,
- -3017, 3852, 1725, 8440, 5257, -555, -905, -181,
- -4348, -1686, 709, 317, -405, 1554, -1984, -889,
- 968, -1236, -553, -2708, -909, 3196, 15512, -2528,
- 1066, -50, -623, -14686, -390, -69, 177, 861,
- -3026, -140, 493, 2393, 59, -208, -1009, 164,
- 959, -3370, 9617, 9545, -1761, -56, -693, -5645,
- -5561, -189, 197, -563, 1978, -558, 1963, -5603,
- 103, -362, 1034, 1026, 7575, 11796, -4845, 3252,
- -1703, -3502, -8493, -1433, -645, -177, -5454, 2240,
- 3488, -1503, -2341, 961, 787, 1226, -503, 338,
- 6409, 1722, 1764, -4191, 6015, -2507, -181, -189,
- -1072, -2208, -673, -690, -185, 1639, 440, 451,
- -2353, -632, -647, 1538, -2420, 12161, 5038, 1286,
- -2098, -357, -9027, -1549, -100, -268, 1796, 744,
- -3740, 190, -954, -395, -310, 1557, 645, 164,
- -2232, -1341, 7246, 9470, -1977, -304, -109, -3204,
- -5474, -238, -182, 987, 593, 1290, 775, -4188,
- -269, -161, 874, 1143, 1030, 7034, 4231, 1551,
- 3077, -64, -3019, -1093, -146, -577, -442, -266,
- -1816, -97, -666, -400, -193, -1321, -794, -291,
- 5121, 11835, -477, -1749, 2298, -1601, -8549, -13,
- -186, -322, -3699, 149, 344, 546, 1264, -50,
- -718, -1660, 66, 245, -3328, 3827, 5921, 9976,
- -1045, -676, -894, -2140, -6075, -66, 777, 1203,
- -1383, 2027, -2330, -3605, -212, 244, 377, 636,
- 3813, 5718, -4666, -3412, 5674, -887, -1995, -1329,
- -710, -1965, -1331, 1086, 1628, 794, 1191, -972,
- -1320, -1980, 1616, 1181, 1348, -3672, 13154, 6938,
- -1690, -110, -823, -10561, -2938, -174, 302, -1082,
- 2948, -570, 1555, -5570, 139, -379, 1357, 716,
- 2151, -3586, 6949, 12131, -1224, -282, -785, -2947,
- -8982, -91, 470, -912, 1521, -1592, 2655, -5145,
- 160, -268, 519, 906, -2889, 9647, 10276, -2728,
- 995, -509, -5680, -6445, -454, -60, 1701, 1812,
- -6051, -481, 1606, 1711, 175, -586, -624, 165,
- 6177, 2184, 555, 1985, 6589, -2329, -291, -18,
- -240, -2650, -823, -209, -74, -748, -264, -67,
- -2484, -878, -223, -798, -492, 391, 17166, -681,
- 240, -14, -9, -17987, -28, -3, 11, 515,
- -410, -20, 16, 713, 7, -5, -252, 10,
- 12628, 5448, -2630, 3011, -2695, -9733, -1811, -422,
- -553, -443, -4199, 2027, 874, -2321, -1001, 483,
- 2077, 896, -432, 495, -3628, -534, 3447, 7002,
- 6751, -803, -17, -725, -2992, -2782, -118, 763,
- 112, 1550, 228, -1473, 1495, 220, -1420, -2885,
- -5239, 5901, 8107, 3650, 4846, -1675, -2125, -4012,
- -813, -1433, 1887, 2592, -2920, 1167, -1315, -1806,
- 1550, -1745, -2398, -1080, 6157, 6678, 4099, -1074,
- 2348, -2314, -2722, -1025, -70, -336, -2509, -1540,
- -1670, 403, 437, 268, -882, -957, -587, 153,
- 1079, 16099, 242, -881, 1690, -71, -15820, -3,
- -47, -174, -1060, -16, -238, 58, 865, 13,
- -111, -1661, -25, 90, -278, 227, -1039, 1636,
- 16945, -4, -3, -65, -163, -17526, 3, -17,
- 14, 27, -22, 103, 287, -234, 1074, -1693,
- 15778, -1454, 574, -603, -107, -15195, -129, -20,
- -22, 0, 1400, -553, 51, 581, -53, 21,
- 103, -9, 3, -3, 2406, -836, 13224, 7993,
- -4266, -353, -42, -10673, -3899, -1111, 122, -1942,
- 674, -1174, 407, -6451, 626, -217, 3443, 2081,
- 3184, 14368, -3336, 2255, -1801, -619, -12600, -679,
- -310, -198, -2793, 648, 2926, -438, -1977, 459,
- 350, 1580, -366, 247, -1698, 17076, 2504, -539,
- -646, -176, -17798, -382, -17, -25, 1770, 259,
- -2610, -55, 561, 82, -67, 673, 98, -21,
- 2375, -797, -2696, 14483, 5383, -344, -38, -443,
- -12803, -1769, 115, 391, -131, -2100, 705, 2384,
- -780, 262, 886, -4759, -2691, 2554, -4520, 9573,
- 10655, -442, -398, -1247, -5594, -6930, 419, -742,
- 704, 1572, -1492, 2641, 1750, -1661, 2939, -6226,
- -4332, -4399, -1657, 4880, 7375, -1145, -1181, -167,
- -1453, -3319, -1163, -438, -444, 1290, 1310, 493,
- 1950, 1980, 745, -2196, -3498, 7405, 9955, 2693,
- -2971, -746, -3347, -6049, -442, -538, 1581, 2125,
- -4499, 575, -1217, -1636, -634, 1342, 1805, 488,
- 6717, -3792, 7739, 2798, 3489, -2754, -877, -3655,
- -477, -743, 1554, -3173, 1791, -1147, 647, -1321,
- -1430, 807, -1648, -595, 5263, 9770, 3463, 1069,
- -3971, -1690, -5826, -732, -69, -962, -3138, -1112,
- -2065, -343, -637, -226, 1275, 2368, 839, 259,
- 1243, -2634, 16772, 1871, 332, -94, -423, -17169,
- -213, -6, 199, -1273, 2696, -142, 300, -1915,
- -25, 53, -339, -37, 2691, 2836, 3105, 5711,
- 4817, -442, -491, -588, -1991, -1416, -465, -510,
- -537, -938, -988, -1082, -791, -834, -913, -1679,
- 4366, 2944, 7210, 3627, 1161, -1163, -529, -3172,
- -803, -82, -784, -1921, -1295, -966, -651, -1596,
- -309, -208, -511, -257, 13888, 3951, -671, -2305,
- 3354, -11773, -953, -27, -324, -686, -3349, 569,
- 161, 1954, 556, -94, -2843, -809, 137, 472,
- 7053, 5847, 2929, 8378, -4794, -3036, -2086, -523,
- -4284, -1403, -2517, -1261, -1045, -3607, -2990, -1498,
- 2064, 1711, 857, 2451, -2191, 12838, 9182, -3915,
- 1617, -293, -10059, -5146, -935, -159, 1717, 1228,
- -7195, -523, 3068, 2194, 216, -1267, -906, 386,
- -4881, 13114, 5767, -435, 4155, -1454, -10498, -2030,
- -11, -1054, 3907, 1718, -4616, -129, 348, 153,
- 1238, -3326, -1462, 110, 7843, -1250, 210, 7106,
- -5203, -3754, -95, -2, -3082, -1652, 598, -100,
- 16, -3402, 542, -91, 2491, -397, 66, 2257,
- -2463, 8168, 14551, -3908, 1828, -370, -4072, -12923,
- -932, -204, 1228, 2188, -7254, -587, 1948, 3471,
- 274, -911, -1623, 436, -1579, 347, -272, -2735,
- 16031, -152, -7, -4, -456, -15686, 33, -26,
- 5, -263, 58, -45, 1545, -340, 266, 2676,
- -6327, 1328, 5093, -5079, 7617, -2443, -107, -1583,
- -1574, -3541, 513, 1967, -413, -1961, 411, 1578,
- 2941, -617, -2367, 2361, 3286, -4509, 11306, 11025,
- -2623, -659, -1241, -7802, -7419, -420, 904, -2267,
- 3112, -2211, 3034, -7608, 526, -722, 1810, 1765,
- 5567, 17853, -3754, 1166, -519, -1892, -19455, -860,
- -83, -16, -6067, 1275, 4090, -396, -1271, 267,
- 176, 566, -119, 37, -2136, -424, 15292, 5108,
- -1648, -278, -10, -14273, -1593, -165, -55, 1993,
- 396, 666, 132, -4768, -214, -42, 1538, 514,
- 2267, -3297, 2549, 16563, -791, -313, -663, -396,
- -16745, -38, 456, -352, 513, -2291, 3333, -2576,
- 109, -159, 123, 799, 3655, 1899, -3364, 6279,
- 12510, -815, -220, -690, -2406, -9552, -423, 750,
- 390, -1400, -728, 1289, -2791, -1450, 2568, -4794,
- 8052, 2285, -6193, 5138, 6003, -3957, -318, -2341,
- -1611, -2199, -1123, 3044, 864, -2525, -716, 1942,
- -2950, -837, 2269, -1882, -386, -2291, 7679, 15387,
- -2723, -9, -320, -3599, -14452, -452, -54, 181,
- 1074, 362, 2152, -7212, -64, -380, 1276, 2557,
- 2777, -1173, 3984, 13079, 2508, -470, -84, -969,
- -10440, -384, 198, -675, 285, -2217, 936, -3180,
- -425, 179, -610, -2002, -1879, 1771, -2684, 16705,
- 1833, -215, -191, -439, -17032, -205, 203, -308,
- 290, 1916, -1805, 2736, 210, -198, 300, -1869,
- 1052, 4495, 15519, 1467, -4032, -67, -1233, -14700,
- -131, -992, -288, -997, -4257, -94, -402, -1389,
- 259, 1106, 3819, 361, 3010, 2544, 6969, 7559,
- 1996, -553, -395, -2964, -3487, -243, -467, -1280,
- -1082, -1388, -1174, -3215, -366, -310, -849, -921,
- -5209, -1867, 8713, 10351, 1549, -1656, -212, -4634,
- -6540, -146, -593, 2770, 993, 3291, 1180, -5505,
- 492, 176, -824, -979, -4314, 8513, 913, 7547,
- -2723, -1135, -4423, -50, -3476, -452, 2241, 240,
- -474, 1987, -3921, -420, -717, 1415, 151, 1254,
- 12929, -1219, 2448, 1757, 6303, -10204, -90, -365,
- -188, -2425, 962, -1932, 182, -1386, 130, -262,
- -4974, 469, -941, -676, 6465, 4132, 3167, 3160,
- 5697, -2551, -1042, -612, -609, -1981, -1630, -1249,
- -798, -1247, -797, -611, -2248, -1437, -1101, -1099,
- -3636, 4859, 18914, -1335, 810, -807, -1441, -21836,
- -108, -40, 1078, 4198, -5609, -296, 396, 1541,
- 179, -240, -936, 66, 8844, 7864, 654, -4063,
- -5680, -4774, -3774, -26, -1007, -1969, -4245, -353,
- -314, 2193, 1950, 162, 3066, 2726, 226, -1408,
- 1859, 2634, 9228, 996, 9464, -211, -423, -5197,
- -60, -5467, -299, -1047, -1483, -113, -160, -561,
- -1074, -1521, -5330, -575, 2949, 12260, 10290, -497,
- -3943, -530, -9174, -6463, -15, -949, -2206, -1852,
- -7700, 89, 372, 312, 709, 2950, 2476, -119,
- -2903, 1552, 14867, 9970, -496, -514, -147, -13491,
- -6068, -15, 275, 2634, -1408, 1766, -944, -9047,
- -87, 47, 450, 302, 3243, 8234, 7586, 3373,
- 2151, -642, -4138, -3512, -694, -282, -1630, -1501,
- -3812, -667, -1695, -1561, -425, -1081, -996, -442,
- -9631, 60, 3501, 5359, 10150, -5662, 0, -748,
- -1752, -6288, 35, 2058, -12, 3150, -19, -1145,
- 5967, -37, -2169, -3320, -6874, -2553, -5446, -2195,
- -7841, -2884, -397, -1810, -294, -3753, -1071, -2285,
- -848, -921, -342, -729, -3290, -1221, -2606, -1050,
- -3413, -1141, 4630, 13612, 7897, -711, -79, -1308,
- -11310, -3806, -237, 964, 322, 2836, 948, -3847,
- 1645, 550, -2231, -6561, 4410, -5678, 8006, -3992,
- 3811, -1187, -1968, -3912, -973, -886, 1528, -2155,
- 2775, 1074, -1383, 1951, -1025, 1321, -1862, 928,
- 5659, 11535, 2203, -452, 7169, -1954, -8121, -296,
- -12, -3137, -3984, -761, -1551, 156, 318, 60,
- -2476, -5048, -964, 197, 2914, -2914, 3485, -3965,
- 13675, -518, -518, -741, -959, -11414, 518, -620,
- 620, 705, -705, 843, -2433, 2432, -2909, 3310,
- 7843, 1907, 1022, 8882, 7972, -3755, -222, -63,
- -4815, -3879, -913, -489, -119, -4252, -1034, -554,
- -3816, -928, -497, -4322, 13807, 9531, 1436, 1612,
- 1779, -11636, -5544, -125, -158, -193, -8032, -1210,
- -835, -1358, -938, -141, -1499, -1035, -156, -175,
- 13620, -5337, 5450, -2263, 1723, -11322, -1738, -1813,
- -312, -181, 4436, -4531, 1775, 1881, -737, 752,
- -1432, 561, -573, 238, 5297, 8374, 8872, 7694,
- 6538, -1712, -4280, -4804, -3613, -2609, -2707, -2868,
- -4534, -2487, -3932, -4166, -2113, -3341, -3540, -3070
-};
-
int ff_g723_1_scale_vector(int16_t *dst, const int16_t *vector, int length)
{
int bits, max = 0;
@@ -1169,9 +98,9 @@
/* Select quantization table */
if (cur_rate == RATE_6300 && pitch_lag < SUBFRAME_LEN - 2) {
- cb_ptr = ff_g723_1_adaptive_cb_gain85;
+ cb_ptr = adaptive_cb_gain85;
} else
- cb_ptr = ff_g723_1_adaptive_cb_gain170;
+ cb_ptr = adaptive_cb_gain170;
/* Calculate adaptive vector */
cb_ptr += subfrm->ad_cb_gain * 20;
@@ -1196,8 +125,8 @@
for (j = 0; j < LPC_ORDER; j++) {
int index = (lpc[j] >> 7) & 0x1FF;
int offset = lpc[j] & 0x7f;
- int temp1 = ff_g723_1_cos_tab[index] * (1 << 16);
- int temp2 = (ff_g723_1_cos_tab[index + 1] - ff_g723_1_cos_tab[index]) *
+ int temp1 = cos_tab[index] * (1 << 16);
+ int temp2 = (cos_tab[index + 1] - cos_tab[index]) *
(((offset << 8) + 0x80) << 1);
lpc[j] = -(av_sat_dadd32(1 << 15, temp1 + temp2) >> 16);
@@ -1286,16 +215,16 @@
}
/* Get the VQ table entry corresponding to the transmitted index */
- cur_lsp[0] = ff_g723_1_lsp_band0[lsp_index[0]][0];
- cur_lsp[1] = ff_g723_1_lsp_band0[lsp_index[0]][1];
- cur_lsp[2] = ff_g723_1_lsp_band0[lsp_index[0]][2];
- cur_lsp[3] = ff_g723_1_lsp_band1[lsp_index[1]][0];
- cur_lsp[4] = ff_g723_1_lsp_band1[lsp_index[1]][1];
- cur_lsp[5] = ff_g723_1_lsp_band1[lsp_index[1]][2];
- cur_lsp[6] = ff_g723_1_lsp_band2[lsp_index[2]][0];
- cur_lsp[7] = ff_g723_1_lsp_band2[lsp_index[2]][1];
- cur_lsp[8] = ff_g723_1_lsp_band2[lsp_index[2]][2];
- cur_lsp[9] = ff_g723_1_lsp_band2[lsp_index[2]][3];
+ cur_lsp[0] = lsp_band0[lsp_index[0]][0];
+ cur_lsp[1] = lsp_band0[lsp_index[0]][1];
+ cur_lsp[2] = lsp_band0[lsp_index[0]][2];
+ cur_lsp[3] = lsp_band1[lsp_index[1]][0];
+ cur_lsp[4] = lsp_band1[lsp_index[1]][1];
+ cur_lsp[5] = lsp_band1[lsp_index[1]][2];
+ cur_lsp[6] = lsp_band2[lsp_index[2]][0];
+ cur_lsp[7] = lsp_band2[lsp_index[2]][1];
+ cur_lsp[8] = lsp_band2[lsp_index[2]][2];
+ cur_lsp[9] = lsp_band2[lsp_index[2]][3];
/* Add predicted vector & DC component to the previously quantized vector */
for (i = 0; i < LPC_ORDER; i++) {
diff --git a/libavcodec/g723_1.h b/libavcodec/g723_1.h
index 521f220..d60d481 100644
--- a/libavcodec/g723_1.h
+++ b/libavcodec/g723_1.h
@@ -222,6 +222,11 @@
static const uint8_t frame_size[4] = { 24, 20, 4, 1 };
/**
+ * Postfilter gain weighting factors scaled by 2^15
+ */
+static const int16_t ppf_gain_weight[2] = {0x1800, 0x2000};
+
+/**
* LSP DC component
*/
static const int16_t dc_lsp[LPC_ORDER] = {
@@ -238,30 +243,1202 @@
};
/* Cosine table scaled by 2^14 */
-extern const int16_t ff_g723_1_cos_tab[COS_TBL_SIZE + 1];
-#define G723_1_COS_TAB_FIRST_ELEMENT 16384
+static const int16_t cos_tab[COS_TBL_SIZE + 1] = {
+ 16384, 16383, 16379, 16373, 16364, 16353, 16340, 16324,
+ 16305, 16284, 16261, 16235, 16207, 16176, 16143, 16107,
+ 16069, 16029, 15986, 15941, 15893, 15843, 15791, 15736,
+ 15679, 15619, 15557, 15493, 15426, 15357, 15286, 15213,
+ 15137, 15059, 14978, 14896, 14811, 14724, 14635, 14543,
+ 14449, 14354, 14256, 14155, 14053, 13949, 13842, 13733,
+ 13623, 13510, 13395, 13279, 13160, 13039, 12916, 12792,
+ 12665, 12537, 12406, 12274, 12140, 12004, 11866, 11727,
+ 11585, 11442, 11297, 11151, 11003, 10853, 10702, 10549,
+ 10394, 10238, 10080, 9921, 9760, 9598, 9434, 9269,
+ 9102, 8935, 8765, 8595, 8423, 8250, 8076, 7900,
+ 7723, 7545, 7366, 7186, 7005, 6823, 6639, 6455,
+ 6270, 6084, 5897, 5708, 5520, 5330, 5139, 4948,
+ 4756, 4563, 4370, 4176, 3981, 3786, 3590, 3393,
+ 3196, 2999, 2801, 2603, 2404, 2205, 2006, 1806,
+ 1606, 1406, 1205, 1005, 804, 603, 402, 201,
+ 0, -201, -402, -603, -804, -1005, -1205, -1406,
+ -1606, -1806, -2006, -2205, -2404, -2603, -2801, -2999,
+ -3196, -3393, -3590, -3786, -3981, -4176, -4370, -4563,
+ -4756, -4948, -5139, -5330, -5520, -5708, -5897, -6084,
+ -6270, -6455, -6639, -6823, -7005, -7186, -7366, -7545,
+ -7723, -7900, -8076, -8250, -8423, -8595, -8765, -8935,
+ -9102, -9269, -9434, -9598, -9760, -9921, -10080, -10238,
+ -10394, -10549, -10702, -10853, -11003, -11151, -11297, -11442,
+ -11585, -11727, -11866, -12004, -12140, -12274, -12406, -12537,
+ -12665, -12792, -12916, -13039, -13160, -13279, -13395, -13510,
+ -13623, -13733, -13842, -13949, -14053, -14155, -14256, -14354,
+ -14449, -14543, -14635, -14724, -14811, -14896, -14978, -15059,
+ -15137, -15213, -15286, -15357, -15426, -15493, -15557, -15619,
+ -15679, -15736, -15791, -15843, -15893, -15941, -15986, -16029,
+ -16069, -16107, -16143, -16176, -16207, -16235, -16261, -16284,
+ -16305, -16324, -16340, -16353, -16364, -16373, -16379, -16383,
+ -16384, -16383, -16379, -16373, -16364, -16353, -16340, -16324,
+ -16305, -16284, -16261, -16235, -16207, -16176, -16143, -16107,
+ -16069, -16029, -15986, -15941, -15893, -15843, -15791, -15736,
+ -15679, -15619, -15557, -15493, -15426, -15357, -15286, -15213,
+ -15137, -15059, -14978, -14896, -14811, -14724, -14635, -14543,
+ -14449, -14354, -14256, -14155, -14053, -13949, -13842, -13733,
+ -13623, -13510, -13395, -13279, -13160, -13039, -12916, -12792,
+ -12665, -12537, -12406, -12274, -12140, -12004, -11866, -11727,
+ -11585, -11442, -11297, -11151, -11003, -10853, -10702, -10549,
+ -10394, -10238, -10080, -9921, -9760, -9598, -9434, -9269,
+ -9102, -8935, -8765, -8595, -8423, -8250, -8076, -7900,
+ -7723, -7545, -7366, -7186, -7005, -6823, -6639, -6455,
+ -6270, -6084, -5897, -5708, -5520, -5330, -5139, -4948,
+ -4756, -4563, -4370, -4176, -3981, -3786, -3590, -3393,
+ -3196, -2999, -2801, -2603, -2404, -2205, -2006, -1806,
+ -1606, -1406, -1205, -1005, -804, -603, -402, -201,
+ 0, 201, 402, 603, 804, 1005, 1205, 1406,
+ 1606, 1806, 2006, 2205, 2404, 2603, 2801, 2999,
+ 3196, 3393, 3590, 3786, 3981, 4176, 4370, 4563,
+ 4756, 4948, 5139, 5330, 5520, 5708, 5897, 6084,
+ 6270, 6455, 6639, 6823, 7005, 7186, 7366, 7545,
+ 7723, 7900, 8076, 8250, 8423, 8595, 8765, 8935,
+ 9102, 9269, 9434, 9598, 9760, 9921, 10080, 10238,
+ 10394, 10549, 10702, 10853, 11003, 11151, 11297, 11442,
+ 11585, 11727, 11866, 12004, 12140, 12274, 12406, 12537,
+ 12665, 12792, 12916, 13039, 13160, 13279, 13395, 13510,
+ 13623, 13733, 13842, 13949, 14053, 14155, 14256, 14354,
+ 14449, 14543, 14635, 14724, 14811, 14896, 14978, 15059,
+ 15137, 15213, 15286, 15357, 15426, 15493, 15557, 15619,
+ 15679, 15736, 15791, 15843, 15893, 15941, 15986, 16029,
+ 16069, 16107, 16143, 16176, 16207, 16235, 16261, 16284,
+ 16305, 16324, 16340, 16353, 16364, 16373, 16379, 16383,
+ 16384
+};
/**
* LSP VQ tables
*/
-extern const int16_t ff_g723_1_lsp_band0[LSP_CB_SIZE][3];
-extern const int16_t ff_g723_1_lsp_band1[LSP_CB_SIZE][3];
-extern const int16_t ff_g723_1_lsp_band2[LSP_CB_SIZE][4];
+static const int16_t lsp_band0[LSP_CB_SIZE][3] = {
+ { 0, 0, 0}, { -270, -1372, -1032}, { -541, -1650, -1382},
+ { -723, -2011, -2213}, { -941, -1122, -1942}, { -780, -1145, -2454},
+ { -884, -1309, -1373}, {-1051, -1523, -1766}, {-1083, -1622, -2300},
+ { -777, -1377, -2147}, { -935, -1467, -2763}, { -802, -1327, -3471},
+ { -935, -1959, -3999}, { -240, -89, 222}, { -661, -257, -160},
+ { -994, -466, -419}, { -188, -164, -278}, { -342, -512, -415},
+ { -607, -511, -797}, { 16, 19, -716}, { 374, 425, -972},
+ { -346, 245, -282}, { -265, 506, -754}, { -620, -147, 1955},
+ { -742, -860, 2597}, { -150, -352, 2704}, { 305, 880, 1954},
+ { 123, 731, 2766}, { -348, 765, 3327}, { 618, 221, 3258},
+ { -178, -47, 4219}, { 393, 1304, 3842}, { 698, 1702, 4801},
+ { 63, -584, 1229}, { -215, -732, 1704}, { 172, -335, 1909},
+ { -2, 216, 1797}, { 353, 127, 2205}, {-1208, 188, 11},
+ { -513, -75, -683}, { -973, 222, -646}, { -616, -843, -388},
+ { -950, -1113, -359}, {-1431, -623, -705}, {-1398, -1063, -178},
+ { -45, -461, 35}, { -9, -657, -216}, { 127, -1078, 95},
+ { -950, -1156, 584}, {-1480, -1494, 449}, { -120, -705, 516},
+ { -368, -961, 727}, { -378, -526, 973}, { -793, -614, 676},
+ { -801, -755, 1287}, {-1476, -340, 1636}, { -505, -1254, 1543},
+ {-1243, -1622, 1532}, { -776, -1477, -655}, {-1151, -1296, -823},
+ {-1153, -1672, -1124}, {-1291, -2003, -1702}, { -622, -1283, 57},
+ { -471, -1611, 509}, {-1060, -1570, -139}, { -873, -2156, -536},
+ {-1716, -2021, -364}, {-2150, -3218, -1291}, {-1248, -1945, -2904},
+ {-1215, -2633, -2855}, { 167, -244, 84}, { 349, -412, -217},
+ { -40, -352, 632}, { 227, -529, 405}, { 68, -383, -443},
+ { 167, -558, -706}, { -275, -854, -14}, { -351, -1089, -449},
+ { 341, -72, -289}, { 603, -106, -474}, { 322, -219, -649},
+ { 179, -317, -998}, { 450, -291, -996}, { 555, 195, -525},
+ { 784, 272, -831}, { -148, -384, -849}, { 82, -536, -1357},
+ { 238, -172, -1354}, { 422, -268, -1841}, { 297, -737, -2079},
+ { -111, -801, -598}, { 1, -668, -984}, { -131, -818, -1299},
+ { -329, -521, -1310}, { -151, -778, -1834}, { -93, -352, -1746},
+ { -568, -640, -1821}, { -509, -941, -2183}, { 464, -815, -1250},
+ { 79, -1133, -1597}, { -184, -1353, -2123}, { -196, -410, -2427},
+ { -192, -833, -2810}, { -259, -1382, -3045}, { -217, 4, -1166},
+ { -800, -325, -1219}, { -363, -830, -898}, { -661, -1134, -960},
+ { -386, -980, -1501}, { -627, -1159, -1722}, { -903, -829, -855},
+ { -685, -829, -1313}, {-1065, -959, -1405}, { 441, 25, -847},
+ { 655, -27, -1181}, { 1159, -110, -705}, { 856, 253, -1671},
+ { 415, 404, -1}, { 322, 903, -398}, { 670, 499, -292},
+ { 803, 591, -610}, { 1144, 591, -814}, { 717, 183, 393},
+ { 857, 381, 106}, { 609, 62, -27}, { 792, 198, -325},
+ { 735, 805, 88}, { 1142, 812, 78}, { 1028, 366, -292},
+ { 1309, 743, -237}, { 1615, 589, -79}, { 1010, 639, -243},
+ { 999, 964, -311}, { 1500, 1137, -615}, { 988, 357, 646},
+ { 1227, 667, 683}, { 1164, 1565, 894}, { 1392, 2015, 477},
+ { 1138, 533, 250}, { 1437, 896, 391}, { 1765, 1118, 99},
+ { 1112, 1090, 802}, { 1596, 846, 1134}, { 937, 1161, 279},
+ { 1719, 1254, 683}, { 1338, 1086, 35}, { 1419, 1324, 428},
+ { 1428, 1524, 40}, { 2108, 1594, 89}, { 1015, 544, 1222},
+ { 1121, 925, 1263}, { 1030, 1318, 1485}, { 1295, 789, 1817},
+ { 1323, 1272, 1909}, { 1724, 1237, 1803}, { 1797, 1689, 858},
+ { 2149, 1367, 1301}, { 2302, 1867, 761}, { 2863, 2351, 1053},
+ { 52, 163, -76}, { 230, 309, -492}, { -71, 619, 39},
+ { -218, 856, 499}, { -654, 736, -207}, { -535, 1259, 155},
+ { -480, 1476, 643}, { 262, 1081, 102}, { 309, 1592, -182},
+ { 627, 1629, 534}, { 337, 643, 456}, { 758, 670, 713},
+ { 202, 1126, 658}, { 612, 1131, 666}, { 686, 1223, 1136},
+ { -131, 377, 525}, { 42, 708, 907}, { 87, 1488, 1035},
+ { 432, 2117, 904}, { 137, 981, 1332}, { -447, 1014, 1136},
+ { -839, 1793, 1246}, { -559, 297, 198}, { -850, 685, 446},
+ {-1273, 632, 826}, { -401, -544, 173}, { -753, -793, 144},
+ { -436, -9, 772}, { -115, -243, 1310}, { -670, -269, 374},
+ {-1027, -13, 639}, { -887, -81, 1137}, {-1277, -455, 158},
+ {-1411, -720, 736}, { 172, 88, 403}, { 386, 255, 756},
+ { -500, 522, 910}, { -958, 659, 1388}, { -395, 301, 1344},
+ { -356, 768, 1813}, { -613, 841, 2419}, { 445, -122, 252},
+ { 629, -87, 723}, { 283, -253, 870}, { 456, -116, 1381},
+ { 757, 180, 1059}, { 532, 408, 1509}, { 947, 288, 1806},
+ { 1325, 994, 2524}, { 892, 1219, 3023}, { 1397, 1596, 3406},
+ { 1143, 1552, 2546}, { 1850, 1433, 2710}, { -10, 134, 1002},
+ { 154, 499, 1323}, { 508, 792, 1117}, { 509, 1340, 1616},
+ { 762, 862, 1608}, { 787, 740, 2320}, { 794, 1727, 1283},
+ { 465, 2108, 1660}, { -120, 1451, 1613}, { -386, 2016, 2169},
+ { 891, 1225, 2050}, { 456, 1480, 2185}, { 1493, 1283, 1209},
+ { 1397, 1636, 1518}, { 1776, 1738, 1552}, { 1572, 1698, 2141},
+ { 1389, 2126, 1271}, { 1959, 2413, 1119}, { 1365, 2892, 1505},
+ { 2206, 1971, 1623}, { 2076, 1950, 2280}, { 1717, 2291, 1867},
+ { 2366, 2515, 1953}, { 2865, 2838, 2522}, { 2535, 3465, 2011},
+ { 3381, 4127, 2638}, { 836, 2667, 2289}, { 1761, 2773, 2337},
+ { 1415, 3325, 2911}, { 2354, 3138, 3126}, { 2659, 4192, 4010},
+ { 1048, 1786, 1818}, { 1242, 2111, 2240}, { 1512, 2079, 2780},
+ { 1573, 2491, 3138}, { 2230, 2377, 2782}, { 416, 1773, 2704},
+ { 725, 2336, 3297}, { 1252, 2373, 3978}, { 2094, 2268, 3568},
+ { 2011, 2712, 4528}, { 1341, 3507, 3876}, { 1216, 3919, 4922},
+ { 1693, 4793, 6012}
+};
+
+static const int16_t lsp_band1[LSP_CB_SIZE][3] = {
+ { 0, 0, 0}, {-2114, -1302, 76}, {-2652, -1278, -1368},
+ {-2847, -828, -349}, {-3812, -2190, -349}, {-3946, -364, -449},
+ {-2725, -4492, -3607}, {-3495, -4764, -1744}, { -51, -756, 84},
+ { -153, -1191, 504}, { 108, -1418, 1167}, { -835, -896, 390},
+ { -569, -1702, 87}, {-1151, -1818, 933}, {-1826, -2547, 411},
+ {-1842, -1818, 1451}, {-2438, -1611, 781}, {-2747, -2477, 1311},
+ { -940, 1252, 477}, {-1629, 1688, 602}, {-1202, 617, 280},
+ {-1737, 393, 580}, {-1528, 1077, 1199}, {-2165, -161, 1408},
+ {-2504, -1087, 2371}, {-3458, -175, 1395}, {-1397, -98, -843},
+ {-2252, -177, -1149}, {-1489, -726, -1283}, {-1558, -265, -1744},
+ {-1867, -821, -1897}, {-2062, -1516, -2340}, {-2595, -1142, -2861},
+ { 170, 46, -819}, { -193, -204, -1151}, { 326, -196, -1532},
+ { 780, 329, -816}, { 201, 369, -1243}, { 650, -209, -1060},
+ { 1144, -15, -1216}, { 1203, -259, -1867}, { -890, -564, -1430},
+ { -638, -852, -1921}, { 177, -739, -1358}, { -261, -526, -1666},
+ { 206, -407, -2255}, { 338, -526, -822}, { 421, -1095, -1009},
+ { 765, -607, -1408}, { 825, -1295, -2004}, { 357, -905, -1815},
+ { -58, -1248, -1588}, { -596, -1436, -2046}, { -73, -1159, -2116},
+ { -115, -1382, -2581}, { -160, -1723, -1952}, { -6, -2196, -2954},
+ { -649, -1705, -2603}, { -617, -1453, -3282}, { -949, -2019, -3102},
+ { -812, 1544, 1937}, {-1854, 574, 2000}, {-1463, 1140, 2649},
+ {-2683, 1748, 1452}, {-2486, 2241, 2523}, { 783, 1910, 1435},
+ { 581, 2682, 1376}, { 236, 2197, 1885}, { -453, 2943, 2057},
+ { -682, 2178, 2565}, {-1342, 3201, 3328}, { -288, -184, 262},
+ { 121, -149, -183}, { 758, -412, 206}, { 1038, -204, 853},
+ { 1577, -457, 700}, { 937, -640, -567}, { 1508, -528, -1024},
+ { -225, -527, -427}, { -564, -1095, -332}, { -742, -353, -186},
+ {-1288, -459, 84}, {-1853, -484, -274}, {-1554, -731, 825},
+ {-2425, -234, 382}, {-1722, 293, -271}, {-2515, 425, -564},
+ {-2599, 818, 464}, { -358, 118, -375}, { -613, 198, -874},
+ { -690, 683, -324}, {-1352, 1155, -168}, {-1093, 129, -324},
+ {-1184, 611, -858}, { 433, 386, -372}, { -120, 486, -634},
+ { 234, 851, -631}, { 602, 128, 46}, { 1099, 410, 159},
+ { 715, -145, -424}, { 1198, -85, -593}, { 1390, 367, -358},
+ { 1683, 362, -964}, { 1711, 622, 45}, { 2033, 833, -383},
+ { 2890, 549, -506}, { 7, 401, 52}, { 72, 811, 415},
+ { 566, 668, 41}, { 467, 1218, 130}, { 68, 957, -187},
+ { -25, 1649, -103}, { -661, 260, 214}, { -925, -94, 612},
+ { -321, -422, 965}, { -788, -672, 1783}, { 400, -673, 779},
+ { 741, -595, 1635}, { -161, 307, 657}, { -382, 836, 871},
+ { -814, 400, 1223}, { 364, 606, 1247}, { 57, 75, 1571},
+ { 151, 471, 2287}, { -81, 1021, 1502}, { 227, 1470, 1097},
+ { 658, 1275, 1653}, { 664, 1478, 2377}, { 263, -127, 444},
+ { 264, 89, 969}, { 794, 171, 576}, { 821, 186, 1226},
+ { 404, 462, 517}, { 339, 918, 794}, { 1280, 1423, 196},
+ { 1453, 2019, 365}, { 1615, 1481, 672}, { 2394, 1708, 508},
+ { 806, 1238, 573}, { 713, 1158, 1078}, { 1285, 1436, 1232},
+ { 1790, 1188, 1141}, { 765, 643, 864}, { 1032, 797, 1279},
+ { 900, 563, 1827}, { 1514, 673, 2312}, { 1544, 1129, 3240},
+ { 1469, 1050, 1594}, { 1945, 1318, 1988}, { 2397, 2026, 2060},
+ { 3538, 2057, 2620}, { 1249, -118, 74}, { 1727, 194, 421},
+ { 2078, -50, -463}, { 970, 688, -432}, { 1149, 952, -110},
+ { 1254, 1275, -651}, { 1386, 929, 401}, { 1960, 1167, 232},
+ { 407, -752, -243}, { 859, -1118, 172}, { -227, -860, -992},
+ { -796, -1175, -1380}, { 8, -1282, -388}, { 353, -1781, -1037},
+ { -732, -397, -807}, { -853, -28, -1342}, {-1229, -1207, -1959},
+ {-1015, -1125, -2543}, {-1452, -1791, -2725}, {-1891, -2416, -3269},
+ { -918, -1629, -783}, { -580, -2155, -698}, {-1097, -2364, -96},
+ {-1387, -1513, 7}, {-1588, -2076, -664}, {-1473, -2740, -784},
+ {-2378, -3149, -56}, {-2856, -2092, -169}, {-3391, -3708, 316},
+ {-1176, -890, -614}, {-1944, -1061, -800}, { -299, -1517, -1000},
+ { -640, -1850, -1526}, {-1454, -1536, -1233}, {-1890, -1955, -1756},
+ {-1086, -1921, -2122}, { -750, -2325, -2260}, {-1325, -2413, -2673},
+ {-1114, -2542, -3459}, {-1341, -2901, -3963}, {-1160, -2226, -1393},
+ {-1001, -2772, -1573}, {-1594, -2641, -1978}, {-1534, -3046, -2624},
+ {-2224, -2196, -675}, {-2807, -3054, -1102}, {-2008, -2840, -1186},
+ {-1980, -3332, -1695}, {-1715, -3562, -505}, {-2527, -4000, -1887},
+ {-2333, -2734, -2296}, {-3440, -2401, -3211}, {-2008, -3528, -3337},
+ {-2247, -3291, -4510}, { -475, 949, 155}, { -149, 1365, 545},
+ { -757, 1644, 1083}, { -217, 2053, 1353}, {-1433, 2301, 1462},
+ { 495, 1661, 529}, { 10, 2037, 740}, { 2082, 1898, 978},
+ { 2831, 2294, 911}, { 842, 793, 420}, { 1223, 1023, 863},
+ { 1237, 451, 780}, { 1744, 708, 822}, { 1533, 284, 1384},
+ { 2135, 609, 1538}, { 2305, 626, 540}, { 2368, 1187, 955},
+ { 2586, 1255, -7}, { 3116, 1131, 726}, { 3431, 1730, 428},
+ { 2734, 1648, 1307}, { 2988, 1231, 2010}, { 3523, 2024, 1488},
+ { 1034, 1657, 871}, { 1206, 2163, 1036}, { 1807, 2372, 1233},
+ { 1808, 1769, 1493}, { 1573, 2332, 1779}, { 1216, 1609, 1866},
+ { 1480, 1898, 2513}, { 465, 2708, 2776}, { 771, 3638, 3338},
+ { 1869, 2599, 2623}, { 2825, 2745, 2468}, { 2638, 2439, 1585},
+ { 2094, 2970, 1308}, { 2022, 3057, 1999}, { 3428, 2912, 1816},
+ { 4536, 2974, 2129}, { 1046, 2563, 2086}, { 1363, 3562, 2318},
+ { 2511, 1891, 2984}, { 1866, 2306, 3986}, { 3272, 2924, 3682},
+ { 3146, 3564, 2272}, { 3592, 3968, 2822}, { 2431, 3369, 3069},
+ { 1931, 4709, 3090}, { 2629, 4220, 3986}, { 4639, 4056, 3664},
+ { 4035, 5334, 4912}
+};
+
+static const int16_t lsp_band2[LSP_CB_SIZE][4] = {
+ { 0, 0, 0, 0}, { 601, 512, -542, 334},
+ { 428, 1087, -484, -132}, { 652, 622, -391, -572},
+ { 378, 799, 141, -860}, { 1040, 409, 112, -554},
+ { 1123, 670, -75, -847}, { 1421, 494, -315, -1095},
+ { 787, 1001, 114, -460}, { 988, 1672, 216, -681},
+ { 1007, 1241, -132, -1247}, { 1073, 399, 186, -5},
+ { 1262, 193, -694, -129}, { 325, 196, 51, -641},
+ { 861, -59, 350, -458}, { 1261, 567, 586, -346},
+ { 1532, 885, 210, -517}, { 2027, 937, 113, -792},
+ { 1383, 1064, 334, 38}, { 1964, 1468, 459, 133},
+ { 2062, 1186, -98, -121}, { 2577, 1445, 506, -373},
+ { 2310, 1682, -2, -960}, { 2876, 1939, 765, 138},
+ { 3581, 2360, 649, -414}, { 219, 176, -398, -309},
+ { 434, -78, -435, -880}, { -344, 301, 265, -552},
+ { -915, 470, 657, -380}, { 419, -432, -163, -453},
+ { 351, -953, 8, -562}, { 789, -43, 20, -958},
+ { 302, -594, -352, -1159}, { 1040, 108, -668, -924},
+ { 1333, 210, -1217, -1663}, { 483, 589, -350, -1140},
+ { 1003, 824, -802, -1184}, { 745, 58, -589, -1443},
+ { 346, 247, -915, -1683}, { 270, 796, -720, -2043},
+ { 1208, 722, -222, -193}, { 1486, 1180, -412, -672},
+ { 1722, 179, -69, -521}, { 2047, 860, -666, -1410},
+ { -146, 222, -281, -805}, { -189, 90, -114, -1307},
+ { -152, 1086, -241, -764}, { -439, 733, -601, -1302},
+ { -833, -167, -351, -601}, { -856, -422, -411, -1059},
+ { -747, -355, -582, -1644}, { -837, 210, -916, -1144},
+ {-1800, 32, -878, -1687}, { -48, -23, -1146, 52},
+ { -350, -409, -1656, -364}, { 265, -728, -858, -577},
+ { 458, -247, -1141, -997}, { 691, -407, -1988, -1161},
+ { -66, -104, -705, -1249}, { -431, -93, -1191, -1844},
+ { 203, -732, -1000, -1693}, { 10, -832, -1846, -1819},
+ { 493, -128, -1436, -1768}, { 488, -311, -1730, -2540},
+ { -653, -532, -1150, -1172}, {-1086, -289, -1706, -1533},
+ { -699, -1205, -1216, -1766}, {-1032, -1481, -2074, -1523},
+ { -721, -1220, -2277, -2600}, { 12, -539, -1484, -1131},
+ { -40, -911, -2106, -441}, { -471, -484, -2267, -1549},
+ { -141, -988, -3006, -1721}, {-1545, -2102, -583, 342},
+ {-1383, -2772, -386, -13}, {-2118, -2589, -1205, 72},
+ {-2147, -3231, -965, 390}, {-2949, -3300, -621, 637},
+ {-3907, -4138, -865, 803}, {-1287, -845, -375, -548},
+ {-1416, -1169, -487, -1277}, {-1400, -1690, -1027, -418},
+ {-2018, -1909, -1188, -1260}, {-1418, -2222, -2029, -128},
+ {-2067, -2998, -2693, -310}, { -950, -1028, -1538, 185},
+ {-1616, -915, -2205, -549}, { 19, -821, -1145, 352},
+ { 184, -1175, -1356, -627}, { -547, -1088, -1661, -911},
+ { -216, -1502, -2197, -948}, { -795, -1306, -2374, -451},
+ { -924, -1889, -2796, -680}, { -600, -1614, -3609, -885},
+ {-2392, -2528, 319, 303}, {-2908, -2095, -310, 573},
+ {-3460, -2141, 49, -113}, {-2231, -448, 675, -146},
+ {-2805, -532, 1231, 479}, {-2684, -486, -200, 611},
+ {-3525, -971, -198, 704}, {-3707, 173, 349, 254},
+ {-4734, -1447, -34, 880}, { 777, -512, 114, -10},
+ { 1250, -66, 442, -5}, { 604, 613, 452, -352},
+ { 1224, 777, 675, -1014}, {-1372, -79, -1208, -238},
+ {-2389, -17, -1157, -818}, {-1504, -673, -1133, -1060},
+ {-1984, -799, -2005, -1973}, {-2037, -798, -1068, -105},
+ {-3190, -899, -1817, -194}, { -156, -886, 394, -318},
+ { -258, -1283, 551, 202}, { -536, -1729, 910, 331},
+ { -847, -1109, 795, -163}, {-1171, -1128, 715, 519},
+ {-1080, -1319, 1685, 668}, {-1000, -1921, 96, 211},
+ {-1487, -2148, 831, 174}, {-1139, -374, 414, -4},
+ {-1517, -1383, 396, -352}, {-1012, 439, -59, -967},
+ {-1812, 706, -440, -1030}, {-1971, -329, -34, -827},
+ {-2472, -1588, -151, -606}, {-2161, 374, -281, 76},
+ {-3012, 231, -15, -690}, { 1104, 566, 721, 209},
+ { 1685, 564, 383, 98}, { 1898, 750, 792, -97},
+ { 556, -64, 561, -93}, { 876, 162, 913, -22},
+ { 961, 675, 1296, 140}, { 756, -396, 851, 544},
+ { 360, -303, 1341, 396}, { 878, -22, 1464, 863},
+ { -309, -273, 642, -129}, { -686, -82, 842, 454},
+ { -5, -47, 1069, 998}, { -94, 967, 1277, 298},
+ { -489, 385, 1473, 746}, { -369, -717, 1333, 242},
+ { 281, -993, 1726, 924}, { 464, 601, 1575, 1376},
+ { -250, 206, 2339, 1175}, { -438, 377, -597, -285},
+ {-1020, 787, -790, -287}, { -458, -410, 215, 295},
+ { -589, -860, -121, 797}, {-1175, 122, -437, 466},
+ {-1480, -121, 367, 924}, { 234, 323, 770, -555},
+ { 145, 30, 996, 26}, { 66, 849, 93, -145},
+ { -117, 1261, 474, -399}, {-1495, 1051, 218, -506},
+ {-1390, 694, 994, 88}, { 616, 7, 78, 304},
+ { 1060, 52, -62, 835}, { 833, 454, 649, 1359},
+ { -770, 464, 47, 93}, { -574, 1199, -39, 379},
+ { 114, -98, 488, 485}, { 727, 244, 606, 696},
+ { -76, 455, 671, 546}, { -565, -13, 145, 819},
+ { -376, 569, 448, 1128}, { 218, 122, 265, 1167},
+ { 230, 738, 932, 1003}, { 138, 477, 36, 450},
+ { 404, 787, -73, 1000}, { 497, 1259, 387, 1231},
+ { 17, 207, 195, -79}, { 562, 358, 53, -158},
+ { 493, 387, 478, 189}, { 678, 831, 640, 558},
+ { -197, 523, 613, 57}, { 429, 894, 769, 111},
+ { 67, 1174, 568, 511}, { 1242, 824, 251, 840},
+ { 1419, 1074, 864, 481}, { 924, 1474, 669, 724},
+ { 1539, 1879, 654, 1590}, { 445, 337, 1111, 541},
+ { 472, 1421, 1264, 1094}, { 794, 735, 1103, 668},
+ { 1055, 863, 1192, 1020}, { 778, 1105, 806, 1798},
+ { 1052, 1527, 1587, 2151}, { 881, 1552, 1265, 391},
+ { 726, 872, 1812, 601}, { 1469, 280, 1008, 616},
+ { 1403, 577, 1803, 1244}, { 1650, 1314, 1148, 1072},
+ { 1297, 1669, 1911, 1026}, { 2093, 1044, 2115, 1189},
+ { 1644, 1961, 2587, 1512}, { 25, -315, -9, -106},
+ { 290, -339, 428, -444}, { -68, -783, 735, 772},
+ { 245, -555, 468, 47}, { 334, -895, 814, 146},
+ { 235, 368, -964, -959}, { -203, 315, -1566, -1217},
+ { 801, 17, -276, -354}, { 894, -495, -789, -635},
+ { 716, 291, -1189, -357}, { 560, -260, -733, -2},
+ { 679, -508, -1429, 211}, { -51, -62, -428, 557},
+ { 322, -638, -211, 614}, { -878, -1057, -84, -71},
+ { -388, -1415, -167, -318}, { -754, -1574, 214, -539},
+ {-1419, -2004, -92, -787}, { -47, -856, -347, -255},
+ { 23, -1211, -173, 320}, { -658, -487, -893, 353},
+ { -783, -1587, -584, 507}, {-1420, -859, -378, 441},
+ {-2095, -1491, -137, 439}, { -321, -1450, -1288, -12},
+ { -359, -2113, -553, -8}, { -831, -1918, -1561, 32},
+ {-1014, -2487, -1359, -939}, { -475, -311, -169, -236},
+ { -907, -426, 276, -611}, { -96, -400, 50, -710},
+ { -426, -1022, -10, -985}, { -197, -258, -744, -575},
+ { -611, -930, -771, -394}, { -267, -776, -612, -939},
+ { -256, -1346, -802, -1122}, { -796, -1570, -825, -754},
+ { 712, 876, 141, 227}, { 981, 1509, 85, 124},
+ { 1462, 1228, 979, -39}, { 1734, 999, 1481, 440},
+ { 2293, 1116, 769, 440}, { 2504, 1480, 1241, 356},
+ { 2474, 1909, 1558, 810}, { 917, 1134, 607, -134},
+ { 509, 1809, 781, -123}, { 1712, 1506, 559, -423},
+ { 2037, 2317, 726, -155}, { 3031, 2676, 1203, 331},
+ { 3664, 3274, 1768, 531}, { 1610, 1839, 867, 183},
+ { 1774, 1972, 1538, 97}, { 1822, 2158, 1282, 659},
+ { 2222, 2758, 1818, 900}, { 3251, 2124, 1723, 996},
+ { 3633, 2336, 2408, 1453}, { 2923, 3517, 2567, 1318},
+};
/**
* Used for the coding/decoding of the pulses positions
* for the MP-MLQ codebook
*/
-extern const int32_t ff_g723_1_combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE];
+static const int32_t combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE] = {
+ {118755, 98280, 80730, 65780, 53130,
+ 42504, 33649, 26334, 20349, 15504,
+ 11628, 8568, 6188, 4368, 3003,
+ 2002, 1287, 792, 462, 252,
+ 126, 56, 21, 6, 1,
+ 0, 0, 0, 0, 0},
+
+ { 23751, 20475, 17550, 14950, 12650,
+ 10626, 8855, 7315, 5985, 4845,
+ 3876, 3060, 2380, 1820, 1365,
+ 1001, 715, 495, 330, 210,
+ 126, 70, 35, 15, 5,
+ 1, 0, 0, 0, 0},
+
+ { 3654, 3276, 2925, 2600, 2300,
+ 2024, 1771, 1540, 1330, 1140,
+ 969, 816, 680, 560, 455,
+ 364, 286, 220, 165, 120,
+ 84, 56, 35, 20, 10,
+ 4, 1, 0, 0, 0},
+
+ { 406, 378, 351, 325, 300,
+ 276, 253, 231, 210, 190,
+ 171, 153, 136, 120, 105,
+ 91, 78, 66, 55, 45,
+ 36, 28, 21, 15, 10,
+ 6, 3, 1, 0, 0},
+
+ { 29, 28, 27, 26, 25,
+ 24, 23, 22, 21, 20,
+ 19, 18, 17, 16, 15,
+ 14, 13, 12, 11, 10,
+ 9, 8, 7, 6, 5,
+ 4, 3, 2, 1, 0},
+
+ { 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1},
+};
+
+static const int16_t pitch_contrib[340] = {
+ 60, 0, 0, 2489, 60, 0, 0, 5217,
+ 1, 6171, 0, 3953, 0, 10364, 1, 9357,
+ -1, 8843, 1, 9396, 0, 5794, -1, 10816,
+ 2, 11606, -2, 12072, 0, 8616, 1, 12170,
+ 0, 14440, 0, 7787, -1, 13721, 0, 18205,
+ 0, 14471, 0, 15807, 1, 15275, 0, 13480,
+ -1, 18375, -1, 0, 1, 11194, -1, 13010,
+ 1, 18836, -2, 20354, 1, 16233, -1, 0,
+ 60, 0, 0, 12130, 0, 13385, 1, 17834,
+ 1, 20875, 0, 21996, 1, 0, 1, 18277,
+ -1, 21321, 1, 13738, -1, 19094, -1, 20387,
+ -1, 0, 0, 21008, 60, 0, -2, 22807,
+ 0, 15900, 1, 0, 0, 17989, -1, 22259,
+ 1, 24395, 1, 23138, 0, 23948, 1, 22997,
+ 2, 22604, -1, 25942, 0, 26246, 1, 25321,
+ 0, 26423, 0, 24061, 0, 27247, 60, 0,
+ -1, 25572, 1, 23918, 1, 25930, 2, 26408,
+ -1, 19049, 1, 27357, -1, 24538, 60, 0,
+ -1, 25093, 0, 28549, 1, 0, 0, 22793,
+ -1, 25659, 0, 29377, 0, 30276, 0, 26198,
+ 1, 22521, -1, 28919, 0, 27384, 1, 30162,
+ -1, 0, 0, 24237, -1, 30062, 0, 21763,
+ 1, 30917, 60, 0, 0, 31284, 0, 29433,
+ 1, 26821, 1, 28655, 0, 31327, 2, 30799,
+ 1, 31389, 0, 32322, 1, 31760, -2, 31830,
+ 0, 26936, -1, 31180, 1, 30875, 0, 27873,
+ -1, 30429, 1, 31050, 0, 0, 0, 31912,
+ 1, 31611, 0, 31565, 0, 25557, 0, 31357,
+ 60, 0, 1, 29536, 1, 28985, -1, 26984,
+ -1, 31587, 2, 30836, -2, 31133, 0, 30243,
+ -1, 30742, -1, 32090, 60, 0, 2, 30902,
+ 60, 0, 0, 30027, 0, 29042, 60, 0,
+ 0, 31756, 0, 24553, 0, 25636, -2, 30501,
+ 60, 0, -1, 29617, 0, 30649, 60, 0,
+ 0, 29274, 2, 30415, 0, 27480, 0, 31213,
+ -1, 28147, 0, 30600, 1, 31652, 2, 29068,
+ 60, 0, 1, 28571, 1, 28730, 1, 31422,
+ 0, 28257, 0, 24797, 60, 0, 0, 0,
+ 60, 0, 0, 22105, 0, 27852, 60, 0,
+ 60, 0, -1, 24214, 0, 24642, 0, 23305,
+ 60, 0, 60, 0, 1, 22883, 0, 21601,
+ 60, 0, 2, 25650, 60, 0, -2, 31253,
+ -2, 25144, 0, 17998
+};
/**
* Number of non-zero pulses in the MP-MLQ excitation
*/
static const int8_t pulses[4] = {6, 5, 6, 5};
-extern const int16_t ff_g723_1_fixed_cb_gain[GAIN_LEVELS];
+/**
+ * Size of the MP-MLQ fixed excitation codebooks
+ */
+static const int32_t max_pos[4] = {593775, 142506, 593775, 142506};
-extern const int16_t ff_g723_1_adaptive_cb_gain85 [ 85 * 20];
-extern const int16_t ff_g723_1_adaptive_cb_gain170[170 * 20];
+static const int16_t fixed_cb_gain[GAIN_LEVELS] = {
+ 1, 2, 3, 4, 6, 9, 13, 18,
+ 26, 38, 55, 80, 115, 166, 240, 348,
+ 502, 726, 1050, 1517, 2193, 3170, 4582, 6623,
+};
+
+static const int16_t adaptive_cb_gain85[85 * 20] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 800, 1496, 167, -256,
+ -338, -39, -136, -1, -4, -6, -73, -8,
+ -15, 12, 23, 2, 16, 30, 3, -5,
+ -462, -686, 493, 2575, 311, -13, -28, -14,
+ -404, -5, -19, 13, 20, 72, 107, -77,
+ 8, 13, -9, -48, 1483, 144, 784, 928,
+ 1243, -134, -1, -37, -52, -94, -13, -71,
+ -6, -84, -8, -44, -112, -10, -59, -70,
+ -77, 275, 3522, 1056, -1254, 0, -4, -757,
+ -68, -95, 1, 16, -59, 4, -17, -227,
+ -5, 21, 269, 80, -125, -40, -264, 381,
+ 5027, 0, 0, -4, -8, -1542, 0, -2,
+ 0, 2, 0, 6, 38, 12, 81, -117,
+ 138, 332, 2215, 2574, 1339, -1, -6, -299,
+ -404, -109, -2, -18, -44, -21, -52, -348,
+ -11, -27, -181, -210, 3685, 2883, -887, 866,
+ -1639, -828, -507, -48, -45, -164, -648, 199,
+ 156, -194, -152, 46, 368, 288, -88, 86,
+ 1396, 2146, 2235, 345, 942, -118, -281, -305,
+ -7, -54, -182, -190, -292, -29, -45, -47,
+ -80, -123, -128, -19, 13, 4475, 3549, -804,
+ -655, 0, -1222, -768, -39, -26, -3, -2,
+ -969, 0, 219, 174, 0, 179, 141, -32,
+ -724, 254, 242, 6049, 2462, -32, -3, -3,
+ -2233, -370, 11, 10, -3, 267, -94, -89,
+ 108, -38, -36, -909, 626, -1713, 6121, 4561,
+ -1061, -23, -179, -2287, -1270, -68, 65, -233,
+ 640, -174, 477, -1704, 40, -111, 396, 295,
+ -350, 1391, 7985, 511, -405, -7, -118, -3892,
+ -15, -10, 29, 170, -678, 10, -43, -249,
+ -8, 34, 197, 12, 3144, -529, 608, 2530,
+ 3878, -603, -17, -22, -390, -918, 101, -116,
+ 19, -485, 81, -93, -744, 125, -144, -599,
+ 2589, -689, 3045, 5603, -404, -409, -29, -566,
+ -1916, -10, 108, -481, 128, -885, 235, -1041,
+ 63, -17, 75, 138, 3107, 513, 1374, -3594,
+ -4922, -589, -16, -115, -788, -1478, -97, -260,
+ -43, 681, 112, 301, 933, 154, 413, -1079,
+ 2468, 6010, 1107, -390, 1961, -372, -2204, -74,
+ -9, -234, -905, -166, -406, 58, 143, 26,
+ -295, -719, -132, 46, 4773, 2766, 2368, 4862,
+ -4044, -1390, -467, -342, -1443, -998, -806, -690,
+ -399, -1416, -821, -702, 1178, 682, 584, 1200,
+ 1665, -1879, 1443, 1701, 8562, -169, -215, -127,
+ -176, -4475, 190, -146, 165, -172, 195, -149,
+ -870, 982, -754, -889, 2716, 9011, -1007, 755,
+ -1785, -450, -4956, -61, -34, -194, -1493, 167,
+ 554, -125, -415, 46, 296, 982, -109, 82,
+ -2727, 7548, 1285, 938, 3420, -453, -3478, -100,
+ -53, -714, 1256, 213, -592, 156, -432, -73,
+ 569, -1576, -268, -196, 3677, 882, 4050, 1202,
+ 2323, -825, -47, -1001, -88, -329, -198, -909,
+ -218, -269, -64, -297, -521, -125, -574, -170,
+ 2046, -753, 122, 10102, 603, -255, -34, 0,
+ -6229, -22, 94, -15, 5, -1261, 464, -75,
+ -75, 27, -4, -372, 449, -1815, 10690, 3870,
+ -527, -12, -201, -6976, -914, -16, 49, -293,
+ 1184, -106, 428, -2525, 14, -58, 344, 124,
+ -941, 2352, 5049, 3650, 2637, -54, -337, -1556,
+ -813, -424, 135, 290, -725, 209, -524, -1125,
+ 151, -378, -812, -587, -1879, 796, 3117, 9569,
+ -404, -215, -38, -593, -5589, -9, 91, 357,
+ -151, 1097, -464, -1821, -46, 19, 76, 236,
+ -1715, 2043, -2096, 9946, 4001, -179, -254, -268,
+ -6038, -977, 213, -219, 261, 1041, -1240, 1272,
+ 418, -498, 511, -2429, -5772, -618, -3921, 284,
+ -3155, -2033, -23, -938, -4, -607, -218, -1381,
+ -148, 100, 10, 68, -1111, -119, -755, 54,
+ 382, 4748, 8003, -2064, 2198, -8, -1376, -3909,
+ -260, -294, -110, -186, -2319, 48, 598, 1008,
+ -51, -637, -1073, 277, -867, 3015, 11926, -1675,
+ 947, -45, -555, -8681, -171, -54, 159, 631,
+ -2195, -88, 308, 1219, 50, -174, -690, 96,
+ -4933, -432, 6757, 3771, 1352, -1485, -11, -2786,
+ -867, -111, -130, 2034, 178, 1135, 99, -1555,
+ 407, 35, -557, -311, 152, 9726, 4231, -1928,
+ 1490, -1, -5774, -1092, -226, -135, -90, -39,
+ -2511, 17, 1144, 498, -13, -884, -384, 175,
+ 2512, 193, 9033, 5361, -3148, -385, -2, -4980,
+ -1754, -605, -29, -1385, -106, -822, -63, -2956,
+ 482, 37, 1735, 1030, 8464, 2844, 12, 549,
+ 2132, -4373, -493, 0, -18, -277, -1469, -6,
+ -2, -284, -95, 0, -1101, -370, -1, -71,
+ 2141, -2602, 7166, 9046, -1350, -279, -413, -3134,
+ -4994, -111, 340, -936, 1138, -1182, 1436, -3957,
+ 176, -214, 590, 745, -244, 278, 13307, 1227,
+ -161, -3, -4, -10808, -91, -1, 4, 198,
+ -226, 18, -20, -997, -2, 2, 131, 12,
+ -1947, 8217, 6269, 917, -2559, -231, -4121, -2399,
+ -51, -399, 976, 745, -3144, 108, -460, -350,
+ -304, 1283, 979, 143, -1810, 2061, -2781, 6056,
+ 10058, -200, -259, -472, -2238, -6174, 227, -307,
+ 349, 669, -761, 1028, 1111, -1265, 1707, -3717,
+ 7827, 9161, -3409, 2473, -1510, -3739, -5122, -709,
+ -373, -139, -4376, 1628, 1906, -1181, -1382, 514,
+ 721, 844, -314, 228, -1430, 8313, 9541, -2955,
+ 1626, -124, -4218, -5556, -533, -161, 725, 832,
+ -4841, -257, 1499, 1721, 142, -825, -947, 293,
+ 2819, -4247, 5391, 8673, 2756, -485, -1101, -1774,
+ -4591, -463, 730, -927, 1397, -1492, 2248, -2854,
+ -474, 714, -907, -1459, 141, 14552, 690, 257,
+ -112, -1, -12926, -29, -4, 0, -125, -5,
+ -613, -2, -228, -10, 0, 99, 4, 1,
+ 11938, -1859, 1806, -962, -884, -8699, -211, -199,
+ -56, -47, 1355, -1316, 205, 701, -109, 106,
+ 644, -100, 97, -51, 3728, 1982, 2264, 4584,
+ 3131, -848, -239, -312, -1282, -598, -451, -515,
+ -273, -1043, -554, -633, -712, -378, -432, -876,
+ -1181, 766, 720, 14303, -216, -85, -35, -31,
+ -12486, -2, 55, 51, -33, 1031, -668, -628,
+ -15, 10, 9, 189, -4385, 4826, 10112, 1569,
+ 3388, -1173, -1421, -6242, -150, -700, 1291, 2706,
+ -2979, 420, -462, -969, 906, -998, -2091, -324,
+ -448, 1932, 15591, -1842, 657, -12, -227, -14837,
+ -207, -26, 52, 427, -1838, -50, 217, 1753,
+ 18, -77, -626, 74, -4141, 1844, 3962, 5517,
+ 6220, -1046, -207, -958, -1858, -2361, 466, 1001,
+ -446, 1394, -621, -1334, 1572, -700, -1504, -2094,
+ 729, -2299, 14755, 3657, -952, -32, -322, -13288,
+ -816, -55, 102, -656, 2071, -162, 513, -3294,
+ 42, -133, 857, 212, -1385, 5801, 13339, -3137,
+ 1344, -117, -2054, -10861, -600, -110, 490, 1127,
+ -4723, -265, 1111, 2554, 113, -476, -1094, 257,
+ 4710, 9661, 1073, -2467, 3274, -1354, -5697, -70,
+ -371, -654, -2777, -308, -633, 709, 1455, 161,
+ -941, -1930, -214, 493, 1843, -3624, 12422, 6898,
+ -1559, -207, -802, -9419, -2904, -148, 407, -1397,
+ 2748, -775, 1526, -5230, 175, -344, 1182, 656,
+ 1433, 2394, 2507, 1380, 8780, -125, -349, -383,
+ -116, -4705, -209, -219, -366, -120, -201, -211,
+ -768, -1283, -1343, -740, -1712, 12915, 5883, -2197,
+ 991, -179, -10181, -2112, -294, -60, 1350, 615,
+ -4638, -229, 1732, 789, 103, -781, -356, 133,
+ 15072, 2158, -1245, 910, -496, -13865, -284, -94,
+ -50, -15, -1986, 1145, 164, -837, -119, 69,
+ 456, 65, -37, 27, 4655, 7319, 4916, 586,
+ -3381, -1322, -3270, -1475, -20, -697, -2079, -1396,
+ -2196, -166, -261, -175, 960, 1510, 1014, 120,
+ 1191, -2140, 5120, 13498, -1418, -86, -279, -1600,
+ -11121, -122, 155, -372, 669, -981, 1763, -4218,
+ 103, -185, 443, 1168, -1530, -817, 8191, 9632,
+ -1452, -143, -40, -4095, -5663, -128, -76, 765,
+ 408, 900, 480, -4815, -135, -72, 726, 854,
+ -3236, 607, 1696, -2106, 11485, -639, -22, -175,
+ -270, -8051, 119, 335, -62, -416, 78, 218,
+ 2268, -425, -1189, 1476, 3203, -1903, -837, 9679,
+ 7057, -626, -221, -42, -5718, -3039, 372, 163,
+ -97, -1892, 1124, 494, -1380, 819, 360, -4169,
+ 213, -655, 17015, 620, -384, -2, -26, -17671,
+ -23, -9, 8, -221, 681, -8, 24, -644,
+ 5, -15, 399, 14, 5088, 35, -3339, 3726,
+ 8488, -1580, 0, -680, -847, -4397, -10, 1037,
+ 7, -1157, -8, 759, -2636, -18, 1730, -1930,
+ -988, 1454, -2688, 15039, 2682, -59, -129, -441,
+ -13805, -439, 87, -162, 238, 907, -1335, 2467,
+ 161, -238, 440, -2462, -4865, -2842, -53, 5495,
+ 6523, -1445, -493, 0, -1843, -2597, -844, -16,
+ -9, 1632, 953, 18, 1937, 1131, 21, -2188,
+ 3076, 15069, -2914, 1810, -971, -577, -13860, -518,
+ -200, -57, -2829, 547, 2680, -339, -1665, 322,
+ 182, 893, -172, 107, 1311, 5355, 11054, 2299,
+ -3654, -105, -1750, -7458, -322, -814, -428, -885,
+ -3613, -184, -751, -1551, 292, 1194, 2465, 512,
+ 4035, 5619, 4618, 1815, 1912, -994, -1927, -1301,
+ -201, -223, -1384, -1137, -1583, -447, -622, -511,
+ -471, -656, -539, -211, -2131, 2754, -4501, 12879,
+ 7432, -277, -463, -1236, -10124, -3371, 358, -585,
+ 756, 1675, -2165, 3538, 967, -1249, 2042, -5842,
+ 5618, -515, 3219, -4149, 4857, -1926, -16, -632,
+ -1050, -1440, 176, -1104, 101, 1422, -130, 815,
+ -1666, 152, -954, 1230, 1838, -1709, 1139, 16867,
+ 716, -206, -178, -79, -17366, -31, 191, -127,
+ 118, -1892, 1759, -1173, -80, 74, -49, -737,
+ 1978, -3845, 10050, 11854, -2492, -238, -902, -6164,
+ -8576, -379, 464, -1213, 2358, -1431, 2782, -7271,
+ 301, -585, 1529, 1803, -2600, 11246, 11289, -3647,
+ 1463, -412, -7720, -7778, -812, -130, 1784, 1791,
+ -7749, -578, 2504, 2513, 232, -1004, -1008, 325,
+ 3442, 907, 2725, 8970, 3638, -723, -50, -453,
+ -4911, -808, -190, -572, -150, -1884, -496, -1492,
+ -764, -201, -605, -1992, -126, 17498, 3481, -2003,
+ 1090, 0, -18689, -739, -244, -72, 135, 26,
+ -3717, -15, 2139, 425, 8, -1165, -231, 133,
+ -1814, 1048, -2164, 4070, 16272, -200, -67, -285,
+ -1011, -16160, 116, -239, 138, 450, -260, 537,
+ 1801, -1041, 2149, -4042, 9354, 12580, -1883, 962,
+ -617, -5341, -9660, -216, -56, -23, -7183, 1075,
+ 1446, -549, -738, 110, 352, 474, -71, 36,
+ 1708, 4199, 7387, 6335, 1003, -178, -1076, -3330,
+ -2449, -61, -437, -770, -1893, -660, -1623, -2856,
+ -104, -257, -452, -388, -2624, 5623, 17310, -2353,
+ 592, -420, -1930, -18288, -338, -21, 900, 2772,
+ -5941, -376, 807, 2486, 94, -203, -625, 85,
+ 1211, -850, 1193, -1926, 15992, -89, -44, -86,
+ -226, -15609, 62, -88, 61, 142, -100, 140,
+ -1182, 830, -1165, 1880, 3983, -2054, 11506, -19,
+ 3622, -968, -257, -8080, 0, -801, 499, -2797,
+ 1442, 4, -2, 13, -880, 454, -2544, 4,
+ -786, -1354, 16092, 7246, -1665, -37, -111, -15805,
+ -3205, -169, -65, 772, 1330, 348, 599, -7117,
+ -80, -137, 1636, 736, -4316, -511, 6674, 11665,
+ 4633, -1137, -15, -2719, -8305, -1310, -134, 1758,
+ 208, 3073, 364, -4752, 1220, 144, -1887, -3299,
+ 7912, 4557, 1937, 1885, 7037, -3821, -1267, -229,
+ -216, -3022, -2200, -935, -538, -910, -524, -222,
+ -3398, -1957, -832, -809, 3434, 2967, 5867, 8196,
+ 8766, -720, -537, -2101, -4100, -4690, -622, -1230,
+ -1062, -1718, -1484, -2935, -1837, -1588, -3139, -4385,
+ 5881, 9176, 8119, 3934, 3355, -2111, -5139, -4023,
+ -944, -687, -3294, -2914, -4547, -1412, -2203, -1949,
+ -1204, -1879, -1662, -805
+};
+
+static const int16_t adaptive_cb_gain170[170 * 20] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 776, 212, 715, 670,
+ 809, -36, -2, -31, -27, -39, -10, -33,
+ -9, -31, -8, -29, -38, -10, -35, -33,
+ 1296, 1316, -168, -320, -815, -102, -105, -1,
+ -6, -40, -104, 13, 13, 25, 25, -3,
+ 64, 65, -8, -15, -589, 680, 2478, 308,
+ -596, -21, -28, -375, -5, -21, 24, 89,
+ -102, 11, -12, -46, -21, 24, 90, 11,
+ -735, -487, -5, 2948, 468, -33, -14, 0,
+ -530, -13, -21, 0, 0, 132, 87, 0,
+ 21, 13, 0, -84, 1042, 1730, 1068, 333,
+ 626, -66, -182, -69, -6, -23, -110, -67,
+ -112, -21, -35, -21, -39, -66, -40, -12,
+ 486, -769, 4074, 2825, -1107, -14, -36, -1013,
+ -487, -74, 22, -120, 191, -83, 132, -702,
+ 32, -52, 275, 191, 1521, -767, -124, 4320,
+ 1026, -141, -35, 0, -1139, -64, 71, 11,
+ -5, -401, 202, 32, -95, 48, 7, -270,
+ 2425, 1267, 3439, -91, -1166, -359, -98, -722,
+ 0, -83, -187, -509, -266, 13, 7, 19,
+ 172, 90, 244, -6, -1251, 975, 173, 4039,
+ 2005, -95, -58, -1, -996, -245, 74, 13,
+ -10, 308, -240, -42, 153, -119, -21, -494,
+ 1820, 632, 1322, 2062, 1031, -202, -24, -106,
+ -259, -64, -70, -146, -51, -229, -79, -166,
+ -114, -39, -83, -129, -447, 4904, 244, -315,
+ -2038, -12, -1467, -3, -6, -253, 134, 6,
+ -73, -8, 94, 4, -55, 610, 30, -39,
+ -208, -1102, 463, -448, 5653, -2, -74, -13,
+ -12, -1950, -14, 5, 31, -5, -30, 12,
+ 71, 380, -159, 154, 4739, 2600, -1864, 856,
+ -1554, -1371, -412, -212, -44, -147, -752, 539,
+ 295, -247, -135, 97, 449, 246, -176, 81,
+ 1894, 3533, 35, -26, 2145, -219, -762, 0,
+ 0, -280, -408, -4, -7, 3, 5, 0,
+ -248, -462, -4, 3, -2699, 1841, 4072, 2443,
+ 1582, -444, -207, -1012, -364, -152, 303, 670,
+ -457, 402, -274, -607, 260, -177, -393, -236,
+ -844, 3358, 6106, -1059, -537, -43, -688, -2275,
+ -68, -17, 173, 314, -1251, -54, 217, 395,
+ -27, 110, 200, -34, 1251, 1016, 3020, 2210,
+ 1445, -95, -63, -556, -298, -127, -77, -230,
+ -187, -168, -137, -407, -110, -89, -266, -194,
+ 2099, 2277, 4038, 3533, -2870, -269, -316, -995,
+ -762, -503, -291, -517, -561, -452, -491, -871,
+ 367, 399, 707, 619, 400, -1114, 8516, 2422,
+ -1117, -9, -75, -4426, -358, -76, 27, -208,
+ 579, -59, 164, -1259, 27, -75, 580, 165,
+ -4398, -2011, 3912, -2407, 2258, -1180, -247, -934,
+ -353, -311, -540, 1050, 480, -646, -295, 575,
+ 606, 277, -539, 331, 1767, -1447, 4240, 6160,
+ -757, -190, -127, -1097, -2316, -35, 156, -457,
+ 374, -664, 544, -1594, 81, -66, 195, 284,
+ 1594, -1463, 1035, 6938, 1920, -155, -130, -65,
+ -2938, -225, 142, -100, 92, -675, 619, -438,
+ -186, 171, -121, -813, -562, 4716, 4085, -591,
+ 2421, -19, -1357, -1018, -21, -357, 162, 140,
+ -1175, -20, 170, 147, 83, -696, -603, 87,
+ 1552, 8778, -935, 354, -1424, -147, -4703, -53,
+ -7, -123, -831, 88, 501, -33, -189, 20,
+ 134, 763, -81, 30, 4831, -4431, 41, -1479,
+ -2976, -1424, -1198, 0, -133, -540, 1306, -12,
+ 11, 436, -400, 3, 877, -804, 7, -268,
+ 2090, 1192, 1006, 1645, 4853, -266, -86, -61,
+ -165, -1437, -152, -128, -73, -210, -119, -101,
+ -619, -353, -298, -487, 2386, 5712, 1426, -94,
+ 1350, -347, -1991, -124, 0, -111, -832, -207,
+ -497, 13, 32, 8, -196, -470, -117, 7,
+ -1349, 1091, 1659, 8891, 313, -111, -72, -168,
+ -4825, -5, 89, 136, -110, 732, -592, -900,
+ 25, -20, -31, -170, 9980, 916, -381, -808,
+ 88, -6080, -51, -8, -39, 0, -558, 232,
+ 21, 492, 45, -18, -53, -4, 2, 4,
+ 2338, -1031, -248, 3928, 6484, -333, -64, -3,
+ -942, -2566, 147, 35, -15, -560, 247, 59,
+ -925, 408, 98, -1555, 6166, -1240, -337, 3672,
+ -1277, -2320, -93, -6, -823, -99, 466, 126,
+ -25, -1382, 278, 75, 480, -96, -26, 286,
+ 4377, -132, -2588, 1701, 4865, -1169, -1, -409,
+ -176, -1444, 35, 691, -20, -454, 13, 268,
+ -1299, 39, 768, -505, 2594, 3295, 3944, 1481,
+ 682, -410, -662, -949, -133, -28, -521, -624,
+ -793, -234, -297, -356, -108, -137, -164, -61,
+ 4151, 624, 815, 4485, 2229, -1052, -23, -40,
+ -1228, -303, -158, -206, -31, -1136, -170, -223,
+ -565, -84, -111, -610, -3575, -361, 4924, 2791,
+ 4698, -780, -7, -1480, -475, -1347, -78, 1074,
+ 108, 609, 61, -839, 1025, 103, -1412, -800,
+ -2518, 3791, 8623, 315, 2465, -387, -877, -4538,
+ -6, -370, 582, 1325, -1995, 48, -73, -166,
+ 378, -570, -1297, -47, -691, 2989, 9957, -421,
+ -1142, -29, -545, -6051, -10, -79, 126, 420,
+ -1817, -17, 76, 256, -48, 208, 694, -29,
+ -1918, 104, -3190, -3410, -4440, -224, 0, -621,
+ -709, -1203, 12, -373, 20, -399, 21, -664,
+ -519, 28, -864, -924, -3359, -1668, 1854, 6939,
+ 1430, -688, -169, -209, -2939, -124, -341, 380,
+ 188, 1422, 706, -785, 293, 145, -161, -606,
+ 42, 9706, 3164, -952, 907, 0, -5750, -611,
+ -55, -50, -25, -8, -1874, 2, 564, 183,
+ -2, -537, -175, 52, 1607, 785, 2862, 4327,
+ 3307, -157, -37, -500, -1143, -667, -77, -280,
+ -137, -424, -207, -756, -324, -158, -577, -873,
+ 6801, 3416, 2227, 1682, -3217, -2823, -712, -302,
+ -172, -631, -1418, -924, -464, -698, -350, -228,
+ 1335, 670, 437, 330, 3459, 3898, 364, 7841,
+ -2640, -730, -927, -8, -3753, -425, -823, -76,
+ -86, -1655, -1865, -174, 557, 628, 58, 1263,
+ -5902, -3458, -2465, -1886, 4334, -2126, -730, -371,
+ -217, -1146, -1245, -888, -520, -679, -398, -283,
+ 1561, 915, 652, 499, -3710, 1133, 7849, 3443,
+ -215, -840, -78, -3760, -723, -2, 256, 1777,
+ -543, 779, -238, -1649, -48, 14, 103, 45,
+ 4132, 2828, 2, -4212, -4116, -1042, -488, 0,
+ -1083, -1034, -713, 0, 0, 1062, 727, 0,
+ 1038, 710, 0, -1058, 5875, 8496, -1796, 1376,
+ -1786, -2107, -4406, -197, -115, -194, -3047, 644,
+ 931, -493, -713, 150, 640, 926, -195, 150,
+ 3143, 3483, 3546, -793, 4489, -603, -740, -767,
+ -38, -1230, -668, -680, -754, 152, 168, 171,
+ -861, -954, -971, 217, 2845, 7965, 3695, -5432,
+ 3978, -494, -3873, -833, -1801, -966, -1383, -641,
+ -1796, 943, 2641, 1225, -691, -1934, -897, 1319,
+ 1538, 150, 7139, 2049, 3097, -144, -1, -3110,
+ -256, -585, -14, -670, -65, -192, -18, -892,
+ -290, -28, -1349, -387, 618, 7520, 4729, -238,
+ -3373, -23, -3452, -1365, -3, -694, -283, -178,
+ -2170, 8, 109, 68, 127, 1548, 973, -49,
+ 2965, -3013, 7912, 7076, -1997, -536, -554, -3821,
+ -3056, -243, 545, -1431, 1455, -1280, 1301, -3417,
+ 361, -367, 964, 862, 2443, -929, -1113, 9677,
+ 4138, -364, -52, -75, -5716, -1045, 138, 166,
+ -63, -1443, 549, 657, -617, 234, 281, -2444,
+ 1966, 3309, 10085, -3399, 2105, -236, -668, -6207,
+ -705, -270, -397, -1210, -2037, 408, 686, 2092,
+ -252, -425, -1295, 436, -112, -1368, 8868, 4822,
+ 2048, 0, -114, -4800, -1419, -256, -9, 61,
+ 740, 33, 402, -2610, 14, 171, -1108, -602,
+ -2597, 438, -1839, 6229, 7266, -411, -11, -206,
+ -2368, -3223, 69, -291, 49, 987, -166, 699,
+ 1152, -194, 816, -2763, 3454, 553, 9127, 4946,
+ -5596, -728, -18, -5084, -1493, -1911, -116, -1924,
+ -308, -1042, -166, -2755, 1179, 188, 3117, 1689,
+ -532, -663, 12262, 2495, -1004, -17, -26, -9177,
+ -380, -61, -21, 398, 496, 81, 101, -1867,
+ -32, -40, 751, 152, -2100, 1317, -1509, 11425,
+ 2997, -269, -105, -139, -7967, -548, 168, -193,
+ 121, 1464, -918, 1052, 384, -240, 276, -2090,
+ 1193, -2697, 11259, 5373, -763, -86, -444, -7737,
+ -1762, -35, 196, -819, 1853, -391, 884, -3692,
+ 55, -125, 525, 250, 2405, -471, 11079, 203,
+ 782, -353, -13, -7491, -2, -37, 69, -1626,
+ 318, -29, 5, -137, -114, 22, -529, -9,
+ -1871, 5685, 11290, -2662, 1353, -213, -1972, -7780,
+ -432, -111, 649, 1289, -3917, -304, 923, 1834,
+ 154, -469, -932, 220, -3768, 5927, -3093, 5041,
+ 5212, -866, -2144, -584, -1551, -1658, 1363, -711,
+ 1119, 1159, -1824, 951, 1198, -1885, 984, -1603,
+ -2546, 9502, 5969, -2440, 1928, -395, -5511, -2175,
+ -363, -226, 1477, 927, -3462, -379, 1415, 889,
+ 299, -1118, -702, 287, -4963, 3568, 4592, 5508,
+ 3451, -1503, -777, -1287, -1851, -727, 1080, 1391,
+ -1000, 1668, -1199, -1543, 1045, -751, -967, -1160,
+ 1745, -2586, 3983, 10899, -1551, -186, -408, -968,
+ -7250, -146, 275, -424, 628, -1161, 1720, -2649,
+ 165, -244, 377, 1032, 867, -456, -727, 3369,
+ 11822, -45, -12, -32, -692, -8531, 24, 38,
+ -20, -178, 93, 149, -625, 329, 525, -2431,
+ 7535, 2422, 1926, 1405, 1599, -3466, -358, -226,
+ -120, -156, -1114, -886, -284, -646, -207, -165,
+ -735, -236, -188, -137, 1041, -735, -142, 13209,
+ 1515, -66, -33, -1, -10649, -140, 46, 9,
+ -6, -839, 593, 114, -96, 68, 13, -1222,
+ 7950, 6745, -1444, -1008, 2721, -3857, -2777, -127,
+ -62, -452, -3273, 700, 594, 489, 415, -88,
+ -1320, -1120, 239, 167, -4754, -1379, 4522, -578,
+ -5733, -1379, -116, -1248, -20, -2006, -400, 1312,
+ 380, -167, -48, 159, -1663, -482, 1582, -202,
+ 3220, 5978, 5923, 2430, -2689, -633, -2181, -2141,
+ -360, -441, -1175, -1164, -2161, -477, -886, -878,
+ 528, 981, 972, 398, 377, 1312, 13978, -1470,
+ 677, -8, -105, -11925, -132, -28, -30, -321,
+ -1119, 33, 117, 1254, -15, -54, -577, 60,
+ -3435, 6770, 314, -885, 5686, -720, -2797, -6,
+ -47, -1973, 1419, 65, -129, -185, 366, 16,
+ 1192, -2349, -109, 307, 3171, 8774, -2260, 2679,
+ 3069, -613, -4699, -312, -438, -575, -1698, 437,
+ 1210, -518, -1435, 369, -594, -1643, 423, -501,
+ 5557, 1509, 5407, -125, -7386, -1884, -139, -1784,
+ 0, -3330, -511, -1834, -498, 42, 11, 41,
+ 2505, 680, 2438, -56, -2838, 2595, 13228, 271,
+ 1793, -491, -411, -10680, -4, -196, 449, 2291,
+ -2095, 47, -42, -219, 310, -284, -1447, -29,
+ 664, -278, 14966, 951, -711, -26, -4, -13672,
+ -55, -30, 11, -606, 253, -38, 16, -869,
+ 28, -12, 650, 41, 808, 1770, 8658, 5863,
+ -1486, -39, -191, -4576, -2098, -134, -87, -427,
+ -935, -289, -633, -3098, 73, 160, 785, 531,
+ 3063, 1539, 2000, -542, 9576, -572, -144, -244,
+ -17, -5597, -287, -374, -188, 101, 51, 66,
+ -1790, -900, -1169, 317, 514, 14083, -323, 896,
+ -891, -16, -12106, -6, -49, -48, -442, 10,
+ 277, -28, -770, 17, 27, 766, -17, 48,
+ 892, 158, 5237, 11057, -1603, -48, -1, -1674,
+ -7462, -156, -8, -285, -50, -602, -106, -3534,
+ 87, 15, 512, 1082, -1612, 2564, -4296, 12526,
+ 5710, -158, -401, -1126, -9576, -1990, 252, -422,
+ 672, 1232, -1960, 3284, 561, -893, 1497, -4365,
+ 4889, -6878, 612, 6109, 4753, -1459, -2887, -22,
+ -2277, -1379, 2052, -182, 257, -1823, 2564, -228,
+ -1418, 1995, -177, -1772, 3053, -506, 2403, 9625,
+ 1322, -569, -15, -352, -5655, -106, 94, -448,
+ 74, -1794, 297, -1412, -246, 40, -194, -777,
+ -754, 12904, 4480, -2113, 1471, -34, -10163, -1225,
+ -272, -132, 594, 206, -3529, -97, 1664, 577,
+ 67, -1159, -402, 189, 4255, 1476, 5055, 2393,
+ 2912, -1105, -132, -1559, -349, -517, -383, -1313,
+ -455, -621, -215, -738, -756, -262, -898, -425,
+ -1371, 535, 1417, 14604, -997, -114, -17, -122,
+ -13017, -60, 44, 118, -46, 1222, -477, -1263,
+ -83, 32, 86, 888, 5368, -1744, 4083, -1236,
+ 3753, -1758, -185, -1017, -93, -860, 571, -1338,
+ 434, 405, -131, 308, -1229, 399, -935, 283,
+ 1588, -3097, 14415, 3699, -1171, -154, -585, -12683,
+ -835, -83, 300, -1397, 2725, -358, 699, -3255,
+ 113, -221, 1030, 264, 212, 7989, 9471, -3344,
+ 2009, -2, -3895, -5475, -682, -246, -103, -123,
+ -4618, 43, 1630, 1933, -26, -979, -1161, 410,
+ 856, 2294, -627, 6930, 6929, -44, -321, -24,
+ -2931, -2930, -119, 32, 87, -362, -970, 265,
+ -362, -970, 265, -2931, 2357, -4187, 7162, 7683,
+ 3371, -339, -1070, -3131, -3603, -693, 602, -1030,
+ 1830, -1105, 1963, -3359, -485, 861, -1474, -1581,
+ 350, 4585, 14053, -3819, 1218, -7, -1283, -12054,
+ -890, -90, -97, -300, -3933, 81, 1068, 3275,
+ -26, -341, -1045, 284, -3248, 3531, 475, 2137,
+ 11711, -644, -761, -13, -278, -8372, 700, 94,
+ -102, 423, -460, -62, 2322, -2524, -340, -1528,
+ -3017, 3852, 1725, 8440, 5257, -555, -905, -181,
+ -4348, -1686, 709, 317, -405, 1554, -1984, -889,
+ 968, -1236, -553, -2708, -909, 3196, 15512, -2528,
+ 1066, -50, -623, -14686, -390, -69, 177, 861,
+ -3026, -140, 493, 2393, 59, -208, -1009, 164,
+ 959, -3370, 9617, 9545, -1761, -56, -693, -5645,
+ -5561, -189, 197, -563, 1978, -558, 1963, -5603,
+ 103, -362, 1034, 1026, 7575, 11796, -4845, 3252,
+ -1703, -3502, -8493, -1433, -645, -177, -5454, 2240,
+ 3488, -1503, -2341, 961, 787, 1226, -503, 338,
+ 6409, 1722, 1764, -4191, 6015, -2507, -181, -189,
+ -1072, -2208, -673, -690, -185, 1639, 440, 451,
+ -2353, -632, -647, 1538, -2420, 12161, 5038, 1286,
+ -2098, -357, -9027, -1549, -100, -268, 1796, 744,
+ -3740, 190, -954, -395, -310, 1557, 645, 164,
+ -2232, -1341, 7246, 9470, -1977, -304, -109, -3204,
+ -5474, -238, -182, 987, 593, 1290, 775, -4188,
+ -269, -161, 874, 1143, 1030, 7034, 4231, 1551,
+ 3077, -64, -3019, -1093, -146, -577, -442, -266,
+ -1816, -97, -666, -400, -193, -1321, -794, -291,
+ 5121, 11835, -477, -1749, 2298, -1601, -8549, -13,
+ -186, -322, -3699, 149, 344, 546, 1264, -50,
+ -718, -1660, 66, 245, -3328, 3827, 5921, 9976,
+ -1045, -676, -894, -2140, -6075, -66, 777, 1203,
+ -1383, 2027, -2330, -3605, -212, 244, 377, 636,
+ 3813, 5718, -4666, -3412, 5674, -887, -1995, -1329,
+ -710, -1965, -1331, 1086, 1628, 794, 1191, -972,
+ -1320, -1980, 1616, 1181, 1348, -3672, 13154, 6938,
+ -1690, -110, -823, -10561, -2938, -174, 302, -1082,
+ 2948, -570, 1555, -5570, 139, -379, 1357, 716,
+ 2151, -3586, 6949, 12131, -1224, -282, -785, -2947,
+ -8982, -91, 470, -912, 1521, -1592, 2655, -5145,
+ 160, -268, 519, 906, -2889, 9647, 10276, -2728,
+ 995, -509, -5680, -6445, -454, -60, 1701, 1812,
+ -6051, -481, 1606, 1711, 175, -586, -624, 165,
+ 6177, 2184, 555, 1985, 6589, -2329, -291, -18,
+ -240, -2650, -823, -209, -74, -748, -264, -67,
+ -2484, -878, -223, -798, -492, 391, 17166, -681,
+ 240, -14, -9, -17987, -28, -3, 11, 515,
+ -410, -20, 16, 713, 7, -5, -252, 10,
+ 12628, 5448, -2630, 3011, -2695, -9733, -1811, -422,
+ -553, -443, -4199, 2027, 874, -2321, -1001, 483,
+ 2077, 896, -432, 495, -3628, -534, 3447, 7002,
+ 6751, -803, -17, -725, -2992, -2782, -118, 763,
+ 112, 1550, 228, -1473, 1495, 220, -1420, -2885,
+ -5239, 5901, 8107, 3650, 4846, -1675, -2125, -4012,
+ -813, -1433, 1887, 2592, -2920, 1167, -1315, -1806,
+ 1550, -1745, -2398, -1080, 6157, 6678, 4099, -1074,
+ 2348, -2314, -2722, -1025, -70, -336, -2509, -1540,
+ -1670, 403, 437, 268, -882, -957, -587, 153,
+ 1079, 16099, 242, -881, 1690, -71, -15820, -3,
+ -47, -174, -1060, -16, -238, 58, 865, 13,
+ -111, -1661, -25, 90, -278, 227, -1039, 1636,
+ 16945, -4, -3, -65, -163, -17526, 3, -17,
+ 14, 27, -22, 103, 287, -234, 1074, -1693,
+ 15778, -1454, 574, -603, -107, -15195, -129, -20,
+ -22, 0, 1400, -553, 51, 581, -53, 21,
+ 103, -9, 3, -3, 2406, -836, 13224, 7993,
+ -4266, -353, -42, -10673, -3899, -1111, 122, -1942,
+ 674, -1174, 407, -6451, 626, -217, 3443, 2081,
+ 3184, 14368, -3336, 2255, -1801, -619, -12600, -679,
+ -310, -198, -2793, 648, 2926, -438, -1977, 459,
+ 350, 1580, -366, 247, -1698, 17076, 2504, -539,
+ -646, -176, -17798, -382, -17, -25, 1770, 259,
+ -2610, -55, 561, 82, -67, 673, 98, -21,
+ 2375, -797, -2696, 14483, 5383, -344, -38, -443,
+ -12803, -1769, 115, 391, -131, -2100, 705, 2384,
+ -780, 262, 886, -4759, -2691, 2554, -4520, 9573,
+ 10655, -442, -398, -1247, -5594, -6930, 419, -742,
+ 704, 1572, -1492, 2641, 1750, -1661, 2939, -6226,
+ -4332, -4399, -1657, 4880, 7375, -1145, -1181, -167,
+ -1453, -3319, -1163, -438, -444, 1290, 1310, 493,
+ 1950, 1980, 745, -2196, -3498, 7405, 9955, 2693,
+ -2971, -746, -3347, -6049, -442, -538, 1581, 2125,
+ -4499, 575, -1217, -1636, -634, 1342, 1805, 488,
+ 6717, -3792, 7739, 2798, 3489, -2754, -877, -3655,
+ -477, -743, 1554, -3173, 1791, -1147, 647, -1321,
+ -1430, 807, -1648, -595, 5263, 9770, 3463, 1069,
+ -3971, -1690, -5826, -732, -69, -962, -3138, -1112,
+ -2065, -343, -637, -226, 1275, 2368, 839, 259,
+ 1243, -2634, 16772, 1871, 332, -94, -423, -17169,
+ -213, -6, 199, -1273, 2696, -142, 300, -1915,
+ -25, 53, -339, -37, 2691, 2836, 3105, 5711,
+ 4817, -442, -491, -588, -1991, -1416, -465, -510,
+ -537, -938, -988, -1082, -791, -834, -913, -1679,
+ 4366, 2944, 7210, 3627, 1161, -1163, -529, -3172,
+ -803, -82, -784, -1921, -1295, -966, -651, -1596,
+ -309, -208, -511, -257, 13888, 3951, -671, -2305,
+ 3354, -11773, -953, -27, -324, -686, -3349, 569,
+ 161, 1954, 556, -94, -2843, -809, 137, 472,
+ 7053, 5847, 2929, 8378, -4794, -3036, -2086, -523,
+ -4284, -1403, -2517, -1261, -1045, -3607, -2990, -1498,
+ 2064, 1711, 857, 2451, -2191, 12838, 9182, -3915,
+ 1617, -293, -10059, -5146, -935, -159, 1717, 1228,
+ -7195, -523, 3068, 2194, 216, -1267, -906, 386,
+ -4881, 13114, 5767, -435, 4155, -1454, -10498, -2030,
+ -11, -1054, 3907, 1718, -4616, -129, 348, 153,
+ 1238, -3326, -1462, 110, 7843, -1250, 210, 7106,
+ -5203, -3754, -95, -2, -3082, -1652, 598, -100,
+ 16, -3402, 542, -91, 2491, -397, 66, 2257,
+ -2463, 8168, 14551, -3908, 1828, -370, -4072, -12923,
+ -932, -204, 1228, 2188, -7254, -587, 1948, 3471,
+ 274, -911, -1623, 436, -1579, 347, -272, -2735,
+ 16031, -152, -7, -4, -456, -15686, 33, -26,
+ 5, -263, 58, -45, 1545, -340, 266, 2676,
+ -6327, 1328, 5093, -5079, 7617, -2443, -107, -1583,
+ -1574, -3541, 513, 1967, -413, -1961, 411, 1578,
+ 2941, -617, -2367, 2361, 3286, -4509, 11306, 11025,
+ -2623, -659, -1241, -7802, -7419, -420, 904, -2267,
+ 3112, -2211, 3034, -7608, 526, -722, 1810, 1765,
+ 5567, 17853, -3754, 1166, -519, -1892, -19455, -860,
+ -83, -16, -6067, 1275, 4090, -396, -1271, 267,
+ 176, 566, -119, 37, -2136, -424, 15292, 5108,
+ -1648, -278, -10, -14273, -1593, -165, -55, 1993,
+ 396, 666, 132, -4768, -214, -42, 1538, 514,
+ 2267, -3297, 2549, 16563, -791, -313, -663, -396,
+ -16745, -38, 456, -352, 513, -2291, 3333, -2576,
+ 109, -159, 123, 799, 3655, 1899, -3364, 6279,
+ 12510, -815, -220, -690, -2406, -9552, -423, 750,
+ 390, -1400, -728, 1289, -2791, -1450, 2568, -4794,
+ 8052, 2285, -6193, 5138, 6003, -3957, -318, -2341,
+ -1611, -2199, -1123, 3044, 864, -2525, -716, 1942,
+ -2950, -837, 2269, -1882, -386, -2291, 7679, 15387,
+ -2723, -9, -320, -3599, -14452, -452, -54, 181,
+ 1074, 362, 2152, -7212, -64, -380, 1276, 2557,
+ 2777, -1173, 3984, 13079, 2508, -470, -84, -969,
+ -10440, -384, 198, -675, 285, -2217, 936, -3180,
+ -425, 179, -610, -2002, -1879, 1771, -2684, 16705,
+ 1833, -215, -191, -439, -17032, -205, 203, -308,
+ 290, 1916, -1805, 2736, 210, -198, 300, -1869,
+ 1052, 4495, 15519, 1467, -4032, -67, -1233, -14700,
+ -131, -992, -288, -997, -4257, -94, -402, -1389,
+ 259, 1106, 3819, 361, 3010, 2544, 6969, 7559,
+ 1996, -553, -395, -2964, -3487, -243, -467, -1280,
+ -1082, -1388, -1174, -3215, -366, -310, -849, -921,
+ -5209, -1867, 8713, 10351, 1549, -1656, -212, -4634,
+ -6540, -146, -593, 2770, 993, 3291, 1180, -5505,
+ 492, 176, -824, -979, -4314, 8513, 913, 7547,
+ -2723, -1135, -4423, -50, -3476, -452, 2241, 240,
+ -474, 1987, -3921, -420, -717, 1415, 151, 1254,
+ 12929, -1219, 2448, 1757, 6303, -10204, -90, -365,
+ -188, -2425, 962, -1932, 182, -1386, 130, -262,
+ -4974, 469, -941, -676, 6465, 4132, 3167, 3160,
+ 5697, -2551, -1042, -612, -609, -1981, -1630, -1249,
+ -798, -1247, -797, -611, -2248, -1437, -1101, -1099,
+ -3636, 4859, 18914, -1335, 810, -807, -1441, -21836,
+ -108, -40, 1078, 4198, -5609, -296, 396, 1541,
+ 179, -240, -936, 66, 8844, 7864, 654, -4063,
+ -5680, -4774, -3774, -26, -1007, -1969, -4245, -353,
+ -314, 2193, 1950, 162, 3066, 2726, 226, -1408,
+ 1859, 2634, 9228, 996, 9464, -211, -423, -5197,
+ -60, -5467, -299, -1047, -1483, -113, -160, -561,
+ -1074, -1521, -5330, -575, 2949, 12260, 10290, -497,
+ -3943, -530, -9174, -6463, -15, -949, -2206, -1852,
+ -7700, 89, 372, 312, 709, 2950, 2476, -119,
+ -2903, 1552, 14867, 9970, -496, -514, -147, -13491,
+ -6068, -15, 275, 2634, -1408, 1766, -944, -9047,
+ -87, 47, 450, 302, 3243, 8234, 7586, 3373,
+ 2151, -642, -4138, -3512, -694, -282, -1630, -1501,
+ -3812, -667, -1695, -1561, -425, -1081, -996, -442,
+ -9631, 60, 3501, 5359, 10150, -5662, 0, -748,
+ -1752, -6288, 35, 2058, -12, 3150, -19, -1145,
+ 5967, -37, -2169, -3320, -6874, -2553, -5446, -2195,
+ -7841, -2884, -397, -1810, -294, -3753, -1071, -2285,
+ -848, -921, -342, -729, -3290, -1221, -2606, -1050,
+ -3413, -1141, 4630, 13612, 7897, -711, -79, -1308,
+ -11310, -3806, -237, 964, 322, 2836, 948, -3847,
+ 1645, 550, -2231, -6561, 4410, -5678, 8006, -3992,
+ 3811, -1187, -1968, -3912, -973, -886, 1528, -2155,
+ 2775, 1074, -1383, 1951, -1025, 1321, -1862, 928,
+ 5659, 11535, 2203, -452, 7169, -1954, -8121, -296,
+ -12, -3137, -3984, -761, -1551, 156, 318, 60,
+ -2476, -5048, -964, 197, 2914, -2914, 3485, -3965,
+ 13675, -518, -518, -741, -959, -11414, 518, -620,
+ 620, 705, -705, 843, -2433, 2432, -2909, 3310,
+ 7843, 1907, 1022, 8882, 7972, -3755, -222, -63,
+ -4815, -3879, -913, -489, -119, -4252, -1034, -554,
+ -3816, -928, -497, -4322, 13807, 9531, 1436, 1612,
+ 1779, -11636, -5544, -125, -158, -193, -8032, -1210,
+ -835, -1358, -938, -141, -1499, -1035, -156, -175,
+ 13620, -5337, 5450, -2263, 1723, -11322, -1738, -1813,
+ -312, -181, 4436, -4531, 1775, 1881, -737, 752,
+ -1432, 561, -573, 238, 5297, 8374, 8872, 7694,
+ 6538, -1712, -4280, -4804, -3613, -2609, -2707, -2868,
+ -4534, -2487, -3932, -4166, -2113, -3341, -3540, -3070
+};
+
+/**
+ * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15
+ */
+static const int16_t postfilter_tbl[2][LPC_ORDER] = {
+ /* Zero */
+ {21299, 13844, 8999, 5849, 3802, 2471, 1606, 1044, 679, 441},
+ /* Pole */
+ {24576, 18432, 13824, 10368, 7776, 5832, 4374, 3281, 2460, 1845}
+};
+
+/**
+ * Hamming window coefficients scaled by 2^15
+ */
+static const int16_t hamming_window[LPC_FRAME] = {
+ 2621, 2631, 2659, 2705, 2770, 2853, 2955, 3074, 3212, 3367,
+ 3541, 3731, 3939, 4164, 4405, 4663, 4937, 5226, 5531, 5851,
+ 6186, 6534, 6897, 7273, 7661, 8062, 8475, 8899, 9334, 9780,
+ 10235, 10699, 11172, 11653, 12141, 12636, 13138, 13645, 14157, 14673,
+ 15193, 15716, 16242, 16769, 17298, 17827, 18356, 18884, 19411, 19935,
+ 20457, 20975, 21489, 21999, 22503, 23002, 23494, 23978, 24455, 24924,
+ 25384, 25834, 26274, 26704, 27122, 27529, 27924, 28306, 28675, 29031,
+ 29373, 29700, 30012, 30310, 30592, 30857, 31107, 31340, 31557, 31756,
+ 31938, 32102, 32249, 32377, 32488, 32580, 32654, 32710, 32747, 32766,
+ 32766, 32747, 32710, 32654, 32580, 32488, 32377, 32249, 32102, 31938,
+ 31756, 31557, 31340, 31107, 30857, 30592, 30310, 30012, 29700, 29373,
+ 29031, 28675, 28306, 27924, 27529, 27122, 26704, 26274, 25834, 25384,
+ 24924, 24455, 23978, 23494, 23002, 22503, 21999, 21489, 20975, 20457,
+ 19935, 19411, 18884, 18356, 17827, 17298, 16769, 16242, 15716, 15193,
+ 14673, 14157, 13645, 13138, 12636, 12141, 11653, 11172, 10699, 10235,
+ 9780, 9334, 8899, 8475, 8062, 7661, 7273, 6897, 6534, 6186,
+ 5851, 5531, 5226, 4937, 4663, 4405, 4164, 3939, 3731, 3541,
+ 3367, 3212, 3074, 2955, 2853, 2770, 2705, 2659, 2631, 2621
+};
+
+/**
+ * Binomial window coefficients scaled by 2^15
+ */
+static const int16_t binomial_window[LPC_ORDER] = {
+ 32749, 32695, 32604, 32477, 32315, 32118, 31887, 31622, 31324, 30995
+};
+
+/**
+ * 0.994^i scaled by 2^15
+ */
+static const int16_t bandwidth_expand[LPC_ORDER] = {
+ 32571, 32376, 32182, 31989, 31797, 31606, 31416, 31228, 31040, 30854
+};
+
+/**
+ * 0.5^i scaled by 2^15
+ */
+static const int16_t percept_flt_tbl[2][LPC_ORDER] = {
+ /* Zero part */
+ {29491, 26542, 23888, 21499, 19349, 17414, 15673, 14106, 12695, 11425},
+ /* Pole part */
+ {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32}
+};
+
+static const int cng_adaptive_cb_lag[4] = { 1, 0, 1, 3 };
+
+static const int cng_filt[4] = { 273, 998, 499, 333 };
+
+static const int cng_bseg[3] = { 2048, 18432, 231233 };
#endif /* AVCODEC_G723_1_H */
diff --git a/libavcodec/g723_1dec.c b/libavcodec/g723_1dec.c
index fddd4b0..f601d31 100644
--- a/libavcodec/g723_1dec.c
+++ b/libavcodec/g723_1dec.c
@@ -40,78 +40,6 @@
#define CNG_RANDOM_SEED 12345
-/**
- * Postfilter gain weighting factors scaled by 2^15
- */
-static const int16_t ppf_gain_weight[2] = {0x1800, 0x2000};
-
-static const int16_t pitch_contrib[340] = {
- 60, 0, 0, 2489, 60, 0, 0, 5217,
- 1, 6171, 0, 3953, 0, 10364, 1, 9357,
- -1, 8843, 1, 9396, 0, 5794, -1, 10816,
- 2, 11606, -2, 12072, 0, 8616, 1, 12170,
- 0, 14440, 0, 7787, -1, 13721, 0, 18205,
- 0, 14471, 0, 15807, 1, 15275, 0, 13480,
- -1, 18375, -1, 0, 1, 11194, -1, 13010,
- 1, 18836, -2, 20354, 1, 16233, -1, 0,
- 60, 0, 0, 12130, 0, 13385, 1, 17834,
- 1, 20875, 0, 21996, 1, 0, 1, 18277,
- -1, 21321, 1, 13738, -1, 19094, -1, 20387,
- -1, 0, 0, 21008, 60, 0, -2, 22807,
- 0, 15900, 1, 0, 0, 17989, -1, 22259,
- 1, 24395, 1, 23138, 0, 23948, 1, 22997,
- 2, 22604, -1, 25942, 0, 26246, 1, 25321,
- 0, 26423, 0, 24061, 0, 27247, 60, 0,
- -1, 25572, 1, 23918, 1, 25930, 2, 26408,
- -1, 19049, 1, 27357, -1, 24538, 60, 0,
- -1, 25093, 0, 28549, 1, 0, 0, 22793,
- -1, 25659, 0, 29377, 0, 30276, 0, 26198,
- 1, 22521, -1, 28919, 0, 27384, 1, 30162,
- -1, 0, 0, 24237, -1, 30062, 0, 21763,
- 1, 30917, 60, 0, 0, 31284, 0, 29433,
- 1, 26821, 1, 28655, 0, 31327, 2, 30799,
- 1, 31389, 0, 32322, 1, 31760, -2, 31830,
- 0, 26936, -1, 31180, 1, 30875, 0, 27873,
- -1, 30429, 1, 31050, 0, 0, 0, 31912,
- 1, 31611, 0, 31565, 0, 25557, 0, 31357,
- 60, 0, 1, 29536, 1, 28985, -1, 26984,
- -1, 31587, 2, 30836, -2, 31133, 0, 30243,
- -1, 30742, -1, 32090, 60, 0, 2, 30902,
- 60, 0, 0, 30027, 0, 29042, 60, 0,
- 0, 31756, 0, 24553, 0, 25636, -2, 30501,
- 60, 0, -1, 29617, 0, 30649, 60, 0,
- 0, 29274, 2, 30415, 0, 27480, 0, 31213,
- -1, 28147, 0, 30600, 1, 31652, 2, 29068,
- 60, 0, 1, 28571, 1, 28730, 1, 31422,
- 0, 28257, 0, 24797, 60, 0, 0, 0,
- 60, 0, 0, 22105, 0, 27852, 60, 0,
- 60, 0, -1, 24214, 0, 24642, 0, 23305,
- 60, 0, 60, 0, 1, 22883, 0, 21601,
- 60, 0, 2, 25650, 60, 0, -2, 31253,
- -2, 25144, 0, 17998
-};
-
-/**
- * Size of the MP-MLQ fixed excitation codebooks
- */
-static const int32_t max_pos[4] = {593775, 142506, 593775, 142506};
-
-/**
- * 0.65^i (Zero part) and 0.75^i (Pole part) scaled by 2^15
- */
-static const int16_t postfilter_tbl[2][LPC_ORDER] = {
- /* Zero */
- {21299, 13844, 8999, 5849, 3802, 2471, 1606, 1044, 679, 441},
- /* Pole */
- {24576, 18432, 13824, 10368, 7776, 5832, 4374, 3281, 2460, 1845}
-};
-
-static const int cng_adaptive_cb_lag[4] = { 1, 0, 1, 3 };
-
-static const int cng_filt[4] = { 273, 998, 499, 333 };
-
-static const int cng_bseg[3] = { 2048, 18432, 231233 };
-
static av_cold int g723_1_decode_init(AVCodecContext *avctx)
{
G723_1_Context *s = avctx->priv_data;
@@ -293,16 +221,16 @@
j = PULSE_MAX - pulses[index];
temp = subfrm->pulse_pos;
for (i = 0; i < SUBFRAME_LEN / GRID_SIZE; i++) {
- temp -= ff_g723_1_combinatorial_table[j][i];
+ temp -= combinatorial_table[j][i];
if (temp >= 0)
continue;
- temp += ff_g723_1_combinatorial_table[j++][i];
+ temp += combinatorial_table[j++][i];
if (subfrm->pulse_sign & (1 << (PULSE_MAX - j))) {
vector[subfrm->grid_index + GRID_SIZE * i] =
- -ff_g723_1_fixed_cb_gain[subfrm->amp_index];
+ -fixed_cb_gain[subfrm->amp_index];
} else {
vector[subfrm->grid_index + GRID_SIZE * i] =
- ff_g723_1_fixed_cb_gain[subfrm->amp_index];
+ fixed_cb_gain[subfrm->amp_index];
}
if (j == PULSE_MAX)
break;
@@ -310,7 +238,7 @@
if (subfrm->dirac_train == 1)
ff_g723_1_gen_dirac_train(vector, pitch_lag);
} else { /* 5300 bps */
- int cb_gain = ff_g723_1_fixed_cb_gain[subfrm->amp_index];
+ int cb_gain = fixed_cb_gain[subfrm->amp_index];
int cb_shift = subfrm->grid_index;
int cb_sign = subfrm->pulse_sign;
int cb_pos = subfrm->pulse_pos;
@@ -987,7 +915,7 @@
int16_t *vector_ptr = p->excitation + PITCH_MAX;
/* Update interpolation gain memory */
- p->interp_gain = ff_g723_1_fixed_cb_gain[(p->subframe[2].amp_index +
+ p->interp_gain = fixed_cb_gain[(p->subframe[2].amp_index +
p->subframe[3].amp_index) >> 1];
for (i = 0; i < SUBFRAMES; i++) {
gen_fcb_excitation(vector_ptr, &p->subframe[i], p->cur_rate,
diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c
index 11b0c7f..b2ba3c2 100644
--- a/libavcodec/g723_1enc.c
+++ b/libavcodec/g723_1enc.c
@@ -40,54 +40,6 @@
#define BITSTREAM_WRITER_LE
#include "put_bits.h"
-/**
- * Hamming window coefficients scaled by 2^15
- */
-static const int16_t hamming_window[LPC_FRAME] = {
- 2621, 2631, 2659, 2705, 2770, 2853, 2955, 3074, 3212, 3367,
- 3541, 3731, 3939, 4164, 4405, 4663, 4937, 5226, 5531, 5851,
- 6186, 6534, 6897, 7273, 7661, 8062, 8475, 8899, 9334, 9780,
- 10235, 10699, 11172, 11653, 12141, 12636, 13138, 13645, 14157, 14673,
- 15193, 15716, 16242, 16769, 17298, 17827, 18356, 18884, 19411, 19935,
- 20457, 20975, 21489, 21999, 22503, 23002, 23494, 23978, 24455, 24924,
- 25384, 25834, 26274, 26704, 27122, 27529, 27924, 28306, 28675, 29031,
- 29373, 29700, 30012, 30310, 30592, 30857, 31107, 31340, 31557, 31756,
- 31938, 32102, 32249, 32377, 32488, 32580, 32654, 32710, 32747, 32766,
- 32766, 32747, 32710, 32654, 32580, 32488, 32377, 32249, 32102, 31938,
- 31756, 31557, 31340, 31107, 30857, 30592, 30310, 30012, 29700, 29373,
- 29031, 28675, 28306, 27924, 27529, 27122, 26704, 26274, 25834, 25384,
- 24924, 24455, 23978, 23494, 23002, 22503, 21999, 21489, 20975, 20457,
- 19935, 19411, 18884, 18356, 17827, 17298, 16769, 16242, 15716, 15193,
- 14673, 14157, 13645, 13138, 12636, 12141, 11653, 11172, 10699, 10235,
- 9780, 9334, 8899, 8475, 8062, 7661, 7273, 6897, 6534, 6186,
- 5851, 5531, 5226, 4937, 4663, 4405, 4164, 3939, 3731, 3541,
- 3367, 3212, 3074, 2955, 2853, 2770, 2705, 2659, 2631, 2621
-};
-
-/**
- * Binomial window coefficients scaled by 2^15
- */
-static const int16_t binomial_window[LPC_ORDER] = {
- 32749, 32695, 32604, 32477, 32315, 32118, 31887, 31622, 31324, 30995
-};
-
-/**
- * 0.994^i scaled by 2^15
- */
-static const int16_t bandwidth_expand[LPC_ORDER] = {
- 32571, 32376, 32182, 31989, 31797, 31606, 31416, 31228, 31040, 30854
-};
-
-/**
- * 0.5^i scaled by 2^15
- */
-static const int16_t percept_flt_tbl[2][LPC_ORDER] = {
- /* Zero part */
- {29491, 26542, 23888, 21499, 19349, 17414, 15673, 14106, 12695, 11425},
- /* Pole part */
- {16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32}
-};
-
static av_cold int g723_1_encode_init(AVCodecContext *avctx)
{
G723_1_Context *s = avctx->priv_data;
@@ -290,14 +242,14 @@
p = 0;
temp = 0;
for (i = 0; i <= LPC_ORDER / 2; i++)
- temp += f[2 * i] * G723_1_COS_TAB_FIRST_ELEMENT;
+ temp += f[2 * i] * cos_tab[0];
prev_val = av_clipl_int32(temp << 1);
count = 0;
for (i = 1; i < COS_TBL_SIZE / 2; i++) {
/* Evaluate */
temp = 0;
for (j = 0; j <= LPC_ORDER / 2; j++)
- temp += f[LPC_ORDER - 2 * j + p] * ff_g723_1_cos_tab[i * j % COS_TBL_SIZE];
+ temp += f[LPC_ORDER - 2 * j + p] * cos_tab[i * j % COS_TBL_SIZE];
cur_val = av_clipl_int32(temp << 1);
/* Check for sign change, indicating a zero crossing */
@@ -321,7 +273,7 @@
temp = 0;
for (j = 0; j <= LPC_ORDER / 2; j++)
temp += f[LPC_ORDER - 2 * j + p] *
- ff_g723_1_cos_tab[i * j % COS_TBL_SIZE];
+ cos_tab[i * j % COS_TBL_SIZE];
cur_val = av_clipl_int32(temp << 1);
}
prev_val = cur_val;
@@ -346,11 +298,11 @@
\
for (i = 0; i < LSP_CB_SIZE; i++) { \
for (j = 0; j < size; j++){ \
- temp[j] = (weight[j + (offset)] * ff_g723_1_lsp_band##num[i][j] + \
+ temp[j] = (weight[j + (offset)] * lsp_band##num[i][j] + \
(1 << 14)) >> 15; \
} \
error = ff_g723_1_dot_product(lsp + (offset), temp, size) << 1; \
- error -= ff_g723_1_dot_product(ff_g723_1_lsp_band##num[i], temp, size); \
+ error -= ff_g723_1_dot_product(lsp_band##num[i], temp, size); \
if (error > max) { \
max = error; \
lsp_index[num] = i; \
@@ -690,7 +642,7 @@
{
int16_t flt_buf[PITCH_ORDER][SUBFRAME_LEN];
- const int16_t *cb_tbl = ff_g723_1_adaptive_cb_gain85;
+ const int16_t *cb_tbl = adaptive_cb_gain85;
int ccr_buf[PITCH_ORDER * SUBFRAMES << 2];
@@ -768,7 +720,7 @@
/* Select quantization table */
if (!odd_frame && pitch_lag + i - 1 >= SUBFRAME_LEN - 2 ||
odd_frame && pitch_lag >= SUBFRAME_LEN - 2) {
- cb_tbl = ff_g723_1_adaptive_cb_gain170;
+ cb_tbl = adaptive_cb_gain170;
tbl_size = 170;
}
@@ -886,7 +838,7 @@
min = 1 << 30;
max_amp_index = GAIN_LEVELS - 2;
for (j = max_amp_index; j >= 2; j--) {
- temp = av_clipl_int32((int64_t) ff_g723_1_fixed_cb_gain[j] *
+ temp = av_clipl_int32((int64_t) fixed_cb_gain[j] *
impulse_corr[0] << 1);
temp = FFABS(temp - amp);
if (temp < min) {
@@ -903,7 +855,7 @@
ccr2[k] = ccr1[k];
}
param.amp_index = max_amp_index + j - 2;
- amp = ff_g723_1_fixed_cb_gain[param.amp_index];
+ amp = fixed_cb_gain[param.amp_index];
param.pulse_sign[0] = (ccr2[param.pulse_pos[0]] < 0) ? -amp : amp;
temp_corr[param.pulse_pos[0]] = 1;
@@ -990,7 +942,7 @@
for (i = 0; i < SUBFRAME_LEN >> 1; i++) {
int val = buf[optim->grid_index + (i << 1)];
if (!val) {
- subfrm->pulse_pos += ff_g723_1_combinatorial_table[j][i];
+ subfrm->pulse_pos += combinatorial_table[j][i];
} else {
subfrm->pulse_sign <<= 1;
if (val < 0)
diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c
index 860634c..2be1e2e 100644
--- a/libavcodec/gdv.c
+++ b/libavcodec/gdv.c
@@ -461,8 +461,7 @@
GetByteContext *gb = &gdv->gb;
PutByteContext *pb = &gdv->pb;
AVFrame *frame = data;
- int ret, i;
- buffer_size_t pal_size;
+ int ret, i, pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
int compression;
unsigned flags;
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 938bc0e..de41992 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -47,12 +47,10 @@
const AVClass *class;
LZWState *lzw;
uint8_t *buf;
- uint8_t *shrunk_buf;
int buf_size;
AVFrame *last_frame;
int flags;
int image;
- int use_global_palette;
uint32_t palette[AVPALETTE_COUNT]; ///< local reference palette for !pal8
int palette_loaded;
int transparent_index;
@@ -64,38 +62,6 @@
GF_TRANSDIFF = 1<<1,
};
-static void shrink_palette(const uint32_t *src, uint8_t *map,
- uint32_t *dst, size_t *palette_count)
-{
- size_t colors_seen = 0;
-
- for (size_t i = 0; i < AVPALETTE_COUNT; i++) {
- int seen = 0;
- for (size_t c = 0; c < colors_seen; c++) {
- if (src[i] == dst[c]) {
- seen = 1;
- break;
- }
- }
- if (!seen) {
- dst[colors_seen] = src[i];
- map[i] = colors_seen;
- colors_seen++;
- }
- }
-
- *palette_count = colors_seen;
-}
-
-static void remap_frame_to_palette(const uint8_t *src, int src_linesize,
- uint8_t *dst, int dst_linesize,
- int w, int h, uint8_t *map)
-{
- for (int i = 0; i < h; i++)
- for (int j = 0; j < w; j++)
- dst[i * dst_linesize + j] = map[src[i * src_linesize + j]];
-}
-
static int is_image_translucent(AVCodecContext *avctx,
const uint8_t *buf, const int linesize)
{
@@ -300,17 +266,6 @@
int x_start = 0, y_start = 0, trans = s->transparent_index;
int bcid = -1, honor_transparency = (s->flags & GF_TRANSDIFF) && s->last_frame && !palette;
const uint8_t *ptr;
- uint32_t shrunk_palette[AVPALETTE_COUNT];
- uint8_t map[AVPALETTE_COUNT] = { 0 };
- size_t shrunk_palette_count = 0;
-
- /*
- * We memset to 0xff instead of 0x00 so that the transparency detection
- * doesn't pick anything after the palette entries as the transparency
- * index, and because GIF89a requires us to always write a power-of-2
- * number of palette entries.
- */
- memset(shrunk_palette, 0xff, AVPALETTE_SIZE);
if (!s->image && is_image_translucent(avctx, buf, linesize)) {
gif_crop_translucent(avctx, buf, linesize, &width, &height, &x_start, &y_start);
@@ -338,14 +293,12 @@
bcid = get_palette_transparency_index(global_palette);
- bytestream_put_byte(bytestream, ((uint8_t) s->use_global_palette << 7) | 0x70 | (s->use_global_palette ? 7 : 0)); /* flags: global clut, 256 entries */
+ bytestream_put_byte(bytestream, 0xf7); /* flags: global clut, 256 entries */
bytestream_put_byte(bytestream, bcid < 0 ? DEFAULT_TRANSPARENCY_INDEX : bcid); /* background color index */
bytestream_put_byte(bytestream, aspect);
- if (s->use_global_palette) {
- for (int i = 0; i < 256; i++) {
- const uint32_t v = global_palette[i] & 0xffffff;
- bytestream_put_be24(bytestream, v);
- }
+ for (int i = 0; i < 256; i++) {
+ const uint32_t v = global_palette[i] & 0xffffff;
+ bytestream_put_be24(bytestream, v);
}
}
@@ -359,11 +312,6 @@
if (trans < 0)
honor_transparency = 0;
- if (palette || !s->use_global_palette) {
- const uint32_t *pal = palette ? palette : s->palette;
- shrink_palette(pal, map, shrunk_palette, &shrunk_palette_count);
- }
-
bcid = honor_transparency || disposal == GCE_DISPOSAL_BACKGROUND ? trans : get_palette_transparency_index(palette);
/* graphic control extension */
@@ -372,7 +320,7 @@
bytestream_put_byte(bytestream, 0x04); /* block size */
bytestream_put_byte(bytestream, disposal<<2 | (bcid >= 0));
bytestream_put_le16(bytestream, 5); // default delay
- bytestream_put_byte(bytestream, bcid < 0 ? DEFAULT_TRANSPARENCY_INDEX : (shrunk_palette_count ? map[bcid] : bcid));
+ bytestream_put_byte(bytestream, bcid < 0 ? DEFAULT_TRANSPARENCY_INDEX : bcid);
bytestream_put_byte(bytestream, 0x00);
/* image block */
@@ -382,18 +330,15 @@
bytestream_put_le16(bytestream, width);
bytestream_put_le16(bytestream, height);
- if (palette || !s->use_global_palette) {
- const uint32_t *pal = palette ? palette : s->palette;
- unsigned pow2_count = av_log2(shrunk_palette_count - 1);
+ if (!palette) {
+ bytestream_put_byte(bytestream, 0x00); /* flags */
+ } else {
unsigned i;
-
- bytestream_put_byte(bytestream, 1<<7 | pow2_count); /* flags */
- for (i = 0; i < 1 << (pow2_count + 1); i++) {
- const uint32_t v = pal[i];
+ bytestream_put_byte(bytestream, 1<<7 | 0x7); /* flags */
+ for (i = 0; i < AVPALETTE_COUNT; i++) {
+ const uint32_t v = palette[i];
bytestream_put_be24(bytestream, v);
}
- } else {
- bytestream_put_byte(bytestream, 0x00); /* flags */
}
bytestream_put_byte(bytestream, 0x08);
@@ -401,19 +346,7 @@
ff_lzw_encode_init(s->lzw, s->buf, s->buf_size,
12, FF_LZW_GIF, 1);
- if (shrunk_palette_count) {
- if (!s->shrunk_buf) {
- s->shrunk_buf = av_malloc(avctx->height * linesize);
- if (!s->shrunk_buf) {
- av_log(avctx, AV_LOG_ERROR, "Could not allocated remapped frame buffer.\n");
- return AVERROR(ENOMEM);
- }
- }
- remap_frame_to_palette(buf, linesize, s->shrunk_buf, linesize, avctx->width, avctx->height, map);
- ptr = s->shrunk_buf + y_start*linesize + x_start;
- } else {
- ptr = buf + y_start*linesize + x_start;
- }
+ ptr = buf + y_start*linesize + x_start;
if (honor_transparency) {
const int ref_linesize = s->last_frame->linesize[0];
const uint8_t *ref = s->last_frame->data[0] + y_start*ref_linesize + x_start;
@@ -527,7 +460,6 @@
av_freep(&s->lzw);
av_freep(&s->buf);
- av_freep(&s->shrunk_buf);
s->buf_size = 0;
av_frame_free(&s->last_frame);
av_freep(&s->tmpl);
@@ -541,7 +473,6 @@
{ "offsetting", "enable picture offsetting", 0, AV_OPT_TYPE_CONST, {.i64=GF_OFFSETTING}, INT_MIN, INT_MAX, FLAGS, "flags" },
{ "transdiff", "enable transparency detection between frames", 0, AV_OPT_TYPE_CONST, {.i64=GF_TRANSDIFF}, INT_MIN, INT_MAX, FLAGS, "flags" },
{ "gifimage", "enable encoding only images per frame", OFFSET(image), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
- { "global_palette", "write a palette to the global gif header where feasible", OFFSET(use_global_palette), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ NULL }
};
diff --git a/libavcodec/h261.c b/libavcodec/h261.c
index 01abfad..47bad4e 100644
--- a/libavcodec/h261.c
+++ b/libavcodec/h261.c
@@ -30,6 +30,8 @@
#define IS_FIL(a) ((a) & MB_TYPE_H261_FIL)
+uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3];
+
static void h261_loop_filter(uint8_t *src, int stride)
{
int x, y, xy, yz;
@@ -77,3 +79,14 @@
h261_loop_filter(dest_cb, uvlinesize);
h261_loop_filter(dest_cr, uvlinesize);
}
+
+av_cold void ff_h261_common_init(void)
+{
+ static int done = 0;
+
+ if (done)
+ return;
+
+ ff_rl_init(&ff_h261_rl_tcoeff, ff_h261_rl_table_store);
+ done = 1;
+}
diff --git a/libavcodec/h261.h b/libavcodec/h261.h
index 25728a2..399a404 100644
--- a/libavcodec/h261.h
+++ b/libavcodec/h261.h
@@ -48,6 +48,8 @@
#define MB_TYPE_H261_FIL 0x800000
+extern uint8_t ff_h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3];
+
extern const uint8_t ff_h261_mba_code[35];
extern const uint8_t ff_h261_mba_bits[35];
extern const uint8_t ff_h261_mtype_code[10];
@@ -58,6 +60,7 @@
extern RLTable ff_h261_rl_tcoeff;
void ff_h261_loop_filter(MpegEncContext *s);
+void ff_h261_common_init(void);
int ff_h261_get_picture_format(int width, int height);
void ff_h261_reorder_mb_index(MpegEncContext *s);
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 5c25aa9..8a49e7d 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -26,7 +26,6 @@
*/
#include "libavutil/avassert.h"
-#include "libavutil/thread.h"
#include "avcodec.h"
#include "mpeg_er.h"
#include "mpegutils.h"
@@ -35,7 +34,7 @@
#include "h261.h"
#include "internal.h"
-#define H261_MBA_VLC_BITS 8
+#define H261_MBA_VLC_BITS 9
#define H261_MTYPE_VLC_BITS 6
#define H261_MV_VLC_BITS 7
#define H261_CBP_VLC_BITS 9
@@ -48,39 +47,45 @@
static VLC h261_mv_vlc;
static VLC h261_cbp_vlc;
-static av_cold void h261_decode_init_static(void)
+static av_cold void h261_decode_init_vlc(H261Context *h)
{
- INIT_VLC_STATIC(&h261_mba_vlc, H261_MBA_VLC_BITS, 35,
- ff_h261_mba_bits, 1, 1,
- ff_h261_mba_code, 1, 1, 540);
- INIT_VLC_STATIC(&h261_mtype_vlc, H261_MTYPE_VLC_BITS, 10,
- ff_h261_mtype_bits, 1, 1,
- ff_h261_mtype_code, 1, 1, 80);
- INIT_VLC_STATIC(&h261_mv_vlc, H261_MV_VLC_BITS, 17,
- &ff_h261_mv_tab[0][1], 2, 1,
- &ff_h261_mv_tab[0][0], 2, 1, 144);
- INIT_VLC_STATIC(&h261_cbp_vlc, H261_CBP_VLC_BITS, 63,
- &ff_h261_cbp_tab[0][1], 2, 1,
- &ff_h261_cbp_tab[0][0], 2, 1, 512);
- INIT_FIRST_VLC_RL(ff_h261_rl_tcoeff, 552);
+ static int done = 0;
+
+ if (!done) {
+ done = 1;
+ INIT_VLC_STATIC(&h261_mba_vlc, H261_MBA_VLC_BITS, 35,
+ ff_h261_mba_bits, 1, 1,
+ ff_h261_mba_code, 1, 1, 662);
+ INIT_VLC_STATIC(&h261_mtype_vlc, H261_MTYPE_VLC_BITS, 10,
+ ff_h261_mtype_bits, 1, 1,
+ ff_h261_mtype_code, 1, 1, 80);
+ INIT_VLC_STATIC(&h261_mv_vlc, H261_MV_VLC_BITS, 17,
+ &ff_h261_mv_tab[0][1], 2, 1,
+ &ff_h261_mv_tab[0][0], 2, 1, 144);
+ INIT_VLC_STATIC(&h261_cbp_vlc, H261_CBP_VLC_BITS, 63,
+ &ff_h261_cbp_tab[0][1], 2, 1,
+ &ff_h261_cbp_tab[0][0], 2, 1, 512);
+ INIT_VLC_RL(ff_h261_rl_tcoeff, 552);
+ }
}
static av_cold int h261_decode_init(AVCodecContext *avctx)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
H261Context *h = avctx->priv_data;
MpegEncContext *const s = &h->s;
// set defaults
+ ff_mpv_decode_defaults(s);
ff_mpv_decode_init(s, avctx);
s->out_format = FMT_H261;
s->low_delay = 1;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
- h->gob_start_code_skipped = 0;
+ ff_h261_common_init();
+ h261_decode_init_vlc(h);
- ff_thread_once(&init_static_once, h261_decode_init_static);
+ h->gob_start_code_skipped = 0;
return 0;
}
@@ -426,7 +431,7 @@
// Read cbp
if (HAS_CBP(h->mtype))
- cbp = get_vlc2(&s->gb, h261_cbp_vlc.table, H261_CBP_VLC_BITS, 1) + 1;
+ cbp = get_vlc2(&s->gb, h261_cbp_vlc.table, H261_CBP_VLC_BITS, 2) + 1;
if (s->mb_intra) {
s->current_picture.mb_type[xy] = MB_TYPE_INTRA;
@@ -608,7 +613,10 @@
}
if (s->width != avctx->coded_width || s->height != avctx->coded_height) {
+ ParseContext pc = s->parse_context; // FIXME move this demuxing hack to libavformat
+ s->parse_context.buffer = 0;
ff_mpv_common_end(s);
+ s->parse_context = pc;
}
if (!s->context_initialized) {
@@ -678,6 +686,6 @@
.close = h261_decode_end,
.decode = h261_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.max_lowres = 3,
};
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index eec526c..8d5d62b 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -27,7 +27,6 @@
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
-#include "libavutil/thread.h"
#include "avcodec.h"
#include "mpegutils.h"
#include "mpegvideo.h"
@@ -362,17 +361,9 @@
}
}
-static av_cold void h261_encode_init_static(void)
-{
- static uint8_t h261_rl_table_store[2][2 * MAX_RUN + MAX_LEVEL + 3];
-
- ff_rl_init(&ff_h261_rl_tcoeff, h261_rl_table_store);
- init_uni_h261_rl_tab(&ff_h261_rl_tcoeff, uni_h261_rl_len);
-}
-
av_cold void ff_h261_encode_init(MpegEncContext *s)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
+ ff_h261_common_init();
s->min_qcoeff = -127;
s->max_qcoeff = 127;
@@ -380,9 +371,10 @@
s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
s->ac_esc_length = 6+6+8;
+ init_uni_h261_rl_tab(&ff_h261_rl_tcoeff, uni_h261_rl_len);
+
s->intra_ac_vlc_length = s->inter_ac_vlc_length = uni_h261_rl_len;
s->intra_ac_vlc_last_length = s->inter_ac_vlc_last_length = uni_h261_rl_len + 128*64;
- ff_thread_once(&init_static_once, h261_encode_init_static);
}
static const AVClass h261_class = {
@@ -401,7 +393,7 @@
.init = ff_mpv_encode_init,
.encode2 = ff_mpv_encode_picture,
.close = ff_mpv_encode_end,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE },
.priv_class = &h261_class,
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 998f7d0..f891f72 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -34,7 +34,6 @@
// reading vlc values. Changing these may improve speed and data cache needs
// be aware though that decreasing them may need the number of stages that is
// passed to get_vlc* to be increased.
-#define H263_MV_VLC_BITS 9
#define INTRA_MCBPC_VLC_BITS 6
#define INTER_MCBPC_VLC_BITS 7
#define CBPY_VLC_BITS 6
@@ -45,7 +44,6 @@
extern VLC ff_h263_intra_MCBPC_vlc;
extern VLC ff_h263_inter_MCBPC_vlc;
extern VLC ff_h263_cbpy_vlc;
-extern VLC ff_h263_mv_vlc;
extern const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[];
diff --git a/libavcodec/h263data.c b/libavcodec/h263data.c
index 604a042..f649d58 100644
--- a/libavcodec/h263data.c
+++ b/libavcodec/h263data.c
@@ -25,11 +25,11 @@
#include <stdint.h>
-#include "libavutil/thread.h"
-
#include "h263data.h"
#include "mpegvideo.h"
+uint8_t ff_h263_static_rl_table_store[2][2][2 * MAX_RUN + MAX_LEVEL + 3];
+
/* intra MCBPC, mb_type = (intra), then (intraq) */
const uint8_t ff_h263_intra_MCBPC_code[9] = { 1, 1, 2, 3, 1, 1, 2, 3, 1 };
const uint8_t ff_h263_intra_MCBPC_bits[9] = { 1, 3, 3, 3, 4, 6, 6, 6, 9 };
@@ -290,15 +290,3 @@
{ 0, 1 },
{ 0, 1 },
};
-
-static av_cold void h263_init_rl_inter(void)
-{
- static uint8_t h263_rl_inter_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
- ff_rl_init(&ff_h263_rl_inter, h263_rl_inter_table);
-}
-
-av_cold void ff_h263_init_rl_inter(void)
-{
- static AVOnce init_static_once = AV_ONCE_INIT;
- ff_thread_once(&init_static_once, h263_init_rl_inter);
-}
diff --git a/libavcodec/h263data.h b/libavcodec/h263data.h
index 144704d..3da0e37 100644
--- a/libavcodec/h263data.h
+++ b/libavcodec/h263data.h
@@ -61,7 +61,7 @@
extern RLTable ff_h263_rl_inter;
extern RLTable ff_rl_intra_aic;
-void ff_h263_init_rl_inter(void);
+extern uint8_t ff_h263_static_rl_table_store[2][2][2 * MAX_RUN + MAX_LEVEL + 3];
extern const uint16_t ff_h263_format[8][2];
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 6943899..89052e8 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -26,8 +26,6 @@
*/
#include "libavutil/cpu.h"
-#include "libavutil/video_enc_params.h"
-
#include "avcodec.h"
#include "error_resilience.h"
#include "flv.h"
@@ -73,6 +71,7 @@
s->out_format = FMT_H263;
// set defaults
+ ff_mpv_decode_defaults(s);
ff_mpv_decode_init(s, avctx);
s->quant_precision = 5;
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 1e31bd1..0f98b49 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -146,7 +146,7 @@
return si;
}
-static const char *const hevc_nal_type_name[64] = {
+static const char *hevc_nal_type_name[64] = {
"TRAIL_N", // HEVC_NAL_TRAIL_N
"TRAIL_R", // HEVC_NAL_TRAIL_R
"TSA_N", // HEVC_NAL_TSA_N
@@ -219,7 +219,7 @@
return hevc_nal_type_name[nal_type];
}
-static const char *const h264_nal_type_name[32] = {
+static const char *h264_nal_type_name[32] = {
"Unspecified 0", //H264_NAL_UNSPECIFIED
"Coded slice of a non-IDR picture", // H264_NAL_SLICE
"Coded slice data partition A", // H264_NAL_DPA
@@ -467,12 +467,8 @@
memset(pkt->nals + pkt->nals_allocated, 0, sizeof(*pkt->nals));
nal = &pkt->nals[pkt->nb_nals];
- nal->skipped_bytes_pos_size = FFMIN(1024, extract_length/3+1); // initial buffer size
-#if 0 // Chromium: Always use av_realloc() for |nal->skipped_bytes_pos|. https://crbug.com/1193797
+ nal->skipped_bytes_pos_size = 1024; // initial buffer size
nal->skipped_bytes_pos = av_malloc_array(nal->skipped_bytes_pos_size, sizeof(*nal->skipped_bytes_pos));
-#else
- nal->skipped_bytes_pos = av_realloc_array(NULL, nal->skipped_bytes_pos_size, sizeof(*nal->skipped_bytes_pos));
-#endif
if (!nal->skipped_bytes_pos)
return AVERROR(ENOMEM);
diff --git a/libavcodec/h264_levels.c b/libavcodec/h264_levels.c
index 801b27f..dd517f1 100644
--- a/libavcodec/h264_levels.c
+++ b/libavcodec/h264_levels.c
@@ -75,6 +75,18 @@
return 1200;
}
+const H264LevelDescriptor *ff_h264_get_level(int level_idc,
+ int constraint_set3_flag)
+{
+ int i;
+ for (i = 0; i < FF_ARRAY_ELEMS(h264_levels); i++) {
+ if (h264_levels[i].level_idc == level_idc &&
+ h264_levels[i].constraint_set3_flag == constraint_set3_flag)
+ return &h264_levels[i];
+ }
+ return NULL;
+}
+
const H264LevelDescriptor *ff_h264_guess_level(int profile_idc,
int64_t bitrate,
int framerate,
diff --git a/libavcodec/h264_levels.h b/libavcodec/h264_levels.h
index 6bba2e8..0a0f410 100644
--- a/libavcodec/h264_levels.h
+++ b/libavcodec/h264_levels.h
@@ -36,6 +36,9 @@
uint8_t max_mvs_per_2mb;
} H264LevelDescriptor;
+const H264LevelDescriptor *ff_h264_get_level(int level_idc,
+ int constraint_set3_flag);
+
/**
* Guess the level of a stream from some parameters.
*
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 558ec6c..0924f32 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -27,7 +27,6 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "internal.h"
#include "avcodec.h"
#include "h264dec.h"
diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index c3a63f3..eb15031 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -22,14 +22,21 @@
#include "libavutil/opt.h"
#include "bsf.h"
+#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_h264.h"
#include "h264.h"
#include "h264_levels.h"
#include "h264_sei.h"
enum {
+ PASS,
+ INSERT,
+ REMOVE,
+ EXTRACT,
+};
+
+enum {
FLIP_HORIZONTAL = 1,
FLIP_VERTICAL = 2,
};
@@ -40,12 +47,15 @@
};
typedef struct H264MetadataContext {
- CBSBSFContext common;
+ const AVClass *class;
+
+ CodedBitstreamContext *input;
+ CodedBitstreamContext *output;
+ CodedBitstreamFragment access_unit;
int done_first_au;
int aud;
- H264RawAUD aud_nal;
AVRational sample_aspect_ratio;
@@ -68,72 +78,17 @@
int crop_bottom;
const char *sei_user_data;
- SEIRawUserDataUnregistered sei_user_data_payload;
int delete_filler;
int display_orientation;
double rotate;
int flip;
- H264RawSEIDisplayOrientation display_orientation_payload;
int level;
} H264MetadataContext;
-static int h264_metadata_insert_aud(AVBSFContext *bsf,
- CodedBitstreamFragment *au)
-{
- H264MetadataContext *ctx = bsf->priv_data;
- int primary_pic_type_mask = 0xff;
- int err, i, j;
-
- static const int primary_pic_type_table[] = {
- 0x084, // 2, 7
- 0x0a5, // 0, 2, 5, 7
- 0x0e7, // 0, 1, 2, 5, 6, 7
- 0x210, // 4, 9
- 0x318, // 3, 4, 8, 9
- 0x294, // 2, 4, 7, 9
- 0x3bd, // 0, 2, 3, 4, 5, 7, 8, 9
- 0x3ff, // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- };
-
- for (i = 0; i < au->nb_units; i++) {
- if (au->units[i].type == H264_NAL_SLICE ||
- au->units[i].type == H264_NAL_IDR_SLICE) {
- H264RawSlice *slice = au->units[i].content;
- for (j = 0; j < FF_ARRAY_ELEMS(primary_pic_type_table); j++) {
- if (!(primary_pic_type_table[j] &
- (1 << slice->header.slice_type)))
- primary_pic_type_mask &= ~(1 << j);
- }
- }
- }
- for (j = 0; j < FF_ARRAY_ELEMS(primary_pic_type_table); j++)
- if (primary_pic_type_mask & (1 << j))
- break;
- if (j >= FF_ARRAY_ELEMS(primary_pic_type_table)) {
- av_log(bsf, AV_LOG_ERROR, "No usable primary_pic_type: "
- "invalid slice types?\n");
- return AVERROR_INVALIDDATA;
- }
-
- ctx->aud_nal = (H264RawAUD) {
- .nal_unit_header.nal_unit_type = H264_NAL_AUD,
- .primary_pic_type = j,
- };
-
- err = ff_cbs_insert_unit_content(au, 0, H264_NAL_AUD,
- &ctx->aud_nal, NULL);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to insert AUD.\n");
- return err;
- }
-
- return 0;
-}
-
static int h264_metadata_update_sps(AVBSFContext *bsf,
H264RawSPS *sps)
{
@@ -322,94 +277,292 @@
return 0;
}
-static int h264_metadata_handle_display_orientation(AVBSFContext *bsf,
- AVPacket *pkt,
- CodedBitstreamFragment *au,
- int seek_point)
+static int h264_metadata_update_side_data(AVBSFContext *bsf, AVPacket *pkt)
{
H264MetadataContext *ctx = bsf->priv_data;
- SEIRawMessage *message;
- int err;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ uint8_t *side_data;
+ int side_data_size;
+ int err, i;
- message = NULL;
- while (ff_cbs_sei_find_message(ctx->common.output, au,
- SEI_TYPE_DISPLAY_ORIENTATION,
- &message) == 0) {
- H264RawSEIDisplayOrientation *disp = message->payload;
- int32_t *matrix;
+ side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
+ &side_data_size);
+ if (!side_data_size)
+ return 0;
- matrix = av_malloc(9 * sizeof(int32_t));
- if (!matrix)
- return AVERROR(ENOMEM);
+ err = ff_cbs_read(ctx->input, au, side_data, side_data_size);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata from packet side data.\n");
+ return err;
+ }
- av_display_rotation_set(matrix,
- disp->anticlockwise_rotation *
- 180.0 / 65536.0);
- av_display_matrix_flip(matrix, disp->hor_flip, disp->ver_flip);
-
- // If there are multiple display orientation messages in an
- // access unit, then the last one added to the packet (i.e.
- // the first one in the access unit) will prevail.
- err = av_packet_add_side_data(pkt, AV_PKT_DATA_DISPLAYMATRIX,
- (uint8_t*)matrix,
- 9 * sizeof(int32_t));
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to attach extracted "
- "displaymatrix side data to packet.\n");
- av_free(matrix);
- return AVERROR(ENOMEM);
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SPS) {
+ err = h264_metadata_update_sps(bsf, au->units[i].content);
+ if (err < 0)
+ return err;
}
}
- if (ctx->display_orientation == BSF_ELEMENT_REMOVE ||
- ctx->display_orientation == BSF_ELEMENT_INSERT) {
- ff_cbs_sei_delete_message_type(ctx->common.output, au,
- SEI_TYPE_DISPLAY_ORIENTATION);
+ err = ff_cbs_write_fragment_data(ctx->output, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata into packet side data.\n");
+ return err;
}
- if (ctx->display_orientation == BSF_ELEMENT_INSERT) {
+ side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, au->data_size);
+ if (!side_data)
+ return AVERROR(ENOMEM);
+ memcpy(side_data, au->data, au->data_size);
+
+ ff_cbs_fragment_reset(au);
+
+ return 0;
+}
+
+static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
+{
+ H264MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ int err, i, j, has_sps;
+ H264RawAUD aud;
+
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = h264_metadata_update_side_data(bsf, pkt);
+ if (err < 0)
+ goto fail;
+
+ err = ff_cbs_read_packet(ctx->input, au, pkt);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read packet.\n");
+ goto fail;
+ }
+
+ if (au->nb_units == 0) {
+ av_log(bsf, AV_LOG_ERROR, "No NAL units in packet.\n");
+ err = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
+ // If an AUD is present, it must be the first NAL unit.
+ if (au->units[0].type == H264_NAL_AUD) {
+ if (ctx->aud == REMOVE)
+ ff_cbs_delete_unit(au, 0);
+ } else {
+ if (ctx->aud == INSERT) {
+ static const int primary_pic_type_table[] = {
+ 0x084, // 2, 7
+ 0x0a5, // 0, 2, 5, 7
+ 0x0e7, // 0, 1, 2, 5, 6, 7
+ 0x210, // 4, 9
+ 0x318, // 3, 4, 8, 9
+ 0x294, // 2, 4, 7, 9
+ 0x3bd, // 0, 2, 3, 4, 5, 7, 8, 9
+ 0x3ff, // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
+ };
+ int primary_pic_type_mask = 0xff;
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SLICE ||
+ au->units[i].type == H264_NAL_IDR_SLICE) {
+ H264RawSlice *slice = au->units[i].content;
+ for (j = 0; j < FF_ARRAY_ELEMS(primary_pic_type_table); j++) {
+ if (!(primary_pic_type_table[j] &
+ (1 << slice->header.slice_type)))
+ primary_pic_type_mask &= ~(1 << j);
+ }
+ }
+ }
+ for (j = 0; j < FF_ARRAY_ELEMS(primary_pic_type_table); j++)
+ if (primary_pic_type_mask & (1 << j))
+ break;
+ if (j >= FF_ARRAY_ELEMS(primary_pic_type_table)) {
+ av_log(bsf, AV_LOG_ERROR, "No usable primary_pic_type: "
+ "invalid slice types?\n");
+ err = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
+ aud = (H264RawAUD) {
+ .nal_unit_header.nal_unit_type = H264_NAL_AUD,
+ .primary_pic_type = j,
+ };
+
+ err = ff_cbs_insert_unit_content(au,
+ 0, H264_NAL_AUD, &aud, NULL);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to insert AUD.\n");
+ goto fail;
+ }
+ }
+ }
+
+ has_sps = 0;
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SPS) {
+ err = h264_metadata_update_sps(bsf, au->units[i].content);
+ if (err < 0)
+ goto fail;
+ has_sps = 1;
+ }
+ }
+
+ // Only insert the SEI in access units containing SPSs, and also
+ // unconditionally in the first access unit we ever see.
+ if (ctx->sei_user_data && (has_sps || !ctx->done_first_au)) {
+ H264RawSEIPayload payload = {
+ .payload_type = H264_SEI_TYPE_USER_DATA_UNREGISTERED,
+ };
+ H264RawSEIUserDataUnregistered *udu =
+ &payload.payload.user_data_unregistered;
+
+ for (i = j = 0; j < 32 && ctx->sei_user_data[i]; i++) {
+ int c, v;
+ c = ctx->sei_user_data[i];
+ if (c == '-') {
+ continue;
+ } else if (av_isxdigit(c)) {
+ c = av_tolower(c);
+ v = (c <= '9' ? c - '0' : c - 'a' + 10);
+ } else {
+ goto invalid_user_data;
+ }
+ if (j & 1)
+ udu->uuid_iso_iec_11578[j / 2] |= v;
+ else
+ udu->uuid_iso_iec_11578[j / 2] = v << 4;
+ ++j;
+ }
+ if (j == 32 && ctx->sei_user_data[i] == '+') {
+ size_t len = strlen(ctx->sei_user_data + i + 1);
+
+ udu->data_ref = av_buffer_alloc(len + 1);
+ if (!udu->data_ref) {
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ udu->data = udu->data_ref->data;
+ udu->data_length = len + 1;
+ memcpy(udu->data, ctx->sei_user_data + i + 1, len + 1);
+
+ err = ff_cbs_h264_add_sei_message(au, &payload);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to add user data SEI "
+ "message to access unit.\n");
+ goto fail;
+ }
+
+ } else {
+ invalid_user_data:
+ av_log(bsf, AV_LOG_ERROR, "Invalid user data: "
+ "must be \"UUID+string\".\n");
+ err = AVERROR(EINVAL);
+ goto fail;
+ }
+ }
+
+ if (ctx->delete_filler) {
+ for (i = au->nb_units - 1; i >= 0; i--) {
+ if (au->units[i].type == H264_NAL_FILLER_DATA) {
+ ff_cbs_delete_unit(au, i);
+ continue;
+ }
+
+ if (au->units[i].type == H264_NAL_SEI) {
+ // Filler SEI messages.
+ H264RawSEI *sei = au->units[i].content;
+
+ for (j = sei->payload_count - 1; j >= 0; j--) {
+ if (sei->payload[j].payload_type ==
+ H264_SEI_TYPE_FILLER_PAYLOAD)
+ ff_cbs_h264_delete_sei_message(au, &au->units[i], j);
+ }
+ }
+ }
+ }
+
+ if (ctx->display_orientation != PASS) {
+ for (i = au->nb_units - 1; i >= 0; i--) {
+ H264RawSEI *sei;
+ if (au->units[i].type != H264_NAL_SEI)
+ continue;
+ sei = au->units[i].content;
+
+ for (j = sei->payload_count - 1; j >= 0; j--) {
+ H264RawSEIDisplayOrientation *disp;
+ int32_t *matrix;
+
+ if (sei->payload[j].payload_type !=
+ H264_SEI_TYPE_DISPLAY_ORIENTATION)
+ continue;
+ disp = &sei->payload[j].payload.display_orientation;
+
+ if (ctx->display_orientation == REMOVE ||
+ ctx->display_orientation == INSERT) {
+ ff_cbs_h264_delete_sei_message(au, &au->units[i], j);
+ continue;
+ }
+
+ matrix = av_malloc(9 * sizeof(int32_t));
+ if (!matrix) {
+ err = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ av_display_rotation_set(matrix,
+ disp->anticlockwise_rotation *
+ 180.0 / 65536.0);
+ av_display_matrix_flip(matrix, disp->hor_flip, disp->ver_flip);
+
+ // If there are multiple display orientation messages in an
+ // access unit, then the last one added to the packet (i.e.
+ // the first one in the access unit) will prevail.
+ err = av_packet_add_side_data(pkt, AV_PKT_DATA_DISPLAYMATRIX,
+ (uint8_t*)matrix,
+ 9 * sizeof(int32_t));
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to attach extracted "
+ "displaymatrix side data to packet.\n");
+ av_free(matrix);
+ goto fail;
+ }
+ }
+ }
+ }
+ if (ctx->display_orientation == INSERT) {
+ H264RawSEIPayload payload = {
+ .payload_type = H264_SEI_TYPE_DISPLAY_ORIENTATION,
+ };
H264RawSEIDisplayOrientation *disp =
- &ctx->display_orientation_payload;
+ &payload.payload.display_orientation;
uint8_t *data;
- buffer_size_t size;
+ int size;
int write = 0;
data = av_packet_get_side_data(pkt, AV_PKT_DATA_DISPLAYMATRIX, &size);
if (data && size >= 9 * sizeof(int32_t)) {
int32_t matrix[9];
- double dmatrix[9];
- int hflip, vflip, i;
- double scale_x, scale_y, angle;
+ int hflip, vflip;
+ double angle;
memcpy(matrix, data, sizeof(matrix));
- for (i = 0; i < 9; i++)
- dmatrix[i] = matrix[i] / 65536.0;
+ hflip = vflip = 0;
+ if (matrix[0] < 0 && matrix[4] > 0)
+ hflip = 1;
+ else if (matrix[0] > 0 && matrix[4] < 0)
+ vflip = 1;
+ av_display_matrix_flip(matrix, hflip, vflip);
- // Extract scale factors.
- scale_x = hypot(dmatrix[0], dmatrix[3]);
- scale_y = hypot(dmatrix[1], dmatrix[4]);
+ angle = av_display_rotation_get(matrix);
- // Select flips to make the main diagonal positive.
- hflip = dmatrix[0] < 0.0;
- vflip = dmatrix[4] < 0.0;
- if (hflip)
- scale_x = -scale_x;
- if (vflip)
- scale_y = -scale_y;
-
- // Rescale.
- for (i = 0; i < 9; i += 3) {
- dmatrix[i] /= scale_x;
- dmatrix[i + 1] /= scale_y;
- }
-
- // Extract rotation.
- angle = atan2(dmatrix[3], dmatrix[0]);
-
- if (!(angle >= -M_PI && angle <= M_PI) ||
- matrix[2] != 0.0 || matrix[5] != 0.0 ||
- matrix[6] != 0.0 || matrix[7] != 0.0) {
+ if (!(angle >= -180.0 && angle <= 180.0 /* also excludes NaN */) ||
+ matrix[2] != 0 || matrix[5] != 0 ||
+ matrix[6] != 0 || matrix[7] != 0) {
av_log(bsf, AV_LOG_WARNING, "Input display matrix is not "
"representable in H.264 parameters.\n");
} else {
@@ -417,13 +570,13 @@
disp->ver_flip = vflip;
disp->anticlockwise_rotation =
(uint16_t)rint((angle >= 0.0 ? angle
- : angle + 2 * M_PI) *
- 32768.0 / M_PI);
+ : angle + 360.0) *
+ 65536.0 / 360.0);
write = 1;
}
}
- if (seek_point) {
+ if (has_sps || !ctx->done_first_au) {
if (!isnan(ctx->rotate)) {
disp->anticlockwise_rotation =
(uint16_t)rint((ctx->rotate >= 0.0 ? ctx->rotate
@@ -441,148 +594,95 @@
if (write) {
disp->display_orientation_repetition_period = 1;
- err = ff_cbs_sei_add_message(ctx->common.output, au, 1,
- SEI_TYPE_DISPLAY_ORIENTATION,
- disp, NULL);
+ err = ff_cbs_h264_add_sei_message(au, &payload);
if (err < 0) {
av_log(bsf, AV_LOG_ERROR, "Failed to add display orientation "
"SEI message to access unit.\n");
- return err;
+ goto fail;
}
}
}
- return 0;
+ err = ff_cbs_write_packet(ctx->output, pkt, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n");
+ goto fail;
+ }
+
+ ctx->done_first_au = 1;
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
}
-static int h264_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
- CodedBitstreamFragment *au)
-{
- H264MetadataContext *ctx = bsf->priv_data;
- int err, i, has_sps, seek_point;
-
- // If an AUD is present, it must be the first NAL unit.
- if (au->units[0].type == H264_NAL_AUD) {
- if (ctx->aud == BSF_ELEMENT_REMOVE)
- ff_cbs_delete_unit(au, 0);
- } else {
- if (ctx->aud == BSF_ELEMENT_INSERT) {
- err = h264_metadata_insert_aud(bsf, au);
- if (err < 0)
- return err;
- }
- }
-
- has_sps = 0;
- for (i = 0; i < au->nb_units; i++) {
- if (au->units[i].type == H264_NAL_SPS) {
- err = h264_metadata_update_sps(bsf, au->units[i].content);
- if (err < 0)
- return err;
- has_sps = 1;
- }
- }
-
- if (pkt) {
- // The current packet should be treated as a seek point for metadata
- // insertion if any of:
- // - It is the first packet in the stream.
- // - It contains an SPS, indicating that a sequence might start here.
- // - It is marked as containing a key frame.
- seek_point = !ctx->done_first_au || has_sps ||
- (pkt->flags & AV_PKT_FLAG_KEY);
- } else {
- seek_point = 0;
- }
-
- if (ctx->sei_user_data && seek_point) {
- err = ff_cbs_sei_add_message(ctx->common.output, au, 1,
- SEI_TYPE_USER_DATA_UNREGISTERED,
- &ctx->sei_user_data_payload, NULL);
- if (err < 0) {
- av_log(bsf, AV_LOG_ERROR, "Failed to add user data SEI "
- "message to access unit.\n");
- return err;
- }
- }
-
- if (ctx->delete_filler) {
- for (i = au->nb_units - 1; i >= 0; i--) {
- if (au->units[i].type == H264_NAL_FILLER_DATA) {
- ff_cbs_delete_unit(au, i);
- continue;
- }
- }
-
- ff_cbs_sei_delete_message_type(ctx->common.output, au,
- SEI_TYPE_FILLER_PAYLOAD);
- }
-
- if (pkt && ctx->display_orientation != BSF_ELEMENT_PASS) {
- err = h264_metadata_handle_display_orientation(bsf, pkt, au,
- seek_point);
- if (err < 0)
- return err;
- }
-
- if (pkt)
- ctx->done_first_au = 1;
-
- return 0;
-}
-
-static const CBSBSFType h264_metadata_type = {
- .codec_id = AV_CODEC_ID_H264,
- .fragment_name = "access unit",
- .unit_name = "NAL unit",
- .update_fragment = &h264_metadata_update_fragment,
-};
-
static int h264_metadata_init(AVBSFContext *bsf)
{
H264MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ int err, i;
- if (ctx->sei_user_data) {
- SEIRawUserDataUnregistered *udu = &ctx->sei_user_data_payload;
- int i, j;
+ err = ff_cbs_init(&ctx->input, AV_CODEC_ID_H264, bsf);
+ if (err < 0)
+ return err;
+ err = ff_cbs_init(&ctx->output, AV_CODEC_ID_H264, bsf);
+ if (err < 0)
+ return err;
- // Parse UUID. It must be a hex string of length 32, possibly
- // containing '-'s between hex digits (which we ignore).
- for (i = j = 0; j < 32 && i < 64 && ctx->sei_user_data[i]; i++) {
- int c, v;
- c = ctx->sei_user_data[i];
- if (c == '-') {
- continue;
- } else if (av_isxdigit(c)) {
- c = av_tolower(c);
- v = (c <= '9' ? c - '0' : c - 'a' + 10);
- } else {
- break;
- }
- if (j & 1)
- udu->uuid_iso_iec_11578[j / 2] |= v;
- else
- udu->uuid_iso_iec_11578[j / 2] = v << 4;
- ++j;
+ if (bsf->par_in->extradata) {
+ err = ff_cbs_read_extradata(ctx->input, au, bsf->par_in);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
+ goto fail;
}
- if (j == 32 && ctx->sei_user_data[i] == '+') {
- udu->data = (uint8_t*)ctx->sei_user_data + i + 1;
- udu->data_length = strlen(udu->data) + 1;
- } else {
- av_log(bsf, AV_LOG_ERROR, "Invalid user data: "
- "must be \"UUID+string\".\n");
- return AVERROR(EINVAL);
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_SPS) {
+ err = h264_metadata_update_sps(bsf, au->units[i].content);
+ if (err < 0)
+ goto fail;
+ }
+ }
+
+ err = ff_cbs_write_extradata(ctx->output, bsf->par_out, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
+ goto fail;
}
}
- return ff_cbs_bsf_generic_init(bsf, &h264_metadata_type);
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+ return err;
+}
+
+static void h264_metadata_close(AVBSFContext *bsf)
+{
+ H264MetadataContext *ctx = bsf->priv_data;
+
+ ff_cbs_fragment_free(&ctx->access_unit);
+ ff_cbs_close(&ctx->input);
+ ff_cbs_close(&ctx->output);
}
#define OFFSET(x) offsetof(H264MetadataContext, x)
#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
static const AVOption h264_metadata_options[] = {
- BSF_ELEMENT_OPTIONS_PIR("aud", "Access Unit Delimiter NAL units",
- aud, FLAGS),
+ { "aud", "Access Unit Delimiter NAL units",
+ OFFSET(aud), AV_OPT_TYPE_INT,
+ { .i64 = PASS }, PASS, REMOVE, FLAGS, "aud" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "aud" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "aud" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "aud" },
{ "sample_aspect_ratio", "Set sample aspect ratio (table E-1)",
OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL,
@@ -638,9 +738,17 @@
{ "delete_filler", "Delete all filler (both NAL and SEI)",
OFFSET(delete_filler), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS},
- BSF_ELEMENT_OPTIONS_PIRE("display_orientation",
- "Display orientation SEI",
- display_orientation, FLAGS),
+ { "display_orientation", "Display orientation SEI",
+ OFFSET(display_orientation), AV_OPT_TYPE_INT,
+ { .i64 = PASS }, PASS, EXTRACT, FLAGS, "disp_or" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "disp_or" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "disp_or" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "disp_or" },
+ { "extract", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = EXTRACT }, .flags = FLAGS, .unit = "disp_or" },
{ "rotate", "Set rotation in display orientation SEI (anticlockwise angle in degrees)",
OFFSET(rotate), AV_OPT_TYPE_DOUBLE,
@@ -704,7 +812,7 @@
.priv_data_size = sizeof(H264MetadataContext),
.priv_class = &h264_metadata_class,
.init = &h264_metadata_init,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &h264_metadata_close,
+ .filter = &h264_metadata_filter,
.codec_ids = h264_metadata_codec_ids,
};
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 19d9ee4..bf395e3 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -33,7 +33,6 @@
#include "h264dec.h"
#include "mpegutils.h"
#include "libavutil/avassert.h"
-#include "libavutil/mem_internal.h"
static av_always_inline int fetch_diagonal_mv(const H264Context *h, H264SliceContext *sl,
diff --git a/libavcodec/h264_redundant_pps_bsf.c b/libavcodec/h264_redundant_pps_bsf.c
index 6ba4029..cf41abe 100644
--- a/libavcodec/h264_redundant_pps_bsf.c
+++ b/libavcodec/h264_redundant_pps_bsf.c
@@ -24,13 +24,15 @@
#include "bsf.h"
#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_h264.h"
#include "h264.h"
typedef struct H264RedundantPPSContext {
- CBSBSFContext common;
+ CodedBitstreamContext *input;
+ CodedBitstreamContext *output;
+
+ CodedBitstreamFragment access_unit;
int global_pic_init_qp;
int current_pic_init_qp;
@@ -47,7 +49,7 @@
// The changes we are about to perform affect the parsing process,
// so we must make sure that the PPS is writable, otherwise the
// parsing of future slices will be incorrect and even raise errors.
- err = ff_cbs_make_unit_writable(ctx->common.input, unit);
+ err = ff_cbs_make_unit_writable(ctx->input, unit);
if (err < 0)
return err;
pps = unit->content;
@@ -76,14 +78,21 @@
return 0;
}
-static int h264_redundant_pps_update_fragment(AVBSFContext *bsf,
- AVPacket *pkt,
- CodedBitstreamFragment *au)
+static int h264_redundant_pps_filter(AVBSFContext *bsf, AVPacket *pkt)
{
H264RedundantPPSContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
int au_has_sps;
int err, i;
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = ff_cbs_read_packet(ctx->input, au, pkt);
+ if (err < 0)
+ goto fail;
+
au_has_sps = 0;
for (i = 0; i < au->nb_units; i++) {
CodedBitstreamUnit *nal = &au->units[i];
@@ -93,7 +102,7 @@
if (nal->type == H264_NAL_PPS) {
err = h264_redundant_pps_fixup_pps(ctx, nal);
if (err < 0)
- return err;
+ goto fail;
if (!au_has_sps) {
av_log(bsf, AV_LOG_VERBOSE, "Deleting redundant PPS "
"at %"PRId64".\n", pkt->pts);
@@ -109,7 +118,62 @@
}
}
- return 0;
+ err = ff_cbs_write_packet(ctx->output, pkt, au);
+ if (err < 0)
+ goto fail;
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
+}
+
+static int h264_redundant_pps_init(AVBSFContext *bsf)
+{
+ H264RedundantPPSContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ int err, i;
+
+ err = ff_cbs_init(&ctx->input, AV_CODEC_ID_H264, bsf);
+ if (err < 0)
+ return err;
+
+ err = ff_cbs_init(&ctx->output, AV_CODEC_ID_H264, bsf);
+ if (err < 0)
+ return err;
+
+ ctx->global_pic_init_qp = 26;
+
+ if (bsf->par_in->extradata) {
+ err = ff_cbs_read_extradata(ctx->input, au, bsf->par_in);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
+ goto fail;
+ }
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == H264_NAL_PPS) {
+ err = h264_redundant_pps_fixup_pps(ctx, &au->units[i]);
+ if (err < 0)
+ goto fail;
+ }
+ }
+
+ ctx->extradata_pic_init_qp = ctx->current_pic_init_qp;
+ err = ff_cbs_write_extradata(ctx->output, bsf->par_out, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
+ goto fail;
+ }
+ }
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+ return err;
}
static void h264_redundant_pps_flush(AVBSFContext *bsf)
@@ -118,20 +182,13 @@
ctx->current_pic_init_qp = ctx->extradata_pic_init_qp;
}
-static const CBSBSFType h264_redundant_pps_type = {
- .codec_id = AV_CODEC_ID_H264,
- .fragment_name = "access unit",
- .unit_name = "NAL unit",
- .update_fragment = &h264_redundant_pps_update_fragment,
-};
-
-static int h264_redundant_pps_init(AVBSFContext *bsf)
+static void h264_redundant_pps_close(AVBSFContext *bsf)
{
H264RedundantPPSContext *ctx = bsf->priv_data;
- ctx->global_pic_init_qp = 26;
-
- return ff_cbs_bsf_generic_init(bsf, &h264_redundant_pps_type);
+ ff_cbs_fragment_free(&ctx->access_unit);
+ ff_cbs_close(&ctx->input);
+ ff_cbs_close(&ctx->output);
}
static const enum AVCodecID h264_redundant_pps_codec_ids[] = {
@@ -143,7 +200,7 @@
.priv_data_size = sizeof(H264RedundantPPSContext),
.init = &h264_redundant_pps_init,
.flush = &h264_redundant_pps_flush,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &h264_redundant_pps_close,
+ .filter = &h264_redundant_pps_filter,
.codec_ids = h264_redundant_pps_codec_ids,
};
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index ca2ca59..669560a 100644
--- a/libavcodec/h264_sei.c
+++ b/libavcodec/h264_sei.c
@@ -183,59 +183,33 @@
static int decode_registered_user_data(H264SEIContext *h, GetBitContext *gb,
void *logctx, int size)
{
- int country_code, provider_code;
+ uint32_t country_code;
+ uint32_t user_identifier;
- if (size < 3)
+ if (size < 7)
return AVERROR_INVALIDDATA;
- size -= 3;
+ size -= 7;
country_code = get_bits(gb, 8); // itu_t_t35_country_code
if (country_code == 0xFF) {
- if (size < 1)
- return AVERROR_INVALIDDATA;
-
skip_bits(gb, 8); // itu_t_t35_country_code_extension_byte
size--;
}
- if (country_code != 0xB5) { // usa_country_code
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d)\n",
- country_code);
- return 0;
- }
-
/* itu_t_t35_payload_byte follows */
- provider_code = get_bits(gb, 16);
+ skip_bits(gb, 8); // terminal provider code
+ skip_bits(gb, 8); // terminal provider oriented code
+ user_identifier = get_bits_long(gb, 32);
- switch (provider_code) {
- case 0x31: { // atsc_provider_code
- uint32_t user_identifier;
-
- if (size < 4)
- return AVERROR_INVALIDDATA;
- size -= 4;
-
- user_identifier = get_bits_long(gb, 32);
- switch (user_identifier) {
+ switch (user_identifier) {
case MKBETAG('D', 'T', 'G', '1'): // afd_data
return decode_registered_user_data_afd(&h->afd, gb, size);
case MKBETAG('G', 'A', '9', '4'): // closed captions
return decode_registered_user_data_closed_caption(&h->a53_caption, gb,
logctx, size);
default:
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
- user_identifier);
+ skip_bits(gb, size * 8);
break;
- }
- break;
- }
- default:
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (provider_code = %d)\n",
- provider_code);
- break;
}
return 0;
@@ -444,31 +418,31 @@
return ret;
switch (type) {
- case SEI_TYPE_PIC_TIMING: // Picture timing SEI
+ case H264_SEI_TYPE_PIC_TIMING: // Picture timing SEI
ret = decode_picture_timing(&h->picture_timing, &gb_payload, logctx);
break;
- case SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35:
+ case H264_SEI_TYPE_USER_DATA_REGISTERED:
ret = decode_registered_user_data(h, &gb_payload, logctx, size);
break;
- case SEI_TYPE_USER_DATA_UNREGISTERED:
+ case H264_SEI_TYPE_USER_DATA_UNREGISTERED:
ret = decode_unregistered_user_data(&h->unregistered, &gb_payload, logctx, size);
break;
- case SEI_TYPE_RECOVERY_POINT:
+ case H264_SEI_TYPE_RECOVERY_POINT:
ret = decode_recovery_point(&h->recovery_point, &gb_payload, logctx);
break;
- case SEI_TYPE_BUFFERING_PERIOD:
+ case H264_SEI_TYPE_BUFFERING_PERIOD:
ret = decode_buffering_period(&h->buffering_period, &gb_payload, ps, logctx);
break;
- case SEI_TYPE_FRAME_PACKING_ARRANGEMENT:
+ case H264_SEI_TYPE_FRAME_PACKING:
ret = decode_frame_packing_arrangement(&h->frame_packing, &gb_payload);
break;
- case SEI_TYPE_DISPLAY_ORIENTATION:
+ case H264_SEI_TYPE_DISPLAY_ORIENTATION:
ret = decode_display_orientation(&h->display_orientation, &gb_payload);
break;
- case SEI_TYPE_GREEN_METADATA:
+ case H264_SEI_TYPE_GREEN_METADATA:
ret = decode_green_metadata(&h->green_metadata, &gb_payload);
break;
- case SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+ case H264_SEI_TYPE_ALTERNATIVE_TRANSFER:
ret = decode_alternative_transfer(&h->alternative_transfer, &gb_payload);
break;
default:
diff --git a/libavcodec/h264_sei.h b/libavcodec/h264_sei.h
index 14cc559..4fdcf4e 100644
--- a/libavcodec/h264_sei.h
+++ b/libavcodec/h264_sei.h
@@ -21,8 +21,24 @@
#include "get_bits.h"
#include "h264_ps.h"
-#include "sei.h"
+/**
+ * SEI message types
+ */
+typedef enum {
+ H264_SEI_TYPE_BUFFERING_PERIOD = 0, ///< buffering period (H.264, D.1.1)
+ H264_SEI_TYPE_PIC_TIMING = 1, ///< picture timing
+ H264_SEI_TYPE_PAN_SCAN_RECT = 2, ///< pan-scan rectangle
+ H264_SEI_TYPE_FILLER_PAYLOAD = 3, ///< filler data
+ H264_SEI_TYPE_USER_DATA_REGISTERED = 4, ///< registered user data as specified by Rec. ITU-T T.35
+ H264_SEI_TYPE_USER_DATA_UNREGISTERED = 5, ///< unregistered user data
+ H264_SEI_TYPE_RECOVERY_POINT = 6, ///< recovery point (frame # to decoder sync)
+ H264_SEI_TYPE_FRAME_PACKING = 45, ///< frame packing arrangement
+ H264_SEI_TYPE_DISPLAY_ORIENTATION = 47, ///< display orientation
+ H264_SEI_TYPE_GREEN_METADATA = 56, ///< GreenMPEG information
+ H264_SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME = 137, ///< mastering display properties
+ H264_SEI_TYPE_ALTERNATIVE_TRANSFER = 147, ///< alternative transfer
+} H264_SEI_Type;
/**
* pic_struct in picture timing SEI message
diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c
index 8ba6cc6..6a33dde 100644
--- a/libavcodec/h264dec.c
+++ b/libavcodec/h264dec.c
@@ -977,7 +977,7 @@
return send_next_delayed_frame(h, pict, got_frame, 0);
if (av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, NULL)) {
- buffer_size_t side_size;
+ int side_size;
uint8_t *side = av_packet_get_side_data(avpkt, AV_PKT_DATA_NEW_EXTRADATA, &side_size);
ff_h264_decode_extradata(side, side_size,
&h->ps, &h->is_avc, &h->nal_length_size,
@@ -1056,7 +1056,7 @@
.capabilities = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS |
AV_CODEC_CAP_FRAME_THREADS,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_H264_DXVA2_HWACCEL
HWACCEL_DXVA2(h264),
#endif
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index b3677cd..29c4d4e 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -30,7 +30,6 @@
#include "libavutil/buffer.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "cabac.h"
diff --git a/libavcodec/h265_metadata_bsf.c b/libavcodec/h265_metadata_bsf.c
index 59325c0..504a75d 100644
--- a/libavcodec/h265_metadata_bsf.c
+++ b/libavcodec/h265_metadata_bsf.c
@@ -20,19 +20,29 @@
#include "libavutil/opt.h"
#include "bsf.h"
+#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_h265.h"
#include "hevc.h"
#include "h265_profile_level.h"
enum {
+ PASS,
+ INSERT,
+ REMOVE,
+};
+
+enum {
LEVEL_UNSET = -2,
LEVEL_AUTO = -1,
};
typedef struct H265MetadataContext {
- CBSBSFContext common;
+ const AVClass *class;
+
+ CodedBitstreamContext *input;
+ CodedBitstreamContext *output;
+ CodedBitstreamFragment access_unit;
H265RawAUD aud_nal;
@@ -328,18 +338,89 @@
return 0;
}
-static int h265_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
- CodedBitstreamFragment *au)
+static int h265_metadata_update_side_data(AVBSFContext *bsf, AVPacket *pkt)
{
H265MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ uint8_t *side_data;
+ int side_data_size;
int err, i;
+ side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA,
+ &side_data_size);
+ if (!side_data_size)
+ return 0;
+
+ err = ff_cbs_read(ctx->input, au, side_data, side_data_size);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata from packet side data.\n");
+ return err;
+ }
+
+ if (ctx->level == LEVEL_AUTO && !ctx->level_guess)
+ h265_metadata_guess_level(bsf, au);
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == HEVC_NAL_VPS) {
+ err = h265_metadata_update_vps(bsf, au->units[i].content);
+ if (err < 0)
+ return err;
+ }
+ if (au->units[i].type == HEVC_NAL_SPS) {
+ err = h265_metadata_update_sps(bsf, au->units[i].content);
+ if (err < 0)
+ return err;
+ }
+ }
+
+ err = ff_cbs_write_fragment_data(ctx->output, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata into packet side data.\n");
+ return err;
+ }
+
+ side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_NEW_EXTRADATA, au->data_size);
+ if (!side_data)
+ return AVERROR(ENOMEM);
+ memcpy(side_data, au->data, au->data_size);
+
+ ff_cbs_fragment_reset(au);
+
+ return 0;
+}
+
+static int h265_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
+{
+ H265MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ int err, i;
+
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = h265_metadata_update_side_data(bsf, pkt);
+ if (err < 0)
+ goto fail;
+
+ err = ff_cbs_read_packet(ctx->input, au, pkt);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read packet.\n");
+ goto fail;
+ }
+
+ if (au->nb_units == 0) {
+ av_log(bsf, AV_LOG_ERROR, "No NAL units in packet.\n");
+ err = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
// If an AUD is present, it must be the first NAL unit.
if (au->units[0].type == HEVC_NAL_AUD) {
- if (ctx->aud == BSF_ELEMENT_REMOVE)
+ if (ctx->aud == REMOVE)
ff_cbs_delete_unit(au, 0);
} else {
- if (pkt && ctx->aud == BSF_ELEMENT_INSERT) {
+ if (ctx->aud == INSERT) {
H265RawAUD *aud = &ctx->aud_nal;
int pic_type = 0, temporal_id = 8, layer_id = 0;
@@ -372,7 +453,7 @@
err = ff_cbs_insert_unit_content(au, 0, HEVC_NAL_AUD, aud, NULL);
if (err < 0) {
av_log(bsf, AV_LOG_ERROR, "Failed to insert AUD.\n");
- return err;
+ goto fail;
}
}
}
@@ -384,35 +465,101 @@
if (au->units[i].type == HEVC_NAL_VPS) {
err = h265_metadata_update_vps(bsf, au->units[i].content);
if (err < 0)
- return err;
+ goto fail;
}
if (au->units[i].type == HEVC_NAL_SPS) {
err = h265_metadata_update_sps(bsf, au->units[i].content);
if (err < 0)
- return err;
+ goto fail;
}
}
- return 0;
-}
+ err = ff_cbs_write_packet(ctx->output, pkt, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n");
+ goto fail;
+ }
-static const CBSBSFType h265_metadata_type = {
- .codec_id = AV_CODEC_ID_HEVC,
- .fragment_name = "access unit",
- .unit_name = "NAL unit",
- .update_fragment = &h265_metadata_update_fragment,
-};
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
+}
static int h265_metadata_init(AVBSFContext *bsf)
{
- return ff_cbs_bsf_generic_init(bsf, &h265_metadata_type);
+ H265MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *au = &ctx->access_unit;
+ int err, i;
+
+ err = ff_cbs_init(&ctx->input, AV_CODEC_ID_HEVC, bsf);
+ if (err < 0)
+ return err;
+ err = ff_cbs_init(&ctx->output, AV_CODEC_ID_HEVC, bsf);
+ if (err < 0)
+ return err;
+
+ if (bsf->par_in->extradata) {
+ err = ff_cbs_read_extradata(ctx->input, au, bsf->par_in);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
+ goto fail;
+ }
+
+ if (ctx->level == LEVEL_AUTO)
+ h265_metadata_guess_level(bsf, au);
+
+ for (i = 0; i < au->nb_units; i++) {
+ if (au->units[i].type == HEVC_NAL_VPS) {
+ err = h265_metadata_update_vps(bsf, au->units[i].content);
+ if (err < 0)
+ goto fail;
+ }
+ if (au->units[i].type == HEVC_NAL_SPS) {
+ err = h265_metadata_update_sps(bsf, au->units[i].content);
+ if (err < 0)
+ goto fail;
+ }
+ }
+
+ err = ff_cbs_write_extradata(ctx->output, bsf->par_out, au);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
+ goto fail;
+ }
+ }
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(au);
+ return err;
+}
+
+static void h265_metadata_close(AVBSFContext *bsf)
+{
+ H265MetadataContext *ctx = bsf->priv_data;
+
+ ff_cbs_fragment_free(&ctx->access_unit);
+ ff_cbs_close(&ctx->input);
+ ff_cbs_close(&ctx->output);
}
#define OFFSET(x) offsetof(H265MetadataContext, x)
#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
static const AVOption h265_metadata_options[] = {
- BSF_ELEMENT_OPTIONS_PIR("aud", "Access Unit Delimiter NAL units",
- aud, FLAGS),
+ { "aud", "Access Unit Delimiter NAL units",
+ OFFSET(aud), AV_OPT_TYPE_INT,
+ { .i64 = PASS }, PASS, REMOVE, FLAGS, "aud" },
+ { "pass", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = PASS }, .flags = FLAGS, .unit = "aud" },
+ { "insert", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = INSERT }, .flags = FLAGS, .unit = "aud" },
+ { "remove", NULL, 0, AV_OPT_TYPE_CONST,
+ { .i64 = REMOVE }, .flags = FLAGS, .unit = "aud" },
{ "sample_aspect_ratio", "Set sample aspect ratio (table E-1)",
OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL,
@@ -503,7 +650,7 @@
.priv_data_size = sizeof(H265MetadataContext),
.priv_class = &h265_metadata_class,
.init = &h265_metadata_init,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &h265_metadata_close,
+ .filter = &h265_metadata_filter,
.codec_ids = h265_metadata_codec_ids,
};
diff --git a/libavcodec/h265_profile_level.c b/libavcodec/h265_profile_level.c
index 7ff9681..d79c1ab 100644
--- a/libavcodec/h265_profile_level.c
+++ b/libavcodec/h265_profile_level.c
@@ -120,6 +120,18 @@
};
+const H265LevelDescriptor *ff_h265_get_level(int level_idc)
+{
+ int i;
+
+ for (i = 0; i < FF_ARRAY_ELEMS(h265_levels); i++) {
+ if (h265_levels[i].level_idc == level_idc)
+ return &h265_levels[i];
+ }
+
+ return NULL;
+}
+
const H265ProfileDescriptor *ff_h265_get_profile(const H265RawProfileTierLevel *ptl)
{
int i;
diff --git a/libavcodec/h265_profile_level.h b/libavcodec/h265_profile_level.h
index f1a11f5..2d5beba 100644
--- a/libavcodec/h265_profile_level.h
+++ b/libavcodec/h265_profile_level.h
@@ -70,6 +70,8 @@
} H265ProfileDescriptor;
+const H265LevelDescriptor *ff_h265_get_level(int level_idc);
+
const H265ProfileDescriptor *ff_h265_get_profile(const H265RawProfileTierLevel *ptl);
diff --git a/libavcodec/half2float.h b/libavcodec/half2float.h
deleted file mode 100644
index fd11caf..0000000
--- a/libavcodec/half2float.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 AVCODEC_HALF2FLOAT_H
-#define AVCODEC_HALF2FLOAT_H
-
-#include <stdint.h>
-
-static uint32_t convertmantissa(uint32_t i)
-{
- int32_t m = i << 13; // Zero pad mantissa bits
- int32_t e = 0; // Zero exponent
-
- while (!(m & 0x00800000)) { // While not normalized
- e -= 0x00800000; // Decrement exponent (1<<23)
- m <<= 1; // Shift mantissa
- }
-
- m &= ~0x00800000; // Clear leading 1 bit
- e += 0x38800000; // Adjust bias ((127-14)<<23)
-
- return m | e; // Return combined number
-}
-
-static void half2float_table(uint32_t *mantissatable, uint32_t *exponenttable,
- uint16_t *offsettable)
-{
- mantissatable[0] = 0;
- for (int i = 1; i < 1024; i++)
- mantissatable[i] = convertmantissa(i);
- for (int i = 1024; i < 2048; i++)
- mantissatable[i] = 0x38000000UL + ((i - 1024) << 13UL);
-
- exponenttable[0] = 0;
- for (int i = 1; i < 31; i++)
- exponenttable[i] = i << 23;
- for (int i = 33; i < 63; i++)
- exponenttable[i] = 0x80000000UL + ((i - 32) << 23UL);
- exponenttable[31]= 0x47800000UL;
- exponenttable[32]= 0x80000000UL;
- exponenttable[63]= 0xC7800000UL;
-
- offsettable[0] = 0;
- for (int i = 1; i < 64; i++)
- offsettable[i] = 1024;
- offsettable[32] = 0;
-}
-
-static uint32_t half2float(uint16_t h, uint32_t *mantissatable, uint32_t *exponenttable,
- uint16_t *offsettable)
-{
- uint32_t f;
-
- f = mantissatable[offsettable[h >> 10] + (h & 0x3ff)] + exponenttable[h >> 10];
-
- return f;
-}
-
-#endif /* AVCODEC_HALF2FLOAT_H */
diff --git a/libavcodec/hap.h b/libavcodec/hap.h
index 00c3dbb..bbeed11 100644
--- a/libavcodec/hap.h
+++ b/libavcodec/hap.h
@@ -52,7 +52,7 @@
typedef struct HapChunk {
enum HapCompressor compressor;
- uint32_t compressed_offset;
+ int compressed_offset;
size_t compressed_size;
int uncompressed_offset;
size_t uncompressed_size;
diff --git a/libavcodec/hapdec.c b/libavcodec/hapdec.c
index 692bb6e..ab364aa 100644
--- a/libavcodec/hapdec.c
+++ b/libavcodec/hapdec.c
@@ -105,8 +105,6 @@
size_t running_size = 0;
for (i = 0; i < ctx->chunk_count; i++) {
ctx->chunks[i].compressed_offset = running_size;
- if (ctx->chunks[i].compressed_size > UINT32_MAX - running_size)
- return AVERROR_INVALIDDATA;
running_size += ctx->chunks[i].compressed_size;
}
}
@@ -188,7 +186,7 @@
HapChunk *chunk = &ctx->chunks[i];
/* Check the compressed buffer is valid */
- if (chunk->compressed_offset + (uint64_t)chunk->compressed_size > bytestream2_get_bytes_left(gbc))
+ if (chunk->compressed_offset + chunk->compressed_size > bytestream2_get_bytes_left(gbc))
return AVERROR_INVALIDDATA;
/* Chunks are unpacked sequentially, ctx->tex_size is the uncompressed
diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c
index 9c3eda2..11cb157 100644
--- a/libavcodec/hcadec.c
+++ b/libavcodec/hcadec.c
@@ -19,7 +19,6 @@
#include "libavutil/crc.h"
#include "libavutil/float_dsp.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/tx.h"
#include "avcodec.h"
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c
index 9b8c8e3..3635b16 100644
--- a/libavcodec/hevc_cabac.c
+++ b/libavcodec/hevc_cabac.c
@@ -454,19 +454,12 @@
(s->ps.sps->ctb_width == 2 &&
ctb_addr_ts % s->ps.sps->ctb_width == 0))) {
memcpy(s->cabac_state, s->HEVClc->cabac_state, HEVC_CONTEXTS);
- if (s->ps.sps->persistent_rice_adaptation_enabled_flag) {
- memcpy(s->stat_coeff, s->HEVClc->stat_coeff, HEVC_STAT_COEFFS);
- }
}
}
-static void load_states(HEVCContext *s, int thread)
+static void load_states(HEVCContext *s)
{
memcpy(s->HEVClc->cabac_state, s->cabac_state, HEVC_CONTEXTS);
- if (s->ps.sps->persistent_rice_adaptation_enabled_flag) {
- const HEVCContext *prev = s->sList[(thread + s->threads_number - 1) % s->threads_number];
- memcpy(s->HEVClc->stat_coeff, prev->stat_coeff, HEVC_STAT_COEFFS);
- }
}
static int cabac_reinit(HEVCLocalContext *lc)
@@ -508,7 +501,7 @@
s->HEVClc->stat_coeff[i] = 0;
}
-int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts, int thread)
+int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts)
{
if (ctb_addr_ts == s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]) {
int ret = cabac_init_decoder(s);
@@ -525,7 +518,7 @@
if (s->ps.sps->ctb_width == 1)
cabac_init_state(s);
else if (s->sh.dependent_slice_segment_flag == 1)
- load_states(s, thread);
+ load_states(s);
}
}
} else {
@@ -556,7 +549,7 @@
if (s->ps.sps->ctb_width == 1)
cabac_init_state(s);
else
- load_states(s, thread);
+ load_states(s);
}
}
}
diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c
index 764c484..ea6fd53 100644
--- a/libavcodec/hevc_ps.c
+++ b/libavcodec/hevc_ps.c
@@ -783,7 +783,7 @@
static int scaling_list_data(GetBitContext *gb, AVCodecContext *avctx, ScalingList *sl, HEVCSPS *sps)
{
uint8_t scaling_list_pred_mode_flag;
- uint8_t scaling_list_dc_coef[2][6];
+ int32_t scaling_list_dc_coef[2][6];
int size_id, matrix_id, pos;
int i;
@@ -816,11 +816,7 @@
next_coef = 8;
coef_num = FFMIN(64, 1 << (4 + (size_id << 1)));
if (size_id > 1) {
- int scaling_list_coeff_minus8 = get_se_golomb(gb);
- if (scaling_list_coeff_minus8 < -7 ||
- scaling_list_coeff_minus8 > 247)
- return AVERROR_INVALIDDATA;
- scaling_list_dc_coef[size_id - 2][matrix_id] = scaling_list_coeff_minus8 + 8;
+ scaling_list_dc_coef[size_id - 2][matrix_id] = get_se_golomb(gb) + 8;
next_coef = scaling_list_dc_coef[size_id - 2][matrix_id];
sl->sl_dc[size_id - 2][matrix_id] = next_coef;
}
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index c881c43..3b0fa43 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -169,7 +169,7 @@
int ret;
if (size < 3)
- return AVERROR_INVALIDDATA;
+ return AVERROR(EINVAL);
ret = ff_parse_a53_cc(&s->buf_ref, gb->buffer + get_bits_count(gb) / 8, size);
@@ -236,34 +236,28 @@
}
static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitContext *gb,
- void *logctx, int size)
+ int size)
{
- int country_code, provider_code;
+ const uint8_t usa_country_code = 0xB5;
+ const uint16_t smpte_provider_code = 0x003C;
+
+ uint8_t country_code = 0;
+ uint16_t provider_code = 0;
if (size < 3)
- return AVERROR_INVALIDDATA;
+ return AVERROR(EINVAL);
size -= 3;
country_code = get_bits(gb, 8);
if (country_code == 0xFF) {
- if (size < 1)
- return AVERROR_INVALIDDATA;
-
skip_bits(gb, 8);
size--;
}
- if (country_code != 0xB5) { // usa_country_code
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d)\n",
- country_code);
- goto end;
- }
-
provider_code = get_bits(gb, 16);
- switch (provider_code) {
- case 0x3C: { // smpte_provider_code
+ if (country_code == usa_country_code &&
+ provider_code == smpte_provider_code) {
// A/341 Amendment - 2094-40
const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
const uint8_t smpte2094_40_application_identifier = 0x04;
@@ -271,7 +265,7 @@
uint8_t application_identifier;
if (size < 3)
- return AVERROR_INVALIDDATA;
+ return AVERROR(EINVAL);
size -= 3;
provider_oriented_code = get_bits(gb, 16);
@@ -280,13 +274,11 @@
application_identifier == smpte2094_40_application_identifier) {
return decode_registered_user_data_dynamic_hdr_plus(&s->dynamic_hdr_plus, gb, size);
}
- break;
- }
- case 0x31: { // atsc_provider_code
+ } else {
uint32_t user_identifier;
if (size < 4)
- return AVERROR_INVALIDDATA;
+ return AVERROR(EINVAL);
size -= 4;
user_identifier = get_bits_long(gb, 32);
@@ -294,21 +286,9 @@
case MKBETAG('G', 'A', '9', '4'):
return decode_registered_user_data_closed_caption(&s->a53_caption, gb, size);
default:
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
- user_identifier);
break;
}
- break;
}
- default:
- av_log(logctx, AV_LOG_VERBOSE,
- "Unsupported User Data Registered ITU-T T35 SEI message (provider_code = %d)\n",
- provider_code);
- break;
- }
-
-end:
skip_bits_long(gb, size * 8);
return 0;
}
@@ -402,25 +382,25 @@
switch (type) {
case 256: // Mismatched value from HM 8.1
return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);
- case SEI_TYPE_FRAME_PACKING_ARRANGEMENT:
+ case HEVC_SEI_TYPE_FRAME_PACKING:
return decode_nal_sei_frame_packing_arrangement(&s->frame_packing, gb);
- case SEI_TYPE_DISPLAY_ORIENTATION:
+ case HEVC_SEI_TYPE_DISPLAY_ORIENTATION:
return decode_nal_sei_display_orientation(&s->display_orientation, gb);
- case SEI_TYPE_PIC_TIMING:
+ case HEVC_SEI_TYPE_PICTURE_TIMING:
return decode_nal_sei_pic_timing(s, gb, ps, logctx, size);
- case SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME:
+ case HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO:
return decode_nal_sei_mastering_display_info(&s->mastering_display, gb);
- case SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
+ case HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO:
return decode_nal_sei_content_light_info(&s->content_light, gb);
- case SEI_TYPE_ACTIVE_PARAMETER_SETS:
+ case HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS:
return decode_nal_sei_active_parameter_sets(s, gb, logctx);
- case SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35:
- return decode_nal_sei_user_data_registered_itu_t_t35(s, gb, logctx, size);
- case SEI_TYPE_USER_DATA_UNREGISTERED:
+ case HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35:
+ return decode_nal_sei_user_data_registered_itu_t_t35(s, gb, size);
+ case HEVC_SEI_TYPE_USER_DATA_UNREGISTERED:
return decode_nal_sei_user_data_unregistered(&s->unregistered, gb, size);
- case SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:
+ case HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS:
return decode_nal_sei_alternative_transfer(&s->alternative_transfer, gb);
- case SEI_TYPE_TIME_CODE:
+ case HEVC_SEI_TYPE_TIME_CODE:
return decode_nal_sei_timecode(&s->timecode, gb);
default:
av_log(logctx, AV_LOG_DEBUG, "Skipped PREFIX SEI %d\n", type);
@@ -433,7 +413,7 @@
int type, int size)
{
switch (type) {
- case SEI_TYPE_DECODED_PICTURE_HASH:
+ case HEVC_SEI_TYPE_DECODED_PICTURE_HASH:
return decode_nal_sei_decoded_picture_hash(&s->picture_hash, gb);
default:
av_log(logctx, AV_LOG_DEBUG, "Skipped SUFFIX SEI %d\n", type);
@@ -463,8 +443,6 @@
byte = get_bits(gb, 8);
payload_size += byte;
}
- if (get_bits_left(gb) < 8LL*payload_size)
- return AVERROR_INVALIDDATA;
if (nal_unit_type == HEVC_NAL_SEI_PREFIX) {
return decode_nal_sei_prefix(gb, logctx, s, ps, payload_type, payload_size);
} else { /* nal_unit_type == NAL_SEI_SUFFIX */
diff --git a/libavcodec/hevc_sei.h b/libavcodec/hevc_sei.h
index c67dbce..e9e2d46 100644
--- a/libavcodec/hevc_sei.h
+++ b/libavcodec/hevc_sei.h
@@ -24,8 +24,40 @@
#include <stdint.h>
#include "get_bits.h"
-#include "sei.h"
+/**
+ * SEI message types
+ */
+typedef enum {
+ HEVC_SEI_TYPE_BUFFERING_PERIOD = 0,
+ HEVC_SEI_TYPE_PICTURE_TIMING = 1,
+ HEVC_SEI_TYPE_PAN_SCAN_RECT = 2,
+ HEVC_SEI_TYPE_FILLER_PAYLOAD = 3,
+ HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4,
+ HEVC_SEI_TYPE_USER_DATA_UNREGISTERED = 5,
+ HEVC_SEI_TYPE_RECOVERY_POINT = 6,
+ HEVC_SEI_TYPE_SCENE_INFO = 9,
+ HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT = 15,
+ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,
+ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17,
+ HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19,
+ HEVC_SEI_TYPE_POST_FILTER_HINT = 22,
+ HEVC_SEI_TYPE_TONE_MAPPING_INFO = 23,
+ HEVC_SEI_TYPE_FRAME_PACKING = 45,
+ HEVC_SEI_TYPE_DISPLAY_ORIENTATION = 47,
+ HEVC_SEI_TYPE_SOP_DESCRIPTION = 128,
+ HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS = 129,
+ HEVC_SEI_TYPE_DECODING_UNIT_INFO = 130,
+ HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX = 131,
+ HEVC_SEI_TYPE_DECODED_PICTURE_HASH = 132,
+ HEVC_SEI_TYPE_SCALABLE_NESTING = 133,
+ HEVC_SEI_TYPE_REGION_REFRESH_INFO = 134,
+ HEVC_SEI_TYPE_TIME_CODE = 136,
+ HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO = 137,
+ HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144,
+ HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
+ HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO = 165,
+} HEVC_SEI_Type;
typedef enum {
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING = 7,
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 2231aed..be814bb 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -515,9 +515,6 @@
s->sao_pixel_buffer_v[c_idx] =
av_malloc((h * 2 * sps->ctb_width) <<
sps->pixel_shift);
- if (!s->sao_pixel_buffer_h[c_idx] ||
- !s->sao_pixel_buffer_v[c_idx])
- goto fail;
}
}
@@ -528,10 +525,6 @@
fail:
pic_arrays_free(s);
- for (i = 0; i < 3; i++) {
- av_freep(&s->sao_pixel_buffer_h[i]);
- av_freep(&s->sao_pixel_buffer_v[i]);
- }
s->ps.sps = NULL;
return ret;
}
@@ -2480,7 +2473,7 @@
y_ctb = (ctb_addr_rs / ((s->ps.sps->width + ctb_size - 1) >> s->ps.sps->log2_ctb_size)) << s->ps.sps->log2_ctb_size;
hls_decode_neighbour(s, x_ctb, y_ctb, ctb_addr_ts);
- ret = ff_hevc_cabac_init(s, ctb_addr_ts, 0);
+ ret = ff_hevc_cabac_init(s, ctb_addr_ts);
if (ret < 0) {
s->tab_slice_address[ctb_addr_rs] = -1;
return ret;
@@ -2558,7 +2551,7 @@
return 0;
}
- ret = ff_hevc_cabac_init(s, ctb_addr_ts, thread);
+ ret = ff_hevc_cabac_init(s, ctb_addr_ts);
if (ret < 0)
goto error;
hls_sao_param(s, x_ctb >> s->ps.sps->log2_ctb_size, y_ctb >> s->ps.sps->log2_ctb_size);
@@ -2631,19 +2624,13 @@
ff_alloc_entries(s->avctx, s->sh.num_entry_point_offsets + 1);
- for (i = 1; i < s->threads_number; i++) {
- if (s->sList[i] && s->HEVClcList[i])
- continue;
- av_freep(&s->sList[i]);
- av_freep(&s->HEVClcList[i]);
- s->sList[i] = av_malloc(sizeof(HEVCContext));
- s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext));
- if (!s->sList[i] || !s->HEVClcList[i]) {
- res = AVERROR(ENOMEM);
- goto error;
+ if (!s->sList[1]) {
+ for (i = 1; i < s->threads_number; i++) {
+ s->sList[i] = av_malloc(sizeof(HEVCContext));
+ memcpy(s->sList[i], s, sizeof(HEVCContext));
+ s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext));
+ s->sList[i]->HEVClc = s->HEVClcList[i];
}
- memcpy(s->sList[i], s, sizeof(HEVCContext));
- s->sList[i]->HEVClc = s->HEVClcList[i];
}
offset = (lc->gb.index >> 3);
@@ -3303,7 +3290,7 @@
AVPacket *avpkt)
{
int ret;
- buffer_size_t new_extradata_size;
+ int new_extradata_size;
uint8_t *new_extradata;
HEVCContext *s = avctx->priv_data;
@@ -3430,13 +3417,16 @@
av_freep(&s->sh.offset);
av_freep(&s->sh.size);
- if (s->HEVClcList && s->sList) {
- for (i = 1; i < s->threads_number; i++) {
+ for (i = 1; i < s->threads_number; i++) {
+ HEVCLocalContext *lc = s->HEVClcList[i];
+ if (lc) {
av_freep(&s->HEVClcList[i]);
av_freep(&s->sList[i]);
}
}
- av_freep(&s->HEVClc);
+ if (s->HEVClc == s->HEVClcList[0])
+ s->HEVClc = NULL;
+ av_freep(&s->HEVClcList[0]);
av_freep(&s->HEVClcList);
av_freep(&s->sList);
@@ -3632,6 +3622,7 @@
if (avctx->extradata_size > 0 && avctx->extradata) {
ret = hevc_decode_extradata(s, avctx->extradata, avctx->extradata_size, 1);
if (ret < 0) {
+ hevc_decode_free(avctx);
return ret;
}
}
@@ -3682,9 +3673,9 @@
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
- FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP,
+ FF_CODEC_CAP_ALLOCATE_PROGRESS,
.profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles),
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_HEVC_DXVA2_HWACCEL
HWACCEL_DXVA2(hevc),
#endif
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index 482638a..c0a138e 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -27,7 +27,6 @@
#include "libavutil/buffer.h"
#include "libavutil/md5.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "bswapdsp.h"
@@ -53,7 +52,6 @@
#define DEFAULT_INTRA_TC_OFFSET 2
#define HEVC_CONTEXTS 199
-#define HEVC_STAT_COEFFS 4
#define MRG_MAX_NUM_CANDS 5
@@ -425,7 +423,7 @@
typedef struct HEVCLocalContext {
uint8_t cabac_state[HEVC_CONTEXTS];
- uint8_t stat_coeff[HEVC_STAT_COEFFS];
+ uint8_t stat_coeff[4];
uint8_t first_qp_group;
@@ -481,7 +479,6 @@
int height;
uint8_t *cabac_state;
- uint8_t stat_coeff[HEVC_STAT_COEFFS];
/** 1 if the independent slice segment header was successfully parsed */
uint8_t slice_initialized;
@@ -596,7 +593,7 @@
int ff_hevc_slice_rpl(HEVCContext *s);
void ff_hevc_save_states(HEVCContext *s, int ctb_addr_ts);
-int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts, int thread);
+int ff_hevc_cabac_init(HEVCContext *s, int ctb_addr_ts);
int ff_hevc_sao_merge_flag_decode(HEVCContext *s);
int ff_hevc_sao_type_idx_decode(HEVCContext *s);
int ff_hevc_sao_band_position_decode(HEVCContext *s);
diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c
index fe272ac..957e40d 100644
--- a/libavcodec/hevcdsp.c
+++ b/libavcodec/hevcdsp.c
@@ -257,8 +257,6 @@
break;
}
- if (ARCH_AARCH64)
- ff_hevc_dsp_init_aarch64(hevcdsp, bit_depth);
if (ARCH_ARM)
ff_hevc_dsp_init_arm(hevcdsp, bit_depth);
if (ARCH_PPC)
diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h
index 0e013a8..0ae67cb 100644
--- a/libavcodec/hevcdsp.h
+++ b/libavcodec/hevcdsp.h
@@ -25,8 +25,6 @@
#ifndef AVCODEC_HEVCDSP_H
#define AVCODEC_HEVCDSP_H
-#include "libavutil/mem_internal.h"
-
#include "get_bits.h"
#define MAX_PB_SIZE 64
@@ -129,7 +127,6 @@
extern const int8_t ff_hevc_epel_filters[7][4];
extern const int8_t ff_hevc_qpel_filters[3][16];
-void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_arm(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth);
diff --git a/libavcodec/hq_hqa.h b/libavcodec/hq_hqa.h
index 08d79e7..608e2ca 100644
--- a/libavcodec/hq_hqa.h
+++ b/libavcodec/hq_hqa.h
@@ -23,8 +23,6 @@
#include <stdint.h>
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "bytestream.h"
#include "hq_hqadsp.h"
diff --git a/libavcodec/hqx.h b/libavcodec/hqx.h
index 3eddaaf..50d60f9 100644
--- a/libavcodec/hqx.h
+++ b/libavcodec/hqx.h
@@ -24,8 +24,7 @@
#include <stdint.h>
#include "libavutil/frame.h"
-#include "libavutil/mem_internal.h"
-
+#include "libavutil/mem.h"
#include "get_bits.h"
#include "hqxdsp.h"
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index 5691915..941a89d 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -214,7 +214,7 @@
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
IdcinContext *s = avctx->priv_data;
- buffer_size_t pal_size;
+ int pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
AVFrame *frame = data;
int ret;
diff --git a/libavcodec/ilbcdata.h b/libavcodec/ilbcdata.h
index b17e24d..8d145bc 100644
--- a/libavcodec/ilbcdata.h
+++ b/libavcodec/ilbcdata.h
@@ -60,6 +60,10 @@
32767, 29573, 26690, 24087, 21739, 19619, 17707, 15980, 14422, 13016, 11747
};
+static const int16_t LpcChirpWeightDenum[] = {
+ 32767, 13835, 5841, 2466, 1041, 440, 186, 78, 33, 14, 6
+};
+
static const int16_t cos_tbl[64] = {
32767, 32729, 32610, 32413, 32138, 31786, 31357, 30853,
30274, 29622, 28899, 28106, 27246, 26320, 25330, 24279,
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 51e7c1b..dbcb98a 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -38,9 +38,7 @@
#include "libavutil/ffmath.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
-
#include "avcodec.h"
#include "bswapdsp.h"
#include "get_bits.h"
@@ -180,7 +178,7 @@
for (int i = 0, offset = 0; i < 4 ; i++) {
for (int j = 0; j < 4; j++) {
huffman_vlc[i][j].table = &vlc_tables[offset];
- huffman_vlc[i][j].table_allocated = VLC_TABLES_SIZE - offset;
+ huffman_vlc[i][j].table_allocated = VLC_TABLES_SIZE - offset;;
ff_init_vlc_from_lengths(&huffman_vlc[i][j], IMC_VLC_BITS, imc_huffman_sizes[i],
imc_huffman_lens[i][j], 1,
imc_huffman_syms[i][j], 1, 1,
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index 8de1563..1fd636c 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -44,7 +44,6 @@
}
#endif
-#if FF_API_AVCODEC_PIX_FMT
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
enum AVPixelFormat src_pix_fmt,
int has_alpha)
@@ -61,10 +60,9 @@
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
{
- return av_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, loss_ptr);
+ return avcodec_find_best_pix_fmt_of_2(dst_pix_fmt1, dst_pix_fmt2, src_pix_fmt, has_alpha, loss_ptr);
}
-#endif
enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list,
enum AVPixelFormat src_pix_fmt,
int has_alpha, int *loss_ptr){
@@ -75,7 +73,7 @@
for (i=0; pix_fmt_list[i] != AV_PIX_FMT_NONE; i++) {
loss = loss_ptr ? *loss_ptr : 0;
- best = av_find_best_pix_fmt_of_2(best, pix_fmt_list[i], src_pix_fmt, has_alpha, &loss);
+ best = avcodec_find_best_pix_fmt_of_2(best, pix_fmt_list[i], src_pix_fmt, has_alpha, &loss);
}
if (loss_ptr)
diff --git a/libavcodec/imm4.c b/libavcodec/imm4.c
index 636130d..4cbafff 100644
--- a/libavcodec/imm4.c
+++ b/libavcodec/imm4.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
#include <string.h>
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
diff --git a/libavcodec/imx.c b/libavcodec/imx.c
deleted file mode 100644
index 0d6c99e..0000000
--- a/libavcodec/imx.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-#include "libavutil/common.h"
-#include "avcodec.h"
-#include "bytestream.h"
-#include "internal.h"
-
-typedef struct SimbiosisIMXContext {
- AVFrame *frame;
- uint32_t pal[256];
- uint8_t history[32768];
- int pos;
-} SimbiosisIMXContext;
-
-static av_cold int imx_decode_init(AVCodecContext *avctx)
-{
- SimbiosisIMXContext *imx = avctx->priv_data;
-
- avctx->pix_fmt = AV_PIX_FMT_PAL8;
- avctx->width = 320;
- avctx->height = 160;
-
- imx->frame = av_frame_alloc();
- if (!imx->frame)
- return AVERROR(ENOMEM);
-
- return 0;
-}
-
-static int imx_decode_frame(AVCodecContext *avctx, void *data,
- int *got_frame, AVPacket *avpkt)
-{
- SimbiosisIMXContext *imx = avctx->priv_data;
- int ret, x, y;
- buffer_size_t pal_size;
- const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
- AVFrame *frame = imx->frame;
- GetByteContext gb;
-
- if ((ret = ff_reget_buffer(avctx, frame, 0)) < 0)
- return ret;
-
- if (pal && pal_size == AVPALETTE_SIZE) {
- memcpy(imx->pal, pal, pal_size);
- frame->palette_has_changed = 1;
- frame->key_frame = 1;
- } else {
- frame->key_frame = 0;
- frame->palette_has_changed = 0;
- }
-
- bytestream2_init(&gb, avpkt->data, avpkt->size);
-
- memcpy(frame->data[1], imx->pal, AVPALETTE_SIZE);
-
- x = 0, y = 0;
- while (bytestream2_get_bytes_left(&gb) > 0 &&
- x < 320 && y < 160) {
- int b = bytestream2_get_byte(&gb);
- int len = b & 0x3f;
- int op = b >> 6;
- int fill;
-
- switch (op) {
- case 3:
- len = len * 64 + bytestream2_get_byte(&gb);
- case 0:
- while (len > 0) {
- x++;
- len--;
- if (x >= 320) {
- x = 0;
- y++;
- }
- if (y >= 160)
- break;
- }
-
- frame->key_frame = 0;
- break;
- case 1:
- if (len == 0) {
- int offset = bytestream2_get_le16(&gb);
-
- if (offset < 0 || offset >= 32768)
- return AVERROR_INVALIDDATA;
-
- len = bytestream2_get_byte(&gb);
- while (len > 0 && offset < 32768) {
- frame->data[0][x + y * frame->linesize[0]] = imx->history[offset++];
- x++;
- len--;
- if (x >= 320) {
- x = 0;
- y++;
- }
- if (y >= 160)
- break;
- }
-
- frame->key_frame = 0;
- } else {
- while (len > 0) {
- fill = bytestream2_get_byte(&gb);
- frame->data[0][x + y * frame->linesize[0]] = fill;
- if (imx->pos < 32768)
- imx->history[imx->pos++] = fill;
- x++;
- len--;
- if (x >= 320) {
- x = 0;
- y++;
- }
- if (y >= 160)
- break;
- }
- }
- break;
- case 2:
- fill = bytestream2_get_byte(&gb);
-
- while (len > 0) {
- frame->data[0][x + y * frame->linesize[0]] = fill;
- x++;
- len--;
- if (x >= 320) {
- x = 0;
- y++;
- }
- if (y >= 160)
- break;
- }
- break;
- }
- }
-
- frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
-
- if ((ret = av_frame_ref(data, frame)) < 0)
- return ret;
-
- *got_frame = 1;
-
- return avpkt->size;
-}
-
-static void imx_decode_flush(AVCodecContext *avctx)
-{
- SimbiosisIMXContext *imx = avctx->priv_data;
-
- av_frame_unref(imx->frame);
- imx->pos = 0;
- memset(imx->pal, 0, sizeof(imx->pal));
- memset(imx->history, 0, sizeof(imx->history));
-}
-
-static int imx_decode_close(AVCodecContext *avctx)
-{
- SimbiosisIMXContext *imx = avctx->priv_data;
-
- av_frame_free(&imx->frame);
-
- return 0;
-}
-
-AVCodec ff_simbiosis_imx_decoder = {
- .name = "simbiosis_imx",
- .long_name = NULL_IF_CONFIG_SMALL("Simbiosis Interactive IMX Video"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_SIMBIOSIS_IMX,
- .priv_data_size = sizeof(SimbiosisIMXContext),
- .init = imx_decode_init,
- .decode = imx_decode_frame,
- .close = imx_decode_close,
- .flush = imx_decode_flush,
- .capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
- FF_CODEC_CAP_INIT_CLEANUP,
-};
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 5257d98..75113a7 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -171,7 +171,7 @@
if (luma_width < 16 || luma_width > 640 ||
luma_height < 16 || luma_height > 480 ||
- luma_width & 1 || luma_height & 1) {
+ luma_width & 3 || luma_height & 3) {
av_log(avctx, AV_LOG_ERROR, "Invalid picture dimensions: %d x %d!\n",
luma_width, luma_height);
return AVERROR_INVALIDDATA;
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 400ea50..141f3fb 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -28,7 +28,6 @@
#include "libavutil/buffer.h"
#include "libavutil/channel_layout.h"
-#include "libavutil/fifo.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
@@ -132,9 +131,7 @@
*/
int last_audio_frame;
-#if FF_API_OLD_ENCDEC
AVFrame *to_free;
-#endif
AVBufferRef *pool;
@@ -148,7 +145,8 @@
* for decoding.
*/
AVPacket *last_pkt_props;
- AVFifoBuffer *pkt_props;
+ AVPacketList *pkt_props;
+ AVPacketList *pkt_props_tail;
/**
* temporary buffer used for encoders to store their bitstream
@@ -181,8 +179,6 @@
AVPacket *buffer_pkt;
AVFrame *buffer_frame;
int draining_done;
-
-#if FF_API_OLD_ENCDEC
int compat_decode_warned;
/* this variable is set by the decoder internals to signal to the old
* API compat wrappers the amount of data consumed from the last packet */
@@ -192,7 +188,6 @@
size_t compat_decode_partial_size;
AVFrame *compat_decode_frame;
AVPacket *compat_encode_packet;
-#endif
int showed_multi_packet_warning;
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 4d16fdf..58400b6 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1317,7 +1317,7 @@
return ret;
if (!s->is_16bpp) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
frame->palette_has_changed = 1;
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index d5fff54..fe77e6d 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -33,7 +33,6 @@
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "mpegvideo.h"
#include "h263.h"
@@ -51,6 +50,7 @@
// reading vlc values. Changing these may improve speed and data cache needs
// be aware though that decreasing them may need the number of stages that is
// passed to get_vlc* to be increased.
+#define MV_VLC_BITS 9
#define H263_MBTYPE_B_VLC_BITS 6
#define CBPC_B_VLC_BITS 3
@@ -97,7 +97,7 @@
VLC ff_h263_intra_MCBPC_vlc;
VLC ff_h263_inter_MCBPC_vlc;
VLC ff_h263_cbpy_vlc;
-VLC ff_h263_mv_vlc;
+static VLC mv_vlc;
static VLC h263_mbtype_b_vlc;
static VLC cbpc_b_vlc;
@@ -118,12 +118,13 @@
INIT_VLC_STATIC(&ff_h263_cbpy_vlc, CBPY_VLC_BITS, 16,
&ff_h263_cbpy_tab[0][1], 2, 1,
&ff_h263_cbpy_tab[0][0], 2, 1, 64);
- INIT_VLC_STATIC(&ff_h263_mv_vlc, H263_MV_VLC_BITS, 33,
+ INIT_VLC_STATIC(&mv_vlc, MV_VLC_BITS, 33,
&ff_mvtab[0][1], 2, 1,
&ff_mvtab[0][0], 2, 1, 538);
- ff_h263_init_rl_inter();
+ ff_rl_init(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
+ ff_rl_init(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
INIT_VLC_RL(ff_h263_rl_inter, 554);
- INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554);
+ INIT_VLC_RL(ff_rl_intra_aic, 554);
INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15,
&ff_h263_mbtype_b_tab[0][1], 2, 1,
&ff_h263_mbtype_b_tab[0][0], 2, 1, 80);
@@ -268,7 +269,7 @@
int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code)
{
int code, val, sign, shift;
- code = get_vlc2(&s->gb, ff_h263_mv_vlc.table, H263_MV_VLC_BITS, 2);
+ code = get_vlc2(&s->gb, mv_vlc.table, MV_VLC_BITS, 2);
if (code == 0)
return pred;
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 43260e6..b1b7821 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -713,7 +713,8 @@
}
}
-static av_cold void init_uni_h263_rl_tab(const RLTable *rl, uint8_t *len_tab)
+static av_cold void init_uni_h263_rl_tab(RLTable *rl, uint32_t *bits_tab,
+ uint8_t *len_tab)
{
int slevel, run, last;
@@ -737,9 +738,10 @@
len= rl->table_vlc[code][1];
bits=bits*2+sign; len++;
- if (code != rl->n && len < len_tab[index])
+ if(code!=rl->n && len < len_tab[index]){
+ if(bits_tab) bits_tab[index]= bits;
len_tab [index]= len;
-
+ }
/* ESC */
bits= rl->table_vlc[rl->n][0];
len = rl->table_vlc[rl->n][1];
@@ -747,8 +749,10 @@
bits=bits*64+run; len+=6;
bits=bits*256+(level&0xff); len+=8;
- if (len < len_tab[index])
+ if(len < len_tab[index]){
+ if(bits_tab) bits_tab[index]= bits;
len_tab [index]= len;
+ }
}
}
}
@@ -759,14 +763,13 @@
static int done = 0;
if (!done) {
- static uint8_t rl_intra_table[2][2 * MAX_RUN + MAX_LEVEL + 3];
done = 1;
- ff_rl_init(&ff_rl_intra_aic, rl_intra_table);
- ff_h263_init_rl_inter();
+ ff_rl_init(&ff_h263_rl_inter, ff_h263_static_rl_table_store[0]);
+ ff_rl_init(&ff_rl_intra_aic, ff_h263_static_rl_table_store[1]);
- init_uni_h263_rl_tab(&ff_rl_intra_aic, uni_h263_intra_aic_rl_len);
- init_uni_h263_rl_tab(&ff_h263_rl_inter, uni_h263_inter_rl_len);
+ init_uni_h263_rl_tab(&ff_rl_intra_aic, NULL, uni_h263_intra_aic_rl_len);
+ init_uni_h263_rl_tab(&ff_h263_rl_inter , NULL, uni_h263_inter_rl_len);
init_mv_penalty_and_fcode(s);
}
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 63edbcd..624542c 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -2342,12 +2342,8 @@
return 0;
}
atom_size = bytestream2_get_be32u(&s->g);
- if (atom_size < 16 || (int64_t)bytestream2_tell(&s->g) + atom_size - 16 > INT_MAX)
- return AVERROR_INVALIDDATA;
atom_end = bytestream2_tell(&s->g) + atom_size - 16;
} else {
- if (atom_size < 8 || (int64_t)bytestream2_tell(&s->g) + atom_size - 8 > INT_MAX)
- return AVERROR_INVALIDDATA;
atom_end = bytestream2_tell(&s->g) + atom_size - 8;
}
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index 69980ea..ef97bdb 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -149,7 +149,7 @@
{
int k, ret;
- for (k = 0; ((unsigned)state->N[Q] << k) < state->A[Q]; k++)
+ for (k = 0; (state->N[Q] << k) < state->A[Q]; k++)
;
#ifdef JLS_BROKEN
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index 2bb6b14..10a3bd0 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -26,7 +26,6 @@
*/
#include "avcodec.h"
-#include "bytestream.h"
#include "get_bits.h"
#include "put_bits.h"
#include "golomb.h"
@@ -42,18 +41,6 @@
int pred;
} JPEGLSContext;
-static inline void put_marker_byteu(PutByteContext *pb, enum JpegMarker code)
-{
- bytestream2_put_byteu(pb, 0xff);
- bytestream2_put_byteu(pb, code);
-}
-
-static inline void put_marker_byte(PutByteContext *pb, enum JpegMarker code)
-{
- bytestream2_put_byte(pb, 0xff);
- bytestream2_put_byte(pb, code);
-}
-
/**
* Encode error from regular symbol
*/
@@ -141,19 +128,21 @@
* Encode one line of image
*/
static inline void ls_encode_line(JLSState *state, PutBitContext *pb,
- void *tmp, const void *in, int last2, int w,
+ void *last, void *cur, int last2, int w,
int stride, int comp, int bits)
{
int x = 0;
- int Ra = R(tmp, 0), Rb, Rc = last2, Rd;
+ int Ra, Rb, Rc, Rd;
int D0, D1, D2;
while (x < w) {
int err, pred, sign;
/* compute gradients */
- Rb = R(tmp, x);
- Rd = (x >= w - stride) ? R(tmp, x) : R(tmp, x + stride);
+ Ra = x ? R(cur, x - stride) : R(last, x);
+ Rb = R(last, x);
+ Rc = x ? R(last, x - stride) : last2;
+ Rd = (x >= w - stride) ? R(last, x) : R(last, x + stride);
D0 = Rd - Rb;
D1 = Rb - Rc;
D2 = Rc - Ra;
@@ -166,18 +155,18 @@
run = 0;
RUNval = Ra;
- while (x < w && (FFABS(R(in, x) - RUNval) <= state->near)) {
+ while (x < w && (FFABS(R(cur, x) - RUNval) <= state->near)) {
run++;
- W(tmp, x, Ra);
+ W(cur, x, Ra);
x += stride;
}
ls_encode_run(state, pb, run, comp, x < w);
if (x >= w)
return;
- Rb = R(tmp, x);
+ Rb = R(last, x);
RItype = FFABS(Ra - Rb) <= state->near;
pred = RItype ? Ra : Rb;
- err = R(in, x) - pred;
+ err = R(cur, x) - pred;
if (!RItype && Ra > Rb)
err = -err;
@@ -192,10 +181,8 @@
Ra = av_clip(pred + err * state->twonear, 0, state->maxval);
else
Ra = av_clip(pred - err * state->twonear, 0, state->maxval);
- } else
- Ra = R(in, x);
- W(tmp, x, Ra);
-
+ W(cur, x, Ra);
+ }
if (err < 0)
err += state->range;
if (err >= state->range + 1 >> 1)
@@ -218,11 +205,11 @@
context = -context;
sign = 1;
pred = av_clip(pred - state->C[context], 0, state->maxval);
- err = pred - R(in, x);
+ err = pred - R(cur, x);
} else {
sign = 0;
pred = av_clip(pred + state->C[context], 0, state->maxval);
- err = R(in, x) - pred;
+ err = R(cur, x) - pred;
}
if (state->near) {
@@ -234,18 +221,16 @@
Ra = av_clip(pred + err * state->twonear, 0, state->maxval);
else
Ra = av_clip(pred - err * state->twonear, 0, state->maxval);
- } else
- Ra = R(in, x);
- W(tmp, x, Ra);
+ W(cur, x, Ra);
+ }
ls_encode_regular(state, pb, context, err);
}
- Rc = Rb;
x += stride;
}
}
-static void ls_store_lse(JLSState *state, PutByteContext *pb)
+static void ls_store_lse(JLSState *state, PutBitContext *pb)
{
/* Test if we have default params and don't need to store LSE */
JLSState state2 = { 0 };
@@ -258,14 +243,14 @@
state->reset == state2.reset)
return;
/* store LSE type 1 */
- put_marker_byteu(pb, LSE);
- bytestream2_put_be16u(pb, 13);
- bytestream2_put_byteu(pb, 1);
- bytestream2_put_be16u(pb, state->maxval);
- bytestream2_put_be16u(pb, state->T1);
- bytestream2_put_be16u(pb, state->T2);
- bytestream2_put_be16u(pb, state->T3);
- bytestream2_put_be16u(pb, state->reset);
+ put_marker(pb, LSE);
+ put_bits(pb, 16, 13);
+ put_bits(pb, 8, 1);
+ put_bits(pb, 16, state->maxval);
+ put_bits(pb, 16, state->T1);
+ put_bits(pb, 16, state->T2);
+ put_bits(pb, 16, state->T3);
+ put_bits(pb, 16, state->reset);
}
static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
@@ -273,12 +258,13 @@
{
JPEGLSContext *ctx = avctx->priv_data;
const AVFrame *const p = pict;
- PutByteContext pb;
- PutBitContext pb2;
+ PutBitContext pb, pb2;
GetBitContext gb;
- const uint8_t *in;
+ uint8_t *buf2 = NULL;
+ uint8_t *zero = NULL;
+ uint8_t *cur = NULL;
uint8_t *last = NULL;
- JLSState state = { 0 };
+ JLSState *state = NULL;
int i, size, ret;
int comps;
@@ -299,65 +285,72 @@
AV_INPUT_BUFFER_MIN_SIZE, 0)) < 0)
return ret;
- last = av_malloc((unsigned)pkt->size + FFABS(p->linesize[0]));
- if (!last)
- return AVERROR(ENOMEM);
- memset(last, 0, FFABS(p->linesize[0]));
+ buf2 = av_malloc(pkt->size);
+ if (!buf2)
+ goto memfail;
- bytestream2_init_writer(&pb, pkt->data, pkt->size);
- init_put_bits(&pb2, last + FFABS(p->linesize[0]), pkt->size);
+ init_put_bits(&pb, pkt->data, pkt->size);
+ init_put_bits(&pb2, buf2, pkt->size);
/* write our own JPEG header, can't use mjpeg_picture_header */
- put_marker_byteu(&pb, SOI);
- put_marker_byteu(&pb, SOF48);
- bytestream2_put_be16u(&pb, 8 + comps * 3); // header size depends on components
- bytestream2_put_byteu(&pb, (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8); // bpp
- bytestream2_put_be16u(&pb, avctx->height);
- bytestream2_put_be16u(&pb, avctx->width);
- bytestream2_put_byteu(&pb, comps); // components
+ put_marker(&pb, SOI);
+ put_marker(&pb, SOF48);
+ put_bits(&pb, 16, 8 + comps * 3); // header size depends on components
+ put_bits(&pb, 8, (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8); // bpp
+ put_bits(&pb, 16, avctx->height);
+ put_bits(&pb, 16, avctx->width);
+ put_bits(&pb, 8, comps); // components
for (i = 1; i <= comps; i++) {
- bytestream2_put_byteu(&pb, i); // component ID
- bytestream2_put_byteu(&pb, 0x11); // subsampling: none
- bytestream2_put_byteu(&pb, 0); // Tiq, used by JPEG-LS ext
+ put_bits(&pb, 8, i); // component ID
+ put_bits(&pb, 8, 0x11); // subsampling: none
+ put_bits(&pb, 8, 0); // Tiq, used by JPEG-LS ext
}
- put_marker_byteu(&pb, SOS);
- bytestream2_put_be16u(&pb, 6 + comps * 2);
- bytestream2_put_byteu(&pb, comps);
+ put_marker(&pb, SOS);
+ put_bits(&pb, 16, 6 + comps * 2);
+ put_bits(&pb, 8, comps);
for (i = 1; i <= comps; i++) {
- bytestream2_put_byteu(&pb, i); // component ID
- bytestream2_put_byteu(&pb, 0); // mapping index: none
+ put_bits(&pb, 8, i); // component ID
+ put_bits(&pb, 8, 0); // mapping index: none
}
- bytestream2_put_byteu(&pb, ctx->pred);
- bytestream2_put_byteu(&pb, (comps > 1) ? 1 : 0); // interleaving: 0 - plane, 1 - line
- bytestream2_put_byteu(&pb, 0); // point transform: none
+ put_bits(&pb, 8, ctx->pred);
+ put_bits(&pb, 8, (comps > 1) ? 1 : 0); // interleaving: 0 - plane, 1 - line
+ put_bits(&pb, 8, 0); // point transform: none
+
+ state = av_mallocz(sizeof(JLSState));
+ if (!state)
+ goto memfail;
/* initialize JPEG-LS state from JPEG parameters */
- state.near = ctx->pred;
- state.bpp = (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8;
- ff_jpegls_reset_coding_parameters(&state, 0);
- ff_jpegls_init_state(&state);
+ state->near = ctx->pred;
+ state->bpp = (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8;
+ ff_jpegls_reset_coding_parameters(state, 0);
+ ff_jpegls_init_state(state);
- ls_store_lse(&state, &pb);
+ ls_store_lse(state, &pb);
- in = p->data[0];
+ zero = last = av_mallocz(FFABS(p->linesize[0]));
+ if (!zero)
+ goto memfail;
+
+ cur = p->data[0];
if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) {
int t = 0;
for (i = 0; i < avctx->height; i++) {
- int last0 = last[0];
- ls_encode_line(&state, &pb2, last, in, t, avctx->width, 1, 0, 8);
- t = last0;
- in += p->linesize[0];
+ ls_encode_line(state, &pb2, last, cur, t, avctx->width, 1, 0, 8);
+ t = last[0];
+ last = cur;
+ cur += p->linesize[0];
}
} else if (avctx->pix_fmt == AV_PIX_FMT_GRAY16) {
int t = 0;
for (i = 0; i < avctx->height; i++) {
- int last0 = *((uint16_t *)last);
- ls_encode_line(&state, &pb2, last, in, t, avctx->width, 1, 0, 16);
- t = last0;
- in += p->linesize[0];
+ ls_encode_line(state, &pb2, last, cur, t, avctx->width, 1, 0, 16);
+ t = *((uint16_t *)last);
+ last = cur;
+ cur += p->linesize[0];
}
} else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) {
int j, width;
@@ -366,12 +359,12 @@
width = avctx->width * 3;
for (i = 0; i < avctx->height; i++) {
for (j = 0; j < 3; j++) {
- int last0 = last[j];
- ls_encode_line(&state, &pb2, last + j, in + j, Rc[j],
+ ls_encode_line(state, &pb2, last + j, cur + j, Rc[j],
width, 3, j, 8);
- Rc[j] = last0;
+ Rc[j] = last[j];
}
- in += p->linesize[0];
+ last = cur;
+ cur += p->linesize[0];
}
} else if (avctx->pix_fmt == AV_PIX_FMT_BGR24) {
int j, width;
@@ -380,15 +373,18 @@
width = avctx->width * 3;
for (i = 0; i < avctx->height; i++) {
for (j = 2; j >= 0; j--) {
- int last0 = last[j];
- ls_encode_line(&state, &pb2, last + j, in + j, Rc[j],
+ ls_encode_line(state, &pb2, last + j, cur + j, Rc[j],
width, 3, j, 8);
- Rc[j] = last0;
+ Rc[j] = last[j];
}
- in += p->linesize[0];
+ last = cur;
+ cur += p->linesize[0];
}
}
+ av_freep(&zero);
+ av_freep(&state);
+
/* the specification says that after doing 0xff escaping unused bits in
* the last byte must be set to 0, so just append 7 "optional" zero bits
* to avoid special-casing. */
@@ -396,28 +392,36 @@
size = put_bits_count(&pb2);
flush_put_bits(&pb2);
/* do escape coding */
- init_get_bits(&gb, pb2.buf, size);
+ init_get_bits(&gb, buf2, size);
size -= 7;
while (get_bits_count(&gb) < size) {
int v;
v = get_bits(&gb, 8);
- bytestream2_put_byte(&pb, v);
+ put_bits(&pb, 8, v);
if (v == 0xFF) {
v = get_bits(&gb, 7);
- bytestream2_put_byte(&pb, v);
+ put_bits(&pb, 8, v);
}
}
- av_freep(&last);
+ align_put_bits(&pb);
+ av_freep(&buf2);
/* End of image */
- put_marker_byte(&pb, EOI);
+ put_marker(&pb, EOI);
+ flush_put_bits(&pb);
emms_c();
- pkt->size = bytestream2_tell_p(&pb);
+ pkt->size = put_bits_count(&pb) >> 3;
pkt->flags |= AV_PKT_FLAG_KEY;
*got_packet = 1;
return 0;
+
+memfail:
+ av_freep(&buf2);
+ av_freep(&state);
+ av_freep(&zero);
+ return AVERROR(ENOMEM);
}
static av_cold int encode_init_ls(AVCodecContext *ctx)
diff --git a/libavcodec/jpegtables.c b/libavcodec/jpegtables.c
index ef3f8de..e44bc7a 100644
--- a/libavcodec/jpegtables.c
+++ b/libavcodec/jpegtables.c
@@ -122,3 +122,24 @@
0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8,
0xf9, 0xfa
};
+
+/* isn't this function nicer than the one in the libjpeg ? */
+void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
+ const uint8_t *bits_table,
+ const uint8_t *val_table)
+{
+ int i, j, k,nb, code, sym;
+
+ k = 0;
+ code = 0;
+ for(i=1;i<=16;i++) {
+ nb = bits_table[i];
+ for(j=0;j<nb;j++) {
+ sym = val_table[k++];
+ huff_size[sym] = i;
+ huff_code[sym] = code;
+ code++;
+ }
+ code <<= 1;
+ }
+}
diff --git a/libavcodec/jpegtables.h b/libavcodec/jpegtables.h
index 0907280..aa38df4 100644
--- a/libavcodec/jpegtables.h
+++ b/libavcodec/jpegtables.h
@@ -36,4 +36,8 @@
extern av_export_avcodec const uint8_t avpriv_mjpeg_bits_ac_chrominance[];
extern av_export_avcodec const uint8_t avpriv_mjpeg_val_ac_chrominance[];
+void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
+ const uint8_t *bits_table,
+ const uint8_t *val_table);
+
#endif /* AVCODEC_JPEGTABLES_H */
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 0d96139..ffe6a14 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -268,7 +268,7 @@
int i, ret;
int header;
int blocksize;
- buffer_size_t pal_size;
+ int pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
bytestream2_init(&ctx->g, avpkt->data, avpkt->size);
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 9a26b5f..342d088 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -124,7 +124,6 @@
int enable_diff_wtd_comp;
int enable_dist_wtd_comp;
int enable_dual_filter;
- AVDictionary *aom_params;
} AOMContext;
static const char *const ctlidstr[] = {
@@ -875,20 +874,6 @@
codecctl_int(avctx, AV1E_SET_ENABLE_INTRABC, ctx->enable_intrabc);
#endif
-#if AOM_ENCODER_ABI_VERSION >= 23
- {
- AVDictionaryEntry *en = NULL;
-
- while ((en = av_dict_get(ctx->aom_params, "", en, AV_DICT_IGNORE_SUFFIX))) {
- int ret = aom_codec_set_option(&ctx->encoder, en->key, en->value);
- if (ret != AOM_CODEC_OK) {
- log_encoder_error(avctx, en->key);
- return AVERROR_EXTERNAL;
- }
- }
- }
-#endif
-
// provide dummy value to initialize wrapper, values will be updated each _encode()
aom_img_wrap(&ctx->rawimg, img_fmt, avctx->width, avctx->height, 1,
(unsigned char*)1);
@@ -1314,9 +1299,6 @@
{ "enable-masked-comp", "Enable masked compound", OFFSET(enable_masked_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
{ "enable-interintra-comp", "Enable interintra compound", OFFSET(enable_interintra_comp), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
{ "enable-smooth-interintra", "Enable smooth interintra mode", OFFSET(enable_smooth_interintra), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
-#if AOM_ENCODER_ABI_VERSION >= 23
- { "aom-params", "Set libaom options using a :-separated list of key=value pairs", OFFSET(aom_params), AV_OPT_TYPE_DICT, { 0 }, 0, 0, VE },
-#endif
{ NULL },
};
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 383e455..de57bce 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -313,7 +313,7 @@
}
// match timestamps and packet size
- frame->pts = p->m.timestamp;
+ frame->pts = frame->best_effort_timestamp = p->m.timestamp;
#if FF_API_PKT_PTS
FF_DISABLE_DEPRECATION_WARNINGS
frame->pkt_pts = p->m.timestamp;
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 9c82589..08f951a 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -27,10 +27,6 @@
#include "avcodec.h"
#include "internal.h"
-#ifndef LIBILBC_VERSION_MAJOR
-#define LIBILBC_VERSION_MAJOR 2
-#endif
-
static int get_mode(AVCodecContext *avctx)
{
if (avctx->block_align == 38)
@@ -45,11 +41,7 @@
typedef struct ILBCDecContext {
const AVClass *class;
-#if LIBILBC_VERSION_MAJOR < 3
iLBC_Dec_Inst_t decoder;
-#else
- IlbcDecoder decoder;
-#endif
int enhance;
} ILBCDecContext;
@@ -95,12 +87,7 @@
int ret;
if (s->decoder.no_of_bytes > buf_size) {
-#if LIBILBC_VERSION_MAJOR < 3
av_log(avctx, AV_LOG_ERROR, "iLBC frame too short (%u, should be %u)\n",
-#else
- av_log(avctx, AV_LOG_ERROR, "iLBC frame too short (%u, should be "
- "%"SIZE_SPECIFIER")\n",
-#endif
buf_size, s->decoder.no_of_bytes);
return AVERROR_INVALIDDATA;
}
@@ -130,11 +117,7 @@
typedef struct ILBCEncContext {
const AVClass *class;
-#if LIBILBC_VERSION_MAJOR < 3
iLBC_Enc_Inst_t encoder;
-#else
- IlbcEncoder encoder;
-#endif
int mode;
} ILBCEncContext;
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c
index d94cf99..9032547 100644
--- a/libavcodec/libkvazaar.c
+++ b/libavcodec/libkvazaar.c
@@ -95,9 +95,6 @@
cfg->target_bitrate = avctx->bit_rate;
cfg->vui.sar_width = avctx->sample_aspect_ratio.num;
cfg->vui.sar_height = avctx->sample_aspect_ratio.den;
- if (avctx->bit_rate) {
- cfg->rc_algorithm = KVZ_LAMBDA;
- }
if (ctx->kvz_params) {
AVDictionary *dict = NULL;
diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index 70d17f8..bf2d04b 100644
--- a/libavcodec/libopusenc.c
+++ b/libavcodec/libopusenc.c
@@ -94,7 +94,7 @@
bytestream_put_buffer(&p, "OpusHead", 8);
bytestream_put_byte(&p, 1); /* Version */
bytestream_put_byte(&p, channels);
- bytestream_put_le16(&p, avctx->initial_padding * 48000 / avctx->sample_rate); /* Lookahead samples at 48kHz */
+ bytestream_put_le16(&p, avctx->initial_padding); /* Lookahead samples at 48kHz */
bytestream_put_le32(&p, avctx->sample_rate); /* Original sample rate */
bytestream_put_le16(&p, 0); /* Gain of 0dB is recommended. */
diff --git a/libavcodec/librav1e.c b/libavcodec/librav1e.c
index 2d5acc7..e9b82a7 100644
--- a/libavcodec/librav1e.c
+++ b/libavcodec/librav1e.c
@@ -443,32 +443,23 @@
return ret;
if (frame->buf[0]) {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format);
- int64_t *pts = av_malloc(sizeof(int64_t));
- if (!pts) {
- av_log(avctx, AV_LOG_ERROR, "Could not allocate PTS buffer.\n");
- return AVERROR(ENOMEM);
- }
- *pts = frame->pts;
-
- rframe = rav1e_frame_new(ctx->ctx);
- if (!rframe) {
- av_log(avctx, AV_LOG_ERROR, "Could not allocate new rav1e frame.\n");
- av_frame_unref(frame);
- av_freep(&pts);
- return AVERROR(ENOMEM);
- }
-
- for (int i = 0; i < desc->nb_components; i++) {
- int shift = i ? desc->log2_chroma_h : 0;
- int bytes = desc->comp[0].depth == 8 ? 1 : 2;
- rav1e_frame_fill_plane(rframe, i, frame->data[i],
- (frame->height >> shift) * frame->linesize[i],
- frame->linesize[i], bytes);
- }
+ rframe = rav1e_frame_new(ctx->ctx);
+ if (!rframe) {
+ av_log(avctx, AV_LOG_ERROR, "Could not allocate new rav1e frame.\n");
av_frame_unref(frame);
- rav1e_frame_set_opaque(rframe, pts, av_free);
+ return AVERROR(ENOMEM);
+ }
+
+ for (int i = 0; i < desc->nb_components; i++) {
+ int shift = i ? desc->log2_chroma_h : 0;
+ int bytes = desc->comp[0].depth == 8 ? 1 : 2;
+ rav1e_frame_fill_plane(rframe, i, frame->data[i],
+ (frame->height >> shift) * frame->linesize[i],
+ frame->linesize[i], bytes);
+ }
+ av_frame_unref(frame);
}
}
@@ -477,7 +468,7 @@
if (ret == RA_ENCODER_STATUS_ENOUGH_DATA) {
ctx->rframe = rframe; /* Queue is full. Store the RaFrame to retry next call */
} else {
- rav1e_frame_unref(rframe); /* No need to unref if flushing. */
+ rav1e_frame_unref(rframe); /* No need to unref if flushing. */
ctx->rframe = NULL;
}
@@ -544,8 +535,7 @@
if (rpkt->frame_type == RA_FRAME_TYPE_KEY)
pkt->flags |= AV_PKT_FLAG_KEY;
- pkt->pts = pkt->dts = *((int64_t *) rpkt->opaque);
- av_free(rpkt->opaque);
+ pkt->pts = pkt->dts = rpkt->input_frameno * avctx->ticks_per_frame;
rav1e_packet_unref(rpkt);
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index bf94764..f78f872 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -70,17 +70,6 @@
.version = LIBAVUTIL_VERSION_INT,
};
-static const uint8_t vorbis_encoding_channel_layout_offsets[8][8] = {
- { 0 },
- { 0, 1 },
- { 0, 2, 1 },
- { 0, 1, 2, 3 },
- { 0, 2, 1, 3, 4 },
- { 0, 2, 1, 4, 5, 3 },
- { 0, 2, 1, 5, 6, 4, 3 },
- { 0, 2, 1, 6, 7, 4, 5, 3 },
-};
-
static int vorbis_error_to_averror(int ov_err)
{
switch (ov_err) {
@@ -298,7 +287,7 @@
buffer = vorbis_analysis_buffer(&s->vd, samples);
for (c = 0; c < channels; c++) {
int co = (channels > 8) ? c :
- vorbis_encoding_channel_layout_offsets[channels - 1][c];
+ ff_vorbis_encoding_channel_layout_offsets[channels - 1][c];
memcpy(buffer[c], frame->extended_data[co],
samples * sizeof(*buffer[c]));
}
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 8698232..3e32044 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -221,7 +221,7 @@
struct vpx_image *img, *img_alpha;
int ret;
uint8_t *side_data = NULL;
- buffer_size_t side_data_size;
+ int side_data_size;
ret = decode_frame(avctx, &ctx->decoder, avpkt->data, avpkt->size);
if (ret)
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 02df4fe..a7c76eb 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -125,9 +125,6 @@
* encounter a frame with ROI side data.
*/
int roi_warned;
-#if CONFIG_LIBVPX_VP9_ENCODER && defined(VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT)
- vpx_svc_ref_frame_config_t ref_frame_config;
-#endif
} VPxContext;
/** String mappings for enum vp8e_enc_control_id */
@@ -155,7 +152,6 @@
[VP9E_SET_SVC_LAYER_ID] = "VP9E_SET_SVC_LAYER_ID",
#if VPX_ENCODER_ABI_VERSION >= 12
[VP9E_SET_SVC_PARAMETERS] = "VP9E_SET_SVC_PARAMETERS",
- [VP9E_SET_SVC_REF_FRAME_CONFIG] = "VP9E_SET_SVC_REF_FRAME_CONFIG",
#endif
[VP9E_SET_SVC] = "VP9E_SET_SVC",
#if VPX_ENCODER_ABI_VERSION >= 11
@@ -398,20 +394,6 @@
}
}
-#if CONFIG_LIBVPX_VP9_ENCODER && defined(VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT)
-static void vp8_ts_parse_int64_array(int64_t *dest, char *value, size_t value_len, int max_entries)
-{
- int dest_idx = 0;
- char *saveptr = NULL;
- char *token = av_strtok(value, ",", &saveptr);
-
- while (token && dest_idx < max_entries) {
- dest[dest_idx++] = strtoull(token, NULL, 10);
- token = av_strtok(NULL, ",", &saveptr);
- }
-}
-#endif
-
static void set_temporal_layer_pattern(int layering_mode, vpx_codec_enc_cfg_t *cfg,
int *layer_flags, int *flag_periodicity)
{
@@ -559,86 +541,6 @@
return 0;
}
-#if CONFIG_LIBVPX_VP9_ENCODER && defined(VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT)
-static int vpx_ref_frame_config_set_value(vpx_svc_ref_frame_config_t *ref_frame_config,
- int ss_number_layers, char *key, char *value)
-{
- size_t value_len = strlen(value);
-
- if (!value_len)
- return AVERROR(EINVAL);
-
- if (!strcmp(key, "rfc_update_buffer_slot")) {
- vp8_ts_parse_int_array(ref_frame_config->update_buffer_slot, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_update_last")) {
- vp8_ts_parse_int_array(ref_frame_config->update_last, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_update_golden")) {
- vp8_ts_parse_int_array(ref_frame_config->update_golden, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_update_alt_ref")) {
- vp8_ts_parse_int_array(ref_frame_config->update_alt_ref, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_lst_fb_idx")) {
- vp8_ts_parse_int_array(ref_frame_config->lst_fb_idx, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_gld_fb_idx")) {
- vp8_ts_parse_int_array(ref_frame_config->gld_fb_idx, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_alt_fb_idx")) {
- vp8_ts_parse_int_array(ref_frame_config->alt_fb_idx, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_reference_last")) {
- vp8_ts_parse_int_array(ref_frame_config->reference_last, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_reference_golden")) {
- vp8_ts_parse_int_array(ref_frame_config->reference_golden, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_reference_alt_ref")) {
- vp8_ts_parse_int_array(ref_frame_config->reference_alt_ref, value, value_len, ss_number_layers);
- } else if (!strcmp(key, "rfc_reference_duration")) {
- vp8_ts_parse_int64_array(ref_frame_config->duration, value, value_len, ss_number_layers);
- }
-
- return 0;
-}
-
-static int vpx_parse_ref_frame_config_element(vpx_svc_ref_frame_config_t *ref_frame_config,
- int ss_number_layers, const char **buf)
-{
- const char key_val_sep[] = "=";
- const char pairs_sep[] = ":";
- char *key = av_get_token(buf, key_val_sep);
- char *val = NULL;
- int ret;
-
- if (key && *key && strspn(*buf, key_val_sep)) {
- (*buf)++;
- val = av_get_token(buf, pairs_sep);
- }
-
- if (key && *key && val && *val)
- ret = vpx_ref_frame_config_set_value(ref_frame_config, ss_number_layers, key, val);
- else
- ret = AVERROR(EINVAL);
-
- av_freep(&key);
- av_freep(&val);
-
- return ret;
-}
-
-static int vpx_parse_ref_frame_config(vpx_svc_ref_frame_config_t *ref_frame_config,
- int ss_number_layers, const char *str)
-{
- int ret = 0;
-
- while (*str) {
- ret =
- vpx_parse_ref_frame_config_element(ref_frame_config, ss_number_layers, &str);
- if (ret < 0)
- return ret;
-
- if (*str)
- str++;
- }
-
- return ret;
-}
-#endif
-
#if CONFIG_LIBVPX_VP9_ENCODER
static int set_pix_fmt(AVCodecContext *avctx, vpx_codec_caps_t codec_caps,
struct vpx_codec_enc_cfg *enccfg, vpx_codec_flags_t *flags,
@@ -1626,26 +1528,6 @@
#endif
layer_id_valid = 1;
}
-#if CONFIG_LIBVPX_VP9_ENCODER && defined(VPX_CTRL_VP9E_SET_MAX_INTER_BITRATE_PCT)
- en = av_dict_get(frame->metadata, "ref-frame-config", NULL, 0);
-
- if (en) {
- if (avctx->codec_id == AV_CODEC_ID_VP9) {
- int ret = vpx_parse_ref_frame_config(&ctx->ref_frame_config,
- enccfg->ss_number_layers, en->value);
- if (ret < 0) {
- av_log(avctx, AV_LOG_WARNING,
- "Error parsing ref_frame_config option %s.\n", en->value);
- return ret;
- }
-
- codecctl_intp(avctx, VP9E_SET_SVC_REF_FRAME_CONFIG, (int *)&ctx->ref_frame_config);
- } else {
- av_log(avctx, AV_LOG_WARNING,
- "Ignoring ref-frame-config for a non-VP9 codec\n");
- }
- }
-#endif
}
if (sd) {
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 212ed7d..ca7cc3a 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -1051,17 +1051,19 @@
};
#endif
-#if X264_BUILD < 153
static av_cold void X264_init_static(AVCodec *codec)
{
+#if X264_BUILD < 153
if (x264_bit_depth == 8)
codec->pix_fmts = pix_fmts_8bit;
else if (x264_bit_depth == 9)
codec->pix_fmts = pix_fmts_9bit;
else if (x264_bit_depth == 10)
codec->pix_fmts = pix_fmts_10bit;
-}
+#else
+ codec->pix_fmts = pix_fmts_all;
#endif
+}
#define OFFSET(x) offsetof(X264Context, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
@@ -1206,11 +1208,7 @@
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE,
.priv_class = &x264_class,
.defaults = x264_defaults,
-#if X264_BUILD < 153
.init_static_data = X264_init_static,
-#else
- .pix_fmts = pix_fmts_all,
-#endif
#if X264_BUILD >= 158
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
#else
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index dda8b94..857077d 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -40,6 +40,7 @@
#include "avcodec.h"
#include "internal.h"
+#include "libxvid.h"
#include "mpegutils.h"
#include "packet_internal.h"
diff --git a/libavcodec/ttmlenc.h b/libavcodec/libxvid.h
similarity index 64%
copy from libavcodec/ttmlenc.h
copy to libavcodec/libxvid.h
index c1dd5ec..58bef61 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/libxvid.h
@@ -1,6 +1,5 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
+ * copyright (C) 2006 Corey Hickey
*
* This file is part of FFmpeg.
*
@@ -19,10 +18,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
+#ifndef AVCODEC_LIBXVID_H
+#define AVCODEC_LIBXVID_H
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
+/**
+ * @file
+ * common functions for use with the Xvid wrappers
+ */
-#endif /* AVCODEC_TTMLENC_H */
+struct MpegEncContext;
+
+/* rate control */
+int ff_xvid_rate_control_init(struct MpegEncContext *s);
+void ff_xvid_rate_control_uninit(struct MpegEncContext *s);
+float ff_xvid_rate_estimate_qscale(struct MpegEncContext *s, int dry_run);
+
+#endif /* AVCODEC_LIBXVID_H */
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 3c68c08..39ce5a0 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -32,14 +32,12 @@
#include "libavutil/frame.h"
#include "libavutil/mem.h"
-#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "idctdsp.h"
#include "internal.h"
#include "jpegtables.h"
-#include "mathops.h"
#include "mjpegenc_common.h"
#include "mjpeg.h"
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c
index 1d1d04f..f8da1e1 100644
--- a/libavcodec/lpc.c
+++ b/libavcodec/lpc.c
@@ -21,7 +21,6 @@
#include "libavutil/common.h"
#include "libavutil/lls.h"
-#include "libavutil/mem_internal.h"
#define LPC_USE_DOUBLE
#include "lpc.h"
diff --git a/libavcodec/lscrdec.c b/libavcodec/lscrdec.c
deleted file mode 100644
index f5cfe1f..0000000
--- a/libavcodec/lscrdec.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright (c) 2019 Paul B Mahol
- *
- * 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
- */
-
-#include <stdint.h>
-#include <zlib.h>
-
-#include "libavutil/frame.h"
-#include "libavutil/error.h"
-#include "libavutil/log.h"
-
-#include "avcodec.h"
-#include "bytestream.h"
-#include "codec.h"
-#include "internal.h"
-#include "packet.h"
-#include "png.h"
-#include "pngdsp.h"
-
-typedef struct LSCRContext {
- PNGDSPContext dsp;
- AVCodecContext *avctx;
-
- AVFrame *last_picture;
- uint8_t *buffer;
- int buffer_size;
- uint8_t *crow_buf;
- int crow_size;
- uint8_t *last_row;
- unsigned int last_row_size;
-
- GetByteContext gb;
- uint8_t *image_buf;
- int image_linesize;
- int row_size;
- int cur_h;
- int y;
-
- z_stream zstream;
-} LSCRContext;
-
-static void handle_row(LSCRContext *s)
-{
- uint8_t *ptr, *last_row;
-
- ptr = s->image_buf + s->image_linesize * s->y;
- if (s->y == 0)
- last_row = s->last_row;
- else
- last_row = ptr - s->image_linesize;
-
- ff_png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1,
- last_row, s->row_size, 3);
-
- s->y++;
-}
-
-static int decode_idat(LSCRContext *s, int length)
-{
- int ret;
- s->zstream.avail_in = FFMIN(length, bytestream2_get_bytes_left(&s->gb));
- s->zstream.next_in = s->gb.buffer;
- bytestream2_skip(&s->gb, length);
-
- /* decode one line if possible */
- while (s->zstream.avail_in > 0) {
- ret = inflate(&s->zstream, Z_PARTIAL_FLUSH);
- if (ret != Z_OK && ret != Z_STREAM_END) {
- av_log(s->avctx, AV_LOG_ERROR, "inflate returned error %d\n", ret);
- return AVERROR_EXTERNAL;
- }
- if (s->zstream.avail_out == 0) {
- if (s->y < s->cur_h) {
- handle_row(s);
- }
- s->zstream.avail_out = s->crow_size;
- s->zstream.next_out = s->crow_buf;
- }
- if (ret == Z_STREAM_END && s->zstream.avail_in > 0) {
- av_log(s->avctx, AV_LOG_WARNING,
- "%d undecompressed bytes left in buffer\n", s->zstream.avail_in);
- return 0;
- }
- }
- return 0;
-}
-
-static int decode_frame_lscr(AVCodecContext *avctx,
- void *data, int *got_frame,
- AVPacket *avpkt)
-{
- LSCRContext *const s = avctx->priv_data;
- GetByteContext *gb = &s->gb;
- AVFrame *frame = s->last_picture;
- int ret, nb_blocks, offset = 0;
-
- if (avpkt->size < 2)
- return AVERROR_INVALIDDATA;
- if (avpkt->size == 2)
- return 0;
-
- bytestream2_init(gb, avpkt->data, avpkt->size);
-
- nb_blocks = bytestream2_get_le16(gb);
- if (bytestream2_get_bytes_left(gb) < 2 + nb_blocks * (12 + 8))
- return AVERROR_INVALIDDATA;
-
- ret = ff_reget_buffer(avctx, frame,
- nb_blocks ? 0 : FF_REGET_BUFFER_FLAG_READONLY);
- if (ret < 0)
- return ret;
-
- for (int b = 0; b < nb_blocks; b++) {
- int x, y, x2, y2, w, h, left;
- uint32_t csize, size;
-
- s->zstream.zalloc = ff_png_zalloc;
- s->zstream.zfree = ff_png_zfree;
- s->zstream.opaque = NULL;
-
- if ((ret = inflateInit(&s->zstream)) != Z_OK) {
- av_log(avctx, AV_LOG_ERROR, "inflateInit returned error %d\n", ret);
- ret = AVERROR_EXTERNAL;
- goto end;
- }
-
- bytestream2_seek(gb, 2 + b * 12, SEEK_SET);
-
- x = bytestream2_get_le16(gb);
- y = bytestream2_get_le16(gb);
- x2 = bytestream2_get_le16(gb);
- y2 = bytestream2_get_le16(gb);
- w = x2-x;
- s->cur_h = h = y2-y;
-
- if (w <= 0 || x < 0 || x >= avctx->width || w + x > avctx->width ||
- h <= 0 || y < 0 || y >= avctx->height || h + y > avctx->height) {
- ret = AVERROR_INVALIDDATA;
- goto end;
- }
-
- size = bytestream2_get_le32(gb);
-
- frame->key_frame = (nb_blocks == 1) &&
- (w == avctx->width) &&
- (h == avctx->height) &&
- (x == 0) && (y == 0);
-
- bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET);
- csize = bytestream2_get_be32(gb);
- if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T')) {
- ret = AVERROR_INVALIDDATA;
- goto end;
- }
-
- offset += size;
- left = size;
-
- s->y = 0;
- s->row_size = w * 3;
-
- av_fast_padded_malloc(&s->buffer, &s->buffer_size, s->row_size + 16);
- if (!s->buffer) {
- ret = AVERROR(ENOMEM);
- goto end;
- }
-
- av_fast_padded_malloc(&s->last_row, &s->last_row_size, s->row_size);
- if (!s->last_row) {
- ret = AVERROR(ENOMEM);
- goto end;
- }
-
- s->crow_size = w * 3 + 1;
- s->crow_buf = s->buffer + 15;
- s->zstream.avail_out = s->crow_size;
- s->zstream.next_out = s->crow_buf;
- s->image_buf = frame->data[0] + (avctx->height - y - 1) * frame->linesize[0] + x * 3;
- s->image_linesize =-frame->linesize[0];
-
- while (left > 16) {
- ret = decode_idat(s, csize);
- if (ret < 0)
- goto end;
- left -= csize + 16;
- if (left > 16) {
- bytestream2_skip(gb, 4);
- csize = bytestream2_get_be32(gb);
- if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T')) {
- ret = AVERROR_INVALIDDATA;
- goto end;
- }
- }
- }
-
- inflateEnd(&s->zstream);
- }
-
- frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
-
- if ((ret = av_frame_ref(data, frame)) < 0)
- return ret;
-
- *got_frame = 1;
-end:
- inflateEnd(&s->zstream);
-
- if (ret < 0)
- return ret;
- return avpkt->size;
-}
-
-static int lscr_decode_close(AVCodecContext *avctx)
-{
- LSCRContext *s = avctx->priv_data;
-
- av_frame_free(&s->last_picture);
- av_freep(&s->buffer);
- av_freep(&s->last_row);
-
- return 0;
-}
-
-static int lscr_decode_init(AVCodecContext *avctx)
-{
- LSCRContext *s = avctx->priv_data;
-
- avctx->color_range = AVCOL_RANGE_JPEG;
- avctx->pix_fmt = AV_PIX_FMT_BGR24;
-
- s->avctx = avctx;
- s->last_picture = av_frame_alloc();
- if (!s->last_picture)
- return AVERROR(ENOMEM);
-
- ff_pngdsp_init(&s->dsp);
-
- return 0;
-}
-
-static void lscr_decode_flush(AVCodecContext *avctx)
-{
- LSCRContext *s = avctx->priv_data;
- av_frame_unref(s->last_picture);
-}
-
-AVCodec ff_lscr_decoder = {
- .name = "lscr",
- .long_name = NULL_IF_CONFIG_SMALL("LEAD Screen Capture"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_LSCR,
- .priv_data_size = sizeof(LSCRContext),
- .init = lscr_decode_init,
- .close = lscr_decode_close,
- .decode = decode_frame_lscr,
- .flush = lscr_decode_flush,
- .capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
-};
diff --git a/libavcodec/mdct15.h b/libavcodec/mdct15.h
index 035246f..42e60f3 100644
--- a/libavcodec/mdct15.h
+++ b/libavcodec/mdct15.h
@@ -23,8 +23,6 @@
#include <stddef.h>
-#include "libavutil/mem_internal.h"
-
#include "fft.h"
typedef struct MDCT15Context {
diff --git a/libavcodec/mdct_fixed.c b/libavcodec/mdct_fixed.c
new file mode 100644
index 0000000..aabf0c8
--- /dev/null
+++ b/libavcodec/mdct_fixed.c
@@ -0,0 +1,65 @@
+/*
+ * 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
+ */
+
+#define FFT_FLOAT 0
+#define FFT_FIXED_32 0
+#include "mdct_template.c"
+
+/* same as ff_mdct_calcw_c with double-width unscaled output */
+void ff_mdct_calcw_c(FFTContext *s, FFTDouble *out, const FFTSample *input)
+{
+ int i, j, n, n8, n4, n2, n3;
+ FFTDouble re, im;
+ const uint16_t *revtab = s->revtab;
+ const FFTSample *tcos = s->tcos;
+ const FFTSample *tsin = s->tsin;
+ FFTComplex *x = s->tmp_buf;
+ FFTDComplex *o = (FFTDComplex *)out;
+
+ n = 1 << s->mdct_bits;
+ n2 = n >> 1;
+ n4 = n >> 2;
+ n8 = n >> 3;
+ n3 = 3 * n4;
+
+ /* pre rotation */
+ for(i=0;i<n8;i++) {
+ re = RSCALE(-input[2*i+n3], - input[n3-1-2*i]);
+ im = RSCALE(-input[n4+2*i], + input[n4-1-2*i]);
+ j = revtab[i];
+ CMUL(x[j].re, x[j].im, re, im, -tcos[i], tsin[i]);
+
+ re = RSCALE( input[2*i] , - input[n2-1-2*i]);
+ im = RSCALE(-input[n2+2*i], - input[ n-1-2*i]);
+ j = revtab[n8 + i];
+ CMUL(x[j].re, x[j].im, re, im, -tcos[n8 + i], tsin[n8 + i]);
+ }
+
+ s->fft_calc(s, x);
+
+ /* post rotation */
+ for(i=0;i<n8;i++) {
+ FFTDouble r0, i0, r1, i1;
+ CMULL(i1, r0, x[n8-i-1].re, x[n8-i-1].im, -tsin[n8-i-1], -tcos[n8-i-1]);
+ CMULL(i0, r1, x[n8+i ].re, x[n8+i ].im, -tsin[n8+i ], -tcos[n8+i ]);
+ o[n8-i-1].re = r0;
+ o[n8-i-1].im = i0;
+ o[n8+i ].re = r1;
+ o[n8+i ].im = i1;
+ }
+}
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 101e558..b16cbb6 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -27,8 +27,6 @@
* This is very similar to intra-only MPEG-1.
*/
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "blockdsp.h"
#include "bswapdsp.h"
@@ -260,5 +258,4 @@
.close = decode_end,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
diff --git a/libavcodec/me_cmp.c b/libavcodec/me_cmp.c
index 6054524..ae248c5 100644
--- a/libavcodec/me_cmp.c
+++ b/libavcodec/me_cmp.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "copy_block.h"
#include "simple_idct.h"
@@ -1012,8 +1011,31 @@
WRAPPER8_16_SQ(rd8x8_c, rd16_c)
WRAPPER8_16_SQ(bit8x8_c, bit16_c)
+int ff_check_alignment(void)
+{
+ static int did_fail = 0;
+ LOCAL_ALIGNED_16(int, aligned, [4]);
+
+ if ((intptr_t)aligned & 15) {
+ if (!did_fail) {
+#if HAVE_MMX || HAVE_ALTIVEC
+ av_log(NULL, AV_LOG_ERROR,
+ "Compiler did not align stack variables. Libavcodec has been miscompiled\n"
+ "and may be very slow or crash. This is not a bug in libavcodec,\n"
+ "but in the compiler. You may try recompiling using gcc >= 4.2.\n"
+ "Do not report crashes to FFmpeg developers.\n");
+#endif
+ did_fail=1;
+ }
+ return -1;
+ }
+ return 0;
+}
+
av_cold void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx)
{
+ ff_check_alignment();
+
c->sum_abs_dctelem = sum_abs_dctelem_c;
/* TODO [0] 16 [1] 8 */
diff --git a/libavcodec/me_cmp.h b/libavcodec/me_cmp.h
index e9b5161..0a589e3 100644
--- a/libavcodec/me_cmp.h
+++ b/libavcodec/me_cmp.h
@@ -79,6 +79,8 @@
me_cmp_func median_sad[6];
} MECmpContext;
+int ff_check_alignment(void);
+
void ff_me_cmp_init(MECmpContext *c, AVCodecContext *avctx);
void ff_me_cmp_init_alpha(MECmpContext *c, AVCodecContext *avctx);
void ff_me_cmp_init_arm(MECmpContext *c, AVCodecContext *avctx);
diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c
index c829941..79abc8b 100644
--- a/libavcodec/mediacodec_wrapper.c
+++ b/libavcodec/mediacodec_wrapper.c
@@ -45,7 +45,6 @@
jmethodID get_codec_capabilities_id;
jmethodID get_supported_types_id;
jmethodID is_encoder_id;
- jmethodID is_software_only_id;
jclass codec_capabilities_class;
jfieldID color_formats_id;
@@ -82,7 +81,6 @@
{ "android/media/MediaCodecInfo", "getCapabilitiesForType", "(Ljava/lang/String;)Landroid/media/MediaCodecInfo$CodecCapabilities;", FF_JNI_METHOD, offsetof(struct JNIAMediaCodecListFields, get_codec_capabilities_id), 1 },
{ "android/media/MediaCodecInfo", "getSupportedTypes", "()[Ljava/lang/String;", FF_JNI_METHOD, offsetof(struct JNIAMediaCodecListFields, get_supported_types_id), 1 },
{ "android/media/MediaCodecInfo", "isEncoder", "()Z", FF_JNI_METHOD, offsetof(struct JNIAMediaCodecListFields, is_encoder_id), 1 },
- { "android/media/MediaCodecInfo", "isSoftwareOnly", "()Z", FF_JNI_METHOD, offsetof(struct JNIAMediaCodecListFields, is_software_only_id), 0 },
{ "android/media/MediaCodecInfo$CodecCapabilities", NULL, NULL, FF_JNI_CLASS, offsetof(struct JNIAMediaCodecListFields, codec_capabilities_class), 1 },
{ "android/media/MediaCodecInfo$CodecCapabilities", "colorFormats", "[I", FF_JNI_FIELD, offsetof(struct JNIAMediaCodecListFields, color_formats_id), 1 },
@@ -443,41 +441,6 @@
goto done_with_info;
}
- if (jfields.is_software_only_id) {
- int is_software_only = (*env)->CallBooleanMethod(env, info, jfields.is_software_only_id);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
-
- if (is_software_only) {
- goto done_with_info;
- }
- }
-
- codec_name = (*env)->CallObjectMethod(env, info, jfields.get_name_id);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
-
- name = ff_jni_jstring_to_utf_chars(env, codec_name, log_ctx);
- if (!name) {
- goto done;
- }
-
- if (codec_name) {
- (*env)->DeleteLocalRef(env, codec_name);
- codec_name = NULL;
- }
-
- /* Skip software decoders */
- if (
- strstr(name, "OMX.google") ||
- strstr(name, "OMX.ffmpeg") ||
- (strstr(name, "OMX.SEC") && strstr(name, ".sw.")) ||
- !strcmp(name, "OMX.qcom.video.decoder.hevcswvdec")) {
- goto done_with_info;
- }
-
type_count = (*env)->GetArrayLength(env, types);
for (j = 0; j < type_count; j++) {
int k;
@@ -493,51 +456,74 @@
goto done;
}
- if (av_strcasecmp(supported_type, mime)) {
- goto done_with_type;
- }
+ if (!av_strcasecmp(supported_type, mime)) {
+ codec_name = (*env)->CallObjectMethod(env, info, jfields.get_name_id);
+ if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
+ goto done;
+ }
- capabilities = (*env)->CallObjectMethod(env, info, jfields.get_codec_capabilities_id, type);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
+ name = ff_jni_jstring_to_utf_chars(env, codec_name, log_ctx);
+ if (!name) {
+ goto done;
+ }
- profile_levels = (*env)->GetObjectField(env, capabilities, jfields.profile_levels_id);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
+ if (codec_name) {
+ (*env)->DeleteLocalRef(env, codec_name);
+ codec_name = NULL;
+ }
- profile_count = (*env)->GetArrayLength(env, profile_levels);
- if (!profile_count) {
- found_codec = 1;
- }
- for (k = 0; k < profile_count; k++) {
- int supported_profile = 0;
+ /* Skip software decoders */
+ if (
+ strstr(name, "OMX.google") ||
+ strstr(name, "OMX.ffmpeg") ||
+ (strstr(name, "OMX.SEC") && strstr(name, ".sw.")) ||
+ !strcmp(name, "OMX.qcom.video.decoder.hevcswvdec")) {
+ av_freep(&name);
+ goto done_with_type;
+ }
- if (profile < 0) {
+ capabilities = (*env)->CallObjectMethod(env, info, jfields.get_codec_capabilities_id, type);
+ if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
+ goto done;
+ }
+
+ profile_levels = (*env)->GetObjectField(env, capabilities, jfields.profile_levels_id);
+ if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
+ goto done;
+ }
+
+ profile_count = (*env)->GetArrayLength(env, profile_levels);
+ if (!profile_count) {
found_codec = 1;
- break;
}
+ for (k = 0; k < profile_count; k++) {
+ int supported_profile = 0;
- profile_level = (*env)->GetObjectArrayElement(env, profile_levels, k);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
+ if (profile < 0) {
+ found_codec = 1;
+ break;
+ }
- supported_profile = (*env)->GetIntField(env, profile_level, jfields.profile_id);
- if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
- goto done;
- }
+ profile_level = (*env)->GetObjectArrayElement(env, profile_levels, k);
+ if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
+ goto done;
+ }
- found_codec = profile == supported_profile;
+ supported_profile = (*env)->GetIntField(env, profile_level, jfields.profile_id);
+ if (ff_jni_exception_check(env, 1, log_ctx) < 0) {
+ goto done;
+ }
- if (profile_level) {
- (*env)->DeleteLocalRef(env, profile_level);
- profile_level = NULL;
- }
+ found_codec = profile == supported_profile;
- if (found_codec) {
- break;
+ if (profile_level) {
+ (*env)->DeleteLocalRef(env, profile_level);
+ profile_level = NULL;
+ }
+
+ if (found_codec) {
+ break;
+ }
}
}
@@ -562,6 +548,8 @@
if (found_codec) {
break;
}
+
+ av_freep(&name);
}
done_with_info:
@@ -578,8 +566,6 @@
if (found_codec) {
break;
}
-
- av_freep(&name);
}
done:
diff --git a/libavcodec/mediacodecdec.c b/libavcodec/mediacodecdec.c
index ad592d1..ac1725e 100644
--- a/libavcodec/mediacodecdec.c
+++ b/libavcodec/mediacodecdec.c
@@ -167,11 +167,8 @@
ff_AMediaFormat_setBuffer(format, "csd-1", (void*)data, data_size);
av_freep(&data);
} else {
- const int warn = is_avc && (avctx->codec_tag == MKTAG('a','v','c','1') ||
- avctx->codec_tag == MKTAG('a','v','c','2'));
- av_log(avctx, warn ? AV_LOG_WARNING : AV_LOG_DEBUG,
- "Could not extract PPS/SPS from extradata\n");
- ret = 0;
+ av_log(avctx, AV_LOG_ERROR, "Could not extract PPS/SPS from extradata");
+ ret = AVERROR_INVALIDDATA;
}
done:
@@ -257,10 +254,8 @@
av_freep(&data);
} else {
- const int warn = is_nalff && avctx->codec_tag == MKTAG('h','v','c','1');
- av_log(avctx, warn ? AV_LOG_WARNING : AV_LOG_DEBUG,
- "Could not extract VPS/PPS/SPS from extradata\n");
- ret = 0;
+ av_log(avctx, AV_LOG_ERROR, "Could not extract VPS/PPS/SPS from extradata");
+ ret = AVERROR_INVALIDDATA;
}
done:
diff --git a/libavcodec/metasound.c b/libavcodec/metasound.c
index 27cf1dd..396310b 100644
--- a/libavcodec/metasound.c
+++ b/libavcodec/metasound.c
@@ -341,17 +341,23 @@
tctx->mtab = &ff_metasound_mode2224s;
break;
case (1 << 16) + (44 << 8) + 32:
- case (2 << 16) + (44 << 8) + 32:
tctx->mtab = &ff_metasound_mode4432;
break;
+ case (2 << 16) + (44 << 8) + 32:
+ tctx->mtab = &ff_metasound_mode4432s;
+ break;
case (1 << 16) + (44 << 8) + 40:
- case (2 << 16) + (44 << 8) + 40:
tctx->mtab = &ff_metasound_mode4440;
break;
+ case (2 << 16) + (44 << 8) + 40:
+ tctx->mtab = &ff_metasound_mode4440s;
+ break;
case (1 << 16) + (44 << 8) + 48:
- case (2 << 16) + (44 << 8) + 48:
tctx->mtab = &ff_metasound_mode4448;
break;
+ case (2 << 16) + (44 << 8) + 48:
+ tctx->mtab = &ff_metasound_mode4448s;
+ break;
default:
av_log(avctx, AV_LOG_ERROR,
"This version does not support %d kHz - %d kbit/s/ch mode.\n",
diff --git a/libavcodec/metasound_data.c b/libavcodec/metasound_data.c
index 22b2730..da2548a 100644
--- a/libavcodec/metasound_data.c
+++ b/libavcodec/metasound_data.c
@@ -19,10 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "config.h"
#include "metasound_data.h"
-#if CONFIG_METASOUND_DECODER
static const int16_t cb0806sl0[] = {
-417, -225, -84, 16, -106, -34, -246, -164,
112, 48, -47, 36, -65, -68, -172, -1655,
@@ -12103,9 +12101,8 @@
-623, -588, 38, -58, 975, 1529, -986, -891,
-1121, -619, 1967, -463, -7, 632, 768, 953,
};
-#endif /* CONFIG_METASOUND_DECODER */
-const float ff_metasound_lsp8[] = {
+static const float lsp8[] = {
0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789,
1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387,
1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548,
@@ -12171,7 +12168,73 @@
0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531,
};
-const float ff_metasound_lsp11[] = {
+static const float lsp8s[] = {
+ 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789,
+ 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387,
+ 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548,
+ 0.1536, 0.3279, 0.5143, 0.6859, 0.9763, 1.2744, 1.5605, 1.8566,
+ 2.1007, 2.3450, 2.6075, 2.8850, 0.2075, 0.4533, 0.7709, 1.0377,
+ 1.2953, 1.5132, 1.7826, 2.0351, 2.2590, 2.4996, 2.6795, 2.8748,
+ 0.1393, 0.2453, 0.3754, 0.5453, 0.8148, 1.1289, 1.4389, 1.7592,
+ 2.0353, 2.3215, 2.5934, 2.8588, 0.1250, 0.3627, 0.7613, 1.1380,
+ 1.4163, 1.5565, 1.6920, 1.8130, 1.8678, 2.0427, 2.4318, 2.8544,
+ 0.2256, 0.4223, 0.6452, 0.8599, 1.0673, 1.3118, 1.5486, 1.8366,
+ 2.0759, 2.3026, 2.5284, 2.8030, 0.2304, 0.4404, 0.6891, 0.8964,
+ 1.1510, 1.4202, 1.6483, 1.8580, 2.1181, 2.3686, 2.6078, 2.9128,
+ 0.2230, 0.3816, 0.5520, 0.6062, 0.7909, 1.0988, 1.4330, 1.7846,
+ 2.0713, 2.3457, 2.6048, 2.8708, 0.2447, 0.5800, 0.8249, 0.9905,
+ 1.1721, 1.3990, 1.6694, 1.9064, 2.1307, 2.4255, 2.6815, 2.9117,
+ 0.1974, 0.3812, 0.5802, 0.7759, 0.9280, 1.1547, 1.4170, 1.6369,
+ 1.8890, 2.2587, 2.5626, 2.8239, 0.1209, 0.2510, 0.4841, 0.8048,
+ 1.1197, 1.3563, 1.6073, 1.8926, 2.1350, 2.3669, 2.6291, 2.8985,
+ 0.2352, 0.4347, 0.6582, 0.8178, 0.9548, 1.1654, 1.4942, 1.8812,
+ 2.1703, 2.3779, 2.6412, 2.8871, 0.2091, 0.4084, 0.6730, 0.9151,
+ 1.1259, 1.3262, 1.5937, 1.8129, 2.0237, 2.3317, 2.5778, 2.8620,
+ 0.1167, 0.2406, 0.4520, 0.7298, 0.9848, 1.2448, 1.5137, 1.7874,
+ 2.0280, 2.3020, 2.5914, 2.8794, 0.3003, 0.4966, 0.6520, 0.8505,
+ 1.1600, 1.3981, 1.5805, 1.8346, 2.0757, 2.3102, 2.5760, 2.8499,
+ 0.2451, 0.4163, 0.5960, 0.7805, 0.9507, 1.2438, 1.5587, 1.8581,
+ 2.0735, 2.3198, 2.5704, 2.8220, 0.3112, 0.5517, 0.7032, 0.8528,
+ 1.1489, 1.4257, 1.6848, 1.9388, 2.1577, 2.4265, 2.6678, 2.9051,
+ 0.2249, 0.3897, 0.5559, 0.7473, 1.0158, 1.3581, 1.6914, 1.9930,
+ 2.1843, 2.3534, 2.5512, 2.8065, 0.2600, 0.4574, 0.7349, 0.9691,
+ 1.1696, 1.3848, 1.6335, 1.9021, 2.1174, 2.3481, 2.5902, 2.8390,
+ 0.2246, 0.3372, 0.4560, 0.5249, 0.7056, 1.0273, 1.3810, 1.7132,
+ 1.9819, 2.2574, 2.5410, 2.8491, 0.1419, 0.4834, 0.8835, 1.1453,
+ 1.2839, 1.4224, 1.5593, 1.7877, 2.1285, 2.4070, 2.6043, 2.8511,
+ 0.1886, 0.3677, 0.5617, 0.8099, 1.1277, 1.3841, 1.5804, 1.8136,
+ 2.0307, 2.2805, 2.5399, 2.8322, 0.2351, 0.4151, 0.6675, 0.8713,
+ 1.0464, 1.3292, 1.6586, 1.9281, 2.1355, 2.3495, 2.6222, 2.8782,
+ 0.2700, 0.4489, 0.6206, 0.7121, 0.7737, 0.9848, 1.3658, 1.7433,
+ 2.0139, 2.2243, 2.4806, 2.8175, 0.2479, 0.4425, 0.6490, 0.8745,
+ 1.1161, 1.3849, 1.6773, 1.9566, 2.1491, 2.3624, 2.5685, 2.8114,
+ 0.2035, 0.3701, 0.5567, 0.7953, 1.0082, 1.2758, 1.5373, 1.7822,
+ 2.0175, 2.2601, 2.4759, 2.7771, 0.1856, 0.3461, 0.5998, 0.9041,
+ 1.2383, 1.4612, 1.6667, 1.9305, 2.1617, 2.4107, 2.6477, 2.8656,
+ 0.2107, 0.3715, 0.5289, 0.6651, 0.8420, 1.1168, 1.4401, 1.7230,
+ 1.9901, 2.2687, 2.5452, 2.8655, 0.1218, 0.2999, 0.6348, 0.9482,
+ 1.2745, 1.5876, 1.9129, 2.2348, 2.4020, 2.4922, 2.6351, 2.8357,
+ 0.1617, 0.3483, 0.5869, 0.8163, 1.0366, 1.2344, 1.4609, 1.7029,
+ 1.9476, 2.2337, 2.5258, 2.8442, 0.2505, 0.4894, 0.7510, 0.9152,
+ 1.0845, 1.3657, 1.6528, 1.8346, 2.0160, 2.2811, 2.5338, 2.8136,
+ 0.0947, 0.1158, 0.0578, -0.0337, -0.0066, 0.0104, -0.0447, -0.0505,
+ -0.0778, -0.0293, 0.0251, -0.0143, 0.0349, -0.0227, -0.0909, 0.0523,
+ 0.0325, -0.0410, -0.1045, -0.0899, -0.0009, 0.0075, -0.0575, -0.0855,
+ -0.0129, 0.0575, 0.0597, 0.0391, 0.0371, -0.0184, -0.0083, 0.0287,
+ 0.0143, 0.0167, 0.0120, -0.0168, 0.0452, 0.0223, -0.0352, 0.0119,
+ -0.0496, -0.0965, -0.0661, -0.0072, 0.1099, 0.0843, -0.0087, -0.0478,
+ -0.0128, -0.0120, -0.0004, 0.0731, 0.1047, 0.0630, 0.0196, -0.0103,
+ -0.0399, -0.0986, -0.0912, -0.0390, -0.0247, -0.0694, -0.0749, -0.0066,
+ 0.0223, 0.0634, 0.0343, -0.0134, 0.0727, 0.0241, 0.0066, 0.0437,
+ 0.0610, 0.0364, 0.0248, -0.0358, -0.0686, -0.0104, 0.0426, 0.0088,
+ -0.0137, -0.0165, 0.0671, 0.0815, -0.0863, -0.0644, -0.0088, 0.0023,
+ 0.0482, 0.1174, 0.1270, 0.0594, 0.0165, 0.0949, 0.1098, 0.0137,
+ 0.4951, 0.4999, 0.4958, 0.4907, 0.4984, 0.4965, 0.4958, 0.4996,
+ 0.4987, 0.4958, 0.4986, 0.4977, 0.2841, 0.2186, 0.1474, 0.1687,
+ 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531,
+};
+
+static const float lsp11[] = {
0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057,
1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977,
0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351,
@@ -12338,7 +12401,174 @@
0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857,
};
-const float ff_metasound_lsp16[] = {
+static const float lsp11s[] = {
+ 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057,
+ 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977,
+ 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351,
+ 1.5233, 1.7262, 1.9466, 2.1739, 2.3495, 2.5162, 2.7164, 2.9202,
+ 0.2010, 0.3330, 0.4488, 0.6465, 0.8046, 0.9889, 1.1479, 1.2964,
+ 1.4770, 1.6606, 1.8789, 2.1155, 2.3287, 2.5199, 2.7101, 2.9119,
+ 0.1168, 0.2197, 0.3279, 0.4691, 0.6268, 0.8251, 1.0533, 1.2714,
+ 1.4712, 1.6762, 1.8831, 2.1114, 2.3230, 2.5297, 2.7365, 2.9270,
+ 0.1405, 0.3109, 0.4986, 0.6891, 0.8634, 1.0583, 1.2594, 1.4349,
+ 1.6232, 1.8116, 1.9905, 2.1935, 2.3799, 2.5656, 2.7661, 2.9486,
+ 0.1703, 0.3057, 0.4403, 0.5225, 0.5969, 0.8110, 1.0729, 1.3215,
+ 1.5407, 1.7381, 1.9477, 2.1680, 2.3586, 2.5612, 2.7630, 2.9410,
+ 0.1128, 0.2628, 0.4523, 0.6495, 0.8176, 0.9816, 1.1746, 1.3710,
+ 1.5568, 1.7518, 1.9497, 2.1452, 2.3346, 2.5389, 2.7362, 2.9264,
+ 0.1809, 0.3287, 0.5205, 0.7264, 0.9298, 1.1217, 1.2970, 1.4894,
+ 1.6874, 1.8493, 2.0576, 2.2382, 2.4097, 2.6041, 2.7796, 2.9389,
+ 0.2502, 0.4709, 0.6892, 0.8346, 0.9209, 1.0455, 1.2399, 1.4616,
+ 1.6463, 1.8380, 2.0475, 2.2397, 2.4665, 2.6550, 2.7701, 2.8895,
+ 0.1040, 0.2340, 0.3964, 0.5740, 0.7764, 0.9941, 1.2000, 1.4014,
+ 1.6024, 1.7974, 1.9939, 2.1959, 2.3783, 2.5663, 2.7613, 2.9484,
+ 0.1912, 0.3393, 0.4743, 0.6313, 0.8014, 0.9879, 1.1855, 1.3922,
+ 1.5678, 1.7289, 1.9271, 2.1165, 2.3089, 2.5414, 2.7448, 2.9269,
+ 0.0965, 0.2025, 0.3398, 0.4990, 0.6934, 0.9386, 1.1730, 1.3766,
+ 1.5783, 1.7783, 1.9790, 2.1831, 2.3670, 2.5578, 2.7641, 2.9516,
+ 0.2126, 0.3652, 0.5545, 0.7170, 0.8674, 1.0640, 1.2558, 1.4061,
+ 1.5904, 1.8095, 1.9760, 2.1505, 2.3549, 2.5575, 2.7023, 2.8877,
+ 0.1827, 0.3426, 0.4894, 0.6488, 0.7960, 0.9535, 1.1217, 1.2798,
+ 1.4566, 1.6453, 1.8044, 2.0042, 2.2379, 2.4611, 2.6697, 2.8966,
+ 0.2034, 0.3822, 0.5231, 0.6960, 0.9200, 1.0394, 1.1616, 1.3772,
+ 1.5493, 1.7330, 1.9646, 2.1233, 2.3334, 2.5361, 2.7087, 2.9470,
+ 0.1050, 0.2060, 0.3705, 0.5998, 0.8337, 1.0577, 1.2559, 1.4327,
+ 1.6334, 1.8165, 1.9853, 2.2058, 2.4063, 2.5818, 2.7625, 2.9458,
+ 0.1419, 0.4053, 0.6660, 0.8911, 1.0405, 1.1547, 1.2506, 1.3926,
+ 1.5669, 1.7527, 1.9694, 2.2054, 2.3889, 2.5743, 2.7586, 2.9174,
+ 0.1514, 0.2825, 0.4309, 0.5772, 0.7470, 0.9703, 1.1462, 1.3316,
+ 1.5321, 1.7259, 1.9282, 2.1266, 2.3106, 2.5064, 2.7067, 2.9094,
+ 0.1693, 0.3156, 0.4878, 0.6635, 0.8206, 0.9569, 1.1154, 1.3064,
+ 1.5109, 1.7184, 1.9179, 2.1036, 2.2763, 2.4820, 2.6949, 2.9105,
+ 0.1432, 0.2718, 0.4241, 0.5564, 0.6939, 0.9011, 1.1582, 1.3948,
+ 1.6181, 1.8024, 1.9814, 2.1740, 2.3459, 2.5456, 2.7491, 2.9307,
+ 0.2294, 0.3857, 0.5590, 0.7434, 0.9189, 1.0941, 1.2740, 1.4456,
+ 1.6178, 1.7994, 1.9689, 2.1644, 2.3525, 2.5385, 2.7468, 2.9405,
+ 0.1667, 0.3109, 0.4612, 0.6032, 0.7375, 0.8866, 1.0840, 1.3053,
+ 1.4982, 1.7044, 1.9146, 2.1117, 2.2942, 2.4983, 2.7084, 2.9132,
+ 0.1810, 0.3205, 0.4696, 0.6231, 0.7641, 0.9959, 1.2427, 1.4361,
+ 1.5889, 1.7544, 1.9083, 2.0733, 2.2457, 2.4461, 2.6793, 2.9098,
+ 0.1164, 0.3753, 0.6068, 0.7503, 1.0100, 1.2131, 1.3793, 1.5302,
+ 1.6300, 1.7950, 1.9057, 2.1031, 2.3830, 2.5745, 2.6949, 2.8779,
+ 0.1571, 0.4378, 0.6735, 0.8312, 0.8944, 0.9818, 1.1622, 1.4094,
+ 1.6423, 1.8066, 1.9258, 2.1838, 2.4363, 2.6279, 2.7358, 2.8790,
+ 0.1398, 0.2686, 0.4248, 0.6156, 0.7870, 1.0035, 1.2012, 1.3689,
+ 1.5363, 1.7398, 1.9604, 2.1619, 2.3345, 2.5097, 2.7271, 2.9368,
+ 0.1913, 0.3338, 0.4987, 0.6446, 0.7852, 1.0163, 1.1886, 1.3610,
+ 1.5379, 1.7230, 1.8880, 2.0862, 2.2960, 2.4928, 2.7122, 2.9151,
+ 0.0908, 0.1752, 0.2899, 0.5365, 0.7761, 1.0100, 1.2124, 1.4060,
+ 1.6019, 1.8010, 1.9774, 2.1905, 2.3733, 2.5623, 2.7660, 2.9565,
+ 0.1773, 0.3179, 0.4925, 0.6864, 0.8452, 0.9897, 1.1860, 1.3722,
+ 1.5515, 1.7658, 1.9802, 2.1819, 2.3620, 2.5442, 2.7250, 2.9220,
+ 0.1286, 0.2341, 0.3689, 0.5364, 0.7176, 0.9350, 1.1083, 1.2943,
+ 1.4974, 1.7059, 1.9047, 2.1145, 2.3242, 2.5361, 2.7453, 2.9329,
+ 0.2273, 0.3834, 0.5565, 0.7192, 0.8431, 0.9962, 1.1763, 1.3571,
+ 1.5774, 1.7419, 1.9202, 2.1131, 2.2919, 2.4898, 2.6895, 2.9180,
+ 0.1775, 0.3058, 0.4274, 0.6023, 0.8151, 1.0734, 1.3211, 1.5178,
+ 1.6706, 1.8154, 1.9686, 2.1537, 2.3461, 2.5276, 2.7181, 2.9121,
+ 0.1653, 0.4304, 0.6361, 0.7824, 0.9183, 1.0452, 1.2071, 1.4077,
+ 1.6206, 1.8299, 2.0089, 2.1948, 2.3900, 2.5982, 2.7844, 2.9487,
+ 0.1492, 0.2609, 0.3820, 0.5485, 0.7243, 0.9319, 1.1538, 1.3579,
+ 1.5266, 1.7002, 1.8873, 2.1016, 2.3175, 2.5221, 2.7241, 2.9243,
+ 0.2074, 0.3781, 0.5209, 0.6869, 0.8577, 0.9875, 1.1849, 1.3568,
+ 1.4907, 1.7335, 1.8902, 2.1224, 2.3099, 2.4918, 2.7023, 2.8765,
+ 0.1359, 0.2254, 0.3286, 0.4432, 0.6586, 0.8964, 1.1125, 1.3523,
+ 1.5626, 1.7579, 1.9846, 2.1905, 2.3548, 2.5542, 2.7663, 2.9346,
+ 0.1430, 0.2966, 0.4685, 0.6493, 0.8315, 1.0304, 1.2220, 1.4082,
+ 1.5995, 1.7888, 1.9774, 2.1737, 2.3607, 2.5577, 2.7558, 2.9405,
+ 0.1477, 0.2694, 0.4056, 0.5626, 0.7051, 0.8647, 1.0491, 1.2488,
+ 1.4814, 1.7072, 1.9150, 2.1147, 2.3038, 2.5144, 2.7184, 2.9202,
+ 0.1690, 0.3033, 0.4580, 0.6686, 0.8536, 1.0293, 1.2124, 1.3998,
+ 1.5718, 1.7607, 1.9580, 2.1245, 2.2971, 2.4762, 2.6896, 2.9177,
+ 0.1092, 0.2779, 0.4853, 0.6880, 0.9011, 1.0953, 1.2752, 1.4618,
+ 1.6623, 1.8484, 2.0264, 2.2152, 2.4017, 2.5835, 2.7671, 2.9436,
+ 0.1497, 0.3637, 0.6014, 0.8032, 0.9963, 1.1835, 1.3741, 1.5698,
+ 1.7382, 1.9094, 2.0710, 2.2392, 2.4082, 2.5926, 2.7762, 2.9536,
+ 0.1434, 0.2492, 0.3966, 0.5934, 0.8033, 1.0657, 1.2796, 1.4276,
+ 1.5745, 1.7833, 1.9288, 2.1247, 2.3543, 2.5412, 2.7049, 2.8872,
+ 0.1612, 0.2926, 0.4574, 0.6387, 0.8265, 1.0180, 1.1808, 1.3526,
+ 1.5564, 1.7536, 1.9187, 2.1192, 2.3149, 2.5006, 2.7101, 2.9217,
+ 0.0828, 0.1863, 0.3235, 0.5050, 0.7250, 0.9867, 1.2093, 1.3941,
+ 1.5980, 1.7932, 1.9809, 2.1894, 2.3918, 2.5773, 2.7540, 2.9329,
+ 0.2001, 0.3655, 0.5290, 0.6761, 0.8027, 0.9972, 1.2090, 1.4255,
+ 1.6085, 1.7825, 1.9804, 2.1681, 2.3457, 2.5325, 2.7319, 2.9196,
+ 0.1505, 0.2767, 0.4254, 0.6054, 0.7821, 0.9567, 1.1294, 1.3080,
+ 1.4984, 1.6954, 1.8666, 2.0736, 2.2875, 2.4969, 2.7072, 2.9163,
+ 0.1589, 0.4151, 0.5749, 0.6651, 0.8061, 1.0470, 1.2616, 1.3690,
+ 1.4985, 1.7808, 1.9825, 2.1068, 2.2751, 2.5448, 2.7133, 2.8689,
+ 0.0916, 0.1846, 0.3788, 0.6329, 0.8774, 1.0687, 1.2653, 1.4561,
+ 1.6573, 1.8449, 2.0402, 2.2254, 2.3968, 2.5861, 2.7792, 2.9508,
+ 0.2282, 0.4159, 0.5834, 0.6899, 0.8108, 1.0321, 1.2795, 1.5262,
+ 1.6936, 1.8469, 2.0922, 2.2607, 2.3795, 2.5301, 2.7386, 2.9530,
+ 0.1651, 0.3004, 0.4555, 0.6179, 0.7891, 0.9584, 1.1372, 1.3707,
+ 1.5951, 1.7880, 1.9434, 2.1465, 2.3311, 2.5081, 2.6977, 2.8970,
+ 0.1279, 0.3828, 0.6330, 0.8323, 0.9652, 1.1175, 1.2319, 1.3511,
+ 1.5115, 1.6392, 1.7835, 1.9558, 2.2008, 2.4635, 2.6910, 2.9058,
+ 0.1193, 0.2185, 0.3521, 0.5311, 0.7378, 0.9239, 1.1105, 1.3217,
+ 1.5362, 1.7504, 1.9536, 2.1627, 2.3560, 2.5506, 2.7548, 2.9453,
+ 0.1806, 0.3432, 0.4981, 0.6948, 0.8928, 1.0527, 1.2467, 1.4140,
+ 1.6326, 1.7950, 1.9935, 2.1969, 2.3512, 2.5682, 2.7445, 2.9277,
+ 0.1846, 0.3112, 0.4568, 0.5891, 0.7317, 0.8493, 1.0204, 1.2022,
+ 1.3688, 1.6020, 1.8428, 2.0710, 2.2725, 2.4879, 2.7057, 2.9160,
+ 0.0880, 0.2514, 0.5332, 0.7272, 0.8906, 1.1354, 1.3199, 1.4941,
+ 1.6010, 1.7151, 1.8712, 2.0643, 2.2755, 2.5375, 2.7054, 2.8891,
+ 0.1382, 0.2833, 0.4658, 0.6897, 0.9071, 1.0716, 1.2469, 1.4143,
+ 1.5910, 1.7947, 1.9805, 2.1581, 2.3338, 2.5215, 2.7292, 2.9211,
+ 0.1061, 0.3494, 0.6327, 0.8570, 0.9748, 1.0560, 1.1529, 1.3250,
+ 1.6032, 1.8340, 1.9711, 2.1157, 2.3011, 2.5464, 2.8078, 2.9803,
+ 0.1603, 0.2839, 0.4307, 0.5980, 0.7980, 1.0399, 1.1971, 1.3524,
+ 1.5715, 1.7838, 1.9468, 2.1498, 2.3627, 2.5514, 2.7327, 2.9148,
+ 0.1691, 0.3117, 0.4796, 0.6895, 0.8732, 1.0164, 1.1916, 1.3707,
+ 1.5384, 1.7202, 1.8857, 2.0672, 2.2487, 2.4593, 2.6789, 2.8940,
+ 0.0965, 0.1702, 0.3191, 0.5721, 0.8100, 1.0241, 1.2272, 1.4196,
+ 1.6093, 1.8057, 1.9884, 2.2037, 2.3925, 2.5805, 2.7578, 2.9366,
+ 0.1950, 0.3519, 0.5272, 0.6973, 0.8732, 1.0656, 1.2112, 1.3959,
+ 1.6116, 1.7821, 1.9445, 2.1592, 2.3348, 2.5142, 2.7440, 2.9297,
+ 0.1388, 0.2557, 0.4120, 0.5727, 0.7354, 0.9196, 1.0985, 1.2805,
+ 1.4643, 1.6535, 1.8340, 2.0546, 2.2758, 2.4778, 2.6921, 2.9122,
+ 0.1823, 0.3336, 0.4957, 0.6771, 0.8563, 1.0137, 1.2299, 1.3849,
+ 1.5718, 1.7667, 1.9193, 2.1326, 2.3135, 2.5268, 2.7133, 2.8998,
+ 0.0790, 0.1901, 0.4083, 0.6456, 0.8463, 1.0285, 1.2297, 1.4181,
+ 1.6159, 1.8056, 1.9971, 2.1912, 2.3816, 2.5746, 2.7692, 2.9497,
+ 0.0049, 0.0116, 0.0045, 0.0039, -0.0010, -0.0122, -0.0205, -0.0034,
+ -0.0140, -0.0041, 0.0191, -0.0322, 0.0002, -0.0124, -0.0269, 0.0059,
+ 0.0586, 0.0339, -0.0389, -0.0319, -0.0079, -0.0205, -0.0363, -0.0211,
+ 0.0241, 0.0595, 0.0469, 0.0283, 0.0176, -0.0183, -0.0173, -0.0004,
+ 0.0024, 0.0145, 0.0534, 0.0197, -0.0065, -0.0067, 0.0133, 0.0358,
+ -0.0104, -0.0386, -0.0109, -0.0078, 0.0275, 0.0565, 0.0251, -0.0027,
+ -0.0053, 0.0171, 0.0088, 0.0495, 0.0141, 0.0039, -0.0445, -0.0426,
+ -0.0184, -0.0280, -0.0223, 0.0039, -0.0171, -0.0606, -0.0786, -0.0430,
+ 0.0544, 0.0595, 0.0320, -0.0012, 0.0108, 0.0185, 0.0066, 0.0408,
+ 0.0552, -0.0073, -0.0247, -0.0480, -0.0288, 0.0186, 0.0212, -0.0013,
+ 0.0403, 0.0598, 0.0690, 0.0516, -0.0298, -0.0177, 0.0278, 0.0168,
+ -0.0106, 0.0251, 0.0386, 0.0331, -0.0052, 0.0133, 0.0291, -0.0158,
+ -0.0329, -0.0367, 0.0287, 0.0462, -0.0176, 0.0049, 0.0242, -0.0034,
+ 0.0135, 0.0086, -0.0149, 0.0241, 0.0504, 0.0246, -0.0273, -0.0369,
+ -0.0108, -0.0449, -0.0625, -0.0414, -0.0292, -0.0571, -0.0440, -0.0088,
+ 0.0098, 0.0009, -0.0004, 0.0007, -0.0314, -0.0208, -0.0138, -0.0277,
+ -0.0044, 0.0522, 0.0315, -0.0270, -0.0277, -0.0256, -0.0103, -0.0201,
+ -0.0287, -0.0279, -0.0182, 0.0472, 0.0613, 0.0450, 0.0413, 0.0333,
+ 0.0444, 0.0223, 0.0061, 0.0316, 0.0321, 0.0501, 0.0460, 0.0250,
+ 0.0227, 0.0235, 0.0099, 0.0185, -0.0347, -0.0684, -0.0189, 0.0242,
+ -0.0190, -0.0273, -0.0012, -0.0253, 0.0293, -0.0231, -0.0219, -0.0010,
+ 0.0153, 0.0128, -0.0166, -0.0435, -0.0417, -0.0121, -0.0351, -0.0390,
+ 0.0077, -0.0278, -0.0355, 0.0092, -0.0063, 0.0005, 0.0216, 0.0461,
+ 0.0538, 0.0451, 0.0298, -0.0130, 0.0058, 0.0206, 0.0471, 0.0499,
+ 0.0280, 0.0086, -0.0007, -0.0317, 0.0259, 0.0176, 0.0043, 0.0212,
+ 0.0138, 0.0106, 0.0220, -0.0025, 0.0050, 0.0122, -0.0051, -0.0086,
+ -0.0472, -0.0005, 0.0193, 0.0032, 0.0246, 0.0222, 0.0090, -0.0320,
+ -0.0713, -0.0526, -0.0151, -0.0440, -0.0648, -0.0466, -0.0092, 0.0115,
+ -0.0129, 0.0053, -0.0344, -0.0385, 0.0392, 0.0599, 0.0414, 0.0165,
+ -0.0098, -0.0320, -0.0261, -0.0055, -0.0139, -0.0110, 0.0084, 0.0172,
+ -0.0492, -0.0537, -0.0320, -0.0036, 0.0265, 0.0385, 0.0064, -0.0280,
+ -0.0230, 0.0134, 0.0241, 0.0106, 0.0387, 0.0105, 0.0068, 0.0260,
+ 0.4940, 0.4911, 0.4849, 0.4820, 0.4837, 0.4839, 0.4824, 0.4799,
+ 0.4812, 0.4782, 0.4788, 0.4711, 0.4706, 0.4671, 0.4601, 0.4578,
+ 0.2954, 0.2121, 0.1859, 0.1958, 0.1474, 0.1086, 0.1351, 0.1362,
+ 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857,
+};
+
+static const float lsp16[] = {
0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943,
1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950,
0.1311, 0.3183, 0.4659, 0.5601, 0.6658, 0.7828, 1.0065, 1.2717,
@@ -12517,7 +12747,7 @@
-0.0429, -0.0615, -0.0893, -0.0618, -0.0384, -0.0134, -0.0232, -0.0238,
};
-const float ff_metasound_lsp22[] = {
+static const float lsp22[] = {
0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433,
1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536,
0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261,
@@ -12684,7 +12914,174 @@
0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446,
};
-const float ff_metasound_lsp44[] = {
+static const float lsp22s[] = {
+ 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433,
+ 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536,
+ 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261,
+ 1.5563, 1.6790, 1.8339, 2.1195, 2.3226, 2.4609, 2.6440, 2.8947,
+ 0.2024, 0.3362, 0.4834, 0.6784, 0.9088, 1.0850, 1.2188, 1.4054,
+ 1.6102, 1.7767, 1.9679, 2.1436, 2.3445, 2.5467, 2.7429, 2.9320,
+ 0.1181, 0.2279, 0.4413, 0.6114, 0.7710, 0.9427, 1.1142, 1.2707,
+ 1.4892, 1.7416, 1.9526, 2.1466, 2.3629, 2.5445, 2.7293, 2.9205,
+ 0.1155, 0.2720, 0.4886, 0.6812, 0.8594, 1.0422, 1.2315, 1.4116,
+ 1.6137, 1.8020, 1.9758, 2.1743, 2.3602, 2.5568, 2.7472, 2.9374,
+ 0.1110, 0.3312, 0.4735, 0.5612, 0.7129, 0.8146, 1.0233, 1.3155,
+ 1.5765, 1.7746, 1.9574, 2.1416, 2.3220, 2.5384, 2.7334, 2.9318,
+ 0.1656, 0.3350, 0.4215, 0.5609, 0.6759, 0.8503, 1.1405, 1.4094,
+ 1.6057, 1.6860, 1.7639, 2.0031, 2.2680, 2.5076, 2.7263, 2.9368,
+ 0.1466, 0.3638, 0.4587, 0.5674, 0.7381, 0.8669, 0.9619, 1.1658,
+ 1.4667, 1.7440, 1.9335, 2.1018, 2.3022, 2.5281, 2.7359, 2.9261,
+ 0.1061, 0.2566, 0.4739, 0.6751, 0.8711, 1.0704, 1.2720, 1.4655,
+ 1.6605, 1.8494, 2.0290, 2.2197, 2.4008, 2.5912, 2.7772, 2.9513,
+ 0.1116, 0.2364, 0.3971, 0.6316, 0.8583, 1.0335, 1.1686, 1.3302,
+ 1.5612, 1.7877, 1.9829, 2.2052, 2.3596, 2.5460, 2.7341, 2.9290,
+ 0.2661, 0.4186, 0.5126, 0.6477, 0.8818, 1.1045, 1.2852, 1.4128,
+ 1.5851, 1.7593, 1.9399, 2.1757, 2.3684, 2.5136, 2.6927, 2.9064,
+ 0.1495, 0.2749, 0.4391, 0.6304, 0.8239, 1.0181, 1.1995, 1.3759,
+ 1.5669, 1.7722, 1.9671, 2.1635, 2.3586, 2.5528, 2.7445, 2.9311,
+ 0.0912, 0.1759, 0.3066, 0.5660, 0.8005, 0.9568, 1.1832, 1.4504,
+ 1.6259, 1.7948, 2.0113, 2.2002, 2.3654, 2.5583, 2.7929, 2.9735,
+ 0.1353, 0.2747, 0.4078, 0.5977, 0.7658, 0.9124, 1.1081, 1.3630,
+ 1.5875, 1.7847, 1.9323, 2.1181, 2.3321, 2.5046, 2.7183, 2.9225,
+ 0.1938, 0.4063, 0.4982, 0.6002, 0.7702, 0.9071, 1.1631, 1.3885,
+ 1.6043, 1.8118, 1.9306, 2.0893, 2.2724, 2.4609, 2.6283, 2.8802,
+ 0.1857, 0.3351, 0.4381, 0.6101, 0.7561, 0.8555, 1.0384, 1.3171,
+ 1.5667, 1.6904, 1.7552, 1.9689, 2.2597, 2.5260, 2.7272, 2.9337,
+ 0.1037, 0.2159, 0.4188, 0.6174, 0.8035, 1.0285, 1.2256, 1.4230,
+ 1.6400, 1.8322, 2.0144, 2.1988, 2.3810, 2.5682, 2.7613, 2.9438,
+ 0.1625, 0.2776, 0.4225, 0.6001, 0.7879, 0.9087, 1.0801, 1.2759,
+ 1.4899, 1.7448, 1.9911, 2.1770, 2.3723, 2.5777, 2.7971, 2.9444,
+ 0.2111, 0.3640, 0.5839, 0.7290, 0.8051, 1.0023, 1.2315, 1.4143,
+ 1.5878, 1.7755, 1.9804, 2.1498, 2.3312, 2.5350, 2.7613, 2.9472,
+ 0.1423, 0.2646, 0.4136, 0.6350, 0.8070, 0.9514, 1.1168, 1.3213,
+ 1.5776, 1.7721, 1.9404, 2.1545, 2.3385, 2.5137, 2.7396, 2.9553,
+ 0.1132, 0.2386, 0.4103, 0.5931, 0.7808, 0.9881, 1.1840, 1.3860,
+ 1.6021, 1.7990, 1.9922, 2.1885, 2.3852, 2.5717, 2.7640, 2.9510,
+ 0.1267, 0.2602, 0.3913, 0.5944, 0.7598, 0.9198, 1.0781, 1.2715,
+ 1.5299, 1.7573, 1.9308, 2.1346, 2.3267, 2.5419, 2.7466, 2.9320,
+ 0.2023, 0.3417, 0.4392, 0.6141, 0.7439, 0.8593, 1.1096, 1.3543,
+ 1.5185, 1.6553, 1.7862, 2.0341, 2.2718, 2.4834, 2.7103, 2.9466,
+ 0.1113, 0.2470, 0.3677, 0.5686, 0.7700, 0.9356, 1.0806, 1.2452,
+ 1.4830, 1.7344, 1.9268, 2.1404, 2.3371, 2.5169, 2.7329, 2.9012,
+ 0.1664, 0.3554, 0.5573, 0.7471, 0.9245, 1.0998, 1.2787, 1.4655,
+ 1.6654, 1.8346, 2.0179, 2.2159, 2.4096, 2.5946, 2.7790, 2.9530,
+ 0.1313, 0.2625, 0.4731, 0.6444, 0.8110, 0.9878, 1.1493, 1.3212,
+ 1.5719, 1.8138, 1.9861, 2.1943, 2.3714, 2.5578, 2.7346, 2.9296,
+ 0.1186, 0.3035, 0.5049, 0.6860, 0.8670, 0.9975, 1.1364, 1.3471,
+ 1.5695, 1.7412, 1.9346, 2.1506, 2.3413, 2.5531, 2.7794, 2.9627,
+ 0.1108, 0.2697, 0.4787, 0.6344, 0.7909, 0.9586, 1.1440, 1.3511,
+ 1.5686, 1.7601, 1.9246, 2.1241, 2.3293, 2.5390, 2.7315, 2.9333,
+ 0.0985, 0.2302, 0.3544, 0.5759, 0.7620, 0.9651, 1.1497, 1.3080,
+ 1.5500, 1.7845, 1.9518, 2.1734, 2.3565, 2.5665, 2.7605, 2.9102,
+ 0.1208, 0.2727, 0.4381, 0.5736, 0.7382, 0.8390, 1.0102, 1.2648,
+ 1.5100, 1.7440, 1.9619, 2.1430, 2.3307, 2.5159, 2.7264, 2.9211,
+ 0.1582, 0.2777, 0.4475, 0.6551, 0.8591, 1.0084, 1.1414, 1.3291,
+ 1.5902, 1.7826, 1.9543, 2.1659, 2.3233, 2.5044, 2.6935, 2.9199,
+ 0.1360, 0.2873, 0.4585, 0.6295, 0.7592, 0.9089, 1.0492, 1.2733,
+ 1.5391, 1.7768, 1.9372, 2.1329, 2.3168, 2.5015, 2.6857, 2.8837,
+ 0.0886, 0.1829, 0.3696, 0.6126, 0.8334, 1.0135, 1.2303, 1.4674,
+ 1.6743, 1.8564, 2.0530, 2.2370, 2.3960, 2.5787, 2.7756, 2.9377,
+ 0.2005, 0.3537, 0.4700, 0.6249, 0.7385, 0.9097, 1.1759, 1.3811,
+ 1.5314, 1.6705, 1.8546, 2.1229, 2.3292, 2.5251, 2.7951, 2.9646,
+ 0.1999, 0.3112, 0.4722, 0.7146, 0.8908, 1.0028, 1.1831, 1.3903,
+ 1.6125, 1.7514, 1.9083, 2.1248, 2.3271, 2.5339, 2.6945, 2.8918,
+ 0.1243, 0.2606, 0.4382, 0.5850, 0.7705, 0.9727, 1.1214, 1.3059,
+ 1.5218, 1.7406, 1.9137, 2.1353, 2.3354, 2.5299, 2.7287, 2.9068,
+ 0.1039, 0.2426, 0.4265, 0.6284, 0.8152, 0.9941, 1.2004, 1.4038,
+ 1.5912, 1.7763, 1.9650, 2.1598, 2.3474, 2.5488, 2.7419, 2.9322,
+ 0.1364, 0.2420, 0.3886, 0.5864, 0.7663, 0.8844, 1.0860, 1.3242,
+ 1.5518, 1.7893, 2.0004, 2.1562, 2.3619, 2.5516, 2.7687, 2.9181,
+ 0.1483, 0.2851, 0.4479, 0.6312, 0.7924, 0.9821, 1.1705, 1.3386,
+ 1.5375, 1.7226, 1.9053, 2.0991, 2.2898, 2.4953, 2.7000, 2.9146,
+ 0.2332, 0.4561, 0.5407, 0.6212, 0.7524, 0.8215, 0.9522, 1.1685,
+ 1.5216, 1.7132, 1.8291, 2.0647, 2.2811, 2.4857, 2.7071, 2.9281,
+ 0.1348, 0.3126, 0.5179, 0.7192, 0.9227, 1.1363, 1.3223, 1.4756,
+ 1.6509, 1.8191, 1.9991, 2.1976, 2.3877, 2.5768, 2.7590, 2.9386,
+ 0.1093, 0.2211, 0.4763, 0.6703, 0.8282, 0.9536, 1.1202, 1.3796,
+ 1.6043, 1.8031, 1.9832, 2.1604, 2.3578, 2.5856, 2.7650, 2.9291,
+ 0.1865, 0.3027, 0.4580, 0.6719, 0.8400, 1.0082, 1.1901, 1.3782,
+ 1.5448, 1.6885, 1.9477, 2.1381, 2.2797, 2.5113, 2.7465, 2.9414,
+ 0.1575, 0.3124, 0.4649, 0.6262, 0.8095, 0.9858, 1.1676, 1.3602,
+ 1.5646, 1.7582, 1.9550, 2.1671, 2.3628, 2.5734, 2.7670, 2.9519,
+ 0.1174, 0.2777, 0.4663, 0.6333, 0.8169, 1.0096, 1.1885, 1.3847,
+ 1.5803, 1.7571, 1.9380, 2.1398, 2.3414, 2.5407, 2.7360, 2.9375,
+ 0.1073, 0.2264, 0.4083, 0.5973, 0.7474, 0.9514, 1.1349, 1.3337,
+ 1.5433, 1.7348, 1.9380, 2.1436, 2.3441, 2.5438, 2.7457, 2.9383,
+ 0.1472, 0.2880, 0.4793, 0.6268, 0.8015, 1.0063, 1.1715, 1.3644,
+ 1.5525, 1.7410, 1.9258, 2.1227, 2.3214, 2.5149, 2.7148, 2.9196,
+ 0.1414, 0.2565, 0.4349, 0.6111, 0.7695, 0.9496, 1.1212, 1.3265,
+ 1.5218, 1.7209, 1.9015, 2.0887, 2.3158, 2.5077, 2.7233, 2.9421,
+ 0.1252, 0.2667, 0.4454, 0.6431, 0.8371, 1.0124, 1.2110, 1.4160,
+ 1.6240, 1.8242, 2.0047, 2.1974, 2.3902, 2.5778, 2.7637, 2.9481,
+ 0.1321, 0.2565, 0.3846, 0.5847, 0.7578, 0.9259, 1.0637, 1.2239,
+ 1.4690, 1.7346, 1.9750, 2.1882, 2.3712, 2.5509, 2.7280, 2.8885,
+ 0.1437, 0.2930, 0.4428, 0.6156, 0.8045, 0.9638, 1.1450, 1.3138,
+ 1.5144, 1.7355, 1.9469, 2.1534, 2.3414, 2.5452, 2.7353, 2.9334,
+ 0.1692, 0.2770, 0.3831, 0.6100, 0.7825, 0.9302, 1.0690, 1.2481,
+ 1.4615, 1.6799, 1.9165, 2.1739, 2.3435, 2.5349, 2.7520, 2.9163,
+ 0.1235, 0.2489, 0.4354, 0.6343, 0.8236, 1.0066, 1.1908, 1.3474,
+ 1.5656, 1.8275, 2.0620, 2.2548, 2.4135, 2.5913, 2.7639, 2.9334,
+ 0.1090, 0.1961, 0.3854, 0.5701, 0.7024, 0.8843, 1.1393, 1.3785,
+ 1.5940, 1.7797, 1.9442, 2.1740, 2.3853, 2.5773, 2.7727, 2.9406,
+ 0.1560, 0.3477, 0.5011, 0.6287, 0.7612, 0.9896, 1.1510, 1.3420,
+ 1.5435, 1.6816, 1.8731, 2.0651, 2.2613, 2.4999, 2.7027, 2.8971,
+ 0.1459, 0.2416, 0.3833, 0.5450, 0.7916, 0.9223, 1.0662, 1.1953,
+ 1.4029, 1.6616, 1.9320, 2.1459, 2.3386, 2.5081, 2.6799, 2.9195,
+ 0.1546, 0.3854, 0.6184, 0.8460, 1.0599, 1.2428, 1.3906, 1.5550,
+ 1.7388, 1.8945, 2.0757, 2.2386, 2.4014, 2.5705, 2.7574, 2.9400,
+ 0.1080, 0.2307, 0.4112, 0.6067, 0.7725, 0.9467, 1.1285, 1.3205,
+ 1.5348, 1.7609, 1.9937, 2.1878, 2.3583, 2.5515, 2.7199, 2.9049,
+ 0.1482, 0.3178, 0.4983, 0.6342, 0.7783, 0.9880, 1.2019, 1.3404,
+ 1.5223, 1.7296, 1.9211, 2.0943, 2.2928, 2.5008, 2.7136, 2.9224,
+ 0.1145, 0.2910, 0.4891, 0.6492, 0.8126, 0.9530, 1.1180, 1.3155,
+ 1.5054, 1.6893, 1.8899, 2.1188, 2.3389, 2.5512, 2.7313, 2.9224,
+ 0.0939, 0.1689, 0.3250, 0.5792, 0.7698, 0.9245, 1.1574, 1.3865,
+ 1.5959, 1.7977, 1.9821, 2.1528, 2.3326, 2.5540, 2.7553, 2.9179,
+ 0.1243, 0.2474, 0.3923, 0.6199, 0.7908, 0.9379, 1.1497, 1.3734,
+ 1.5582, 1.7420, 1.9539, 2.1385, 2.3240, 2.5277, 2.7311, 2.9178,
+ 0.1961, 0.3748, 0.5176, 0.6387, 0.8169, 1.0477, 1.2124, 1.3869,
+ 1.5604, 1.7225, 1.8770, 2.0837, 2.2960, 2.5103, 2.6945, 2.8862,
+ 0.1295, 0.2403, 0.4149, 0.6189, 0.7913, 0.9130, 1.0832, 1.2787,
+ 1.4860, 1.7112, 1.9502, 2.1348, 2.2776, 2.4982, 2.7431, 2.9522,
+ 0.0160, 0.0362, 0.0097, 0.0057, -0.0014, -0.0073, -0.0046, -0.0064,
+ -0.0121, 0.0019, 0.0149, -0.0440, -0.0479, -0.0382, -0.0480, -0.0182,
+ 0.0170, 0.0114, -0.0298, -0.0175, -0.0033, -0.0354, -0.0510, -0.0025,
+ 0.0307, 0.0351, 0.0338, 0.0420, 0.0138, -0.0175, -0.0102, 0.0053,
+ 0.0084, -0.0003, 0.0412, -0.0027, 0.0145, -0.0039, 0.0083, 0.0400,
+ 0.0001, -0.0262, 0.0055, -0.0082, 0.0348, 0.0433, 0.0137, -0.0024,
+ -0.0055, 0.0262, 0.0521, 0.0349, 0.0185, 0.0076, -0.0319, -0.0561,
+ -0.0460, -0.0253, -0.0097, 0.0163, 0.0184, -0.0037, -0.0480, -0.0371,
+ 0.0628, 0.0665, 0.0296, -0.0057, 0.0253, 0.0227, 0.0350, 0.0692,
+ 0.0545, 0.0218, 0.0094, -0.0449, -0.0372, 0.0005, 0.0258, 0.0118,
+ 0.0285, 0.0760, 0.0822, 0.0527, -0.0299, -0.0049, 0.0170, 0.0195,
+ 0.0136, 0.0286, 0.0289, 0.0139, 0.0054, 0.0152, 0.0244, 0.0028,
+ -0.0056, -0.0260, 0.0307, 0.0572, -0.0087, 0.0088, 0.0062, 0.0000,
+ 0.0125, 0.0000, -0.0292, 0.0820, 0.0872, 0.0646, 0.0346, 0.0076,
+ -0.0022, -0.0253, -0.0567, -0.0188, -0.0336, -0.0673, -0.0549, -0.0166,
+ -0.0259, -0.0140, 0.0040, -0.0029, -0.0430, -0.0531, -0.0253, -0.0019,
+ -0.0071, 0.0393, 0.0072, -0.0327, -0.0236, -0.0235, -0.0177, -0.0186,
+ -0.0280, -0.0201, -0.0077, 0.0383, 0.0418, 0.0321, 0.0294, 0.0169,
+ 0.0468, 0.0301, 0.0133, 0.0363, 0.0516, 0.0937, 0.1240, 0.1404,
+ 0.1325, 0.1178, 0.0999, 0.0251, -0.0037, -0.0495, -0.0703, -0.0219,
+ -0.0261, -0.0304, -0.0204, -0.0372, 0.0355, 0.0131, -0.0093, -0.0099,
+ -0.0069, -0.0034, -0.0065, -0.0208, -0.0231, -0.0117, -0.0211, -0.0243,
+ 0.0046, -0.0107, -0.0070, 0.0123, 0.0230, 0.0152, 0.0164, 0.0412,
+ 0.0619, 0.0858, 0.0862, -0.0056, 0.0125, 0.0182, 0.0347, 0.0388,
+ 0.0456, 0.0407, -0.0249, -0.0460, 0.0206, 0.0299, 0.0253, 0.0207,
+ 0.0177, 0.0238, 0.0253, 0.0030, 0.0042, 0.0020, -0.0081, -0.0136,
+ -0.0290, -0.0042, 0.0122, 0.0051, 0.0107, 0.0228, 0.0211, -0.0068,
+ -0.0436, -0.0299, -0.0078, -0.0779, -0.1157, -0.0679, 0.0172, 0.0150,
+ -0.0051, 0.0081, -0.0512, -0.0616, 0.0576, 0.0799, 0.0803, 0.0336,
+ 0.0001, -0.0298, -0.0747, -0.0115, -0.0101, -0.0170, -0.0050, 0.0174,
+ -0.0290, -0.0601, -0.0150, 0.0121, 0.0165, 0.0230, 0.0028, -0.0317,
+ -0.0165, 0.0356, 0.0451, 0.0120, 0.0321, 0.0084, -0.0058, 0.0122,
+ 0.1935, 0.1802, 0.2195, 0.2410, 0.2201, 0.1915, 0.1840, 0.1935,
+ 0.2213, 0.2079, 0.1858, 0.1974, 0.2239, 0.2173, 0.1840, 0.2120,
+ 0.4912, 0.4777, 0.4607, 0.4395, 0.4426, 0.4388, 0.4416, 0.4345,
+ 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446,
+};
+
+static const float lsp44s[] = {
0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915,
1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765,
2.5187, 2.6530, 2.7895, 2.9354, 0.0944, 0.1974, 0.3046, 0.4714,
@@ -12892,7 +13289,6 @@
0.1897, 0.1772, 0.1651, 0.1247, 0.1041, 0.1231, 0.1809, 0.2234,
};
-#if CONFIG_METASOUND_DECODER
static const int16_t shape8[] = {
2765, 1262, 6624, 867, 688, 1884, 3245, 1248,
-2160, 593, 182, -1004, -1067, 687, 1021, -920,
@@ -14575,6 +14971,17 @@
29, 36, 45, 60, 80, 113, 173, 302,
};
+static const uint16_t bark_tab_s22_128[] = {
+ 1, 2, 1, 2, 3, 4, 6, 10,
+ 23, 76,
+};
+
+static const uint16_t bark_tab_m22_512[] = {
+ 3, 2, 3, 3, 3, 4, 3, 5,
+ 4, 6, 7, 8, 10, 14, 18, 25,
+ 36, 55, 95, 208,
+};
+
static const uint16_t bark_tab_l22s_1024[] = {
6, 7, 6, 6, 7, 7, 7, 7,
7, 8, 9, 8, 10, 10, 11, 12,
@@ -14599,13 +15006,11 @@
64, 79, 98, 123, 161, 220, 320, 512,
};
-#define bark_tab_m22_512 bark_tab_m44_512 /* Both tables are identical */
static const uint16_t bark_tab_m44_512[] = {
3, 2, 3, 3, 3, 4, 3, 5, 4, 6, 7, 8, 10, 14, 18, 25,
36, 55, 95, 208,
};
-#define bark_tab_s22_128 bark_tab_s44_128 /* Both tables are identical */
static const uint16_t bark_tab_s44_128[] = {
1, 2, 1, 2, 3, 4, 6, 10, 23, 76
};
@@ -14616,7 +15021,7 @@
{ 2, bark_tab_m8_256, 20, fcb8m, 2, 5, cb0806sm0, cb0806sm1, 22 },
{ 1, bark_tab_l8_512, 30, fcb8l, 3, 6, cb0806sl0, cb0806sl1, 24 }
},
- 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200
+ 512, 12, lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200
};
const TwinVQModeTab ff_metasound_mode0806s = {
@@ -14625,7 +15030,7 @@
{ 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0806sm0, cb0806sm1, 22 },
{ 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0806sl0, cb0806sl1, 24 }
},
- 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200
+ 512, 12, lsp8s, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200
};
const TwinVQModeTab ff_metasound_mode0808 = {
@@ -14634,7 +15039,7 @@
{ 2, bark_tab_m8_256, 20, fcb8m, 2, 5, cb0808m0, cb0808m1, 16 },
{ 1, bark_tab_l8_512, 30, fcb8l, 3, 6, cb0808l0, cb0808l1, 17 }
},
- 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200
+ 512, 12, lsp8, 1, 5, 3, 3, shape8, 8, 28, 20, 6, 200
};
const TwinVQModeTab ff_metasound_mode0808s = {
@@ -14643,7 +15048,7 @@
{ 2, bark_tab_m8s_256, 20, fcb8sm, 2, 5, cb0808sm0, cb0808sm1, 16 },
{ 1, bark_tab_l8s_512, 30, fcb8sl, 3, 6, cb0808sl0, cb0808sl1, 17 }
},
- 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200
+ 512, 12, lsp8s, 1, 5, 3, 3, shape8s, 8, 28, 20, 6, 200
};
const TwinVQModeTab ff_metasound_mode1110 = {
@@ -14652,7 +15057,7 @@
{ 2, bark_tab_m11_256, 16, fcb11m, 2, 5, cb1110m0, cb1110m1, 18 },
{ 1, bark_tab_l11_512, 24, fcb11l, 3, 6, cb1110l0, cb1110l1, 19 }
},
- 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, shape11, 9, 28, 20, 7, 200
+ 512, 16, lsp11, 1, 6, 4, 3, shape11, 9, 28, 20, 7, 200
};
const TwinVQModeTab ff_metasound_mode1110s = {
@@ -14661,7 +15066,7 @@
{ 2, bark_tab_m11s_256, 20, fcb11sm, 2, 5, cb1110sm0, cb1110sm1, 18 },
{ 1, bark_tab_l11s_512, 30, fcb11sl, 3, 6, cb1110sl0, cb1110sl1, 20 }
},
- 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200
+ 512, 16, lsp11s, 1, 6, 4, 3, shape11s, 9, 36, 30, 7, 200
};
const TwinVQModeTab ff_metasound_mode1616 = {
@@ -14670,7 +15075,7 @@
{ 2, bark_tab_m16_512, 24, fcb16m, 2, 5, cb1616m0, cb1616m1, 15 },
{ 1, bark_tab_l16_1024, 30, fcb16l, 3, 6, cb1616l0, cb1616l1, 16 }
},
- 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, shape16, 9, 28, 30, 7, 200
+ 1024, 16, lsp16, 1, 6, 4, 3, shape16, 9, 28, 30, 7, 200
};
const TwinVQModeTab ff_metasound_mode1616s = {
@@ -14679,7 +15084,7 @@
{ 2, bark_tab_m16s_512, 20, fcb16sm, 2, 5, cb1616sm0, cb1616sm1, 15 },
{ 1, bark_tab_l16s_1024, 30, fcb16sl, 3, 6, cb1616sl0, cb1616sl1, 16 }
},
- 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, shape16s, 9, 56, 60, 7, 200
+ 1024, 16, lsp16, 1, 6, 4, 3, shape16s, 9, 56, 60, 7, 200
};
const TwinVQModeTab ff_metasound_mode2224 = {
@@ -14688,7 +15093,7 @@
{ 2, bark_tab_m22_512, 20, fcb22m, 2, 6, cb2224m0, cb2224m1, 14 },
{ 1, bark_tab_l22_1024, 32, fcb22l, 4, 6, cb2224l0, cb2224l1, 15 }
},
- 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, shape22, 9, 56, 36, 7, 200
+ 1024, 16, lsp22, 1, 6, 4, 3, shape22, 9, 56, 36, 7, 200
};
const TwinVQModeTab ff_metasound_mode2224s = {
@@ -14697,7 +15102,7 @@
{ 2, bark_tab_m22s_512, 20, fcb22sm, 2, 6, cb2224sm0, cb2224sm1, 14 },
{ 1, bark_tab_l22s_1024, 32, fcb22sl, 4, 6, cb2224sl0, cb2224sl1, 15 }
},
- 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200
+ 1024, 16, lsp22s, 1, 6, 4, 3, shape22s, 9, 56, 36, 7, 200
};
const TwinVQModeTab ff_metasound_mode4432 = {
@@ -14706,7 +15111,16 @@
{ 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4432m0, cb4432m1, 21 },
{ 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4432l0, cb4432l1, 22 }
},
- 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200,
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200,
+};
+
+const TwinVQModeTab ff_metasound_mode4432s = {
+ {
+ { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4432s0, cb4432s1, 23 },
+ { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4432m0, cb4432m1, 21 },
+ { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4432l0, cb4432l1, 22 }
+ },
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200,
};
const TwinVQModeTab ff_metasound_mode4440 = {
@@ -14715,7 +15129,16 @@
{ 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4440sm0, cb4440sm1, 17 },
{ 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4440sl0, cb4440sl1, 17 }
},
- 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
+};
+
+const TwinVQModeTab ff_metasound_mode4440s = {
+ {
+ { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4440ss0, cb4440ss1, 18 },
+ { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4440sm0, cb4440sm1, 17 },
+ { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4440sl0, cb4440sl1, 17 }
+ },
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
};
const TwinVQModeTab ff_metasound_mode4448 = {
@@ -14724,6 +15147,14 @@
{ 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4448sm0, cb4448sm1, 14 },
{ 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4448sl0, cb4448sl1, 14 }
},
- 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
};
-#endif /* CONFIG_METASOUND_DECODER */
+
+const TwinVQModeTab ff_metasound_mode4448s = {
+ {
+ { 16, bark_tab_s44_128, 10, fcb44ss, 1, 6, cb4448ss0, cb4448ss1, 15 },
+ { 4, bark_tab_m44_512, 20, fcb44sm, 2, 6, cb4448sm0, cb4448sm1, 14 },
+ { 1, bark_tab_l44_2048, 40, fcb44sl, 4, 6, cb4448sl0, cb4448sl1, 14 }
+ },
+ 2048, 20, lsp44s, 1, 6, 4, 4, shape44s, 9, 84, 54, 7, 200
+};
diff --git a/libavcodec/metasound_data.h b/libavcodec/metasound_data.h
index 24c77c3..5c33411 100644
--- a/libavcodec/metasound_data.h
+++ b/libavcodec/metasound_data.h
@@ -27,12 +27,6 @@
#include "twinvq.h"
-extern const float ff_metasound_lsp8[];
-extern const float ff_metasound_lsp11[];
-extern const float ff_metasound_lsp16[];
-extern const float ff_metasound_lsp22[];
-extern const float ff_metasound_lsp44[];
-
extern const TwinVQModeTab ff_metasound_mode0806;
extern const TwinVQModeTab ff_metasound_mode0806s;
extern const TwinVQModeTab ff_metasound_mode0808;
@@ -46,7 +40,10 @@
extern const TwinVQModeTab ff_metasound_mode2232;
extern const TwinVQModeTab ff_metasound_mode2232s;
extern const TwinVQModeTab ff_metasound_mode4432;
+extern const TwinVQModeTab ff_metasound_mode4432s;
extern const TwinVQModeTab ff_metasound_mode4440;
+extern const TwinVQModeTab ff_metasound_mode4440s;
extern const TwinVQModeTab ff_metasound_mode4448;
+extern const TwinVQModeTab ff_metasound_mode4448s;
#endif /* AVCODEC_METASOUND_DATA_H */
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 407faa0..ea6a7ef 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <stdint.h>
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "avcodec.h"
diff --git a/libavcodec/mips/aacsbr_mips.c b/libavcodec/mips/aacsbr_mips.c
index 33fd9b2..5ef5e68 100644
--- a/libavcodec/mips/aacsbr_mips.c
+++ b/libavcodec/mips/aacsbr_mips.c
@@ -53,7 +53,6 @@
#include "libavcodec/aac.h"
#include "libavcodec/aacsbr.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/mips/asmdefs.h"
#define ENVELOPE_ADJUSTMENT_OFFSET 2
diff --git a/libavcodec/mips/constants.c b/libavcodec/mips/constants.c
index 8c990b6..a7c4a5c 100644
--- a/libavcodec/mips/constants.c
+++ b/libavcodec/mips/constants.c
@@ -20,7 +20,7 @@
*/
#include "config.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "constants.h"
DECLARE_ALIGNED(8, const uint64_t, ff_pw_1) = {0x0001000100010001ULL};
diff --git a/libavcodec/mips/h264dsp_mmi.c b/libavcodec/mips/h264dsp_mmi.c
index d4fcef0..173e191 100644
--- a/libavcodec/mips/h264dsp_mmi.c
+++ b/libavcodec/mips/h264dsp_mmi.c
@@ -26,7 +26,6 @@
#include "libavcodec/bit_depth_template.c"
#include "h264dsp_mips.h"
#include "libavutil/mips/mmiutils.h"
-#include "libavutil/mem_internal.h"
void ff_h264_add_pixels4_8_mmi(uint8_t *dst, int16_t *src, int stride)
{
diff --git a/libavcodec/mips/simple_idct_mmi.c b/libavcodec/mips/simple_idct_mmi.c
index e4b58dc..73d797f 100644
--- a/libavcodec/mips/simple_idct_mmi.c
+++ b/libavcodec/mips/simple_idct_mmi.c
@@ -26,7 +26,6 @@
#include "constants.h"
#include "libavutil/mips/asmdefs.h"
#include "libavutil/mips/mmiutils.h"
-#include "libavutil/mem_internal.h"
#define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
#define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
index 8355cd1..9837868 100644
--- a/libavcodec/mips/vc1dsp_mmi.c
+++ b/libavcodec/mips/vc1dsp_mmi.c
@@ -21,13 +21,10 @@
*/
#include "libavutil/avassert.h"
-#include "libavutil/mem_internal.h"
-
#include "libavcodec/vc1dsp.h"
#include "constants.h"
#include "vc1dsp_mips.h"
#include "hpeldsp_mips.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/mips/mmiutils.h"
#define VC1_INV_TRANCS_8_TYPE1(o1, o2, r1, r2, r3, r4, c0) \
diff --git a/libavcodec/mips/vp8dsp_mmi.c b/libavcodec/mips/vp8dsp_mmi.c
index aa6e856..bd80aa1 100644
--- a/libavcodec/mips/vp8dsp_mmi.c
+++ b/libavcodec/mips/vp8dsp_mmi.c
@@ -24,7 +24,6 @@
#include "vp8dsp_mips.h"
#include "constants.h"
#include "libavutil/mips/mmiutils.h"
-#include "libavutil/mem_internal.h"
#define DECLARE_DOUBLE_1 double db_1
#define DECLARE_DOUBLE_2 double db_2
diff --git a/libavcodec/mips/xvid_idct_mmi.c b/libavcodec/mips/xvid_idct_mmi.c
index 034a48d..b822b8a 100644
--- a/libavcodec/mips/xvid_idct_mmi.c
+++ b/libavcodec/mips/xvid_idct_mmi.c
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
-
#include "idctdsp_mips.h"
#include "xvididct_mips.h"
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 20f310f..82098e4 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -51,6 +51,40 @@
#include "bytestream.h"
+static void build_huffman_codes(uint8_t *huff_size, const uint8_t *bits_table)
+{
+ for (int i = 1, k = 0; i <= 16; i++) {
+ int nb = bits_table[i];
+ for (int j = 0; j < nb;j++) {
+ huff_size[k] = i;
+ k++;
+ }
+ }
+}
+
+static int build_vlc(VLC *vlc, const uint8_t *bits_table,
+ const uint8_t *val_table, int nb_codes,
+ int is_ac, void *logctx)
+{
+ uint8_t huff_size[256];
+ uint16_t huff_sym[256];
+ int i;
+
+ av_assert0(nb_codes <= 256);
+
+ build_huffman_codes(huff_size, bits_table);
+
+ for (i = 0; i < nb_codes; i++) {
+ huff_sym[i] = val_table[i] + 16 * is_ac;
+
+ if (is_ac && !val_table[i])
+ huff_sym[i] = 16 * 256;
+ }
+
+ return ff_init_vlc_from_lengths(vlc, 9, nb_codes, huff_size, 1,
+ huff_sym, 2, 2, 0, 0, logctx);
+}
+
static int init_default_huffman_tables(MJpegDecodeContext *s)
{
static const struct {
@@ -76,9 +110,9 @@
int i, ret;
for (i = 0; i < FF_ARRAY_ELEMS(ht); i++) {
- ret = ff_mjpeg_build_vlc(&s->vlcs[ht[i].class][ht[i].index],
- ht[i].bits, ht[i].values,
- ht[i].class == 1, s->avctx);
+ ret = build_vlc(&s->vlcs[ht[i].class][ht[i].index],
+ ht[i].bits, ht[i].values, ht[i].length,
+ ht[i].class == 1, s->avctx);
if (ret < 0)
return ret;
@@ -138,7 +172,7 @@
s->start_code = -1;
s->first_picture = 1;
s->got_picture = 0;
- s->orig_height = avctx->coded_height;
+ s->org_height = avctx->coded_height;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
avctx->colorspace = AVCOL_SPC_BT470BG;
s->hwaccel_pix_fmt = s->hwaccel_sw_pix_fmt = AV_PIX_FMT_NONE;
@@ -273,14 +307,14 @@
ff_free_vlc(&s->vlcs[class][index]);
av_log(s->avctx, AV_LOG_DEBUG, "class=%d index=%d nb_codes=%d\n",
class, index, n);
- if ((ret = ff_mjpeg_build_vlc(&s->vlcs[class][index], bits_table,
- val_table, class > 0, s->avctx)) < 0)
+ if ((ret = build_vlc(&s->vlcs[class][index], bits_table, val_table,
+ n, class > 0, s->avctx)) < 0)
return ret;
if (class > 0) {
ff_free_vlc(&s->vlcs[2][index]);
- if ((ret = ff_mjpeg_build_vlc(&s->vlcs[2][index], bits_table,
- val_table, 0, s->avctx)) < 0)
+ if ((ret = build_vlc(&s->vlcs[2][index], bits_table, val_table,
+ n, 0, s->avctx)) < 0)
return ret;
}
@@ -432,8 +466,8 @@
/* test interlaced mode */
if (s->first_picture &&
(s->multiscope != 2 || s->avctx->time_base.den >= 25 * s->avctx->time_base.num) &&
- s->orig_height != 0 &&
- s->height < ((s->orig_height * 3) / 4)) {
+ s->org_height != 0 &&
+ s->height < ((s->org_height * 3) / 4)) {
s->interlaced = 1;
s->bottom_field = s->interlace_polarity;
s->picture_ptr->interlaced_frame = 1;
@@ -445,11 +479,6 @@
if (ret < 0)
return ret;
- if ((s->avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
- s->avctx->codec_tag == MKTAG('A', 'V', 'D', 'J')) &&
- s->orig_height < height)
- s->avctx->height = AV_CEIL_RSHIFT(s->orig_height, s->avctx->lowres);
-
s->first_picture = 0;
} else {
size_change = 0;
@@ -2576,13 +2605,21 @@
s->got_picture = 0;
frame->pkt_dts = s->pkt->dts;
+ frame->best_effort_timestamp = s->pkt->pts;
- if (!s->lossless && avctx->debug & FF_DEBUG_QP) {
+ if (!s->lossless) {
int qp = FFMAX3(s->qscale[0],
s->qscale[1],
s->qscale[2]);
+ int qpw = (s->width + 15) / 16;
+ AVBufferRef *qp_table_buf = av_buffer_alloc(qpw);
+ if (qp_table_buf) {
+ memset(qp_table_buf->data, qp, qpw);
+ av_frame_set_qp_table(frame, qp_table_buf, 0, FF_QSCALE_TYPE_MPEG1);
+ }
- av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
+ if(avctx->debug & FF_DEBUG_QP)
+ av_log(avctx, AV_LOG_DEBUG, "QP: %d\n", qp);
}
goto the_end;
@@ -2860,12 +2897,6 @@
return ret;
}
}
- if ((avctx->codec_tag == MKTAG('A', 'V', 'R', 'n') ||
- avctx->codec_tag == MKTAG('A', 'V', 'D', 'J')) &&
- avctx->coded_height > s->orig_height) {
- frame->height = AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres);
- frame->crop_top = frame->height - avctx->height;
- }
ret = 0;
@@ -2960,7 +2991,7 @@
.profiles = NULL_IF_CONFIG_SMALL(ff_mjpeg_profiles),
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_SETS_PKT_DTS,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_MJPEG_NVDEC_HWACCEL
HWACCEL_NVDEC(mjpeg),
#endif
@@ -3002,6 +3033,6 @@
.flush = decode_flush,
.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_EXPORTS_CROPPING |
- FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP,
+ FF_CODEC_CAP_SETS_PKT_DTS,
};
#endif
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index 732aeab..d9844ad 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -30,7 +30,6 @@
#define AVCODEC_MJPEGDEC_H
#include "libavutil/log.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/stereo3d.h"
@@ -60,7 +59,7 @@
VLC vlcs[3][4];
int qscale[4]; ///< quantizer scale calculated from quant_matrixes
- int orig_height; /* size given at codec init */
+ int org_height; /* size given at codec init */
int first_picture; /* true if decoding first picture */
int interlaced; /* true if interlaced */
int bottom_field; /* true if bottom field */
@@ -161,8 +160,6 @@
void *hwaccel_picture_private;
} MJpegDecodeContext;
-int ff_mjpeg_build_vlc(VLC *vlc, const uint8_t *bits_table,
- const uint8_t *val_table, int is_ac, void *logctx);
int ff_mjpeg_decode_init(AVCodecContext *avctx);
int ff_mjpeg_decode_end(AVCodecContext *avctx);
int ff_mjpeg_receive_frame(AVCodecContext *avctx, AVFrame *frame);
diff --git a/libavcodec/mjpegdec_common.c b/libavcodec/mjpegdec_common.c
deleted file mode 100644
index 701ddfe..0000000
--- a/libavcodec/mjpegdec_common.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * MJPEG decoder VLC code
- * Copyright (c) 2000, 2001 Fabrice Bellard
- * Copyright (c) 2003 Alex Beregszaszi
- * Copyright (c) 2003-2004 Michael Niedermayer
- *
- * 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
- */
-
-#include <stdint.h>
-#include "libavutil/avassert.h"
-#include "mjpegdec.h"
-#include "vlc.h"
-
-static int build_huffman_codes(uint8_t *huff_size, const uint8_t *bits_table)
-{
- int nb_codes = 0;
- for (int i = 1, j = 0; i <= 16; i++) {
- nb_codes += bits_table[i];
- av_assert1(nb_codes <= 256);
- for (; j < nb_codes; j++)
- huff_size[j] = i;
- }
- return nb_codes;
-}
-
-int ff_mjpeg_build_vlc(VLC *vlc, const uint8_t *bits_table,
- const uint8_t *val_table, int is_ac, void *logctx)
-{
- uint8_t huff_size[256];
- uint16_t huff_sym[256];
- int nb_codes = build_huffman_codes(huff_size, bits_table);
-
- for (int i = 0; i < nb_codes; i++) {
- huff_sym[i] = val_table[i] + 16 * is_ac;
-
- if (is_ac && !val_table[i])
- huff_sym[i] = 16 * 256;
- }
-
- return ff_init_vlc_from_lengths(vlc, 9, nb_codes, huff_size, 1,
- huff_sym, 2, 2, 0, 0, logctx);
-}
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 22af094..56ccbc5 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -35,198 +35,11 @@
#include "avcodec.h"
#include "jpegtables.h"
#include "mjpegenc_common.h"
-#include "mjpegenc_huffman.h"
#include "mpegvideo.h"
#include "mjpeg.h"
#include "mjpegenc.h"
#include "profiles.h"
-static av_cold void init_uni_ac_vlc(const uint8_t huff_size_ac[256],
- uint8_t *uni_ac_vlc_len)
-{
- for (int i = 0; i < 128; i++) {
- int level = i - 64;
- if (!level)
- continue;
- for (int run = 0; run < 64; run++) {
- int len, code, nbits;
- int alevel = FFABS(level);
-
- len = (run >> 4) * huff_size_ac[0xf0];
-
- nbits= av_log2_16bit(alevel) + 1;
- code = ((15&run) << 4) | nbits;
-
- len += huff_size_ac[code] + nbits;
-
- uni_ac_vlc_len[UNI_AC_ENC_INDEX(run, i)] = len;
- // We ignore EOB as its just a constant which does not change generally
- }
- }
-}
-
-/**
- * Encodes and outputs the entire frame in the JPEG format.
- *
- * @param s The MpegEncContext.
- */
-static void mjpeg_encode_picture_frame(MpegEncContext *s)
-{
- int nbits, code, table_id;
- MJpegContext *m = s->mjpeg_ctx;
- uint8_t *huff_size[4] = { m->huff_size_dc_luminance,
- m->huff_size_dc_chrominance,
- m->huff_size_ac_luminance,
- m->huff_size_ac_chrominance };
- uint16_t *huff_code[4] = { m->huff_code_dc_luminance,
- m->huff_code_dc_chrominance,
- m->huff_code_ac_luminance,
- m->huff_code_ac_chrominance };
- size_t total_bits = 0;
- size_t bytes_needed;
-
- s->header_bits = get_bits_diff(s);
- // Estimate the total size first
- for (int i = 0; i < m->huff_ncode; i++) {
- table_id = m->huff_buffer[i].table_id;
- code = m->huff_buffer[i].code;
- nbits = code & 0xf;
-
- total_bits += huff_size[table_id][code] + nbits;
- }
-
- bytes_needed = (total_bits + 7) / 8;
- ff_mpv_reallocate_putbitbuffer(s, bytes_needed, bytes_needed);
-
- for (int i = 0; i < m->huff_ncode; i++) {
- table_id = m->huff_buffer[i].table_id;
- code = m->huff_buffer[i].code;
- nbits = code & 0xf;
-
- put_bits(&s->pb, huff_size[table_id][code], huff_code[table_id][code]);
- if (nbits != 0) {
- put_sbits(&s->pb, nbits, m->huff_buffer[i].mant);
- }
- }
-
- m->huff_ncode = 0;
- s->i_tex_bits = get_bits_diff(s);
-}
-
-/**
- * Builds all 4 optimal Huffman tables.
- *
- * Uses the data stored in the JPEG buffer to compute the tables.
- * Stores the Huffman tables in the bits_* and val_* arrays in the MJpegContext.
- *
- * @param m MJpegContext containing the JPEG buffer.
- */
-static void mjpeg_build_optimal_huffman(MJpegContext *m)
-{
- MJpegEncHuffmanContext dc_luminance_ctx;
- MJpegEncHuffmanContext dc_chrominance_ctx;
- MJpegEncHuffmanContext ac_luminance_ctx;
- MJpegEncHuffmanContext ac_chrominance_ctx;
- MJpegEncHuffmanContext *ctx[4] = { &dc_luminance_ctx,
- &dc_chrominance_ctx,
- &ac_luminance_ctx,
- &ac_chrominance_ctx };
- for (int i = 0; i < 4; i++)
- ff_mjpeg_encode_huffman_init(ctx[i]);
-
- for (int i = 0; i < m->huff_ncode; i++) {
- int table_id = m->huff_buffer[i].table_id;
- int code = m->huff_buffer[i].code;
-
- ff_mjpeg_encode_huffman_increment(ctx[table_id], code);
- }
-
- ff_mjpeg_encode_huffman_close(&dc_luminance_ctx,
- m->bits_dc_luminance,
- m->val_dc_luminance, 12);
- ff_mjpeg_encode_huffman_close(&dc_chrominance_ctx,
- m->bits_dc_chrominance,
- m->val_dc_chrominance, 12);
- ff_mjpeg_encode_huffman_close(&ac_luminance_ctx,
- m->bits_ac_luminance,
- m->val_ac_luminance, 256);
- ff_mjpeg_encode_huffman_close(&ac_chrominance_ctx,
- m->bits_ac_chrominance,
- m->val_ac_chrominance, 256);
-
- ff_mjpeg_build_huffman_codes(m->huff_size_dc_luminance,
- m->huff_code_dc_luminance,
- m->bits_dc_luminance,
- m->val_dc_luminance);
- ff_mjpeg_build_huffman_codes(m->huff_size_dc_chrominance,
- m->huff_code_dc_chrominance,
- m->bits_dc_chrominance,
- m->val_dc_chrominance);
- ff_mjpeg_build_huffman_codes(m->huff_size_ac_luminance,
- m->huff_code_ac_luminance,
- m->bits_ac_luminance,
- m->val_ac_luminance);
- ff_mjpeg_build_huffman_codes(m->huff_size_ac_chrominance,
- m->huff_code_ac_chrominance,
- m->bits_ac_chrominance,
- m->val_ac_chrominance);
-}
-
-/**
- * Writes the complete JPEG frame when optimal huffman tables are enabled,
- * otherwise writes the stuffing.
- *
- * Header + values + stuffing.
- *
- * @param s The MpegEncContext.
- * @return int Error code, 0 if successful.
- */
-int ff_mjpeg_encode_stuffing(MpegEncContext *s)
-{
- PutBitContext *pbc = &s->pb;
- int mb_y = s->mb_y - !s->mb_x;
- int ret;
- MJpegContext *m;
-
- m = s->mjpeg_ctx;
-
- if (s->huffman == HUFFMAN_TABLE_OPTIMAL) {
- mjpeg_build_optimal_huffman(m);
-
- // Replace the VLCs with the optimal ones.
- // The default ones may be used for trellis during quantization.
- init_uni_ac_vlc(m->huff_size_ac_luminance, m->uni_ac_vlc_len);
- init_uni_ac_vlc(m->huff_size_ac_chrominance, m->uni_chroma_ac_vlc_len);
- s->intra_ac_vlc_length =
- s->intra_ac_vlc_last_length = m->uni_ac_vlc_len;
- s->intra_chroma_ac_vlc_length =
- s->intra_chroma_ac_vlc_last_length = m->uni_chroma_ac_vlc_len;
-
- ff_mjpeg_encode_picture_header(s->avctx, &s->pb, &s->intra_scantable,
- s->pred, s->intra_matrix, s->chroma_intra_matrix);
- mjpeg_encode_picture_frame(s);
- }
-
- ret = ff_mpv_reallocate_putbitbuffer(s, put_bits_count(&s->pb) / 8 + 100,
- put_bits_count(&s->pb) / 4 + 1000);
- if (ret < 0) {
- av_log(s->avctx, AV_LOG_ERROR, "Buffer reallocation failed\n");
- goto fail;
- }
-
- ff_mjpeg_escape_FF(pbc, s->esc_pos);
-
- if ((s->avctx->active_thread_type & FF_THREAD_SLICE) && mb_y < s->mb_height - 1)
- put_marker(pbc, RST0 + (mb_y&7));
- s->esc_pos = put_bits_count(pbc) >> 3;
-
-fail:
- for (int i = 0; i < 3; i++)
- s->last_dc[i] = 128 << s->intra_dc_precision;
-
- return ret;
-}
-
static int alloc_huffman(MpegEncContext *s)
{
MJpegContext *m = s->mjpeg_ctx;
@@ -293,8 +106,8 @@
avpriv_mjpeg_bits_ac_chrominance,
avpriv_mjpeg_val_ac_chrominance);
- init_uni_ac_vlc(m->huff_size_ac_luminance, m->uni_ac_vlc_len);
- init_uni_ac_vlc(m->huff_size_ac_chrominance, m->uni_chroma_ac_vlc_len);
+ ff_init_uni_ac_vlc(m->huff_size_ac_luminance, m->uni_ac_vlc_len);
+ ff_init_uni_ac_vlc(m->huff_size_ac_chrominance, m->uni_chroma_ac_vlc_len);
s->intra_ac_vlc_length =
s->intra_ac_vlc_last_length = m->uni_ac_vlc_len;
s->intra_chroma_ac_vlc_length =
@@ -602,7 +415,7 @@
.encode2 = ff_mpv_encode_picture,
.close = ff_mpv_encode_end,
.capabilities = AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE
},
@@ -628,7 +441,7 @@
.init = ff_mpv_encode_init,
.encode2 = amv_encode_picture,
.close = ff_mpv_encode_end,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE
},
diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h
index 2e92511..d7ddc35 100644
--- a/libavcodec/mjpegenc.h
+++ b/libavcodec/mjpegenc.h
@@ -107,6 +107,5 @@
int ff_mjpeg_encode_init(MpegEncContext *s);
void ff_mjpeg_encode_close(MpegEncContext *s);
void ff_mjpeg_encode_mb(MpegEncContext *s, int16_t block[12][64]);
-int ff_mjpeg_encode_stuffing(MpegEncContext *s);
#endif /* AVCODEC_MJPEGENC_H */
diff --git a/libavcodec/mjpegenc_common.c b/libavcodec/mjpegenc_common.c
index 12dd7be..0b82777 100644
--- a/libavcodec/mjpegenc_common.c
+++ b/libavcodec/mjpegenc_common.c
@@ -23,6 +23,7 @@
#include <stdint.h>
#include <string.h>
+#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
@@ -32,8 +33,35 @@
#include "put_bits.h"
#include "mjpegenc.h"
#include "mjpegenc_common.h"
+#include "mjpegenc_huffman.h"
#include "mjpeg.h"
+av_cold void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256], uint8_t *uni_ac_vlc_len)
+{
+ int i;
+
+ for (i = 0; i < 128; i++) {
+ int level = i - 64;
+ int run;
+ if (!level)
+ continue;
+ for (run = 0; run < 64; run++) {
+ int len, code, nbits;
+ int alevel = FFABS(level);
+
+ len = (run >> 4) * huff_size_ac[0xf0];
+
+ nbits= av_log2_16bit(alevel) + 1;
+ code = ((15&run) << 4) | nbits;
+
+ len += huff_size_ac[code] + nbits;
+
+ uni_ac_vlc_len[UNI_AC_ENC_INDEX(run, i)] = len;
+ // We ignore EOB as its just a constant which does not change generally
+ }
+ }
+}
+
/* table_class: 0 = DC coef, 1 = AC coefs */
static int put_huffman_table(PutBitContext *p, int table_class, int table_id,
const uint8_t *bits_table, const uint8_t *value_table)
@@ -331,6 +359,54 @@
}
}
+/**
+ * Encodes and outputs the entire frame in the JPEG format.
+ *
+ * @param s The MpegEncContext.
+ */
+void ff_mjpeg_encode_picture_frame(MpegEncContext *s)
+{
+ int i, nbits, code, table_id;
+ MJpegContext *m = s->mjpeg_ctx;
+ uint8_t *huff_size[4] = {m->huff_size_dc_luminance,
+ m->huff_size_dc_chrominance,
+ m->huff_size_ac_luminance,
+ m->huff_size_ac_chrominance};
+ uint16_t *huff_code[4] = {m->huff_code_dc_luminance,
+ m->huff_code_dc_chrominance,
+ m->huff_code_ac_luminance,
+ m->huff_code_ac_chrominance};
+ size_t total_bits = 0;
+ size_t bytes_needed;
+
+ s->header_bits = get_bits_diff(s);
+ // Estimate the total size first
+ for (i = 0; i < m->huff_ncode; i++) {
+ table_id = m->huff_buffer[i].table_id;
+ code = m->huff_buffer[i].code;
+ nbits = code & 0xf;
+
+ total_bits += huff_size[table_id][code] + nbits;
+ }
+
+ bytes_needed = (total_bits + 7) / 8;
+ ff_mpv_reallocate_putbitbuffer(s, bytes_needed, bytes_needed);
+
+ for (i = 0; i < m->huff_ncode; i++) {
+ table_id = m->huff_buffer[i].table_id;
+ code = m->huff_buffer[i].code;
+ nbits = code & 0xf;
+
+ put_bits(&s->pb, huff_size[table_id][code], huff_code[table_id][code]);
+ if (nbits != 0) {
+ put_sbits(&s->pb, nbits, m->huff_buffer[i].mant);
+ }
+ }
+
+ m->huff_ncode = 0;
+ s->i_tex_bits = get_bits_diff(s);
+}
+
void ff_mjpeg_escape_FF(PutBitContext *pb, int start)
{
int size;
@@ -390,25 +466,122 @@
}
}
-/* isn't this function nicer than the one in the libjpeg ? */
-void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
- const uint8_t *bits_table,
- const uint8_t *val_table)
+/**
+ * Builds all 4 optimal Huffman tables.
+ *
+ * Uses the data stored in the JPEG buffer to compute the tables.
+ * Stores the Huffman tables in the bits_* and val_* arrays in the MJpegContext.
+ *
+ * @param m MJpegContext containing the JPEG buffer.
+ */
+static void ff_mjpeg_build_optimal_huffman(MJpegContext *m)
{
- int k, code;
+ int i, table_id, code;
- k = 0;
- code = 0;
- for (int i = 1; i <= 16; i++) {
- int nb = bits_table[i];
- for (int j = 0; j < nb; j++) {
- int sym = val_table[k++];
- huff_size[sym] = i;
- huff_code[sym] = code;
- code++;
- }
- code <<= 1;
+ MJpegEncHuffmanContext dc_luminance_ctx;
+ MJpegEncHuffmanContext dc_chrominance_ctx;
+ MJpegEncHuffmanContext ac_luminance_ctx;
+ MJpegEncHuffmanContext ac_chrominance_ctx;
+ MJpegEncHuffmanContext *ctx[4] = {&dc_luminance_ctx,
+ &dc_chrominance_ctx,
+ &ac_luminance_ctx,
+ &ac_chrominance_ctx};
+ for (i = 0; i < 4; i++) {
+ ff_mjpeg_encode_huffman_init(ctx[i]);
}
+ for (i = 0; i < m->huff_ncode; i++) {
+ table_id = m->huff_buffer[i].table_id;
+ code = m->huff_buffer[i].code;
+
+ ff_mjpeg_encode_huffman_increment(ctx[table_id], code);
+ }
+
+ ff_mjpeg_encode_huffman_close(&dc_luminance_ctx,
+ m->bits_dc_luminance,
+ m->val_dc_luminance, 12);
+ ff_mjpeg_encode_huffman_close(&dc_chrominance_ctx,
+ m->bits_dc_chrominance,
+ m->val_dc_chrominance, 12);
+ ff_mjpeg_encode_huffman_close(&ac_luminance_ctx,
+ m->bits_ac_luminance,
+ m->val_ac_luminance, 256);
+ ff_mjpeg_encode_huffman_close(&ac_chrominance_ctx,
+ m->bits_ac_chrominance,
+ m->val_ac_chrominance, 256);
+
+ ff_mjpeg_build_huffman_codes(m->huff_size_dc_luminance,
+ m->huff_code_dc_luminance,
+ m->bits_dc_luminance,
+ m->val_dc_luminance);
+ ff_mjpeg_build_huffman_codes(m->huff_size_dc_chrominance,
+ m->huff_code_dc_chrominance,
+ m->bits_dc_chrominance,
+ m->val_dc_chrominance);
+ ff_mjpeg_build_huffman_codes(m->huff_size_ac_luminance,
+ m->huff_code_ac_luminance,
+ m->bits_ac_luminance,
+ m->val_ac_luminance);
+ ff_mjpeg_build_huffman_codes(m->huff_size_ac_chrominance,
+ m->huff_code_ac_chrominance,
+ m->bits_ac_chrominance,
+ m->val_ac_chrominance);
+}
+
+/**
+ * Writes the complete JPEG frame when optimal huffman tables are enabled,
+ * otherwise writes the stuffing.
+ *
+ * Header + values + stuffing.
+ *
+ * @param s The MpegEncContext.
+ * @return int Error code, 0 if successful.
+ */
+int ff_mjpeg_encode_stuffing(MpegEncContext *s)
+{
+ int i;
+ PutBitContext *pbc = &s->pb;
+ int mb_y = s->mb_y - !s->mb_x;
+ int ret;
+ MJpegContext *m;
+
+ m = s->mjpeg_ctx;
+
+ if (s->huffman == HUFFMAN_TABLE_OPTIMAL) {
+ ff_mjpeg_build_optimal_huffman(m);
+
+ // Replace the VLCs with the optimal ones.
+ // The default ones may be used for trellis during quantization.
+ ff_init_uni_ac_vlc(m->huff_size_ac_luminance, m->uni_ac_vlc_len);
+ ff_init_uni_ac_vlc(m->huff_size_ac_chrominance, m->uni_chroma_ac_vlc_len);
+ s->intra_ac_vlc_length =
+ s->intra_ac_vlc_last_length = m->uni_ac_vlc_len;
+ s->intra_chroma_ac_vlc_length =
+ s->intra_chroma_ac_vlc_last_length = m->uni_chroma_ac_vlc_len;
+
+ ff_mjpeg_encode_picture_header(s->avctx, &s->pb, &s->intra_scantable,
+ s->pred, s->intra_matrix, s->chroma_intra_matrix);
+ ff_mjpeg_encode_picture_frame(s);
+ }
+
+ ret = ff_mpv_reallocate_putbitbuffer(s, put_bits_count(&s->pb) / 8 + 100,
+ put_bits_count(&s->pb) / 4 + 1000);
+
+ if (ret < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Buffer reallocation failed\n");
+ goto fail;
+ }
+
+ ff_mjpeg_escape_FF(pbc, s->esc_pos);
+
+ if((s->avctx->active_thread_type & FF_THREAD_SLICE) && mb_y < s->mb_height - 1)
+ put_marker(pbc, RST0 + (mb_y&7));
+ s->esc_pos = put_bits_count(pbc) >> 3;
+fail:
+
+ for(i=0; i<3; i++)
+ s->last_dc[i] = 128 << s->intra_dc_precision;
+
+ return ret;
}
void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits)
diff --git a/libavcodec/mjpegenc_common.h b/libavcodec/mjpegenc_common.h
index b4f8a08..e8698d1 100644
--- a/libavcodec/mjpegenc_common.h
+++ b/libavcodec/mjpegenc_common.h
@@ -25,20 +25,22 @@
#include "avcodec.h"
#include "idctdsp.h"
+#include "mpegvideo.h"
#include "put_bits.h"
void ff_mjpeg_encode_picture_header(AVCodecContext *avctx, PutBitContext *pb,
ScanTable *intra_scantable, int pred,
uint16_t luma_intra_matrix[64],
uint16_t chroma_intra_matrix[64]);
+void ff_mjpeg_encode_picture_frame(MpegEncContext *s);
void ff_mjpeg_encode_picture_trailer(PutBitContext *pb, int header_bits);
void ff_mjpeg_escape_FF(PutBitContext *pb, int start);
-void ff_mjpeg_build_huffman_codes(uint8_t *huff_size, uint16_t *huff_code,
- const uint8_t *bits_table,
- const uint8_t *val_table);
+int ff_mjpeg_encode_stuffing(MpegEncContext *s);
void ff_mjpeg_init_hvsample(AVCodecContext *avctx, int hsample[4], int vsample[4]);
void ff_mjpeg_encode_dc(PutBitContext *pb, int val,
uint8_t *huff_size, uint16_t *huff_code);
+av_cold void ff_init_uni_ac_vlc(const uint8_t huff_size_ac[256], uint8_t *uni_ac_vlc_len);
+
#endif /* AVCODEC_MJPEGENC_COMMON_H */
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 0c30034..3b1608b 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -30,7 +30,6 @@
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/channel_layout.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "get_bits.h"
#include "internal.h"
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index 9782cb8..f6159d3 100644
--- a/libavcodec/mlpenc.c
+++ b/libavcodec/mlpenc.c
@@ -1947,16 +1947,24 @@
****************************************************************************/
typedef struct {
- char path[MAJOR_HEADER_INTERVAL + 2];
- int cur_idx;
+ char path[MAJOR_HEADER_INTERVAL + 3];
int bitcount;
} PathCounter;
+static const char *path_counter_codebook[] = { "0", "1", "2", "3", };
+
+#define ZERO_PATH '0'
#define CODEBOOK_CHANGE_BITS 21
static void clear_path_counter(PathCounter *path_counter)
{
- memset(path_counter, 0, (NUM_CODEBOOKS + 1) * sizeof(*path_counter));
+ unsigned int i;
+
+ for (i = 0; i < NUM_CODEBOOKS + 1; i++) {
+ path_counter[i].path[0] = ZERO_PATH;
+ path_counter[i].path[1] = 0x00;
+ path_counter[i].bitcount = 0;
+ }
}
static int compare_best_offset(BestOffset *prev, BestOffset *cur)
@@ -1970,11 +1978,18 @@
static int best_codebook_path_cost(MLPEncodeContext *ctx, unsigned int channel,
PathCounter *src, int cur_codebook)
{
- int idx = src->cur_idx;
- BestOffset *cur_bo = ctx->best_offset[idx][channel],
- *prev_bo = idx ? ctx->best_offset[idx - 1][channel] : restart_best_offset;
+ BestOffset *cur_bo, *prev_bo = restart_best_offset;
int bitcount = src->bitcount;
- int prev_codebook = src->path[idx];
+ char *path = src->path + 1;
+ int prev_codebook;
+ int i;
+
+ for (i = 0; path[i]; i++)
+ prev_bo = ctx->best_offset[i][channel];
+
+ prev_codebook = path[i - 1] - ZERO_PATH;
+
+ cur_bo = ctx->best_offset[i][channel];
bitcount += cur_bo[cur_codebook].bitcount;
@@ -2037,8 +2052,7 @@
prev_best_bitcount = temp_bitcount;
if (src_path != dst_path)
memcpy(dst_path, src_path, sizeof(PathCounter));
- if (dst_path->cur_idx < FF_ARRAY_ELEMS(dst_path->path) - 1)
- dst_path->path[++dst_path->cur_idx] = codebook;
+ av_strlcat(dst_path->path, path_counter_codebook[codebook], sizeof(dst_path->path));
dst_path->bitcount = temp_bitcount;
}
}
@@ -2055,7 +2069,7 @@
for (index = 0; index < ctx->number_of_subblocks; index++) {
ChannelParams *cp = ctx->seq_channel_params + index*(ctx->avctx->channels) + channel;
- best_codebook = *best_path++;
+ best_codebook = *best_path++ - ZERO_PATH;
cur_bo = &ctx->best_offset[index][channel][best_codebook];
cp->huff_offset = cur_bo->offset;
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index cb15ac0..172fb61 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -1,6 +1,6 @@
/*
* MMAL Video Decoder
- * Copyright (c) 2015 rcombs
+ * Copyright (c) 2015 Rodger Combs
*
* This file is part of FFmpeg.
*
diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c
index bf47a5b..94368c2 100644
--- a/libavcodec/mobiclip.c
+++ b/libavcodec/mobiclip.c
@@ -1,6 +1,5 @@
/*
* MobiClip Video decoder
- * Copyright (c) 2015-2016 Florian Nouwt
* Copyright (c) 2017 Adib Surani
* Copyright (c) 2020 Paul B Mahol
*
@@ -545,7 +544,7 @@
static uint8_t half3(int a, int b, int c)
{
- return ((a + b + b + c) * 2 / 4 + 1) / 2;
+ return ((a + b + b + c) * 2 / 4 + 1) / 2;;
}
static uint8_t pick_above(BlockXY bxy)
@@ -849,7 +848,7 @@
uint8_t *left = frame->data[plane] + ay * frame->linesize[plane] + FFMAX(ax - 1, 0);
int bottommost = frame->data[plane][(ay + size - 1) * frame->linesize[plane] + FFMAX(ax - 1, 0)];
int rightmost = frame->data[plane][FFMAX(ay - 1, 0) * frame->linesize[plane] + ax + size - 1];
- int avg = (bottommost + rightmost + 1) / 2 + 2 * av_clip(get_se_golomb(gb), -(1<<16), 1<<16);
+ int avg = (bottommost + rightmost + 1) / 2 + 2 * get_se_golomb(gb);
int r6 = adjust(avg - bottommost, size);
int r9 = adjust(avg - rightmost, size);
int shift = adjust(size, size) == 8 ? 3 : 2;
@@ -1092,8 +1091,8 @@
sidx += 6;
if (index > 0) {
- mv.x = mv.x + (unsigned)get_se_golomb(gb);
- mv.y = mv.y + (unsigned)get_se_golomb(gb);
+ mv.x = mv.x + get_se_golomb(gb);
+ mv.y = mv.y + get_se_golomb(gb);
}
if (mv.x >= INT_MAX || mv.y >= INT_MAX)
return AVERROR_INVALIDDATA;
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 5a339fc..02c75fd 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -578,7 +578,7 @@
int dmin_sum=0, mx4_sum=0, my4_sum=0, i;
int same=1;
const int stride= c->stride;
- const uint8_t *mv_penalty = c->current_mv_penalty;
+ uint8_t *mv_penalty= c->current_mv_penalty;
int safety_clipping= s->unrestricted_mv && (s->width&15) && (s->height&15);
init_mv4_ref(c);
@@ -743,7 +743,7 @@
const int h=8;
int block;
int P[10][2];
- const uint8_t * const mv_penalty = c->current_mv_penalty;
+ uint8_t * const mv_penalty= c->current_mv_penalty;
int same=1;
const int stride= 2*s->linesize;
int dmin_sum= 0;
@@ -1120,7 +1120,7 @@
const int shift= 1+s->quarter_sample;
const int mot_stride = s->mb_stride;
const int mot_xy = mb_y*mot_stride + mb_x;
- const uint8_t * const mv_penalty = c->mv_penalty[f_code] + MAX_DMV;
+ uint8_t * const mv_penalty= c->mv_penalty[f_code] + MAX_DMV;
int mv_scale;
c->penalty_factor = get_penalty_factor(s->lambda, s->lambda2, c->avctx->me_cmp);
@@ -1184,8 +1184,8 @@
//FIXME better f_code prediction (max mv & distance)
//FIXME pointers
MotionEstContext * const c= &s->me;
- const uint8_t * const mv_penalty_f = c->mv_penalty[s->f_code] + MAX_DMV; // f_code of the prev frame
- const uint8_t * const mv_penalty_b = c->mv_penalty[s->b_code] + MAX_DMV; // f_code of the prev frame
+ uint8_t * const mv_penalty_f= c->mv_penalty[s->f_code] + MAX_DMV; // f_code of the prev frame
+ uint8_t * const mv_penalty_b= c->mv_penalty[s->b_code] + MAX_DMV; // f_code of the prev frame
int stride= c->stride;
uint8_t *dest_y = c->scratchpad;
uint8_t *ptr;
@@ -1600,7 +1600,7 @@
if (s->motion_est != FF_ME_ZERO) {
int score[8];
int i, y, range= s->avctx->me_range ? s->avctx->me_range : (INT_MAX/2);
- const uint8_t * fcode_tab = s->fcode_tab;
+ uint8_t * fcode_tab= s->fcode_tab;
int best_fcode=-1;
int best_score=-10000000;
diff --git a/libavcodec/motion_est.h b/libavcodec/motion_est.h
index 5742e51..817220f 100644
--- a/libavcodec/motion_est.h
+++ b/libavcodec/motion_est.h
@@ -90,8 +90,8 @@
op_pixels_func(*hpel_avg)[4];
qpel_mc_func(*qpel_put)[16];
qpel_mc_func(*qpel_avg)[16];
- const uint8_t (*mv_penalty)[MAX_DMV * 2 + 1]; ///< bit amount needed to encode a MV
- const uint8_t *current_mv_penalty;
+ uint8_t (*mv_penalty)[MAX_DMV * 2 + 1]; ///< bit amount needed to encode a MV
+ uint8_t *current_mv_penalty;
int (*sub_motion_search)(struct MpegEncContext *s,
int *mx_ptr, int *my_ptr, int dmin,
int src_index, int ref_index,
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index d3b2f97..13e73f2 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -34,7 +34,7 @@
const int av_unused ymin= c->ymin;\
const int av_unused xmax= c->xmax;\
const int av_unused ymax= c->ymax;\
- const uint8_t *mv_penalty = c->current_mv_penalty; \
+ uint8_t *mv_penalty= c->current_mv_penalty;\
const int pred_x= c->pred_x;\
const int pred_y= c->pred_y;\
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 7adc16d..ad790bf 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -117,7 +117,7 @@
typedef struct {
uint32_t type;
size_t base_size;
- int (*decode)(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt);
+ int (*decode)(const uint8_t *tsmb, MovTextContext *m, AVPacket *avpkt);
} Box;
static void mov_text_cleanup(MovTextContext *m)
@@ -240,14 +240,14 @@
return 0;
}
-static int decode_twrp(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt)
+static int decode_twrp(const uint8_t *tsmb, MovTextContext *m, AVPacket *avpkt)
{
m->box_flags |= TWRP_BOX;
m->w.wrap_flag = bytestream_get_byte(&tsmb);
return 0;
}
-static int decode_hlit(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt)
+static int decode_hlit(const uint8_t *tsmb, MovTextContext *m, AVPacket *avpkt)
{
m->box_flags |= HLIT_BOX;
m->h.hlit_start = bytestream_get_be16(&tsmb);
@@ -255,14 +255,14 @@
return 0;
}
-static int decode_hclr(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt)
+static int decode_hclr(const uint8_t *tsmb, MovTextContext *m, AVPacket *avpkt)
{
m->box_flags |= HCLR_BOX;
bytestream_get_buffer(&tsmb, m->c.hlit_color, 4);
return 0;
}
-static int decode_styl(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt)
+static int decode_styl(const uint8_t *tsmb, MovTextContext *m, AVPacket *avpkt)
{
int i;
int style_entries = bytestream_get_be16(&tsmb);
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index cf30adb..1bef21e 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -355,7 +355,7 @@
StyleBox *tmp;
// last style != defaults, end the style entry and start a new one
- if (s->count + 1 > FFMIN(SIZE_MAX / sizeof(*s->style_attributes), UINT16_MAX) ||
+ if (s->count + 1 > SIZE_MAX / sizeof(*s->style_attributes) ||
!(tmp = av_fast_realloc(s->style_attributes,
&s->style_attributes_bytes_allocated,
(s->count + 1) * sizeof(*s->style_attributes)))) {
diff --git a/libavcodec/mpc.h b/libavcodec/mpc.h
index f809379..704edc9 100644
--- a/libavcodec/mpc.h
+++ b/libavcodec/mpc.h
@@ -30,7 +30,6 @@
#define AVCODEC_MPC_H
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "bswapdsp.h"
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index af12a6f..720d676 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -28,9 +28,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 88dd87c..599dfa9 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -28,7 +28,6 @@
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/timecode.h"
-#include "libavutil/thread.h"
#include "internal.h"
#include "avcodec.h"
@@ -40,6 +39,8 @@
#include "bytestream.h"
#include "thread.h"
+uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+
static const uint8_t table_mb_ptype[7][2] = {
{ 3, 5 }, // 0x01 MB_INTRA
{ 1, 2 }, // 0x02 MB_PAT
@@ -131,39 +132,41 @@
VLC ff_mb_btype_vlc;
VLC ff_mb_pat_vlc;
-static av_cold void mpeg12_init_vlcs(void)
-{
- INIT_VLC_STATIC(&ff_dc_lum_vlc, DC_VLC_BITS, 12,
- ff_mpeg12_vlc_dc_lum_bits, 1, 1,
- ff_mpeg12_vlc_dc_lum_code, 2, 2, 512);
- INIT_VLC_STATIC(&ff_dc_chroma_vlc, DC_VLC_BITS, 12,
- ff_mpeg12_vlc_dc_chroma_bits, 1, 1,
- ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514);
- INIT_VLC_STATIC(&ff_mv_vlc, MV_VLC_BITS, 17,
- &ff_mpeg12_mbMotionVectorTable[0][1], 2, 1,
- &ff_mpeg12_mbMotionVectorTable[0][0], 2, 1, 266);
- INIT_VLC_STATIC(&ff_mbincr_vlc, MBINCR_VLC_BITS, 36,
- &ff_mpeg12_mbAddrIncrTable[0][1], 2, 1,
- &ff_mpeg12_mbAddrIncrTable[0][0], 2, 1, 538);
- INIT_VLC_STATIC(&ff_mb_pat_vlc, MB_PAT_VLC_BITS, 64,
- &ff_mpeg12_mbPatTable[0][1], 2, 1,
- &ff_mpeg12_mbPatTable[0][0], 2, 1, 512);
-
- INIT_VLC_STATIC(&ff_mb_ptype_vlc, MB_PTYPE_VLC_BITS, 7,
- &table_mb_ptype[0][1], 2, 1,
- &table_mb_ptype[0][0], 2, 1, 64);
- INIT_VLC_STATIC(&ff_mb_btype_vlc, MB_BTYPE_VLC_BITS, 11,
- &table_mb_btype[0][1], 2, 1,
- &table_mb_btype[0][0], 2, 1, 64);
-
- INIT_2D_VLC_RL(ff_rl_mpeg1, 680, 0);
- INIT_2D_VLC_RL(ff_rl_mpeg2, 674, 0);
-}
-
av_cold void ff_mpeg12_init_vlcs(void)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
- ff_thread_once(&init_static_once, mpeg12_init_vlcs);
+ static int done = 0;
+
+ if (!done) {
+ done = 1;
+
+ INIT_VLC_STATIC(&ff_dc_lum_vlc, DC_VLC_BITS, 12,
+ ff_mpeg12_vlc_dc_lum_bits, 1, 1,
+ ff_mpeg12_vlc_dc_lum_code, 2, 2, 512);
+ INIT_VLC_STATIC(&ff_dc_chroma_vlc, DC_VLC_BITS, 12,
+ ff_mpeg12_vlc_dc_chroma_bits, 1, 1,
+ ff_mpeg12_vlc_dc_chroma_code, 2, 2, 514);
+ INIT_VLC_STATIC(&ff_mv_vlc, MV_VLC_BITS, 17,
+ &ff_mpeg12_mbMotionVectorTable[0][1], 2, 1,
+ &ff_mpeg12_mbMotionVectorTable[0][0], 2, 1, 266);
+ INIT_VLC_STATIC(&ff_mbincr_vlc, MBINCR_VLC_BITS, 36,
+ &ff_mpeg12_mbAddrIncrTable[0][1], 2, 1,
+ &ff_mpeg12_mbAddrIncrTable[0][0], 2, 1, 538);
+ INIT_VLC_STATIC(&ff_mb_pat_vlc, MB_PAT_VLC_BITS, 64,
+ &ff_mpeg12_mbPatTable[0][1], 2, 1,
+ &ff_mpeg12_mbPatTable[0][0], 2, 1, 512);
+
+ INIT_VLC_STATIC(&ff_mb_ptype_vlc, MB_PTYPE_VLC_BITS, 7,
+ &table_mb_ptype[0][1], 2, 1,
+ &table_mb_ptype[0][0], 2, 1, 64);
+ INIT_VLC_STATIC(&ff_mb_btype_vlc, MB_BTYPE_VLC_BITS, 11,
+ &table_mb_btype[0][1], 2, 1,
+ &table_mb_btype[0][0], 2, 1, 64);
+ ff_rl_init(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
+ ff_rl_init(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
+
+ INIT_2D_VLC_RL(ff_rl_mpeg1, 680, 0);
+ INIT_2D_VLC_RL(ff_rl_mpeg2, 674, 0);
+ }
}
/**
diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h
index 4cd48b5..9a7c2b6 100644
--- a/libavcodec/mpeg12.h
+++ b/libavcodec/mpeg12.h
@@ -25,6 +25,8 @@
#include "mpeg12vlc.h"
#include "mpegvideo.h"
+extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+
void ff_mpeg12_common_init(MpegEncContext *s);
#define INIT_2D_VLC_RL(rl, static_size, flags)\
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 251d64f..97b05c8 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -30,9 +30,7 @@
#include "libavutil/attributes.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/stereo3d.h"
-#include "libavutil/video_enc_params.h"
#include "avcodec.h"
#include "bytestream.h"
@@ -1051,11 +1049,15 @@
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
+ ff_mpv_decode_defaults(s2);
+
if ( avctx->codec_tag != AV_RL32("VCR2")
&& avctx->codec_tag != AV_RL32("BW10"))
avctx->coded_width = avctx->coded_height = 0; // do not trust dimensions from input
ff_mpv_decode_init(s2, avctx);
+ s->mpeg_enc_ctx.avctx = avctx;
+
/* we need some permutation to store matrices,
* until the decoder sets the real permutation. */
ff_mpv_idct_init(s2);
@@ -2896,12 +2898,11 @@
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
- FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context),
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_MPEG1_NVDEC_HWACCEL
HWACCEL_NVDEC(mpeg1),
#endif
@@ -2930,12 +2931,11 @@
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
- FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles),
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_MPEG2_DXVA2_HWACCEL
HWACCEL_DXVA2(mpeg2),
#endif
@@ -2975,8 +2975,7 @@
.close = mpeg_decode_end,
.decode = mpeg_decode_frame,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
- FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_CLEANUP,
.flush = flush,
.max_lowres = 3,
};
@@ -3096,7 +3095,9 @@
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
+ ff_mpv_decode_defaults(m);
ff_mpv_decode_init(m, avctx);
+ s->m.avctx = avctx;
ff_mpv_idct_init(m);
ff_mpeg12_common_init(m);
ff_mpeg12_init_vlcs();
@@ -3137,5 +3138,5 @@
.decode = ipu_decode_frame,
.close = ipu_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index a05c2db..d399e9e 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -62,6 +62,9 @@
static uint32_t mpeg1_lum_dc_uni[512];
static uint32_t mpeg1_chr_dc_uni[512];
+static uint8_t mpeg1_index_run[2][64];
+static int8_t mpeg1_max_level[2][64];
+
#define A53_MAX_CC_COUNT 0x1f
#endif /* CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER */
@@ -719,8 +722,8 @@
MASK_ABS(sign, alevel);
sign &= 1;
- if (alevel <= ff_rl_mpeg1.max_level[0][run]) {
- code = ff_rl_mpeg1.index_run[0][run] + alevel - 1;
+ if (alevel <= mpeg1_max_level[0][run]) {
+ code = mpeg1_index_run[0][run] + alevel - 1;
/* store the VLC & sign at once */
put_bits(&s->pb, table_vlc[code][1] + 1,
(table_vlc[code][0] << 1) + sign);
@@ -1038,10 +1041,13 @@
static av_cold void mpeg12_encode_init_static(void)
{
- static uint8_t mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
+ ff_rl_init(&ff_rl_mpeg1, ff_mpeg12_static_rl_table_store[0]);
+ ff_rl_init(&ff_rl_mpeg2, ff_mpeg12_static_rl_table_store[1]);
- ff_rl_init(&ff_rl_mpeg1, mpeg12_static_rl_table_store[0]);
- ff_rl_init(&ff_rl_mpeg2, mpeg12_static_rl_table_store[1]);
+ for (int i = 0; i < 64; i++) {
+ mpeg1_max_level[0][i] = ff_rl_mpeg1.max_level[0][i];
+ mpeg1_index_run[0][i] = ff_rl_mpeg1.index_run[0][i];
+ }
ff_mpeg1_init_uni_ac_vlc(&ff_rl_mpeg1, uni_mpeg1_ac_vlc_len);
ff_mpeg1_init_uni_ac_vlc(&ff_rl_mpeg2, uni_mpeg2_ac_vlc_len);
@@ -1199,7 +1205,7 @@
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE },
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_class = &mpeg1_class,
};
@@ -1217,7 +1223,7 @@
AV_PIX_FMT_YUV422P,
AV_PIX_FMT_NONE },
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_class = &mpeg2_class,
};
#endif /* CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER */
diff --git a/libavcodec/mpeg2_metadata_bsf.c b/libavcodec/mpeg2_metadata_bsf.c
index 11b46c0..d0048c0 100644
--- a/libavcodec/mpeg2_metadata_bsf.c
+++ b/libavcodec/mpeg2_metadata_bsf.c
@@ -21,13 +21,16 @@
#include "libavutil/opt.h"
#include "bsf.h"
+#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_mpeg2.h"
#include "mpeg12.h"
typedef struct MPEG2MetadataContext {
- CBSBSFContext common;
+ const AVClass *class;
+
+ CodedBitstreamContext *cbc;
+ CodedBitstreamFragment fragment;
MPEG2RawExtensionData sequence_display_extension;
@@ -45,7 +48,6 @@
static int mpeg2_metadata_update_fragment(AVBSFContext *bsf,
- AVPacket *pkt,
CodedBitstreamFragment *frag)
{
MPEG2MetadataContext *ctx = bsf->priv_data;
@@ -168,16 +170,49 @@
return 0;
}
-static const CBSBSFType mpeg2_metadata_type = {
- .codec_id = AV_CODEC_ID_MPEG2VIDEO,
- .fragment_name = "frame",
- .unit_name = "start code",
- .update_fragment = &mpeg2_metadata_update_fragment,
-};
+static int mpeg2_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
+{
+ MPEG2MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *frag = &ctx->fragment;
+ int err;
+
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = ff_cbs_read_packet(ctx->cbc, frag, pkt);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read packet.\n");
+ goto fail;
+ }
+
+ err = mpeg2_metadata_update_fragment(bsf, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to update frame fragment.\n");
+ goto fail;
+ }
+
+ err = ff_cbs_write_packet(ctx->cbc, pkt, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n");
+ goto fail;
+ }
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(frag);
+
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
+}
static int mpeg2_metadata_init(AVBSFContext *bsf)
{
MPEG2MetadataContext *ctx = bsf->priv_data;
+ CodedBitstreamFragment *frag = &ctx->fragment;
+ int err;
#define VALIDITY_CHECK(name) do { \
if (!ctx->name) { \
@@ -191,7 +226,42 @@
VALIDITY_CHECK(matrix_coefficients);
#undef VALIDITY_CHECK
- return ff_cbs_bsf_generic_init(bsf, &mpeg2_metadata_type);
+ err = ff_cbs_init(&ctx->cbc, AV_CODEC_ID_MPEG2VIDEO, bsf);
+ if (err < 0)
+ return err;
+
+ if (bsf->par_in->extradata) {
+ err = ff_cbs_read_extradata(ctx->cbc, frag, bsf->par_in);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read extradata.\n");
+ goto fail;
+ }
+
+ err = mpeg2_metadata_update_fragment(bsf, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to update metadata fragment.\n");
+ goto fail;
+ }
+
+ err = ff_cbs_write_extradata(ctx->cbc, bsf->par_out, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write extradata.\n");
+ goto fail;
+ }
+ }
+
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(frag);
+ return err;
+}
+
+static void mpeg2_metadata_close(AVBSFContext *bsf)
+{
+ MPEG2MetadataContext *ctx = bsf->priv_data;
+
+ ff_cbs_fragment_free(&ctx->fragment);
+ ff_cbs_close(&ctx->cbc);
}
#define OFFSET(x) offsetof(MPEG2MetadataContext, x)
@@ -237,7 +307,7 @@
.priv_data_size = sizeof(MPEG2MetadataContext),
.priv_class = &mpeg2_metadata_class,
.init = &mpeg2_metadata_init,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &mpeg2_metadata_close,
+ .filter = &mpeg2_metadata_filter,
.codec_ids = mpeg2_metadata_codec_ids,
};
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index 2286303..77cf2fb 100644
--- a/libavcodec/mpeg4audio.c
+++ b/libavcodec/mpeg4audio.c
@@ -30,7 +30,7 @@
* @param[in] c MPEG4AudioConfig structure to fill
* @return on success 0 is returned, otherwise a value < 0
*/
-static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c, void *logctx)
+static int parse_config_ALS(GetBitContext *gb, MPEG4AudioConfig *c)
{
if (get_bits_left(gb) < 112)
return AVERROR_INVALIDDATA;
@@ -43,7 +43,7 @@
c->sample_rate = get_bits_long(gb, 32);
if (c->sample_rate <= 0) {
- av_log(logctx, AV_LOG_ERROR, "Invalid sample rate %d\n", c->sample_rate);
+ av_log(NULL, AV_LOG_ERROR, "Invalid sample rate %d\n", c->sample_rate);
return AVERROR_INVALIDDATA;
}
@@ -136,7 +136,7 @@
specific_config_bitindex = get_bits_count(gb);
- ret = parse_config_ALS(gb, c, logctx);
+ ret = parse_config_ALS(gb, c);
if (ret < 0)
return ret;
}
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 51af77d..03b46e9 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -47,6 +47,8 @@
#define MB_TYPE_B_VLC_BITS 4
#define STUDIO_INTRA_BITS 9
+static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb);
+
static VLC dc_lum, dc_chrom;
static VLC sprite_trajectory;
static VLC mb_type_b_vlc;
@@ -195,6 +197,10 @@
if (w <= 0 || h <= 0)
return AVERROR_INVALIDDATA;
+ /* the decoder was not properly initialized and we cannot continue */
+ if (sprite_trajectory.table == NULL)
+ return AVERROR_INVALIDDATA;
+
for (i = 0; i < ctx->num_sprite_warping_points; i++) {
int length;
int x = 0, y = 0;
@@ -2140,158 +2146,6 @@
}
}
-static int read_quant_matrix_ext(MpegEncContext *s, GetBitContext *gb)
-{
- int i, j, v;
-
- if (get_bits1(gb)) {
- if (get_bits_left(gb) < 64*8)
- return AVERROR_INVALIDDATA;
- /* intra_quantiser_matrix */
- for (i = 0; i < 64; i++) {
- v = get_bits(gb, 8);
- j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
- s->intra_matrix[j] = v;
- s->chroma_intra_matrix[j] = v;
- }
- }
-
- if (get_bits1(gb)) {
- if (get_bits_left(gb) < 64*8)
- return AVERROR_INVALIDDATA;
- /* non_intra_quantiser_matrix */
- for (i = 0; i < 64; i++) {
- get_bits(gb, 8);
- }
- }
-
- if (get_bits1(gb)) {
- if (get_bits_left(gb) < 64*8)
- return AVERROR_INVALIDDATA;
- /* chroma_intra_quantiser_matrix */
- for (i = 0; i < 64; i++) {
- v = get_bits(gb, 8);
- j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
- s->chroma_intra_matrix[j] = v;
- }
- }
-
- if (get_bits1(gb)) {
- if (get_bits_left(gb) < 64*8)
- return AVERROR_INVALIDDATA;
- /* chroma_non_intra_quantiser_matrix */
- for (i = 0; i < 64; i++) {
- get_bits(gb, 8);
- }
- }
-
- next_start_code_studio(gb);
- return 0;
-}
-
-static void extension_and_user_data(MpegEncContext *s, GetBitContext *gb, int id)
-{
- uint32_t startcode;
- uint8_t extension_type;
-
- startcode = show_bits_long(gb, 32);
- if (startcode == USER_DATA_STARTCODE || startcode == EXT_STARTCODE) {
-
- if ((id == 2 || id == 4) && startcode == EXT_STARTCODE) {
- skip_bits_long(gb, 32);
- extension_type = get_bits(gb, 4);
- if (extension_type == QUANT_MATRIX_EXT_ID)
- read_quant_matrix_ext(s, gb);
- }
- }
-}
-
-static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
-{
- MpegEncContext *s = &ctx->m;
- int width, height;
- int bits_per_raw_sample;
- int rgb, chroma_format;
-
- // random_accessible_vol and video_object_type_indication have already
- // been read by the caller decode_vol_header()
- skip_bits(gb, 4); /* video_object_layer_verid */
- ctx->shape = get_bits(gb, 2); /* video_object_layer_shape */
- skip_bits(gb, 4); /* video_object_layer_shape_extension */
- skip_bits1(gb); /* progressive_sequence */
- if (ctx->shape != RECT_SHAPE) {
- avpriv_request_sample(s->avctx, "MPEG-4 Studio profile non rectangular shape");
- return AVERROR_PATCHWELCOME;
- }
- if (ctx->shape != BIN_ONLY_SHAPE) {
- rgb = get_bits1(gb); /* rgb_components */
- chroma_format = get_bits(gb, 2); /* chroma_format */
- if (!chroma_format || chroma_format == CHROMA_420 || (rgb && chroma_format == CHROMA_422)) {
- av_log(s->avctx, AV_LOG_ERROR, "illegal chroma format\n");
- return AVERROR_INVALIDDATA;
- }
-
- bits_per_raw_sample = get_bits(gb, 4); /* bit_depth */
- if (bits_per_raw_sample == 10) {
- if (rgb) {
- s->avctx->pix_fmt = AV_PIX_FMT_GBRP10;
- } else {
- s->avctx->pix_fmt = chroma_format == CHROMA_422 ? AV_PIX_FMT_YUV422P10 : AV_PIX_FMT_YUV444P10;
- }
- } else {
- avpriv_request_sample(s->avctx, "MPEG-4 Studio profile bit-depth %u", bits_per_raw_sample);
- return AVERROR_PATCHWELCOME;
- }
- if (rgb != ctx->rgb || s->chroma_format != chroma_format)
- s->context_reinit = 1;
- s->avctx->bits_per_raw_sample = bits_per_raw_sample;
- ctx->rgb = rgb;
- s->chroma_format = chroma_format;
- }
- if (ctx->shape == RECT_SHAPE) {
- check_marker(s->avctx, gb, "before video_object_layer_width");
- width = get_bits(gb, 14); /* video_object_layer_width */
- check_marker(s->avctx, gb, "before video_object_layer_height");
- height = get_bits(gb, 14); /* video_object_layer_height */
- check_marker(s->avctx, gb, "after video_object_layer_height");
-
- /* Do the same check as non-studio profile */
- if (width && height) {
- if (s->width && s->height &&
- (s->width != width || s->height != height))
- s->context_reinit = 1;
- s->width = width;
- s->height = height;
- }
- }
- s->aspect_ratio_info = get_bits(gb, 4);
- if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
- s->avctx->sample_aspect_ratio.num = get_bits(gb, 8); // par_width
- s->avctx->sample_aspect_ratio.den = get_bits(gb, 8); // par_height
- } else {
- s->avctx->sample_aspect_ratio = ff_h263_pixel_aspect[s->aspect_ratio_info];
- }
- skip_bits(gb, 4); /* frame_rate_code */
- skip_bits(gb, 15); /* first_half_bit_rate */
- check_marker(s->avctx, gb, "after first_half_bit_rate");
- skip_bits(gb, 15); /* latter_half_bit_rate */
- check_marker(s->avctx, gb, "after latter_half_bit_rate");
- skip_bits(gb, 15); /* first_half_vbv_buffer_size */
- check_marker(s->avctx, gb, "after first_half_vbv_buffer_size");
- skip_bits(gb, 3); /* latter_half_vbv_buffer_size */
- skip_bits(gb, 11); /* first_half_vbv_buffer_size */
- check_marker(s->avctx, gb, "after first_half_vbv_buffer_size");
- skip_bits(gb, 15); /* latter_half_vbv_occupancy */
- check_marker(s->avctx, gb, "after latter_half_vbv_occupancy");
- s->low_delay = get_bits1(gb);
- s->mpeg_quant = get_bits1(gb); /* mpeg2_stream */
-
- next_start_code_studio(gb);
- extension_and_user_data(s, gb, 2);
-
- return 0;
-}
-
static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
@@ -3116,6 +2970,72 @@
return 0;
}
+static int read_quant_matrix_ext(MpegEncContext *s, GetBitContext *gb)
+{
+ int i, j, v;
+
+ if (get_bits1(gb)) {
+ if (get_bits_left(gb) < 64*8)
+ return AVERROR_INVALIDDATA;
+ /* intra_quantiser_matrix */
+ for (i = 0; i < 64; i++) {
+ v = get_bits(gb, 8);
+ j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
+ s->intra_matrix[j] = v;
+ s->chroma_intra_matrix[j] = v;
+ }
+ }
+
+ if (get_bits1(gb)) {
+ if (get_bits_left(gb) < 64*8)
+ return AVERROR_INVALIDDATA;
+ /* non_intra_quantiser_matrix */
+ for (i = 0; i < 64; i++) {
+ get_bits(gb, 8);
+ }
+ }
+
+ if (get_bits1(gb)) {
+ if (get_bits_left(gb) < 64*8)
+ return AVERROR_INVALIDDATA;
+ /* chroma_intra_quantiser_matrix */
+ for (i = 0; i < 64; i++) {
+ v = get_bits(gb, 8);
+ j = s->idsp.idct_permutation[ff_zigzag_direct[i]];
+ s->chroma_intra_matrix[j] = v;
+ }
+ }
+
+ if (get_bits1(gb)) {
+ if (get_bits_left(gb) < 64*8)
+ return AVERROR_INVALIDDATA;
+ /* chroma_non_intra_quantiser_matrix */
+ for (i = 0; i < 64; i++) {
+ get_bits(gb, 8);
+ }
+ }
+
+ next_start_code_studio(gb);
+ return 0;
+}
+
+static void extension_and_user_data(MpegEncContext *s, GetBitContext *gb, int id)
+{
+ uint32_t startcode;
+ uint8_t extension_type;
+
+ startcode = show_bits_long(gb, 32);
+ if (startcode == USER_DATA_STARTCODE || startcode == EXT_STARTCODE) {
+
+ if ((id == 2 || id == 4) && startcode == EXT_STARTCODE) {
+ skip_bits_long(gb, 32);
+ extension_type = get_bits(gb, 4);
+ if (extension_type == QUANT_MATRIX_EXT_ID)
+ read_quant_matrix_ext(s, gb);
+ }
+ }
+}
+
static void decode_smpte_tc(Mpeg4DecContext *ctx, GetBitContext *gb)
{
MpegEncContext *s = &ctx->m;
@@ -3195,15 +3115,103 @@
MpegEncContext *s = &ctx->m;
int visual_object_type;
- skip_bits(gb, 4); /* visual_object_verid */
- visual_object_type = get_bits(gb, 4);
- if (visual_object_type != VOT_VIDEO_ID) {
- avpriv_request_sample(s->avctx, "VO type %u", visual_object_type);
- return AVERROR_PATCHWELCOME;
- }
+ skip_bits(gb, 4); /* visual_object_verid */
+ visual_object_type = get_bits(gb, 4);
+ if (visual_object_type != VOT_VIDEO_ID) {
+ avpriv_request_sample(s->avctx, "VO type %u", visual_object_type);
+ return AVERROR_PATCHWELCOME;
+ }
- next_start_code_studio(gb);
- extension_and_user_data(s, gb, 1);
+ next_start_code_studio(gb);
+ extension_and_user_data(s, gb, 1);
+
+ return 0;
+}
+
+static int decode_studio_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
+{
+ MpegEncContext *s = &ctx->m;
+ int width, height;
+ int bits_per_raw_sample;
+ int rgb, chroma_format;
+
+ // random_accessible_vol and video_object_type_indication have already
+ // been read by the caller decode_vol_header()
+ skip_bits(gb, 4); /* video_object_layer_verid */
+ ctx->shape = get_bits(gb, 2); /* video_object_layer_shape */
+ skip_bits(gb, 4); /* video_object_layer_shape_extension */
+ skip_bits1(gb); /* progressive_sequence */
+ if (ctx->shape != RECT_SHAPE) {
+ avpriv_request_sample(s->avctx, "MPEG-4 Studio profile non rectangular shape");
+ return AVERROR_PATCHWELCOME;
+ }
+ if (ctx->shape != BIN_ONLY_SHAPE) {
+ rgb = get_bits1(gb); /* rgb_components */
+ chroma_format = get_bits(gb, 2); /* chroma_format */
+ if (!chroma_format || chroma_format == CHROMA_420 || (rgb && chroma_format == CHROMA_422)) {
+ av_log(s->avctx, AV_LOG_ERROR, "illegal chroma format\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ bits_per_raw_sample = get_bits(gb, 4); /* bit_depth */
+ if (bits_per_raw_sample == 10) {
+ if (rgb) {
+ s->avctx->pix_fmt = AV_PIX_FMT_GBRP10;
+ }
+ else {
+ s->avctx->pix_fmt = chroma_format == CHROMA_422 ? AV_PIX_FMT_YUV422P10 : AV_PIX_FMT_YUV444P10;
+ }
+ }
+ else {
+ avpriv_request_sample(s->avctx, "MPEG-4 Studio profile bit-depth %u", bits_per_raw_sample);
+ return AVERROR_PATCHWELCOME;
+ }
+ if (rgb != ctx->rgb || s->chroma_format != chroma_format)
+ s->context_reinit = 1;
+ s->avctx->bits_per_raw_sample = bits_per_raw_sample;
+ ctx->rgb = rgb;
+ s->chroma_format = chroma_format;
+ }
+ if (ctx->shape == RECT_SHAPE) {
+ check_marker(s->avctx, gb, "before video_object_layer_width");
+ width = get_bits(gb, 14); /* video_object_layer_width */
+ check_marker(s->avctx, gb, "before video_object_layer_height");
+ height = get_bits(gb, 14); /* video_object_layer_height */
+ check_marker(s->avctx, gb, "after video_object_layer_height");
+
+ /* Do the same check as non-studio profile */
+ if (width && height) {
+ if (s->width && s->height &&
+ (s->width != width || s->height != height))
+ s->context_reinit = 1;
+ s->width = width;
+ s->height = height;
+ }
+ }
+ s->aspect_ratio_info = get_bits(gb, 4);
+ if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
+ s->avctx->sample_aspect_ratio.num = get_bits(gb, 8); // par_width
+ s->avctx->sample_aspect_ratio.den = get_bits(gb, 8); // par_height
+ } else {
+ s->avctx->sample_aspect_ratio = ff_h263_pixel_aspect[s->aspect_ratio_info];
+ }
+ skip_bits(gb, 4); /* frame_rate_code */
+ skip_bits(gb, 15); /* first_half_bit_rate */
+ check_marker(s->avctx, gb, "after first_half_bit_rate");
+ skip_bits(gb, 15); /* latter_half_bit_rate */
+ check_marker(s->avctx, gb, "after latter_half_bit_rate");
+ skip_bits(gb, 15); /* first_half_vbv_buffer_size */
+ check_marker(s->avctx, gb, "after first_half_vbv_buffer_size");
+ skip_bits(gb, 3); /* latter_half_vbv_buffer_size */
+ skip_bits(gb, 11); /* first_half_vbv_buffer_size */
+ check_marker(s->avctx, gb, "after first_half_vbv_buffer_size");
+ skip_bits(gb, 15); /* latter_half_vbv_occupancy */
+ check_marker(s->avctx, gb, "after latter_half_vbv_occupancy");
+ s->low_delay = get_bits1(gb);
+ s->mpeg_quant = get_bits1(gb); /* mpeg2_stream */
+
+ next_start_code_studio(gb);
+ extension_and_user_data(s, gb, 2);
return 0;
}
@@ -3379,9 +3387,9 @@
ff_rl_init(&ff_mpeg4_rl_intra, ff_mpeg4_static_rl_table_store[0]);
ff_rl_init(&ff_rvlc_rl_inter, ff_mpeg4_static_rl_table_store[1]);
ff_rl_init(&ff_rvlc_rl_intra, ff_mpeg4_static_rl_table_store[2]);
- INIT_FIRST_VLC_RL(ff_mpeg4_rl_intra, 554);
+ INIT_VLC_RL(ff_mpeg4_rl_intra, 554);
INIT_VLC_RL(ff_rvlc_rl_inter, 1072);
- INIT_FIRST_VLC_RL(ff_rvlc_rl_intra, 1072);
+ INIT_VLC_RL(ff_rvlc_rl_intra, 1072);
INIT_VLC_STATIC(&dc_lum, DC_VLC_BITS, 10 /* 13 */,
&ff_mpeg4_DCtab_lum[0][1], 2, 1,
&ff_mpeg4_DCtab_lum[0][0], 2, 1, 512);
@@ -3549,11 +3557,9 @@
return 0;
}
-#define OFFSET(x) offsetof(MpegEncContext, x)
-#define FLAGS AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY
static const AVOption mpeg4_options[] = {
- {"quarter_sample", "1/4 subpel MC", OFFSET(quarter_sample), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS},
- {"divx_packed", "divx style packed b frames", OFFSET(divx_packed), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, FLAGS},
+ {"quarter_sample", "1/4 subpel MC", offsetof(MpegEncContext, quarter_sample), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0},
+ {"divx_packed", "divx style packed b frames", offsetof(MpegEncContext, divx_packed), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, 0},
{NULL}
};
@@ -3585,7 +3591,7 @@
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles),
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context),
.priv_class = &mpeg4_class,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_MPEG4_NVDEC_HWACCEL
HWACCEL_NVDEC(mpeg4),
#endif
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index a092ab0..b3fa910 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -961,6 +961,9 @@
{
int vo_ver_id;
+ if (!CONFIG_MPEG4_ENCODER)
+ return;
+
if (s->max_b_frames || s->quarter_sample) {
vo_ver_id = 5;
s->vo_type = ADV_SIMPLE_VO_TYPE;
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 4fd9e3a..0ceeee2 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -30,9 +30,7 @@
#include "libavutil/crc.h"
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
diff --git a/libavcodec/mpegaudiodsp_template.c b/libavcodec/mpegaudiodsp_template.c
index 9731796..c67c456 100644
--- a/libavcodec/mpegaudiodsp_template.c
+++ b/libavcodec/mpegaudiodsp_template.c
@@ -22,9 +22,7 @@
#include "libavutil/attributes.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
-
#include "dct32.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c
index e3f6488..13c11ec 100644
--- a/libavcodec/mpegpicture.c
+++ b/libavcodec/mpegpicture.c
@@ -203,6 +203,9 @@
}
if (out_format == FMT_H263 || encoding ||
+#if FF_API_DEBUG_MV
+ avctx->debug_mv ||
+#endif
(avctx->export_side_data & AV_CODEC_EXPORT_DATA_MVS)) {
int mv_size = 2 * (b8_array_size + 4) * sizeof(int16_t);
int ref_index_size = 4 * mb_array_size;
@@ -217,7 +220,6 @@
pic->alloc_mb_width = mb_width;
pic->alloc_mb_height = mb_height;
- pic->alloc_mb_stride = mb_stride;
return 0;
}
@@ -344,7 +346,6 @@
dst->alloc_mb_width = src->alloc_mb_width;
dst->alloc_mb_height = src->alloc_mb_height;
- dst->alloc_mb_stride = src->alloc_mb_stride;
return 0;
}
diff --git a/libavcodec/mpegpicture.h b/libavcodec/mpegpicture.h
index 4bcd666..2db3d67 100644
--- a/libavcodec/mpegpicture.h
+++ b/libavcodec/mpegpicture.h
@@ -69,7 +69,6 @@
int alloc_mb_width; ///< mb_width used to allocate tables
int alloc_mb_height; ///< mb_height used to allocate tables
- int alloc_mb_stride; ///< mb_stride used to allocate tables
AVBufferRef *mb_mean_buf;
uint8_t *mb_mean; ///< Table for MB luminance
diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c
index e5105ec..c0ee3aa 100644
--- a/libavcodec/mpegutils.c
+++ b/libavcodec/mpegutils.c
@@ -262,4 +262,132 @@
av_log(avctx, AV_LOG_DEBUG, "\n");
}
}
+
+#if FF_API_DEBUG_MV
+ if ((avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) ||
+ (avctx->debug_mv)) {
+ int mb_y;
+ int i, ret;
+ int h_chroma_shift, v_chroma_shift, block_height;
+ const int mv_sample_log2 = avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_SVQ3 ? 2 : 1;
+ const int mv_stride = (mb_width << mv_sample_log2) +
+ (avctx->codec->id == AV_CODEC_ID_H264 ? 0 : 1);
+
+ if (low_delay)
+ *low_delay = 0; // needed to see the vectors without trashing the buffers
+
+ ret = av_pix_fmt_get_chroma_sub_sample (avctx->pix_fmt, &h_chroma_shift, &v_chroma_shift);
+ if (ret)
+ return ret;
+
+ av_frame_make_writable(pict);
+
+ pict->opaque = NULL;
+ block_height = 16 >> v_chroma_shift;
+
+ for (mb_y = 0; mb_y < mb_height; mb_y++) {
+ int mb_x;
+ for (mb_x = 0; mb_x < mb_width; mb_x++) {
+ const int mb_index = mb_x + mb_y * mb_stride;
+ if ((avctx->debug & FF_DEBUG_VIS_QP)) {
+ uint64_t c = (qscale_table[mb_index] * 128 / 31) *
+ 0x0101010101010101ULL;
+ int y;
+ for (y = 0; y < block_height; y++) {
+ *(uint64_t *)(pict->data[1] + 8 * mb_x +
+ (block_height * mb_y + y) *
+ pict->linesize[1]) = c;
+ *(uint64_t *)(pict->data[2] + 8 * mb_x +
+ (block_height * mb_y + y) *
+ pict->linesize[2]) = c;
+ }
+ }
+ if ((avctx->debug & FF_DEBUG_VIS_MB_TYPE) &&
+ motion_val[0]) {
+ int mb_type = mbtype_table[mb_index];
+ uint64_t u,v;
+ int y;
+#define COLOR(theta, r) \
+ u = (int)(128 + r * cos(theta * M_PI / 180)); \
+ v = (int)(128 + r * sin(theta * M_PI / 180));
+
+
+ u = v = 128;
+ if (IS_PCM(mb_type)) {
+ COLOR(120, 48)
+ } else if ((IS_INTRA(mb_type) && IS_ACPRED(mb_type)) ||
+ IS_INTRA16x16(mb_type)) {
+ COLOR(30, 48)
+ } else if (IS_INTRA4x4(mb_type)) {
+ COLOR(90, 48)
+ } else if (IS_DIRECT(mb_type) && IS_SKIP(mb_type)) {
+ // COLOR(120, 48)
+ } else if (IS_DIRECT(mb_type)) {
+ COLOR(150, 48)
+ } else if (IS_GMC(mb_type) && IS_SKIP(mb_type)) {
+ COLOR(170, 48)
+ } else if (IS_GMC(mb_type)) {
+ COLOR(190, 48)
+ } else if (IS_SKIP(mb_type)) {
+ // COLOR(180, 48)
+ } else if (!USES_LIST(mb_type, 1)) {
+ COLOR(240, 48)
+ } else if (!USES_LIST(mb_type, 0)) {
+ COLOR(0, 48)
+ } else {
+ av_assert2(USES_LIST(mb_type, 0) && USES_LIST(mb_type, 1));
+ COLOR(300,48)
+ }
+
+ u *= 0x0101010101010101ULL;
+ v *= 0x0101010101010101ULL;
+ for (y = 0; y < block_height; y++) {
+ *(uint64_t *)(pict->data[1] + 8 * mb_x +
+ (block_height * mb_y + y) * pict->linesize[1]) = u;
+ *(uint64_t *)(pict->data[2] + 8 * mb_x +
+ (block_height * mb_y + y) * pict->linesize[2]) = v;
+ }
+
+ // segmentation
+ if (IS_8X8(mb_type) || IS_16X8(mb_type)) {
+ *(uint64_t *)(pict->data[0] + 16 * mb_x + 0 +
+ (16 * mb_y + 8) * pict->linesize[0]) ^= 0x8080808080808080ULL;
+ *(uint64_t *)(pict->data[0] + 16 * mb_x + 8 +
+ (16 * mb_y + 8) * pict->linesize[0]) ^= 0x8080808080808080ULL;
+ }
+ if (IS_8X8(mb_type) || IS_8X16(mb_type)) {
+ for (y = 0; y < 16; y++)
+ pict->data[0][16 * mb_x + 8 + (16 * mb_y + y) *
+ pict->linesize[0]] ^= 0x80;
+ }
+ if (IS_8X8(mb_type) && mv_sample_log2 >= 2) {
+ int dm = 1 << (mv_sample_log2 - 2);
+ for (i = 0; i < 4; i++) {
+ int sx = mb_x * 16 + 8 * (i & 1);
+ int sy = mb_y * 16 + 8 * (i >> 1);
+ int xy = (mb_x * 2 + (i & 1) +
+ (mb_y * 2 + (i >> 1)) * mv_stride) << (mv_sample_log2 - 1);
+ // FIXME bidir
+ int32_t *mv = (int32_t *) &motion_val[0][xy];
+ if (mv[0] != mv[dm] ||
+ mv[dm * mv_stride] != mv[dm * (mv_stride + 1)])
+ for (y = 0; y < 8; y++)
+ pict->data[0][sx + 4 + (sy + y) * pict->linesize[0]] ^= 0x80;
+ if (mv[0] != mv[dm * mv_stride] || mv[dm] != mv[dm * (mv_stride + 1)])
+ *(uint64_t *)(pict->data[0] + sx + (sy + 4) *
+ pict->linesize[0]) ^= 0x8080808080808080ULL;
+ }
+ }
+
+ if (IS_INTERLACED(mb_type) &&
+ avctx->codec->id == AV_CODEC_ID_H264) {
+ // hmm
+ }
+ }
+ if (mbskip_table)
+ mbskip_table[mb_index] = 0;
+ }
+ }
+ }
+#endif
}
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 988dd18..c28d1ad 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -32,8 +32,6 @@
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/motion_vector.h"
-#include "libavutil/video_enc_params.h"
-
#include "avcodec.h"
#include "blockdsp.h"
#include "h264chroma.h"
@@ -662,14 +660,17 @@
}
/**
- * Initialize the given MpegEncContext for decoding.
+ * Set the given MpegEncContext to defaults for decoding.
* the changed fields will not depend upon
* the prior state of the MpegEncContext.
*/
-void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
+void ff_mpv_decode_defaults(MpegEncContext *s)
{
ff_mpv_common_defaults(s);
+}
+void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx)
+{
s->avctx = avctx;
s->width = avctx->coded_width;
s->height = avctx->coded_height;
@@ -789,7 +790,7 @@
}
/* which mb is an intra block, init macroblock skip table */
- if (!FF_ALLOC_TYPED_ARRAY(s->mbintra_table, mb_array_size) ||
+ if (!FF_ALLOCZ_TYPED_ARRAY(s->mbintra_table, mb_array_size) ||
// Note the + 1 is for a quicker MPEG-4 slice_end detection
!FF_ALLOCZ_TYPED_ARRAY(s->mbskip_table, mb_array_size + 2))
return AVERROR(ENOMEM);
@@ -1424,33 +1425,14 @@
int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type)
{
- AVVideoEncParams *par;
- int mult = (qp_type == FF_QSCALE_TYPE_MPEG1) ? 2 : 1;
- unsigned int nb_mb = p->alloc_mb_height * p->alloc_mb_width;
- unsigned int x, y;
-
- if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS))
- return 0;
-
- par = av_video_enc_params_create_side_data(f, AV_VIDEO_ENC_PARAMS_MPEG2, nb_mb);
- if (!par)
+ AVBufferRef *ref = av_buffer_ref(p->qscale_table_buf);
+ int offset = 2*s->mb_stride + 1;
+ if(!ref)
return AVERROR(ENOMEM);
-
- for (y = 0; y < p->alloc_mb_height; y++)
- for (x = 0; x < p->alloc_mb_width; x++) {
- const unsigned int block_idx = y * p->alloc_mb_width + x;
- const unsigned int mb_xy = y * p->alloc_mb_stride + x;
- AVVideoBlockParams *b = av_video_enc_params_block(par, block_idx);
-
- b->src_x = x * 16;
- b->src_y = y * 16;
- b->w = 16;
- b->h = 16;
-
- b->delta_qp = p->qscale_table[mb_xy] * mult;
- }
-
- return 0;
+ av_assert0(ref->size >= offset + s->mb_stride * ((f->height+15)/16));
+ ref->size -= offset;
+ ref->data += offset;
+ return av_frame_set_qp_table(f, ref, s->mb_stride, qp_type);
}
static inline int hpel_motion_lowres(MpegEncContext *s,
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 5a99c19..974c71b 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -276,7 +276,7 @@
int mv[2][4][2];
int field_select[2][2];
int last_mv[2][2][2]; ///< last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
- const uint8_t *fcode_tab; ///< smallest fcode needed for each MV
+ uint8_t *fcode_tab; ///< smallest fcode needed for each MV
int16_t direct_scale_mv[2][64]; ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv
MotionEstContext me;
@@ -369,9 +369,7 @@
uint8_t *mb_info_ptr;
int mb_info_size;
int ehc_mode;
-#if FF_API_MPV_RC_STRATEGY
int rc_strategy; ///< deprecated
-#endif
/* H.263+ specific */
int umvplus; ///< == H.263+ && unrestricted_mv
@@ -617,14 +615,6 @@
#ifndef FF_MPV_OFFSET
#define FF_MPV_OFFSET(x) offsetof(MpegEncContext, x)
#endif
-#if FF_API_MPV_RC_STRATEGY
-#define FF_MPV_RC_STRATEGY_OPTS \
-{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \
- { "ffmpeg", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \
- { "xvid", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" },
-#else
-#define FF_MPV_RC_STRATEGY_OPTS
-#endif
#define FF_MPV_OPT_FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
#define FF_MPV_COMMON_OPTS \
FF_MPV_OPT_CMP_FUNC, \
@@ -658,6 +648,9 @@
{"lmax", "maximum Lagrange factor (VBR)", FF_MPV_OFFSET(lmax), AV_OPT_TYPE_INT, {.i64 = 31*FF_QP2LAMBDA }, 0, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"ibias", "intra quant bias", FF_MPV_OFFSET(intra_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"pbias", "inter quant bias", FF_MPV_OFFSET(inter_quant_bias), AV_OPT_TYPE_INT, {.i64 = FF_DEFAULT_QUANT_BIAS }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
+{"rc_strategy", "ratecontrol method", FF_MPV_OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \
+ { "ffmpeg", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \
+ { "xvid", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FF_MPV_OPT_FLAGS | AV_OPT_FLAG_DEPRECATED, "rc_strategy" }, \
{"motion_est", "motion estimation algorithm", FF_MPV_OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_XONE, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, \
@@ -678,7 +671,6 @@
{"mepre", "pre motion estimation", FF_MPV_OFFSET(me_pre), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, FF_MPV_OPT_FLAGS }, \
{"intra_penalty", "Penalty for intra blocks in block decision", FF_MPV_OFFSET(intra_penalty), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX/2, FF_MPV_OPT_FLAGS }, \
{"a53cc", "Use A53 Closed Captions (if available)", FF_MPV_OFFSET(a53_cc), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FF_MPV_OPT_FLAGS }, \
-FF_MPV_RC_STRATEGY_OPTS
extern const AVOption ff_mpv_generic_options[];
@@ -702,6 +694,7 @@
int ff_mpv_common_frame_size_change(MpegEncContext *s);
void ff_mpv_common_end(MpegEncContext *s);
+void ff_mpv_decode_defaults(MpegEncContext *s);
void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx);
void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]);
void ff_mpv_report_decode_progress(MpegEncContext *s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 5a5cff4..243d3ca 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -36,10 +36,8 @@
#include "libavutil/internal.h"
#include "libavutil/intmath.h"
#include "libavutil/mathematics.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
-#include "libavutil/thread.h"
#include "avcodec.h"
#include "dct.h"
#include "idctdsp.h"
@@ -67,6 +65,7 @@
#include "wmv2.h"
#include "rv10.h"
#include "packet_internal.h"
+#include "libxvid.h"
#include <limits.h>
#include "sp5x.h"
@@ -249,24 +248,18 @@
#undef COPY
}
-static void mpv_encode_init_static(void)
-{
- for (int i = -16; i < 16; i++)
- default_fcode_tab[i + MAX_MV] = 1;
-}
-
/**
* Set the given MpegEncContext to defaults for encoding.
* the changed fields will not depend upon the prior state of the MpegEncContext.
*/
static void mpv_encode_defaults(MpegEncContext *s)
{
- static AVOnce init_static_once = AV_ONCE_INIT;
-
+ int i;
ff_mpv_common_defaults(s);
- ff_thread_once(&init_static_once, mpv_encode_init_static);
-
+ for (i = -16; i < 16; i++) {
+ default_fcode_tab[i + MAX_MV] = 1;
+ }
s->me.mv_penalty = default_mv_penalty;
s->fcode_tab = default_fcode_tab;
@@ -2792,6 +2785,8 @@
static int estimate_motion_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= *(void**)arg;
+ ff_check_alignment();
+
s->me.dia_size= s->avctx->dia_size;
s->first_slice_line=1;
for(s->mb_y= s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {
@@ -2818,6 +2813,8 @@
MpegEncContext *s= *(void**)arg;
int mb_x, mb_y;
+ ff_check_alignment();
+
for(mb_y=s->start_mb_y; mb_y < s->end_mb_y; mb_y++) {
for(mb_x=0; mb_x < s->mb_width; mb_x++) {
int xx = mb_x * 16;
@@ -2946,6 +2943,8 @@
uint8_t bit_buf_tex[2][MAX_MB_BYTES];
PutBitContext pb[2], pb2[2], tex_pb[2];
+ ff_check_alignment();
+
for(i=0; i<2; i++){
init_put_bits(&pb [i], bit_buf [i], MAX_MB_BYTES);
init_put_bits(&pb2 [i], bit_buf2 [i], MAX_MB_BYTES);
@@ -3880,8 +3879,8 @@
for(i=1;i<64;i++){
int j= s->idsp.idct_permutation[ff_zigzag_direct[i]];
- s->intra_matrix[j] = sp5x_qscale_five_quant_table[0][i];
- s->chroma_intra_matrix[j] = sp5x_qscale_five_quant_table[1][i];
+ s->intra_matrix[j] = sp5x_quant_table[5*2+0][i];
+ s->chroma_intra_matrix[j] = sp5x_quant_table[5*2+1][i];
}
s->y_dc_scale_table= y;
s->c_dc_scale_table= c;
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
index 427bc96..5624c10 100644
--- a/libavcodec/mpegvideo_motion.c
+++ b/libavcodec/mpegvideo_motion.c
@@ -21,16 +21,19 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <string.h>
+
#include "libavutil/avassert.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "h261.h"
#include "mpegutils.h"
#include "mpegvideo.h"
+#include "mjpegenc.h"
+#include "msmpeg4.h"
#include "qpeldsp.h"
#include "wmv2.h"
+#include <limits.h>
static void gmc1_motion(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr,
@@ -208,16 +211,16 @@
dxy |= (motion_y & 1) << 1;
src += src_y * s->linesize + src_x;
- if ((unsigned)src_x >= FFMAX(s->h_edge_pos - (motion_x & 1) - 7, 0) ||
- (unsigned)src_y >= FFMAX(s->v_edge_pos - (motion_y & 1) - 7, 0)) {
- s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, src,
- s->linesize, s->linesize,
- 9, 9,
- src_x, src_y,
- s->h_edge_pos, s->v_edge_pos);
- src = s->sc.edge_emu_buffer;
- emu = 1;
- }
+ if ((unsigned)src_x >= FFMAX(s->h_edge_pos - (motion_x & 1) - 7, 0) ||
+ (unsigned)src_y >= FFMAX(s->v_edge_pos - (motion_y & 1) - 7, 0)) {
+ s->vdsp.emulated_edge_mc(s->sc.edge_emu_buffer, src,
+ s->linesize, s->linesize,
+ 9, 9,
+ src_x, src_y,
+ s->h_edge_pos, s->v_edge_pos);
+ src = s->sc.edge_emu_buffer;
+ emu = 1;
+ }
pix_op[dxy](dest, src, s->linesize, 8);
return emu;
}
@@ -301,9 +304,9 @@
if ((unsigned)src_x >= FFMAX(s->h_edge_pos - (motion_x & 1) - 15 , 0) ||
(unsigned)src_y >= FFMAX( v_edge_pos - (motion_y & 1) - h + 1, 0)) {
- if (is_mpeg12 || (CONFIG_SMALL &&
- (s->codec_id == AV_CODEC_ID_MPEG2VIDEO ||
- s->codec_id == AV_CODEC_ID_MPEG1VIDEO))) {
+ if (is_mpeg12 ||
+ s->codec_id == AV_CODEC_ID_MPEG2VIDEO ||
+ s->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
av_log(s->avctx, AV_LOG_DEBUG,
"MPEG motion vector out of boundary (%d %d)\n", src_x,
src_y);
@@ -848,7 +851,7 @@
switch (s->mv_type) {
case MV_TYPE_16X16:
- if (!is_mpeg12 && s->mcsel) {
+ if (s->mcsel) {
if (s->real_sprite_warping_points == 1) {
gmc1_motion(s, dest_y, dest_cb, dest_cr,
ref_picture);
@@ -910,63 +913,60 @@
}
break;
case MV_TYPE_16X8:
- if (CONFIG_SMALL || is_mpeg12) {
- for (i = 0; i < 2; i++) {
- uint8_t **ref2picture;
+ for (i = 0; i < 2; i++) {
+ uint8_t **ref2picture;
- if ((s->picture_structure == s->field_select[dir][i] + 1 ||
- s->pict_type == AV_PICTURE_TYPE_B || s->first_field) &&
- ref_picture[0]) {
- ref2picture = ref_picture;
- } else {
- ref2picture = s->current_picture_ptr->f->data;
- }
-
- mpeg_motion(s, dest_y, dest_cb, dest_cr,
- s->field_select[dir][i],
- ref2picture, pix_op,
- s->mv[dir][i][0], s->mv[dir][i][1],
- 8, 1, (mb_y & ~1) + i);
-
- dest_y += 16 * s->linesize;
- dest_cb += (16 >> s->chroma_y_shift) * s->uvlinesize;
- dest_cr += (16 >> s->chroma_y_shift) * s->uvlinesize;
- }
- break;
- }
- case MV_TYPE_DMV:
- if (CONFIG_SMALL || is_mpeg12) {
- if (s->picture_structure == PICT_FRAME) {
- for (i = 0; i < 2; i++) {
- for (int j = 0; j < 2; j++)
- mpeg_motion_field(s, dest_y, dest_cb, dest_cr,
- j, j ^ i, ref_picture, pix_op,
- s->mv[dir][2 * i + j][0],
- s->mv[dir][2 * i + j][1], 8, mb_y);
- pix_op = s->hdsp.avg_pixels_tab;
- }
+ if ((s->picture_structure == s->field_select[dir][i] + 1
+ || s->pict_type == AV_PICTURE_TYPE_B || s->first_field) && ref_picture[0]) {
+ ref2picture = ref_picture;
} else {
- if (!ref_picture[0]) {
+ ref2picture = s->current_picture_ptr->f->data;
+ }
+
+ mpeg_motion(s, dest_y, dest_cb, dest_cr,
+ s->field_select[dir][i],
+ ref2picture, pix_op,
+ s->mv[dir][i][0], s->mv[dir][i][1],
+ 8, 1, (mb_y & ~1) + i);
+
+ dest_y += 16 * s->linesize;
+ dest_cb += (16 >> s->chroma_y_shift) * s->uvlinesize;
+ dest_cr += (16 >> s->chroma_y_shift) * s->uvlinesize;
+ }
+ break;
+ case MV_TYPE_DMV:
+ if (s->picture_structure == PICT_FRAME) {
+ for (i = 0; i < 2; i++) {
+ int j;
+ for (j = 0; j < 2; j++)
+ mpeg_motion_field(s, dest_y, dest_cb, dest_cr,
+ j, j ^ i, ref_picture, pix_op,
+ s->mv[dir][2 * i + j][0],
+ s->mv[dir][2 * i + j][1], 8, mb_y);
+ pix_op = s->hdsp.avg_pixels_tab;
+ }
+ } else {
+ if (!ref_picture[0]) {
+ ref_picture = s->current_picture_ptr->f->data;
+ }
+ for (i = 0; i < 2; i++) {
+ mpeg_motion(s, dest_y, dest_cb, dest_cr,
+ s->picture_structure != i + 1,
+ ref_picture, pix_op,
+ s->mv[dir][2 * i][0], s->mv[dir][2 * i][1],
+ 16, 0, mb_y >> 1);
+
+ // after put we make avg of the same block
+ pix_op = s->hdsp.avg_pixels_tab;
+
+ /* opposite parity is always in the same frame if this is
+ * second field */
+ if (!s->first_field) {
ref_picture = s->current_picture_ptr->f->data;
}
- for (i = 0; i < 2; i++) {
- mpeg_motion(s, dest_y, dest_cb, dest_cr,
- s->picture_structure != i + 1,
- ref_picture, pix_op,
- s->mv[dir][2 * i][0], s->mv[dir][2 * i][1],
- 16, 0, mb_y >> 1);
-
- // after put we make avg of the same block
- pix_op = s->hdsp.avg_pixels_tab;
-
- /* opposite parity is always in the same frame if this is
- * second field */
- if (!s->first_field)
- ref_picture = s->current_picture_ptr->f->data;
- }
}
- break;
}
+ break;
default: av_assert2(0);
}
}
diff --git a/libavcodec/mqc.h b/libavcodec/mqc.h
index 73604d5..8bf7223 100644
--- a/libavcodec/mqc.h
+++ b/libavcodec/mqc.h
@@ -54,6 +54,9 @@
/** code bit d with context cx */
void ff_mqc_encode(MqcState *mqc, uint8_t *cxstate, int d);
+/** number of encoded bytes */
+int ff_mqc_length(MqcState *mqc);
+
/** flush the encoder [returns number of bytes encoded] */
int ff_mqc_flush(MqcState *mqc);
int ff_mqc_flush_to(MqcState *mqc, uint8_t *dst, int *dst_len);
diff --git a/libavcodec/mqcenc.c b/libavcodec/mqcenc.c
index c941f84..7c9e1a0 100644
--- a/libavcodec/mqcenc.c
+++ b/libavcodec/mqcenc.c
@@ -102,6 +102,11 @@
}
}
+int ff_mqc_length(MqcState *mqc)
+{
+ return mqc->bp - mqc->bpstart;
+}
+
int ff_mqc_flush(MqcState *mqc)
{
setbits(mqc);
diff --git a/libavcodec/mscc.c b/libavcodec/mscc.c
index fe02649..86e4e88 100644
--- a/libavcodec/mscc.c
+++ b/libavcodec/mscc.c
@@ -152,7 +152,7 @@
}
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
diff --git a/libavcodec/msmpeg4.h b/libavcodec/msmpeg4.h
index f9c63b5..bcdb967 100644
--- a/libavcodec/msmpeg4.h
+++ b/libavcodec/msmpeg4.h
@@ -59,7 +59,7 @@
int ff_msmpeg4_decode_init(AVCodecContext *avctx);
int ff_msmpeg4_decode_picture_header(MpegEncContext *s);
int ff_msmpeg4_decode_ext_header(MpegEncContext *s, int buf_size);
-void ff_msmpeg4_decode_motion(MpegEncContext * s, int *mx_ptr, int *my_ptr);
+int ff_msmpeg4_decode_motion(MpegEncContext * s, int *mx_ptr, int *my_ptr);
int ff_msmpeg4_decode_block(MpegEncContext * s, int16_t * block,
int n, int coded, const uint8_t *scan_table);
int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
diff --git a/libavcodec/msmpeg4data.c b/libavcodec/msmpeg4data.c
index fb0c618..b9c1d8e 100644
--- a/libavcodec/msmpeg4data.c
+++ b/libavcodec/msmpeg4data.c
@@ -1771,11 +1771,13 @@
};
MVTable ff_mv_tables[2] = {
- { table0_mv_code,
+ { 1099,
+ table0_mv_code,
table0_mv_bits,
table0_mvx,
table0_mvy, },
- { table1_mv_code,
+ { 1099,
+ table1_mv_code,
table1_mv_bits,
table1_mvx,
table1_mvy, }
diff --git a/libavcodec/msmpeg4data.h b/libavcodec/msmpeg4data.h
index 68a1d14..02199d0 100644
--- a/libavcodec/msmpeg4data.h
+++ b/libavcodec/msmpeg4data.h
@@ -37,6 +37,7 @@
/* motion vector table */
typedef struct MVTable {
+ int n;
const uint16_t *table_mv_code;
const uint8_t *table_mv_bits;
const uint8_t *table_mvx;
@@ -68,7 +69,6 @@
extern const uint8_t ff_wmv1_c_dc_scale_table[32];
extern const uint8_t ff_old_ff_y_dc_scale_table[32];
-#define MSMPEG4_MV_TABLES_NB_ELEMS 1099
extern MVTable ff_mv_tables[2];
extern const uint8_t ff_v2_mb_type[8][2];
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index 405fda4..49df06a 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/msmpeg4dec.c
@@ -38,6 +38,7 @@
#define V2_INTRA_CBPC_VLC_BITS 3
#define V2_MB_TYPE_VLC_BITS 7
#define MV_VLC_BITS 9
+#define V2_MV_VLC_BITS 9
#define TEX_VLC_BITS 9
#define DEFAULT_INTER_INDEX 3
@@ -65,6 +66,7 @@
static VLC v2_dc_chroma_vlc;
static VLC v2_intra_cbpc_vlc;
static VLC v2_mb_type_vlc;
+static VLC v2_mv_vlc;
VLC ff_inter_intra_vlc;
/* This is identical to H.263 except that its range is multiplied by 2. */
@@ -72,7 +74,7 @@
{
int code, val, sign, shift;
- code = get_vlc2(&s->gb, ff_h263_mv_vlc.table, H263_MV_VLC_BITS, 2);
+ code = get_vlc2(&s->gb, v2_mv_vlc.table, V2_MV_VLC_BITS, 2);
ff_dlog(s, "MV code %d at %d %d pred: %d\n", code, s->mb_x,s->mb_y, pred);
if (code < 0)
return 0xffff;
@@ -228,6 +230,8 @@
}
code = get_vlc2(&s->gb, ff_mb_non_intra_vlc[DEFAULT_INTER_INDEX].table, MB_NON_INTRA_VLC_BITS, 3);
+ if (code < 0)
+ return -1;
//s->mb_intra = (code & 0x40) ? 0 : 1;
s->mb_intra = (~code & 0x40) >> 6;
@@ -235,6 +239,8 @@
} else {
s->mb_intra = 1;
code = get_vlc2(&s->gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2);
+ if (code < 0)
+ return -1;
/* predict coded block pattern */
cbp = 0;
for(i=0;i<6;i++) {
@@ -255,7 +261,8 @@
s->rl_chroma_table_index = s->rl_table_index;
}
ff_h263_pred_motion(s, 0, 0, &mx, &my);
- ff_msmpeg4_decode_motion(s, &mx, &my);
+ if (ff_msmpeg4_decode_motion(s, &mx, &my) < 0)
+ return -1;
s->mv_dir = MV_DIR_FORWARD;
s->mv_type = MV_TYPE_16X16;
s->mv[0][0][0] = mx;
@@ -310,22 +317,19 @@
for(i=0;i<NB_RL_TABLES;i++) {
ff_rl_init(&ff_rl_table[i], ff_static_rl_table_store[i]);
}
- INIT_FIRST_VLC_RL(ff_rl_table[0], 642);
- INIT_FIRST_VLC_RL(ff_rl_table[1], 1104);
- INIT_FIRST_VLC_RL(ff_rl_table[2], 554);
+ INIT_VLC_RL(ff_rl_table[0], 642);
+ INIT_VLC_RL(ff_rl_table[1], 1104);
+ INIT_VLC_RL(ff_rl_table[2], 554);
INIT_VLC_RL(ff_rl_table[3], 940);
INIT_VLC_RL(ff_rl_table[4], 962);
- /* ff_rl_table[5] coincides with ff_h263_rl_inter which has just been
- * initialized in ff_h263_decode_init() above. So just copy the VLCs. */
- av_assert1(ff_h263_rl_inter.rl_vlc[0]);
- memcpy(ff_rl_table[5].rl_vlc, ff_h263_rl_inter.rl_vlc, sizeof(ff_rl_table[5].rl_vlc));
+ INIT_VLC_RL(ff_rl_table[5], 554);
mv = &ff_mv_tables[0];
- INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1,
+ INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1,
mv->table_mv_bits, 1, 1,
mv->table_mv_code, 2, 2, 3714);
mv = &ff_mv_tables[1];
- INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1,
+ INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, mv->n + 1,
mv->table_mv_bits, 1, 1,
mv->table_mv_code, 2, 2, 2694);
@@ -355,6 +359,9 @@
INIT_VLC_STATIC(&v2_mb_type_vlc, V2_MB_TYPE_VLC_BITS, 8,
&ff_v2_mb_type[0][1], 2, 1,
&ff_v2_mb_type[0][0], 2, 1, 128);
+ INIT_VLC_STATIC(&v2_mv_vlc, V2_MV_VLC_BITS, 33,
+ &ff_mvtab[0][1], 2, 1,
+ &ff_mvtab[0][0], 2, 1, 538);
INIT_VLC_STATIC(&ff_mb_non_intra_vlc[0], MB_NON_INTRA_VLC_BITS, 128,
&ff_wmv2_inter_table[0][0][1], 8, 4,
@@ -607,6 +614,11 @@
} else {
level = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3);
}
+ if (level < 0){
+ av_log(s->avctx, AV_LOG_ERROR, "illegal dc vlc\n");
+ *dir_ptr = 0;
+ return -1;
+ }
if (level == DC_MAX) {
level = get_bits(&s->gb, 8);
@@ -828,7 +840,8 @@
return 0;
}
-void ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr)
+int ff_msmpeg4_decode_motion(MpegEncContext * s,
+ int *mx_ptr, int *my_ptr)
{
MVTable *mv;
int code, mx, my;
@@ -836,7 +849,11 @@
mv = &ff_mv_tables[s->mv_table_index];
code = get_vlc2(&s->gb, mv->vlc.table, MV_VLC_BITS, 2);
- if (code == MSMPEG4_MV_TABLES_NB_ELEMS) {
+ if (code < 0){
+ av_log(s->avctx, AV_LOG_ERROR, "illegal MV code at %d %d\n", s->mb_x, s->mb_y);
+ return -1;
+ }
+ if (code == mv->n) {
mx = get_bits(&s->gb, 6);
my = get_bits(&s->gb, 6);
} else {
@@ -858,6 +875,7 @@
my -= 64;
*mx_ptr = mx;
*my_ptr = my;
+ return 0;
}
AVCodec ff_msmpeg4v1_decoder = {
diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 5f809c2..2c61735 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -56,9 +56,9 @@
/* mark all entries as not used */
for(i=0;i<4096;i++)
- tab->table_mv_index[i] = MSMPEG4_MV_TABLES_NB_ELEMS;
+ tab->table_mv_index[i] = tab->n;
- for (i = 0; i < MSMPEG4_MV_TABLES_NB_ELEMS; i++) {
+ for(i=0;i<tab->n;i++) {
x = tab->table_mvx[i];
y = tab->table_mvy[i];
tab->table_mv_index[(x << 6) | y] = i;
@@ -320,7 +320,7 @@
put_bits(&s->pb,
mv->table_mv_bits[code],
mv->table_mv_code[code]);
- if (code == MSMPEG4_MV_TABLES_NB_ELEMS) {
+ if (code == mv->n) {
/* escape : code literally */
put_bits(&s->pb, 6, mx);
put_bits(&s->pb, 6, my);
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index feea2b6..9233b34 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -97,7 +97,7 @@
return ret;
if (avctx->bits_per_coded_sample > 1 && avctx->bits_per_coded_sample <= 8) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index b4b5ea4..c9bcce5 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -314,7 +314,7 @@
return ret;
if (s->mode_8bit) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index 763ce58..725e435 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -245,17 +245,16 @@
"Multiple SOF in a frame\n");
return AVERROR_INVALIDDATA;
}
+ s->got_sof_data = 0;
ret = ff_mjpeg_decode_sof(jpg);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR,
"SOF data decode error\n");
- s->got_sof_data = 0;
return ret;
}
if (jpg->interlaced) {
av_log(avctx, AV_LOG_ERROR,
"Interlaced mode not supported in MxPEG\n");
- s->got_sof_data = 0;
return AVERROR(EINVAL);
}
s->got_sof_data ++;
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index e091ec9..9ea679d 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -34,7 +34,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/random_seed.h"
#define BITSTREAM_READER_LE
diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c
index 9a53cad..57ce70e 100644
--- a/libavcodec/notchlc.c
+++ b/libavcodec/notchlc.c
@@ -496,9 +496,6 @@
bytestream2_init(gb, s->lzf_buffer, uncompressed_size);
} else if (s->format == 1) {
- if (bytestream2_get_bytes_left(gb) < uncompressed_size / 255)
- return AVERROR_INVALIDDATA;
-
av_fast_padded_malloc(&s->uncompressed_buffer, &s->uncompressed_size,
uncompressed_size);
if (!s->uncompressed_buffer)
diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c
index d6b6608..23c84d9 100644
--- a/libavcodec/nvdec.c
+++ b/libavcodec/nvdec.c
@@ -242,7 +242,7 @@
return ret;
}
-static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, buffer_size_t size)
+static AVBufferRef *nvdec_decoder_frame_alloc(void *opaque, int size)
{
NVDECFramePool *pool = opaque;
AVBufferRef *ret;
@@ -283,7 +283,7 @@
av_buffer_pool_uninit(&ctx->pool);
}
-static AVBufferRef *nvdec_alloc_dummy(buffer_size_t size)
+static AVBufferRef *nvdec_alloc_dummy(int size)
{
return av_buffer_create(NULL, 0, NULL, NULL, 0);
}
diff --git a/libavcodec/nvdec_av1.c b/libavcodec/nvdec_av1.c
index 1ce846a..bd920d8 100644
--- a/libavcodec/nvdec_av1.c
+++ b/libavcodec/nvdec_av1.c
@@ -53,10 +53,9 @@
unsigned char remap_lr_type[4] = { AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ };
- int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;
int ret, i, j;
- ret = ff_nvdec_start_frame_sep_ref(avctx, cur_frame, apply_grain);
+ ret = ff_nvdec_start_frame_sep_ref(avctx, cur_frame, film_grain->apply_grain);
if (ret < 0)
return ret;
@@ -96,8 +95,7 @@
.enable_superres = seq->enable_superres,
.enable_cdef = seq->enable_cdef,
.enable_restoration = seq->enable_restoration,
- .enable_fgs = seq->film_grain_params_present &&
- !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN),
+ .enable_fgs = seq->film_grain_params_present,
/* Frame Header */
.frame_type = frame_header->frame_type,
@@ -184,7 +182,7 @@
.spatial_layer_id = s->cur_frame.spatial_id,
/* Film Grain Params */
- .apply_grain = apply_grain,
+ .apply_grain = film_grain->apply_grain,
.overlap_flag = film_grain->overlap_flag,
.scaling_shift_minus8 = film_grain->grain_scaling_minus_8,
.chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma,
@@ -261,7 +259,7 @@
}
/* Film Grain Params */
- if (apply_grain) {
+ if (film_grain->apply_grain) {
for (i = 0; i < 14; ++i) {
ppc->scaling_points_y[i][0] = film_grain->point_y_value[i];
ppc->scaling_points_y[i][1] = film_grain->point_y_scaling[i];
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index a061dee..1c06b6a 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1921,7 +1921,7 @@
pkt->pts = params->outputTimeStamp;
pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
- pkt->dts -= FFMAX(avctx->max_b_frames, 0) * FFMAX(avctx->ticks_per_frame, 1);
+ pkt->dts -= FFMAX(avctx->max_b_frames, 0) * FFMIN(avctx->ticks_per_frame, 1);
return 0;
}
@@ -2247,7 +2247,7 @@
if (tc_data) {
sei_data[sei_count].payloadSize = (uint32_t)tc_size;
- sei_data[sei_count].payloadType = SEI_TYPE_TIME_CODE;
+ sei_data[sei_count].payloadType = HEVC_SEI_TYPE_TIME_CODE;
sei_data[sei_count].payload = (uint8_t*)tc_data;
sei_count ++;
}
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c
index 4c118d3..750ff33 100644
--- a/libavcodec/nvenc_h264.c
+++ b/libavcodec/nvenc_h264.c
@@ -193,7 +193,7 @@
{ "qblur", "-1" },
{ "qcomp", "-1" },
{ "g", "250" },
- { "bf", "-1" },
+ { "bf", "0" },
{ "refs", "0" },
{ NULL },
};
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index 031d2ef..37c2ebe 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -174,7 +174,7 @@
{ "qblur", "-1" },
{ "qcomp", "-1" },
{ "g", "250" },
- { "bf", "-1" },
+ { "bf", "0" },
{ "refs", "0" },
{ NULL },
};
diff --git a/libavcodec/on2avc.c b/libavcodec/on2avc.c
index d7a3e49..3885f9a 100644
--- a/libavcodec/on2avc.c
+++ b/libavcodec/on2avc.c
@@ -23,8 +23,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/ffmath.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "bytestream.h"
#include "fft.h"
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 6e904b6..4bbf74e 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -312,7 +312,6 @@
return &av_codec_context_class;
}
-#if FF_API_GET_FRAME_CLASS
#define FOFFSET(x) offsetof(AVFrame,x)
static const AVOption frame_options[]={
@@ -328,6 +327,7 @@
{NULL},
};
+#if FF_API_COPY_CONTEXT
static const AVClass av_frame_class = {
.class_name = "AVFrame",
.item_name = NULL,
@@ -354,6 +354,7 @@
{NULL},
};
+#if FF_API_COPY_CONTEXT
static const AVClass av_subtitle_rect_class = {
.class_name = "AVSubtitleRect",
.item_name = NULL,
@@ -365,3 +366,4 @@
{
return &av_subtitle_rect_class;
}
+#endif
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index e12159f..1b9d39a 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -140,15 +140,15 @@
{"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, A|V|D|E, "strict"},
{"experimental", "allow non-standardized experimental things", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, A|V|D|E, "strict"},
{"b_qoffset", "QP offset between P- and B-frames", OFFSET(b_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
-{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BUFFER }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"ignore_err", "ignore errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_IGNORE_ERR }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"careful", "consider things that violate the spec, are fast to check and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT | AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
-{"aggressive", "consider things that a sane encoder should not do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, A|V|S|D|E, "err_detect"},
+{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BUFFER }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_EXPLODE }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"ignore_err", "ignore errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_IGNORE_ERR }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"careful", "consider things that violate the spec, are fast to check and have not been seen in the wild as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"compliant", "consider all spec non compliancies as errors", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_COMPLIANT | AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"aggressive", "consider things that a sane encoder should not do as an error", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_AGGRESSIVE | AV_EF_COMPLIANT | AV_EF_CAREFUL}, INT_MIN, INT_MAX, A|V|D, "err_detect"},
{"has_b_frames", NULL, OFFSET(has_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
{"block_align", NULL, OFFSET(block_align), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX},
#if FF_API_PRIVATE_OPT
@@ -208,6 +208,9 @@
{"bitstream", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BITSTREAM }, INT_MIN, INT_MAX, V|D, "debug"},
{"mb_type", "macroblock (MB) type", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"},
{"qp", "per-block quantization parameter (QP)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_QP }, INT_MIN, INT_MAX, V|D, "debug"},
+#if FF_API_DEBUG_MV
+{"mv", "motion vector", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MV }, INT_MIN, INT_MAX, V|D, "debug"},
+#endif
{"dct_coeff", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_DCT_COEFF }, INT_MIN, INT_MAX, V|D, "debug"},
{"green_metadata", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_GREEN_MD }, INT_MIN, INT_MAX, V|D, "debug"},
{"skip", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_SKIP }, INT_MIN, INT_MAX, V|D, "debug"},
@@ -215,6 +218,10 @@
{"er", "error recognition", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_ER }, INT_MIN, INT_MAX, V|D, "debug"},
{"mmco", "memory management control operations (H.264)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_MMCO }, INT_MIN, INT_MAX, V|D, "debug"},
{"bugs", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUGS }, INT_MIN, INT_MAX, V|D, "debug"},
+#if FF_API_DEBUG_MV
+{"vis_qp", "visualize quantization parameter (QP), lower QP are tinted greener", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_QP }, INT_MIN, INT_MAX, V|D, "debug"},
+{"vis_mb_type", "visualize block types", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_VIS_MB_TYPE }, INT_MIN, INT_MAX, V|D, "debug"},
+#endif
{"buffers", "picture buffer allocations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_BUFFERS }, INT_MIN, INT_MAX, V|D, "debug"},
{"thread_ops", "threading operations", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_THREADS }, INT_MIN, INT_MAX, V|A|D, "debug"},
{"nomc", "skip motion compensation", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_NOMC }, INT_MIN, INT_MAX, V|A|D, "debug"},
@@ -441,9 +448,7 @@
#if FF_API_ASS_TIMING
{"ass_with_timings", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS}, INT_MIN, INT_MAX, S|D, "sub_text_format"},
#endif
-#if FF_API_OLD_ENCDEC
{"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D },
-#endif
#if FF_API_SIDEDATA_ONLY_PKT
{"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, A|V|E },
#endif
diff --git a/libavcodec/opus.h b/libavcodec/opus.h
index b73949a..63ecd0a 100644
--- a/libavcodec/opus.h
+++ b/libavcodec/opus.h
@@ -28,7 +28,6 @@
#include "libavutil/audio_fifo.h"
#include "libavutil/float_dsp.h"
#include "libavutil/frame.h"
-#include "libavutil/mem_internal.h"
#include "libswresample/swresample.h"
@@ -102,15 +101,6 @@
AVCodecContext *avctx;
int output_channels;
- /* number of decoded samples for this stream */
- int decoded_samples;
- /* current output buffers for this stream */
- float *out[2];
- int out_size;
- /* Buffer with samples from this stream for synchronizing
- * the streams when they have different resampling delays */
- AVAudioFifo *sync_buffer;
-
OpusRangeCoder rc;
OpusRangeCoder redundancy_rc;
SilkContext *silk;
@@ -125,9 +115,9 @@
DECLARE_ALIGNED(32, float, redundancy_buf)[2][960];
float *redundancy_output[2];
- /* buffers for the next samples to be decoded */
- float *cur_out[2];
- int remaining_out_size;
+ /* data buffers for the final output data */
+ float *out[2];
+ int out_size;
float *out_dummy;
int out_dummy_allocated_size;
@@ -164,6 +154,15 @@
OpusStreamContext *streams;
int apply_phase_inv;
+ /* current output buffers for each streams */
+ float **out;
+ int *out_size;
+ /* Buffers for synchronizing the streams when they have different
+ * resampling delays */
+ AVAudioFifo **sync_buffers;
+ /* number of decoded samples for each stream */
+ int *decoded_samples;
+
int nb_streams;
int nb_stereo_streams;
diff --git a/libavcodec/opus_celt.h b/libavcodec/opus_celt.h
index 661ca25..7c1c531 100644
--- a/libavcodec/opus_celt.h
+++ b/libavcodec/opus_celt.h
@@ -33,7 +33,6 @@
#include "mdct15.h"
#include "libavutil/float_dsp.h"
#include "libavutil/libm.h"
-#include "libavutil/mem_internal.h"
#define CELT_VECTORS 11
#define CELT_ALLOC_STEPS 6
diff --git a/libavcodec/opus_pvq.h b/libavcodec/opus_pvq.h
index b30407f..52f9a4e 100644
--- a/libavcodec/opus_pvq.h
+++ b/libavcodec/opus_pvq.h
@@ -23,8 +23,6 @@
#ifndef AVCODEC_OPUS_PVQ_H
#define AVCODEC_OPUS_PVQ_H
-#include "libavutil/mem_internal.h"
-
#include "opus_celt.h"
#define QUANT_FN(name) uint32_t (name)(struct CeltPVQ *pvq, CeltFrame *f, \
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index f0d7ed6..a08758d 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -87,7 +87,7 @@
int celt_size = av_audio_fifo_size(s->celt_delay);
int ret, i;
ret = swr_convert(s->swr,
- (uint8_t**)s->cur_out, nb_samples,
+ (uint8_t**)s->out, nb_samples,
NULL, 0);
if (ret < 0)
return ret;
@@ -104,7 +104,7 @@
}
av_audio_fifo_read(s->celt_delay, (void**)s->celt_output, nb_samples);
for (i = 0; i < s->output_channels; i++) {
- s->fdsp->vector_fmac_scalar(s->cur_out[i],
+ s->fdsp->vector_fmac_scalar(s->out[i],
s->celt_output[i], 1.0,
nb_samples);
}
@@ -112,15 +112,15 @@
if (s->redundancy_idx) {
for (i = 0; i < s->output_channels; i++)
- opus_fade(s->cur_out[i], s->cur_out[i],
+ opus_fade(s->out[i], s->out[i],
s->redundancy_output[i] + 120 + s->redundancy_idx,
ff_celt_window2 + s->redundancy_idx, 120 - s->redundancy_idx);
s->redundancy_idx = 0;
}
- s->cur_out[0] += nb_samples;
- s->cur_out[1] += nb_samples;
- s->remaining_out_size -= nb_samples * sizeof(float);
+ s->out[0] += nb_samples;
+ s->out[1] += nb_samples;
+ s->out_size -= nb_samples * sizeof(float);
return 0;
}
@@ -199,7 +199,7 @@
return samples;
}
samples = swr_convert(s->swr,
- (uint8_t**)s->cur_out, s->packet.frame_duration,
+ (uint8_t**)s->out, s->packet.frame_duration,
(const uint8_t**)s->silk_output, samples);
if (samples < 0) {
av_log(s->avctx, AV_LOG_ERROR, "Error resampling SILK data.\n");
@@ -240,7 +240,7 @@
/* decode the CELT frame */
if (s->packet.mode == OPUS_MODE_CELT || s->packet.mode == OPUS_MODE_HYBRID) {
- float *out_tmp[2] = { s->cur_out[0], s->cur_out[1] };
+ float *out_tmp[2] = { s->out[0], s->out[1] };
float **dst = (s->packet.mode == OPUS_MODE_CELT) ?
out_tmp : s->celt_output;
int celt_output_samples = samples;
@@ -295,7 +295,7 @@
if (s->redundancy_idx) {
for (i = 0; i < s->output_channels; i++)
- opus_fade(s->cur_out[i], s->cur_out[i],
+ opus_fade(s->out[i], s->out[i],
s->redundancy_output[i] + 120 + s->redundancy_idx,
ff_celt_window2 + s->redundancy_idx, 120 - s->redundancy_idx);
s->redundancy_idx = 0;
@@ -308,8 +308,8 @@
return ret;
for (i = 0; i < s->output_channels; i++) {
- opus_fade(s->cur_out[i] + samples - 120 + delayed_samples,
- s->cur_out[i] + samples - 120 + delayed_samples,
+ opus_fade(s->out[i] + samples - 120 + delayed_samples,
+ s->out[i] + samples - 120 + delayed_samples,
s->redundancy_output[i] + 120,
ff_celt_window2, 120 - delayed_samples);
if (delayed_samples)
@@ -317,10 +317,10 @@
}
} else {
for (i = 0; i < s->output_channels; i++) {
- memcpy(s->cur_out[i] + delayed_samples, s->redundancy_output[i], 120 * sizeof(float));
- opus_fade(s->cur_out[i] + 120 + delayed_samples,
+ memcpy(s->out[i] + delayed_samples, s->redundancy_output[i], 120 * sizeof(float));
+ opus_fade(s->out[i] + 120 + delayed_samples,
s->redundancy_output[i] + 120,
- s->cur_out[i] + 120 + delayed_samples,
+ s->out[i] + 120 + delayed_samples,
ff_celt_window2, 120);
}
}
@@ -331,15 +331,16 @@
static int opus_decode_subpacket(OpusStreamContext *s,
const uint8_t *buf, int buf_size,
+ float **out, int out_size,
int nb_samples)
{
int output_samples = 0;
int flush_needed = 0;
int i, j, ret;
- s->cur_out[0] = s->out[0];
- s->cur_out[1] = s->out[1];
- s->remaining_out_size = s->out_size;
+ s->out[0] = out[0];
+ s->out[1] = out[1];
+ s->out_size = out_size;
/* check if we need to flush the resampler */
if (swr_is_initialized(s->swr)) {
@@ -356,16 +357,15 @@
return 0;
/* use dummy output buffers if the channel is not mapped to anything */
- if (!s->cur_out[0] ||
- (s->output_channels == 2 && !s->cur_out[1])) {
- av_fast_malloc(&s->out_dummy, &s->out_dummy_allocated_size,
- s->remaining_out_size);
+ if (!s->out[0] ||
+ (s->output_channels == 2 && !s->out[1])) {
+ av_fast_malloc(&s->out_dummy, &s->out_dummy_allocated_size, s->out_size);
if (!s->out_dummy)
return AVERROR(ENOMEM);
- if (!s->cur_out[0])
- s->cur_out[0] = s->out_dummy;
- if (!s->cur_out[1])
- s->cur_out[1] = s->out_dummy;
+ if (!s->out[0])
+ s->out[0] = s->out_dummy;
+ if (!s->out[1])
+ s->out[1] = s->out_dummy;
}
/* flush the resampler if necessary */
@@ -394,19 +394,19 @@
return samples;
for (j = 0; j < s->output_channels; j++)
- memset(s->cur_out[j], 0, s->packet.frame_duration * sizeof(float));
+ memset(s->out[j], 0, s->packet.frame_duration * sizeof(float));
samples = s->packet.frame_duration;
}
output_samples += samples;
for (j = 0; j < s->output_channels; j++)
- s->cur_out[j] += samples;
- s->remaining_out_size -= samples * sizeof(float);
+ s->out[j] += samples;
+ s->out_size -= samples * sizeof(float);
}
finish:
- s->cur_out[0] = s->cur_out[1] = NULL;
- s->remaining_out_size = 0;
+ s->out[0] = s->out[1] = NULL;
+ s->out_size = 0;
return output_samples;
}
@@ -429,7 +429,7 @@
s->out[0] =
s->out[1] = NULL;
delayed_samples = FFMAX(delayed_samples,
- s->delayed_samples + av_audio_fifo_size(s->sync_buffer));
+ s->delayed_samples + av_audio_fifo_size(c->sync_buffers[i]));
}
/* decode the header of the first sub-packet to find out the sample count */
@@ -458,17 +458,17 @@
return ret;
frame->nb_samples = 0;
+ memset(c->out, 0, c->nb_streams * 2 * sizeof(*c->out));
for (i = 0; i < avctx->channels; i++) {
ChannelMap *map = &c->channel_maps[i];
if (!map->copy)
- c->streams[map->stream_idx].out[map->channel_idx] = (float*)frame->extended_data[i];
+ c->out[2 * map->stream_idx + map->channel_idx] = (float*)frame->extended_data[i];
}
/* read the data from the sync buffers */
for (i = 0; i < c->nb_streams; i++) {
- OpusStreamContext *s = &c->streams[i];
- float **out = s->out;
- int sync_size = av_audio_fifo_size(s->sync_buffer);
+ float **out = c->out + 2 * i;
+ int sync_size = av_audio_fifo_size(c->sync_buffers[i]);
float sync_dummy[32];
int out_dummy = (!out[0]) | ((!out[1]) << 1);
@@ -480,7 +480,7 @@
if (out_dummy && sync_size > FF_ARRAY_ELEMS(sync_dummy))
return AVERROR_BUG;
- ret = av_audio_fifo_read(s->sync_buffer, (void**)out, sync_size);
+ ret = av_audio_fifo_read(c->sync_buffers[i], (void**)out, sync_size);
if (ret < 0)
return ret;
@@ -493,7 +493,7 @@
else
out[1] += ret;
- s->out_size = frame->linesize[0] - ret * sizeof(float);
+ c->out_size[i] = frame->linesize[0] - ret * sizeof(float);
}
/* decode each sub-packet */
@@ -516,10 +516,10 @@
}
ret = opus_decode_subpacket(&c->streams[i], buf, s->packet.data_size,
- coded_samples);
+ c->out + 2 * i, c->out_size[i], coded_samples);
if (ret < 0)
return ret;
- s->decoded_samples = ret;
+ c->decoded_samples[i] = ret;
decoded_samples = FFMIN(decoded_samples, ret);
buf += s->packet.packet_size;
@@ -528,14 +528,13 @@
/* buffer the extra samples */
for (i = 0; i < c->nb_streams; i++) {
- OpusStreamContext *s = &c->streams[i];
- int buffer_samples = s->decoded_samples - decoded_samples;
+ int buffer_samples = c->decoded_samples[i] - decoded_samples;
if (buffer_samples) {
- float *buf[2] = { s->out[0] ? s->out[0] : (float*)frame->extended_data[0],
- s->out[1] ? s->out[1] : (float*)frame->extended_data[0] };
+ float *buf[2] = { c->out[2 * i + 0] ? c->out[2 * i + 0] : (float*)frame->extended_data[0],
+ c->out[2 * i + 1] ? c->out[2 * i + 1] : (float*)frame->extended_data[0] };
buf[0] += decoded_samples;
buf[1] += decoded_samples;
- ret = av_audio_fifo_write(s->sync_buffer, (void**)buf, buffer_samples);
+ ret = av_audio_fifo_write(c->sync_buffers[i], (void**)buf, buffer_samples);
if (ret < 0)
return ret;
}
@@ -577,10 +576,11 @@
memset(&s->packet, 0, sizeof(s->packet));
s->delayed_samples = 0;
- av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay));
+ if (s->celt_delay)
+ av_audio_fifo_drain(s->celt_delay, av_audio_fifo_size(s->celt_delay));
swr_close(s->swr);
- av_audio_fifo_drain(s->sync_buffer, av_audio_fifo_size(s->sync_buffer));
+ av_audio_fifo_drain(c->sync_buffers[i], av_audio_fifo_size(c->sync_buffers[i]));
ff_silk_flush(s->silk);
ff_celt_flush(s->celt);
@@ -601,13 +601,21 @@
av_freep(&s->out_dummy);
s->out_dummy_allocated_size = 0;
- av_audio_fifo_free(s->sync_buffer);
av_audio_fifo_free(s->celt_delay);
swr_free(&s->swr);
}
av_freep(&c->streams);
+ if (c->sync_buffers) {
+ for (i = 0; i < c->nb_streams; i++)
+ av_audio_fifo_free(c->sync_buffers[i]);
+ }
+ av_freep(&c->sync_buffers);
+ av_freep(&c->decoded_samples);
+ av_freep(&c->out);
+ av_freep(&c->out_size);
+
c->nb_streams = 0;
av_freep(&c->channel_maps);
@@ -630,14 +638,21 @@
/* find out the channel configuration */
ret = ff_opus_parse_extradata(avctx, c);
- if (ret < 0)
+ if (ret < 0) {
+ av_freep(&c->fdsp);
return ret;
+ }
/* allocate and init each independent decoder */
c->streams = av_mallocz_array(c->nb_streams, sizeof(*c->streams));
- if (!c->streams) {
+ c->out = av_mallocz_array(c->nb_streams, 2 * sizeof(*c->out));
+ c->out_size = av_mallocz_array(c->nb_streams, sizeof(*c->out_size));
+ c->sync_buffers = av_mallocz_array(c->nb_streams, sizeof(*c->sync_buffers));
+ c->decoded_samples = av_mallocz_array(c->nb_streams, sizeof(*c->decoded_samples));
+ if (!c->streams || !c->sync_buffers || !c->decoded_samples || !c->out || !c->out_size) {
c->nb_streams = 0;
- return AVERROR(ENOMEM);
+ ret = AVERROR(ENOMEM);
+ goto fail;
}
for (i = 0; i < c->nb_streams; i++) {
@@ -658,7 +673,7 @@
s->swr =swr_alloc();
if (!s->swr)
- return AVERROR(ENOMEM);
+ goto fail;
layout = (s->output_channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
av_opt_set_int(s->swr, "in_sample_fmt", avctx->sample_fmt, 0);
@@ -670,24 +685,31 @@
ret = ff_silk_init(avctx, &s->silk, s->output_channels);
if (ret < 0)
- return ret;
+ goto fail;
ret = ff_celt_init(avctx, &s->celt, s->output_channels, c->apply_phase_inv);
if (ret < 0)
- return ret;
+ goto fail;
s->celt_delay = av_audio_fifo_alloc(avctx->sample_fmt,
s->output_channels, 1024);
- if (!s->celt_delay)
- return AVERROR(ENOMEM);
+ if (!s->celt_delay) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
- s->sync_buffer = av_audio_fifo_alloc(avctx->sample_fmt,
- s->output_channels, 32);
- if (!s->sync_buffer)
- return AVERROR(ENOMEM);
+ c->sync_buffers[i] = av_audio_fifo_alloc(avctx->sample_fmt,
+ s->output_channels, 32);
+ if (!c->sync_buffers[i]) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
}
return 0;
+fail:
+ opus_decode_close(avctx);
+ return ret;
}
#define OFFSET(x) offsetof(OpusContext, x)
@@ -716,5 +738,4 @@
.decode = opus_decode_packet,
.flush = opus_decode_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_CHANNEL_CONF,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
};
diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c
index 8bc9e9d..953749a 100644
--- a/libavcodec/opusenc.c
+++ b/libavcodec/opusenc.c
@@ -25,7 +25,6 @@
#include "opustab.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "internal.h"
#include "bytestream.h"
diff --git a/libavcodec/opusenc_psy.h b/libavcodec/opusenc_psy.h
index d4fb096..b91e4f1 100644
--- a/libavcodec/opusenc_psy.h
+++ b/libavcodec/opusenc_psy.h
@@ -22,8 +22,6 @@
#ifndef AVCODEC_OPUSENC_PSY_H
#define AVCODEC_OPUSENC_PSY_H
-#include "libavutil/mem_internal.h"
-
#include "opusenc.h"
#include "opusenc_utils.h"
#include "libavfilter/window_func.h"
diff --git a/libavcodec/opustab.c b/libavcodec/opustab.c
index b23ca4f..64070f8 100644
--- a/libavcodec/opustab.c
+++ b/libavcodec/opustab.c
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
-
#include "opustab.h"
const uint8_t ff_opus_default_coupled_streams[] = { 0, 1, 1, 2, 2, 2, 2, 3 };
@@ -952,7 +950,7 @@
16384, 17866, 19483, 21247, 23170, 25267, 27554, 30048
};
-static const uint32_t celt_pvq_u[1272] = {
+const uint32_t ff_celt_pvq_u[1272] = {
/* N = 0, K = 0...176 */
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1132,7 +1130,7 @@
1.00000000f, 1.00000000f, 1.00000000f,
};
-const float *const ff_celt_window = &ff_celt_window_padded[8];
+const float *ff_celt_window = &ff_celt_window_padded[8];
/* square of the window, used for the postfilter */
const float ff_celt_window2[120] = {
@@ -1155,9 +1153,9 @@
};
const uint32_t * const ff_celt_pvq_u_row[15] = {
- celt_pvq_u + 0, celt_pvq_u + 176, celt_pvq_u + 351,
- celt_pvq_u + 525, celt_pvq_u + 698, celt_pvq_u + 870,
- celt_pvq_u + 1041, celt_pvq_u + 1131, celt_pvq_u + 1178,
- celt_pvq_u + 1207, celt_pvq_u + 1226, celt_pvq_u + 1240,
- celt_pvq_u + 1248, celt_pvq_u + 1254, celt_pvq_u + 1257
+ ff_celt_pvq_u + 0, ff_celt_pvq_u + 176, ff_celt_pvq_u + 351,
+ ff_celt_pvq_u + 525, ff_celt_pvq_u + 698, ff_celt_pvq_u + 870,
+ ff_celt_pvq_u + 1041, ff_celt_pvq_u + 1131, ff_celt_pvq_u + 1178,
+ ff_celt_pvq_u + 1207, ff_celt_pvq_u + 1226, ff_celt_pvq_u + 1240,
+ ff_celt_pvq_u + 1248, ff_celt_pvq_u + 1254, ff_celt_pvq_u + 1257
};
diff --git a/libavcodec/opustab.h b/libavcodec/opustab.h
index 4525837..892126b 100644
--- a/libavcodec/opustab.h
+++ b/libavcodec/opustab.h
@@ -152,11 +152,12 @@
extern const uint8_t ff_celt_hadamard_order[];
extern const uint16_t ff_celt_qn_exp2[];
+extern const uint32_t ff_celt_pvq_u[1272];
extern const float ff_celt_postfilter_taps[3][3];
extern const float ff_celt_window2[120];
-extern const float *const ff_celt_window;
+extern const float *ff_celt_window;
extern const uint32_t * const ff_celt_pvq_u_row[15];
diff --git a/libavcodec/packet.h b/libavcodec/packet.h
index 3d9013d..b9d4c9c 100644
--- a/libavcodec/packet.h
+++ b/libavcodec/packet.h
@@ -305,11 +305,7 @@
typedef struct AVPacketSideData {
uint8_t *data;
-#if FF_API_BUFFER_SIZE_T
int size;
-#else
- size_t size;
-#endif
enum AVPacketSideDataType type;
} AVPacketSideData;
@@ -563,11 +559,7 @@
* @return pointer to fresh allocated data or NULL otherwise
*/
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
int size);
-#else
- size_t size);
-#endif
/**
* Wrap an existing array as a packet side data.
@@ -594,11 +586,7 @@
* @return 0 on success, < 0 on failure
*/
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
int size);
-#else
- size_t size);
-#endif
/**
* Get side information from packet.
@@ -610,11 +598,7 @@
* @return pointer to data if present or NULL otherwise
*/
uint8_t* av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type,
-#if FF_API_BUFFER_SIZE_T
int *size);
-#else
- size_t *size);
-#endif
#if FF_API_MERGE_SD_API
attribute_deprecated
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index f4bc00d..a63f532 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -186,7 +186,6 @@
return index;
}
-#if FF_API_PARSER_CHANGE
int av_parser_change(AVCodecParserContext *s, AVCodecContext *avctx,
uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size, int keyframe)
@@ -221,7 +220,7 @@
return 0;
}
-#endif
+
void av_parser_close(AVCodecParserContext *s)
{
if (s) {
diff --git a/libavcodec/parsers.c b/libavcodec/parsers.c
index 3d944f5..83271d9 100644
--- a/libavcodec/parsers.c
+++ b/libavcodec/parsers.c
@@ -33,11 +33,9 @@
extern AVCodecParser ff_bmp_parser;
extern AVCodecParser ff_cavsvideo_parser;
extern AVCodecParser ff_cook_parser;
-extern AVCodecParser ff_cri_parser;
extern AVCodecParser ff_dca_parser;
extern AVCodecParser ff_dirac_parser;
extern AVCodecParser ff_dnxhd_parser;
-extern AVCodecParser ff_dolby_e_parser;
extern AVCodecParser ff_dpx_parser;
extern AVCodecParser ff_dvaudio_parser;
extern AVCodecParser ff_dvbsub_parser;
@@ -73,13 +71,11 @@
extern AVCodecParser ff_vp8_parser;
extern AVCodecParser ff_vp9_parser;
extern AVCodecParser ff_webp_parser;
-extern AVCodecParser ff_xbm_parser;
extern AVCodecParser ff_xma_parser;
#include "libavcodec/parser_list.c"
#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
static AVOnce av_parser_next_init = AV_ONCE_INIT;
static void av_parser_init_next(void)
@@ -107,7 +103,6 @@
{
ff_thread_once(&av_parser_next_init, av_parser_init_next);
}
-FF_ENABLE_DEPRECATION_WARNINGS
#endif
const AVCodecParser *av_parser_iterate(void **opaque)
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 19d04e9..7f0af85 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -419,14 +419,6 @@
for (; n > 0; n--)
*samples++ = *src++ + 128;
break;
- case AV_CODEC_ID_PCM_SGA:
- for (; n > 0; n--) {
- int sign = *src >> 7;
- int magn = *src & 0x7f;
- *samples++ = sign ? 128 - magn : 128 + magn;
- src++;
- }
- break;
case AV_CODEC_ID_PCM_S8_PLANAR:
n /= avctx->channels;
for (c = 0; c < avctx->channels; c++) {
@@ -630,4 +622,3 @@
PCM_CODEC (PCM_S64BE, AV_SAMPLE_FMT_S64, pcm_s64be, "PCM signed 64-bit big-endian");
PCM_CODEC (PCM_S64LE, AV_SAMPLE_FMT_S64, pcm_s64le, "PCM signed 64-bit little-endian");
PCM_CODEC (PCM_VIDC, AV_SAMPLE_FMT_S16, pcm_vidc, "PCM Archimedes VIDC");
-PCM_DECODER(PCM_SGA, AV_SAMPLE_FMT_U8, pcm_sga, "PCM SGA");
diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c
index 65b2929..5c73589 100644
--- a/libavcodec/pgxdec.c
+++ b/libavcodec/pgxdec.c
@@ -95,7 +95,7 @@
}
#define WRITE_FRAME(D, PIXEL, suffix) \
- static inline void write_frame_ ##D(AVFrame *frame, GetByteContext *g, \
+ static inline void write_frame_ ##D(AVPacket *avpkt, AVFrame *frame, GetByteContext *g, \
int width, int height, int sign, int depth) \
{ \
int i, j; \
@@ -151,9 +151,9 @@
p->key_frame = 1;
avctx->bits_per_raw_sample = depth;
if (bpp == 8)
- write_frame_8(p, &g, width, height, sign, depth);
+ write_frame_8(avpkt, p, &g, width, height, sign, depth);
else if (bpp == 16)
- write_frame_16(p, &g, width, height, sign, depth);
+ write_frame_16(avpkt, p, &g, width, height, sign, depth);
*got_frame = 1;
return 0;
}
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index ad9d830..42acd68 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -525,7 +525,7 @@
}
static int decode_plane(AVCodecContext *avctx, int plane,
- const AVPacket *avpkt, AVFrame *frame)
+ AVPacket *avpkt, AVFrame *frame)
{
PixletContext *ctx = avctx->priv_data;
ptrdiff_t stride = frame->linesize[plane] / 2;
diff --git a/libavcodec/png.h b/libavcodec/png.h
index a155601..e967fcf 100644
--- a/libavcodec/png.h
+++ b/libavcodec/png.h
@@ -24,8 +24,6 @@
#include <stdint.h>
-#include "pngdsp.h"
-
#define PNG_COLOR_MASK_PALETTE 1
#define PNG_COLOR_MASK_COLOR 2
#define PNG_COLOR_MASK_ALPHA 4
@@ -63,7 +61,4 @@
void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp);
-void ff_png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
- uint8_t *src, uint8_t *last, int size, int bpp);
-
#endif /* AVCODEC_PNG_H */
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a5a71ef..395b86b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -54,6 +54,7 @@
AVCodecContext *avctx;
GetByteContext gb;
+ ThreadFrame previous_picture;
ThreadFrame last_picture;
ThreadFrame picture;
@@ -249,8 +250,8 @@
}
/* NOTE: 'dst' can be equal to 'last' */
-void ff_png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
- uint8_t *src, uint8_t *last, int size, int bpp)
+static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
+ uint8_t *src, uint8_t *last, int size, int bpp)
{
int i, p, r, g, b, a;
@@ -342,8 +343,8 @@
else
last_row = ptr - s->image_linesize;
- ff_png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1,
- last_row, s->row_size, s->bpp);
+ png_filter_row(&s->dsp, ptr, s->crow_buf[0], s->crow_buf + 1,
+ last_row, s->row_size, s->bpp);
/* loco lags by 1 row so that it doesn't interfere with top prediction */
if (s->filter_type == PNG_FILTER_TYPE_LOCO && s->y > 0) {
if (s->bit_depth == 16) {
@@ -376,8 +377,8 @@
* wait for the next one */
if (got_line)
break;
- ff_png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1,
- s->last_row, s->pass_row_size, s->bpp);
+ png_filter_row(&s->dsp, s->tmp_row, s->crow_buf[0], s->crow_buf + 1,
+ s->last_row, s->pass_row_size, s->bpp);
FFSWAP(uint8_t *, s->last_row, s->tmp_row);
FFSWAP(unsigned int, s->last_row_size, s->tmp_row_size);
got_line = 1;
@@ -710,10 +711,13 @@
s->bpp += byte_depth;
}
- ff_thread_release_buffer(avctx, &s->picture);
if ((ret = ff_thread_get_buffer(avctx, &s->picture, AV_GET_BUFFER_FLAG_REF)) < 0)
return ret;
-
+ if (avctx->codec_id == AV_CODEC_ID_APNG && s->last_dispose_op != APNG_DISPOSE_OP_PREVIOUS) {
+ ff_thread_release_buffer(avctx, &s->previous_picture);
+ if ((ret = ff_thread_get_buffer(avctx, &s->previous_picture, AV_GET_BUFFER_FLAG_REF)) < 0)
+ return ret;
+ }
p->pict_type = AV_PICTURE_TYPE_I;
p->key_frame = 1;
p->interlaced_frame = !!s->interlace_type;
@@ -1016,7 +1020,7 @@
return AVERROR_INVALIDDATA;
}
- if ((sequence_number == 0 || !s->last_picture.f->data[0]) &&
+ if ((sequence_number == 0 || !s->previous_picture.f->data[0]) &&
dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
// No previous frame to revert to for the first frame
// Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND
@@ -1084,23 +1088,23 @@
if (!buffer)
return AVERROR(ENOMEM);
- ff_thread_await_progress(&s->last_picture, INT_MAX, 0);
- // need to reset a rectangle to background:
- // create a new writable copy
- if (s->last_dispose_op == APNG_DISPOSE_OP_BACKGROUND) {
- int ret = av_frame_make_writable(s->last_picture.f);
- if (ret < 0)
- return ret;
+ // Do the disposal operation specified by the last frame on the frame
+ if (s->last_dispose_op != APNG_DISPOSE_OP_PREVIOUS) {
+ ff_thread_await_progress(&s->last_picture, INT_MAX, 0);
+ memcpy(buffer, s->last_picture.f->data[0], s->image_linesize * s->height);
- for (y = s->last_y_offset; y < s->last_y_offset + s->last_h; y++) {
- memset(s->last_picture.f->data[0] + s->image_linesize * y +
- s->bpp * s->last_x_offset, 0, s->bpp * s->last_w);
- }
+ if (s->last_dispose_op == APNG_DISPOSE_OP_BACKGROUND)
+ for (y = s->last_y_offset; y < s->last_y_offset + s->last_h; ++y)
+ memset(buffer + s->image_linesize * y + s->bpp * s->last_x_offset, 0, s->bpp * s->last_w);
+
+ memcpy(s->previous_picture.f->data[0], buffer, s->image_linesize * s->height);
+ ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
+ } else {
+ ff_thread_await_progress(&s->previous_picture, INT_MAX, 0);
+ memcpy(buffer, s->previous_picture.f->data[0], s->image_linesize * s->height);
}
- memcpy(buffer, s->last_picture.f->data[0], s->image_linesize * s->height);
-
// Perform blending
if (s->blend_op == APNG_BLEND_OP_SOURCE) {
for (y = s->y_offset; y < s->y_offset + s->cur_h; ++y) {
@@ -1179,7 +1183,7 @@
}
static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
- AVFrame *p, const AVPacket *avpkt)
+ AVFrame *p, AVPacket *avpkt)
{
const AVCRC *crc_tab = av_crc_get_table(AV_CRC_32_IEEE_LE);
AVDictionary **metadatap = NULL;
@@ -1444,17 +1448,22 @@
if (CONFIG_PNG_DECODER && avctx->codec_id != AV_CODEC_ID_APNG)
handle_p_frame_png(s, p);
else if (CONFIG_APNG_DECODER &&
+ s->previous_picture.f->width == p->width &&
+ s->previous_picture.f->height== p->height &&
+ s->previous_picture.f->format== p->format &&
avctx->codec_id == AV_CODEC_ID_APNG &&
(ret = handle_p_frame_apng(avctx, s, p)) < 0)
goto fail;
}
}
ff_thread_report_progress(&s->picture, INT_MAX, 0);
+ ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
return 0;
fail:
ff_thread_report_progress(&s->picture, INT_MAX, 0);
+ ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
return ret;
}
@@ -1466,10 +1475,14 @@
PNGDecContext *const s = avctx->priv_data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
- AVFrame *p = s->picture.f;
+ AVFrame *p;
int64_t sig;
int ret;
+ ff_thread_release_buffer(avctx, &s->last_picture);
+ FFSWAP(ThreadFrame, s->picture, s->last_picture);
+ p = s->picture.f;
+
bytestream2_init(&s->gb, buf, buf_size);
/* check signature */
@@ -1506,11 +1519,6 @@
if ((ret = av_frame_ref(data, s->picture.f)) < 0)
goto the_end;
- if (!(avctx->active_thread_type & FF_THREAD_FRAME)) {
- ff_thread_release_buffer(avctx, &s->last_picture);
- FFSWAP(ThreadFrame, s->picture, s->last_picture);
- }
-
*got_frame = 1;
ret = bytestream2_tell(&s->gb);
@@ -1528,7 +1536,11 @@
{
PNGDecContext *const s = avctx->priv_data;
int ret;
- AVFrame *p = s->picture.f;
+ AVFrame *p;
+
+ ff_thread_release_buffer(avctx, &s->last_picture);
+ FFSWAP(ThreadFrame, s->picture, s->last_picture);
+ p = s->picture.f;
if (!(s->hdr_state & PNG_IHDR)) {
if (!avctx->extradata_size)
@@ -1564,15 +1576,6 @@
if ((ret = av_frame_ref(data, s->picture.f)) < 0)
goto end;
- if (!(avctx->active_thread_type & FF_THREAD_FRAME)) {
- if (s->dispose_op == APNG_DISPOSE_OP_PREVIOUS) {
- ff_thread_release_buffer(avctx, &s->picture);
- } else if (s->dispose_op == APNG_DISPOSE_OP_NONE) {
- ff_thread_release_buffer(avctx, &s->last_picture);
- FFSWAP(ThreadFrame, s->picture, s->last_picture);
- }
- }
-
*got_frame = 1;
ret = bytestream2_tell(&s->gb);
@@ -1582,19 +1585,163 @@
}
#endif
+#if CONFIG_LSCR_DECODER
+static int decode_frame_lscr(AVCodecContext *avctx,
+ void *data, int *got_frame,
+ AVPacket *avpkt)
+{
+ PNGDecContext *const s = avctx->priv_data;
+ GetByteContext *gb = &s->gb;
+ AVFrame *frame = data;
+ int ret, nb_blocks, offset = 0;
+
+ if (avpkt->size < 2)
+ return AVERROR_INVALIDDATA;
+ if (avpkt->size == 2)
+ return 0;
+
+ bytestream2_init(gb, avpkt->data, avpkt->size);
+
+ if ((ret = ff_get_buffer(avctx, frame, AV_GET_BUFFER_FLAG_REF)) < 0)
+ return ret;
+
+ nb_blocks = bytestream2_get_le16(gb);
+ if (bytestream2_get_bytes_left(gb) < 2 + nb_blocks * (12 + 8))
+ return AVERROR_INVALIDDATA;
+
+ if (s->last_picture.f->data[0]) {
+ ret = av_frame_copy(frame, s->last_picture.f);
+ if (ret < 0)
+ return ret;
+ }
+
+ for (int b = 0; b < nb_blocks; b++) {
+ int x, y, x2, y2, w, h, left;
+ uint32_t csize, size;
+
+ s->zstream.zalloc = ff_png_zalloc;
+ s->zstream.zfree = ff_png_zfree;
+ s->zstream.opaque = NULL;
+
+ if ((ret = inflateInit(&s->zstream)) != Z_OK) {
+ av_log(avctx, AV_LOG_ERROR, "inflateInit returned error %d\n", ret);
+ ret = AVERROR_EXTERNAL;
+ goto end;
+ }
+
+ bytestream2_seek(gb, 2 + b * 12, SEEK_SET);
+
+ x = bytestream2_get_le16(gb);
+ y = bytestream2_get_le16(gb);
+ x2 = bytestream2_get_le16(gb);
+ y2 = bytestream2_get_le16(gb);
+ s->width = s->cur_w = w = x2-x;
+ s->height = s->cur_h = h = y2-y;
+
+ if (w <= 0 || x < 0 || x >= avctx->width || w + x > avctx->width ||
+ h <= 0 || y < 0 || y >= avctx->height || h + y > avctx->height) {
+ ret = AVERROR_INVALIDDATA;
+ goto end;
+ }
+
+ size = bytestream2_get_le32(gb);
+
+ frame->key_frame = (nb_blocks == 1) &&
+ (w == avctx->width) &&
+ (h == avctx->height) &&
+ (x == 0) && (y == 0);
+
+ bytestream2_seek(gb, 2 + nb_blocks * 12 + offset, SEEK_SET);
+ csize = bytestream2_get_be32(gb);
+ if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T')) {
+ ret = AVERROR_INVALIDDATA;
+ goto end;
+ }
+
+ offset += size;
+ left = size;
+
+ s->y = 0;
+ s->row_size = w * 3;
+
+ av_fast_padded_malloc(&s->buffer, &s->buffer_size, s->row_size + 16);
+ if (!s->buffer) {
+ ret = AVERROR(ENOMEM);
+ goto end;
+ }
+
+ av_fast_padded_malloc(&s->last_row, &s->last_row_size, s->row_size);
+ if (!s->last_row) {
+ ret = AVERROR(ENOMEM);
+ goto end;
+ }
+
+ s->crow_size = w * 3 + 1;
+ s->crow_buf = s->buffer + 15;
+ s->zstream.avail_out = s->crow_size;
+ s->zstream.next_out = s->crow_buf;
+ s->image_buf = frame->data[0] + (avctx->height - y - 1) * frame->linesize[0] + x * 3;
+ s->image_linesize =-frame->linesize[0];
+ s->bpp = 3;
+ s->pic_state = 0;
+
+ while (left > 16) {
+ ret = png_decode_idat(s, csize);
+ if (ret < 0)
+ goto end;
+ left -= csize + 16;
+ if (left > 16) {
+ bytestream2_skip(gb, 4);
+ csize = bytestream2_get_be32(gb);
+ if (bytestream2_get_le32(gb) != MKTAG('I', 'D', 'A', 'T')) {
+ ret = AVERROR_INVALIDDATA;
+ goto end;
+ }
+ }
+ }
+
+ inflateEnd(&s->zstream);
+ }
+
+ frame->pict_type = frame->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
+
+ av_frame_unref(s->last_picture.f);
+ if ((ret = av_frame_ref(s->last_picture.f, frame)) < 0)
+ return ret;
+
+ *got_frame = 1;
+end:
+ inflateEnd(&s->zstream);
+
+ if (ret < 0)
+ return ret;
+ return avpkt->size;
+}
+
+static void decode_flush(AVCodecContext *avctx)
+{
+ PNGDecContext *s = avctx->priv_data;
+
+ av_frame_unref(s->last_picture.f);
+}
+
+#endif
+
#if HAVE_THREADS
static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
{
PNGDecContext *psrc = src->priv_data;
PNGDecContext *pdst = dst->priv_data;
- ThreadFrame *src_frame = NULL;
int ret;
if (dst == src)
return 0;
+ ff_thread_release_buffer(dst, &pdst->picture);
+ if (psrc->picture.f->data[0] &&
+ (ret = ff_thread_ref_frame(&pdst->picture, &psrc->picture)) < 0)
+ return ret;
if (CONFIG_APNG_DECODER && dst->codec_id == AV_CODEC_ID_APNG) {
-
pdst->width = psrc->width;
pdst->height = psrc->height;
pdst->bit_depth = psrc->bit_depth;
@@ -1614,15 +1761,15 @@
memcpy(pdst->palette, psrc->palette, sizeof(pdst->palette));
pdst->hdr_state |= psrc->hdr_state;
- }
- src_frame = psrc->dispose_op == APNG_DISPOSE_OP_NONE ?
- &psrc->picture : &psrc->last_picture;
+ ff_thread_release_buffer(dst, &pdst->last_picture);
+ if (psrc->last_picture.f->data[0] &&
+ (ret = ff_thread_ref_frame(&pdst->last_picture, &psrc->last_picture)) < 0)
+ return ret;
- ff_thread_release_buffer(dst, &pdst->last_picture);
- if (src_frame && src_frame->f->data[0]) {
- ret = ff_thread_ref_frame(&pdst->last_picture, src_frame);
- if (ret < 0)
+ ff_thread_release_buffer(dst, &pdst->previous_picture);
+ if (psrc->previous_picture.f->data[0] &&
+ (ret = ff_thread_ref_frame(&pdst->previous_picture, &psrc->previous_picture)) < 0)
return ret;
}
@@ -1636,10 +1783,15 @@
avctx->color_range = AVCOL_RANGE_JPEG;
+ if (avctx->codec_id == AV_CODEC_ID_LSCR)
+ avctx->pix_fmt = AV_PIX_FMT_BGR24;
+
s->avctx = avctx;
+ s->previous_picture.f = av_frame_alloc();
s->last_picture.f = av_frame_alloc();
s->picture.f = av_frame_alloc();
- if (!s->last_picture.f || !s->picture.f) {
+ if (!s->previous_picture.f || !s->last_picture.f || !s->picture.f) {
+ av_frame_free(&s->previous_picture.f);
av_frame_free(&s->last_picture.f);
av_frame_free(&s->picture.f);
return AVERROR(ENOMEM);
@@ -1654,6 +1806,8 @@
{
PNGDecContext *s = avctx->priv_data;
+ ff_thread_release_buffer(avctx, &s->previous_picture);
+ av_frame_free(&s->previous_picture.f);
ff_thread_release_buffer(avctx, &s->last_picture);
av_frame_free(&s->last_picture.f);
ff_thread_release_buffer(avctx, &s->picture);
@@ -1701,3 +1855,20 @@
FF_CODEC_CAP_ALLOCATE_PROGRESS,
};
#endif
+
+#if CONFIG_LSCR_DECODER
+AVCodec ff_lscr_decoder = {
+ .name = "lscr",
+ .long_name = NULL_IF_CONFIG_SMALL("LEAD Screen Capture"),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_LSCR,
+ .priv_data_size = sizeof(PNGDecContext),
+ .init = png_dec_init,
+ .close = png_dec_end,
+ .decode = decode_frame_lscr,
+ .flush = decode_flush,
+ .capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
+ .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_INIT_THREADSAFE |
+ FF_CODEC_CAP_ALLOCATE_PROGRESS,
+};
+#endif
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index eebb164..efcae8c 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1174,7 +1174,7 @@
AV_PIX_FMT_PAL8,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8A,
AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_YA16BE,
- AV_PIX_FMT_NONE
+ AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE
},
.priv_class = &apngenc_class,
};
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 958f2a3..aad23c7 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -72,7 +72,6 @@
s->bytestream[0] != 'P' ||
(s->bytestream[1] < '1' ||
s->bytestream[1] > '7' &&
- s->bytestream[1] != 'f' &&
s->bytestream[1] != 'F')) {
s->bytestream += s->bytestream_end > s->bytestream;
s->bytestream += s->bytestream_end > s->bytestream;
@@ -83,8 +82,6 @@
if (buf1[1] == 'F') {
avctx->pix_fmt = AV_PIX_FMT_GBRPF32;
- } else if (buf1[1] == 'f') {
- avctx->pix_fmt = AV_PIX_FMT_GRAYF32;
} else if (s->type==1 || s->type==4) {
avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
} else if (s->type==2 || s->type==5) {
@@ -180,7 +177,7 @@
if (ret < 0)
return ret;
- if (avctx->pix_fmt == AV_PIX_FMT_GBRPF32 || avctx->pix_fmt == AV_PIX_FMT_GRAYF32) {
+ if (avctx->pix_fmt == AV_PIX_FMT_GBRPF32) {
pnm_get(s, buf1, sizeof(buf1));
if (av_sscanf(buf1, "%f", &s->scale) != 1 || s->scale == 0.0 || !isfinite(s->scale)) {
av_log(avctx, AV_LOG_ERROR, "Invalid scale.\n");
@@ -221,8 +218,7 @@
return AVERROR_INVALIDDATA;
/* more check if YUV420 */
- if ((av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) &&
- avctx->pix_fmt != AV_PIX_FMT_GBRPF32) {
+ if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) {
if ((avctx->width & 1) != 0)
return AVERROR_INVALIDDATA;
h = (avctx->height * 2);
diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c
index f3be6d6..d19dbfe 100644
--- a/libavcodec/pnm_parser.c
+++ b/libavcodec/pnm_parser.c
@@ -109,10 +109,8 @@
if (next == END_NOT_FOUND)
pnmpc->ascii_scan = sync - pnmctx.bytestream + skip;
} else {
- int ret = av_image_get_buffer_size(avctx->pix_fmt, avctx->width, avctx->height, 1);
- next = pnmctx.bytestream - pnmctx.bytestream_start + skip;
- if (ret >= 0)
- next += ret;
+ next = pnmctx.bytestream - pnmctx.bytestream_start + skip
+ + av_image_get_buffer_size(avctx->pix_fmt, avctx->width, avctx->height, 1);
}
if (next != END_NOT_FOUND && pnmctx.bytestream_start != buf + skip)
next -= pc->index;
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index 4d5ce0b..9add5cf 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -297,30 +297,6 @@
}
}
break;
- case AV_PIX_FMT_GRAYF32:
- if (avctx->width * avctx->height * 4 > s->bytestream_end - s->bytestream)
- return AVERROR_INVALIDDATA;
- scale = 1.f / s->scale;
- if (s->endian) {
- float *g = (float *)p->data[0];
- for (int i = 0; i < avctx->height; i++) {
- for (int j = 0; j < avctx->width; j++) {
- g[j] = av_int2float(AV_RL32(s->bytestream)) * scale;
- s->bytestream += 4;
- }
- g += p->linesize[0] / 4;
- }
- } else {
- float *g = (float *)p->data[0];
- for (int i = 0; i < avctx->height; i++) {
- for (int j = 0; j < avctx->width; j++) {
- g[j] = av_int2float(AV_RB32(s->bytestream)) * scale;
- s->bytestream += 4;
- }
- g += p->linesize[0] / 4;
- }
- }
- break;
}
*got_frame = 1;
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 276504b..7bb42c5 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
@@ -78,46 +77,19 @@
n = avctx->width * 2;
h1 = (h * 3) / 2;
break;
- case AV_PIX_FMT_GBRPF32:
- c = 'F';
- n = avctx->width * 4;
- break;
default:
return -1;
}
snprintf(bytestream, bytestream_end - bytestream,
"P%c\n%d %d\n", c, avctx->width, h1);
bytestream += strlen(bytestream);
- if (avctx->pix_fmt == AV_PIX_FMT_GBRPF32)
- snprintf(bytestream, bytestream_end - bytestream,
- "%f\n", avctx->pix_fmt == AV_PIX_FMT_GBRPF32BE ? 1.f: -1.f);
- bytestream += strlen(bytestream);
- if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE &&
- avctx->pix_fmt != AV_PIX_FMT_GBRPF32) {
+ if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) {
int maxdepth = (1 << av_pix_fmt_desc_get(avctx->pix_fmt)->comp[0].depth) - 1;
snprintf(bytestream, bytestream_end - bytestream,
"%d\n", maxdepth);
bytestream += strlen(bytestream);
}
- if (avctx->pix_fmt == AV_PIX_FMT_GBRPF32) {
- float *r = (float *)p->data[2];
- float *g = (float *)p->data[0];
- float *b = (float *)p->data[1];
-
- for (int i = 0; i < avctx->height; i++) {
- for (int j = 0; j < avctx->width; j++) {
- AV_WN32(bytestream + 0, av_float2int(r[j]));
- AV_WN32(bytestream + 4, av_float2int(g[j]));
- AV_WN32(bytestream + 8, av_float2int(b[j]));
- bytestream += 12;
- }
-
- r += p->linesize[2] / 4;
- g += p->linesize[0] / 4;
- b += p->linesize[1] / 4;
- }
- } else {
ptr = p->data[0];
linesize = p->linesize[0];
for (i = 0; i < h; i++) {
@@ -125,7 +97,6 @@
bytestream += n;
ptr += linesize;
}
- }
if (avctx->pix_fmt == AV_PIX_FMT_YUV420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P16BE) {
h >>= 1;
@@ -218,17 +189,3 @@
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
#endif
-
-#if CONFIG_PFM_ENCODER
-AVCodec ff_pfm_encoder = {
- .name = "pfm",
- .long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_PFM,
- .init = pnm_encode_init,
- .encode2 = pnm_encode_frame,
- .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GBRPF32,
- AV_PIX_FMT_NONE },
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
-};
-#endif
diff --git a/libavcodec/ppc/h264chroma_template.c b/libavcodec/ppc/h264chroma_template.c
index eda98c6..8f43e5d 100644
--- a/libavcodec/ppc/h264chroma_template.c
+++ b/libavcodec/ppc/h264chroma_template.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/ppc/util_altivec.h"
/* this code assume that stride % 16 == 0 */
diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c
index 779092f..d8a3baa 100644
--- a/libavcodec/ppc/h264dsp.c
+++ b/libavcodec/ppc/h264dsp.c
@@ -26,7 +26,7 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c
index fe896c8..bef421f 100644
--- a/libavcodec/ppc/h264qpel.c
+++ b/libavcodec/ppc/h264qpel.c
@@ -23,7 +23,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
diff --git a/libavcodec/ppc/mpegaudiodsp_altivec.c b/libavcodec/ppc/mpegaudiodsp_altivec.c
index 6794ed0..efa9fd5 100644
--- a/libavcodec/ppc/mpegaudiodsp_altivec.c
+++ b/libavcodec/ppc/mpegaudiodsp_altivec.c
@@ -23,7 +23,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/mpegaudiodsp.h"
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index bcb59ba..2c6ff91 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -28,7 +28,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
diff --git a/libavcodec/ppc/mpegvideodsp.c b/libavcodec/ppc/mpegvideodsp.c
index 81f4845..990a974 100644
--- a/libavcodec/ppc/mpegvideodsp.c
+++ b/libavcodec/ppc/mpegvideodsp.c
@@ -21,7 +21,7 @@
*/
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c
index 64ee703..31201ed 100644
--- a/libavcodec/ppc/vp8dsp_altivec.c
+++ b/libavcodec/ppc/vp8dsp_altivec.c
@@ -23,7 +23,7 @@
#include "config.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/ppc/cpu.h"
#include "libavutil/ppc/util_altivec.h"
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index 7af7fbe..e59a3a5 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -74,12 +74,6 @@
{ FF_PROFILE_UNKNOWN },
};
-const AVProfile ff_vvc_profiles[] = {
- { FF_PROFILE_VVC_MAIN_10, "Main 10" },
- { FF_PROFILE_VVC_MAIN_10_444, "Main 10 4:4:4" },
- { FF_PROFILE_UNKNOWN },
-};
-
const AVProfile ff_hevc_profiles[] = {
{ FF_PROFILE_HEVC_MAIN, "Main" },
{ FF_PROFILE_HEVC_MAIN_10, "Main 10" },
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 41a19aa..6baaba5 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -61,7 +61,6 @@
extern const AVProfile ff_dnxhd_profiles[];
extern const AVProfile ff_h264_profiles[];
extern const AVProfile ff_hevc_profiles[];
-extern const AVProfile ff_vvc_profiles[];
extern const AVProfile ff_jpeg2000_profiles[];
extern const AVProfile ff_mpeg2_video_profiles[];
extern const AVProfile ff_mpeg4_video_profiles[];
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 136f341..5fd2796 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -29,8 +29,6 @@
#define LONG_BITSTREAM_READER
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "idctdsp.h"
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index c34e55f..8bc13fd 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -27,7 +27,6 @@
* Known FOURCCs: 'ap4h' (444), 'apch' (HQ), 'apcn' (422), 'apcs' (LT), 'acpo' (Proxy)
*/
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dct.h"
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 0e70163..8e6f905 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -23,7 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index 4429a4d..c9d2e00 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -342,6 +342,7 @@
dst->opaque = src->opaque;
dst->debug = src->debug;
+ dst->debug_mv = src->debug_mv;
dst->slice_flags = src->slice_flags;
dst->flags2 = src->flags2;
@@ -773,6 +774,10 @@
if (!thread_count) {
int nb_cpus = av_cpu_count();
+#if FF_API_DEBUG_MV
+ if ((avctx->debug & (FF_DEBUG_VIS_QP | FF_DEBUG_VIS_MB_TYPE)) || avctx->debug_mv)
+ nb_cpus = 1;
+#endif
// use number of cores + 1 as thread count if there is more than one
if (nb_cpus > 1)
thread_count = avctx->thread_count = FFMIN(nb_cpus + 1, MAX_AUTO_THREADS);
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 07dea55..1eb6ce3 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -36,7 +36,6 @@
#include <stdio.h>
#include "libavutil/channel_layout.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#define BITSTREAM_READER_LE
diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c
index a8c930f..94681a0 100644
--- a/libavcodec/qdmc.c
+++ b/libavcodec/qdmc.c
@@ -736,5 +736,4 @@
.decode = qdmc_decode_frame,
.flush = qdmc_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
};
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index f4edc4b..8bc710a 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -274,7 +274,7 @@
AVFrame * const ref = a->ref;
uint8_t* outdata;
int delta, intra, ret;
- buffer_size_t pal_size;
+ int pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
if (avpkt->size < 0x86) {
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 5f2e641..c666aae 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -21,20 +21,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <mfx/mfxvideo.h>
#include "libavutil/common.h"
-#include "libavutil/fifo.h"
-#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_qsv.h"
#include "libavutil/mem.h"
#include "libavutil/log.h"
-#include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/time.h"
#include "libavutil/imgutils.h"
@@ -42,49 +39,11 @@
#include "avcodec.h"
#include "internal.h"
#include "decode.h"
-#include "hwconfig.h"
#include "qsv.h"
#include "qsv_internal.h"
+#include "qsvdec.h"
-typedef struct QSVContext {
- // the session used for decoding
- mfxSession session;
-
- // the session we allocated internally, in case the caller did not provide
- // one
- QSVSession internal_qs;
-
- QSVFramesContext frames_ctx;
-
- /**
- * a linked list of frames currently being used by QSV
- */
- QSVFrame *work_frames;
-
- AVFifoBuffer *async_fifo;
- int zero_consume_run;
- int buffered_count;
- int reinit_flag;
-
- enum AVPixelFormat orig_pix_fmt;
- uint32_t fourcc;
- mfxFrameInfo frame_info;
- AVBufferPool *pool;
-
- int initialized;
-
- // options set by the caller
- int async_depth;
- int iopattern;
- int gpu_copy;
-
- char *load_plugins;
-
- mfxExtBuffer **ext_buffers;
- int nb_ext_buffers;
-} QSVContext;
-
-static const AVCodecHWConfigInternal *const qsv_hw_configs[] = {
+const AVCodecHWConfigInternal *const ff_qsv_hw_configs[] = {
&(const AVCodecHWConfigInternal) {
.public = {
.pix_fmt = AV_PIX_FMT_QSV,
@@ -97,8 +56,7 @@
NULL
};
-static int qsv_get_continuous_buffer(AVCodecContext *avctx, AVFrame *frame,
- AVBufferPool *pool)
+static int ff_qsv_get_continuous_buffer(AVCodecContext *avctx, AVFrame *frame, AVBufferPool *pool)
{
int ret = 0;
@@ -270,7 +228,7 @@
return 0;
}
-static int qsv_decode_init_context(AVCodecContext *avctx, QSVContext *q, mfxVideoParam *param)
+static int qsv_decode_init(AVCodecContext *avctx, QSVContext *q, mfxVideoParam *param)
{
int ret;
@@ -296,9 +254,7 @@
return 0;
}
-static int qsv_decode_header(AVCodecContext *avctx, QSVContext *q,
- const AVPacket *avpkt, enum AVPixelFormat pix_fmt,
- mfxVideoParam *param)
+static int qsv_decode_header(AVCodecContext *avctx, QSVContext *q, AVPacket *avpkt, enum AVPixelFormat pix_fmt, mfxVideoParam *param)
{
int ret;
@@ -342,7 +298,7 @@
int ret;
if (q->pool)
- ret = qsv_get_continuous_buffer(avctx, frame->frame, q->pool);
+ ret = ff_qsv_get_continuous_buffer(avctx, frame->frame, q->pool);
else
ret = ff_get_buffer(avctx, frame->frame, AV_GET_BUFFER_FLAG_REF);
@@ -443,7 +399,7 @@
static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
AVFrame *frame, int *got_frame,
- const AVPacket *avpkt)
+ AVPacket *avpkt)
{
QSVFrame *out_frame;
mfxFrameSurface1 *insurf;
@@ -574,7 +530,7 @@
return bs.DataOffset;
}
-static void qsv_decode_close_qsvcontext(QSVContext *q)
+int ff_qsv_decode_close(QSVContext *q)
{
QSVFrame *cur = q->work_frames;
@@ -606,10 +562,12 @@
av_buffer_unref(&q->frames_ctx.hw_frames_ctx);
av_buffer_unref(&q->frames_ctx.mids_buf);
av_buffer_pool_uninit(&q->pool);
+
+ return 0;
}
-static int qsv_process_data(AVCodecContext *avctx, QSVContext *q,
- AVFrame *frame, int *got_frame, const AVPacket *pkt)
+int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
+ AVFrame *frame, int *got_frame, AVPacket *pkt)
{
int ret;
mfxVideoParam param = { 0 };
@@ -657,7 +615,7 @@
}
if (!q->initialized) {
- ret = qsv_decode_init_context(avctx, q, ¶m);
+ ret = qsv_decode_init(avctx, q, ¶m);
if (ret < 0)
goto reinit_fail;
q->initialized = 1;
@@ -670,248 +628,8 @@
return ret;
}
-enum LoadPlugin {
- LOAD_PLUGIN_NONE,
- LOAD_PLUGIN_HEVC_SW,
- LOAD_PLUGIN_HEVC_HW,
-};
-
-typedef struct QSVDecContext {
- AVClass *class;
- QSVContext qsv;
-
- int load_plugin;
-
- AVFifoBuffer *packet_fifo;
-
- AVPacket buffer_pkt;
-} QSVDecContext;
-
-static void qsv_clear_buffers(QSVDecContext *s)
+void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q)
{
- AVPacket pkt;
- while (av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
- av_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
- av_packet_unref(&pkt);
- }
-
- av_packet_unref(&s->buffer_pkt);
+ q->orig_pix_fmt = AV_PIX_FMT_NONE;
+ q->initialized = 0;
}
-
-static av_cold int qsv_decode_close(AVCodecContext *avctx)
-{
- QSVDecContext *s = avctx->priv_data;
-
- av_freep(&s->qsv.load_plugins);
-
- qsv_decode_close_qsvcontext(&s->qsv);
-
- qsv_clear_buffers(s);
-
- av_fifo_free(s->packet_fifo);
-
- return 0;
-}
-
-static av_cold int qsv_decode_init(AVCodecContext *avctx)
-{
- QSVDecContext *s = avctx->priv_data;
- int ret;
- const char *uid = NULL;
-
- if (avctx->codec_id == AV_CODEC_ID_VP8) {
- uid = "f622394d8d87452f878c51f2fc9b4131";
- } else if (avctx->codec_id == AV_CODEC_ID_VP9) {
- uid = "a922394d8d87452f878c51f2fc9b4131";
- }
- else if (avctx->codec_id == AV_CODEC_ID_HEVC && s->load_plugin != LOAD_PLUGIN_NONE) {
- static const char * const uid_hevcdec_sw = "15dd936825ad475ea34e35f3f54217a6";
- static const char * const uid_hevcdec_hw = "33a61c0b4c27454ca8d85dde757c6f8e";
-
- if (s->qsv.load_plugins[0]) {
- av_log(avctx, AV_LOG_WARNING,
- "load_plugins is not empty, but load_plugin is not set to 'none'."
- "The load_plugin value will be ignored.\n");
- } else {
- if (s->load_plugin == LOAD_PLUGIN_HEVC_SW)
- uid = uid_hevcdec_sw;
- else
- uid = uid_hevcdec_hw;
- }
- }
- if (uid) {
- av_freep(&s->qsv.load_plugins);
- s->qsv.load_plugins = av_strdup(uid);
- if (!s->qsv.load_plugins)
- return AVERROR(ENOMEM);
- }
-
- s->qsv.orig_pix_fmt = AV_PIX_FMT_NV12;
- s->packet_fifo = av_fifo_alloc(sizeof(AVPacket));
- if (!s->packet_fifo) {
- ret = AVERROR(ENOMEM);
- goto fail;
- }
-
- return 0;
-fail:
- qsv_decode_close(avctx);
- return ret;
-}
-
-static int qsv_decode_frame(AVCodecContext *avctx, void *data,
- int *got_frame, AVPacket *avpkt)
-{
- QSVDecContext *s = avctx->priv_data;
- AVFrame *frame = data;
- int ret;
-
- /* buffer the input packet */
- if (avpkt->size) {
- AVPacket input_ref;
-
- if (av_fifo_space(s->packet_fifo) < sizeof(input_ref)) {
- ret = av_fifo_realloc2(s->packet_fifo,
- av_fifo_size(s->packet_fifo) + sizeof(input_ref));
- if (ret < 0)
- return ret;
- }
-
- ret = av_packet_ref(&input_ref, avpkt);
- if (ret < 0)
- return ret;
- av_fifo_generic_write(s->packet_fifo, &input_ref, sizeof(input_ref), NULL);
- }
-
- /* process buffered data */
- while (!*got_frame) {
- /* prepare the input data */
- if (s->buffer_pkt.size <= 0) {
- /* no more data */
- if (av_fifo_size(s->packet_fifo) < sizeof(AVPacket))
- return avpkt->size ? avpkt->size : qsv_process_data(avctx, &s->qsv, frame, got_frame, avpkt);
- /* in progress of reinit, no read from fifo and keep the buffer_pkt */
- if (!s->qsv.reinit_flag) {
- av_packet_unref(&s->buffer_pkt);
- av_fifo_generic_read(s->packet_fifo, &s->buffer_pkt, sizeof(s->buffer_pkt), NULL);
- }
- }
-
- ret = qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
- if (ret < 0){
- /* Drop buffer_pkt when failed to decode the packet. Otherwise,
- the decoder will keep decoding the failure packet. */
- av_packet_unref(&s->buffer_pkt);
- return ret;
- }
- if (s->qsv.reinit_flag)
- continue;
-
- s->buffer_pkt.size -= ret;
- s->buffer_pkt.data += ret;
- }
-
- return avpkt->size;
-}
-
-static void qsv_decode_flush(AVCodecContext *avctx)
-{
- QSVDecContext *s = avctx->priv_data;
-
- qsv_clear_buffers(s);
-
- s->qsv.orig_pix_fmt = AV_PIX_FMT_NONE;
- s->qsv.initialized = 0;
-}
-
-#define OFFSET(x) offsetof(QSVDecContext, x)
-#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
-
-#define DEFINE_QSV_DECODER_WITH_OPTION(x, X, bsf_name, opt) \
-static const AVClass x##_qsv_class = { \
- .class_name = #x "_qsv", \
- .item_name = av_default_item_name, \
- .option = opt, \
- .version = LIBAVUTIL_VERSION_INT, \
-}; \
-AVCodec ff_##x##_qsv_decoder = { \
- .name = #x "_qsv", \
- .long_name = NULL_IF_CONFIG_SMALL(#X " video (Intel Quick Sync Video acceleration)"), \
- .priv_data_size = sizeof(QSVDecContext), \
- .type = AVMEDIA_TYPE_VIDEO, \
- .id = AV_CODEC_ID_##X, \
- .init = qsv_decode_init, \
- .decode = qsv_decode_frame, \
- .flush = qsv_decode_flush, \
- .close = qsv_decode_close, \
- .bsfs = bsf_name, \
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID, \
- .priv_class = &x##_qsv_class, \
- .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12, \
- AV_PIX_FMT_P010, \
- AV_PIX_FMT_QSV, \
- AV_PIX_FMT_NONE }, \
- .hw_configs = qsv_hw_configs, \
- .wrapper_name = "qsv", \
-}; \
-
-#define DEFINE_QSV_DECODER(x, X, bsf_name) DEFINE_QSV_DECODER_WITH_OPTION(x, X, bsf_name, options)
-
-#if CONFIG_HEVC_QSV_DECODER
-static const AVOption hevc_options[] = {
- { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
-
- { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_HEVC_HW }, LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VD, "load_plugin" },
- { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE }, 0, 0, VD, "load_plugin" },
- { "hevc_sw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_SW }, 0, 0, VD, "load_plugin" },
- { "hevc_hw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_HW }, 0, 0, VD, "load_plugin" },
-
- { "load_plugins", "A :-separate list of hexadecimal plugin UIDs to load in an internal session",
- OFFSET(qsv.load_plugins), AV_OPT_TYPE_STRING, { .str = "" }, 0, 0, VD },
-
- { "gpu_copy", "A GPU-accelerated copy between video and system memory", OFFSET(qsv.gpu_copy), AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF, VD, "gpu_copy"},
- { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_DEFAULT }, 0, 0, VD, "gpu_copy"},
- { "on", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_ON }, 0, 0, VD, "gpu_copy"},
- { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_OFF }, 0, 0, VD, "gpu_copy"},
- { NULL },
-};
-DEFINE_QSV_DECODER_WITH_OPTION(hevc, HEVC, "hevc_mp4toannexb", hevc_options)
-#endif
-
-static const AVOption options[] = {
- { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
-
- { "gpu_copy", "A GPU-accelerated copy between video and system memory", OFFSET(qsv.gpu_copy), AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF, VD, "gpu_copy"},
- { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_DEFAULT }, 0, 0, VD, "gpu_copy"},
- { "on", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_ON }, 0, 0, VD, "gpu_copy"},
- { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_OFF }, 0, 0, VD, "gpu_copy"},
- { NULL },
-};
-
-#if CONFIG_H264_QSV_DECODER
-DEFINE_QSV_DECODER(h264, H264, "h264_mp4toannexb")
-#endif
-
-#if CONFIG_MPEG2_QSV_DECODER
-DEFINE_QSV_DECODER(mpeg2, MPEG2VIDEO, NULL)
-#endif
-
-#if CONFIG_VC1_QSV_DECODER
-DEFINE_QSV_DECODER(vc1, VC1, NULL)
-#endif
-
-#if CONFIG_MJPEG_QSV_DECODER
-DEFINE_QSV_DECODER(mjpeg, MJPEG, NULL)
-#endif
-
-#if CONFIG_VP8_QSV_DECODER
-DEFINE_QSV_DECODER(vp8, VP8, NULL)
-#endif
-
-#if CONFIG_VP9_QSV_DECODER
-DEFINE_QSV_DECODER(vp9, VP9, NULL)
-#endif
-
-#if CONFIG_AV1_QSV_DECODER
-DEFINE_QSV_DECODER(av1, AV1, NULL)
-#endif
diff --git a/libavcodec/qsvdec.h b/libavcodec/qsvdec.h
new file mode 100644
index 0000000..f3b7344
--- /dev/null
+++ b/libavcodec/qsvdec.h
@@ -0,0 +1,86 @@
+/*
+ * Intel MediaSDK QSV utility functions
+ *
+ * copyright (c) 2013 Luca Barbato
+ *
+ * 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 AVCODEC_QSVDEC_H
+#define AVCODEC_QSVDEC_H
+
+#include <stdint.h>
+#include <sys/types.h>
+
+#include <mfx/mfxvideo.h>
+
+#include "libavutil/fifo.h"
+#include "libavutil/frame.h"
+#include "libavutil/pixfmt.h"
+
+#include "avcodec.h"
+#include "hwconfig.h"
+#include "qsv_internal.h"
+
+typedef struct QSVContext {
+ // the session used for decoding
+ mfxSession session;
+
+ // the session we allocated internally, in case the caller did not provide
+ // one
+ QSVSession internal_qs;
+
+ QSVFramesContext frames_ctx;
+
+ /**
+ * a linked list of frames currently being used by QSV
+ */
+ QSVFrame *work_frames;
+
+ AVFifoBuffer *async_fifo;
+ int zero_consume_run;
+ int buffered_count;
+ int reinit_flag;
+
+ enum AVPixelFormat orig_pix_fmt;
+ uint32_t fourcc;
+ mfxFrameInfo frame_info;
+ AVBufferPool *pool;
+
+ int initialized;
+
+ // options set by the caller
+ int async_depth;
+ int iopattern;
+ int gpu_copy;
+
+ char *load_plugins;
+
+ mfxExtBuffer **ext_buffers;
+ int nb_ext_buffers;
+} QSVContext;
+
+extern const AVCodecHWConfigInternal *const ff_qsv_hw_configs[];
+
+int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
+ AVFrame *frame, int *got_frame, AVPacket *pkt);
+
+void ff_qsv_decode_flush(AVCodecContext *avctx, QSVContext *q);
+
+int ff_qsv_decode_close(QSVContext *q);
+
+#endif /* AVCODEC_QSVDEC_H */
diff --git a/libavcodec/qsvdec_h2645.c b/libavcodec/qsvdec_h2645.c
new file mode 100644
index 0000000..02c4188
--- /dev/null
+++ b/libavcodec/qsvdec_h2645.c
@@ -0,0 +1,271 @@
+/*
+ * Intel MediaSDK QSV based H.264 / HEVC decoder
+ *
+ * copyright (c) 2013 Luca Barbato
+ * copyright (c) 2015 Anton Khirnov
+ *
+ * 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
+ */
+
+
+#include <stdint.h>
+#include <string.h>
+
+#include <mfx/mfxvideo.h>
+
+#include "libavutil/common.h"
+#include "libavutil/fifo.h"
+#include "libavutil/opt.h"
+
+#include "avcodec.h"
+#include "internal.h"
+#include "qsv_internal.h"
+#include "qsvdec.h"
+#include "qsv.h"
+
+enum LoadPlugin {
+ LOAD_PLUGIN_NONE,
+ LOAD_PLUGIN_HEVC_SW,
+ LOAD_PLUGIN_HEVC_HW,
+};
+
+typedef struct QSVH2645Context {
+ AVClass *class;
+ QSVContext qsv;
+
+ int load_plugin;
+
+ AVFifoBuffer *packet_fifo;
+
+ AVPacket buffer_pkt;
+} QSVH2645Context;
+
+static void qsv_clear_buffers(QSVH2645Context *s)
+{
+ AVPacket pkt;
+ while (av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
+ av_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
+ av_packet_unref(&pkt);
+ }
+
+ av_packet_unref(&s->buffer_pkt);
+}
+
+static av_cold int qsv_decode_close(AVCodecContext *avctx)
+{
+ QSVH2645Context *s = avctx->priv_data;
+
+ ff_qsv_decode_close(&s->qsv);
+
+ qsv_clear_buffers(s);
+
+ av_fifo_free(s->packet_fifo);
+
+ return 0;
+}
+
+static av_cold int qsv_decode_init(AVCodecContext *avctx)
+{
+ QSVH2645Context *s = avctx->priv_data;
+ int ret;
+
+ if (avctx->codec_id == AV_CODEC_ID_HEVC && s->load_plugin != LOAD_PLUGIN_NONE) {
+ static const char * const uid_hevcdec_sw = "15dd936825ad475ea34e35f3f54217a6";
+ static const char * const uid_hevcdec_hw = "33a61c0b4c27454ca8d85dde757c6f8e";
+
+ if (s->qsv.load_plugins[0]) {
+ av_log(avctx, AV_LOG_WARNING,
+ "load_plugins is not empty, but load_plugin is not set to 'none'."
+ "The load_plugin value will be ignored.\n");
+ } else {
+ av_freep(&s->qsv.load_plugins);
+
+ if (s->load_plugin == LOAD_PLUGIN_HEVC_SW)
+ s->qsv.load_plugins = av_strdup(uid_hevcdec_sw);
+ else
+ s->qsv.load_plugins = av_strdup(uid_hevcdec_hw);
+ if (!s->qsv.load_plugins)
+ return AVERROR(ENOMEM);
+ }
+ }
+
+ s->qsv.orig_pix_fmt = AV_PIX_FMT_NV12;
+ s->packet_fifo = av_fifo_alloc(sizeof(AVPacket));
+ if (!s->packet_fifo) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ return 0;
+fail:
+ qsv_decode_close(avctx);
+ return ret;
+}
+
+static int qsv_decode_frame(AVCodecContext *avctx, void *data,
+ int *got_frame, AVPacket *avpkt)
+{
+ QSVH2645Context *s = avctx->priv_data;
+ AVFrame *frame = data;
+ int ret;
+
+ /* buffer the input packet */
+ if (avpkt->size) {
+ AVPacket input_ref;
+
+ if (av_fifo_space(s->packet_fifo) < sizeof(input_ref)) {
+ ret = av_fifo_realloc2(s->packet_fifo,
+ av_fifo_size(s->packet_fifo) + sizeof(input_ref));
+ if (ret < 0)
+ return ret;
+ }
+
+ ret = av_packet_ref(&input_ref, avpkt);
+ if (ret < 0)
+ return ret;
+ av_fifo_generic_write(s->packet_fifo, &input_ref, sizeof(input_ref), NULL);
+ }
+
+ /* process buffered data */
+ while (!*got_frame) {
+ /* prepare the input data */
+ if (s->buffer_pkt.size <= 0) {
+ /* no more data */
+ if (av_fifo_size(s->packet_fifo) < sizeof(AVPacket))
+ return avpkt->size ? avpkt->size : ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, avpkt);
+ /* in progress of reinit, no read from fifo and keep the buffer_pkt */
+ if (!s->qsv.reinit_flag) {
+ av_packet_unref(&s->buffer_pkt);
+ av_fifo_generic_read(s->packet_fifo, &s->buffer_pkt, sizeof(s->buffer_pkt), NULL);
+ }
+ }
+
+ ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->buffer_pkt);
+ if (ret < 0){
+ /* Drop buffer_pkt when failed to decode the packet. Otherwise,
+ the decoder will keep decoding the failure packet. */
+ av_packet_unref(&s->buffer_pkt);
+ return ret;
+ }
+ if (s->qsv.reinit_flag)
+ continue;
+
+ s->buffer_pkt.size -= ret;
+ s->buffer_pkt.data += ret;
+ }
+
+ return avpkt->size;
+}
+
+static void qsv_decode_flush(AVCodecContext *avctx)
+{
+ QSVH2645Context *s = avctx->priv_data;
+
+ qsv_clear_buffers(s);
+ ff_qsv_decode_flush(avctx, &s->qsv);
+}
+
+#define OFFSET(x) offsetof(QSVH2645Context, x)
+#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
+
+#if CONFIG_HEVC_QSV_DECODER
+static const AVOption hevc_options[] = {
+ { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
+
+ { "load_plugin", "A user plugin to load in an internal session", OFFSET(load_plugin), AV_OPT_TYPE_INT, { .i64 = LOAD_PLUGIN_HEVC_HW }, LOAD_PLUGIN_NONE, LOAD_PLUGIN_HEVC_HW, VD, "load_plugin" },
+ { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_NONE }, 0, 0, VD, "load_plugin" },
+ { "hevc_sw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_SW }, 0, 0, VD, "load_plugin" },
+ { "hevc_hw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = LOAD_PLUGIN_HEVC_HW }, 0, 0, VD, "load_plugin" },
+
+ { "load_plugins", "A :-separate list of hexadecimal plugin UIDs to load in an internal session",
+ OFFSET(qsv.load_plugins), AV_OPT_TYPE_STRING, { .str = "" }, 0, 0, VD },
+
+ { "gpu_copy", "A GPU-accelerated copy between video and system memory", OFFSET(qsv.gpu_copy), AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF, VD, "gpu_copy"},
+ { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_DEFAULT }, 0, 0, VD, "gpu_copy"},
+ { "on", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_ON }, 0, 0, VD, "gpu_copy"},
+ { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_OFF }, 0, 0, VD, "gpu_copy"},
+ { NULL },
+};
+
+static const AVClass hevc_class = {
+ .class_name = "hevc_qsv",
+ .item_name = av_default_item_name,
+ .option = hevc_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_hevc_qsv_decoder = {
+ .name = "hevc_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("HEVC (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVH2645Context),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_HEVC,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &hevc_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_P010,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .bsfs = "hevc_mp4toannexb",
+ .wrapper_name = "qsv",
+};
+#endif
+
+#if CONFIG_H264_QSV_DECODER
+static const AVOption options[] = {
+ { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
+
+ { "gpu_copy", "A GPU-accelerated copy between video and system memory", OFFSET(qsv.gpu_copy), AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF, VD, "gpu_copy"},
+ { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_DEFAULT }, 0, 0, VD, "gpu_copy"},
+ { "on", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_ON }, 0, 0, VD, "gpu_copy"},
+ { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_OFF }, 0, 0, VD, "gpu_copy"},
+ { NULL },
+};
+
+static const AVClass class = {
+ .class_name = "h264_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_h264_qsv_decoder = {
+ .name = "h264_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVH2645Context),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_H264,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_P010,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .bsfs = "h264_mp4toannexb",
+ .wrapper_name = "qsv",
+};
+#endif
diff --git a/libavcodec/qsvdec_other.c b/libavcodec/qsvdec_other.c
new file mode 100644
index 0000000..2775e07
--- /dev/null
+++ b/libavcodec/qsvdec_other.c
@@ -0,0 +1,358 @@
+/*
+ * Intel MediaSDK QSV based MPEG-2, VC-1, VP8, MJPEG, VP9 and AV1 decoders
+ *
+ * copyright (c) 2015 Anton Khirnov
+ *
+ * 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
+ */
+
+
+#include <stdint.h>
+#include <string.h>
+
+#include <mfx/mfxvideo.h>
+
+#include "libavutil/common.h"
+#include "libavutil/fifo.h"
+#include "libavutil/opt.h"
+
+#include "avcodec.h"
+#include "internal.h"
+#include "qsv_internal.h"
+#include "qsvdec.h"
+#include "qsv.h"
+
+typedef struct QSVOtherContext {
+ AVClass *class;
+ QSVContext qsv;
+
+ AVFifoBuffer *packet_fifo;
+
+ AVPacket input_ref;
+} QSVOtherContext;
+
+static void qsv_clear_buffers(QSVOtherContext *s)
+{
+ AVPacket pkt;
+ while (av_fifo_size(s->packet_fifo) >= sizeof(pkt)) {
+ av_fifo_generic_read(s->packet_fifo, &pkt, sizeof(pkt), NULL);
+ av_packet_unref(&pkt);
+ }
+
+ av_packet_unref(&s->input_ref);
+}
+
+static av_cold int qsv_decode_close(AVCodecContext *avctx)
+{
+ QSVOtherContext *s = avctx->priv_data;
+
+#if CONFIG_VP8_QSV_DECODER || CONFIG_VP9_QSV_DECODER
+ if (avctx->codec_id == AV_CODEC_ID_VP8 || avctx->codec_id == AV_CODEC_ID_VP9)
+ av_freep(&s->qsv.load_plugins);
+#endif
+
+ ff_qsv_decode_close(&s->qsv);
+
+ qsv_clear_buffers(s);
+
+ av_fifo_free(s->packet_fifo);
+
+ return 0;
+}
+
+static av_cold int qsv_decode_init(AVCodecContext *avctx)
+{
+ QSVOtherContext *s = avctx->priv_data;
+ int ret;
+
+#if CONFIG_VP8_QSV_DECODER
+ if (avctx->codec_id == AV_CODEC_ID_VP8) {
+ static const char *uid_vp8dec_hw = "f622394d8d87452f878c51f2fc9b4131";
+
+ av_freep(&s->qsv.load_plugins);
+ s->qsv.load_plugins = av_strdup(uid_vp8dec_hw);
+ if (!s->qsv.load_plugins)
+ return AVERROR(ENOMEM);
+ }
+#endif
+
+#if CONFIG_VP9_QSV_DECODER
+ if (avctx->codec_id == AV_CODEC_ID_VP9) {
+ static const char *uid_vp9dec_hw = "a922394d8d87452f878c51f2fc9b4131";
+
+ av_freep(&s->qsv.load_plugins);
+ s->qsv.load_plugins = av_strdup(uid_vp9dec_hw);
+ if (!s->qsv.load_plugins)
+ return AVERROR(ENOMEM);
+ }
+#endif
+
+ s->qsv.orig_pix_fmt = AV_PIX_FMT_NV12;
+ s->packet_fifo = av_fifo_alloc(sizeof(AVPacket));
+ if (!s->packet_fifo) {
+ ret = AVERROR(ENOMEM);
+ goto fail;
+ }
+
+ return 0;
+fail:
+ qsv_decode_close(avctx);
+ return ret;
+}
+
+static int qsv_decode_frame(AVCodecContext *avctx, void *data,
+ int *got_frame, AVPacket *avpkt)
+{
+ QSVOtherContext *s = avctx->priv_data;
+ AVFrame *frame = data;
+ int ret;
+
+ /* buffer the input packet */
+ if (avpkt->size) {
+ AVPacket input_ref;
+
+ if (av_fifo_space(s->packet_fifo) < sizeof(input_ref)) {
+ ret = av_fifo_realloc2(s->packet_fifo,
+ av_fifo_size(s->packet_fifo) + sizeof(input_ref));
+ if (ret < 0)
+ return ret;
+ }
+
+ ret = av_packet_ref(&input_ref, avpkt);
+ if (ret < 0)
+ return ret;
+ av_fifo_generic_write(s->packet_fifo, &input_ref, sizeof(input_ref), NULL);
+ }
+
+ /* process buffered data */
+ while (!*got_frame) {
+ if (s->input_ref.size <= 0) {
+ /* no more data */
+ if (av_fifo_size(s->packet_fifo) < sizeof(AVPacket))
+ return avpkt->size ? avpkt->size : ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, avpkt);
+ /* in progress of reinit, no read from fifo and keep the buffer_pkt */
+ if (!s->qsv.reinit_flag) {
+ av_packet_unref(&s->input_ref);
+ av_fifo_generic_read(s->packet_fifo, &s->input_ref, sizeof(s->input_ref), NULL);
+ }
+ }
+
+ ret = ff_qsv_process_data(avctx, &s->qsv, frame, got_frame, &s->input_ref);
+ if (ret < 0) {
+ /* Drop input packet when failed to decode the packet. Otherwise,
+ the decoder will keep decoding the failure packet. */
+ av_packet_unref(&s->input_ref);
+
+ return ret;
+ }
+ if (s->qsv.reinit_flag)
+ continue;
+
+ s->input_ref.size -= ret;
+ s->input_ref.data += ret;
+ }
+
+ return avpkt->size;
+}
+
+static void qsv_decode_flush(AVCodecContext *avctx)
+{
+ QSVOtherContext *s = avctx->priv_data;
+
+ qsv_clear_buffers(s);
+ ff_qsv_decode_flush(avctx, &s->qsv);
+}
+
+#define OFFSET(x) offsetof(QSVOtherContext, x)
+#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
+static const AVOption options[] = {
+ { "async_depth", "Internal parallelization depth, the higher the value the higher the latency.", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VD },
+
+ { "gpu_copy", "A GPU-accelerated copy between video and system memory", OFFSET(qsv.gpu_copy), AV_OPT_TYPE_INT, { .i64 = MFX_GPUCOPY_DEFAULT }, MFX_GPUCOPY_DEFAULT, MFX_GPUCOPY_OFF, VD, "gpu_copy"},
+ { "default", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_DEFAULT }, 0, 0, VD, "gpu_copy"},
+ { "on", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_ON }, 0, 0, VD, "gpu_copy"},
+ { "off", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_GPUCOPY_OFF }, 0, 0, VD, "gpu_copy"},
+ { NULL },
+};
+
+#if CONFIG_MPEG2_QSV_DECODER
+static const AVClass mpeg2_qsv_class = {
+ .class_name = "mpeg2_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_mpeg2_qsv_decoder = {
+ .name = "mpeg2_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &mpeg2_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .wrapper_name = "qsv",
+};
+#endif
+
+#if CONFIG_VC1_QSV_DECODER
+static const AVClass vc1_qsv_class = {
+ .class_name = "vc1_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_vc1_qsv_decoder = {
+ .name = "vc1_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("VC-1 video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VC1,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &vc1_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .wrapper_name = "qsv",
+};
+#endif
+
+#if CONFIG_VP8_QSV_DECODER
+static const AVClass vp8_qsv_class = {
+ .class_name = "vp8_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_vp8_qsv_decoder = {
+ .name = "vp8_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("VP8 video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VP8,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &vp8_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .wrapper_name = "qsv",
+};
+#endif
+
+#if CONFIG_MJPEG_QSV_DECODER
+static const AVClass mjpeg_qsv_class = {
+ .class_name = "mjpeg_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_mjpeg_qsv_decoder = {
+ .name = "mjpeg_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("MJPEG video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_MJPEG,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &mjpeg_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+};
+#endif
+
+#if CONFIG_VP9_QSV_DECODER
+static const AVClass vp9_qsv_class = {
+ .class_name = "vp9_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_vp9_qsv_decoder = {
+ .name = "vp9_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("VP9 video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VP9,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &vp9_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_P010,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .wrapper_name = "qsv",
+};
+#endif
+
+#if CONFIG_AV1_QSV_DECODER
+static const AVClass av1_qsv_class = {
+ .class_name = "av1_qsv",
+ .item_name = av_default_item_name,
+ .option = options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+AVCodec ff_av1_qsv_decoder = {
+ .name = "av1_qsv",
+ .long_name = NULL_IF_CONFIG_SMALL("AV1 video (Intel Quick Sync Video acceleration)"),
+ .priv_data_size = sizeof(QSVOtherContext),
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_AV1,
+ .init = qsv_decode_init,
+ .decode = qsv_decode_frame,
+ .flush = qsv_decode_flush,
+ .close = qsv_decode_close,
+ .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_HYBRID,
+ .priv_class = &av1_qsv_class,
+ .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_NV12,
+ AV_PIX_FMT_P010,
+ AV_PIX_FMT_QSV,
+ AV_PIX_FMT_NONE },
+ .hw_configs = ff_qsv_hw_configs,
+ .wrapper_name = "qsv",
+};
+#endif
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 566a5c8..2bd2a56 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1132,7 +1132,6 @@
if (!iopattern)
iopattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;
q->param.IOPattern = iopattern;
- ff_qsv_print_iopattern(avctx, iopattern, "Encoder");
ret = qsvenc_init_session(avctx, q);
if (ret < 0)
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index e04fd31..6bdde75 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -540,7 +540,7 @@
}
if(has_palette) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
diff --git a/libavcodec/ra144.h b/libavcodec/ra144.h
index 82ef852..19a4ce0 100644
--- a/libavcodec/ra144.h
+++ b/libavcodec/ra144.h
@@ -23,9 +23,6 @@
#define AVCODEC_RA144_H
#include <stdint.h>
-
-#include "libavutil/mem_internal.h"
-
#include "lpc.h"
#include "audio_frame_queue.h"
#include "audiodsp.h"
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index 0eb2a66..6495026 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -22,7 +22,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#define BITSTREAM_READER_LE
#include "avcodec.h"
diff --git a/libavcodec/ra288.h b/libavcodec/ra288.h
index 96b074b..fa0b528 100644
--- a/libavcodec/ra288.h
+++ b/libavcodec/ra288.h
@@ -24,7 +24,6 @@
#include <stdint.h>
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
static const float amptable[8]={
0.515625, 0.90234375, 1.57910156, 2.76342773,
diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c
index fa7d552..a6a3f08 100644
--- a/libavcodec/rangecoder.c
+++ b/libavcodec/rangecoder.c
@@ -121,3 +121,22 @@
return c->bytestream - c->bytestream_start;
}
+
+int ff_rac_check_termination(RangeCoder *c, int version)
+{
+ if (version == 1) {
+ RangeCoder tmp = *c;
+ get_rac(c, (uint8_t[]) { 129 });
+
+ if (c->bytestream == tmp.bytestream && c->bytestream > c->bytestream_start)
+ tmp.low -= *--tmp.bytestream;
+ tmp.bytestream_end = tmp.bytestream;
+
+ if (get_rac(&tmp, (uint8_t[]) { 129 }))
+ return AVERROR_INVALIDDATA;
+ } else {
+ if (c->bytestream_end != c->bytestream)
+ return AVERROR_INVALIDDATA;
+ }
+ return 0;
+}
diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h
index 4495f6d..4d4ca4d 100644
--- a/libavcodec/rangecoder.h
+++ b/libavcodec/rangecoder.h
@@ -57,6 +57,15 @@
*/
int ff_rac_terminate(RangeCoder *c, int version);
+/**
+ * Check if at the current position there is a valid looking termination
+ * @param version version 0 requires the decoder to know the data size in bytes
+ * version 1 needs about 1 bit more space but does not need to
+ * carry the size from encoder to decoder
+ * @returns negative AVERROR code on error or non negative.
+ */
+int ff_rac_check_termination(RangeCoder *c, int version);
+
void ff_build_rac_states(RangeCoder *c, int factor, int max_p);
static inline void renorm_encoder(RangeCoder *c)
diff --git a/libavcodec/rasc.c b/libavcodec/rasc.c
index 207d50c..cdf20a6 100644
--- a/libavcodec/rasc.c
+++ b/libavcodec/rasc.c
@@ -70,9 +70,6 @@
RASCContext *s = avctx->priv_data;
uint8_t *dst = frame->data[0];
- if (!dst)
- return;
-
for (int y = 0; y < avctx->height; y++) {
memset(dst, 0, avctx->width * s->bpp);
dst += frame->linesize[0];
@@ -112,7 +109,7 @@
}
static int decode_fint(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
@@ -171,7 +168,7 @@
return 0;
}
-static int decode_zlib(AVCodecContext *avctx, const AVPacket *avpkt,
+static int decode_zlib(AVCodecContext *avctx, AVPacket *avpkt,
unsigned size, unsigned uncompressed_size)
{
RASCContext *s = avctx->priv_data;
@@ -205,7 +202,7 @@
}
static int decode_move(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
@@ -329,7 +326,7 @@
len--;
static int decode_dlta(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
@@ -471,7 +468,7 @@
}
static int decode_kfrm(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
@@ -534,7 +531,7 @@
}
static int decode_mous(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
@@ -574,7 +571,7 @@
}
static int decode_mpos(AVCodecContext *avctx,
- const AVPacket *avpkt, unsigned size)
+ AVPacket *avpkt, unsigned size)
{
RASCContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index c18c3dd..26663ca 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -367,7 +367,7 @@
}
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
- buffer_size_t pal_size;
+ int pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE,
&pal_size);
int ret;
diff --git a/libavcodec/rl.c b/libavcodec/rl.c
index 93153ff..6eac306 100644
--- a/libavcodec/rl.c
+++ b/libavcodec/rl.c
@@ -25,16 +25,27 @@
#include "rl.h"
-av_cold void ff_rl_init(RLTable *rl,
- uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
+void ff_rl_free(RLTable *rl)
+{
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ av_freep(&rl->max_run[i]);
+ av_freep(&rl->max_level[i]);
+ av_freep(&rl->index_run[i]);
+ }
+}
+
+av_cold int ff_rl_init(RLTable *rl,
+ uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
{
int8_t max_level[MAX_RUN + 1], max_run[MAX_LEVEL + 1];
uint8_t index_run[MAX_RUN + 1];
int last, run, level, start, end, i;
- /* If rl->max_level[0] is set, this RLTable has already been initialized */
- if (rl->max_level[0])
- return;
+ /* If table is static, we can quit if rl->max_level[0] is not NULL */
+ if (static_store && rl->max_level[0])
+ return 0;
/* compute max_level[], max_run[] and index_run[] */
for (last = 0; last < 2; last++) {
@@ -59,13 +70,36 @@
if (run > max_run[level])
max_run[level] = run;
}
- rl->max_level[last] = static_store[last];
+ if (static_store)
+ rl->max_level[last] = static_store[last];
+ else {
+ rl->max_level[last] = av_malloc(MAX_RUN + 1);
+ if (!rl->max_level[last])
+ goto fail;
+ }
memcpy(rl->max_level[last], max_level, MAX_RUN + 1);
- rl->max_run[last] = static_store[last] + MAX_RUN + 1;
+ if (static_store)
+ rl->max_run[last] = static_store[last] + MAX_RUN + 1;
+ else {
+ rl->max_run[last] = av_malloc(MAX_LEVEL + 1);
+ if (!rl->max_run[last])
+ goto fail;
+ }
memcpy(rl->max_run[last], max_run, MAX_LEVEL + 1);
- rl->index_run[last] = static_store[last] + MAX_RUN + MAX_LEVEL + 2;
+ if (static_store)
+ rl->index_run[last] = static_store[last] + MAX_RUN + MAX_LEVEL + 2;
+ else {
+ rl->index_run[last] = av_malloc(MAX_RUN + 1);
+ if (!rl->index_run[last])
+ goto fail;
+ }
memcpy(rl->index_run[last], index_run, MAX_RUN + 1);
}
+ return 0;
+
+fail:
+ ff_rl_free(rl);
+ return AVERROR(ENOMEM);
}
av_cold void ff_rl_init_vlc(RLTable *rl, unsigned static_size)
@@ -80,9 +114,6 @@
int qmul = q * 2;
int qadd = (q - 1) | 1;
- if (!rl->rl_vlc[q])
- return;
-
if (q == 0) {
qmul = 1;
qadd = 0;
diff --git a/libavcodec/rl.h b/libavcodec/rl.h
index 26e0b32..9a767bc 100644
--- a/libavcodec/rl.h
+++ b/libavcodec/rl.h
@@ -49,12 +49,17 @@
} RLTable;
/**
- * @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3]
- * to hold the level and run tables.
+ * @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3] which will hold
+ * the level and run tables, if this is NULL av_malloc() will be used
*/
-void ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
+int ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
void ff_rl_init_vlc(RLTable *rl, unsigned static_size);
+/**
+ * Free the contents of a dynamically allocated table.
+ */
+void ff_rl_free(RLTable *rl);
+
#define INIT_VLC_RL(rl, static_size)\
{\
int q;\
@@ -68,14 +73,6 @@
}\
}
-#define INIT_FIRST_VLC_RL(rl, static_size) \
-do { \
- static RL_VLC_ELEM rl_vlc_table[static_size]; \
- \
- rl.rl_vlc[0] = rl_vlc_table; \
- ff_rl_init_vlc(&rl, static_size); \
-} while (0)
-
static inline int get_rl_index(const RLTable *rl, int last, int run, int level)
{
int index;
diff --git a/libavcodec/roqvideo.h b/libavcodec/roqvideo.h
index 8318b6e..f47b2c8 100644
--- a/libavcodec/roqvideo.h
+++ b/libavcodec/roqvideo.h
@@ -22,7 +22,9 @@
#ifndef AVCODEC_ROQVIDEO_H
#define AVCODEC_ROQVIDEO_H
+#include "libavutil/lfg.h"
#include "avcodec.h"
+#include "bytestream.h"
typedef struct roq_cell {
unsigned char y[4];
@@ -37,15 +39,39 @@
int d[2];
} motion_vect;
+struct RoqTempData;
+
typedef struct RoqContext {
+
const AVClass *class;
AVCodecContext *avctx;
AVFrame *last_frame;
AVFrame *current_frame;
- int width, height;
+ int first_frame;
roq_cell cb2x2[256];
roq_qcell cb4x4[256];
+
+ int width, height;
+
+ /* Encoder only data */
+ AVLFG randctx;
+ uint64_t lambda;
+
+ motion_vect *this_motion4;
+ motion_vect *last_motion4;
+
+ motion_vect *this_motion8;
+ motion_vect *last_motion8;
+
+ unsigned int framesSinceKeyframe;
+
+ const AVFrame *frame_to_enc;
+ uint8_t *out_buf;
+ struct RoqTempData *tmpData;
+
+ int quake3_compat; // Quake 3 compatibility option
+
} RoqContext;
#define RoQ_INFO 0x1001
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 1ab0de0..dc6a630 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -57,7 +57,6 @@
#include <string.h>
#include "libavutil/attributes.h"
-#include "libavutil/lfg.h"
#include "libavutil/opt.h"
#include "roqvideo.h"
#include "bytestream.h"
@@ -78,85 +77,6 @@
/* The cast is useful when multiplying it by INT_MAX */
#define ROQ_LAMBDA_SCALE ((uint64_t) FF_LAMBDA_SCALE)
-typedef struct RoqCodebooks {
- int numCB4;
- int numCB2;
- int usedCB2[MAX_CBS_2x2];
- int usedCB4[MAX_CBS_4x4];
- uint8_t unpacked_cb2[MAX_CBS_2x2*2*2*3];
- uint8_t unpacked_cb4[MAX_CBS_4x4*4*4*3];
- uint8_t unpacked_cb4_enlarged[MAX_CBS_4x4*8*8*3];
-} RoqCodebooks;
-
-/**
- * Temporary vars
- */
-typedef struct RoqTempData
-{
- int f2i4[MAX_CBS_4x4];
- int i2f4[MAX_CBS_4x4];
- int f2i2[MAX_CBS_2x2];
- int i2f2[MAX_CBS_2x2];
-
- int mainChunkSize;
-
- int numCB4;
- int numCB2;
-
- RoqCodebooks codebooks;
-
- int used_option[4];
-} RoqTempData;
-
-typedef struct SubcelEvaluation {
- int eval_dist[4];
- int best_bit_use;
- int best_coding;
-
- int subCels[4];
- motion_vect motion;
- int cbEntry;
-} SubcelEvaluation;
-
-typedef struct CelEvaluation {
- int eval_dist[4];
- int best_coding;
-
- SubcelEvaluation subCels[4];
-
- motion_vect motion;
- int cbEntry;
-
- int sourceX, sourceY;
-} CelEvaluation;
-
-typedef struct RoqEncContext {
- RoqContext common;
- AVLFG randctx;
- uint64_t lambda;
-
- motion_vect *this_motion4;
- motion_vect *last_motion4;
-
- motion_vect *this_motion8;
- motion_vect *last_motion8;
-
- unsigned int framesSinceKeyframe;
-
- const AVFrame *frame_to_enc;
- uint8_t *out_buf;
- RoqTempData tmp_data;
- roq_cell results4[4 * MAX_CBS_4x4];
- int tmp_codebook_buf[FFMAX(24 * MAX_CBS_4x4, 6 * MAX_CBS_2x2)];
-
- CelEvaluation *cel_evals;
- int *closest_cb;
- int *points; // Allocated together with closest_cb
-
- int first_frame;
- int quake3_compat; // Quake 3 compatibility option
-} RoqEncContext;
-
/* Macroblock support functions */
static void unpack_roq_cell(roq_cell *cell, uint8_t u[4*3])
{
@@ -223,10 +143,9 @@
return sse;
}
-static int eval_motion_dist(RoqEncContext *enc, int x, int y, motion_vect vect,
+static int eval_motion_dist(RoqContext *enc, int x, int y, motion_vect vect,
int size)
{
- RoqContext *const roq = &enc->common;
int mx=vect.d[0];
int my=vect.d[1];
@@ -239,12 +158,12 @@
mx += x;
my += y;
- if ((unsigned) mx > roq->width-size || (unsigned) my > roq->height-size)
+ if ((unsigned) mx > enc->width-size || (unsigned) my > enc->height-size)
return INT_MAX;
- return block_sse(enc->frame_to_enc->data, roq->last_frame->data, x, y,
+ return block_sse(enc->frame_to_enc->data, enc->last_frame->data, x, y,
mx, my,
- enc->frame_to_enc->linesize, roq->last_frame->linesize,
+ enc->frame_to_enc->linesize, enc->last_frame->linesize,
size);
}
@@ -265,23 +184,78 @@
return sdiff;
}
+typedef struct SubcelEvaluation {
+ int eval_dist[4];
+ int best_bit_use;
+ int best_coding;
+
+ int subCels[4];
+ motion_vect motion;
+ int cbEntry;
+} SubcelEvaluation;
+
+typedef struct CelEvaluation {
+ int eval_dist[4];
+ int best_coding;
+
+ SubcelEvaluation subCels[4];
+
+ motion_vect motion;
+ int cbEntry;
+
+ int sourceX, sourceY;
+} CelEvaluation;
+
+typedef struct RoqCodebooks {
+ int numCB4;
+ int numCB2;
+ int usedCB2[MAX_CBS_2x2];
+ int usedCB4[MAX_CBS_4x4];
+ uint8_t unpacked_cb2[MAX_CBS_2x2*2*2*3];
+ uint8_t unpacked_cb4[MAX_CBS_4x4*4*4*3];
+ uint8_t unpacked_cb4_enlarged[MAX_CBS_4x4*8*8*3];
+} RoqCodebooks;
+
+/**
+ * Temporary vars
+ */
+typedef struct RoqTempData
+{
+ CelEvaluation *cel_evals;
+
+ int f2i4[MAX_CBS_4x4];
+ int i2f4[MAX_CBS_4x4];
+ int f2i2[MAX_CBS_2x2];
+ int i2f2[MAX_CBS_2x2];
+
+ int mainChunkSize;
+
+ int numCB4;
+ int numCB2;
+
+ RoqCodebooks codebooks;
+
+ int *closest_cb2;
+ int used_option[4];
+} RoqTempdata;
+
/**
* Initialize cel evaluators and set their source coordinates
*/
-static int create_cel_evals(RoqEncContext *enc)
+static int create_cel_evals(RoqContext *enc, RoqTempdata *tempData)
{
- RoqContext *const roq = &enc->common;
+ int n=0, x, y, i;
- enc->cel_evals = av_malloc_array(roq->width * roq->height / 64, sizeof(CelEvaluation));
- if (!enc->cel_evals)
+ tempData->cel_evals = av_malloc_array(enc->width*enc->height/64, sizeof(CelEvaluation));
+ if (!tempData->cel_evals)
return AVERROR(ENOMEM);
/* Map to the ROQ quadtree order */
- for (int y = 0, n = 0; y < roq->height; y += 16)
- for (int x = 0; x < roq->width; x += 16)
- for(int i = 0; i < 4; i++) {
- enc->cel_evals[n ].sourceX = x + (i&1)*8;
- enc->cel_evals[n++].sourceY = y + (i&2)*4;
+ for (y=0; y<enc->height; y+=16)
+ for (x=0; x<enc->width; x+=16)
+ for(i=0; i<4; i++) {
+ tempData->cel_evals[n ].sourceX = x + (i&1)*8;
+ tempData->cel_evals[n++].sourceY = y + (i&2)*4;
}
return 0;
@@ -333,7 +307,7 @@
} \
} while(0)
-static void motion_search(RoqEncContext *enc, int blocksize)
+static void motion_search(RoqContext *enc, int blocksize)
{
static const motion_vect offsets[8] = {
{{ 0,-1}},
@@ -346,7 +320,6 @@
{{ 1, 1}},
};
- RoqContext *const roq = &enc->common;
int diff, lowestdiff, oldbest;
int off[3];
motion_vect bestpick = {{0,0}};
@@ -355,7 +328,8 @@
motion_vect *last_motion;
motion_vect *this_motion;
motion_vect vect, vect2;
- const int max = (roq->width / blocksize) * roq->height / blocksize;
+
+ int max=(enc->width/blocksize)*enc->height/blocksize;
if (blocksize == 4) {
last_motion = enc->last_motion4;
@@ -365,17 +339,17 @@
this_motion = enc->this_motion8;
}
- for (i = 0; i< roq->height; i += blocksize)
- for (j = 0; j < roq->width; j += blocksize) {
+ for (i=0; i<enc->height; i+=blocksize)
+ for (j=0; j<enc->width; j+=blocksize) {
lowestdiff = eval_motion_dist(enc, j, i, (motion_vect) {{0,0}},
blocksize);
bestpick.d[0] = 0;
bestpick.d[1] = 0;
if (blocksize == 4)
- EVAL_MOTION(enc->this_motion8[(i/8) * (roq->width/8) + j/8]);
+ EVAL_MOTION(enc->this_motion8[(i/8)*(enc->width/8) + j/8]);
- offset = (i/blocksize) * roq->width / blocksize + j / blocksize;
+ offset = (i/blocksize)*enc->width/blocksize + j/blocksize;
if (offset < max && offset >= 0)
EVAL_MOTION(last_motion[offset]);
@@ -383,12 +357,12 @@
if (offset < max && offset >= 0)
EVAL_MOTION(last_motion[offset]);
- offset = (i/blocksize + 1) * roq->width / blocksize + j / blocksize;
+ offset = (i/blocksize + 1)*enc->width/blocksize + j/blocksize;
if (offset < max && offset >= 0)
EVAL_MOTION(last_motion[offset]);
- off[0]= (i/blocksize) * roq->width / blocksize + j/blocksize - 1;
- off[1]= off[0] - roq->width / blocksize + 1;
+ off[0]= (i/blocksize)*enc->width/blocksize + j/blocksize - 1;
+ off[1]= off[0] - enc->width/blocksize + 1;
off[2]= off[1] + 1;
if (i) {
@@ -417,7 +391,7 @@
}
vect = bestpick;
}
- offset = (i/blocksize) * roq->width / blocksize + j/blocksize;
+ offset = (i/blocksize)*enc->width/blocksize + j/blocksize;
this_motion[offset] = bestpick;
}
}
@@ -426,10 +400,8 @@
* Get distortion for all options available to a subcel
*/
static void gather_data_for_subcel(SubcelEvaluation *subcel, int x,
- int y, RoqEncContext *enc)
+ int y, RoqContext *enc, RoqTempdata *tempData)
{
- RoqContext *const roq = &enc->common;
- RoqTempData *const tempData = &enc->tmp_data;
uint8_t mb4[4*4*3];
uint8_t mb2[2*2*3];
int cluster_index;
@@ -438,25 +410,25 @@
static const int bitsUsed[4] = {2, 10, 10, 34};
if (enc->framesSinceKeyframe >= 1) {
- subcel->motion = enc->this_motion4[y * roq->width / 16 + x / 4];
+ subcel->motion = enc->this_motion4[y*enc->width/16 + x/4];
subcel->eval_dist[RoQ_ID_FCC] =
eval_motion_dist(enc, x, y,
- enc->this_motion4[y * roq->width / 16 + x / 4], 4);
+ enc->this_motion4[y*enc->width/16 + x/4], 4);
} else
subcel->eval_dist[RoQ_ID_FCC] = INT_MAX;
if (enc->framesSinceKeyframe >= 2)
subcel->eval_dist[RoQ_ID_MOT] = block_sse(enc->frame_to_enc->data,
- roq->current_frame->data, x,
+ enc->current_frame->data, x,
y, x, y,
enc->frame_to_enc->linesize,
- roq->current_frame->linesize,
+ enc->current_frame->linesize,
4);
else
subcel->eval_dist[RoQ_ID_MOT] = INT_MAX;
- cluster_index = y * roq->width / 16 + x / 4;
+ cluster_index = y*enc->width/16 + x/4;
get_frame_mb(enc->frame_to_enc, x, y, mb4, 4);
@@ -468,7 +440,7 @@
subcel->eval_dist[RoQ_ID_CCC] = 0;
for(i=0;i<4;i++) {
- subcel->subCels[i] = enc->closest_cb[cluster_index*4+i];
+ subcel->subCels[i] = tempData->closest_cb2[cluster_index*4+i];
get_frame_mb(enc->frame_to_enc, x+2*(i&1),
y+(i&2), mb2, 2);
@@ -491,12 +463,11 @@
/**
* Get distortion for all options available to a cel
*/
-static void gather_data_for_cel(CelEvaluation *cel, RoqEncContext *enc)
+static void gather_data_for_cel(CelEvaluation *cel, RoqContext *enc,
+ RoqTempdata *tempData)
{
- RoqContext *const roq = &enc->common;
- RoqTempData *const tempData = &enc->tmp_data;
uint8_t mb8[8*8*3];
- int index = cel->sourceY * roq->width / 64 + cel->sourceX/8;
+ int index = cel->sourceY*enc->width/64 + cel->sourceX/8;
int i, j, best_dist, divide_bit_use;
int bitsUsed[4] = {2, 10, 10, 0};
@@ -512,11 +483,11 @@
if (enc->framesSinceKeyframe >= 2)
cel->eval_dist[RoQ_ID_MOT] = block_sse(enc->frame_to_enc->data,
- roq->current_frame->data,
+ enc->current_frame->data,
cel->sourceX, cel->sourceY,
cel->sourceX, cel->sourceY,
enc->frame_to_enc->linesize,
- roq->current_frame->linesize,8);
+ enc->current_frame->linesize,8);
else
cel->eval_dist[RoQ_ID_MOT] = INT_MAX;
@@ -526,10 +497,10 @@
index_mb(mb8, tempData->codebooks.unpacked_cb4_enlarged,
tempData->codebooks.numCB4, &cel->cbEntry, 8);
- gather_data_for_subcel(cel->subCels + 0, cel->sourceX+0, cel->sourceY+0, enc);
- gather_data_for_subcel(cel->subCels + 1, cel->sourceX+4, cel->sourceY+0, enc);
- gather_data_for_subcel(cel->subCels + 2, cel->sourceX+0, cel->sourceY+4, enc);
- gather_data_for_subcel(cel->subCels + 3, cel->sourceX+4, cel->sourceY+4, enc);
+ gather_data_for_subcel(cel->subCels + 0, cel->sourceX+0, cel->sourceY+0, enc, tempData);
+ gather_data_for_subcel(cel->subCels + 1, cel->sourceX+4, cel->sourceY+0, enc, tempData);
+ gather_data_for_subcel(cel->subCels + 2, cel->sourceX+0, cel->sourceY+4, enc, tempData);
+ gather_data_for_subcel(cel->subCels + 3, cel->sourceX+4, cel->sourceY+4, enc, tempData);
cel->eval_dist[RoQ_ID_CCC] = 0;
divide_bit_use = 0;
@@ -566,10 +537,8 @@
}
}
-static void remap_codebooks(RoqEncContext *enc)
+static void remap_codebooks(RoqContext *enc, RoqTempdata *tempData)
{
- RoqContext *const roq = &enc->common;
- RoqTempData *const tempData = &enc->tmp_data;
int i, j, idx=0;
/* Make remaps for the final codebook usage */
@@ -578,7 +547,7 @@
tempData->i2f4[i] = idx;
tempData->f2i4[idx] = i;
for (j=0; j<4; j++)
- tempData->codebooks.usedCB2[roq->cb4x4[i].idx[j]]++;
+ tempData->codebooks.usedCB2[enc->cb4x4[i].idx[j]]++;
idx++;
}
}
@@ -600,10 +569,8 @@
/**
* Write codebook chunk
*/
-static void write_codebooks(RoqEncContext *enc)
+static void write_codebooks(RoqContext *enc, RoqTempdata *tempData)
{
- RoqContext *const roq = &enc->common;
- RoqTempData *const tempData = &enc->tmp_data;
int i, j;
uint8_t **outp= &enc->out_buf;
@@ -614,14 +581,14 @@
bytestream_put_byte(outp, tempData->numCB2);
for (i=0; i<tempData->numCB2; i++) {
- bytestream_put_buffer(outp, roq->cb2x2[tempData->f2i2[i]].y, 4);
- bytestream_put_byte(outp, roq->cb2x2[tempData->f2i2[i]].u);
- bytestream_put_byte(outp, roq->cb2x2[tempData->f2i2[i]].v);
+ bytestream_put_buffer(outp, enc->cb2x2[tempData->f2i2[i]].y, 4);
+ bytestream_put_byte(outp, enc->cb2x2[tempData->f2i2[i]].u);
+ bytestream_put_byte(outp, enc->cb2x2[tempData->f2i2[i]].v);
}
for (i=0; i<tempData->numCB4; i++)
for (j=0; j<4; j++)
- bytestream_put_byte(outp, tempData->i2f2[roq->cb4x4[tempData->f2i4[i]].idx[j]]);
+ bytestream_put_byte(outp, tempData->i2f2[enc->cb4x4[tempData->f2i4[i]].idx[j]]);
}
}
@@ -656,11 +623,8 @@
}
}
-static void reconstruct_and_encode_image(RoqEncContext *enc,
- int w, int h, int numBlocks)
+static void reconstruct_and_encode_image(RoqContext *enc, RoqTempdata *tempData, int w, int h, int numBlocks)
{
- RoqContext *const roq = &enc->common;
- RoqTempData *const tempData = &enc->tmp_data;
int i, j, k;
int x, y;
int subX, subY;
@@ -686,7 +650,7 @@
bytestream_put_byte(&enc->out_buf, 0x0);
for (i=0; i<numBlocks; i++) {
- eval = enc->cel_evals + i;
+ eval = tempData->cel_evals + i;
x = eval->sourceX;
y = eval->sourceY;
@@ -701,7 +665,7 @@
bytestream_put_byte(&spool.args, motion_arg(eval->motion));
write_typecode(&spool, RoQ_ID_FCC);
- ff_apply_motion_8x8(roq, x, y,
+ ff_apply_motion_8x8(enc, x, y,
eval->motion.d[0], eval->motion.d[1]);
break;
@@ -709,11 +673,11 @@
bytestream_put_byte(&spool.args, tempData->i2f4[eval->cbEntry]);
write_typecode(&spool, RoQ_ID_SLD);
- qcell = roq->cb4x4 + eval->cbEntry;
- ff_apply_vector_4x4(roq, x , y , roq->cb2x2 + qcell->idx[0]);
- ff_apply_vector_4x4(roq, x+4, y , roq->cb2x2 + qcell->idx[1]);
- ff_apply_vector_4x4(roq, x , y+4, roq->cb2x2 + qcell->idx[2]);
- ff_apply_vector_4x4(roq, x+4, y+4, roq->cb2x2 + qcell->idx[3]);
+ qcell = enc->cb4x4 + eval->cbEntry;
+ ff_apply_vector_4x4(enc, x , y , enc->cb2x2 + qcell->idx[0]);
+ ff_apply_vector_4x4(enc, x+4, y , enc->cb2x2 + qcell->idx[1]);
+ ff_apply_vector_4x4(enc, x , y+4, enc->cb2x2 + qcell->idx[2]);
+ ff_apply_vector_4x4(enc, x+4, y+4, enc->cb2x2 + qcell->idx[3]);
break;
case RoQ_ID_CCC:
@@ -731,7 +695,7 @@
bytestream_put_byte(&spool.args,
motion_arg(eval->subCels[j].motion));
- ff_apply_motion_4x4(roq, subX, subY,
+ ff_apply_motion_4x4(enc, subX, subY,
eval->subCels[j].motion.d[0],
eval->subCels[j].motion.d[1]);
break;
@@ -740,16 +704,16 @@
bytestream_put_byte(&spool.args,
tempData->i2f4[eval->subCels[j].cbEntry]);
- qcell = roq->cb4x4 + eval->subCels[j].cbEntry;
+ qcell = enc->cb4x4 + eval->subCels[j].cbEntry;
- ff_apply_vector_2x2(roq, subX , subY ,
- roq->cb2x2 + qcell->idx[0]);
- ff_apply_vector_2x2(roq, subX+2, subY ,
- roq->cb2x2 + qcell->idx[1]);
- ff_apply_vector_2x2(roq, subX , subY+2,
- roq->cb2x2 + qcell->idx[2]);
- ff_apply_vector_2x2(roq, subX+2, subY+2,
- roq->cb2x2 + qcell->idx[3]);
+ ff_apply_vector_2x2(enc, subX , subY ,
+ enc->cb2x2 + qcell->idx[0]);
+ ff_apply_vector_2x2(enc, subX+2, subY ,
+ enc->cb2x2 + qcell->idx[1]);
+ ff_apply_vector_2x2(enc, subX , subY+2,
+ enc->cb2x2 + qcell->idx[2]);
+ ff_apply_vector_2x2(enc, subX+2, subY+2,
+ enc->cb2x2 + qcell->idx[3]);
break;
case RoQ_ID_CCC:
@@ -758,8 +722,8 @@
bytestream_put_byte(&spool.args,
tempData->i2f2[cb_idx]);
- ff_apply_vector_2x2(roq, subX + 2*(k&1), subY + (k&2),
- roq->cb2x2 + cb_idx);
+ ff_apply_vector_2x2(enc, subX + 2*(k&1), subY + (k&2),
+ enc->cb2x2 + cb_idx);
}
break;
}
@@ -778,7 +742,7 @@
/**
* Create a single YUV cell from a 2x2 section of the image
*/
-static inline void frame_block_to_cell(int *block, uint8_t * const *data,
+static inline void frame_block_to_cell(uint8_t *block, uint8_t * const *data,
int top, int left, const int *stride)
{
int i, j, u=0, v=0;
@@ -792,14 +756,14 @@
v += data[2][x];
}
- *block++ = (u + 2) / 4 * CHROMA_BIAS;
- *block++ = (v + 2) / 4 * CHROMA_BIAS;
+ *block++ = (u+2)/4;
+ *block++ = (v+2)/4;
}
/**
* Create YUV clusters for the entire image
*/
-static void create_clusters(const AVFrame *frame, int w, int h, int *points)
+static void create_clusters(const AVFrame *frame, int w, int h, uint8_t *yuvClusters)
{
int i, j, k, l;
@@ -807,30 +771,42 @@
for (j=0; j<w; j+=4) {
for (k=0; k < 2; k++)
for (l=0; l < 2; l++)
- frame_block_to_cell(points + (l + 2*k)*6, frame->data,
+ frame_block_to_cell(yuvClusters + (l + 2*k)*6, frame->data,
i+2*k, j+2*l, frame->linesize);
- points += 24;
+ yuvClusters += 24;
}
}
-static int generate_codebook(RoqEncContext *enc,
+static int generate_codebook(RoqContext *enc, RoqTempdata *tempdata,
int *points, int inputCount, roq_cell *results,
int size, int cbsize)
{
int i, j, k, ret = 0;
int c_size = size*size/4;
int *buf;
- int *codebook = enc->tmp_codebook_buf;
- int *closest_cb = enc->closest_cb;
+ int *codebook = av_malloc_array(6*c_size, cbsize*sizeof(int));
+ int *closest_cb;
+
+ if (!codebook)
+ return AVERROR(ENOMEM);
+
+ if (size == 4) {
+ closest_cb = av_malloc_array(6*c_size, inputCount*sizeof(int));
+ if (!closest_cb) {
+ ret = AVERROR(ENOMEM);
+ goto out;
+ }
+ } else
+ closest_cb = tempdata->closest_cb2;
ret = avpriv_init_elbg(points, 6 * c_size, inputCount, codebook,
cbsize, 1, closest_cb, &enc->randctx);
if (ret < 0)
- return ret;
+ goto out;
ret = avpriv_do_elbg(points, 6 * c_size, inputCount, codebook,
cbsize, 1, closest_cb, &enc->randctx);
if (ret < 0)
- return ret;
+ goto out;
buf = codebook;
for (i=0; i<cbsize; i++)
@@ -842,64 +818,93 @@
results->v = (*buf++ + CHROMA_BIAS/2)/CHROMA_BIAS;
results++;
}
- return 0;
+out:
+ if (size == 4)
+ av_free(closest_cb);
+ av_free(codebook);
+ return ret;
}
-static int generate_new_codebooks(RoqEncContext *enc)
+static int generate_new_codebooks(RoqContext *enc, RoqTempdata *tempData)
{
int i, j, ret = 0;
- RoqCodebooks *codebooks = &enc->tmp_data.codebooks;
- RoqContext *const roq = &enc->common;
- int max = roq->width * roq->height / 16;
+ RoqCodebooks *codebooks = &tempData->codebooks;
+ int max = enc->width*enc->height/16;
uint8_t mb2[3*4];
- int *points = enc->points;
+ roq_cell *results4 = av_malloc(sizeof(roq_cell)*MAX_CBS_4x4*4);
+ uint8_t *yuvClusters=av_malloc_array(max, sizeof(int)*6*4);
+ int *points = av_malloc_array(max, 6*4*sizeof(int));
+ int bias;
+
+ if (!results4 || !yuvClusters || !points) {
+ ret = AVERROR(ENOMEM);
+ goto out;
+ }
/* Subsample YUV data */
- create_clusters(enc->frame_to_enc, roq->width, roq->height, points);
+ create_clusters(enc->frame_to_enc, enc->width, enc->height, yuvClusters);
+
+ /* Cast to integer and apply chroma bias */
+ for (i=0; i<max*24; i++) {
+ bias = ((i%6)<4) ? 1 : CHROMA_BIAS;
+ points[i] = bias*yuvClusters[i];
+ }
+
+ /* Create 4x4 codebooks */
+ if ((ret = generate_codebook(enc, tempData, points, max,
+ results4, 4, (enc->quake3_compat ? MAX_CBS_4x4-1 : MAX_CBS_4x4))) < 0)
+ goto out;
codebooks->numCB4 = (enc->quake3_compat ? MAX_CBS_4x4-1 : MAX_CBS_4x4);
- /* Create 4x4 codebooks */
- if ((ret = generate_codebook(enc, points, max, enc->results4,
- 4, codebooks->numCB4)) < 0)
- return ret;
+ tempData->closest_cb2 = av_malloc_array(max, 4*sizeof(int));
+ if (!tempData->closest_cb2) {
+ ret = AVERROR(ENOMEM);
+ goto out;
+ }
/* Create 2x2 codebooks */
- if ((ret = generate_codebook(enc, points, max * 4,
- roq->cb2x2, 2, MAX_CBS_2x2)) < 0)
- return ret;
+ if ((ret = generate_codebook(enc, tempData, points, max * 4,
+ enc->cb2x2, 2, MAX_CBS_2x2)) < 0)
+ goto out;
codebooks->numCB2 = MAX_CBS_2x2;
/* Unpack 2x2 codebook clusters */
for (i=0; i<codebooks->numCB2; i++)
- unpack_roq_cell(roq->cb2x2 + i, codebooks->unpacked_cb2 + i*2*2*3);
+ unpack_roq_cell(enc->cb2x2 + i, codebooks->unpacked_cb2 + i*2*2*3);
/* Index all 4x4 entries to the 2x2 entries, unpack, and enlarge */
for (i=0; i<codebooks->numCB4; i++) {
for (j=0; j<4; j++) {
- unpack_roq_cell(&enc->results4[4*i + j], mb2);
+ unpack_roq_cell(&results4[4*i + j], mb2);
index_mb(mb2, codebooks->unpacked_cb2, codebooks->numCB2,
- &roq->cb4x4[i].idx[j], 2);
+ &enc->cb4x4[i].idx[j], 2);
}
- unpack_roq_qcell(codebooks->unpacked_cb2, roq->cb4x4 + i,
+ unpack_roq_qcell(codebooks->unpacked_cb2, enc->cb4x4 + i,
codebooks->unpacked_cb4 + i*4*4*3);
enlarge_roq_mb4(codebooks->unpacked_cb4 + i*4*4*3,
codebooks->unpacked_cb4_enlarged + i*8*8*3);
}
-
- return 0;
+out:
+ av_free(yuvClusters);
+ av_free(points);
+ av_free(results4);
+ return ret;
}
-static int roq_encode_video(RoqEncContext *enc)
+static int roq_encode_video(RoqContext *enc)
{
- RoqTempData *const tempData = &enc->tmp_data;
- RoqContext *const roq = &enc->common;
- int ret;
+ RoqTempdata *tempData = enc->tmpData;
+ int i, ret;
memset(tempData, 0, sizeof(*tempData));
- ret = generate_new_codebooks(enc);
+ ret = create_cel_evals(enc, tempData);
+ if (ret < 0)
+ return ret;
+
+ ret = generate_new_codebooks(enc, tempData);
if (ret < 0)
return ret;
@@ -909,16 +914,16 @@
}
retry_encode:
- for (int i = 0; i < roq->width * roq->height / 64; i++)
- gather_data_for_cel(enc->cel_evals + i, enc);
+ for (i=0; i<enc->width*enc->height/64; i++)
+ gather_data_for_cel(tempData->cel_evals + i, enc, tempData);
/* Quake 3 can't handle chunks bigger than 65535 bytes */
if (tempData->mainChunkSize/8 > 65535 && enc->quake3_compat) {
if (enc->lambda > 100000) {
- av_log(roq->avctx, AV_LOG_ERROR, "Cannot encode video in Quake compatible form\n");
+ av_log(enc->avctx, AV_LOG_ERROR, "Cannot encode video in Quake compatible form\n");
return AVERROR(EINVAL);
}
- av_log(roq->avctx, AV_LOG_ERROR,
+ av_log(enc->avctx, AV_LOG_ERROR,
"Warning, generated a frame too big for Quake (%d > 65535), "
"now switching to a bigger qscale value.\n",
tempData->mainChunkSize/8);
@@ -933,18 +938,21 @@
goto retry_encode;
}
- remap_codebooks(enc);
+ remap_codebooks(enc, tempData);
- write_codebooks(enc);
+ write_codebooks(enc, tempData);
- reconstruct_and_encode_image(enc, roq->width, roq->height,
- roq->width * roq->height / 64);
+ reconstruct_and_encode_image(enc, tempData, enc->width, enc->height,
+ enc->width*enc->height/64);
/* Rotate frame history */
- FFSWAP(AVFrame *, roq->current_frame, roq->last_frame);
+ FFSWAP(AVFrame *, enc->current_frame, enc->last_frame);
FFSWAP(motion_vect *, enc->last_motion4, enc->this_motion4);
FFSWAP(motion_vect *, enc->last_motion8, enc->this_motion8);
+ av_freep(&tempData->cel_evals);
+ av_freep(&tempData->closest_cb2);
+
enc->framesSinceKeyframe++;
return 0;
@@ -952,13 +960,12 @@
static av_cold int roq_encode_end(AVCodecContext *avctx)
{
- RoqEncContext *const enc = avctx->priv_data;
+ RoqContext *enc = avctx->priv_data;
- av_frame_free(&enc->common.current_frame);
- av_frame_free(&enc->common.last_frame);
+ av_frame_free(&enc->current_frame);
+ av_frame_free(&enc->last_frame);
- av_freep(&enc->cel_evals);
- av_freep(&enc->closest_cb);
+ av_freep(&enc->tmpData);
av_freep(&enc->this_motion4);
av_freep(&enc->last_motion4);
av_freep(&enc->this_motion8);
@@ -969,12 +976,11 @@
static av_cold int roq_encode_init(AVCodecContext *avctx)
{
- RoqEncContext *const enc = avctx->priv_data;
- RoqContext *const roq = &enc->common;
+ RoqContext *enc = avctx->priv_data;
av_lfg_init(&enc->randctx, 1);
- roq->avctx = avctx;
+ enc->avctx = avctx;
enc->framesSinceKeyframe = 0;
if ((avctx->width & 0xf) || (avctx->height & 0xf)) {
@@ -990,44 +996,39 @@
if (((avctx->width)&(avctx->width-1))||((avctx->height)&(avctx->height-1)))
av_log(avctx, AV_LOG_ERROR, "Warning: dimensions not power of two, this is not supported by quake\n");
- roq->width = avctx->width;
- roq->height = avctx->height;
+ enc->width = avctx->width;
+ enc->height = avctx->height;
enc->framesSinceKeyframe = 0;
enc->first_frame = 1;
- roq->last_frame = av_frame_alloc();
- roq->current_frame = av_frame_alloc();
- if (!roq->last_frame || !roq->current_frame)
+ enc->last_frame = av_frame_alloc();
+ enc->current_frame = av_frame_alloc();
+ if (!enc->last_frame || !enc->current_frame)
return AVERROR(ENOMEM);
+ enc->tmpData = av_malloc(sizeof(RoqTempdata));
+
enc->this_motion4 =
- av_mallocz_array(roq->width * roq->height / 16, sizeof(motion_vect));
+ av_mallocz_array((enc->width*enc->height/16), sizeof(motion_vect));
enc->last_motion4 =
- av_malloc_array (roq->width * roq->height / 16, sizeof(motion_vect));
+ av_malloc_array ((enc->width*enc->height/16), sizeof(motion_vect));
enc->this_motion8 =
- av_mallocz_array(roq->width * roq->height / 64, sizeof(motion_vect));
+ av_mallocz_array((enc->width*enc->height/64), sizeof(motion_vect));
enc->last_motion8 =
- av_malloc_array (roq->width * roq->height / 64, sizeof(motion_vect));
+ av_malloc_array ((enc->width*enc->height/64), sizeof(motion_vect));
- /* 4x4 codebook needs 6 * 4 * 4 / 4 * width * height / 16 * sizeof(int);
- * and so does the points buffer. */
- enc->closest_cb =
- av_malloc_array(roq->width * roq->height, 3 * sizeof(int));
-
- if (!enc->this_motion4 || !enc->last_motion4 ||
- !enc->this_motion8 || !enc->last_motion8 || !enc->closest_cb)
+ if (!enc->tmpData || !enc->this_motion4 || !enc->last_motion4 ||
+ !enc->this_motion8 || !enc->last_motion8)
return AVERROR(ENOMEM);
- enc->points = enc->closest_cb + roq->width * roq->height * 3 / 2;
-
- return create_cel_evals(enc);
+ return 0;
}
-static void roq_write_video_info_chunk(RoqEncContext *enc)
+static void roq_write_video_info_chunk(RoqContext *enc)
{
/* ROQ info chunk */
bytestream_put_le16(&enc->out_buf, RoQ_INFO);
@@ -1040,10 +1041,10 @@
bytestream_put_byte(&enc->out_buf, 0x00);
/* Width */
- bytestream_put_le16(&enc->out_buf, enc->common.width);
+ bytestream_put_le16(&enc->out_buf, enc->width);
/* Height */
- bytestream_put_le16(&enc->out_buf, enc->common.height);
+ bytestream_put_le16(&enc->out_buf, enc->height);
/* Unused in Quake 3, mimics the output of the real encoder */
bytestream_put_byte(&enc->out_buf, 0x08);
@@ -1055,11 +1056,10 @@
static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet)
{
- RoqEncContext *const enc = avctx->priv_data;
- RoqContext *const roq = &enc->common;
+ RoqContext *enc = avctx->priv_data;
int size, ret;
- roq->avctx = avctx;
+ enc->avctx = avctx;
enc->frame_to_enc = frame;
@@ -1070,7 +1070,7 @@
/* 138 bits max per 8x8 block +
* 256 codebooks*(6 bytes 2x2 + 4 bytes 4x4) + 8 bytes frame header */
- size = ((roq->width * roq->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
+ size = ((enc->width * enc->height / 64) * 138 + 7) / 8 + 256 * (6 + 4) + 8;
if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0)
return ret;
enc->out_buf = pkt->data;
@@ -1082,8 +1082,8 @@
if (enc->first_frame) {
/* Alloc memory for the reconstruction data (we must know the stride
for that) */
- if ((ret = ff_get_buffer(avctx, roq->current_frame, 0)) < 0 ||
- (ret = ff_get_buffer(avctx, roq->last_frame, 0)) < 0)
+ if ((ret = ff_get_buffer(avctx, enc->current_frame, 0)) < 0 ||
+ (ret = ff_get_buffer(avctx, enc->last_frame, 0)) < 0)
return ret;
/* Before the first video frame, write a "video info" chunk */
@@ -1105,7 +1105,7 @@
return 0;
}
-#define OFFSET(x) offsetof(RoqEncContext, x)
+#define OFFSET(x) offsetof(RoqContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "quake3_compat", "Whether to respect known limitations in Quake 3 decoder", OFFSET(quake3_compat), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE },
@@ -1124,7 +1124,7 @@
.long_name = NULL_IF_CONFIG_SMALL("id RoQ video"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_ROQ,
- .priv_data_size = sizeof(RoqEncContext),
+ .priv_data_size = sizeof(RoqContext),
.init = roq_encode_init,
.encode2 = roq_encode_frame,
.close = roq_encode_end,
diff --git a/libavcodec/rscc.c b/libavcodec/rscc.c
index 79b02da..bd05209 100644
--- a/libavcodec/rscc.c
+++ b/libavcodec/rscc.c
@@ -300,10 +300,6 @@
ret = AVERROR_INVALIDDATA;
goto end;
}
- if (ctx->inflated_size < pixel_size) {
- ret = AVERROR_INVALIDDATA;
- goto end;
- }
ret = uncompress(ctx->inflated_buf, &len, gbc->buffer, packed_size);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "Pixel deflate error %d.\n", ret);
@@ -346,7 +342,7 @@
/* Palette handling */
if (avctx->pix_fmt == AV_PIX_FMT_PAL8) {
- buffer_size_t size;
+ int size;
const uint8_t *palette = av_packet_get_side_data(avpkt,
AV_PKT_DATA_PALETTE,
&size);
diff --git a/libavcodec/rtjpeg.h b/libavcodec/rtjpeg.h
index d4dc074..d22ff40 100644
--- a/libavcodec/rtjpeg.h
+++ b/libavcodec/rtjpeg.h
@@ -24,7 +24,7 @@
#include <stdint.h>
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "idctdsp.h"
#define RTJPEG_FILE_VERSION 0
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index d5c7480..d118515 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -374,6 +374,7 @@
avctx->coded_height, 0, avctx)) < 0)
return ret;
+ ff_mpv_decode_defaults(s);
ff_mpv_decode_init(s, avctx);
s->out_format = FMT_H263;
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 7e5bfe0..13f9b60 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -27,9 +27,7 @@
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
-#include "libavutil/video_enc_params.h"
#include "avcodec.h"
#include "error_resilience.h"
@@ -1489,6 +1487,7 @@
MpegEncContext *s = &r->s;
int ret;
+ ff_mpv_decode_defaults(s);
ff_mpv_decode_init(s, avctx);
s->out_format = FMT_H263;
diff --git a/libavcodec/rv34.h b/libavcodec/rv34.h
index 53b29dc..1d55225 100644
--- a/libavcodec/rv34.h
+++ b/libavcodec/rv34.h
@@ -27,8 +27,6 @@
#ifndef AVCODEC_RV34_H
#define AVCODEC_RV34_H
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "mpegvideo.h"
diff --git a/libavcodec/rv34data.h b/libavcodec/rv34data.h
index 4509e1f..32ecc39 100644
--- a/libavcodec/rv34data.h
+++ b/libavcodec/rv34data.h
@@ -100,6 +100,19 @@
};
/**
+ * table for obtaining the quantizer difference
+ * @todo Use with ff_modified_quant_tab from h263data.h.
+ */
+static const uint8_t rv34_dquant_tab[2][32]={
+// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+{
+ 0, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9,10,11,12,13,14,15,16,17,18,18,19,20,21,22,23,24,25,26,27,28
+},{
+ 0, 2, 3, 4, 5, 6, 7, 8, 9,10,11,13,14,15,16,17,18,19,20,21,22,24,25,26,27,28,29,30,31,31,31,26
+}
+};
+
+/**
* maximum number of macroblocks for each of the possible slice offset sizes
* @todo This is the same as ff_mba_max, maybe use it instead.
*/
diff --git a/libavcodec/sbc.h b/libavcodec/sbc.h
index 419c8ea..de9c8d9 100644
--- a/libavcodec/sbc.h
+++ b/libavcodec/sbc.h
@@ -35,7 +35,6 @@
#include "avcodec.h"
#include "libavutil/crc.h"
-#include "libavutil/mem_internal.h"
#define MSBC_BLOCKS 15
diff --git a/libavcodec/sbc_parser.c b/libavcodec/sbc_parser.c
index 5549b19..f565641 100644
--- a/libavcodec/sbc_parser.c
+++ b/libavcodec/sbc_parser.c
@@ -42,6 +42,7 @@
if (data[0] == MSBC_SYNCWORD && data[1] == 0 && data[2] == 0) {
avctx->channels = 1;
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
avctx->sample_rate = 16000;
avctx->frame_size = 120;
s->duration = avctx->frame_size;
@@ -65,6 +66,7 @@
+ (joint * subbands)) + 7) / 8;
avctx->channels = channels;
+ avctx->sample_fmt = AV_SAMPLE_FMT_S16;
avctx->sample_rate = sample_rates[sr];
avctx->frame_size = subbands * blocks;
s->duration = avctx->frame_size;
diff --git a/libavcodec/sbcdec.c b/libavcodec/sbcdec.c
index bb590e8..b8f01d5 100644
--- a/libavcodec/sbcdec.c
+++ b/libavcodec/sbcdec.c
@@ -33,7 +33,6 @@
#include "avcodec.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
#include "sbc.h"
#include "sbcdec_data.h"
diff --git a/libavcodec/sbcdsp.h b/libavcodec/sbcdsp.h
index 24264df..334c058 100644
--- a/libavcodec/sbcdsp.h
+++ b/libavcodec/sbcdsp.h
@@ -32,8 +32,6 @@
#ifndef AVCODEC_SBCDSP_H
#define AVCODEC_SBCDSP_H
-#include "libavutil/mem_internal.h"
-
#include "sbc.h"
#include "sbcdsp_data.h"
diff --git a/libavcodec/sbcdsp_data.c b/libavcodec/sbcdsp_data.c
index ad6390c..78c07c0 100644
--- a/libavcodec/sbcdsp_data.c
+++ b/libavcodec/sbcdsp_data.c
@@ -29,8 +29,6 @@
* miscellaneous SBC tables
*/
-#include "libavutil/mem_internal.h"
-
#include "sbcdsp_data.h"
#define F_PROTO(x) ((int32_t) (((x) * 2) * ((int32_t) 1 << 15) + 0.5))
diff --git a/libavcodec/sbr.h b/libavcodec/sbr.h
index f80f122..eb7d1ae 100644
--- a/libavcodec/sbr.h
+++ b/libavcodec/sbr.h
@@ -30,9 +30,6 @@
#define AVCODEC_SBR_H
#include <stdint.h>
-
-#include "libavutil/mem_internal.h"
-
#include "fft.h"
#include "aacps.h"
#include "sbrdsp.h"
diff --git a/libavcodec/scpr3.c b/libavcodec/scpr3.c
index 78c5888..1ed764b 100644
--- a/libavcodec/scpr3.c
+++ b/libavcodec/scpr3.c
@@ -524,16 +524,32 @@
static int update_model1_to_5(PixelModel3 *m, uint32_t val)
{
+ PixelModel3 n = {0};
int i, size, freqs;
uint32_t a;
- update_model1_to_4(m, val);
size = m->size;
+ n.size = size;
+ for (i = 0; i < size; i++) {
+ n.symbols[i] = m->symbols[i];
+ }
+ AV_QSORT(n.symbols, size, uint8_t, cmpbytes);
+ size = n.size;
+ for (i = 0; i < size; i++) {
+ if (val == n.symbols[i]) {
+ n.freqs[i] = 100;
+ n.maxpos = i;
+ } else {
+ n.freqs[i] = 50;
+ }
+ }
a = 256 - size;
for (i = 0; i < size; i++, a += freqs)
- freqs = m->freqs[i];
- m->type = 5;
- m->cntsum = a;
+ freqs = n.freqs[i];
+ n.type = 5;
+ n.cntsum = a;
+
+ memcpy(m, &n, sizeof(n));
return 0;
}
diff --git a/libavcodec/sei.h b/libavcodec/sei.h
deleted file mode 100644
index 5513590..0000000
--- a/libavcodec/sei.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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 AVCODEC_SEI_H
-#define AVCODEC_SEI_H
-
-// SEI payload types form a common namespace between the H.264, H.265
-// and H.266 standards. A given payload type always has the same
-// meaning, but some names have different payload types in different
-// standards (e.g. scalable-nesting is 30 in H.264 but 133 in H.265).
-// The content of the payload data depends on the standard, though
-// many generic parts have the same interpretation everywhere (such as
-// mastering-display-colour-volume and user-data-unregistered).
-enum {
- SEI_TYPE_BUFFERING_PERIOD = 0,
- SEI_TYPE_PIC_TIMING = 1,
- SEI_TYPE_PAN_SCAN_RECT = 2,
- SEI_TYPE_FILLER_PAYLOAD = 3,
- SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4,
- SEI_TYPE_USER_DATA_UNREGISTERED = 5,
- SEI_TYPE_RECOVERY_POINT = 6,
- SEI_TYPE_DEC_REF_PIC_MARKING_REPETITION = 7,
- SEI_TYPE_SPARE_PIC = 8,
- SEI_TYPE_SCENE_INFO = 9,
- SEI_TYPE_SUB_SEQ_INFO = 10,
- SEI_TYPE_SUB_SEQ_LAYER_CHARACTERISTICS = 11,
- SEI_TYPE_SUB_SEQ_CHARACTERISTICS = 12,
- SEI_TYPE_FULL_FRAME_FREEZE = 13,
- SEI_TYPE_FULL_FRAME_FREEZE_RELEASE = 14,
- SEI_TYPE_FULL_FRAME_SNAPSHOT = 15,
- SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,
- SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17,
- SEI_TYPE_MOTION_CONSTRAINED_SLICE_GROUP_SET = 18,
- SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19,
- SEI_TYPE_DEBLOCKING_FILTER_DISPLAY_PREFERENCE = 20,
- SEI_TYPE_STEREO_VIDEO_INFO = 21,
- SEI_TYPE_POST_FILTER_HINT = 22,
- SEI_TYPE_TONE_MAPPING_INFO = 23,
- SEI_TYPE_SCALABILITY_INFO = 24,
- SEI_TYPE_SUB_PIC_SCALABLE_LAYER = 25,
- SEI_TYPE_NON_REQUIRED_LAYER_REP = 26,
- SEI_TYPE_PRIORITY_LAYER_INFO = 27,
- SEI_TYPE_LAYERS_NOT_PRESENT_4 = 28,
- SEI_TYPE_LAYER_DEPENDENCY_CHANGE = 29,
- SEI_TYPE_SCALABLE_NESTING_4 = 30,
- SEI_TYPE_BASE_LAYER_TEMPORAL_HRD = 31,
- SEI_TYPE_QUALITY_LAYER_INTEGRITY_CHECK = 32,
- SEI_TYPE_REDUNDANT_PIC_PROPERTY = 33,
- SEI_TYPE_TL0_DEP_REP_INDEX = 34,
- SEI_TYPE_TL_SWITCHING_POINT = 35,
- SEI_TYPE_PARALLEL_DECODING_INFO = 36,
- SEI_TYPE_MVC_SCALABLE_NESTING = 37,
- SEI_TYPE_VIEW_SCALABILITY_INFO = 38,
- SEI_TYPE_MULTIVIEW_SCENE_INFO_4 = 39,
- SEI_TYPE_MULTIVIEW_ACQUISITION_INFO_4 = 40,
- SEI_TYPE_NON_REQUIRED_VIEW_COMPONENT = 41,
- SEI_TYPE_VIEW_DEPENDENCY_CHANGE = 42,
- SEI_TYPE_OPERATION_POINTS_NOT_PRESENT = 43,
- SEI_TYPE_BASE_VIEW_TEMPORAL_HRD = 44,
- SEI_TYPE_FRAME_PACKING_ARRANGEMENT = 45,
- SEI_TYPE_MULTIVIEW_VIEW_POSITION_4 = 46,
- SEI_TYPE_DISPLAY_ORIENTATION = 47,
- SEI_TYPE_MVCD_SCALABLE_NESTING = 48,
- SEI_TYPE_MVCD_VIEW_SCALABILITY_INFO = 49,
- SEI_TYPE_DEPTH_REPRESENTATION_INFO_4 = 50,
- SEI_TYPE_THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO_4 = 51,
- SEI_TYPE_DEPTH_TIMING = 52,
- SEI_TYPE_DEPTH_SAMPLING_INFO = 53,
- SEI_TYPE_CONSTRAINED_DEPTH_PARAMETER_SET_IDENTIFIER = 54,
- SEI_TYPE_GREEN_METADATA = 56,
- SEI_TYPE_STRUCTURE_OF_PICTURES_INFO = 128,
- SEI_TYPE_ACTIVE_PARAMETER_SETS = 129,
- SEI_TYPE_PARAMETER_SETS_INCLUSION_INDICATION = SEI_TYPE_ACTIVE_PARAMETER_SETS,
- SEI_TYPE_DECODING_UNIT_INFO = 130,
- SEI_TYPE_TEMPORAL_SUB_LAYER_ZERO_IDX = 131,
- SEI_TYPE_DECODED_PICTURE_HASH = 132,
- SEI_TYPE_SCALABLE_NESTING_5 = 133,
- SEI_TYPE_REGION_REFRESH_INFO = 134,
- SEI_TYPE_NO_DISPLAY = 135,
- SEI_TYPE_TIME_CODE = 136,
- SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME = 137,
- SEI_TYPE_SEGMENTED_RECT_FRAME_PACKING_ARRANGEMENT = 138,
- SEI_TYPE_TEMPORAL_MOTION_CONSTRAINED_TILE_SETS = 139,
- SEI_TYPE_CHROMA_RESAMPLING_FILTER_HINT = 140,
- SEI_TYPE_KNEE_FUNCTION_INFO = 141,
- SEI_TYPE_COLOUR_REMAPPING_INFO = 142,
- SEI_TYPE_DEINTERLACED_FIELD_IDENTIFICATION = 143,
- SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144,
- SEI_TYPE_DEPENDENT_RAP_INDICATION = 145,
- SEI_TYPE_CODED_REGION_COMPLETION = 146,
- SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
- SEI_TYPE_AMBIENT_VIEWING_ENVIRONMENT = 148,
- SEI_TYPE_CONTENT_COLOUR_VOLUME = 149,
- SEI_TYPE_EQUIRECTANGULAR_PROJECTION = 150,
- SEI_TYPE_CUBEMAP_PROJECTION = 151,
- SEI_TYPE_FISHEYE_VIDEO_INFO = 152,
- SEI_TYPE_SPHERE_ROTATION = 154,
- SEI_TYPE_REGIONWISE_PACKING = 155,
- SEI_TYPE_OMNI_VIEWPORT = 156,
- SEI_TYPE_REGIONAL_NESTING = 157,
- SEI_TYPE_MCTS_EXTRACTION_INFO_SETS = 158,
- SEI_TYPE_MCTS_EXTRACTION_INFO_NESTING = 159,
- SEI_TYPE_LAYERS_NOT_PRESENT_5 = 160,
- SEI_TYPE_INTER_LAYER_CONSTRAINED_TILE_SETS = 161,
- SEI_TYPE_BSP_NESTING = 162,
- SEI_TYPE_BSP_INITIAL_ARRIVAL_TIME = 163,
- SEI_TYPE_SUB_BITSTREAM_PROPERTY = 164,
- SEI_TYPE_ALPHA_CHANNEL_INFO = 165,
- SEI_TYPE_OVERLAY_INFO = 166,
- SEI_TYPE_TEMPORAL_MV_PREDICTION_CONSTRAINTS = 167,
- SEI_TYPE_FRAME_FIELD_INFO = 168,
- SEI_TYPE_THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO = 176,
- SEI_TYPE_DEPTH_REPRESENTATION_INFO_5 = 177,
- SEI_TYPE_MULTIVIEW_SCENE_INFO_5 = 178,
- SEI_TYPE_MULTIVIEW_ACQUISITION_INFO_5 = 179,
- SEI_TYPE_MULTIVIEW_VIEW_POSITION_5 = 180,
- SEI_TYPE_ALTERNATIVE_DEPTH_INFO = 181,
- SEI_TYPE_SEI_MANIFEST = 200,
- SEI_TYPE_SEI_PREFIX_INDICATION = 201,
- SEI_TYPE_ANNOTATED_REGIONS = 202,
- SEI_TYPE_SUBPIC_LEVEL_INFO = 203,
- SEI_TYPE_SAMPLE_ASPECT_RATIO_INFO = 204,
-};
-
-#endif /* AVCODEC_SEI_H */
diff --git a/libavcodec/setts_bsf.c b/libavcodec/setts_bsf.c
deleted file mode 100644
index 5b6b256..0000000
--- a/libavcodec/setts_bsf.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-/**
- * @file
- * Change the PTS/DTS timestamps.
- */
-
-#include "libavutil/opt.h"
-#include "libavutil/eval.h"
-
-#include "avcodec.h"
-#include "bsf.h"
-#include "bsf_internal.h"
-
-static const char *const var_names[] = {
- "N", ///< frame number (starting at zero)
- "TS",
- "POS", ///< original position in the file of the frame
- "PREV_INPTS", ///< previous input PTS
- "PREV_INDTS", ///< previous input DTS
- "PREV_OUTPTS", ///< previous output PTS
- "PREV_OUTDTS", ///< previous output DTS
- "PTS", ///< original PTS in the file of the frame
- "DTS", ///< original DTS in the file of the frame
- "STARTPTS", ///< PTS at start of movie
- "STARTDTS", ///< DTS at start of movie
- "TB", ///< timebase of the stream
- "SR", ///< sample rate of the stream
- NULL
-};
-
-enum var_name {
- VAR_N,
- VAR_TS,
- VAR_POS,
- VAR_PREV_INPTS,
- VAR_PREV_INDTS,
- VAR_PREV_OUTPTS,
- VAR_PREV_OUTDTS,
- VAR_PTS,
- VAR_DTS,
- VAR_STARTPTS,
- VAR_STARTDTS,
- VAR_TB,
- VAR_SR,
- VAR_VARS_NB
-};
-
-typedef struct SetTSContext {
- const AVClass *class;
-
- char *ts_str;
- char *pts_str;
- char *dts_str;
-
- int64_t frame_number;
-
- int64_t start_pts;
- int64_t start_dts;
- int64_t prev_inpts;
- int64_t prev_indts;
- int64_t prev_outpts;
- int64_t prev_outdts;
-
- double var_values[VAR_VARS_NB];
-
- AVExpr *ts_expr;
- AVExpr *pts_expr;
- AVExpr *dts_expr;
-} SetTSContext;
-
-static int setts_init(AVBSFContext *ctx)
-{
- SetTSContext *s = ctx->priv_data;
- int ret;
-
- if ((ret = av_expr_parse(&s->ts_expr, s->ts_str,
- var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Error while parsing ts expression '%s'\n", s->ts_str);
- return ret;
- }
-
- if (s->pts_str) {
- if ((ret = av_expr_parse(&s->pts_expr, s->pts_str,
- var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Error while parsing pts expression '%s'\n", s->pts_str);
- return ret;
- }
- }
-
- if (s->dts_str) {
- if ((ret = av_expr_parse(&s->dts_expr, s->dts_str,
- var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Error while parsing dts expression '%s'\n", s->dts_str);
- return ret;
- }
- }
-
- s->frame_number= 0;
- s->start_pts = AV_NOPTS_VALUE;
- s->start_dts = AV_NOPTS_VALUE;
- s->prev_inpts = AV_NOPTS_VALUE;
- s->prev_indts = AV_NOPTS_VALUE;
- s->prev_outpts = AV_NOPTS_VALUE;
- s->prev_outdts = AV_NOPTS_VALUE;
-
- return 0;
-}
-
-static int setts_filter(AVBSFContext *ctx, AVPacket *pkt)
-{
- SetTSContext *s = ctx->priv_data;
- int64_t new_ts, new_pts, new_dts;
- int ret;
-
- ret = ff_bsf_get_packet_ref(ctx, pkt);
- if (ret < 0)
- return ret;
-
- if (s->start_pts == AV_NOPTS_VALUE)
- s->start_pts = pkt->pts;
-
- if (s->start_dts == AV_NOPTS_VALUE)
- s->start_dts = pkt->dts;
-
- s->var_values[VAR_N] = s->frame_number++;
- s->var_values[VAR_TS] = pkt->dts;
- s->var_values[VAR_POS] = pkt->pos;
- s->var_values[VAR_PTS] = pkt->pts;
- s->var_values[VAR_DTS] = pkt->dts;
- s->var_values[VAR_PREV_INPTS] = s->prev_inpts;
- s->var_values[VAR_PREV_INDTS] = s->prev_indts;
- s->var_values[VAR_PREV_OUTPTS] = s->prev_outpts;
- s->var_values[VAR_PREV_OUTDTS] = s->prev_outdts;
- s->var_values[VAR_STARTPTS] = s->start_pts;
- s->var_values[VAR_STARTDTS] = s->start_dts;
- s->var_values[VAR_TB] = av_q2d(ctx->time_base_out);
- s->var_values[VAR_SR] = ctx->par_in->sample_rate;
-
- new_ts = llrint(av_expr_eval(s->ts_expr, s->var_values, NULL));
-
- if (s->pts_str) {
- s->var_values[VAR_TS] = pkt->pts;
- new_pts = llrint(av_expr_eval(s->pts_expr, s->var_values, NULL));
- } else {
- new_pts = new_ts;
- }
-
- if (s->dts_str) {
- s->var_values[VAR_TS] = pkt->dts;
- new_dts = llrint(av_expr_eval(s->dts_expr, s->var_values, NULL));
- } else {
- new_dts = new_ts;
- }
-
- s->var_values[VAR_PREV_INPTS] = pkt->pts;
- s->var_values[VAR_PREV_INDTS] = pkt->dts;
- s->var_values[VAR_PREV_OUTPTS] = new_pts;
- s->var_values[VAR_PREV_OUTDTS] = new_dts;
-
- pkt->pts = new_pts;
- pkt->dts = new_dts;
-
- return ret;
-}
-
-static void setts_close(AVBSFContext *bsf)
-{
- SetTSContext *s = bsf->priv_data;
-
- av_expr_free(s->ts_expr);
- s->ts_expr = NULL;
- av_expr_free(s->pts_expr);
- s->pts_expr = NULL;
- av_expr_free(s->dts_expr);
- s->dts_expr = NULL;
-}
-
-#define OFFSET(x) offsetof(SetTSContext, x)
-#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_SUBTITLE_PARAM|AV_OPT_FLAG_BSF_PARAM)
-
-static const AVOption options[] = {
- { "ts", "set expression for packet PTS and DTS", OFFSET(ts_str), AV_OPT_TYPE_STRING, {.str="TS"}, 0, 0, FLAGS },
- { "pts", "set expression for packet PTS", OFFSET(pts_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
- { "dts", "set expression for packet DTS", OFFSET(dts_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
- { NULL },
-};
-
-static const AVClass setts_class = {
- .class_name = "setts_bsf",
- .item_name = av_default_item_name,
- .option = options,
- .version = LIBAVUTIL_VERSION_INT,
-};
-
-const AVBitStreamFilter ff_setts_bsf = {
- .name = "setts",
- .priv_data_size = sizeof(SetTSContext),
- .priv_class = &setts_class,
- .init = setts_init,
- .close = setts_close,
- .filter = setts_filter,
-};
diff --git a/libavcodec/sga.c b/libavcodec/sga.c
deleted file mode 100644
index 00752a5..0000000
--- a/libavcodec/sga.c
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-#include "libavutil/avassert.h"
-#include "libavutil/common.h"
-#include "avcodec.h"
-#include "get_bits.h"
-#include "bytestream.h"
-#include "internal.h"
-
-#define PALDATA_FOLLOWS_TILEDATA 4
-#define HAVE_COMPRESSED_TILEMAP 32
-#define HAVE_TILEMAP 128
-
-typedef struct SGAVideoContext {
- GetByteContext gb;
-
- int metadata_size;
- int tiledata_size;
- int tiledata_offset;
- int tilemapdata_size;
- int tilemapdata_offset;
- int paldata_size;
- int paldata_offset;
- int palmapdata_offset;
- int palmapdata_size;
-
- int flags;
- int nb_pal;
- int nb_tiles;
- int tiles_w, tiles_h;
- int shift;
- int plus;
- int swap;
-
- uint32_t pal[256];
- uint8_t *tileindex_data;
- unsigned tileindex_size;
- uint8_t *palmapindex_data;
- unsigned palmapindex_size;
- uint8_t uncompressed[65536];
-} SGAVideoContext;
-
-static av_cold int sga_decode_init(AVCodecContext *avctx)
-{
- avctx->pix_fmt = AV_PIX_FMT_PAL8;
- return 0;
-}
-
-static int decode_palette(GetByteContext *gb, uint32_t *pal)
-{
- GetBitContext gbit;
-
- if (bytestream2_get_bytes_left(gb) < 18)
- return AVERROR_INVALIDDATA;
-
- memset(pal, 0, 16 * sizeof(*pal));
- init_get_bits8(&gbit, gb->buffer, 18);
-
- for (int RGBIndex = 0; RGBIndex < 3; RGBIndex++) {
- for (int index = 0; index < 16; index++) {
- unsigned color = get_bits1(&gbit) << RGBIndex;
- pal[15 - index] |= color << (5 + 16);
- }
- }
-
- for (int RGBIndex = 0; RGBIndex < 3; RGBIndex++) {
- for (int index = 0; index < 16; index++) {
- unsigned color = get_bits1(&gbit) << RGBIndex;
- pal[15 - index] |= color << (5 + 8);
- }
- }
-
- for (int RGBIndex = 0; RGBIndex < 3; RGBIndex++) {
- for (int index = 0; index < 16; index++) {
- unsigned color = get_bits1(&gbit) << RGBIndex;
- pal[15 - index] |= color << (5 + 0);
- }
- }
-
- for (int index = 0; index < 16; index++)
- pal[index] = (0xFFU << 24) | pal[index] | (pal[index] >> 3);
-
- bytestream2_skip(gb, 18);
-
- return 0;
-}
-
-static int decode_index_palmap(SGAVideoContext *s, AVFrame *frame)
-{
- const uint8_t *tt = s->tileindex_data;
-
- for (int y = 0; y < s->tiles_h; y++) {
- for (int x = 0; x < s->tiles_w; x++) {
- int pal_idx = s->palmapindex_data[y * s->tiles_w + x] * 16;
- uint8_t *dst = frame->data[0] + y * 8 * frame->linesize[0] + x * 8;
-
- for (int yy = 0; yy < 8; yy++) {
- for (int xx = 0; xx < 8; xx++)
- dst[xx] = pal_idx + tt[xx];
- tt += 8;
-
- dst += frame->linesize[0];
- }
- }
- }
-
- return 0;
-}
-
-static int decode_index_tilemap(SGAVideoContext *s, AVFrame *frame)
-{
- GetByteContext *gb = &s->gb;
- GetBitContext pm;
-
- bytestream2_seek(gb, s->tilemapdata_offset, SEEK_SET);
- if (bytestream2_get_bytes_left(gb) < s->tilemapdata_size)
- return AVERROR_INVALIDDATA;
-
- init_get_bits8(&pm, gb->buffer, s->tilemapdata_size);
-
- for (int y = 0; y < s->tiles_h; y++) {
- for (int x = 0; x < s->tiles_w; x++) {
- uint8_t tile[64];
- int tilemap = get_bits(&pm, 16);
- int flip_x = (tilemap >> 11) & 1;
- int flip_y = (tilemap >> 12) & 1;
- int tindex = av_clip((tilemap & 511) - 1, 0, s->nb_tiles - 1);
- const uint8_t *tt = s->tileindex_data + tindex * 64;
- int pal_idx = ((tilemap >> 13) & 3) * 16;
- uint8_t *dst = frame->data[0] + y * 8 * frame->linesize[0] + x * 8;
-
- if (!flip_x && !flip_y) {
- memcpy(tile, tt, 64);
- } else if (flip_x && flip_y) {
- for (int i = 0; i < 8; i++) {
- for (int j = 0; j < 8; j++)
- tile[i * 8 + j] = tt[(7 - i) * 8 + 7 - j];
- }
- } else if (flip_x) {
- for (int i = 0; i < 8; i++) {
- for (int j = 0; j < 8; j++)
- tile[i * 8 + j] = tt[i * 8 + 7 - j];
- }
- } else {
- for (int i = 0; i < 8; i++) {
- for (int j = 0; j < 8; j++)
- tile[i * 8 + j] = tt[(7 - i) * 8 + j];
- }
- }
-
- for (int yy = 0; yy < 8; yy++) {
- for (int xx = 0; xx < 8; xx++)
- dst[xx] = pal_idx + tile[xx + yy * 8];
-
- dst += frame->linesize[0];
- }
- }
- }
-
- return 0;
-}
-
-static int decode_index(SGAVideoContext *s, AVFrame *frame)
-{
- const uint8_t *src = s->tileindex_data;
- uint8_t *dst = frame->data[0];
-
- for (int y = 0; y < frame->height; y += 8) {
- for (int x = 0; x < frame->width; x += 8) {
- for (int yy = 0; yy < 8; yy++) {
- for (int xx = 0; xx < 8; xx++)
- dst[x + xx + yy * frame->linesize[0]] = src[xx];
- src += 8;
- }
- }
-
- dst += 8 * frame->linesize[0];
- }
-
- return 0;
-}
-
-static int lzss_decompress(AVCodecContext *avctx,
- GetByteContext *gb, uint8_t *dst,
- int dst_size, int shift, int plus)
-{
- int oi = 0;
-
- while (bytestream2_get_bytes_left(gb) > 0 && oi < dst_size) {
- uint16_t displace, header = bytestream2_get_be16(gb);
- int count, offset;
-
- for (int i = 0; i < 16; i++) {
- switch (header >> 15) {
- case 0:
- if (oi + 2 < dst_size) {
- dst[oi++] = bytestream2_get_byte(gb);
- dst[oi++] = bytestream2_get_byte(gb);
- }
- break;
- case 1:
- displace = bytestream2_get_be16(gb);
- count = displace >> shift;
- offset = displace & ((1 << shift) - 1);
-
- if (displace == 0) {
- while (bytestream2_get_bytes_left(gb) > 0 &&
- oi < dst_size)
- dst[oi++] = bytestream2_get_byte(gb);
- return oi;
- }
-
- count += plus;
-
- if (offset <= 0)
- offset = 1;
- if (oi < offset)
- return AVERROR_INVALIDDATA;
- for (int j = 0; j < count * 2; j++) {
- dst[oi] = dst[oi - offset];
- oi++;
- }
- break;
- }
-
- header <<= 1;
- }
- }
-
- return AVERROR_INVALIDDATA;
-}
-
-static int decode_palmapdata(AVCodecContext *avctx)
-{
- SGAVideoContext *s = avctx->priv_data;
- const int bits = (s->nb_pal + 1) / 2;
- GetByteContext *gb = &s->gb;
- GetBitContext pm;
-
- bytestream2_seek(gb, s->palmapdata_offset, SEEK_SET);
- if (bytestream2_get_bytes_left(gb) < s->palmapdata_size)
- return AVERROR_INVALIDDATA;
- init_get_bits8(&pm, gb->buffer, s->palmapdata_size);
-
- for (int y = 0; y < s->tiles_h; y++) {
- uint8_t *dst = s->palmapindex_data + y * s->tiles_w;
-
- for (int x = 0; x < s->tiles_w; x++)
- dst[x] = get_bits(&pm, bits);
-
- dst += s->tiles_w;
- }
-
- return 0;
-}
-
-static int decode_tiledata(AVCodecContext *avctx)
-{
- SGAVideoContext *s = avctx->priv_data;
- GetByteContext *gb = &s->gb;
- GetBitContext tm;
-
- bytestream2_seek(gb, s->tiledata_offset, SEEK_SET);
- if (bytestream2_get_bytes_left(gb) < s->tiledata_size)
- return AVERROR_INVALIDDATA;
- init_get_bits8(&tm, gb->buffer, s->tiledata_size);
-
- for (int n = 0; n < s->nb_tiles; n++) {
- uint8_t *dst = s->tileindex_data + n * 64;
-
- for (int yy = 0; yy < 8; yy++) {
- for (int xx = 0; xx < 8; xx++)
- dst[xx] = get_bits(&tm, 4);
-
- dst += 8;
- }
- }
-
- for (int i = 0; i < s->nb_tiles && s->swap; i++) {
- uint8_t *dst = s->tileindex_data + i * 64;
-
- for (int j = 8; j < 64; j += 16) {
- for (int k = 0; k < 8; k += 2)
- FFSWAP(uint8_t, dst[j + k], dst[j+k+1]);
- }
- }
-
- return 0;
-}
-
-static int sga_decode_frame(AVCodecContext *avctx, void *data,
- int *got_frame, AVPacket *avpkt)
-{
- SGAVideoContext *s = avctx->priv_data;
- GetByteContext *gb = &s->gb;
- AVFrame *frame = data;
- int ret, type;
-
- if (avpkt->size <= 14)
- return AVERROR_INVALIDDATA;
-
- s->flags = avpkt->data[8];
- s->nb_pal = avpkt->data[9];
- s->tiles_w = avpkt->data[10];
- s->tiles_h = avpkt->data[11];
-
- if (s->nb_pal > 4)
- return AVERROR_INVALIDDATA;
-
- if ((ret = ff_set_dimensions(avctx,
- s->tiles_w * 8,
- s->tiles_h * 8)) < 0)
- return ret;
-
- av_fast_padded_malloc(&s->tileindex_data, &s->tileindex_size,
- avctx->width * avctx->height);
- if (!s->tileindex_data)
- return AVERROR(ENOMEM);
-
- av_fast_padded_malloc(&s->palmapindex_data, &s->palmapindex_size,
- s->tiles_w * s->tiles_h);
- if (!s->palmapindex_data)
- return AVERROR(ENOMEM);
-
- if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
- return ret;
-
- bytestream2_init(gb, avpkt->data, avpkt->size);
-
- type = bytestream2_get_byte(gb);
- s->metadata_size = 12 + ((!!(s->flags & HAVE_TILEMAP)) * 2);
- s->nb_tiles = s->flags & HAVE_TILEMAP ? AV_RB16(avpkt->data + 12) : s->tiles_w * s->tiles_h;
- if (s->nb_tiles > s->tiles_w * s->tiles_h)
- return AVERROR_INVALIDDATA;
-
- av_log(avctx, AV_LOG_DEBUG, "type: %X flags: %X nb_tiles: %d\n", type, s->flags, s->nb_tiles);
-
- switch (type) {
- case 0xE7:
- case 0xCB:
- case 0xCD:
- s->swap = 1;
- s->shift = 12;
- s->plus = 1;
- break;
- case 0xC9:
- s->swap = 1;
- s->shift = 13;
- s->plus = 1;
- break;
- case 0xC8:
- s->swap = 1;
- s->shift = 13;
- s->plus = 0;
- break;
- case 0xC7:
- s->swap = 0;
- s->shift = 13;
- s->plus = 1;
- break;
- case 0xC6:
- s->swap = 0;
- s->shift = 13;
- s->plus = 0;
- break;
- }
-
- if (type == 0xE7) {
- int offset = s->metadata_size, left;
- int sizes[3];
-
- bytestream2_seek(gb, s->metadata_size, SEEK_SET);
-
- for (int i = 0; i < 3; i++)
- sizes[i] = bytestream2_get_be16(gb);
-
- for (int i = 0; i < 3; i++) {
- int size = sizes[i];
- int raw = size >> 15;
-
- size &= (1 << 15) - 1;
-
- if (raw) {
- if (bytestream2_get_bytes_left(gb) < size)
- return AVERROR_INVALIDDATA;
-
- if (sizeof(s->uncompressed) - offset < size)
- return AVERROR_INVALIDDATA;
-
- memcpy(s->uncompressed + offset, gb->buffer, size);
- bytestream2_skip(gb, size);
- } else {
- GetByteContext gb2;
-
- if (bytestream2_get_bytes_left(gb) < size)
- return AVERROR_INVALIDDATA;
-
- bytestream2_init(&gb2, gb->buffer, size);
- ret = lzss_decompress(avctx, &gb2, s->uncompressed + offset,
- sizeof(s->uncompressed) - offset, s->shift, s->plus);
- if (ret < 0)
- return ret;
- bytestream2_skip(gb, size);
- size = ret;
- }
-
- offset += size;
- }
-
- left = bytestream2_get_bytes_left(gb);
- if (sizeof(s->uncompressed) - offset < left)
- return AVERROR_INVALIDDATA;
-
- bytestream2_get_buffer(gb, s->uncompressed + offset, left);
-
- offset += left;
- bytestream2_init(gb, s->uncompressed, offset);
- }
-
- switch (type) {
- case 0xCD:
- case 0xCB:
- case 0xC9:
- case 0xC8:
- case 0xC7:
- case 0xC6:
- bytestream2_seek(gb, s->metadata_size, SEEK_SET);
- ret = lzss_decompress(avctx, gb, s->uncompressed + s->metadata_size,
- sizeof(s->uncompressed) - s->metadata_size, s->shift, s->plus);
- if (ret < 0)
- return ret;
- bytestream2_init(gb, s->uncompressed, ret + s->metadata_size);
- case 0xE7:
- case 0xC1:
- s->tiledata_size = s->nb_tiles * 32;
- s->paldata_size = s->nb_pal * 18;
- s->tiledata_offset = s->flags & PALDATA_FOLLOWS_TILEDATA ? s->metadata_size : s->metadata_size + s->paldata_size;
- s->paldata_offset = s->flags & PALDATA_FOLLOWS_TILEDATA ? s->metadata_size + s->tiledata_size : s->metadata_size;
- s->palmapdata_offset = (s->flags & HAVE_TILEMAP) ? -1 : s->paldata_offset + s->paldata_size;
- s->palmapdata_size = (s->flags & HAVE_TILEMAP) || s->nb_pal < 2 ? 0 : (s->tiles_w * s->tiles_h * ((s->nb_pal + 1) / 2) + 7) / 8;
- s->tilemapdata_size = (s->flags & HAVE_TILEMAP) ? s->tiles_w * s->tiles_h * 2 : 0;
- s->tilemapdata_offset = (s->flags & HAVE_TILEMAP) ? s->paldata_offset + s->paldata_size: -1;
-
- bytestream2_seek(gb, s->paldata_offset, SEEK_SET);
- for (int n = 0; n < s->nb_pal; n++) {
- ret = decode_palette(gb, s->pal + 16 * n);
- if (ret < 0)
- return ret;
- }
-
- if (s->tiledata_size > 0) {
- ret = decode_tiledata(avctx);
- if (ret < 0)
- return ret;
- }
-
- if (s->palmapdata_size > 0) {
- ret = decode_palmapdata(avctx);
- if (ret < 0)
- return ret;
- }
-
- if (s->palmapdata_size > 0 && s->tiledata_size > 0) {
- ret = decode_index_palmap(s, frame);
- if (ret < 0)
- return ret;
- } else if (s->tilemapdata_size > 0 && s->tiledata_size > 0) {
- ret = decode_index_tilemap(s, frame);
- if (ret < 0)
- return ret;
- } else if (s->tiledata_size > 0) {
- ret = decode_index(s, frame);
- if (ret < 0)
- return ret;
- }
- break;
- default:
- av_log(avctx, AV_LOG_ERROR, "Unknown type: %X\n", type);
- return AVERROR_INVALIDDATA;
- }
-
- memcpy(frame->data[1], s->pal, AVPALETTE_SIZE);
- frame->palette_has_changed = 1;
- frame->pict_type = AV_PICTURE_TYPE_I;
- frame->key_frame = 1;
-
- *got_frame = 1;
-
- return avpkt->size;
-}
-
-static av_cold int sga_decode_end(AVCodecContext *avctx)
-{
- SGAVideoContext *s = avctx->priv_data;
-
- av_freep(&s->tileindex_data);
- s->tileindex_size = 0;
-
- av_freep(&s->palmapindex_data);
- s->palmapindex_size = 0;
-
- return 0;
-}
-
-AVCodec ff_sga_decoder = {
- .name = "sga",
- .long_name = NULL_IF_CONFIG_SMALL("Digital Pictures SGA Video"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_SGA_VIDEO,
- .priv_data_size = sizeof(SGAVideoContext),
- .init = sga_decode_init,
- .decode = sga_decode_frame,
- .close = sga_decode_end,
- .capabilities = AV_CODEC_CAP_DR1,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
-};
diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index 0ef1674..3b2e736 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -175,8 +175,7 @@
#define R_SHIFT 11
static inline void idct4row(int16_t *row)
{
- unsigned c0, c1, c2, c3;
- int a0, a1, a2, a3;
+ int c0, c1, c2, c3, a0, a1, a2, a3;
a0 = row[0];
a1 = row[1];
diff --git a/libavcodec/sinewin.c b/libavcodec/sinewin.c
index 1fa0e95..4532dc7 100644
--- a/libavcodec/sinewin.c
+++ b/libavcodec/sinewin.c
@@ -16,5 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#define USE_FIXED 0
#include "sinewin.h"
#include "sinewin_tablegen.h"
diff --git a/libavcodec/sinewin.h b/libavcodec/sinewin.h
index fc4e69a..1348740 100644
--- a/libavcodec/sinewin.h
+++ b/libavcodec/sinewin.h
@@ -22,7 +22,8 @@
#define AVCODEC_SINEWIN_H
#include "config.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
+#include "libavcodec/aac_defines.h"
#if CONFIG_HARDCODED_TABLES
# define SINETABLE_CONST const
@@ -30,20 +31,24 @@
# define SINETABLE_CONST
#endif
+#ifndef USE_FIXED
+#define USE_FIXED 0
+#endif
+
#define SINETABLE(size) \
- SINETABLE_CONST DECLARE_ALIGNED(32, float, ff_sine_##size)[size]
+ SINETABLE_CONST DECLARE_ALIGNED(32, INTFLOAT, AAC_RENAME(ff_sine_##size))[size]
/**
* Generate a sine window.
* @param window pointer to half window
* @param n size of half window
*/
-void ff_sine_window_init(float *window, int n);
+void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n);
/**
* initialize the specified entry of ff_sine_windows
*/
-void ff_init_ff_sine_windows(int index);
+void AAC_RENAME(ff_init_ff_sine_windows)(int index);
extern SINETABLE( 32);
extern SINETABLE( 64);
@@ -55,6 +60,6 @@
extern SINETABLE(4096);
extern SINETABLE(8192);
-extern SINETABLE_CONST float *const ff_sine_windows[];
+extern SINETABLE_CONST INTFLOAT * const AAC_RENAME(ff_sine_windows)[];
#endif /* AVCODEC_SINEWIN_H */
diff --git a/libavcodec/ttmlenc.h b/libavcodec/sinewin_fixed.c
similarity index 71%
copy from libavcodec/ttmlenc.h
copy to libavcodec/sinewin_fixed.c
index c1dd5ec..27ead29 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/sinewin_fixed.c
@@ -1,7 +1,4 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
- *
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@@ -19,10 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
-
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
-
-#endif /* AVCODEC_TTMLENC_H */
+#define USE_FIXED 1
+#include "sinewin.h"
+#include "sinewin_tablegen.h"
diff --git a/libavcodec/sinewin_fixed_tablegen.c b/libavcodec/sinewin_fixed_tablegen.c
index 61e5274..977e6f3 100644
--- a/libavcodec/sinewin_fixed_tablegen.c
+++ b/libavcodec/sinewin_fixed_tablegen.c
@@ -20,23 +20,5 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "tableprint.h"
-
-#define BUILD_TABLES
-#define CONFIG_HARDCODED_TABLES 0
-#include "sinewin_fixed_tablegen.h"
-
-int main(void)
-{
- write_fileheader();
-
- init_sine_windows_fixed();
-#define PRINT_TABLE(size) \
- printf("SINETABLE("#size") = {\n"); \
- write_int32_t_array(sine_ ## size ## _fixed, size); \
- printf("};\n")
- PRINT_TABLE(128);
- PRINT_TABLE(512);
- PRINT_TABLE(1024);
- return 0;
-}
+#define USE_FIXED 1
+#include "sinewin_tablegen_template.c"
diff --git a/libavcodec/sinewin_fixed_tablegen.h b/libavcodec/sinewin_fixed_tablegen.h
deleted file mode 100644
index c52c90b..0000000
--- a/libavcodec/sinewin_fixed_tablegen.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Header file for hardcoded sine windows
- *
- * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
- *
- * 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 AVCODEC_SINEWIN_FIXED_TABLEGEN_H
-#define AVCODEC_SINEWIN_FIXED_TABLEGEN_H
-
-#ifdef BUILD_TABLES
-#undef DECLARE_ALIGNED
-#define DECLARE_ALIGNED(align, type, name) type name
-#else
-#include "libavutil/mem_internal.h"
-#endif
-
-#define SINETABLE(size) \
- static SINETABLE_CONST DECLARE_ALIGNED(32, int, sine_##size##_fixed)[size]
-
-#if CONFIG_HARDCODED_TABLES
-#define init_sine_windows_fixed()
-#define SINETABLE_CONST const
-#include "libavcodec/sinewin_fixed_tables.h"
-#else
-// do not use libavutil/libm.h since this is compiled both
-// for the host and the target and config.h is only valid for the target
-#include <math.h>
-#include "libavutil/attributes.h"
-
-#define SINETABLE_CONST
-SINETABLE( 128);
-SINETABLE( 512);
-SINETABLE(1024);
-
-#define SIN_FIX(a) (int)floor((a) * 0x80000000 + 0.5)
-
-// Generate a sine window.
-static av_cold void sine_window_init_fixed(int *window, int n)
-{
- for (int i = 0; i < n; i++)
- window[i] = SIN_FIX(sinf((i + 0.5) * (M_PI / (2.0 * n))));
-}
-
-static av_cold void init_sine_windows_fixed(void)
-{
- sine_window_init_fixed(sine_128_fixed, 128);
- sine_window_init_fixed(sine_512_fixed, 512);
- sine_window_init_fixed(sine_1024_fixed, 1024);
-}
-#endif /* CONFIG_HARDCODED_TABLES */
-#endif /* AVCODEC_SINEWIN_FIXED_TABLEGEN_H */
diff --git a/libavcodec/sinewin_tablegen.c b/libavcodec/sinewin_tablegen.c
index 438030e..dd60266 100644
--- a/libavcodec/sinewin_tablegen.c
+++ b/libavcodec/sinewin_tablegen.c
@@ -20,26 +20,5 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#define CONFIG_HARDCODED_TABLES 0
-#define BUILD_TABLES
-
-#define SINETABLE_CONST
-#define SINETABLE(size) \
- float ff_sine_##size[size]
-#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
-#include "sinewin_tablegen.h"
-#include "tableprint.h"
-
-int main(void)
-{
- write_fileheader();
-
- for (int i = 5; i <= 13; i++) {
- ff_init_ff_sine_windows(i);
- printf("SINETABLE(%4i) = {\n", 1 << i);
- write_float_array(ff_sine_windows[i], 1 << i);
- printf("};\n");
- }
-
- return 0;
-}
+#define USE_FIXED 0
+#include "sinewin_tablegen_template.c"
diff --git a/libavcodec/sinewin_tablegen.h b/libavcodec/sinewin_tablegen.h
index 6887d59..ced3b78 100644
--- a/libavcodec/sinewin_tablegen.h
+++ b/libavcodec/sinewin_tablegen.h
@@ -27,6 +27,7 @@
// do not use libavutil/libm.h since this is compiled both
// for the host and the target and config.h is only valid for the target
#include <math.h>
+#include "libavcodec/aac_defines.h"
#include "libavutil/attributes.h"
#include "libavutil/common.h"
@@ -45,29 +46,38 @@
SINETABLE(4096);
SINETABLE(8192);
#else
+#if USE_FIXED
+#include "libavcodec/sinewin_fixed_tables.h"
+#else
#include "libavcodec/sinewin_tables.h"
#endif
+#endif
-SINETABLE_CONST float *const ff_sine_windows[] = {
+#if USE_FIXED
+#define SIN_FIX(a) (int)floor((a) * 0x80000000 + 0.5)
+#else
+#define SIN_FIX(a) a
+#endif
+
+SINETABLE_CONST INTFLOAT * const AAC_RENAME(ff_sine_windows)[] = {
NULL, NULL, NULL, NULL, NULL, // unused
- ff_sine_32, ff_sine_64, ff_sine_128,
- ff_sine_256, ff_sine_512, ff_sine_1024,
- ff_sine_2048, ff_sine_4096, ff_sine_8192,
+ AAC_RENAME(ff_sine_32) , AAC_RENAME(ff_sine_64), AAC_RENAME(ff_sine_128),
+ AAC_RENAME(ff_sine_256), AAC_RENAME(ff_sine_512), AAC_RENAME(ff_sine_1024),
+ AAC_RENAME(ff_sine_2048), AAC_RENAME(ff_sine_4096), AAC_RENAME(ff_sine_8192),
};
// Generate a sine window.
-av_cold void ff_sine_window_init(float *window, int n)
-{
+av_cold void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n) {
int i;
for(i = 0; i < n; i++)
- window[i] = sinf((i + 0.5) * (M_PI / (2.0 * n)));
+ window[i] = SIN_FIX(sinf((i + 0.5) * (M_PI / (2.0 * n))));
}
#if !CONFIG_HARDCODED_TABLES && !defined(BUILD_TABLES)
#define INIT_FF_SINE_WINDOW_INIT_FUNC(index) \
static void init_ff_sine_window_ ## index(void) \
{ \
- ff_sine_window_init(ff_sine_windows[index], 1 << index);\
+ AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index);\
}
INIT_FF_SINE_WINDOW_INIT_FUNC(5)
@@ -98,12 +108,11 @@
};
#endif
-av_cold void ff_init_ff_sine_windows(int index)
-{
- assert(index >= 5 && index < FF_ARRAY_ELEMS(ff_sine_windows));
+av_cold void AAC_RENAME(ff_init_ff_sine_windows)(int index) {
+ assert(index >= 5 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows)));
#if !CONFIG_HARDCODED_TABLES
#ifdef BUILD_TABLES
- ff_sine_window_init(ff_sine_windows[index], 1 << index);
+ AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index);
#else
ff_thread_once(&init_sine_window_once[index - 5], sine_window_init_func_array[index - 5]);
#endif
diff --git a/libavcodec/sinewin_tablegen_template.c b/libavcodec/sinewin_tablegen_template.c
new file mode 100644
index 0000000..7c3c1d8
--- /dev/null
+++ b/libavcodec/sinewin_tablegen_template.c
@@ -0,0 +1,55 @@
+/*
+ * Generate a header file for hardcoded sine windows
+ *
+ * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
+ *
+ * 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
+ */
+
+#include <stdlib.h>
+#include "libavcodec/aac_defines.h"
+#define CONFIG_HARDCODED_TABLES 0
+#define BUILD_TABLES
+
+#if USE_FIXED
+#define WRITE_FUNC write_int32_t_array
+#else
+#define WRITE_FUNC write_float_array
+#endif
+
+#define SINETABLE_CONST
+#define SINETABLE(size) \
+ INTFLOAT AAC_RENAME(ff_sine_##size)[size]
+#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
+#include "sinewin_tablegen.h"
+#include "tableprint.h"
+
+int main(void)
+{
+ int i;
+
+ write_fileheader();
+
+ for (i = 5; i <= 13; i++) {
+ AAC_RENAME(ff_init_ff_sine_windows)(i);
+ printf("SINETABLE(%4i) = {\n", 1 << i);
+ WRITE_FUNC(AAC_RENAME(ff_sine_windows)[i], 1 << i);
+ printf("};\n");
+ }
+
+ return 0;
+}
diff --git a/libavcodec/sipr.h b/libavcodec/sipr.h
index e1ef35d..34f7f99 100644
--- a/libavcodec/sipr.h
+++ b/libavcodec/sipr.h
@@ -26,7 +26,7 @@
#include "avcodec.h"
#include "acelp_pitch_delay.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#define LP_FILTER_ORDER_16k 16
#define L_SUBFR_16k 80
diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 22b6997..b1b4944 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -23,7 +23,6 @@
#include "libavutil/tx.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -342,18 +341,17 @@
{ 0.0f, 1.964f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }
};
-static const float noise_category5[21] = {
+static const float noise_category5[20] = {
0.70711f, 0.6179f, 0.5005f, 0.3220f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f,
0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f, 0.17678f
};
-static const float noise_category6[21] = {
+static const float noise_category6[20] = {
0.70711f, 0.5686f, 0.3563f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f,
0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f, 0.25f
};
#define FRAME_SIZE 320
-#define REGION_SIZE 20
typedef struct SirenContext {
GetBitContext gb;
@@ -363,6 +361,7 @@
int number_of_regions;
int scale_factor;
int sample_rate_bits;
+ int region_size;
unsigned dw1, dw2, dw3, dw4;
@@ -403,6 +402,7 @@
s->esf_adjustment = 7;
s->number_of_regions = 14;
s->scale_factor = 22;
+ s->region_size = 20;
s->dw1 = s->dw2 = s->dw3 = s->dw4 = 1;
for (i = 0; i < 64; i++) {
@@ -574,7 +574,7 @@
for (region = 0; region < number_of_regions; region++) {
category = power_categories[region];
- coefs_ptr = coefs + (region * REGION_SIZE);
+ coefs_ptr = coefs + (region * s->region_size);
if (category >= 0 && category < 7) {
decoder_tree = decoder_tables[category];
@@ -623,27 +623,32 @@
}
}
- coefs_ptr = coefs + (region * REGION_SIZE);
+ coefs_ptr = coefs + (region * s->region_size);
- if (category == 5 || category == 6) {
+ if (category == 5) {
i = 0;
- for (j = 0; j < REGION_SIZE; j++) {
+ for (j = 0; j < s->region_size; j++) {
if (*coefs_ptr != 0)
i++;
coefs_ptr++;
}
- if (category == 5) {
- noise = decoder_standard_deviation[region] * noise_category5[i];
- } else
- noise = decoder_standard_deviation[region] * noise_category6[i];
+ noise = decoder_standard_deviation[region] * noise_category5[i];
+ } else if (category == 6) {
+ i = 0;
+ for (j = 0; j < s->region_size; j++) {
+ if (*coefs_ptr++ != 0)
+ i++;
+ }
+
+ noise = decoder_standard_deviation[region] * noise_category6[i];
} else if (category == 7) {
noise = decoder_standard_deviation[region] * 0.70711f;
} else {
noise = 0;
}
- coefs_ptr = coefs + (region * REGION_SIZE);
+ coefs_ptr = coefs + (region * s->region_size);
if (category == 5 || category == 6 || category == 7) {
dw1 = get_dw(s);
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 33581bb..342ebb7 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -435,7 +435,7 @@
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
SmcContext *s = avctx->priv_data;
- buffer_size_t pal_size;
+ int pal_size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &pal_size);
int ret;
int total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4);
diff --git a/libavcodec/sp5x.h b/libavcodec/sp5x.h
index d84d851..21c4571 100644
--- a/libavcodec/sp5x.h
+++ b/libavcodec/sp5x.h
@@ -132,8 +132,58 @@
};
-static const uint8_t sp5x_qscale_five_quant_table[][64]=
+static const uint8_t sp5x_quant_table[20][64]=
{
+ /* index 0, Q50 */
+ { 16, 11, 12, 14, 12, 10, 16, 14, 13, 14, 18, 17, 16, 19, 24, 40,
+ 26, 24, 22, 22, 24, 49, 35, 37, 29, 40, 58, 51, 61, 60, 57, 51,
+ 56, 55, 64, 72, 92, 78, 64, 68, 87, 69, 55, 56, 80,109, 81, 87,
+ 95, 98,103,104,103, 62, 77,113,121,112,100,120, 92,101,103, 99 },
+ { 17, 18, 18, 24, 21, 24, 47, 26, 26, 47, 99, 66, 56, 66, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
+ 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 },
+
+ /* index 1, Q70 */
+ { 10, 7, 7, 8, 7, 6, 10, 8, 8, 8, 11, 10, 10, 11, 14, 24,
+ 16, 14, 13, 13, 14, 29, 21, 22, 17, 24, 35, 31, 37, 36, 34, 31,
+ 34, 33, 38, 43, 55, 47, 38, 41, 52, 41, 33, 34, 48, 65, 49, 52,
+ 57, 59, 62, 62, 62, 37, 46, 68, 73, 67, 60, 72, 55, 61, 62, 59 },
+ { 10, 11, 11, 14, 13, 14, 28, 16, 16, 28, 59, 40, 34, 40, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
+ 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 },
+
+ /* index 2, Q80 */
+ { 6, 4, 5, 6, 5, 4, 6, 6, 5, 6, 7, 7, 6, 8, 10, 16,
+ 10, 10, 9, 9, 10, 20, 14, 15, 12, 16, 23, 20, 24, 24, 23, 20,
+ 22, 22, 26, 29, 37, 31, 26, 27, 35, 28, 22, 22, 32, 44, 32, 35,
+ 38, 39, 41, 42, 41, 25, 31, 45, 48, 45, 40, 48, 37, 40, 41, 40 },
+ { 7, 7, 7, 10, 8, 10, 19, 10, 10, 19, 40, 26, 22, 26, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40 },
+
+ /* index 3, Q85 */
+ { 5, 3, 4, 4, 4, 3, 5, 4, 4, 4, 5, 5, 5, 6, 7, 12,
+ 8, 7, 7, 7, 7, 15, 11, 11, 9, 12, 17, 15, 18, 18, 17, 15,
+ 17, 17, 19, 22, 28, 23, 19, 20, 26, 21, 17, 17, 24, 33, 24, 26,
+ 29, 29, 31, 31, 31, 19, 23, 34, 36, 34, 30, 36, 28, 30, 31, 30 },
+ { 5, 5, 5, 7, 6, 7, 14, 8, 8, 14, 30, 20, 17, 20, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 },
+
+ /* index 4, Q90 */
+ { 3, 2, 2, 3, 2, 2, 3, 3, 3, 3, 4, 3, 3, 4, 5, 8,
+ 5, 5, 4, 4, 5, 10, 7, 7, 6, 8, 12, 10, 12, 12, 11, 10,
+ 11, 11, 13, 14, 18, 16, 13, 14, 17, 14, 11, 11, 16, 22, 16, 17,
+ 19, 20, 21, 21, 21, 12, 15, 23, 24, 22, 20, 24, 18, 20, 21, 20 },
+ { 3, 4, 4, 5, 4, 5, 9, 5, 5, 9, 20, 13, 11, 13, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 },
+
/* index 5, Q60 */
{ 13, 9, 10, 11, 10, 8, 13, 11, 10, 11, 14, 14, 13, 15, 19, 32,
21, 19, 18, 18, 19, 39, 28, 30, 23, 32, 46, 41, 49, 48, 46, 41,
@@ -143,6 +193,46 @@
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 },
+
+ /* index 6, Q25 */
+ { 32, 22, 24, 28, 24, 20, 32, 28, 26, 28, 36, 34, 32, 38, 48, 80,
+ 52, 48, 44, 44, 48, 98, 70, 74, 58, 80,116,102,122,120,114,102,
+ 112,110,128,144,184,156,128,136,174,138,110,112,160,218,162,174,
+ 190,196,206,208,206,124,154,226,242,224,200,240,184,202,206,198 },
+ { 34, 36, 36, 48, 42, 48, 94, 52, 52, 94,198,132,112,132,198,198,
+ 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
+ 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
+ 198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198 },
+
+ /* index 7, Q95 */
+ { 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 4,
+ 3, 2, 2, 2, 2, 5, 4, 4, 3, 4, 6, 5, 6, 6, 6, 5,
+ 6, 6, 6, 7, 9, 8, 6, 7, 9, 7, 6, 6, 8, 11, 8, 9,
+ 10, 10, 10, 10, 10, 6, 8, 11, 12, 11, 10, 12, 9, 10, 10, 10 },
+ { 2, 2, 2, 2, 2, 2, 5, 3, 3, 5, 10, 7, 6, 7, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
+
+ /* index 8, Q93 */
+ { 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 6,
+ 4, 3, 3, 3, 3, 7, 5, 5, 4, 6, 8, 7, 9, 8, 8, 7,
+ 8, 8, 9, 10, 13, 11, 9, 10, 12, 10, 8, 8, 11, 15, 11, 12,
+ 13, 14, 14, 15, 14, 9, 11, 16, 17, 16, 14, 17, 13, 14, 14, 14 },
+ { 2, 3, 3, 3, 3, 3, 7, 4, 4, 7, 14, 9, 8, 9, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 },
+
+ /* index 9, Q40 */
+ { 20, 14, 15, 18, 15, 13, 20, 18, 16, 18, 23, 21, 20, 24, 30, 50,
+ 33, 30, 28, 28, 30, 61, 44, 46, 36, 50, 73, 64, 76, 75, 71, 64,
+ 70, 69, 80, 90,115, 98, 80, 85,109, 86, 69, 70,100,136,101,109,
+ 119,123,129,130,129, 78, 96,141,151,140,125,150,115,126,129,124 },
+ { 21, 23, 23, 30, 26, 30, 59, 33, 33, 59,124, 83, 70, 83,124,124,
+ 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,
+ 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,
+ 124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124 }
};
#endif /* AVCODEC_SP5X_H */
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index 0b2b2d8..302fdb0 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -35,6 +35,7 @@
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
AVBufferRef *buf_recoded;
+ const int qscale = 5;
uint8_t *recoded;
int i = 0, j = 0;
@@ -51,8 +52,8 @@
recoded[j++] = 0xD8;
memcpy(recoded+j, &sp5x_data_dqt[0], sizeof(sp5x_data_dqt));
- memcpy(recoded + j + 5, &sp5x_qscale_five_quant_table[0], 64);
- memcpy(recoded + j + 70, &sp5x_qscale_five_quant_table[1], 64);
+ memcpy(recoded+j+5, &sp5x_quant_table[qscale * 2], 64);
+ memcpy(recoded+j+70, &sp5x_quant_table[(qscale * 2) + 1], 64);
j += sizeof(sp5x_data_dqt);
memcpy(recoded+j, &sp5x_data_dht[0], sizeof(sp5x_data_dht));
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 5861b7f..748e861 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -26,9 +26,7 @@
#define BITSTREAM_READER_LE
-#include "config.h"
#include "libavutil/attributes.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -137,12 +135,11 @@
RLTable ff_rl_speedhq = {
121,
121,
- speedhq_vlc,
+ (const uint16_t (*)[])speedhq_vlc,
speedhq_run,
speedhq_level,
};
-#if CONFIG_SPEEDHQ_DECODER
/* NOTE: The first element is always 16, unscaled. */
static const uint8_t unscaled_quant_matrix[64] = {
16, 16, 19, 22, 26, 27, 29, 34,
@@ -276,78 +273,6 @@
return 0;
}
-static int decode_speedhq_border(const SHQContext *s, GetBitContext *gb, AVFrame *frame, int field_number, int line_stride)
-{
- int linesize_y = frame->linesize[0] * line_stride;
- int linesize_cb = frame->linesize[1] * line_stride;
- int linesize_cr = frame->linesize[2] * line_stride;
- int linesize_a;
- int ret;
-
- if (s->alpha_type != SHQ_NO_ALPHA)
- linesize_a = frame->linesize[3] * line_stride;
-
- for (int y = 0; y < frame->height; y += 16 * line_stride) {
- int last_dc[4] = { 1024, 1024, 1024, 1024 };
- uint8_t *dest_y, *dest_cb, *dest_cr, *dest_a;
- uint8_t last_alpha[16];
- int x = frame->width - 8;
-
- dest_y = frame->data[0] + frame->linesize[0] * (y + field_number) + x;
- if (s->subsampling == SHQ_SUBSAMPLING_420) {
- dest_cb = frame->data[1] + frame->linesize[1] * (y/2 + field_number) + x / 2;
- dest_cr = frame->data[2] + frame->linesize[2] * (y/2 + field_number) + x / 2;
- } else if (s->subsampling == SHQ_SUBSAMPLING_422) {
- dest_cb = frame->data[1] + frame->linesize[1] * (y + field_number) + x / 2;
- dest_cr = frame->data[2] + frame->linesize[2] * (y + field_number) + x / 2;
- }
- if (s->alpha_type != SHQ_NO_ALPHA) {
- memset(last_alpha, 255, sizeof(last_alpha));
- dest_a = frame->data[3] + frame->linesize[3] * (y + field_number) + x;
- }
-
- if ((ret = decode_dct_block(s, gb, last_dc, 0, dest_y, linesize_y)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 0, dest_y + 8, linesize_y)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 0, dest_y + 8 * linesize_y, linesize_y)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 0, dest_y + 8 * linesize_y + 8, linesize_y)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 1, dest_cb, linesize_cb)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 2, dest_cr, linesize_cr)) < 0)
- return ret;
-
- if (s->subsampling != SHQ_SUBSAMPLING_420) {
- if ((ret = decode_dct_block(s, gb, last_dc, 1, dest_cb + 8 * linesize_cb, linesize_cb)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 2, dest_cr + 8 * linesize_cr, linesize_cr)) < 0)
- return ret;
- }
-
- if (s->alpha_type == SHQ_RLE_ALPHA) {
- /* Alpha coded using 16x8 RLE blocks. */
- if ((ret = decode_alpha_block(s, gb, last_alpha, dest_a, linesize_a)) < 0)
- return ret;
- if ((ret = decode_alpha_block(s, gb, last_alpha, dest_a + 8 * linesize_a, linesize_a)) < 0)
- return ret;
- } else if (s->alpha_type == SHQ_DCT_ALPHA) {
- /* Alpha encoded exactly like luma. */
- if ((ret = decode_dct_block(s, gb, last_dc, 3, dest_a, linesize_a)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 3, dest_a + 8, linesize_a)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 3, dest_a + 8 * linesize_a, linesize_a)) < 0)
- return ret;
- if ((ret = decode_dct_block(s, gb, last_dc, 3, dest_a + 8 * linesize_a + 8, linesize_a)) < 0)
- return ret;
- }
- }
-
- return 0;
-}
-
static int decode_speedhq_field(const SHQContext *s, const uint8_t *buf, int buf_size, AVFrame *frame, int field_number, int start, int end, int line_stride)
{
int ret, slice_number, slice_offsets[5];
@@ -355,7 +280,6 @@
int linesize_cb = frame->linesize[1] * line_stride;
int linesize_cr = frame->linesize[2] * line_stride;
int linesize_a;
- GetBitContext gb;
if (s->alpha_type != SHQ_NO_ALPHA)
linesize_a = frame->linesize[3] * line_stride;
@@ -377,6 +301,7 @@
}
for (slice_number = 0; slice_number < 4; slice_number++) {
+ GetBitContext gb;
uint32_t slice_begin, slice_end;
int x, y;
@@ -405,7 +330,7 @@
dest_a = frame->data[3] + frame->linesize[3] * (y + field_number);
}
- for (x = 0; x < frame->width - 8 * (s->subsampling != SHQ_SUBSAMPLING_444); x += 16) {
+ for (x = 0; x < frame->width; x += 16) {
/* Decode the four luma blocks. */
if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y, linesize_y)) < 0)
return ret;
@@ -474,9 +399,6 @@
}
}
- if (s->subsampling != SHQ_SUBSAMPLING_444 && (frame->width & 15))
- return decode_speedhq_border(s, &gb, frame, field_number, line_stride);
-
return 0;
}
@@ -734,4 +656,3 @@
.decode = speedhq_decode_frame,
.capabilities = AV_CODEC_CAP_DR1,
};
-#endif /* CONFIG_SPEEDHQ_DECODER */
diff --git a/libavcodec/speedhqenc.c b/libavcodec/speedhqenc.c
index a5bedd5..51f67c0 100644
--- a/libavcodec/speedhqenc.c
+++ b/libavcodec/speedhqenc.c
@@ -46,6 +46,9 @@
static uint32_t speedhq_lum_dc_uni[512];
static uint32_t speedhq_chr_dc_uni[512];
+static uint8_t speedhq_index_run[2][64];
+static int8_t speedhq_max_level[2][64];
+
static uint8_t uni_speedhq_ac_vlc_len[64 * 64 * 2];
static uint32_t reverse(uint32_t num, int bits)
@@ -74,6 +77,11 @@
ff_rl_init(&ff_rl_speedhq, speedhq_static_rl_table_store);
+ for (int i = 0; i < 64; i++) {
+ speedhq_max_level[0][i] = ff_rl_speedhq.max_level[0][i];
+ speedhq_index_run[0][i] = ff_rl_speedhq.index_run[0][i];
+ }
+
/* build unified dc encoding tables */
for (int i = -255; i < 256; i++) {
int adiff, index;
@@ -223,8 +231,8 @@
MASK_ABS(sign, alevel);
sign &= 1;
- if (alevel <= ff_rl_speedhq.max_level[0][run]) {
- code = ff_rl_speedhq.index_run[0][run] + alevel - 1;
+ if (alevel <= speedhq_max_level[0][run]) {
+ code = speedhq_index_run[0][run] + alevel - 1;
/* store the VLC & sign at once */
put_bits_le(&s->pb, ff_rl_speedhq.table_vlc[code][1] + 1,
ff_rl_speedhq.table_vlc[code][0] + (sign << ff_rl_speedhq.table_vlc[code][1]));
diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index 98f84ac..ecc0801 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -58,8 +58,7 @@
AVSubtitle *sub = data;
AVBPrint buffer;
int x1 = -1, y1 = -1, x2 = -1, y2 = -1;
- int ret;
- buffer_size_t size;
+ int size, ret;
const uint8_t *p = av_packet_get_side_data(avpkt, AV_PKT_DATA_SUBTITLE_POSITION, &size);
FFASSDecoderContext *s = avctx->priv_data;
diff --git a/libavcodec/svq1_cb.h b/libavcodec/svq1_cb.h
index 30cca19..11f7969 100644
--- a/libavcodec/svq1_cb.h
+++ b/libavcodec/svq1_cb.h
@@ -34,7 +34,7 @@
#include <stdint.h>
#include <stdlib.h>
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
/* 6x16-entry codebook for inter-coded 4x2 vectors */
DECLARE_ALIGNED(4, static const int8_t, svq1_inter_codebook_4x2)[768] = {
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index d6b6bec..7aea138 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -43,7 +43,6 @@
#include "mathops.h"
#include "svq1.h"
-#define SVQ1_BLOCK_TYPE_VLC_BITS 3
static VLC svq1_block_type;
static VLC svq1_motion_component;
static VLC svq1_intra_multistage[6];
@@ -65,9 +64,6 @@
uint8_t *pkt_swapped;
int pkt_swapped_allocated;
- svq1_pmv *pmv;
- int pmv_allocated;
-
int width;
int height;
int frame_code;
@@ -460,8 +456,7 @@
int result = 0;
/* get block type */
- block_type = get_vlc2(bitbuf, svq1_block_type.table,
- SVQ1_BLOCK_TYPE_VLC_BITS, 1);
+ block_type = get_vlc2(bitbuf, svq1_block_type.table, 2, 2);
/* reset motion vectors */
if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) {
@@ -625,6 +620,7 @@
AVFrame *cur = data;
uint8_t *current;
int result, i, x, y, width, height;
+ svq1_pmv *pmv;
int ret;
/* initialize bit buffer */
@@ -684,8 +680,8 @@
if (result < 0)
return result;
- av_fast_padded_malloc(&s->pmv, &s->pmv_allocated, (FFALIGN(s->width, 16) / 8 + 3) * sizeof(*s->pmv));
- if (!s->pmv)
+ pmv = av_malloc_array(FFALIGN(s->width, 16) / 8 + 3, sizeof(*pmv));
+ if (!pmv)
return AVERROR(ENOMEM);
/* decode y, u and v components */
@@ -713,7 +709,7 @@
av_log(avctx, AV_LOG_ERROR,
"Error in svq1_decode_block %i (keyframe)\n",
result);
- return result;
+ goto err;
}
}
current += 16 * linesize;
@@ -724,27 +720,28 @@
if (!previous ||
s->prev->width != s->width || s->prev->height != s->height) {
av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n");
- return AVERROR_INVALIDDATA;
+ result = AVERROR_INVALIDDATA;
+ goto err;
}
- memset(s->pmv, 0, ((width / 8) + 3) * sizeof(svq1_pmv));
+ memset(pmv, 0, ((width / 8) + 3) * sizeof(svq1_pmv));
for (y = 0; y < height; y += 16) {
for (x = 0; x < width; x += 16) {
result = svq1_decode_delta_block(avctx, &s->hdsp,
&s->gb, ¤t[x],
previous, linesize,
- s->pmv, x, y, width, height);
+ pmv, x, y, width, height);
if (result != 0) {
ff_dlog(avctx,
"Error in svq1_decode_delta_block %i\n",
result);
- return result;
+ goto err;
}
}
- s->pmv[0].x =
- s->pmv[0].y = 0;
+ pmv[0].x =
+ pmv[0].y = 0;
current += 16 * linesize;
}
@@ -755,20 +752,22 @@
av_frame_unref(s->prev);
result = av_frame_ref(s->prev, cur);
if (result < 0)
- return result;
+ goto err;
}
*got_frame = 1;
result = buf_size;
+err:
+ av_free(pmv);
return result;
}
static av_cold void svq1_static_init(void)
{
- INIT_VLC_STATIC(&svq1_block_type, SVQ1_BLOCK_TYPE_VLC_BITS, 4,
+ INIT_VLC_STATIC(&svq1_block_type, 2, 4,
&ff_svq1_block_type_vlc[0][1], 2, 1,
- &ff_svq1_block_type_vlc[0][0], 2, 1, 8);
+ &ff_svq1_block_type_vlc[0][0], 2, 1, 6);
INIT_VLC_STATIC(&svq1_motion_component, 7, 33,
&ff_mvtab[0][1], 2, 1,
@@ -830,8 +829,6 @@
av_frame_free(&s->prev);
av_freep(&s->pkt_swapped);
s->pkt_swapped_allocated = 0;
- av_freep(&s->pmv);
- s->pmv_allocated = 0;
return 0;
}
diff --git a/libavcodec/svq1enc.h b/libavcodec/svq1enc.h
index bb6af08..b4ef763 100644
--- a/libavcodec/svq1enc.h
+++ b/libavcodec/svq1enc.h
@@ -24,7 +24,6 @@
#include <stdint.h>
#include "libavutil/frame.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "hpeldsp.h"
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 54ef4ad..fb7b992 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -44,7 +44,6 @@
#include "libavutil/attributes.h"
#include "libavutil/crc.h"
-#include "libavutil/mem_internal.h"
#include "internal.h"
#include "avcodec.h"
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 931e5d3..6bf5dcc 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -26,7 +26,6 @@
*/
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/samplefmt.h"
#define BITSTREAM_READER_LE
diff --git a/libavcodec/tests/.gitignore b/libavcodec/tests/.gitignore
index 92aab1b..a01a700 100644
--- a/libavcodec/tests/.gitignore
+++ b/libavcodec/tests/.gitignore
@@ -5,6 +5,7 @@
/codec_desc
/dct
/fft
+/fft-fixed
/fft-fixed32
/golomb
/h264_levels
@@ -17,6 +18,7 @@
/mjpegenc_huffman
/motion
/mpeg12framerate
+/options
/rangecoder
/snowenc
/utils
diff --git a/libavcodec/tests/cabac.c b/libavcodec/tests/cabac.c
index a8bd131..affe4eb 100644
--- a/libavcodec/tests/cabac.c
+++ b/libavcodec/tests/cabac.c
@@ -24,51 +24,41 @@
#include "libavutil/lfg.h"
#include "libavcodec/avcodec.h"
-#include "libavcodec/put_bits.h"
-typedef struct CABACTestContext {
- CABACContext dec;
- int outstanding_count;
- PutBitContext pb;
-} CABACTestContext;
-
-static inline void put_cabac_bit(CABACTestContext *c, int b)
-{
+static inline void put_cabac_bit(CABACContext *c, int b){
put_bits(&c->pb, 1, b);
for(;c->outstanding_count; c->outstanding_count--){
put_bits(&c->pb, 1, 1-b);
}
}
-static inline void renorm_cabac_encoder(CABACTestContext *c)
-{
- while (c->dec.range < 0x100) {
+static inline void renorm_cabac_encoder(CABACContext *c){
+ while(c->range < 0x100){
//FIXME optimize
- if (c->dec.low < 0x100) {
+ if(c->low<0x100){
put_cabac_bit(c, 0);
- } else if (c->dec.low < 0x200) {
+ }else if(c->low<0x200){
c->outstanding_count++;
- c->dec.low -= 0x100;
+ c->low -= 0x100;
}else{
put_cabac_bit(c, 1);
- c->dec.low -= 0x200;
+ c->low -= 0x200;
}
- c->dec.range += c->dec.range;
- c->dec.low += c->dec.low;
+ c->range+= c->range;
+ c->low += c->low;
}
}
-static void put_cabac(CABACTestContext *c, uint8_t * const state, int bit)
-{
- int RangeLPS = ff_h264_lps_range[2 * (c->dec.range & 0xC0) + *state];
+static void put_cabac(CABACContext *c, uint8_t * const state, int bit){
+ int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state];
if(bit == ((*state)&1)){
- c->dec.range -= RangeLPS;
+ c->range -= RangeLPS;
*state = ff_h264_mlps_state[128 + *state];
}else{
- c->dec.low += c->dec.range - RangeLPS;
- c->dec.range = RangeLPS;
+ c->low += c->range - RangeLPS;
+ c->range = RangeLPS;
*state= ff_h264_mlps_state[127 - *state];
}
@@ -78,22 +68,21 @@
/**
* @param bit 0 -> write zero bit, !=0 write one bit
*/
-static void put_cabac_bypass(CABACTestContext *c, int bit)
-{
- c->dec.low += c->dec.low;
+static void put_cabac_bypass(CABACContext *c, int bit){
+ c->low += c->low;
if(bit){
- c->dec.low += c->dec.range;
+ c->low += c->range;
}
//FIXME optimize
- if (c->dec.low < 0x200) {
+ if(c->low<0x200){
put_cabac_bit(c, 0);
- } else if (c->dec.low < 0x400) {
+ }else if(c->low<0x400){
c->outstanding_count++;
- c->dec.low -= 0x200;
+ c->low -= 0x200;
}else{
put_cabac_bit(c, 1);
- c->dec.low -= 0x400;
+ c->low -= 0x400;
}
}
@@ -101,21 +90,20 @@
*
* @return the number of bytes written
*/
-static int put_cabac_terminate(CABACTestContext *c, int bit)
-{
- c->dec.range -= 2;
+static int put_cabac_terminate(CABACContext *c, int bit){
+ c->range -= 2;
if(!bit){
renorm_cabac_encoder(c);
}else{
- c->dec.low += c->dec.range;
- c->dec.range = 2;
+ c->low += c->range;
+ c->range= 2;
renorm_cabac_encoder(c);
- av_assert0(c->dec.low <= 0x1FF);
- put_cabac_bit(c, c->dec.low >> 9);
- put_bits(&c->pb, 2, ((c->dec.low >> 7) & 3) | 1);
+ av_assert0(c->low <= 0x1FF);
+ put_cabac_bit(c, c->low>>9);
+ put_bits(&c->pb, 2, ((c->low>>7)&3)|1);
flush_put_bits(&c->pb); //FIXME FIXME FIXME XXX wrong
}
@@ -123,21 +111,8 @@
return (put_bits_count(&c->pb)+7)>>3;
}
-/**
- * @param buf_size size of buf in bits
- */
-static void init_cabac_encoder(CABACTestContext *c, uint8_t *buf, int buf_size)
-{
- init_put_bits(&c->pb, buf, buf_size);
-
- c->dec.low = 0;
- c->dec.range = 0x1FE;
- c->outstanding_count = 0;
- c->pb.bit_left++; //avoids firstBitFlag
-}
-
int main(void){
- CABACTestContext c;
+ CABACContext c;
uint8_t b[9*SIZE];
uint8_t r[9*SIZE];
int i, ret = 0;
@@ -145,7 +120,7 @@
AVLFG prng;
av_lfg_init(&prng, 1);
- init_cabac_encoder(&c, b, SIZE);
+ ff_init_cabac_encoder(&c, b, SIZE);
for(i=0; i<SIZE; i++){
if(2*i<SIZE) r[i] = av_lfg_get(&prng) % 7;
@@ -164,24 +139,24 @@
b[i++] = av_lfg_get(&prng);
b[i ] = av_lfg_get(&prng);
- ff_init_cabac_decoder(&c.dec, b, SIZE);
+ ff_init_cabac_decoder(&c, b, SIZE);
memset(state, 0, sizeof(state));
for(i=0; i<SIZE; i++){
- if ((r[i] & 1) != get_cabac_bypass(&c.dec)) {
+ if( (r[i]&1) != get_cabac_bypass(&c) ) {
av_log(NULL, AV_LOG_ERROR, "CABAC bypass failure at %d\n", i);
ret = 1;
}
}
for(i=0; i<SIZE; i++){
- if ((r[i] & 1) != get_cabac_noinline(&c.dec, state)) {
+ if( (r[i]&1) != get_cabac_noinline(&c, state) ) {
av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i);
ret = 1;
}
}
- if (!get_cabac_terminate(&c.dec)) {
+ if(!get_cabac_terminate(&c)) {
av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n");
ret = 1;
}
diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c
index eab39e9..2ca8039 100644
--- a/libavcodec/tests/dct.c
+++ b/libavcodec/tests/dct.c
@@ -38,7 +38,6 @@
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/time.h"
#include "libavcodec/dct.h"
diff --git a/libavcodec/ttmlenc.h b/libavcodec/tests/fft-fixed.c
similarity index 71%
copy from libavcodec/ttmlenc.h
copy to libavcodec/tests/fft-fixed.c
index c1dd5ec..3c50bf1 100644
--- a/libavcodec/ttmlenc.h
+++ b/libavcodec/tests/fft-fixed.c
@@ -1,7 +1,4 @@
/*
- * TTML subtitle encoder shared functionality
- * Copyright (c) 2020 24i
- *
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
@@ -19,10 +16,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_TTMLENC_H
-#define AVCODEC_TTMLENC_H
-
-#define TTMLENC_EXTRADATA_SIGNATURE "lavc-ttmlenc"
-#define TTMLENC_EXTRADATA_SIGNATURE_SIZE (sizeof(TTMLENC_EXTRADATA_SIGNATURE) - 1)
-
-#endif /* AVCODEC_TTMLENC_H */
+#define FFT_FLOAT 0
+#define AVFFT 0
+#include "fft.c"
diff --git a/libavcodec/tests/options.c b/libavcodec/tests/options.c
new file mode 100644
index 0000000..010e3c0
--- /dev/null
+++ b/libavcodec/tests/options.c
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2001 Fabrice Bellard
+ * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
+ *
+ * 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
+ */
+
+#include "libavcodec/options.c"
+
+static int dummy_init(AVCodecContext *ctx)
+{
+ //TODO: this code should set every possible pointer that could be set by codec and is not an option;
+ ctx->extradata_size = 8;
+ ctx->extradata = av_malloc(ctx->extradata_size);
+ return 0;
+}
+
+static int dummy_close(AVCodecContext *ctx)
+{
+ av_freep(&ctx->extradata);
+ ctx->extradata_size = 0;
+ return 0;
+}
+
+static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
+{
+ return AVERROR(ENOSYS);
+}
+
+typedef struct Dummy12Context {
+ AVClass *av_class;
+ int num;
+ char* str;
+} Dummy12Context;
+
+typedef struct Dummy3Context {
+ void *fake_av_class;
+ int num;
+ char* str;
+} Dummy3Context;
+
+#define OFFSET(x) offsetof(Dummy12Context, x)
+#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
+static const AVOption dummy_options[] = {
+ { "str", "set str", OFFSET(str), AV_OPT_TYPE_STRING, { .str = "i'm src default value" }, 0, 0, VE},
+ { "num", "set num", OFFSET(num), AV_OPT_TYPE_INT, { .i64 = 1500100900 }, 0, INT_MAX, VE},
+ { NULL },
+};
+
+static const AVClass dummy_v1_class = {
+ .class_name = "dummy_v1_class",
+ .item_name = av_default_item_name,
+ .option = dummy_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+static const AVClass dummy_v2_class = {
+ .class_name = "dummy_v2_class",
+ .item_name = av_default_item_name,
+ .option = dummy_options,
+ .version = LIBAVUTIL_VERSION_INT,
+};
+
+/* codec with options */
+static AVCodec dummy_v1_encoder = {
+ .name = "dummy_v1_codec",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_NONE - 1,
+ .encode2 = dummy_encode,
+ .init = dummy_init,
+ .close = dummy_close,
+ .priv_class = &dummy_v1_class,
+ .priv_data_size = sizeof(Dummy12Context),
+};
+
+/* codec with options, different class */
+static AVCodec dummy_v2_encoder = {
+ .name = "dummy_v2_codec",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_NONE - 2,
+ .encode2 = dummy_encode,
+ .init = dummy_init,
+ .close = dummy_close,
+ .priv_class = &dummy_v2_class,
+ .priv_data_size = sizeof(Dummy12Context),
+};
+
+/* codec with priv data, but no class */
+static AVCodec dummy_v3_encoder = {
+ .name = "dummy_v3_codec",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_NONE - 3,
+ .encode2 = dummy_encode,
+ .init = dummy_init,
+ .close = dummy_close,
+ .priv_data_size = sizeof(Dummy3Context),
+};
+
+/* codec without priv data */
+static AVCodec dummy_v4_encoder = {
+ .name = "dummy_v4_codec",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_NONE - 4,
+ .encode2 = dummy_encode,
+ .init = dummy_init,
+ .close = dummy_close,
+};
+
+static void test_copy_print_codec(const AVCodecContext *ctx)
+{
+ printf("%-14s: %dx%d prv: %s",
+ ctx->codec ? ctx->codec->name : "NULL",
+ ctx->width, ctx->height,
+ ctx->priv_data ? "set" : "null");
+ if (ctx->codec && ctx->codec->priv_class && ctx->codec->priv_data_size) {
+ int64_t i64;
+ char *str = NULL;
+ av_opt_get_int(ctx->priv_data, "num", 0, &i64);
+ av_opt_get(ctx->priv_data, "str", 0, (uint8_t**)&str);
+ printf(" opts: %"PRId64" %s", i64, str);
+ av_free(str);
+ }
+ printf("\n");
+}
+
+static void test_copy(const AVCodec *c1, const AVCodec *c2)
+{
+ AVCodecContext *ctx1, *ctx2;
+ printf("%s -> %s\nclosed:\n", c1 ? c1->name : "NULL", c2 ? c2->name : "NULL");
+ ctx1 = avcodec_alloc_context3(c1);
+ ctx2 = avcodec_alloc_context3(c2);
+ ctx1->width = ctx1->height = 128;
+ ctx1->time_base = (AVRational){12,34};
+ if (ctx2->codec && ctx2->codec->priv_class && ctx2->codec->priv_data_size) {
+ av_opt_set(ctx2->priv_data, "num", "667", 0);
+ av_opt_set(ctx2->priv_data, "str", "i'm dest value before copy", 0);
+ }
+ avcodec_copy_context(ctx2, ctx1);
+ test_copy_print_codec(ctx1);
+ test_copy_print_codec(ctx2);
+ if (ctx1->codec) {
+ int ret;
+ printf("opened:\n");
+ ret = avcodec_open2(ctx1, ctx1->codec, NULL);
+ if (ret < 0) {
+ fprintf(stderr, "avcodec_open2 failed\n");
+ exit(1);
+ }
+ if (ctx2->codec && ctx2->codec->priv_class && ctx2->codec->priv_data_size) {
+ av_opt_set(ctx2->priv_data, "num", "667", 0);
+ av_opt_set(ctx2->priv_data, "str", "i'm dest value before copy", 0);
+ }
+ avcodec_copy_context(ctx2, ctx1);
+ test_copy_print_codec(ctx1);
+ test_copy_print_codec(ctx2);
+ }
+ avcodec_free_context(&ctx1);
+ avcodec_free_context(&ctx2);
+}
+
+int main(void)
+{
+ AVCodec *dummy_codec[] = {
+ &dummy_v1_encoder,
+ &dummy_v2_encoder,
+ &dummy_v3_encoder,
+ &dummy_v4_encoder,
+ NULL,
+ };
+ int i, j;
+
+ for (i = 0; dummy_codec[i]; i++)
+ avcodec_register(dummy_codec[i]);
+
+ printf("testing avcodec_copy_context()\n");
+ for (i = 0; i < FF_ARRAY_ELEMS(dummy_codec); i++)
+ for (j = 0; j < FF_ARRAY_ELEMS(dummy_codec); j++)
+ test_copy(dummy_codec[i], dummy_codec[j]);
+ return 0;
+}
diff --git a/libavcodec/tests/rangecoder.c b/libavcodec/tests/rangecoder.c
index ca96e13..d6cf9ec 100644
--- a/libavcodec/tests/rangecoder.c
+++ b/libavcodec/tests/rangecoder.c
@@ -26,32 +26,6 @@
#define SIZE 1240
-/**
- * Check if at the current position there is a valid looking termination
- * @param version version 0 requires the decoder to know the data size in bytes
- * version 1 needs about 1 bit more space but does not need to
- * carry the size from encoder to decoder
- * @returns negative AVERROR code on error or non negative.
- */
-static int rac_check_termination(RangeCoder *c, int version)
-{
- if (version == 1) {
- RangeCoder tmp = *c;
- get_rac(c, (uint8_t[]) { 129 });
-
- if (c->bytestream == tmp.bytestream && c->bytestream > c->bytestream_start)
- tmp.low -= *--tmp.bytestream;
- tmp.bytestream_end = tmp.bytestream;
-
- if (get_rac(&tmp, (uint8_t[]) { 129 }))
- return AVERROR_INVALIDDATA;
- } else {
- if (c->bytestream_end != c->bytestream)
- return AVERROR_INVALIDDATA;
- }
- return 0;
-}
-
int main(void)
{
RangeCoder c;
@@ -87,7 +61,7 @@
return 1;
}
- if (rac_check_termination(&c, version) < 0) {
+ if (ff_rac_check_termination(&c, version) < 0) {
av_log(NULL, AV_LOG_ERROR, "rac failure at termination pass %d version %d\n", p, version);
return 1;
}
diff --git a/libavcodec/tests/x86/dct.c b/libavcodec/tests/x86/dct.c
index f5c238e..afb03b1 100644
--- a/libavcodec/tests/x86/dct.c
+++ b/libavcodec/tests/x86/dct.c
@@ -18,8 +18,6 @@
#include "config.h"
-#include "libavutil/mem_internal.h"
-
#include "libavcodec/x86/fdct.h"
#include "libavcodec/x86/xvididct.h"
#include "libavcodec/x86/simple_idct.h"
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 9cd2876..fa1f44c 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -132,8 +132,8 @@
#define RET_GEOKEY(TYPE, array, element)\
if (key >= TIFF_##TYPE##_KEY_ID_OFFSET &&\
- key - TIFF_##TYPE##_KEY_ID_OFFSET < FF_ARRAY_ELEMS(tiff_##array##_name_type_map))\
- return tiff_##array##_name_type_map[key - TIFF_##TYPE##_KEY_ID_OFFSET].element;
+ key - TIFF_##TYPE##_KEY_ID_OFFSET < FF_ARRAY_ELEMS(ff_tiff_##array##_name_type_map))\
+ return ff_tiff_##array##_name_type_map[key - TIFF_##TYPE##_KEY_ID_OFFSET].element;
static const char *get_geokey_name(int key)
{
@@ -180,8 +180,8 @@
#define RET_GEOKEY_VAL(TYPE, array)\
if (val >= TIFF_##TYPE##_OFFSET &&\
- val - TIFF_##TYPE##_OFFSET < FF_ARRAY_ELEMS(tiff_##array##_codes))\
- return av_strdup(tiff_##array##_codes[val - TIFF_##TYPE##_OFFSET]);
+ val - TIFF_##TYPE##_OFFSET < FF_ARRAY_ELEMS(ff_tiff_##array##_codes))\
+ return av_strdup(ff_tiff_##array##_codes[val - TIFF_##TYPE##_OFFSET]);
switch (key) {
case TIFF_GT_MODEL_TYPE_GEOKEY:
@@ -214,11 +214,11 @@
RET_GEOKEY_VAL(PRIME_MERIDIAN, prime_meridian);
break;
case TIFF_PROJECTED_CS_TYPE_GEOKEY:
- ap = av_strdup(search_keyval(tiff_proj_cs_type_codes, FF_ARRAY_ELEMS(tiff_proj_cs_type_codes), val));
+ ap = av_strdup(search_keyval(ff_tiff_proj_cs_type_codes, FF_ARRAY_ELEMS(ff_tiff_proj_cs_type_codes), val));
if(ap) return ap;
break;
case TIFF_PROJECTION_GEOKEY:
- ap = av_strdup(search_keyval(tiff_projection_codes, FF_ARRAY_ELEMS(tiff_projection_codes), val));
+ ap = av_strdup(search_keyval(ff_tiff_projection_codes, FF_ARRAY_ELEMS(ff_tiff_projection_codes), val));
if(ap) return ap;
break;
case TIFF_PROJ_COORD_TRANS_GEOKEY:
@@ -964,8 +964,7 @@
return 0;
}
-static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame,
- const AVPacket *avpkt)
+static int dng_decode_tiles(AVCodecContext *avctx, AVFrame *frame, AVPacket *avpkt)
{
TiffContext *s = avctx->priv_data;
int tile_idx;
@@ -1924,17 +1923,14 @@
has_strip_bits = s->strippos || s->strips || s->stripoff || s->rps || s->sot || s->sstype || s->stripsize || s->stripsizesoff;
if (has_tile_bits && has_strip_bits) {
- int tiled_dng = s->is_tiled && is_dng;
- av_log(avctx, tiled_dng ? AV_LOG_WARNING : AV_LOG_ERROR, "Tiled TIFF is not allowed to strip\n");
- if (!tiled_dng)
- return AVERROR_INVALIDDATA;
+ av_log(avctx, AV_LOG_WARNING, "Tiled TIFF is not allowed to strip\n");
}
/* now we have the data and may start decoding */
if ((ret = init_image(s, &frame)) < 0)
return ret;
- if (!s->is_tiled || has_strip_bits) {
+ if (!s->is_tiled) {
if (s->strips == 1 && !s->stripsize) {
av_log(avctx, AV_LOG_WARNING, "Image data size missing\n");
s->stripsize = avpkt->size - s->stripoff;
diff --git a/libavcodec/tiff_common.h b/libavcodec/tiff_common.h
index 019d23e..03558c3 100644
--- a/libavcodec/tiff_common.h
+++ b/libavcodec/tiff_common.h
@@ -79,6 +79,26 @@
/** Reads a byte from the bytestream using given endianness. */
unsigned ff_tget(GetByteContext *gb, int type, int le);
+/** Returns an allocated string containing count
+ * rational values using the given separator.
+ */
+char *ff_trationals2str(int *rp, int count, const char *sep);
+
+/** Returns an allocated string containing count
+ * long values using the given separator.
+ */
+char *ff_tlongs2str(int32_t *lp, int count, const char *sep);
+
+/** Returns an allocated string containing count
+ * double values using the given separator.
+ */
+char *ff_tdoubles2str(double *dp, int count, const char *sep);
+
+/** Returns an allocated string containing count
+ * short values using the given separator.
+ */
+char *ff_tshorts2str(int16_t *sp, int count, const char *sep);
+
/** Adds count rationals converted to a string
* into the metadata dictionary.
*/
diff --git a/libavcodec/tiff_data.c b/libavcodec/tiff_data.c
new file mode 100644
index 0000000..88c2256
--- /dev/null
+++ b/libavcodec/tiff_data.c
@@ -0,0 +1,1870 @@
+/*
+ * TIFF data tables
+ * Copyright (c) 2011 Thomas Kuehnel
+ *
+ * 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
+ */
+
+/**
+ * @file
+ * TIFF data tables
+ * @author Thomas Kuehnel
+ * @see GeoTIFF specification at
+ * http://www.remotesensing.org/geotiff/spec/geotiffhome.html
+ */
+
+#include "tiff_data.h"
+
+const TiffGeoTagNameType ff_tiff_conf_name_type_map[] = {
+ {"GTModelTypeGeoKey", GEOTIFF_SHORT },
+ {"GTRasterTypeGeoKey", GEOTIFF_SHORT },
+ {"GTCitationGeoKey", GEOTIFF_STRING}
+};
+
+const TiffGeoTagNameType ff_tiff_geog_name_type_map[] = {
+ {"GeographicTypeGeoKey", GEOTIFF_SHORT },
+ {"GeogCitationGeoKey", GEOTIFF_STRING},
+ {"GeogGeodeticDatumGeoKey", GEOTIFF_SHORT },
+ {"GeogPrimeMeridianGeoKey", GEOTIFF_SHORT },
+ {"GeogLinearUnitsGeoKey", GEOTIFF_SHORT },
+ {"GeogLinearUnitSizeGeoKey", GEOTIFF_DOUBLE},
+ {"GeogAngularUnitsGeoKey", GEOTIFF_SHORT },
+ {"GeogAngularUnitSizeGeoKey", GEOTIFF_DOUBLE},
+ {"GeogEllipsoidGeoKey", GEOTIFF_SHORT },
+ {"GeogSemiMajorAxisGeoKey", GEOTIFF_DOUBLE},
+ {"GeogSemiMinorAxisGeoKey", GEOTIFF_DOUBLE},
+ {"GeogInvFlatteningGeoKey", GEOTIFF_DOUBLE},
+ {"GeogAzimuthUnitsGeoKey", GEOTIFF_SHORT },
+ {"GeogPrimeMeridianLongGeoKey", GEOTIFF_DOUBLE}
+};
+
+const TiffGeoTagNameType ff_tiff_proj_name_type_map[] = {
+ {"ProjectedCSTypeGeoKey", GEOTIFF_SHORT },
+ {"PCSCitationGeoKey", GEOTIFF_STRING},
+ {"ProjectionGeoKey", GEOTIFF_SHORT },
+ {"ProjCoordTransGeoKey", GEOTIFF_SHORT },
+ {"ProjLinearUnitsGeoKey", GEOTIFF_SHORT },
+ {"ProjLinearUnitSizeGeoKey", GEOTIFF_DOUBLE},
+ {"ProjStdParallel1GeoKey", GEOTIFF_DOUBLE},
+ {"ProjStdParallel2GeoKey", GEOTIFF_DOUBLE},
+ {"ProjNatOriginLongGeoKey", GEOTIFF_DOUBLE},
+ {"ProjNatOriginLatGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseEastingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseNorthingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseOriginLongGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseOriginLatGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseOriginEastingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjFalseOriginNorthingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjCenterLongGeoKey", GEOTIFF_DOUBLE},
+ {"ProjCenterLatGeoKey", GEOTIFF_DOUBLE},
+ {"ProjCenterEastingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjCenterNorthingGeoKey", GEOTIFF_DOUBLE},
+ {"ProjScaleAtNatOriginGeoKey", GEOTIFF_DOUBLE},
+ {"ProjScaleAtCenterGeoKey", GEOTIFF_DOUBLE},
+ {"ProjAzimuthAngleGeoKey", GEOTIFF_DOUBLE},
+ {"ProjStraightVertPoleLongGeoKey", GEOTIFF_DOUBLE}
+};
+
+const TiffGeoTagNameType ff_tiff_vert_name_type_map[] = {
+ {"VerticalCSTypeGeoKey", GEOTIFF_SHORT },
+ {"VerticalCitationGeoKey", GEOTIFF_STRING},
+ {"VerticalDatumGeoKey", GEOTIFF_SHORT },
+ {"VerticalUnitsGeoKey", GEOTIFF_SHORT }
+};
+
+const char *const ff_tiff_gt_model_type_codes[] = {
+ "ModelTypeProjected",
+ "ModelTypeGeographic",
+ "ModelTypeGeocentric"
+};
+
+const char *const ff_tiff_gt_raster_type_codes[] = {
+ "RasterPixelIsArea",
+ "RasterPixelIsPoint"
+};
+
+const char *const ff_tiff_linear_unit_codes[] = {
+ "Linear_Meter",
+ "Linear_Foot",
+ "Linear_Foot_US_Survey",
+ "Linear_Foot_Modified_American",
+ "Linear_Foot_Clarke",
+ "Linear_Foot_Indian",
+ "Linear_Link",
+ "Linear_Link_Benoit",
+ "Linear_Link_Sears",
+ "Linear_Chain_Benoit",
+ "Linear_Chain_Sears",
+ "Linear_Yard_Sears",
+ "Linear_Yard_Indian",
+ "Linear_Fathom",
+ "Linear_Mile_International_Nautical"
+};
+
+const char *const ff_tiff_angular_unit_codes[] = {
+ "Angular_Radian",
+ "Angular_Degree",
+ "Angular_Arc_Minute",
+ "Angular_Arc_Second",
+ "Angular_Grad",
+ "Angular_Gon",
+ "Angular_DMS",
+ "Angular_DMS_Hemisphere"
+};
+
+const char *const ff_tiff_gcs_type_codes[] = {
+ "GCS_Adindan",
+ "GCS_AGD66",
+ "GCS_AGD84",
+ "GCS_Ain_el_Abd",
+ "GCS_Afgooye",
+ "GCS_Agadez",
+ "GCS_Lisbon",
+ "GCS_Aratu",
+ "GCS_Arc_1950",
+ "GCS_Arc_1960",
+ "GCS_Batavia",
+ "GCS_Barbados",
+ "GCS_Beduaram",
+ "GCS_Beijing_1954",
+ "GCS_Belge_1950",
+ "GCS_Bermuda_1957",
+ "GCS_Bern_1898",
+ "GCS_Bogota",
+ "GCS_Bukit_Rimpah",
+ "GCS_Camacupa",
+ "GCS_Campo_Inchauspe",
+ "GCS_Cape",
+ "GCS_Carthage",
+ "GCS_Chua",
+ "GCS_Corrego_Alegre",
+ "GCS_Cote_d_Ivoire",
+ "GCS_Deir_ez_Zor",
+ "GCS_Douala",
+ "GCS_Egypt_1907",
+ "GCS_ED50",
+ "GCS_ED87",
+ "GCS_Fahud",
+ "GCS_Gandajika_1970",
+ "GCS_Garoua",
+ "GCS_Guyane_Francaise",
+ "GCS_Hu_Tzu_Shan",
+ "GCS_HD72",
+ "GCS_ID74",
+ "GCS_Indian_1954",
+ "GCS_Indian_1975",
+ "GCS_Jamaica_1875",
+ "GCS_JAD69",
+ "GCS_Kalianpur",
+ "GCS_Kandawala",
+ "GCS_Kertau",
+ "GCS_KOC",
+ "GCS_La_Canoa",
+ "GCS_PSAD56",
+ "GCS_Lake",
+ "GCS_Leigon",
+ "GCS_Liberia_1964",
+ "GCS_Lome",
+ "GCS_Luzon_1911",
+ "GCS_Hito_XVIII_1963",
+ "GCS_Herat_North",
+ "GCS_Mahe_1971",
+ "GCS_Makassar",
+ "GCS_EUREF89",
+ "GCS_Malongo_1987",
+ "GCS_Manoca",
+ "GCS_Merchich",
+ "GCS_Massawa",
+ "GCS_Minna",
+ "GCS_Mhast",
+ "GCS_Monte_Mario",
+ "GCS_M_poraloko",
+ "GCS_NAD27",
+ "GCS_NAD_Michigan",
+ "GCS_NAD83",
+ "GCS_Nahrwan_1967",
+ "GCS_Naparima_1972",
+ "GCS_GD49",
+ "GCS_NGO_1948",
+ "GCS_Datum_73",
+ "GCS_NTF",
+ "GCS_NSWC_9Z_2",
+ "GCS_OSGB_1936",
+ "GCS_OSGB70",
+ "GCS_OS_SN80",
+ "GCS_Padang",
+ "GCS_Palestine_1923",
+ "GCS_Pointe_Noire",
+ "GCS_GDA94",
+ "GCS_Pulkovo_1942",
+ "GCS_Qatar",
+ "GCS_Qatar_1948",
+ "GCS_Qornoq",
+ "GCS_Loma_Quintana",
+ "GCS_Amersfoort",
+ "GCS_RT38",
+ "GCS_SAD69",
+ "GCS_Sapper_Hill_1943",
+ "GCS_Schwarzeck",
+ "GCS_Segora",
+ "GCS_Serindung",
+ "GCS_Sudan",
+ "GCS_Tananarive",
+ "GCS_Timbalai_1948",
+ "GCS_TM65",
+ "GCS_TM75",
+ "GCS_Tokyo",
+ "GCS_Trinidad_1903",
+ "GCS_TC_1948",
+ "GCS_Voirol_1875",
+ "GCS_Voirol_Unifie",
+ "GCS_Bern_1938",
+ "GCS_Nord_Sahara_1959",
+ "GCS_Stockholm_1938",
+ "GCS_Yacare",
+ "GCS_Yoff",
+ "GCS_Zanderij",
+ "GCS_MGI",
+ "GCS_Belge_1972",
+ "GCS_DHDN",
+ "GCS_Conakry_1905",
+ "GCS_WGS_72",
+ "GCS_WGS_72BE",
+ "GCS_WGS_84",
+ "GCS_Bern_1898_Bern",
+ "GCS_Bogota_Bogota",
+ "GCS_Lisbon_Lisbon",
+ "GCS_Makassar_Jakarta",
+ "GCS_MGI_Ferro",
+ "GCS_Monte_Mario_Rome",
+ "GCS_NTF_Paris",
+ "GCS_Padang_Jakarta",
+ "GCS_Belge_1950_Brussels",
+ "GCS_Tananarive_Paris",
+ "GCS_Voirol_1875_Paris",
+ "GCS_Voirol_Unifie_Paris",
+ "GCS_Batavia_Jakarta",
+ "GCS_ATF_Paris",
+ "GCS_NDG_Paris"
+};
+
+const char *const ff_tiff_gcse_type_codes[] = {
+ "GCSE_Airy1830",
+ "GCSE_AiryModified1849",
+ "GCSE_AustralianNationalSpheroid",
+ "GCSE_Bessel1841",
+ "GCSE_BesselModified",
+ "GCSE_BesselNamibia",
+ "GCSE_Clarke1858",
+ "GCSE_Clarke1866",
+ "GCSE_Clarke1866Michigan",
+ "GCSE_Clarke1880_Benoit",
+ "GCSE_Clarke1880_IGN",
+ "GCSE_Clarke1880_RGS",
+ "GCSE_Clarke1880_Arc",
+ "GCSE_Clarke1880_SGA1922",
+ "GCSE_Everest1830_1937Adjustment",
+ "GCSE_Everest1830_1967Definition",
+ "GCSE_Everest1830_1975Definition",
+ "GCSE_Everest1830Modified",
+ "GCSE_GRS1980",
+ "GCSE_Helmert1906",
+ "GCSE_IndonesianNationalSpheroid",
+ "GCSE_International1924",
+ "GCSE_International1967",
+ "GCSE_Krassowsky1940",
+ "GCSE_NWL9D",
+ "GCSE_NWL10D",
+ "GCSE_Plessis1817",
+ "GCSE_Struve1860",
+ "GCSE_WarOffice",
+ "GCSE_WGS84",
+ "GCSE_GEM10C",
+ "GCSE_OSU86F",
+ "GCSE_OSU91A",
+ "GCSE_Clarke1880",
+ "GCSE_Sphere"
+};
+
+const char *const ff_tiff_geodetic_datum_codes[] = {
+ "Datum_Adindan",
+ "Datum_Australian_Geodetic_Datum_1966",
+ "Datum_Australian_Geodetic_Datum_1984",
+ "Datum_Ain_el_Abd_1970",
+ "Datum_Afgooye",
+ "Datum_Agadez",
+ "Datum_Lisbon",
+ "Datum_Aratu",
+ "Datum_Arc_1950",
+ "Datum_Arc_1960",
+ "Datum_Batavia",
+ "Datum_Barbados",
+ "Datum_Beduaram",
+ "Datum_Beijing_1954",
+ "Datum_Reseau_National_Belge_1950",
+ "Datum_Bermuda_1957",
+ "Datum_Bern_1898",
+ "Datum_Bogota",
+ "Datum_Bukit_Rimpah",
+ "Datum_Camacupa",
+ "Datum_Campo_Inchauspe",
+ "Datum_Cape",
+ "Datum_Carthage",
+ "Datum_Chua",
+ "Datum_Corrego_Alegre",
+ "Datum_Cote_d_Ivoire",
+ "Datum_Deir_ez_Zor",
+ "Datum_Douala",
+ "Datum_Egypt_1907",
+ "Datum_European_Datum_1950",
+ "Datum_European_Datum_1987",
+ "Datum_Fahud",
+ "Datum_Gandajika_1970",
+ "Datum_Garoua",
+ "Datum_Guyane_Francaise",
+ "Datum_Hu_Tzu_Shan",
+ "Datum_Hungarian_Datum_1972",
+ "Datum_Indonesian_Datum_1974",
+ "Datum_Indian_1954",
+ "Datum_Indian_1975",
+ "Datum_Jamaica_1875",
+ "Datum_Jamaica_1969",
+ "Datum_Kalianpur",
+ "Datum_Kandawala",
+ "Datum_Kertau",
+ "Datum_Kuwait_Oil_Company",
+ "Datum_La_Canoa",
+ "Datum_Provisional_S_American_Datum_1956",
+ "Datum_Lake",
+ "Datum_Leigon",
+ "Datum_Liberia_1964",
+ "Datum_Lome",
+ "Datum_Luzon_1911",
+ "Datum_Hito_XVIII_1963",
+ "Datum_Herat_North",
+ "Datum_Mahe_1971",
+ "Datum_Makassar",
+ "Datum_European_Reference_System_1989",
+ "Datum_Malongo_1987",
+ "Datum_Manoca",
+ "Datum_Merchich",
+ "Datum_Massawa",
+ "Datum_Minna",
+ "Datum_Mhast",
+ "Datum_Monte_Mario",
+ "Datum_M_poraloko",
+ "Datum_North_American_Datum_1927",
+ "Datum_NAD_Michigan",
+ "Datum_North_American_Datum_1983",
+ "Datum_Nahrwan_1967",
+ "Datum_Naparima_1972",
+ "Datum_New_Zealand_Geodetic_Datum_1949",
+ "Datum_NGO_1948",
+ "Datum_Datum_73",
+ "Datum_Nouvelle_Triangulation_Francaise",
+ "Datum_NSWC_9Z_2",
+ "Datum_OSGB_1936",
+ "Datum_OSGB_1970_SN",
+ "Datum_OS_SN_1980",
+ "Datum_Padang_1884",
+ "Datum_Palestine_1923",
+ "Datum_Pointe_Noire",
+ "Datum_Geocentric_Datum_of_Australia_1994",
+ "Datum_Pulkovo_1942",
+ "Datum_Qatar",
+ "Datum_Qatar_1948",
+ "Datum_Qornoq",
+ "Datum_Loma_Quintana",
+ "Datum_Amersfoort",
+ "Datum_RT38",
+ "Datum_South_American_Datum_1969",
+ "Datum_Sapper_Hill_1943",
+ "Datum_Schwarzeck",
+ "Datum_Segora",
+ "Datum_Serindung",
+ "Datum_Sudan",
+ "Datum_Tananarive_1925",
+ "Datum_Timbalai_1948",
+ "Datum_TM65",
+ "Datum_TM75",
+ "Datum_Tokyo",
+ "Datum_Trinidad_1903",
+ "Datum_Trucial_Coast_1948",
+ "Datum_Voirol_1875",
+ "Datum_Voirol_Unifie_1960",
+ "Datum_Bern_1938",
+ "Datum_Nord_Sahara_1959",
+ "Datum_Stockholm_1938",
+ "Datum_Yacare",
+ "Datum_Yoff",
+ "Datum_Zanderij",
+ "Datum_Militar_Geographische_Institut",
+ "Datum_Reseau_National_Belge_1972",
+ "Datum_Deutsche_Hauptdreiecksnetz",
+ "Datum_Conakry_1905",
+ "Datum_WGS72",
+ "Datum_WGS72_Transit_Broadcast_Ephemeris",
+ "Datum_WGS84",
+ "Datum_Ancienne_Triangulation_Francaise",
+ "Datum_Nord_de_Guerre"
+};
+
+const char *const ff_tiff_geodetic_datum_e_codes[] = {
+ "DatumE_Airy1830",
+ "DatumE_AiryModified1849",
+ "DatumE_AustralianNationalSpheroid",
+ "DatumE_Bessel1841",
+ "DatumE_BesselModified",
+ "DatumE_BesselNamibia",
+ "DatumE_Clarke1858",
+ "DatumE_Clarke1866",
+ "DatumE_Clarke1866Michigan",
+ "DatumE_Clarke1880_Benoit",
+ "DatumE_Clarke1880_IGN",
+ "DatumE_Clarke1880_RGS",
+ "DatumE_Clarke1880_Arc",
+ "DatumE_Clarke1880_SGA1922",
+ "DatumE_Everest1830_1937Adjustment",
+ "DatumE_Everest1830_1967Definition",
+ "DatumE_Everest1830_1975Definition",
+ "DatumE_Everest1830Modified",
+ "DatumE_GRS1980",
+ "DatumE_Helmert1906",
+ "DatumE_IndonesianNationalSpheroid",
+ "DatumE_International1924",
+ "DatumE_International1967",
+ "DatumE_Krassowsky1960",
+ "DatumE_NWL9D",
+ "DatumE_NWL10D",
+ "DatumE_Plessis1817",
+ "DatumE_Struve1860",
+ "DatumE_WarOffice",
+ "DatumE_WGS84",
+ "DatumE_GEM10C",
+ "DatumE_OSU86F",
+ "DatumE_OSU91A",
+ "DatumE_Clarke1880",
+ "DatumE_Sphere"
+};
+
+const char *const ff_tiff_ellipsoid_codes[] = {
+ "Ellipse_Airy_1830",
+ "Ellipse_Airy_Modified_1849",
+ "Ellipse_Australian_National_Spheroid",
+ "Ellipse_Bessel_1841",
+ "Ellipse_Bessel_Modified",
+ "Ellipse_Bessel_Namibia",
+ "Ellipse_Clarke_1858",
+ "Ellipse_Clarke_1866",
+ "Ellipse_Clarke_1866_Michigan",
+ "Ellipse_Clarke_1880_Benoit",
+ "Ellipse_Clarke_1880_IGN",
+ "Ellipse_Clarke_1880_RGS",
+ "Ellipse_Clarke_1880_Arc",
+ "Ellipse_Clarke_1880_SGA_1922",
+ "Ellipse_Everest_1830_1937_Adjustment",
+ "Ellipse_Everest_1830_1967_Definition",
+ "Ellipse_Everest_1830_1975_Definition",
+ "Ellipse_Everest_1830_Modified",
+ "Ellipse_GRS_1980",
+ "Ellipse_Helmert_1906",
+ "Ellipse_Indonesian_National_Spheroid",
+ "Ellipse_International_1924",
+ "Ellipse_International_1967",
+ "Ellipse_Krassowsky_1940",
+ "Ellipse_NWL_9D",
+ "Ellipse_NWL_10D",
+ "Ellipse_Plessis_1817",
+ "Ellipse_Struve_1860",
+ "Ellipse_War_Office",
+ "Ellipse_WGS_84",
+ "Ellipse_GEM_10C",
+ "Ellipse_OSU86F",
+ "Ellipse_OSU91A",
+ "Ellipse_Clarke_1880",
+ "Ellipse_Sphere"
+};
+
+const char *const ff_tiff_prime_meridian_codes[] = {
+ "PM_Greenwich",
+ "PM_Lisbon",
+ "PM_Paris",
+ "PM_Bogota",
+ "PM_Madrid",
+ "PM_Rome",
+ "PM_Bern",
+ "PM_Jakarta",
+ "PM_Ferro",
+ "PM_Brussels",
+ "PM_Stockholm"
+};
+
+const TiffGeoTagKeyName ff_tiff_proj_cs_type_codes[] = {
+ {20137, "PCS_Adindan_UTM_zone_37N"},
+ {20138, "PCS_Adindan_UTM_zone_38N"},
+ {20248, "PCS_AGD66_AMG_zone_48"},
+ {20249, "PCS_AGD66_AMG_zone_49"},
+ {20250, "PCS_AGD66_AMG_zone_50"},
+ {20251, "PCS_AGD66_AMG_zone_51"},
+ {20252, "PCS_AGD66_AMG_zone_52"},
+ {20253, "PCS_AGD66_AMG_zone_53"},
+ {20254, "PCS_AGD66_AMG_zone_54"},
+ {20255, "PCS_AGD66_AMG_zone_55"},
+ {20256, "PCS_AGD66_AMG_zone_56"},
+ {20257, "PCS_AGD66_AMG_zone_57"},
+ {20258, "PCS_AGD66_AMG_zone_58"},
+ {20348, "PCS_AGD84_AMG_zone_48"},
+ {20349, "PCS_AGD84_AMG_zone_49"},
+ {20350, "PCS_AGD84_AMG_zone_50"},
+ {20351, "PCS_AGD84_AMG_zone_51"},
+ {20352, "PCS_AGD84_AMG_zone_52"},
+ {20353, "PCS_AGD84_AMG_zone_53"},
+ {20354, "PCS_AGD84_AMG_zone_54"},
+ {20355, "PCS_AGD84_AMG_zone_55"},
+ {20356, "PCS_AGD84_AMG_zone_56"},
+ {20357, "PCS_AGD84_AMG_zone_57"},
+ {20358, "PCS_AGD84_AMG_zone_58"},
+ {20437, "PCS_Ain_el_Abd_UTM_zone_37N"},
+ {20438, "PCS_Ain_el_Abd_UTM_zone_38N"},
+ {20439, "PCS_Ain_el_Abd_UTM_zone_39N"},
+ {20499, "PCS_Ain_el_Abd_Bahrain_Grid"},
+ {20538, "PCS_Afgooye_UTM_zone_38N"},
+ {20539, "PCS_Afgooye_UTM_zone_39N"},
+ {20700, "PCS_Lisbon_Portugese_Grid"},
+ {20822, "PCS_Aratu_UTM_zone_22S"},
+ {20823, "PCS_Aratu_UTM_zone_23S"},
+ {20824, "PCS_Aratu_UTM_zone_24S"},
+ {20973, "PCS_Arc_1950_Lo13"},
+ {20975, "PCS_Arc_1950_Lo15"},
+ {20977, "PCS_Arc_1950_Lo17"},
+ {20979, "PCS_Arc_1950_Lo19"},
+ {20981, "PCS_Arc_1950_Lo21"},
+ {20983, "PCS_Arc_1950_Lo23"},
+ {20985, "PCS_Arc_1950_Lo25"},
+ {20987, "PCS_Arc_1950_Lo27"},
+ {20989, "PCS_Arc_1950_Lo29"},
+ {20991, "PCS_Arc_1950_Lo31"},
+ {20993, "PCS_Arc_1950_Lo33"},
+ {20995, "PCS_Arc_1950_Lo35"},
+ {21100, "PCS_Batavia_NEIEZ"},
+ {21148, "PCS_Batavia_UTM_zone_48S"},
+ {21149, "PCS_Batavia_UTM_zone_49S"},
+ {21150, "PCS_Batavia_UTM_zone_50S"},
+ {21413, "PCS_Beijing_Gauss_zone_13"},
+ {21414, "PCS_Beijing_Gauss_zone_14"},
+ {21415, "PCS_Beijing_Gauss_zone_15"},
+ {21416, "PCS_Beijing_Gauss_zone_16"},
+ {21417, "PCS_Beijing_Gauss_zone_17"},
+ {21418, "PCS_Beijing_Gauss_zone_18"},
+ {21419, "PCS_Beijing_Gauss_zone_19"},
+ {21420, "PCS_Beijing_Gauss_zone_20"},
+ {21421, "PCS_Beijing_Gauss_zone_21"},
+ {21422, "PCS_Beijing_Gauss_zone_22"},
+ {21423, "PCS_Beijing_Gauss_zone_23"},
+ {21473, "PCS_Beijing_Gauss_13N"},
+ {21474, "PCS_Beijing_Gauss_14N"},
+ {21475, "PCS_Beijing_Gauss_15N"},
+ {21476, "PCS_Beijing_Gauss_16N"},
+ {21477, "PCS_Beijing_Gauss_17N"},
+ {21478, "PCS_Beijing_Gauss_18N"},
+ {21479, "PCS_Beijing_Gauss_19N"},
+ {21480, "PCS_Beijing_Gauss_20N"},
+ {21481, "PCS_Beijing_Gauss_21N"},
+ {21482, "PCS_Beijing_Gauss_22N"},
+ {21483, "PCS_Beijing_Gauss_23N"},
+ {21500, "PCS_Belge_Lambert_50"},
+ {21790, "PCS_Bern_1898_Swiss_Old"},
+ {21817, "PCS_Bogota_UTM_zone_17N"},
+ {21818, "PCS_Bogota_UTM_zone_18N"},
+ {21891, "PCS_Bogota_Colombia_3W"},
+ {21892, "PCS_Bogota_Colombia_Bogota"},
+ {21893, "PCS_Bogota_Colombia_3E"},
+ {21894, "PCS_Bogota_Colombia_6E"},
+ {22032, "PCS_Camacupa_UTM_32S"},
+ {22033, "PCS_Camacupa_UTM_33S"},
+ {22191, "PCS_C_Inchauspe_Argentina_1"},
+ {22192, "PCS_C_Inchauspe_Argentina_2"},
+ {22193, "PCS_C_Inchauspe_Argentina_3"},
+ {22194, "PCS_C_Inchauspe_Argentina_4"},
+ {22195, "PCS_C_Inchauspe_Argentina_5"},
+ {22196, "PCS_C_Inchauspe_Argentina_6"},
+ {22197, "PCS_C_Inchauspe_Argentina_7"},
+ {22332, "PCS_Carthage_UTM_zone_32N"},
+ {22391, "PCS_Carthage_Nord_Tunisie"},
+ {22392, "PCS_Carthage_Sud_Tunisie"},
+ {22523, "PCS_Corrego_Alegre_UTM_23S"},
+ {22524, "PCS_Corrego_Alegre_UTM_24S"},
+ {22832, "PCS_Douala_UTM_zone_32N"},
+ {22992, "PCS_Egypt_1907_Red_Belt"},
+ {22993, "PCS_Egypt_1907_Purple_Belt"},
+ {22994, "PCS_Egypt_1907_Ext_Purple"},
+ {23028, "PCS_ED50_UTM_zone_28N"},
+ {23029, "PCS_ED50_UTM_zone_29N"},
+ {23030, "PCS_ED50_UTM_zone_30N"},
+ {23031, "PCS_ED50_UTM_zone_31N"},
+ {23032, "PCS_ED50_UTM_zone_32N"},
+ {23033, "PCS_ED50_UTM_zone_33N"},
+ {23034, "PCS_ED50_UTM_zone_34N"},
+ {23035, "PCS_ED50_UTM_zone_35N"},
+ {23036, "PCS_ED50_UTM_zone_36N"},
+ {23037, "PCS_ED50_UTM_zone_37N"},
+ {23038, "PCS_ED50_UTM_zone_38N"},
+ {23239, "PCS_Fahud_UTM_zone_39N"},
+ {23240, "PCS_Fahud_UTM_zone_40N"},
+ {23433, "PCS_Garoua_UTM_zone_33N"},
+ {23846, "PCS_ID74_UTM_zone_46N"},
+ {23847, "PCS_ID74_UTM_zone_47N"},
+ {23848, "PCS_ID74_UTM_zone_48N"},
+ {23849, "PCS_ID74_UTM_zone_49N"},
+ {23850, "PCS_ID74_UTM_zone_50N"},
+ {23851, "PCS_ID74_UTM_zone_51N"},
+ {23852, "PCS_ID74_UTM_zone_52N"},
+ {23853, "PCS_ID74_UTM_zone_53N"},
+ {23886, "PCS_ID74_UTM_zone_46S"},
+ {23887, "PCS_ID74_UTM_zone_47S"},
+ {23888, "PCS_ID74_UTM_zone_48S"},
+ {23889, "PCS_ID74_UTM_zone_49S"},
+ {23890, "PCS_ID74_UTM_zone_50S"},
+ {23891, "PCS_ID74_UTM_zone_51S"},
+ {23892, "PCS_ID74_UTM_zone_52S"},
+ {23893, "PCS_ID74_UTM_zone_53S"},
+ {23894, "PCS_ID74_UTM_zone_54S"},
+ {23947, "PCS_Indian_1954_UTM_47N"},
+ {23948, "PCS_Indian_1954_UTM_48N"},
+ {24047, "PCS_Indian_1975_UTM_47N"},
+ {24048, "PCS_Indian_1975_UTM_48N"},
+ {24100, "PCS_Jamaica_1875_Old_Grid"},
+ {24200, "PCS_JAD69_Jamaica_Grid"},
+ {24370, "PCS_Kalianpur_India_0"},
+ {24371, "PCS_Kalianpur_India_I"},
+ {24372, "PCS_Kalianpur_India_IIa"},
+ {24373, "PCS_Kalianpur_India_IIIa"},
+ {24374, "PCS_Kalianpur_India_IVa"},
+ {24382, "PCS_Kalianpur_India_IIb"},
+ {24383, "PCS_Kalianpur_India_IIIb"},
+ {24384, "PCS_Kalianpur_India_IVb"},
+ {24500, "PCS_Kertau_Singapore_Grid"},
+ {24547, "PCS_Kertau_UTM_zone_47N"},
+ {24548, "PCS_Kertau_UTM_zone_48N"},
+ {24720, "PCS_La_Canoa_UTM_zone_20N"},
+ {24721, "PCS_La_Canoa_UTM_zone_21N"},
+ {24818, "PCS_PSAD56_UTM_zone_18N"},
+ {24819, "PCS_PSAD56_UTM_zone_19N"},
+ {24820, "PCS_PSAD56_UTM_zone_20N"},
+ {24821, "PCS_PSAD56_UTM_zone_21N"},
+ {24877, "PCS_PSAD56_UTM_zone_17S"},
+ {24878, "PCS_PSAD56_UTM_zone_18S"},
+ {24879, "PCS_PSAD56_UTM_zone_19S"},
+ {24880, "PCS_PSAD56_UTM_zone_20S"},
+ {24891, "PCS_PSAD56_Peru_west_zone"},
+ {24892, "PCS_PSAD56_Peru_central"},
+ {24893, "PCS_PSAD56_Peru_east_zone"},
+ {25000, "PCS_Leigon_Ghana_Grid"},
+ {25231, "PCS_Lome_UTM_zone_31N"},
+ {25391, "PCS_Luzon_Philippines_I"},
+ {25392, "PCS_Luzon_Philippines_II"},
+ {25393, "PCS_Luzon_Philippines_III"},
+ {25394, "PCS_Luzon_Philippines_IV"},
+ {25395, "PCS_Luzon_Philippines_V"},
+ {25700, "PCS_Makassar_NEIEZ"},
+ {25932, "PCS_Malongo_1987_UTM_32S"},
+ {26191, "PCS_Merchich_Nord_Maroc"},
+ {26192, "PCS_Merchich_Sud_Maroc"},
+ {26193, "PCS_Merchich_Sahara"},
+ {26237, "PCS_Massawa_UTM_zone_37N"},
+ {26331, "PCS_Minna_UTM_zone_31N"},
+ {26332, "PCS_Minna_UTM_zone_32N"},
+ {26391, "PCS_Minna_Nigeria_West"},
+ {26392, "PCS_Minna_Nigeria_Mid_Belt"},
+ {26393, "PCS_Minna_Nigeria_East"},
+ {26432, "PCS_Mhast_UTM_zone_32S"},
+ {26591, "PCS_Monte_Mario_Italy_1"},
+ {26592, "PCS_Monte_Mario_Italy_2"},
+ {26632, "PCS_M_poraloko_UTM_32N"},
+ {26692, "PCS_M_poraloko_UTM_32S"},
+ {26703, "PCS_NAD27_UTM_zone_3N"},
+ {26704, "PCS_NAD27_UTM_zone_4N"},
+ {26705, "PCS_NAD27_UTM_zone_5N"},
+ {26706, "PCS_NAD27_UTM_zone_6N"},
+ {26707, "PCS_NAD27_UTM_zone_7N"},
+ {26708, "PCS_NAD27_UTM_zone_8N"},
+ {26709, "PCS_NAD27_UTM_zone_9N"},
+ {26710, "PCS_NAD27_UTM_zone_10N"},
+ {26711, "PCS_NAD27_UTM_zone_11N"},
+ {26712, "PCS_NAD27_UTM_zone_12N"},
+ {26713, "PCS_NAD27_UTM_zone_13N"},
+ {26714, "PCS_NAD27_UTM_zone_14N"},
+ {26715, "PCS_NAD27_UTM_zone_15N"},
+ {26716, "PCS_NAD27_UTM_zone_16N"},
+ {26717, "PCS_NAD27_UTM_zone_17N"},
+ {26718, "PCS_NAD27_UTM_zone_18N"},
+ {26719, "PCS_NAD27_UTM_zone_19N"},
+ {26720, "PCS_NAD27_UTM_zone_20N"},
+ {26721, "PCS_NAD27_UTM_zone_21N"},
+ {26722, "PCS_NAD27_UTM_zone_22N"},
+ {26729, "PCS_NAD27_Alabama_East"},
+ {26730, "PCS_NAD27_Alabama_West"},
+ {26731, "PCS_NAD27_Alaska_zone_1"},
+ {26732, "PCS_NAD27_Alaska_zone_2"},
+ {26733, "PCS_NAD27_Alaska_zone_3"},
+ {26734, "PCS_NAD27_Alaska_zone_4"},
+ {26735, "PCS_NAD27_Alaska_zone_5"},
+ {26736, "PCS_NAD27_Alaska_zone_6"},
+ {26737, "PCS_NAD27_Alaska_zone_7"},
+ {26738, "PCS_NAD27_Alaska_zone_8"},
+ {26739, "PCS_NAD27_Alaska_zone_9"},
+ {26740, "PCS_NAD27_Alaska_zone_10"},
+ {26741, "PCS_NAD27_California_I"},
+ {26742, "PCS_NAD27_California_II"},
+ {26743, "PCS_NAD27_California_III"},
+ {26744, "PCS_NAD27_California_IV"},
+ {26745, "PCS_NAD27_California_V"},
+ {26746, "PCS_NAD27_California_VI"},
+ {26747, "PCS_NAD27_California_VII"},
+ {26748, "PCS_NAD27_Arizona_East"},
+ {26749, "PCS_NAD27_Arizona_Central"},
+ {26750, "PCS_NAD27_Arizona_West"},
+ {26751, "PCS_NAD27_Arkansas_North"},
+ {26752, "PCS_NAD27_Arkansas_South"},
+ {26753, "PCS_NAD27_Colorado_North"},
+ {26754, "PCS_NAD27_Colorado_Central"},
+ {26755, "PCS_NAD27_Colorado_South"},
+ {26756, "PCS_NAD27_Connecticut"},
+ {26757, "PCS_NAD27_Delaware"},
+ {26758, "PCS_NAD27_Florida_East"},
+ {26759, "PCS_NAD27_Florida_West"},
+ {26760, "PCS_NAD27_Florida_North"},
+ {26761, "PCS_NAD27_Hawaii_zone_1"},
+ {26762, "PCS_NAD27_Hawaii_zone_2"},
+ {26763, "PCS_NAD27_Hawaii_zone_3"},
+ {26764, "PCS_NAD27_Hawaii_zone_4"},
+ {26765, "PCS_NAD27_Hawaii_zone_5"},
+ {26766, "PCS_NAD27_Georgia_East"},
+ {26767, "PCS_NAD27_Georgia_West"},
+ {26768, "PCS_NAD27_Idaho_East"},
+ {26769, "PCS_NAD27_Idaho_Central"},
+ {26770, "PCS_NAD27_Idaho_West"},
+ {26771, "PCS_NAD27_Illinois_East"},
+ {26772, "PCS_NAD27_Illinois_West"},
+ {26773, "PCS_NAD27_Indiana_East"},
+ {26774, "PCS_NAD27_BLM_14N_feet"},
+ {26774, "PCS_NAD27_Indiana_West"},
+ {26775, "PCS_NAD27_BLM_15N_feet"},
+ {26775, "PCS_NAD27_Iowa_North"},
+ {26776, "PCS_NAD27_BLM_16N_feet"},
+ {26776, "PCS_NAD27_Iowa_South"},
+ {26777, "PCS_NAD27_BLM_17N_feet"},
+ {26777, "PCS_NAD27_Kansas_North"},
+ {26778, "PCS_NAD27_Kansas_South"},
+ {26779, "PCS_NAD27_Kentucky_North"},
+ {26780, "PCS_NAD27_Kentucky_South"},
+ {26781, "PCS_NAD27_Louisiana_North"},
+ {26782, "PCS_NAD27_Louisiana_South"},
+ {26783, "PCS_NAD27_Maine_East"},
+ {26784, "PCS_NAD27_Maine_West"},
+ {26785, "PCS_NAD27_Maryland"},
+ {26786, "PCS_NAD27_Massachusetts"},
+ {26787, "PCS_NAD27_Massachusetts_Is"},
+ {26788, "PCS_NAD27_Michigan_North"},
+ {26789, "PCS_NAD27_Michigan_Central"},
+ {26790, "PCS_NAD27_Michigan_South"},
+ {26791, "PCS_NAD27_Minnesota_North"},
+ {26792, "PCS_NAD27_Minnesota_Cent"},
+ {26793, "PCS_NAD27_Minnesota_South"},
+ {26794, "PCS_NAD27_Mississippi_East"},
+ {26795, "PCS_NAD27_Mississippi_West"},
+ {26796, "PCS_NAD27_Missouri_East"},
+ {26797, "PCS_NAD27_Missouri_Central"},
+ {26798, "PCS_NAD27_Missouri_West"},
+ {26801, "PCS_NAD_Michigan_Michigan_East"},
+ {26802, "PCS_NAD_Michigan_Michigan_Old_Central"},
+ {26803, "PCS_NAD_Michigan_Michigan_West"},
+ {26903, "PCS_NAD83_UTM_zone_3N"},
+ {26904, "PCS_NAD83_UTM_zone_4N"},
+ {26905, "PCS_NAD83_UTM_zone_5N"},
+ {26906, "PCS_NAD83_UTM_zone_6N"},
+ {26907, "PCS_NAD83_UTM_zone_7N"},
+ {26908, "PCS_NAD83_UTM_zone_8N"},
+ {26909, "PCS_NAD83_UTM_zone_9N"},
+ {26910, "PCS_NAD83_UTM_zone_10N"},
+ {26911, "PCS_NAD83_UTM_zone_11N"},
+ {26912, "PCS_NAD83_UTM_zone_12N"},
+ {26913, "PCS_NAD83_UTM_zone_13N"},
+ {26914, "PCS_NAD83_UTM_zone_14N"},
+ {26915, "PCS_NAD83_UTM_zone_15N"},
+ {26916, "PCS_NAD83_UTM_zone_16N"},
+ {26917, "PCS_NAD83_UTM_zone_17N"},
+ {26918, "PCS_NAD83_UTM_zone_18N"},
+ {26919, "PCS_NAD83_UTM_zone_19N"},
+ {26920, "PCS_NAD83_UTM_zone_20N"},
+ {26921, "PCS_NAD83_UTM_zone_21N"},
+ {26922, "PCS_NAD83_UTM_zone_22N"},
+ {26923, "PCS_NAD83_UTM_zone_23N"},
+ {26929, "PCS_NAD83_Alabama_East"},
+ {26930, "PCS_NAD83_Alabama_West"},
+ {26931, "PCS_NAD83_Alaska_zone_1"},
+ {26932, "PCS_NAD83_Alaska_zone_2"},
+ {26933, "PCS_NAD83_Alaska_zone_3"},
+ {26934, "PCS_NAD83_Alaska_zone_4"},
+ {26935, "PCS_NAD83_Alaska_zone_5"},
+ {26936, "PCS_NAD83_Alaska_zone_6"},
+ {26937, "PCS_NAD83_Alaska_zone_7"},
+ {26938, "PCS_NAD83_Alaska_zone_8"},
+ {26939, "PCS_NAD83_Alaska_zone_9"},
+ {26940, "PCS_NAD83_Alaska_zone_10"},
+ {26941, "PCS_NAD83_California_1"},
+ {26942, "PCS_NAD83_California_2"},
+ {26943, "PCS_NAD83_California_3"},
+ {26944, "PCS_NAD83_California_4"},
+ {26945, "PCS_NAD83_California_5"},
+ {26946, "PCS_NAD83_California_6"},
+ {26948, "PCS_NAD83_Arizona_East"},
+ {26949, "PCS_NAD83_Arizona_Central"},
+ {26950, "PCS_NAD83_Arizona_West"},
+ {26951, "PCS_NAD83_Arkansas_North"},
+ {26952, "PCS_NAD83_Arkansas_South"},
+ {26953, "PCS_NAD83_Colorado_North"},
+ {26954, "PCS_NAD83_Colorado_Central"},
+ {26955, "PCS_NAD83_Colorado_South"},
+ {26956, "PCS_NAD83_Connecticut"},
+ {26957, "PCS_NAD83_Delaware"},
+ {26958, "PCS_NAD83_Florida_East"},
+ {26959, "PCS_NAD83_Florida_West"},
+ {26960, "PCS_NAD83_Florida_North"},
+ {26961, "PCS_NAD83_Hawaii_zone_1"},
+ {26962, "PCS_NAD83_Hawaii_zone_2"},
+ {26963, "PCS_NAD83_Hawaii_zone_3"},
+ {26964, "PCS_NAD83_Hawaii_zone_4"},
+ {26965, "PCS_NAD83_Hawaii_zone_5"},
+ {26966, "PCS_NAD83_Georgia_East"},
+ {26967, "PCS_NAD83_Georgia_West"},
+ {26968, "PCS_NAD83_Idaho_East"},
+ {26969, "PCS_NAD83_Idaho_Central"},
+ {26970, "PCS_NAD83_Idaho_West"},
+ {26971, "PCS_NAD83_Illinois_East"},
+ {26972, "PCS_NAD83_Illinois_West"},
+ {26973, "PCS_NAD83_Indiana_East"},
+ {26974, "PCS_NAD83_Indiana_West"},
+ {26975, "PCS_NAD83_Iowa_North"},
+ {26976, "PCS_NAD83_Iowa_South"},
+ {26977, "PCS_NAD83_Kansas_North"},
+ {26978, "PCS_NAD83_Kansas_South"},
+ {26979, "PCS_NAD83_Kentucky_North"},
+ {26980, "PCS_NAD83_Kentucky_South"},
+ {26981, "PCS_NAD83_Louisiana_North"},
+ {26982, "PCS_NAD83_Louisiana_South"},
+ {26983, "PCS_NAD83_Maine_East"},
+ {26984, "PCS_NAD83_Maine_West"},
+ {26985, "PCS_NAD83_Maryland"},
+ {26986, "PCS_NAD83_Massachusetts"},
+ {26987, "PCS_NAD83_Massachusetts_Is"},
+ {26988, "PCS_NAD83_Michigan_North"},
+ {26989, "PCS_NAD83_Michigan_Central"},
+ {26990, "PCS_NAD83_Michigan_South"},
+ {26991, "PCS_NAD83_Minnesota_North"},
+ {26992, "PCS_NAD83_Minnesota_Cent"},
+ {26993, "PCS_NAD83_Minnesota_South"},
+ {26994, "PCS_NAD83_Mississippi_East"},
+ {26995, "PCS_NAD83_Mississippi_West"},
+ {26996, "PCS_NAD83_Missouri_East"},
+ {26997, "PCS_NAD83_Missouri_Central"},
+ {26998, "PCS_NAD83_Missouri_West"},
+ {27038, "PCS_Nahrwan_1967_UTM_38N"},
+ {27039, "PCS_Nahrwan_1967_UTM_39N"},
+ {27040, "PCS_Nahrwan_1967_UTM_40N"},
+ {27120, "PCS_Naparima_UTM_20N"},
+ {27200, "PCS_GD49_NZ_Map_Grid"},
+ {27291, "PCS_GD49_North_Island_Grid"},
+ {27292, "PCS_GD49_South_Island_Grid"},
+ {27429, "PCS_Datum_73_UTM_zone_29N"},
+ {27500, "PCS_ATF_Nord_de_Guerre"},
+ {27581, "PCS_NTF_France_I"},
+ {27582, "PCS_NTF_France_II"},
+ {27583, "PCS_NTF_France_III"},
+ {27591, "PCS_NTF_Nord_France"},
+ {27592, "PCS_NTF_Centre_France"},
+ {27593, "PCS_NTF_Sud_France"},
+ {27700, "PCS_British_National_Grid"},
+ {28232, "PCS_Point_Noire_UTM_32S"},
+ {28348, "PCS_GDA94_MGA_zone_48"},
+ {28349, "PCS_GDA94_MGA_zone_49"},
+ {28350, "PCS_GDA94_MGA_zone_50"},
+ {28351, "PCS_GDA94_MGA_zone_51"},
+ {28352, "PCS_GDA94_MGA_zone_52"},
+ {28353, "PCS_GDA94_MGA_zone_53"},
+ {28354, "PCS_GDA94_MGA_zone_54"},
+ {28355, "PCS_GDA94_MGA_zone_55"},
+ {28356, "PCS_GDA94_MGA_zone_56"},
+ {28357, "PCS_GDA94_MGA_zone_57"},
+ {28358, "PCS_GDA94_MGA_zone_58"},
+ {28404, "PCS_Pulkovo_Gauss_zone_4"},
+ {28405, "PCS_Pulkovo_Gauss_zone_5"},
+ {28406, "PCS_Pulkovo_Gauss_zone_6"},
+ {28407, "PCS_Pulkovo_Gauss_zone_7"},
+ {28408, "PCS_Pulkovo_Gauss_zone_8"},
+ {28409, "PCS_Pulkovo_Gauss_zone_9"},
+ {28410, "PCS_Pulkovo_Gauss_zone_10"},
+ {28411, "PCS_Pulkovo_Gauss_zone_11"},
+ {28412, "PCS_Pulkovo_Gauss_zone_12"},
+ {28413, "PCS_Pulkovo_Gauss_zone_13"},
+ {28414, "PCS_Pulkovo_Gauss_zone_14"},
+ {28415, "PCS_Pulkovo_Gauss_zone_15"},
+ {28416, "PCS_Pulkovo_Gauss_zone_16"},
+ {28417, "PCS_Pulkovo_Gauss_zone_17"},
+ {28418, "PCS_Pulkovo_Gauss_zone_18"},
+ {28419, "PCS_Pulkovo_Gauss_zone_19"},
+ {28420, "PCS_Pulkovo_Gauss_zone_20"},
+ {28421, "PCS_Pulkovo_Gauss_zone_21"},
+ {28422, "PCS_Pulkovo_Gauss_zone_22"},
+ {28423, "PCS_Pulkovo_Gauss_zone_23"},
+ {28424, "PCS_Pulkovo_Gauss_zone_24"},
+ {28425, "PCS_Pulkovo_Gauss_zone_25"},
+ {28426, "PCS_Pulkovo_Gauss_zone_26"},
+ {28427, "PCS_Pulkovo_Gauss_zone_27"},
+ {28428, "PCS_Pulkovo_Gauss_zone_28"},
+ {28429, "PCS_Pulkovo_Gauss_zone_29"},
+ {28430, "PCS_Pulkovo_Gauss_zone_30"},
+ {28431, "PCS_Pulkovo_Gauss_zone_31"},
+ {28432, "PCS_Pulkovo_Gauss_zone_32"},
+ {28464, "PCS_Pulkovo_Gauss_4N"},
+ {28465, "PCS_Pulkovo_Gauss_5N"},
+ {28466, "PCS_Pulkovo_Gauss_6N"},
+ {28467, "PCS_Pulkovo_Gauss_7N"},
+ {28468, "PCS_Pulkovo_Gauss_8N"},
+ {28469, "PCS_Pulkovo_Gauss_9N"},
+ {28470, "PCS_Pulkovo_Gauss_10N"},
+ {28471, "PCS_Pulkovo_Gauss_11N"},
+ {28472, "PCS_Pulkovo_Gauss_12N"},
+ {28473, "PCS_Pulkovo_Gauss_13N"},
+ {28474, "PCS_Pulkovo_Gauss_14N"},
+ {28475, "PCS_Pulkovo_Gauss_15N"},
+ {28476, "PCS_Pulkovo_Gauss_16N"},
+ {28477, "PCS_Pulkovo_Gauss_17N"},
+ {28478, "PCS_Pulkovo_Gauss_18N"},
+ {28479, "PCS_Pulkovo_Gauss_19N"},
+ {28480, "PCS_Pulkovo_Gauss_20N"},
+ {28481, "PCS_Pulkovo_Gauss_21N"},
+ {28482, "PCS_Pulkovo_Gauss_22N"},
+ {28483, "PCS_Pulkovo_Gauss_23N"},
+ {28484, "PCS_Pulkovo_Gauss_24N"},
+ {28485, "PCS_Pulkovo_Gauss_25N"},
+ {28486, "PCS_Pulkovo_Gauss_26N"},
+ {28487, "PCS_Pulkovo_Gauss_27N"},
+ {28488, "PCS_Pulkovo_Gauss_28N"},
+ {28489, "PCS_Pulkovo_Gauss_29N"},
+ {28490, "PCS_Pulkovo_Gauss_30N"},
+ {28491, "PCS_Pulkovo_Gauss_31N"},
+ {28492, "PCS_Pulkovo_Gauss_32N"},
+ {28600, "PCS_Qatar_National_Grid"},
+ {28991, "PCS_RD_Netherlands_Old"},
+ {28992, "PCS_RD_Netherlands_New"},
+ {29118, "PCS_SAD69_UTM_zone_18N"},
+ {29119, "PCS_SAD69_UTM_zone_19N"},
+ {29120, "PCS_SAD69_UTM_zone_20N"},
+ {29121, "PCS_SAD69_UTM_zone_21N"},
+ {29122, "PCS_SAD69_UTM_zone_22N"},
+ {29177, "PCS_SAD69_UTM_zone_17S"},
+ {29178, "PCS_SAD69_UTM_zone_18S"},
+ {29179, "PCS_SAD69_UTM_zone_19S"},
+ {29180, "PCS_SAD69_UTM_zone_20S"},
+ {29181, "PCS_SAD69_UTM_zone_21S"},
+ {29182, "PCS_SAD69_UTM_zone_22S"},
+ {29183, "PCS_SAD69_UTM_zone_23S"},
+ {29184, "PCS_SAD69_UTM_zone_24S"},
+ {29185, "PCS_SAD69_UTM_zone_25S"},
+ {29220, "PCS_Sapper_Hill_UTM_20S"},
+ {29221, "PCS_Sapper_Hill_UTM_21S"},
+ {29333, "PCS_Schwarzeck_UTM_33S"},
+ {29635, "PCS_Sudan_UTM_zone_35N"},
+ {29636, "PCS_Sudan_UTM_zone_36N"},
+ {29700, "PCS_Tananarive_Laborde"},
+ {29738, "PCS_Tananarive_UTM_38S"},
+ {29739, "PCS_Tananarive_UTM_39S"},
+ {29800, "PCS_Timbalai_1948_Borneo"},
+ {29849, "PCS_Timbalai_1948_UTM_49N"},
+ {29850, "PCS_Timbalai_1948_UTM_50N"},
+ {29900, "PCS_TM65_Irish_Nat_Grid"},
+ {30200, "PCS_Trinidad_1903_Trinidad"},
+ {30339, "PCS_TC_1948_UTM_zone_39N"},
+ {30340, "PCS_TC_1948_UTM_zone_40N"},
+ {30491, "PCS_Voirol_N_Algerie_ancien"},
+ {30492, "PCS_Voirol_S_Algerie_ancien"},
+ {30591, "PCS_Voirol_Unifie_N_Algerie"},
+ {30592, "PCS_Voirol_Unifie_S_Algerie"},
+ {30600, "PCS_Bern_1938_Swiss_New"},
+ {30729, "PCS_Nord_Sahara_UTM_29N"},
+ {30730, "PCS_Nord_Sahara_UTM_30N"},
+ {30731, "PCS_Nord_Sahara_UTM_31N"},
+ {30732, "PCS_Nord_Sahara_UTM_32N"},
+ {31028, "PCS_Yoff_UTM_zone_28N"},
+ {31121, "PCS_Zanderij_UTM_zone_21N"},
+ {31291, "PCS_MGI_Austria_West"},
+ {31292, "PCS_MGI_Austria_Central"},
+ {31293, "PCS_MGI_Austria_East"},
+ {31300, "PCS_Belge_Lambert_72"},
+ {31491, "PCS_DHDN_Germany_zone_1"},
+ {31492, "PCS_DHDN_Germany_zone_2"},
+ {31493, "PCS_DHDN_Germany_zone_3"},
+ {31494, "PCS_DHDN_Germany_zone_4"},
+ {31495, "PCS_DHDN_Germany_zone_5"},
+ {32001, "PCS_NAD27_Montana_North"},
+ {32002, "PCS_NAD27_Montana_Central"},
+ {32003, "PCS_NAD27_Montana_South"},
+ {32005, "PCS_NAD27_Nebraska_North"},
+ {32006, "PCS_NAD27_Nebraska_South"},
+ {32007, "PCS_NAD27_Nevada_East"},
+ {32008, "PCS_NAD27_Nevada_Central"},
+ {32009, "PCS_NAD27_Nevada_West"},
+ {32010, "PCS_NAD27_New_Hampshire"},
+ {32011, "PCS_NAD27_New_Jersey"},
+ {32012, "PCS_NAD27_New_Mexico_East"},
+ {32013, "PCS_NAD27_New_Mexico_Cent"},
+ {32014, "PCS_NAD27_New_Mexico_West"},
+ {32015, "PCS_NAD27_New_York_East"},
+ {32016, "PCS_NAD27_New_York_Central"},
+ {32017, "PCS_NAD27_New_York_West"},
+ {32018, "PCS_NAD27_New_York_Long_Is"},
+ {32019, "PCS_NAD27_North_Carolina"},
+ {32020, "PCS_NAD27_North_Dakota_N"},
+ {32021, "PCS_NAD27_North_Dakota_S"},
+ {32022, "PCS_NAD27_Ohio_North"},
+ {32023, "PCS_NAD27_Ohio_South"},
+ {32024, "PCS_NAD27_Oklahoma_North"},
+ {32025, "PCS_NAD27_Oklahoma_South"},
+ {32026, "PCS_NAD27_Oregon_North"},
+ {32027, "PCS_NAD27_Oregon_South"},
+ {32028, "PCS_NAD27_Pennsylvania_N"},
+ {32029, "PCS_NAD27_Pennsylvania_S"},
+ {32030, "PCS_NAD27_Rhode_Island"},
+ {32031, "PCS_NAD27_South_Carolina_N"},
+ {32033, "PCS_NAD27_South_Carolina_S"},
+ {32034, "PCS_NAD27_South_Dakota_N"},
+ {32035, "PCS_NAD27_South_Dakota_S"},
+ {32036, "PCS_NAD27_Tennessee"},
+ {32037, "PCS_NAD27_Texas_North"},
+ {32038, "PCS_NAD27_Texas_North_Cen"},
+ {32039, "PCS_NAD27_Texas_Central"},
+ {32040, "PCS_NAD27_Texas_South_Cen"},
+ {32041, "PCS_NAD27_Texas_South"},
+ {32042, "PCS_NAD27_Utah_North"},
+ {32043, "PCS_NAD27_Utah_Central"},
+ {32044, "PCS_NAD27_Utah_South"},
+ {32045, "PCS_NAD27_Vermont"},
+ {32046, "PCS_NAD27_Virginia_North"},
+ {32047, "PCS_NAD27_Virginia_South"},
+ {32048, "PCS_NAD27_Washington_North"},
+ {32049, "PCS_NAD27_Washington_South"},
+ {32050, "PCS_NAD27_West_Virginia_N"},
+ {32051, "PCS_NAD27_West_Virginia_S"},
+ {32052, "PCS_NAD27_Wisconsin_North"},
+ {32053, "PCS_NAD27_Wisconsin_Cen"},
+ {32054, "PCS_NAD27_Wisconsin_South"},
+ {32055, "PCS_NAD27_Wyoming_East"},
+ {32056, "PCS_NAD27_Wyoming_E_Cen"},
+ {32057, "PCS_NAD27_Wyoming_W_Cen"},
+ {32058, "PCS_NAD27_Wyoming_West"},
+ {32059, "PCS_NAD27_Puerto_Rico"},
+ {32060, "PCS_NAD27_St_Croix"},
+ {32100, "PCS_NAD83_Montana"},
+ {32104, "PCS_NAD83_Nebraska"},
+ {32107, "PCS_NAD83_Nevada_East"},
+ {32108, "PCS_NAD83_Nevada_Central"},
+ {32109, "PCS_NAD83_Nevada_West"},
+ {32110, "PCS_NAD83_New_Hampshire"},
+ {32111, "PCS_NAD83_New_Jersey"},
+ {32112, "PCS_NAD83_New_Mexico_East"},
+ {32113, "PCS_NAD83_New_Mexico_Cent"},
+ {32114, "PCS_NAD83_New_Mexico_West"},
+ {32115, "PCS_NAD83_New_York_East"},
+ {32116, "PCS_NAD83_New_York_Central"},
+ {32117, "PCS_NAD83_New_York_West"},
+ {32118, "PCS_NAD83_New_York_Long_Is"},
+ {32119, "PCS_NAD83_North_Carolina"},
+ {32120, "PCS_NAD83_North_Dakota_N"},
+ {32121, "PCS_NAD83_North_Dakota_S"},
+ {32122, "PCS_NAD83_Ohio_North"},
+ {32123, "PCS_NAD83_Ohio_South"},
+ {32124, "PCS_NAD83_Oklahoma_North"},
+ {32125, "PCS_NAD83_Oklahoma_South"},
+ {32126, "PCS_NAD83_Oregon_North"},
+ {32127, "PCS_NAD83_Oregon_South"},
+ {32128, "PCS_NAD83_Pennsylvania_N"},
+ {32129, "PCS_NAD83_Pennsylvania_S"},
+ {32130, "PCS_NAD83_Rhode_Island"},
+ {32133, "PCS_NAD83_South_Carolina"},
+ {32134, "PCS_NAD83_South_Dakota_N"},
+ {32135, "PCS_NAD83_South_Dakota_S"},
+ {32136, "PCS_NAD83_Tennessee"},
+ {32137, "PCS_NAD83_Texas_North"},
+ {32138, "PCS_NAD83_Texas_North_Cen"},
+ {32139, "PCS_NAD83_Texas_Central"},
+ {32140, "PCS_NAD83_Texas_South_Cen"},
+ {32141, "PCS_NAD83_Texas_South"},
+ {32142, "PCS_NAD83_Utah_North"},
+ {32143, "PCS_NAD83_Utah_Central"},
+ {32144, "PCS_NAD83_Utah_South"},
+ {32145, "PCS_NAD83_Vermont"},
+ {32146, "PCS_NAD83_Virginia_North"},
+ {32147, "PCS_NAD83_Virginia_South"},
+ {32148, "PCS_NAD83_Washington_North"},
+ {32149, "PCS_NAD83_Washington_South"},
+ {32150, "PCS_NAD83_West_Virginia_N"},
+ {32151, "PCS_NAD83_West_Virginia_S"},
+ {32152, "PCS_NAD83_Wisconsin_North"},
+ {32153, "PCS_NAD83_Wisconsin_Cen"},
+ {32154, "PCS_NAD83_Wisconsin_South"},
+ {32155, "PCS_NAD83_Wyoming_East"},
+ {32156, "PCS_NAD83_Wyoming_E_Cen"},
+ {32157, "PCS_NAD83_Wyoming_W_Cen"},
+ {32158, "PCS_NAD83_Wyoming_West"},
+ {32161, "PCS_NAD83_Puerto_Rico_Virgin_Is"},
+ {32201, "PCS_WGS72_UTM_zone_1N"},
+ {32202, "PCS_WGS72_UTM_zone_2N"},
+ {32203, "PCS_WGS72_UTM_zone_3N"},
+ {32204, "PCS_WGS72_UTM_zone_4N"},
+ {32205, "PCS_WGS72_UTM_zone_5N"},
+ {32206, "PCS_WGS72_UTM_zone_6N"},
+ {32207, "PCS_WGS72_UTM_zone_7N"},
+ {32208, "PCS_WGS72_UTM_zone_8N"},
+ {32209, "PCS_WGS72_UTM_zone_9N"},
+ {32210, "PCS_WGS72_UTM_zone_10N"},
+ {32211, "PCS_WGS72_UTM_zone_11N"},
+ {32212, "PCS_WGS72_UTM_zone_12N"},
+ {32213, "PCS_WGS72_UTM_zone_13N"},
+ {32214, "PCS_WGS72_UTM_zone_14N"},
+ {32215, "PCS_WGS72_UTM_zone_15N"},
+ {32216, "PCS_WGS72_UTM_zone_16N"},
+ {32217, "PCS_WGS72_UTM_zone_17N"},
+ {32218, "PCS_WGS72_UTM_zone_18N"},
+ {32219, "PCS_WGS72_UTM_zone_19N"},
+ {32220, "PCS_WGS72_UTM_zone_20N"},
+ {32221, "PCS_WGS72_UTM_zone_21N"},
+ {32222, "PCS_WGS72_UTM_zone_22N"},
+ {32223, "PCS_WGS72_UTM_zone_23N"},
+ {32224, "PCS_WGS72_UTM_zone_24N"},
+ {32225, "PCS_WGS72_UTM_zone_25N"},
+ {32226, "PCS_WGS72_UTM_zone_26N"},
+ {32227, "PCS_WGS72_UTM_zone_27N"},
+ {32228, "PCS_WGS72_UTM_zone_28N"},
+ {32229, "PCS_WGS72_UTM_zone_29N"},
+ {32230, "PCS_WGS72_UTM_zone_30N"},
+ {32231, "PCS_WGS72_UTM_zone_31N"},
+ {32232, "PCS_WGS72_UTM_zone_32N"},
+ {32233, "PCS_WGS72_UTM_zone_33N"},
+ {32234, "PCS_WGS72_UTM_zone_34N"},
+ {32235, "PCS_WGS72_UTM_zone_35N"},
+ {32236, "PCS_WGS72_UTM_zone_36N"},
+ {32237, "PCS_WGS72_UTM_zone_37N"},
+ {32238, "PCS_WGS72_UTM_zone_38N"},
+ {32239, "PCS_WGS72_UTM_zone_39N"},
+ {32240, "PCS_WGS72_UTM_zone_40N"},
+ {32241, "PCS_WGS72_UTM_zone_41N"},
+ {32242, "PCS_WGS72_UTM_zone_42N"},
+ {32243, "PCS_WGS72_UTM_zone_43N"},
+ {32244, "PCS_WGS72_UTM_zone_44N"},
+ {32245, "PCS_WGS72_UTM_zone_45N"},
+ {32246, "PCS_WGS72_UTM_zone_46N"},
+ {32247, "PCS_WGS72_UTM_zone_47N"},
+ {32248, "PCS_WGS72_UTM_zone_48N"},
+ {32249, "PCS_WGS72_UTM_zone_49N"},
+ {32250, "PCS_WGS72_UTM_zone_50N"},
+ {32251, "PCS_WGS72_UTM_zone_51N"},
+ {32252, "PCS_WGS72_UTM_zone_52N"},
+ {32253, "PCS_WGS72_UTM_zone_53N"},
+ {32254, "PCS_WGS72_UTM_zone_54N"},
+ {32255, "PCS_WGS72_UTM_zone_55N"},
+ {32256, "PCS_WGS72_UTM_zone_56N"},
+ {32257, "PCS_WGS72_UTM_zone_57N"},
+ {32258, "PCS_WGS72_UTM_zone_58N"},
+ {32259, "PCS_WGS72_UTM_zone_59N"},
+ {32260, "PCS_WGS72_UTM_zone_60N"},
+ {32301, "PCS_WGS72_UTM_zone_1S"},
+ {32302, "PCS_WGS72_UTM_zone_2S"},
+ {32303, "PCS_WGS72_UTM_zone_3S"},
+ {32304, "PCS_WGS72_UTM_zone_4S"},
+ {32305, "PCS_WGS72_UTM_zone_5S"},
+ {32306, "PCS_WGS72_UTM_zone_6S"},
+ {32307, "PCS_WGS72_UTM_zone_7S"},
+ {32308, "PCS_WGS72_UTM_zone_8S"},
+ {32309, "PCS_WGS72_UTM_zone_9S"},
+ {32310, "PCS_WGS72_UTM_zone_10S"},
+ {32311, "PCS_WGS72_UTM_zone_11S"},
+ {32312, "PCS_WGS72_UTM_zone_12S"},
+ {32313, "PCS_WGS72_UTM_zone_13S"},
+ {32314, "PCS_WGS72_UTM_zone_14S"},
+ {32315, "PCS_WGS72_UTM_zone_15S"},
+ {32316, "PCS_WGS72_UTM_zone_16S"},
+ {32317, "PCS_WGS72_UTM_zone_17S"},
+ {32318, "PCS_WGS72_UTM_zone_18S"},
+ {32319, "PCS_WGS72_UTM_zone_19S"},
+ {32320, "PCS_WGS72_UTM_zone_20S"},
+ {32321, "PCS_WGS72_UTM_zone_21S"},
+ {32322, "PCS_WGS72_UTM_zone_22S"},
+ {32323, "PCS_WGS72_UTM_zone_23S"},
+ {32324, "PCS_WGS72_UTM_zone_24S"},
+ {32325, "PCS_WGS72_UTM_zone_25S"},
+ {32326, "PCS_WGS72_UTM_zone_26S"},
+ {32327, "PCS_WGS72_UTM_zone_27S"},
+ {32328, "PCS_WGS72_UTM_zone_28S"},
+ {32329, "PCS_WGS72_UTM_zone_29S"},
+ {32330, "PCS_WGS72_UTM_zone_30S"},
+ {32331, "PCS_WGS72_UTM_zone_31S"},
+ {32332, "PCS_WGS72_UTM_zone_32S"},
+ {32333, "PCS_WGS72_UTM_zone_33S"},
+ {32334, "PCS_WGS72_UTM_zone_34S"},
+ {32335, "PCS_WGS72_UTM_zone_35S"},
+ {32336, "PCS_WGS72_UTM_zone_36S"},
+ {32337, "PCS_WGS72_UTM_zone_37S"},
+ {32338, "PCS_WGS72_UTM_zone_38S"},
+ {32339, "PCS_WGS72_UTM_zone_39S"},
+ {32340, "PCS_WGS72_UTM_zone_40S"},
+ {32341, "PCS_WGS72_UTM_zone_41S"},
+ {32342, "PCS_WGS72_UTM_zone_42S"},
+ {32343, "PCS_WGS72_UTM_zone_43S"},
+ {32344, "PCS_WGS72_UTM_zone_44S"},
+ {32345, "PCS_WGS72_UTM_zone_45S"},
+ {32346, "PCS_WGS72_UTM_zone_46S"},
+ {32347, "PCS_WGS72_UTM_zone_47S"},
+ {32348, "PCS_WGS72_UTM_zone_48S"},
+ {32349, "PCS_WGS72_UTM_zone_49S"},
+ {32350, "PCS_WGS72_UTM_zone_50S"},
+ {32351, "PCS_WGS72_UTM_zone_51S"},
+ {32352, "PCS_WGS72_UTM_zone_52S"},
+ {32353, "PCS_WGS72_UTM_zone_53S"},
+ {32354, "PCS_WGS72_UTM_zone_54S"},
+ {32355, "PCS_WGS72_UTM_zone_55S"},
+ {32356, "PCS_WGS72_UTM_zone_56S"},
+ {32357, "PCS_WGS72_UTM_zone_57S"},
+ {32358, "PCS_WGS72_UTM_zone_58S"},
+ {32359, "PCS_WGS72_UTM_zone_59S"},
+ {32360, "PCS_WGS72_UTM_zone_60S"},
+ {32401, "PCS_WGS72BE_UTM_zone_1N"},
+ {32402, "PCS_WGS72BE_UTM_zone_2N"},
+ {32403, "PCS_WGS72BE_UTM_zone_3N"},
+ {32404, "PCS_WGS72BE_UTM_zone_4N"},
+ {32405, "PCS_WGS72BE_UTM_zone_5N"},
+ {32406, "PCS_WGS72BE_UTM_zone_6N"},
+ {32407, "PCS_WGS72BE_UTM_zone_7N"},
+ {32408, "PCS_WGS72BE_UTM_zone_8N"},
+ {32409, "PCS_WGS72BE_UTM_zone_9N"},
+ {32410, "PCS_WGS72BE_UTM_zone_10N"},
+ {32411, "PCS_WGS72BE_UTM_zone_11N"},
+ {32412, "PCS_WGS72BE_UTM_zone_12N"},
+ {32413, "PCS_WGS72BE_UTM_zone_13N"},
+ {32414, "PCS_WGS72BE_UTM_zone_14N"},
+ {32415, "PCS_WGS72BE_UTM_zone_15N"},
+ {32416, "PCS_WGS72BE_UTM_zone_16N"},
+ {32417, "PCS_WGS72BE_UTM_zone_17N"},
+ {32418, "PCS_WGS72BE_UTM_zone_18N"},
+ {32419, "PCS_WGS72BE_UTM_zone_19N"},
+ {32420, "PCS_WGS72BE_UTM_zone_20N"},
+ {32421, "PCS_WGS72BE_UTM_zone_21N"},
+ {32422, "PCS_WGS72BE_UTM_zone_22N"},
+ {32423, "PCS_WGS72BE_UTM_zone_23N"},
+ {32424, "PCS_WGS72BE_UTM_zone_24N"},
+ {32425, "PCS_WGS72BE_UTM_zone_25N"},
+ {32426, "PCS_WGS72BE_UTM_zone_26N"},
+ {32427, "PCS_WGS72BE_UTM_zone_27N"},
+ {32428, "PCS_WGS72BE_UTM_zone_28N"},
+ {32429, "PCS_WGS72BE_UTM_zone_29N"},
+ {32430, "PCS_WGS72BE_UTM_zone_30N"},
+ {32431, "PCS_WGS72BE_UTM_zone_31N"},
+ {32432, "PCS_WGS72BE_UTM_zone_32N"},
+ {32433, "PCS_WGS72BE_UTM_zone_33N"},
+ {32434, "PCS_WGS72BE_UTM_zone_34N"},
+ {32435, "PCS_WGS72BE_UTM_zone_35N"},
+ {32436, "PCS_WGS72BE_UTM_zone_36N"},
+ {32437, "PCS_WGS72BE_UTM_zone_37N"},
+ {32438, "PCS_WGS72BE_UTM_zone_38N"},
+ {32439, "PCS_WGS72BE_UTM_zone_39N"},
+ {32440, "PCS_WGS72BE_UTM_zone_40N"},
+ {32441, "PCS_WGS72BE_UTM_zone_41N"},
+ {32442, "PCS_WGS72BE_UTM_zone_42N"},
+ {32443, "PCS_WGS72BE_UTM_zone_43N"},
+ {32444, "PCS_WGS72BE_UTM_zone_44N"},
+ {32445, "PCS_WGS72BE_UTM_zone_45N"},
+ {32446, "PCS_WGS72BE_UTM_zone_46N"},
+ {32447, "PCS_WGS72BE_UTM_zone_47N"},
+ {32448, "PCS_WGS72BE_UTM_zone_48N"},
+ {32449, "PCS_WGS72BE_UTM_zone_49N"},
+ {32450, "PCS_WGS72BE_UTM_zone_50N"},
+ {32451, "PCS_WGS72BE_UTM_zone_51N"},
+ {32452, "PCS_WGS72BE_UTM_zone_52N"},
+ {32453, "PCS_WGS72BE_UTM_zone_53N"},
+ {32454, "PCS_WGS72BE_UTM_zone_54N"},
+ {32455, "PCS_WGS72BE_UTM_zone_55N"},
+ {32456, "PCS_WGS72BE_UTM_zone_56N"},
+ {32457, "PCS_WGS72BE_UTM_zone_57N"},
+ {32458, "PCS_WGS72BE_UTM_zone_58N"},
+ {32459, "PCS_WGS72BE_UTM_zone_59N"},
+ {32460, "PCS_WGS72BE_UTM_zone_60N"},
+ {32501, "PCS_WGS72BE_UTM_zone_1S"},
+ {32502, "PCS_WGS72BE_UTM_zone_2S"},
+ {32503, "PCS_WGS72BE_UTM_zone_3S"},
+ {32504, "PCS_WGS72BE_UTM_zone_4S"},
+ {32505, "PCS_WGS72BE_UTM_zone_5S"},
+ {32506, "PCS_WGS72BE_UTM_zone_6S"},
+ {32507, "PCS_WGS72BE_UTM_zone_7S"},
+ {32508, "PCS_WGS72BE_UTM_zone_8S"},
+ {32509, "PCS_WGS72BE_UTM_zone_9S"},
+ {32510, "PCS_WGS72BE_UTM_zone_10S"},
+ {32511, "PCS_WGS72BE_UTM_zone_11S"},
+ {32512, "PCS_WGS72BE_UTM_zone_12S"},
+ {32513, "PCS_WGS72BE_UTM_zone_13S"},
+ {32514, "PCS_WGS72BE_UTM_zone_14S"},
+ {32515, "PCS_WGS72BE_UTM_zone_15S"},
+ {32516, "PCS_WGS72BE_UTM_zone_16S"},
+ {32517, "PCS_WGS72BE_UTM_zone_17S"},
+ {32518, "PCS_WGS72BE_UTM_zone_18S"},
+ {32519, "PCS_WGS72BE_UTM_zone_19S"},
+ {32520, "PCS_WGS72BE_UTM_zone_20S"},
+ {32521, "PCS_WGS72BE_UTM_zone_21S"},
+ {32522, "PCS_WGS72BE_UTM_zone_22S"},
+ {32523, "PCS_WGS72BE_UTM_zone_23S"},
+ {32524, "PCS_WGS72BE_UTM_zone_24S"},
+ {32525, "PCS_WGS72BE_UTM_zone_25S"},
+ {32526, "PCS_WGS72BE_UTM_zone_26S"},
+ {32527, "PCS_WGS72BE_UTM_zone_27S"},
+ {32528, "PCS_WGS72BE_UTM_zone_28S"},
+ {32529, "PCS_WGS72BE_UTM_zone_29S"},
+ {32530, "PCS_WGS72BE_UTM_zone_30S"},
+ {32531, "PCS_WGS72BE_UTM_zone_31S"},
+ {32532, "PCS_WGS72BE_UTM_zone_32S"},
+ {32533, "PCS_WGS72BE_UTM_zone_33S"},
+ {32534, "PCS_WGS72BE_UTM_zone_34S"},
+ {32535, "PCS_WGS72BE_UTM_zone_35S"},
+ {32536, "PCS_WGS72BE_UTM_zone_36S"},
+ {32537, "PCS_WGS72BE_UTM_zone_37S"},
+ {32538, "PCS_WGS72BE_UTM_zone_38S"},
+ {32539, "PCS_WGS72BE_UTM_zone_39S"},
+ {32540, "PCS_WGS72BE_UTM_zone_40S"},
+ {32541, "PCS_WGS72BE_UTM_zone_41S"},
+ {32542, "PCS_WGS72BE_UTM_zone_42S"},
+ {32543, "PCS_WGS72BE_UTM_zone_43S"},
+ {32544, "PCS_WGS72BE_UTM_zone_44S"},
+ {32545, "PCS_WGS72BE_UTM_zone_45S"},
+ {32546, "PCS_WGS72BE_UTM_zone_46S"},
+ {32547, "PCS_WGS72BE_UTM_zone_47S"},
+ {32548, "PCS_WGS72BE_UTM_zone_48S"},
+ {32549, "PCS_WGS72BE_UTM_zone_49S"},
+ {32550, "PCS_WGS72BE_UTM_zone_50S"},
+ {32551, "PCS_WGS72BE_UTM_zone_51S"},
+ {32552, "PCS_WGS72BE_UTM_zone_52S"},
+ {32553, "PCS_WGS72BE_UTM_zone_53S"},
+ {32554, "PCS_WGS72BE_UTM_zone_54S"},
+ {32555, "PCS_WGS72BE_UTM_zone_55S"},
+ {32556, "PCS_WGS72BE_UTM_zone_56S"},
+ {32557, "PCS_WGS72BE_UTM_zone_57S"},
+ {32558, "PCS_WGS72BE_UTM_zone_58S"},
+ {32559, "PCS_WGS72BE_UTM_zone_59S"},
+ {32560, "PCS_WGS72BE_UTM_zone_60S"},
+ {32601, "PCS_WGS84_UTM_zone_1N"},
+ {32602, "PCS_WGS84_UTM_zone_2N"},
+ {32603, "PCS_WGS84_UTM_zone_3N"},
+ {32604, "PCS_WGS84_UTM_zone_4N"},
+ {32605, "PCS_WGS84_UTM_zone_5N"},
+ {32606, "PCS_WGS84_UTM_zone_6N"},
+ {32607, "PCS_WGS84_UTM_zone_7N"},
+ {32608, "PCS_WGS84_UTM_zone_8N"},
+ {32609, "PCS_WGS84_UTM_zone_9N"},
+ {32610, "PCS_WGS84_UTM_zone_10N"},
+ {32611, "PCS_WGS84_UTM_zone_11N"},
+ {32612, "PCS_WGS84_UTM_zone_12N"},
+ {32613, "PCS_WGS84_UTM_zone_13N"},
+ {32614, "PCS_WGS84_UTM_zone_14N"},
+ {32615, "PCS_WGS84_UTM_zone_15N"},
+ {32616, "PCS_WGS84_UTM_zone_16N"},
+ {32617, "PCS_WGS84_UTM_zone_17N"},
+ {32618, "PCS_WGS84_UTM_zone_18N"},
+ {32619, "PCS_WGS84_UTM_zone_19N"},
+ {32620, "PCS_WGS84_UTM_zone_20N"},
+ {32621, "PCS_WGS84_UTM_zone_21N"},
+ {32622, "PCS_WGS84_UTM_zone_22N"},
+ {32623, "PCS_WGS84_UTM_zone_23N"},
+ {32624, "PCS_WGS84_UTM_zone_24N"},
+ {32625, "PCS_WGS84_UTM_zone_25N"},
+ {32626, "PCS_WGS84_UTM_zone_26N"},
+ {32627, "PCS_WGS84_UTM_zone_27N"},
+ {32628, "PCS_WGS84_UTM_zone_28N"},
+ {32629, "PCS_WGS84_UTM_zone_29N"},
+ {32630, "PCS_WGS84_UTM_zone_30N"},
+ {32631, "PCS_WGS84_UTM_zone_31N"},
+ {32632, "PCS_WGS84_UTM_zone_32N"},
+ {32633, "PCS_WGS84_UTM_zone_33N"},
+ {32634, "PCS_WGS84_UTM_zone_34N"},
+ {32635, "PCS_WGS84_UTM_zone_35N"},
+ {32636, "PCS_WGS84_UTM_zone_36N"},
+ {32637, "PCS_WGS84_UTM_zone_37N"},
+ {32638, "PCS_WGS84_UTM_zone_38N"},
+ {32639, "PCS_WGS84_UTM_zone_39N"},
+ {32640, "PCS_WGS84_UTM_zone_40N"},
+ {32641, "PCS_WGS84_UTM_zone_41N"},
+ {32642, "PCS_WGS84_UTM_zone_42N"},
+ {32643, "PCS_WGS84_UTM_zone_43N"},
+ {32644, "PCS_WGS84_UTM_zone_44N"},
+ {32645, "PCS_WGS84_UTM_zone_45N"},
+ {32646, "PCS_WGS84_UTM_zone_46N"},
+ {32647, "PCS_WGS84_UTM_zone_47N"},
+ {32648, "PCS_WGS84_UTM_zone_48N"},
+ {32649, "PCS_WGS84_UTM_zone_49N"},
+ {32650, "PCS_WGS84_UTM_zone_50N"},
+ {32651, "PCS_WGS84_UTM_zone_51N"},
+ {32652, "PCS_WGS84_UTM_zone_52N"},
+ {32653, "PCS_WGS84_UTM_zone_53N"},
+ {32654, "PCS_WGS84_UTM_zone_54N"},
+ {32655, "PCS_WGS84_UTM_zone_55N"},
+ {32656, "PCS_WGS84_UTM_zone_56N"},
+ {32657, "PCS_WGS84_UTM_zone_57N"},
+ {32658, "PCS_WGS84_UTM_zone_58N"},
+ {32659, "PCS_WGS84_UTM_zone_59N"},
+ {32660, "PCS_WGS84_UTM_zone_60N"},
+ {32701, "PCS_WGS84_UTM_zone_1S"},
+ {32702, "PCS_WGS84_UTM_zone_2S"},
+ {32703, "PCS_WGS84_UTM_zone_3S"},
+ {32704, "PCS_WGS84_UTM_zone_4S"},
+ {32705, "PCS_WGS84_UTM_zone_5S"},
+ {32706, "PCS_WGS84_UTM_zone_6S"},
+ {32707, "PCS_WGS84_UTM_zone_7S"},
+ {32708, "PCS_WGS84_UTM_zone_8S"},
+ {32709, "PCS_WGS84_UTM_zone_9S"},
+ {32710, "PCS_WGS84_UTM_zone_10S"},
+ {32711, "PCS_WGS84_UTM_zone_11S"},
+ {32712, "PCS_WGS84_UTM_zone_12S"},
+ {32713, "PCS_WGS84_UTM_zone_13S"},
+ {32714, "PCS_WGS84_UTM_zone_14S"},
+ {32715, "PCS_WGS84_UTM_zone_15S"},
+ {32716, "PCS_WGS84_UTM_zone_16S"},
+ {32717, "PCS_WGS84_UTM_zone_17S"},
+ {32718, "PCS_WGS84_UTM_zone_18S"},
+ {32719, "PCS_WGS84_UTM_zone_19S"},
+ {32720, "PCS_WGS84_UTM_zone_20S"},
+ {32721, "PCS_WGS84_UTM_zone_21S"},
+ {32722, "PCS_WGS84_UTM_zone_22S"},
+ {32723, "PCS_WGS84_UTM_zone_23S"},
+ {32724, "PCS_WGS84_UTM_zone_24S"},
+ {32725, "PCS_WGS84_UTM_zone_25S"},
+ {32726, "PCS_WGS84_UTM_zone_26S"},
+ {32727, "PCS_WGS84_UTM_zone_27S"},
+ {32728, "PCS_WGS84_UTM_zone_28S"},
+ {32729, "PCS_WGS84_UTM_zone_29S"},
+ {32730, "PCS_WGS84_UTM_zone_30S"},
+ {32731, "PCS_WGS84_UTM_zone_31S"},
+ {32732, "PCS_WGS84_UTM_zone_32S"},
+ {32733, "PCS_WGS84_UTM_zone_33S"},
+ {32734, "PCS_WGS84_UTM_zone_34S"},
+ {32735, "PCS_WGS84_UTM_zone_35S"},
+ {32736, "PCS_WGS84_UTM_zone_36S"},
+ {32737, "PCS_WGS84_UTM_zone_37S"},
+ {32738, "PCS_WGS84_UTM_zone_38S"},
+ {32739, "PCS_WGS84_UTM_zone_39S"},
+ {32740, "PCS_WGS84_UTM_zone_40S"},
+ {32741, "PCS_WGS84_UTM_zone_41S"},
+ {32742, "PCS_WGS84_UTM_zone_42S"},
+ {32743, "PCS_WGS84_UTM_zone_43S"},
+ {32744, "PCS_WGS84_UTM_zone_44S"},
+ {32745, "PCS_WGS84_UTM_zone_45S"},
+ {32746, "PCS_WGS84_UTM_zone_46S"},
+ {32747, "PCS_WGS84_UTM_zone_47S"},
+ {32748, "PCS_WGS84_UTM_zone_48S"},
+ {32749, "PCS_WGS84_UTM_zone_49S"},
+ {32750, "PCS_WGS84_UTM_zone_50S"},
+ {32751, "PCS_WGS84_UTM_zone_51S"},
+ {32752, "PCS_WGS84_UTM_zone_52S"},
+ {32753, "PCS_WGS84_UTM_zone_53S"},
+ {32754, "PCS_WGS84_UTM_zone_54S"},
+ {32755, "PCS_WGS84_UTM_zone_55S"},
+ {32756, "PCS_WGS84_UTM_zone_56S"},
+ {32757, "PCS_WGS84_UTM_zone_57S"},
+ {32758, "PCS_WGS84_UTM_zone_58S"},
+ {32759, "PCS_WGS84_UTM_zone_59S"},
+ {32760, "PCS_WGS84_UTM_zone_60S"}
+};
+
+const TiffGeoTagKeyName ff_tiff_projection_codes[] = {
+ {10101, "Proj_Alabama_CS27_East"},
+ {10102, "Proj_Alabama_CS27_West"},
+ {10131, "Proj_Alabama_CS83_East"},
+ {10132, "Proj_Alabama_CS83_West"},
+ {10201, "Proj_Arizona_Coordinate_System_east"},
+ {10202, "Proj_Arizona_Coordinate_System_Central"},
+ {10203, "Proj_Arizona_Coordinate_System_west"},
+ {10231, "Proj_Arizona_CS83_east"},
+ {10232, "Proj_Arizona_CS83_Central"},
+ {10233, "Proj_Arizona_CS83_west"},
+ {10301, "Proj_Arkansas_CS27_North"},
+ {10302, "Proj_Arkansas_CS27_South"},
+ {10331, "Proj_Arkansas_CS83_North"},
+ {10332, "Proj_Arkansas_CS83_South"},
+ {10401, "Proj_California_CS27_I"},
+ {10402, "Proj_California_CS27_II"},
+ {10403, "Proj_California_CS27_III"},
+ {10404, "Proj_California_CS27_IV"},
+ {10405, "Proj_California_CS27_V"},
+ {10406, "Proj_California_CS27_VI"},
+ {10407, "Proj_California_CS27_VII"},
+ {10431, "Proj_California_CS83_1"},
+ {10432, "Proj_California_CS83_2"},
+ {10433, "Proj_California_CS83_3"},
+ {10434, "Proj_California_CS83_4"},
+ {10435, "Proj_California_CS83_5"},
+ {10436, "Proj_California_CS83_6"},
+ {10501, "Proj_Colorado_CS27_North"},
+ {10502, "Proj_Colorado_CS27_Central"},
+ {10503, "Proj_Colorado_CS27_South"},
+ {10531, "Proj_Colorado_CS83_North"},
+ {10532, "Proj_Colorado_CS83_Central"},
+ {10533, "Proj_Colorado_CS83_South"},
+ {10600, "Proj_Connecticut_CS27"},
+ {10630, "Proj_Connecticut_CS83"},
+ {10700, "Proj_Delaware_CS27"},
+ {10730, "Proj_Delaware_CS83"},
+ {10901, "Proj_Florida_CS27_East"},
+ {10902, "Proj_Florida_CS27_West"},
+ {10903, "Proj_Florida_CS27_North"},
+ {10931, "Proj_Florida_CS83_East"},
+ {10932, "Proj_Florida_CS83_West"},
+ {10933, "Proj_Florida_CS83_North"},
+ {11001, "Proj_Georgia_CS27_East"},
+ {11002, "Proj_Georgia_CS27_West"},
+ {11031, "Proj_Georgia_CS83_East"},
+ {11032, "Proj_Georgia_CS83_West"},
+ {11101, "Proj_Idaho_CS27_East"},
+ {11102, "Proj_Idaho_CS27_Central"},
+ {11103, "Proj_Idaho_CS27_West"},
+ {11131, "Proj_Idaho_CS83_East"},
+ {11132, "Proj_Idaho_CS83_Central"},
+ {11133, "Proj_Idaho_CS83_West"},
+ {11201, "Proj_Illinois_CS27_East"},
+ {11202, "Proj_Illinois_CS27_West"},
+ {11231, "Proj_Illinois_CS83_East"},
+ {11232, "Proj_Illinois_CS83_West"},
+ {11301, "Proj_Indiana_CS27_East"},
+ {11302, "Proj_Indiana_CS27_West"},
+ {11331, "Proj_Indiana_CS83_East"},
+ {11332, "Proj_Indiana_CS83_West"},
+ {11401, "Proj_Iowa_CS27_North"},
+ {11402, "Proj_Iowa_CS27_South"},
+ {11431, "Proj_Iowa_CS83_North"},
+ {11432, "Proj_Iowa_CS83_South"},
+ {11501, "Proj_Kansas_CS27_North"},
+ {11502, "Proj_Kansas_CS27_South"},
+ {11531, "Proj_Kansas_CS83_North"},
+ {11532, "Proj_Kansas_CS83_South"},
+ {11601, "Proj_Kentucky_CS27_North"},
+ {11602, "Proj_Kentucky_CS27_South"},
+ {11631, "Proj_Kentucky_CS83_North"},
+ {11632, "Proj_Kentucky_CS83_South"},
+ {11701, "Proj_Louisiana_CS27_North"},
+ {11702, "Proj_Louisiana_CS27_South"},
+ {11731, "Proj_Louisiana_CS83_North"},
+ {11732, "Proj_Louisiana_CS83_South"},
+ {11801, "Proj_Maine_CS27_East"},
+ {11802, "Proj_Maine_CS27_West"},
+ {11831, "Proj_Maine_CS83_East"},
+ {11832, "Proj_Maine_CS83_West"},
+ {11900, "Proj_Maryland_CS27"},
+ {11930, "Proj_Maryland_CS83"},
+ {12001, "Proj_Massachusetts_CS27_Mainland"},
+ {12002, "Proj_Massachusetts_CS27_Island"},
+ {12031, "Proj_Massachusetts_CS83_Mainland"},
+ {12032, "Proj_Massachusetts_CS83_Island"},
+ {12101, "Proj_Michigan_State_Plane_East"},
+ {12102, "Proj_Michigan_State_Plane_Old_Central"},
+ {12103, "Proj_Michigan_State_Plane_West"},
+ {12111, "Proj_Michigan_CS27_North"},
+ {12112, "Proj_Michigan_CS27_Central"},
+ {12113, "Proj_Michigan_CS27_South"},
+ {12141, "Proj_Michigan_CS83_North"},
+ {12142, "Proj_Michigan_CS83_Central"},
+ {12143, "Proj_Michigan_CS83_South"},
+ {12201, "Proj_Minnesota_CS27_North"},
+ {12202, "Proj_Minnesota_CS27_Central"},
+ {12203, "Proj_Minnesota_CS27_South"},
+ {12231, "Proj_Minnesota_CS83_North"},
+ {12232, "Proj_Minnesota_CS83_Central"},
+ {12233, "Proj_Minnesota_CS83_South"},
+ {12301, "Proj_Mississippi_CS27_East"},
+ {12302, "Proj_Mississippi_CS27_West"},
+ {12331, "Proj_Mississippi_CS83_East"},
+ {12332, "Proj_Mississippi_CS83_West"},
+ {12401, "Proj_Missouri_CS27_East"},
+ {12402, "Proj_Missouri_CS27_Central"},
+ {12403, "Proj_Missouri_CS27_West"},
+ {12431, "Proj_Missouri_CS83_East"},
+ {12432, "Proj_Missouri_CS83_Central"},
+ {12433, "Proj_Missouri_CS83_West"},
+ {12501, "Proj_Montana_CS27_North"},
+ {12502, "Proj_Montana_CS27_Central"},
+ {12503, "Proj_Montana_CS27_South"},
+ {12530, "Proj_Montana_CS83"},
+ {12601, "Proj_Nebraska_CS27_North"},
+ {12602, "Proj_Nebraska_CS27_South"},
+ {12630, "Proj_Nebraska_CS83"},
+ {12701, "Proj_Nevada_CS27_East"},
+ {12702, "Proj_Nevada_CS27_Central"},
+ {12703, "Proj_Nevada_CS27_West"},
+ {12731, "Proj_Nevada_CS83_East"},
+ {12732, "Proj_Nevada_CS83_Central"},
+ {12733, "Proj_Nevada_CS83_West"},
+ {12800, "Proj_New_Hampshire_CS27"},
+ {12830, "Proj_New_Hampshire_CS83"},
+ {12900, "Proj_New_Jersey_CS27"},
+ {12930, "Proj_New_Jersey_CS83"},
+ {13001, "Proj_New_Mexico_CS27_East"},
+ {13002, "Proj_New_Mexico_CS27_Central"},
+ {13003, "Proj_New_Mexico_CS27_West"},
+ {13031, "Proj_New_Mexico_CS83_East"},
+ {13032, "Proj_New_Mexico_CS83_Central"},
+ {13033, "Proj_New_Mexico_CS83_West"},
+ {13101, "Proj_New_York_CS27_East"},
+ {13102, "Proj_New_York_CS27_Central"},
+ {13103, "Proj_New_York_CS27_West"},
+ {13104, "Proj_New_York_CS27_Long_Island"},
+ {13131, "Proj_New_York_CS83_East"},
+ {13132, "Proj_New_York_CS83_Central"},
+ {13133, "Proj_New_York_CS83_West"},
+ {13134, "Proj_New_York_CS83_Long_Island"},
+ {13200, "Proj_North_Carolina_CS27"},
+ {13230, "Proj_North_Carolina_CS83"},
+ {13301, "Proj_North_Dakota_CS27_North"},
+ {13302, "Proj_North_Dakota_CS27_South"},
+ {13331, "Proj_North_Dakota_CS83_North"},
+ {13332, "Proj_North_Dakota_CS83_South"},
+ {13401, "Proj_Ohio_CS27_North"},
+ {13402, "Proj_Ohio_CS27_South"},
+ {13431, "Proj_Ohio_CS83_North"},
+ {13432, "Proj_Ohio_CS83_South"},
+ {13501, "Proj_Oklahoma_CS27_North"},
+ {13502, "Proj_Oklahoma_CS27_South"},
+ {13531, "Proj_Oklahoma_CS83_North"},
+ {13532, "Proj_Oklahoma_CS83_South"},
+ {13601, "Proj_Oregon_CS27_North"},
+ {13602, "Proj_Oregon_CS27_South"},
+ {13631, "Proj_Oregon_CS83_North"},
+ {13632, "Proj_Oregon_CS83_South"},
+ {13701, "Proj_Pennsylvania_CS27_North"},
+ {13702, "Proj_Pennsylvania_CS27_South"},
+ {13731, "Proj_Pennsylvania_CS83_North"},
+ {13732, "Proj_Pennsylvania_CS83_South"},
+ {13800, "Proj_Rhode_Island_CS27"},
+ {13830, "Proj_Rhode_Island_CS83"},
+ {13901, "Proj_South_Carolina_CS27_North"},
+ {13902, "Proj_South_Carolina_CS27_South"},
+ {13930, "Proj_South_Carolina_CS83"},
+ {14001, "Proj_South_Dakota_CS27_North"},
+ {14002, "Proj_South_Dakota_CS27_South"},
+ {14031, "Proj_South_Dakota_CS83_North"},
+ {14032, "Proj_South_Dakota_CS83_South"},
+ {14100, "Proj_Tennessee_CS27"},
+ {14130, "Proj_Tennessee_CS83"},
+ {14201, "Proj_Texas_CS27_North"},
+ {14202, "Proj_Texas_CS27_North_Central"},
+ {14203, "Proj_Texas_CS27_Central"},
+ {14204, "Proj_Texas_CS27_South_Central"},
+ {14205, "Proj_Texas_CS27_South"},
+ {14231, "Proj_Texas_CS83_North"},
+ {14232, "Proj_Texas_CS83_North_Central"},
+ {14233, "Proj_Texas_CS83_Central"},
+ {14234, "Proj_Texas_CS83_South_Central"},
+ {14235, "Proj_Texas_CS83_South"},
+ {14301, "Proj_Utah_CS27_North"},
+ {14302, "Proj_Utah_CS27_Central"},
+ {14303, "Proj_Utah_CS27_South"},
+ {14331, "Proj_Utah_CS83_North"},
+ {14332, "Proj_Utah_CS83_Central"},
+ {14333, "Proj_Utah_CS83_South"},
+ {14400, "Proj_Vermont_CS27"},
+ {14430, "Proj_Vermont_CS83"},
+ {14501, "Proj_Virginia_CS27_North"},
+ {14502, "Proj_Virginia_CS27_South"},
+ {14531, "Proj_Virginia_CS83_North"},
+ {14532, "Proj_Virginia_CS83_South"},
+ {14601, "Proj_Washington_CS27_North"},
+ {14602, "Proj_Washington_CS27_South"},
+ {14631, "Proj_Washington_CS83_North"},
+ {14632, "Proj_Washington_CS83_South"},
+ {14701, "Proj_West_Virginia_CS27_North"},
+ {14702, "Proj_West_Virginia_CS27_South"},
+ {14731, "Proj_West_Virginia_CS83_North"},
+ {14732, "Proj_West_Virginia_CS83_South"},
+ {14801, "Proj_Wisconsin_CS27_North"},
+ {14802, "Proj_Wisconsin_CS27_Central"},
+ {14803, "Proj_Wisconsin_CS27_South"},
+ {14831, "Proj_Wisconsin_CS83_North"},
+ {14832, "Proj_Wisconsin_CS83_Central"},
+ {14833, "Proj_Wisconsin_CS83_South"},
+ {14901, "Proj_Wyoming_CS27_East"},
+ {14902, "Proj_Wyoming_CS27_East_Central"},
+ {14903, "Proj_Wyoming_CS27_West_Central"},
+ {14904, "Proj_Wyoming_CS27_West"},
+ {14931, "Proj_Wyoming_CS83_East"},
+ {14932, "Proj_Wyoming_CS83_East_Central"},
+ {14933, "Proj_Wyoming_CS83_West_Central"},
+ {14934, "Proj_Wyoming_CS83_West"},
+ {15001, "Proj_Alaska_CS27_1"},
+ {15002, "Proj_Alaska_CS27_2"},
+ {15003, "Proj_Alaska_CS27_3"},
+ {15004, "Proj_Alaska_CS27_4"},
+ {15005, "Proj_Alaska_CS27_5"},
+ {15006, "Proj_Alaska_CS27_6"},
+ {15007, "Proj_Alaska_CS27_7"},
+ {15008, "Proj_Alaska_CS27_8"},
+ {15009, "Proj_Alaska_CS27_9"},
+ {15010, "Proj_Alaska_CS27_10"},
+ {15031, "Proj_Alaska_CS83_1"},
+ {15032, "Proj_Alaska_CS83_2"},
+ {15033, "Proj_Alaska_CS83_3"},
+ {15034, "Proj_Alaska_CS83_4"},
+ {15035, "Proj_Alaska_CS83_5"},
+ {15036, "Proj_Alaska_CS83_6"},
+ {15037, "Proj_Alaska_CS83_7"},
+ {15038, "Proj_Alaska_CS83_8"},
+ {15039, "Proj_Alaska_CS83_9"},
+ {15040, "Proj_Alaska_CS83_10"},
+ {15101, "Proj_Hawaii_CS27_1"},
+ {15102, "Proj_Hawaii_CS27_2"},
+ {15103, "Proj_Hawaii_CS27_3"},
+ {15104, "Proj_Hawaii_CS27_4"},
+ {15105, "Proj_Hawaii_CS27_5"},
+ {15131, "Proj_Hawaii_CS83_1"},
+ {15132, "Proj_Hawaii_CS83_2"},
+ {15133, "Proj_Hawaii_CS83_3"},
+ {15134, "Proj_Hawaii_CS83_4"},
+ {15135, "Proj_Hawaii_CS83_5"},
+ {15201, "Proj_Puerto_Rico_CS27"},
+ {15202, "Proj_St_Croix"},
+ {15230, "Proj_Puerto_Rico_Virgin_Is"},
+ {15914, "Proj_BLM_14N_feet"},
+ {15915, "Proj_BLM_15N_feet"},
+ {15916, "Proj_BLM_16N_feet"},
+ {15917, "Proj_BLM_17N_feet"},
+ {17348, "Proj_Map_Grid_of_Australia_48"},
+ {17349, "Proj_Map_Grid_of_Australia_49"},
+ {17350, "Proj_Map_Grid_of_Australia_50"},
+ {17351, "Proj_Map_Grid_of_Australia_51"},
+ {17352, "Proj_Map_Grid_of_Australia_52"},
+ {17353, "Proj_Map_Grid_of_Australia_53"},
+ {17354, "Proj_Map_Grid_of_Australia_54"},
+ {17355, "Proj_Map_Grid_of_Australia_55"},
+ {17356, "Proj_Map_Grid_of_Australia_56"},
+ {17357, "Proj_Map_Grid_of_Australia_57"},
+ {17358, "Proj_Map_Grid_of_Australia_58"},
+ {17448, "Proj_Australian_Map_Grid_48"},
+ {17449, "Proj_Australian_Map_Grid_49"},
+ {17450, "Proj_Australian_Map_Grid_50"},
+ {17451, "Proj_Australian_Map_Grid_51"},
+ {17452, "Proj_Australian_Map_Grid_52"},
+ {17453, "Proj_Australian_Map_Grid_53"},
+ {17454, "Proj_Australian_Map_Grid_54"},
+ {17455, "Proj_Australian_Map_Grid_55"},
+ {17456, "Proj_Australian_Map_Grid_56"},
+ {17457, "Proj_Australian_Map_Grid_57"},
+ {17458, "Proj_Australian_Map_Grid_58"},
+ {18031, "Proj_Argentina_1"},
+ {18032, "Proj_Argentina_2"},
+ {18033, "Proj_Argentina_3"},
+ {18034, "Proj_Argentina_4"},
+ {18035, "Proj_Argentina_5"},
+ {18036, "Proj_Argentina_6"},
+ {18037, "Proj_Argentina_7"},
+ {18051, "Proj_Colombia_3W"},
+ {18052, "Proj_Colombia_Bogota"},
+ {18053, "Proj_Colombia_3E"},
+ {18054, "Proj_Colombia_6E"},
+ {18072, "Proj_Egypt_Red_Belt"},
+ {18073, "Proj_Egypt_Purple_Belt"},
+ {18074, "Proj_Extended_Purple_Belt"},
+ {18141, "Proj_New_Zealand_North_Island_Nat_Grid"},
+ {18142, "Proj_New_Zealand_South_Island_Nat_Grid"},
+ {19900, "Proj_Bahrain_Grid"},
+ {19905, "Proj_Netherlands_E_Indies_Equatorial"},
+ {19912, "Proj_RSO_Borneo"}
+};
+
+const char *const ff_tiff_coord_trans_codes[] = {
+ "CT_TransverseMercator",
+ "CT_TransvMercator_Modified_Alaska",
+ "CT_ObliqueMercator",
+ "CT_ObliqueMercator_Laborde",
+ "CT_ObliqueMercator_Rosenmund",
+ "CT_ObliqueMercator_Spherical",
+ "CT_Mercator",
+ "CT_LambertConfConic_2SP",
+ "CT_LambertConfConic_Helmert",
+ "CT_LambertAzimEqualArea",
+ "CT_AlbersEqualArea",
+ "CT_AzimuthalEquidistant",
+ "CT_EquidistantConic",
+ "CT_Stereographic",
+ "CT_PolarStereographic",
+ "CT_ObliqueStereographic",
+ "CT_Equirectangular",
+ "CT_CassiniSoldner",
+ "CT_Gnomonic",
+ "CT_MillerCylindrical",
+ "CT_Orthographic",
+ "CT_Polyconic",
+ "CT_Robinson",
+ "CT_Sinusoidal",
+ "CT_VanDerGrinten",
+ "CT_NewZealandMapGrid",
+ "CT_TransvMercator_SouthOriented"
+};
+
+const char *const ff_tiff_vert_cs_codes[] = {
+ "VertCS_Airy_1830_ellipsoid",
+ "VertCS_Airy_Modified_1849_ellipsoid",
+ "VertCS_ANS_ellipsoid",
+ "VertCS_Bessel_1841_ellipsoid",
+ "VertCS_Bessel_Modified_ellipsoid",
+ "VertCS_Bessel_Namibia_ellipsoid",
+ "VertCS_Clarke_1858_ellipsoid",
+ "VertCS_Clarke_1866_ellipsoid",
+ "VertCS_Clarke_1880_Benoit_ellipsoid",
+ "VertCS_Clarke_1880_IGN_ellipsoid",
+ "VertCS_Clarke_1880_RGS_ellipsoid",
+ "VertCS_Clarke_1880_Arc_ellipsoid",
+ "VertCS_Clarke_1880_SGA_1922_ellipsoid",
+ "VertCS_Everest_1830_1937_Adjustment_ellipsoid",
+ "VertCS_Everest_1830_1967_Definition_ellipsoid",
+ "VertCS_Everest_1830_1975_Definition_ellipsoid",
+ "VertCS_Everest_1830_Modified_ellipsoid",
+ "VertCS_GRS_1980_ellipsoid",
+ "VertCS_Helmert_1906_ellipsoid",
+ "VertCS_INS_ellipsoid",
+ "VertCS_International_1924_ellipsoid",
+ "VertCS_International_1967_ellipsoid",
+ "VertCS_Krassowsky_1940_ellipsoid",
+ "VertCS_NWL_9D_ellipsoid",
+ "VertCS_NWL_10D_ellipsoid",
+ "VertCS_Plessis_1817_ellipsoid",
+ "VertCS_Struve_1860_ellipsoid",
+ "VertCS_War_Office_ellipsoid",
+ "VertCS_WGS_84_ellipsoid",
+ "VertCS_GEM_10C_ellipsoid",
+ "VertCS_OSU86F_ellipsoid",
+ "VertCS_OSU91A_ellipsoid"
+};
+
+const char *const ff_tiff_ortho_vert_cs_codes[] = {
+ "VertCS_Newlyn",
+ "VertCS_North_American_Vertical_Datum_1929",
+ "VertCS_North_American_Vertical_Datum_1988",
+ "VertCS_Yellow_Sea_1956",
+ "VertCS_Baltic_Sea",
+ "VertCS_Caspian_Sea"
+};
diff --git a/libavcodec/tiff_data.h b/libavcodec/tiff_data.h
index 9b123ca..57515f9 100644
--- a/libavcodec/tiff_data.h
+++ b/libavcodec/tiff_data.h
@@ -33,1863 +33,60 @@
#include "tiff.h"
#define TIFF_CONF_KEY_ID_OFFSET 1024
-static const TiffGeoTagNameType tiff_conf_name_type_map[] = {
- {"GTModelTypeGeoKey", GEOTIFF_SHORT },
- {"GTRasterTypeGeoKey", GEOTIFF_SHORT },
- {"GTCitationGeoKey", GEOTIFF_STRING}
-};
+extern const TiffGeoTagNameType ff_tiff_conf_name_type_map[3];
#define TIFF_GEOG_KEY_ID_OFFSET 2048
-static const TiffGeoTagNameType tiff_geog_name_type_map[] = {
- {"GeographicTypeGeoKey", GEOTIFF_SHORT },
- {"GeogCitationGeoKey", GEOTIFF_STRING},
- {"GeogGeodeticDatumGeoKey", GEOTIFF_SHORT },
- {"GeogPrimeMeridianGeoKey", GEOTIFF_SHORT },
- {"GeogLinearUnitsGeoKey", GEOTIFF_SHORT },
- {"GeogLinearUnitSizeGeoKey", GEOTIFF_DOUBLE},
- {"GeogAngularUnitsGeoKey", GEOTIFF_SHORT },
- {"GeogAngularUnitSizeGeoKey", GEOTIFF_DOUBLE},
- {"GeogEllipsoidGeoKey", GEOTIFF_SHORT },
- {"GeogSemiMajorAxisGeoKey", GEOTIFF_DOUBLE},
- {"GeogSemiMinorAxisGeoKey", GEOTIFF_DOUBLE},
- {"GeogInvFlatteningGeoKey", GEOTIFF_DOUBLE},
- {"GeogAzimuthUnitsGeoKey", GEOTIFF_SHORT },
- {"GeogPrimeMeridianLongGeoKey", GEOTIFF_DOUBLE}
-};
+extern const TiffGeoTagNameType ff_tiff_geog_name_type_map[14];
#define TIFF_PROJ_KEY_ID_OFFSET 3072
-static const TiffGeoTagNameType tiff_proj_name_type_map[] = {
- {"ProjectedCSTypeGeoKey", GEOTIFF_SHORT },
- {"PCSCitationGeoKey", GEOTIFF_STRING},
- {"ProjectionGeoKey", GEOTIFF_SHORT },
- {"ProjCoordTransGeoKey", GEOTIFF_SHORT },
- {"ProjLinearUnitsGeoKey", GEOTIFF_SHORT },
- {"ProjLinearUnitSizeGeoKey", GEOTIFF_DOUBLE},
- {"ProjStdParallel1GeoKey", GEOTIFF_DOUBLE},
- {"ProjStdParallel2GeoKey", GEOTIFF_DOUBLE},
- {"ProjNatOriginLongGeoKey", GEOTIFF_DOUBLE},
- {"ProjNatOriginLatGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseEastingGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseNorthingGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseOriginLongGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseOriginLatGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseOriginEastingGeoKey", GEOTIFF_DOUBLE},
- {"ProjFalseOriginNorthingGeoKey", GEOTIFF_DOUBLE},
- {"ProjCenterLongGeoKey", GEOTIFF_DOUBLE},
- {"ProjCenterLatGeoKey", GEOTIFF_DOUBLE},
- {"ProjCenterEastingGeoKey", GEOTIFF_DOUBLE},
- {"ProjCenterNorthingGeoKey", GEOTIFF_DOUBLE},
- {"ProjScaleAtNatOriginGeoKey", GEOTIFF_DOUBLE},
- {"ProjScaleAtCenterGeoKey", GEOTIFF_DOUBLE},
- {"ProjAzimuthAngleGeoKey", GEOTIFF_DOUBLE},
- {"ProjStraightVertPoleLongGeoKey", GEOTIFF_DOUBLE}
-};
+extern const TiffGeoTagNameType ff_tiff_proj_name_type_map[24];
#define TIFF_VERT_KEY_ID_OFFSET 4096
-static const TiffGeoTagNameType tiff_vert_name_type_map[] = {
- {"VerticalCSTypeGeoKey", GEOTIFF_SHORT },
- {"VerticalCitationGeoKey", GEOTIFF_STRING},
- {"VerticalDatumGeoKey", GEOTIFF_SHORT },
- {"VerticalUnitsGeoKey", GEOTIFF_SHORT }
-};
+extern const TiffGeoTagNameType ff_tiff_vert_name_type_map[4];
#define TIFF_GEO_KEY_UNDEFINED 0
#define TIFF_GEO_KEY_USER_DEFINED 32767
#define TIFF_GT_MODEL_TYPE_OFFSET 1
-static const char *const tiff_gt_model_type_codes[] = {
- "ModelTypeProjected",
- "ModelTypeGeographic",
- "ModelTypeGeocentric"
-};
+extern const char *const ff_tiff_gt_model_type_codes[3];
#define TIFF_GT_RASTER_TYPE_OFFSET 1
-static const char *const tiff_gt_raster_type_codes[] = {
- "RasterPixelIsArea",
- "RasterPixelIsPoint"
-};
+extern const char *const ff_tiff_gt_raster_type_codes[2];
#define TIFF_LINEAR_UNIT_OFFSET 9001
-static const char *const tiff_linear_unit_codes[] = {
- "Linear_Meter",
- "Linear_Foot",
- "Linear_Foot_US_Survey",
- "Linear_Foot_Modified_American",
- "Linear_Foot_Clarke",
- "Linear_Foot_Indian",
- "Linear_Link",
- "Linear_Link_Benoit",
- "Linear_Link_Sears",
- "Linear_Chain_Benoit",
- "Linear_Chain_Sears",
- "Linear_Yard_Sears",
- "Linear_Yard_Indian",
- "Linear_Fathom",
- "Linear_Mile_International_Nautical"
-};
+extern const char *const ff_tiff_linear_unit_codes[15];
#define TIFF_ANGULAR_UNIT_OFFSET 9101
-static const char *const tiff_angular_unit_codes[] = {
- "Angular_Radian",
- "Angular_Degree",
- "Angular_Arc_Minute",
- "Angular_Arc_Second",
- "Angular_Grad",
- "Angular_Gon",
- "Angular_DMS",
- "Angular_DMS_Hemisphere"
-};
+extern const char *const ff_tiff_angular_unit_codes[8];
#define TIFF_GCS_TYPE_OFFSET 4201
-static const char *const tiff_gcs_type_codes[] = {
- "GCS_Adindan",
- "GCS_AGD66",
- "GCS_AGD84",
- "GCS_Ain_el_Abd",
- "GCS_Afgooye",
- "GCS_Agadez",
- "GCS_Lisbon",
- "GCS_Aratu",
- "GCS_Arc_1950",
- "GCS_Arc_1960",
- "GCS_Batavia",
- "GCS_Barbados",
- "GCS_Beduaram",
- "GCS_Beijing_1954",
- "GCS_Belge_1950",
- "GCS_Bermuda_1957",
- "GCS_Bern_1898",
- "GCS_Bogota",
- "GCS_Bukit_Rimpah",
- "GCS_Camacupa",
- "GCS_Campo_Inchauspe",
- "GCS_Cape",
- "GCS_Carthage",
- "GCS_Chua",
- "GCS_Corrego_Alegre",
- "GCS_Cote_d_Ivoire",
- "GCS_Deir_ez_Zor",
- "GCS_Douala",
- "GCS_Egypt_1907",
- "GCS_ED50",
- "GCS_ED87",
- "GCS_Fahud",
- "GCS_Gandajika_1970",
- "GCS_Garoua",
- "GCS_Guyane_Francaise",
- "GCS_Hu_Tzu_Shan",
- "GCS_HD72",
- "GCS_ID74",
- "GCS_Indian_1954",
- "GCS_Indian_1975",
- "GCS_Jamaica_1875",
- "GCS_JAD69",
- "GCS_Kalianpur",
- "GCS_Kandawala",
- "GCS_Kertau",
- "GCS_KOC",
- "GCS_La_Canoa",
- "GCS_PSAD56",
- "GCS_Lake",
- "GCS_Leigon",
- "GCS_Liberia_1964",
- "GCS_Lome",
- "GCS_Luzon_1911",
- "GCS_Hito_XVIII_1963",
- "GCS_Herat_North",
- "GCS_Mahe_1971",
- "GCS_Makassar",
- "GCS_EUREF89",
- "GCS_Malongo_1987",
- "GCS_Manoca",
- "GCS_Merchich",
- "GCS_Massawa",
- "GCS_Minna",
- "GCS_Mhast",
- "GCS_Monte_Mario",
- "GCS_M_poraloko",
- "GCS_NAD27",
- "GCS_NAD_Michigan",
- "GCS_NAD83",
- "GCS_Nahrwan_1967",
- "GCS_Naparima_1972",
- "GCS_GD49",
- "GCS_NGO_1948",
- "GCS_Datum_73",
- "GCS_NTF",
- "GCS_NSWC_9Z_2",
- "GCS_OSGB_1936",
- "GCS_OSGB70",
- "GCS_OS_SN80",
- "GCS_Padang",
- "GCS_Palestine_1923",
- "GCS_Pointe_Noire",
- "GCS_GDA94",
- "GCS_Pulkovo_1942",
- "GCS_Qatar",
- "GCS_Qatar_1948",
- "GCS_Qornoq",
- "GCS_Loma_Quintana",
- "GCS_Amersfoort",
- "GCS_RT38",
- "GCS_SAD69",
- "GCS_Sapper_Hill_1943",
- "GCS_Schwarzeck",
- "GCS_Segora",
- "GCS_Serindung",
- "GCS_Sudan",
- "GCS_Tananarive",
- "GCS_Timbalai_1948",
- "GCS_TM65",
- "GCS_TM75",
- "GCS_Tokyo",
- "GCS_Trinidad_1903",
- "GCS_TC_1948",
- "GCS_Voirol_1875",
- "GCS_Voirol_Unifie",
- "GCS_Bern_1938",
- "GCS_Nord_Sahara_1959",
- "GCS_Stockholm_1938",
- "GCS_Yacare",
- "GCS_Yoff",
- "GCS_Zanderij",
- "GCS_MGI",
- "GCS_Belge_1972",
- "GCS_DHDN",
- "GCS_Conakry_1905",
- "GCS_WGS_72",
- "GCS_WGS_72BE",
- "GCS_WGS_84",
- "GCS_Bern_1898_Bern",
- "GCS_Bogota_Bogota",
- "GCS_Lisbon_Lisbon",
- "GCS_Makassar_Jakarta",
- "GCS_MGI_Ferro",
- "GCS_Monte_Mario_Rome",
- "GCS_NTF_Paris",
- "GCS_Padang_Jakarta",
- "GCS_Belge_1950_Brussels",
- "GCS_Tananarive_Paris",
- "GCS_Voirol_1875_Paris",
- "GCS_Voirol_Unifie_Paris",
- "GCS_Batavia_Jakarta",
- "GCS_ATF_Paris",
- "GCS_NDG_Paris"
-};
+extern const char *const ff_tiff_gcs_type_codes[133];
#define TIFF_GCSE_TYPE_OFFSET 4001
-static const char *const tiff_gcse_type_codes[] = {
- "GCSE_Airy1830",
- "GCSE_AiryModified1849",
- "GCSE_AustralianNationalSpheroid",
- "GCSE_Bessel1841",
- "GCSE_BesselModified",
- "GCSE_BesselNamibia",
- "GCSE_Clarke1858",
- "GCSE_Clarke1866",
- "GCSE_Clarke1866Michigan",
- "GCSE_Clarke1880_Benoit",
- "GCSE_Clarke1880_IGN",
- "GCSE_Clarke1880_RGS",
- "GCSE_Clarke1880_Arc",
- "GCSE_Clarke1880_SGA1922",
- "GCSE_Everest1830_1937Adjustment",
- "GCSE_Everest1830_1967Definition",
- "GCSE_Everest1830_1975Definition",
- "GCSE_Everest1830Modified",
- "GCSE_GRS1980",
- "GCSE_Helmert1906",
- "GCSE_IndonesianNationalSpheroid",
- "GCSE_International1924",
- "GCSE_International1967",
- "GCSE_Krassowsky1940",
- "GCSE_NWL9D",
- "GCSE_NWL10D",
- "GCSE_Plessis1817",
- "GCSE_Struve1860",
- "GCSE_WarOffice",
- "GCSE_WGS84",
- "GCSE_GEM10C",
- "GCSE_OSU86F",
- "GCSE_OSU91A",
- "GCSE_Clarke1880",
- "GCSE_Sphere"
-};
+extern const char *const ff_tiff_gcse_type_codes[35];
#define TIFF_GEODETIC_DATUM_OFFSET 6201
-static const char *const tiff_geodetic_datum_codes[] = {
- "Datum_Adindan",
- "Datum_Australian_Geodetic_Datum_1966",
- "Datum_Australian_Geodetic_Datum_1984",
- "Datum_Ain_el_Abd_1970",
- "Datum_Afgooye",
- "Datum_Agadez",
- "Datum_Lisbon",
- "Datum_Aratu",
- "Datum_Arc_1950",
- "Datum_Arc_1960",
- "Datum_Batavia",
- "Datum_Barbados",
- "Datum_Beduaram",
- "Datum_Beijing_1954",
- "Datum_Reseau_National_Belge_1950",
- "Datum_Bermuda_1957",
- "Datum_Bern_1898",
- "Datum_Bogota",
- "Datum_Bukit_Rimpah",
- "Datum_Camacupa",
- "Datum_Campo_Inchauspe",
- "Datum_Cape",
- "Datum_Carthage",
- "Datum_Chua",
- "Datum_Corrego_Alegre",
- "Datum_Cote_d_Ivoire",
- "Datum_Deir_ez_Zor",
- "Datum_Douala",
- "Datum_Egypt_1907",
- "Datum_European_Datum_1950",
- "Datum_European_Datum_1987",
- "Datum_Fahud",
- "Datum_Gandajika_1970",
- "Datum_Garoua",
- "Datum_Guyane_Francaise",
- "Datum_Hu_Tzu_Shan",
- "Datum_Hungarian_Datum_1972",
- "Datum_Indonesian_Datum_1974",
- "Datum_Indian_1954",
- "Datum_Indian_1975",
- "Datum_Jamaica_1875",
- "Datum_Jamaica_1969",
- "Datum_Kalianpur",
- "Datum_Kandawala",
- "Datum_Kertau",
- "Datum_Kuwait_Oil_Company",
- "Datum_La_Canoa",
- "Datum_Provisional_S_American_Datum_1956",
- "Datum_Lake",
- "Datum_Leigon",
- "Datum_Liberia_1964",
- "Datum_Lome",
- "Datum_Luzon_1911",
- "Datum_Hito_XVIII_1963",
- "Datum_Herat_North",
- "Datum_Mahe_1971",
- "Datum_Makassar",
- "Datum_European_Reference_System_1989",
- "Datum_Malongo_1987",
- "Datum_Manoca",
- "Datum_Merchich",
- "Datum_Massawa",
- "Datum_Minna",
- "Datum_Mhast",
- "Datum_Monte_Mario",
- "Datum_M_poraloko",
- "Datum_North_American_Datum_1927",
- "Datum_NAD_Michigan",
- "Datum_North_American_Datum_1983",
- "Datum_Nahrwan_1967",
- "Datum_Naparima_1972",
- "Datum_New_Zealand_Geodetic_Datum_1949",
- "Datum_NGO_1948",
- "Datum_Datum_73",
- "Datum_Nouvelle_Triangulation_Francaise",
- "Datum_NSWC_9Z_2",
- "Datum_OSGB_1936",
- "Datum_OSGB_1970_SN",
- "Datum_OS_SN_1980",
- "Datum_Padang_1884",
- "Datum_Palestine_1923",
- "Datum_Pointe_Noire",
- "Datum_Geocentric_Datum_of_Australia_1994",
- "Datum_Pulkovo_1942",
- "Datum_Qatar",
- "Datum_Qatar_1948",
- "Datum_Qornoq",
- "Datum_Loma_Quintana",
- "Datum_Amersfoort",
- "Datum_RT38",
- "Datum_South_American_Datum_1969",
- "Datum_Sapper_Hill_1943",
- "Datum_Schwarzeck",
- "Datum_Segora",
- "Datum_Serindung",
- "Datum_Sudan",
- "Datum_Tananarive_1925",
- "Datum_Timbalai_1948",
- "Datum_TM65",
- "Datum_TM75",
- "Datum_Tokyo",
- "Datum_Trinidad_1903",
- "Datum_Trucial_Coast_1948",
- "Datum_Voirol_1875",
- "Datum_Voirol_Unifie_1960",
- "Datum_Bern_1938",
- "Datum_Nord_Sahara_1959",
- "Datum_Stockholm_1938",
- "Datum_Yacare",
- "Datum_Yoff",
- "Datum_Zanderij",
- "Datum_Militar_Geographische_Institut",
- "Datum_Reseau_National_Belge_1972",
- "Datum_Deutsche_Hauptdreiecksnetz",
- "Datum_Conakry_1905",
- "Datum_WGS72",
- "Datum_WGS72_Transit_Broadcast_Ephemeris",
- "Datum_WGS84",
- "Datum_Ancienne_Triangulation_Francaise",
- "Datum_Nord_de_Guerre"
-};
+extern const char *const ff_tiff_geodetic_datum_codes[120];
#define TIFF_GEODETIC_DATUM_E_OFFSET 6001
-static const char *const tiff_geodetic_datum_e_codes[] = {
- "DatumE_Airy1830",
- "DatumE_AiryModified1849",
- "DatumE_AustralianNationalSpheroid",
- "DatumE_Bessel1841",
- "DatumE_BesselModified",
- "DatumE_BesselNamibia",
- "DatumE_Clarke1858",
- "DatumE_Clarke1866",
- "DatumE_Clarke1866Michigan",
- "DatumE_Clarke1880_Benoit",
- "DatumE_Clarke1880_IGN",
- "DatumE_Clarke1880_RGS",
- "DatumE_Clarke1880_Arc",
- "DatumE_Clarke1880_SGA1922",
- "DatumE_Everest1830_1937Adjustment",
- "DatumE_Everest1830_1967Definition",
- "DatumE_Everest1830_1975Definition",
- "DatumE_Everest1830Modified",
- "DatumE_GRS1980",
- "DatumE_Helmert1906",
- "DatumE_IndonesianNationalSpheroid",
- "DatumE_International1924",
- "DatumE_International1967",
- "DatumE_Krassowsky1960",
- "DatumE_NWL9D",
- "DatumE_NWL10D",
- "DatumE_Plessis1817",
- "DatumE_Struve1860",
- "DatumE_WarOffice",
- "DatumE_WGS84",
- "DatumE_GEM10C",
- "DatumE_OSU86F",
- "DatumE_OSU91A",
- "DatumE_Clarke1880",
- "DatumE_Sphere"
-};
+extern const char *const ff_tiff_geodetic_datum_e_codes[35];
#define TIFF_ELLIPSOID_OFFSET 7001
-static const char *const tiff_ellipsoid_codes[] = {
- "Ellipse_Airy_1830",
- "Ellipse_Airy_Modified_1849",
- "Ellipse_Australian_National_Spheroid",
- "Ellipse_Bessel_1841",
- "Ellipse_Bessel_Modified",
- "Ellipse_Bessel_Namibia",
- "Ellipse_Clarke_1858",
- "Ellipse_Clarke_1866",
- "Ellipse_Clarke_1866_Michigan",
- "Ellipse_Clarke_1880_Benoit",
- "Ellipse_Clarke_1880_IGN",
- "Ellipse_Clarke_1880_RGS",
- "Ellipse_Clarke_1880_Arc",
- "Ellipse_Clarke_1880_SGA_1922",
- "Ellipse_Everest_1830_1937_Adjustment",
- "Ellipse_Everest_1830_1967_Definition",
- "Ellipse_Everest_1830_1975_Definition",
- "Ellipse_Everest_1830_Modified",
- "Ellipse_GRS_1980",
- "Ellipse_Helmert_1906",
- "Ellipse_Indonesian_National_Spheroid",
- "Ellipse_International_1924",
- "Ellipse_International_1967",
- "Ellipse_Krassowsky_1940",
- "Ellipse_NWL_9D",
- "Ellipse_NWL_10D",
- "Ellipse_Plessis_1817",
- "Ellipse_Struve_1860",
- "Ellipse_War_Office",
- "Ellipse_WGS_84",
- "Ellipse_GEM_10C",
- "Ellipse_OSU86F",
- "Ellipse_OSU91A",
- "Ellipse_Clarke_1880",
- "Ellipse_Sphere"
-};
+extern const char *const ff_tiff_ellipsoid_codes[35];
#define TIFF_PRIME_MERIDIAN_OFFSET 8901
-static const char *const tiff_prime_meridian_codes[] = {
- "PM_Greenwich",
- "PM_Lisbon",
- "PM_Paris",
- "PM_Bogota",
- "PM_Madrid",
- "PM_Rome",
- "PM_Bern",
- "PM_Jakarta",
- "PM_Ferro",
- "PM_Brussels",
- "PM_Stockholm"
-};
+extern const char *const ff_tiff_prime_meridian_codes[11];
-static const TiffGeoTagKeyName tiff_proj_cs_type_codes[] = {
- {20137, "PCS_Adindan_UTM_zone_37N"},
- {20138, "PCS_Adindan_UTM_zone_38N"},
- {20248, "PCS_AGD66_AMG_zone_48"},
- {20249, "PCS_AGD66_AMG_zone_49"},
- {20250, "PCS_AGD66_AMG_zone_50"},
- {20251, "PCS_AGD66_AMG_zone_51"},
- {20252, "PCS_AGD66_AMG_zone_52"},
- {20253, "PCS_AGD66_AMG_zone_53"},
- {20254, "PCS_AGD66_AMG_zone_54"},
- {20255, "PCS_AGD66_AMG_zone_55"},
- {20256, "PCS_AGD66_AMG_zone_56"},
- {20257, "PCS_AGD66_AMG_zone_57"},
- {20258, "PCS_AGD66_AMG_zone_58"},
- {20348, "PCS_AGD84_AMG_zone_48"},
- {20349, "PCS_AGD84_AMG_zone_49"},
- {20350, "PCS_AGD84_AMG_zone_50"},
- {20351, "PCS_AGD84_AMG_zone_51"},
- {20352, "PCS_AGD84_AMG_zone_52"},
- {20353, "PCS_AGD84_AMG_zone_53"},
- {20354, "PCS_AGD84_AMG_zone_54"},
- {20355, "PCS_AGD84_AMG_zone_55"},
- {20356, "PCS_AGD84_AMG_zone_56"},
- {20357, "PCS_AGD84_AMG_zone_57"},
- {20358, "PCS_AGD84_AMG_zone_58"},
- {20437, "PCS_Ain_el_Abd_UTM_zone_37N"},
- {20438, "PCS_Ain_el_Abd_UTM_zone_38N"},
- {20439, "PCS_Ain_el_Abd_UTM_zone_39N"},
- {20499, "PCS_Ain_el_Abd_Bahrain_Grid"},
- {20538, "PCS_Afgooye_UTM_zone_38N"},
- {20539, "PCS_Afgooye_UTM_zone_39N"},
- {20700, "PCS_Lisbon_Portugese_Grid"},
- {20822, "PCS_Aratu_UTM_zone_22S"},
- {20823, "PCS_Aratu_UTM_zone_23S"},
- {20824, "PCS_Aratu_UTM_zone_24S"},
- {20973, "PCS_Arc_1950_Lo13"},
- {20975, "PCS_Arc_1950_Lo15"},
- {20977, "PCS_Arc_1950_Lo17"},
- {20979, "PCS_Arc_1950_Lo19"},
- {20981, "PCS_Arc_1950_Lo21"},
- {20983, "PCS_Arc_1950_Lo23"},
- {20985, "PCS_Arc_1950_Lo25"},
- {20987, "PCS_Arc_1950_Lo27"},
- {20989, "PCS_Arc_1950_Lo29"},
- {20991, "PCS_Arc_1950_Lo31"},
- {20993, "PCS_Arc_1950_Lo33"},
- {20995, "PCS_Arc_1950_Lo35"},
- {21100, "PCS_Batavia_NEIEZ"},
- {21148, "PCS_Batavia_UTM_zone_48S"},
- {21149, "PCS_Batavia_UTM_zone_49S"},
- {21150, "PCS_Batavia_UTM_zone_50S"},
- {21413, "PCS_Beijing_Gauss_zone_13"},
- {21414, "PCS_Beijing_Gauss_zone_14"},
- {21415, "PCS_Beijing_Gauss_zone_15"},
- {21416, "PCS_Beijing_Gauss_zone_16"},
- {21417, "PCS_Beijing_Gauss_zone_17"},
- {21418, "PCS_Beijing_Gauss_zone_18"},
- {21419, "PCS_Beijing_Gauss_zone_19"},
- {21420, "PCS_Beijing_Gauss_zone_20"},
- {21421, "PCS_Beijing_Gauss_zone_21"},
- {21422, "PCS_Beijing_Gauss_zone_22"},
- {21423, "PCS_Beijing_Gauss_zone_23"},
- {21473, "PCS_Beijing_Gauss_13N"},
- {21474, "PCS_Beijing_Gauss_14N"},
- {21475, "PCS_Beijing_Gauss_15N"},
- {21476, "PCS_Beijing_Gauss_16N"},
- {21477, "PCS_Beijing_Gauss_17N"},
- {21478, "PCS_Beijing_Gauss_18N"},
- {21479, "PCS_Beijing_Gauss_19N"},
- {21480, "PCS_Beijing_Gauss_20N"},
- {21481, "PCS_Beijing_Gauss_21N"},
- {21482, "PCS_Beijing_Gauss_22N"},
- {21483, "PCS_Beijing_Gauss_23N"},
- {21500, "PCS_Belge_Lambert_50"},
- {21790, "PCS_Bern_1898_Swiss_Old"},
- {21817, "PCS_Bogota_UTM_zone_17N"},
- {21818, "PCS_Bogota_UTM_zone_18N"},
- {21891, "PCS_Bogota_Colombia_3W"},
- {21892, "PCS_Bogota_Colombia_Bogota"},
- {21893, "PCS_Bogota_Colombia_3E"},
- {21894, "PCS_Bogota_Colombia_6E"},
- {22032, "PCS_Camacupa_UTM_32S"},
- {22033, "PCS_Camacupa_UTM_33S"},
- {22191, "PCS_C_Inchauspe_Argentina_1"},
- {22192, "PCS_C_Inchauspe_Argentina_2"},
- {22193, "PCS_C_Inchauspe_Argentina_3"},
- {22194, "PCS_C_Inchauspe_Argentina_4"},
- {22195, "PCS_C_Inchauspe_Argentina_5"},
- {22196, "PCS_C_Inchauspe_Argentina_6"},
- {22197, "PCS_C_Inchauspe_Argentina_7"},
- {22332, "PCS_Carthage_UTM_zone_32N"},
- {22391, "PCS_Carthage_Nord_Tunisie"},
- {22392, "PCS_Carthage_Sud_Tunisie"},
- {22523, "PCS_Corrego_Alegre_UTM_23S"},
- {22524, "PCS_Corrego_Alegre_UTM_24S"},
- {22832, "PCS_Douala_UTM_zone_32N"},
- {22992, "PCS_Egypt_1907_Red_Belt"},
- {22993, "PCS_Egypt_1907_Purple_Belt"},
- {22994, "PCS_Egypt_1907_Ext_Purple"},
- {23028, "PCS_ED50_UTM_zone_28N"},
- {23029, "PCS_ED50_UTM_zone_29N"},
- {23030, "PCS_ED50_UTM_zone_30N"},
- {23031, "PCS_ED50_UTM_zone_31N"},
- {23032, "PCS_ED50_UTM_zone_32N"},
- {23033, "PCS_ED50_UTM_zone_33N"},
- {23034, "PCS_ED50_UTM_zone_34N"},
- {23035, "PCS_ED50_UTM_zone_35N"},
- {23036, "PCS_ED50_UTM_zone_36N"},
- {23037, "PCS_ED50_UTM_zone_37N"},
- {23038, "PCS_ED50_UTM_zone_38N"},
- {23239, "PCS_Fahud_UTM_zone_39N"},
- {23240, "PCS_Fahud_UTM_zone_40N"},
- {23433, "PCS_Garoua_UTM_zone_33N"},
- {23846, "PCS_ID74_UTM_zone_46N"},
- {23847, "PCS_ID74_UTM_zone_47N"},
- {23848, "PCS_ID74_UTM_zone_48N"},
- {23849, "PCS_ID74_UTM_zone_49N"},
- {23850, "PCS_ID74_UTM_zone_50N"},
- {23851, "PCS_ID74_UTM_zone_51N"},
- {23852, "PCS_ID74_UTM_zone_52N"},
- {23853, "PCS_ID74_UTM_zone_53N"},
- {23886, "PCS_ID74_UTM_zone_46S"},
- {23887, "PCS_ID74_UTM_zone_47S"},
- {23888, "PCS_ID74_UTM_zone_48S"},
- {23889, "PCS_ID74_UTM_zone_49S"},
- {23890, "PCS_ID74_UTM_zone_50S"},
- {23891, "PCS_ID74_UTM_zone_51S"},
- {23892, "PCS_ID74_UTM_zone_52S"},
- {23893, "PCS_ID74_UTM_zone_53S"},
- {23894, "PCS_ID74_UTM_zone_54S"},
- {23947, "PCS_Indian_1954_UTM_47N"},
- {23948, "PCS_Indian_1954_UTM_48N"},
- {24047, "PCS_Indian_1975_UTM_47N"},
- {24048, "PCS_Indian_1975_UTM_48N"},
- {24100, "PCS_Jamaica_1875_Old_Grid"},
- {24200, "PCS_JAD69_Jamaica_Grid"},
- {24370, "PCS_Kalianpur_India_0"},
- {24371, "PCS_Kalianpur_India_I"},
- {24372, "PCS_Kalianpur_India_IIa"},
- {24373, "PCS_Kalianpur_India_IIIa"},
- {24374, "PCS_Kalianpur_India_IVa"},
- {24382, "PCS_Kalianpur_India_IIb"},
- {24383, "PCS_Kalianpur_India_IIIb"},
- {24384, "PCS_Kalianpur_India_IVb"},
- {24500, "PCS_Kertau_Singapore_Grid"},
- {24547, "PCS_Kertau_UTM_zone_47N"},
- {24548, "PCS_Kertau_UTM_zone_48N"},
- {24720, "PCS_La_Canoa_UTM_zone_20N"},
- {24721, "PCS_La_Canoa_UTM_zone_21N"},
- {24818, "PCS_PSAD56_UTM_zone_18N"},
- {24819, "PCS_PSAD56_UTM_zone_19N"},
- {24820, "PCS_PSAD56_UTM_zone_20N"},
- {24821, "PCS_PSAD56_UTM_zone_21N"},
- {24877, "PCS_PSAD56_UTM_zone_17S"},
- {24878, "PCS_PSAD56_UTM_zone_18S"},
- {24879, "PCS_PSAD56_UTM_zone_19S"},
- {24880, "PCS_PSAD56_UTM_zone_20S"},
- {24891, "PCS_PSAD56_Peru_west_zone"},
- {24892, "PCS_PSAD56_Peru_central"},
- {24893, "PCS_PSAD56_Peru_east_zone"},
- {25000, "PCS_Leigon_Ghana_Grid"},
- {25231, "PCS_Lome_UTM_zone_31N"},
- {25391, "PCS_Luzon_Philippines_I"},
- {25392, "PCS_Luzon_Philippines_II"},
- {25393, "PCS_Luzon_Philippines_III"},
- {25394, "PCS_Luzon_Philippines_IV"},
- {25395, "PCS_Luzon_Philippines_V"},
- {25700, "PCS_Makassar_NEIEZ"},
- {25932, "PCS_Malongo_1987_UTM_32S"},
- {26191, "PCS_Merchich_Nord_Maroc"},
- {26192, "PCS_Merchich_Sud_Maroc"},
- {26193, "PCS_Merchich_Sahara"},
- {26237, "PCS_Massawa_UTM_zone_37N"},
- {26331, "PCS_Minna_UTM_zone_31N"},
- {26332, "PCS_Minna_UTM_zone_32N"},
- {26391, "PCS_Minna_Nigeria_West"},
- {26392, "PCS_Minna_Nigeria_Mid_Belt"},
- {26393, "PCS_Minna_Nigeria_East"},
- {26432, "PCS_Mhast_UTM_zone_32S"},
- {26591, "PCS_Monte_Mario_Italy_1"},
- {26592, "PCS_Monte_Mario_Italy_2"},
- {26632, "PCS_M_poraloko_UTM_32N"},
- {26692, "PCS_M_poraloko_UTM_32S"},
- {26703, "PCS_NAD27_UTM_zone_3N"},
- {26704, "PCS_NAD27_UTM_zone_4N"},
- {26705, "PCS_NAD27_UTM_zone_5N"},
- {26706, "PCS_NAD27_UTM_zone_6N"},
- {26707, "PCS_NAD27_UTM_zone_7N"},
- {26708, "PCS_NAD27_UTM_zone_8N"},
- {26709, "PCS_NAD27_UTM_zone_9N"},
- {26710, "PCS_NAD27_UTM_zone_10N"},
- {26711, "PCS_NAD27_UTM_zone_11N"},
- {26712, "PCS_NAD27_UTM_zone_12N"},
- {26713, "PCS_NAD27_UTM_zone_13N"},
- {26714, "PCS_NAD27_UTM_zone_14N"},
- {26715, "PCS_NAD27_UTM_zone_15N"},
- {26716, "PCS_NAD27_UTM_zone_16N"},
- {26717, "PCS_NAD27_UTM_zone_17N"},
- {26718, "PCS_NAD27_UTM_zone_18N"},
- {26719, "PCS_NAD27_UTM_zone_19N"},
- {26720, "PCS_NAD27_UTM_zone_20N"},
- {26721, "PCS_NAD27_UTM_zone_21N"},
- {26722, "PCS_NAD27_UTM_zone_22N"},
- {26729, "PCS_NAD27_Alabama_East"},
- {26730, "PCS_NAD27_Alabama_West"},
- {26731, "PCS_NAD27_Alaska_zone_1"},
- {26732, "PCS_NAD27_Alaska_zone_2"},
- {26733, "PCS_NAD27_Alaska_zone_3"},
- {26734, "PCS_NAD27_Alaska_zone_4"},
- {26735, "PCS_NAD27_Alaska_zone_5"},
- {26736, "PCS_NAD27_Alaska_zone_6"},
- {26737, "PCS_NAD27_Alaska_zone_7"},
- {26738, "PCS_NAD27_Alaska_zone_8"},
- {26739, "PCS_NAD27_Alaska_zone_9"},
- {26740, "PCS_NAD27_Alaska_zone_10"},
- {26741, "PCS_NAD27_California_I"},
- {26742, "PCS_NAD27_California_II"},
- {26743, "PCS_NAD27_California_III"},
- {26744, "PCS_NAD27_California_IV"},
- {26745, "PCS_NAD27_California_V"},
- {26746, "PCS_NAD27_California_VI"},
- {26747, "PCS_NAD27_California_VII"},
- {26748, "PCS_NAD27_Arizona_East"},
- {26749, "PCS_NAD27_Arizona_Central"},
- {26750, "PCS_NAD27_Arizona_West"},
- {26751, "PCS_NAD27_Arkansas_North"},
- {26752, "PCS_NAD27_Arkansas_South"},
- {26753, "PCS_NAD27_Colorado_North"},
- {26754, "PCS_NAD27_Colorado_Central"},
- {26755, "PCS_NAD27_Colorado_South"},
- {26756, "PCS_NAD27_Connecticut"},
- {26757, "PCS_NAD27_Delaware"},
- {26758, "PCS_NAD27_Florida_East"},
- {26759, "PCS_NAD27_Florida_West"},
- {26760, "PCS_NAD27_Florida_North"},
- {26761, "PCS_NAD27_Hawaii_zone_1"},
- {26762, "PCS_NAD27_Hawaii_zone_2"},
- {26763, "PCS_NAD27_Hawaii_zone_3"},
- {26764, "PCS_NAD27_Hawaii_zone_4"},
- {26765, "PCS_NAD27_Hawaii_zone_5"},
- {26766, "PCS_NAD27_Georgia_East"},
- {26767, "PCS_NAD27_Georgia_West"},
- {26768, "PCS_NAD27_Idaho_East"},
- {26769, "PCS_NAD27_Idaho_Central"},
- {26770, "PCS_NAD27_Idaho_West"},
- {26771, "PCS_NAD27_Illinois_East"},
- {26772, "PCS_NAD27_Illinois_West"},
- {26773, "PCS_NAD27_Indiana_East"},
- {26774, "PCS_NAD27_BLM_14N_feet"},
- {26774, "PCS_NAD27_Indiana_West"},
- {26775, "PCS_NAD27_BLM_15N_feet"},
- {26775, "PCS_NAD27_Iowa_North"},
- {26776, "PCS_NAD27_BLM_16N_feet"},
- {26776, "PCS_NAD27_Iowa_South"},
- {26777, "PCS_NAD27_BLM_17N_feet"},
- {26777, "PCS_NAD27_Kansas_North"},
- {26778, "PCS_NAD27_Kansas_South"},
- {26779, "PCS_NAD27_Kentucky_North"},
- {26780, "PCS_NAD27_Kentucky_South"},
- {26781, "PCS_NAD27_Louisiana_North"},
- {26782, "PCS_NAD27_Louisiana_South"},
- {26783, "PCS_NAD27_Maine_East"},
- {26784, "PCS_NAD27_Maine_West"},
- {26785, "PCS_NAD27_Maryland"},
- {26786, "PCS_NAD27_Massachusetts"},
- {26787, "PCS_NAD27_Massachusetts_Is"},
- {26788, "PCS_NAD27_Michigan_North"},
- {26789, "PCS_NAD27_Michigan_Central"},
- {26790, "PCS_NAD27_Michigan_South"},
- {26791, "PCS_NAD27_Minnesota_North"},
- {26792, "PCS_NAD27_Minnesota_Cent"},
- {26793, "PCS_NAD27_Minnesota_South"},
- {26794, "PCS_NAD27_Mississippi_East"},
- {26795, "PCS_NAD27_Mississippi_West"},
- {26796, "PCS_NAD27_Missouri_East"},
- {26797, "PCS_NAD27_Missouri_Central"},
- {26798, "PCS_NAD27_Missouri_West"},
- {26801, "PCS_NAD_Michigan_Michigan_East"},
- {26802, "PCS_NAD_Michigan_Michigan_Old_Central"},
- {26803, "PCS_NAD_Michigan_Michigan_West"},
- {26903, "PCS_NAD83_UTM_zone_3N"},
- {26904, "PCS_NAD83_UTM_zone_4N"},
- {26905, "PCS_NAD83_UTM_zone_5N"},
- {26906, "PCS_NAD83_UTM_zone_6N"},
- {26907, "PCS_NAD83_UTM_zone_7N"},
- {26908, "PCS_NAD83_UTM_zone_8N"},
- {26909, "PCS_NAD83_UTM_zone_9N"},
- {26910, "PCS_NAD83_UTM_zone_10N"},
- {26911, "PCS_NAD83_UTM_zone_11N"},
- {26912, "PCS_NAD83_UTM_zone_12N"},
- {26913, "PCS_NAD83_UTM_zone_13N"},
- {26914, "PCS_NAD83_UTM_zone_14N"},
- {26915, "PCS_NAD83_UTM_zone_15N"},
- {26916, "PCS_NAD83_UTM_zone_16N"},
- {26917, "PCS_NAD83_UTM_zone_17N"},
- {26918, "PCS_NAD83_UTM_zone_18N"},
- {26919, "PCS_NAD83_UTM_zone_19N"},
- {26920, "PCS_NAD83_UTM_zone_20N"},
- {26921, "PCS_NAD83_UTM_zone_21N"},
- {26922, "PCS_NAD83_UTM_zone_22N"},
- {26923, "PCS_NAD83_UTM_zone_23N"},
- {26929, "PCS_NAD83_Alabama_East"},
- {26930, "PCS_NAD83_Alabama_West"},
- {26931, "PCS_NAD83_Alaska_zone_1"},
- {26932, "PCS_NAD83_Alaska_zone_2"},
- {26933, "PCS_NAD83_Alaska_zone_3"},
- {26934, "PCS_NAD83_Alaska_zone_4"},
- {26935, "PCS_NAD83_Alaska_zone_5"},
- {26936, "PCS_NAD83_Alaska_zone_6"},
- {26937, "PCS_NAD83_Alaska_zone_7"},
- {26938, "PCS_NAD83_Alaska_zone_8"},
- {26939, "PCS_NAD83_Alaska_zone_9"},
- {26940, "PCS_NAD83_Alaska_zone_10"},
- {26941, "PCS_NAD83_California_1"},
- {26942, "PCS_NAD83_California_2"},
- {26943, "PCS_NAD83_California_3"},
- {26944, "PCS_NAD83_California_4"},
- {26945, "PCS_NAD83_California_5"},
- {26946, "PCS_NAD83_California_6"},
- {26948, "PCS_NAD83_Arizona_East"},
- {26949, "PCS_NAD83_Arizona_Central"},
- {26950, "PCS_NAD83_Arizona_West"},
- {26951, "PCS_NAD83_Arkansas_North"},
- {26952, "PCS_NAD83_Arkansas_South"},
- {26953, "PCS_NAD83_Colorado_North"},
- {26954, "PCS_NAD83_Colorado_Central"},
- {26955, "PCS_NAD83_Colorado_South"},
- {26956, "PCS_NAD83_Connecticut"},
- {26957, "PCS_NAD83_Delaware"},
- {26958, "PCS_NAD83_Florida_East"},
- {26959, "PCS_NAD83_Florida_West"},
- {26960, "PCS_NAD83_Florida_North"},
- {26961, "PCS_NAD83_Hawaii_zone_1"},
- {26962, "PCS_NAD83_Hawaii_zone_2"},
- {26963, "PCS_NAD83_Hawaii_zone_3"},
- {26964, "PCS_NAD83_Hawaii_zone_4"},
- {26965, "PCS_NAD83_Hawaii_zone_5"},
- {26966, "PCS_NAD83_Georgia_East"},
- {26967, "PCS_NAD83_Georgia_West"},
- {26968, "PCS_NAD83_Idaho_East"},
- {26969, "PCS_NAD83_Idaho_Central"},
- {26970, "PCS_NAD83_Idaho_West"},
- {26971, "PCS_NAD83_Illinois_East"},
- {26972, "PCS_NAD83_Illinois_West"},
- {26973, "PCS_NAD83_Indiana_East"},
- {26974, "PCS_NAD83_Indiana_West"},
- {26975, "PCS_NAD83_Iowa_North"},
- {26976, "PCS_NAD83_Iowa_South"},
- {26977, "PCS_NAD83_Kansas_North"},
- {26978, "PCS_NAD83_Kansas_South"},
- {26979, "PCS_NAD83_Kentucky_North"},
- {26980, "PCS_NAD83_Kentucky_South"},
- {26981, "PCS_NAD83_Louisiana_North"},
- {26982, "PCS_NAD83_Louisiana_South"},
- {26983, "PCS_NAD83_Maine_East"},
- {26984, "PCS_NAD83_Maine_West"},
- {26985, "PCS_NAD83_Maryland"},
- {26986, "PCS_NAD83_Massachusetts"},
- {26987, "PCS_NAD83_Massachusetts_Is"},
- {26988, "PCS_NAD83_Michigan_North"},
- {26989, "PCS_NAD83_Michigan_Central"},
- {26990, "PCS_NAD83_Michigan_South"},
- {26991, "PCS_NAD83_Minnesota_North"},
- {26992, "PCS_NAD83_Minnesota_Cent"},
- {26993, "PCS_NAD83_Minnesota_South"},
- {26994, "PCS_NAD83_Mississippi_East"},
- {26995, "PCS_NAD83_Mississippi_West"},
- {26996, "PCS_NAD83_Missouri_East"},
- {26997, "PCS_NAD83_Missouri_Central"},
- {26998, "PCS_NAD83_Missouri_West"},
- {27038, "PCS_Nahrwan_1967_UTM_38N"},
- {27039, "PCS_Nahrwan_1967_UTM_39N"},
- {27040, "PCS_Nahrwan_1967_UTM_40N"},
- {27120, "PCS_Naparima_UTM_20N"},
- {27200, "PCS_GD49_NZ_Map_Grid"},
- {27291, "PCS_GD49_North_Island_Grid"},
- {27292, "PCS_GD49_South_Island_Grid"},
- {27429, "PCS_Datum_73_UTM_zone_29N"},
- {27500, "PCS_ATF_Nord_de_Guerre"},
- {27581, "PCS_NTF_France_I"},
- {27582, "PCS_NTF_France_II"},
- {27583, "PCS_NTF_France_III"},
- {27591, "PCS_NTF_Nord_France"},
- {27592, "PCS_NTF_Centre_France"},
- {27593, "PCS_NTF_Sud_France"},
- {27700, "PCS_British_National_Grid"},
- {28232, "PCS_Point_Noire_UTM_32S"},
- {28348, "PCS_GDA94_MGA_zone_48"},
- {28349, "PCS_GDA94_MGA_zone_49"},
- {28350, "PCS_GDA94_MGA_zone_50"},
- {28351, "PCS_GDA94_MGA_zone_51"},
- {28352, "PCS_GDA94_MGA_zone_52"},
- {28353, "PCS_GDA94_MGA_zone_53"},
- {28354, "PCS_GDA94_MGA_zone_54"},
- {28355, "PCS_GDA94_MGA_zone_55"},
- {28356, "PCS_GDA94_MGA_zone_56"},
- {28357, "PCS_GDA94_MGA_zone_57"},
- {28358, "PCS_GDA94_MGA_zone_58"},
- {28404, "PCS_Pulkovo_Gauss_zone_4"},
- {28405, "PCS_Pulkovo_Gauss_zone_5"},
- {28406, "PCS_Pulkovo_Gauss_zone_6"},
- {28407, "PCS_Pulkovo_Gauss_zone_7"},
- {28408, "PCS_Pulkovo_Gauss_zone_8"},
- {28409, "PCS_Pulkovo_Gauss_zone_9"},
- {28410, "PCS_Pulkovo_Gauss_zone_10"},
- {28411, "PCS_Pulkovo_Gauss_zone_11"},
- {28412, "PCS_Pulkovo_Gauss_zone_12"},
- {28413, "PCS_Pulkovo_Gauss_zone_13"},
- {28414, "PCS_Pulkovo_Gauss_zone_14"},
- {28415, "PCS_Pulkovo_Gauss_zone_15"},
- {28416, "PCS_Pulkovo_Gauss_zone_16"},
- {28417, "PCS_Pulkovo_Gauss_zone_17"},
- {28418, "PCS_Pulkovo_Gauss_zone_18"},
- {28419, "PCS_Pulkovo_Gauss_zone_19"},
- {28420, "PCS_Pulkovo_Gauss_zone_20"},
- {28421, "PCS_Pulkovo_Gauss_zone_21"},
- {28422, "PCS_Pulkovo_Gauss_zone_22"},
- {28423, "PCS_Pulkovo_Gauss_zone_23"},
- {28424, "PCS_Pulkovo_Gauss_zone_24"},
- {28425, "PCS_Pulkovo_Gauss_zone_25"},
- {28426, "PCS_Pulkovo_Gauss_zone_26"},
- {28427, "PCS_Pulkovo_Gauss_zone_27"},
- {28428, "PCS_Pulkovo_Gauss_zone_28"},
- {28429, "PCS_Pulkovo_Gauss_zone_29"},
- {28430, "PCS_Pulkovo_Gauss_zone_30"},
- {28431, "PCS_Pulkovo_Gauss_zone_31"},
- {28432, "PCS_Pulkovo_Gauss_zone_32"},
- {28464, "PCS_Pulkovo_Gauss_4N"},
- {28465, "PCS_Pulkovo_Gauss_5N"},
- {28466, "PCS_Pulkovo_Gauss_6N"},
- {28467, "PCS_Pulkovo_Gauss_7N"},
- {28468, "PCS_Pulkovo_Gauss_8N"},
- {28469, "PCS_Pulkovo_Gauss_9N"},
- {28470, "PCS_Pulkovo_Gauss_10N"},
- {28471, "PCS_Pulkovo_Gauss_11N"},
- {28472, "PCS_Pulkovo_Gauss_12N"},
- {28473, "PCS_Pulkovo_Gauss_13N"},
- {28474, "PCS_Pulkovo_Gauss_14N"},
- {28475, "PCS_Pulkovo_Gauss_15N"},
- {28476, "PCS_Pulkovo_Gauss_16N"},
- {28477, "PCS_Pulkovo_Gauss_17N"},
- {28478, "PCS_Pulkovo_Gauss_18N"},
- {28479, "PCS_Pulkovo_Gauss_19N"},
- {28480, "PCS_Pulkovo_Gauss_20N"},
- {28481, "PCS_Pulkovo_Gauss_21N"},
- {28482, "PCS_Pulkovo_Gauss_22N"},
- {28483, "PCS_Pulkovo_Gauss_23N"},
- {28484, "PCS_Pulkovo_Gauss_24N"},
- {28485, "PCS_Pulkovo_Gauss_25N"},
- {28486, "PCS_Pulkovo_Gauss_26N"},
- {28487, "PCS_Pulkovo_Gauss_27N"},
- {28488, "PCS_Pulkovo_Gauss_28N"},
- {28489, "PCS_Pulkovo_Gauss_29N"},
- {28490, "PCS_Pulkovo_Gauss_30N"},
- {28491, "PCS_Pulkovo_Gauss_31N"},
- {28492, "PCS_Pulkovo_Gauss_32N"},
- {28600, "PCS_Qatar_National_Grid"},
- {28991, "PCS_RD_Netherlands_Old"},
- {28992, "PCS_RD_Netherlands_New"},
- {29118, "PCS_SAD69_UTM_zone_18N"},
- {29119, "PCS_SAD69_UTM_zone_19N"},
- {29120, "PCS_SAD69_UTM_zone_20N"},
- {29121, "PCS_SAD69_UTM_zone_21N"},
- {29122, "PCS_SAD69_UTM_zone_22N"},
- {29177, "PCS_SAD69_UTM_zone_17S"},
- {29178, "PCS_SAD69_UTM_zone_18S"},
- {29179, "PCS_SAD69_UTM_zone_19S"},
- {29180, "PCS_SAD69_UTM_zone_20S"},
- {29181, "PCS_SAD69_UTM_zone_21S"},
- {29182, "PCS_SAD69_UTM_zone_22S"},
- {29183, "PCS_SAD69_UTM_zone_23S"},
- {29184, "PCS_SAD69_UTM_zone_24S"},
- {29185, "PCS_SAD69_UTM_zone_25S"},
- {29220, "PCS_Sapper_Hill_UTM_20S"},
- {29221, "PCS_Sapper_Hill_UTM_21S"},
- {29333, "PCS_Schwarzeck_UTM_33S"},
- {29635, "PCS_Sudan_UTM_zone_35N"},
- {29636, "PCS_Sudan_UTM_zone_36N"},
- {29700, "PCS_Tananarive_Laborde"},
- {29738, "PCS_Tananarive_UTM_38S"},
- {29739, "PCS_Tananarive_UTM_39S"},
- {29800, "PCS_Timbalai_1948_Borneo"},
- {29849, "PCS_Timbalai_1948_UTM_49N"},
- {29850, "PCS_Timbalai_1948_UTM_50N"},
- {29900, "PCS_TM65_Irish_Nat_Grid"},
- {30200, "PCS_Trinidad_1903_Trinidad"},
- {30339, "PCS_TC_1948_UTM_zone_39N"},
- {30340, "PCS_TC_1948_UTM_zone_40N"},
- {30491, "PCS_Voirol_N_Algerie_ancien"},
- {30492, "PCS_Voirol_S_Algerie_ancien"},
- {30591, "PCS_Voirol_Unifie_N_Algerie"},
- {30592, "PCS_Voirol_Unifie_S_Algerie"},
- {30600, "PCS_Bern_1938_Swiss_New"},
- {30729, "PCS_Nord_Sahara_UTM_29N"},
- {30730, "PCS_Nord_Sahara_UTM_30N"},
- {30731, "PCS_Nord_Sahara_UTM_31N"},
- {30732, "PCS_Nord_Sahara_UTM_32N"},
- {31028, "PCS_Yoff_UTM_zone_28N"},
- {31121, "PCS_Zanderij_UTM_zone_21N"},
- {31291, "PCS_MGI_Austria_West"},
- {31292, "PCS_MGI_Austria_Central"},
- {31293, "PCS_MGI_Austria_East"},
- {31300, "PCS_Belge_Lambert_72"},
- {31491, "PCS_DHDN_Germany_zone_1"},
- {31492, "PCS_DHDN_Germany_zone_2"},
- {31493, "PCS_DHDN_Germany_zone_3"},
- {31494, "PCS_DHDN_Germany_zone_4"},
- {31495, "PCS_DHDN_Germany_zone_5"},
- {32001, "PCS_NAD27_Montana_North"},
- {32002, "PCS_NAD27_Montana_Central"},
- {32003, "PCS_NAD27_Montana_South"},
- {32005, "PCS_NAD27_Nebraska_North"},
- {32006, "PCS_NAD27_Nebraska_South"},
- {32007, "PCS_NAD27_Nevada_East"},
- {32008, "PCS_NAD27_Nevada_Central"},
- {32009, "PCS_NAD27_Nevada_West"},
- {32010, "PCS_NAD27_New_Hampshire"},
- {32011, "PCS_NAD27_New_Jersey"},
- {32012, "PCS_NAD27_New_Mexico_East"},
- {32013, "PCS_NAD27_New_Mexico_Cent"},
- {32014, "PCS_NAD27_New_Mexico_West"},
- {32015, "PCS_NAD27_New_York_East"},
- {32016, "PCS_NAD27_New_York_Central"},
- {32017, "PCS_NAD27_New_York_West"},
- {32018, "PCS_NAD27_New_York_Long_Is"},
- {32019, "PCS_NAD27_North_Carolina"},
- {32020, "PCS_NAD27_North_Dakota_N"},
- {32021, "PCS_NAD27_North_Dakota_S"},
- {32022, "PCS_NAD27_Ohio_North"},
- {32023, "PCS_NAD27_Ohio_South"},
- {32024, "PCS_NAD27_Oklahoma_North"},
- {32025, "PCS_NAD27_Oklahoma_South"},
- {32026, "PCS_NAD27_Oregon_North"},
- {32027, "PCS_NAD27_Oregon_South"},
- {32028, "PCS_NAD27_Pennsylvania_N"},
- {32029, "PCS_NAD27_Pennsylvania_S"},
- {32030, "PCS_NAD27_Rhode_Island"},
- {32031, "PCS_NAD27_South_Carolina_N"},
- {32033, "PCS_NAD27_South_Carolina_S"},
- {32034, "PCS_NAD27_South_Dakota_N"},
- {32035, "PCS_NAD27_South_Dakota_S"},
- {32036, "PCS_NAD27_Tennessee"},
- {32037, "PCS_NAD27_Texas_North"},
- {32038, "PCS_NAD27_Texas_North_Cen"},
- {32039, "PCS_NAD27_Texas_Central"},
- {32040, "PCS_NAD27_Texas_South_Cen"},
- {32041, "PCS_NAD27_Texas_South"},
- {32042, "PCS_NAD27_Utah_North"},
- {32043, "PCS_NAD27_Utah_Central"},
- {32044, "PCS_NAD27_Utah_South"},
- {32045, "PCS_NAD27_Vermont"},
- {32046, "PCS_NAD27_Virginia_North"},
- {32047, "PCS_NAD27_Virginia_South"},
- {32048, "PCS_NAD27_Washington_North"},
- {32049, "PCS_NAD27_Washington_South"},
- {32050, "PCS_NAD27_West_Virginia_N"},
- {32051, "PCS_NAD27_West_Virginia_S"},
- {32052, "PCS_NAD27_Wisconsin_North"},
- {32053, "PCS_NAD27_Wisconsin_Cen"},
- {32054, "PCS_NAD27_Wisconsin_South"},
- {32055, "PCS_NAD27_Wyoming_East"},
- {32056, "PCS_NAD27_Wyoming_E_Cen"},
- {32057, "PCS_NAD27_Wyoming_W_Cen"},
- {32058, "PCS_NAD27_Wyoming_West"},
- {32059, "PCS_NAD27_Puerto_Rico"},
- {32060, "PCS_NAD27_St_Croix"},
- {32100, "PCS_NAD83_Montana"},
- {32104, "PCS_NAD83_Nebraska"},
- {32107, "PCS_NAD83_Nevada_East"},
- {32108, "PCS_NAD83_Nevada_Central"},
- {32109, "PCS_NAD83_Nevada_West"},
- {32110, "PCS_NAD83_New_Hampshire"},
- {32111, "PCS_NAD83_New_Jersey"},
- {32112, "PCS_NAD83_New_Mexico_East"},
- {32113, "PCS_NAD83_New_Mexico_Cent"},
- {32114, "PCS_NAD83_New_Mexico_West"},
- {32115, "PCS_NAD83_New_York_East"},
- {32116, "PCS_NAD83_New_York_Central"},
- {32117, "PCS_NAD83_New_York_West"},
- {32118, "PCS_NAD83_New_York_Long_Is"},
- {32119, "PCS_NAD83_North_Carolina"},
- {32120, "PCS_NAD83_North_Dakota_N"},
- {32121, "PCS_NAD83_North_Dakota_S"},
- {32122, "PCS_NAD83_Ohio_North"},
- {32123, "PCS_NAD83_Ohio_South"},
- {32124, "PCS_NAD83_Oklahoma_North"},
- {32125, "PCS_NAD83_Oklahoma_South"},
- {32126, "PCS_NAD83_Oregon_North"},
- {32127, "PCS_NAD83_Oregon_South"},
- {32128, "PCS_NAD83_Pennsylvania_N"},
- {32129, "PCS_NAD83_Pennsylvania_S"},
- {32130, "PCS_NAD83_Rhode_Island"},
- {32133, "PCS_NAD83_South_Carolina"},
- {32134, "PCS_NAD83_South_Dakota_N"},
- {32135, "PCS_NAD83_South_Dakota_S"},
- {32136, "PCS_NAD83_Tennessee"},
- {32137, "PCS_NAD83_Texas_North"},
- {32138, "PCS_NAD83_Texas_North_Cen"},
- {32139, "PCS_NAD83_Texas_Central"},
- {32140, "PCS_NAD83_Texas_South_Cen"},
- {32141, "PCS_NAD83_Texas_South"},
- {32142, "PCS_NAD83_Utah_North"},
- {32143, "PCS_NAD83_Utah_Central"},
- {32144, "PCS_NAD83_Utah_South"},
- {32145, "PCS_NAD83_Vermont"},
- {32146, "PCS_NAD83_Virginia_North"},
- {32147, "PCS_NAD83_Virginia_South"},
- {32148, "PCS_NAD83_Washington_North"},
- {32149, "PCS_NAD83_Washington_South"},
- {32150, "PCS_NAD83_West_Virginia_N"},
- {32151, "PCS_NAD83_West_Virginia_S"},
- {32152, "PCS_NAD83_Wisconsin_North"},
- {32153, "PCS_NAD83_Wisconsin_Cen"},
- {32154, "PCS_NAD83_Wisconsin_South"},
- {32155, "PCS_NAD83_Wyoming_East"},
- {32156, "PCS_NAD83_Wyoming_E_Cen"},
- {32157, "PCS_NAD83_Wyoming_W_Cen"},
- {32158, "PCS_NAD83_Wyoming_West"},
- {32161, "PCS_NAD83_Puerto_Rico_Virgin_Is"},
- {32201, "PCS_WGS72_UTM_zone_1N"},
- {32202, "PCS_WGS72_UTM_zone_2N"},
- {32203, "PCS_WGS72_UTM_zone_3N"},
- {32204, "PCS_WGS72_UTM_zone_4N"},
- {32205, "PCS_WGS72_UTM_zone_5N"},
- {32206, "PCS_WGS72_UTM_zone_6N"},
- {32207, "PCS_WGS72_UTM_zone_7N"},
- {32208, "PCS_WGS72_UTM_zone_8N"},
- {32209, "PCS_WGS72_UTM_zone_9N"},
- {32210, "PCS_WGS72_UTM_zone_10N"},
- {32211, "PCS_WGS72_UTM_zone_11N"},
- {32212, "PCS_WGS72_UTM_zone_12N"},
- {32213, "PCS_WGS72_UTM_zone_13N"},
- {32214, "PCS_WGS72_UTM_zone_14N"},
- {32215, "PCS_WGS72_UTM_zone_15N"},
- {32216, "PCS_WGS72_UTM_zone_16N"},
- {32217, "PCS_WGS72_UTM_zone_17N"},
- {32218, "PCS_WGS72_UTM_zone_18N"},
- {32219, "PCS_WGS72_UTM_zone_19N"},
- {32220, "PCS_WGS72_UTM_zone_20N"},
- {32221, "PCS_WGS72_UTM_zone_21N"},
- {32222, "PCS_WGS72_UTM_zone_22N"},
- {32223, "PCS_WGS72_UTM_zone_23N"},
- {32224, "PCS_WGS72_UTM_zone_24N"},
- {32225, "PCS_WGS72_UTM_zone_25N"},
- {32226, "PCS_WGS72_UTM_zone_26N"},
- {32227, "PCS_WGS72_UTM_zone_27N"},
- {32228, "PCS_WGS72_UTM_zone_28N"},
- {32229, "PCS_WGS72_UTM_zone_29N"},
- {32230, "PCS_WGS72_UTM_zone_30N"},
- {32231, "PCS_WGS72_UTM_zone_31N"},
- {32232, "PCS_WGS72_UTM_zone_32N"},
- {32233, "PCS_WGS72_UTM_zone_33N"},
- {32234, "PCS_WGS72_UTM_zone_34N"},
- {32235, "PCS_WGS72_UTM_zone_35N"},
- {32236, "PCS_WGS72_UTM_zone_36N"},
- {32237, "PCS_WGS72_UTM_zone_37N"},
- {32238, "PCS_WGS72_UTM_zone_38N"},
- {32239, "PCS_WGS72_UTM_zone_39N"},
- {32240, "PCS_WGS72_UTM_zone_40N"},
- {32241, "PCS_WGS72_UTM_zone_41N"},
- {32242, "PCS_WGS72_UTM_zone_42N"},
- {32243, "PCS_WGS72_UTM_zone_43N"},
- {32244, "PCS_WGS72_UTM_zone_44N"},
- {32245, "PCS_WGS72_UTM_zone_45N"},
- {32246, "PCS_WGS72_UTM_zone_46N"},
- {32247, "PCS_WGS72_UTM_zone_47N"},
- {32248, "PCS_WGS72_UTM_zone_48N"},
- {32249, "PCS_WGS72_UTM_zone_49N"},
- {32250, "PCS_WGS72_UTM_zone_50N"},
- {32251, "PCS_WGS72_UTM_zone_51N"},
- {32252, "PCS_WGS72_UTM_zone_52N"},
- {32253, "PCS_WGS72_UTM_zone_53N"},
- {32254, "PCS_WGS72_UTM_zone_54N"},
- {32255, "PCS_WGS72_UTM_zone_55N"},
- {32256, "PCS_WGS72_UTM_zone_56N"},
- {32257, "PCS_WGS72_UTM_zone_57N"},
- {32258, "PCS_WGS72_UTM_zone_58N"},
- {32259, "PCS_WGS72_UTM_zone_59N"},
- {32260, "PCS_WGS72_UTM_zone_60N"},
- {32301, "PCS_WGS72_UTM_zone_1S"},
- {32302, "PCS_WGS72_UTM_zone_2S"},
- {32303, "PCS_WGS72_UTM_zone_3S"},
- {32304, "PCS_WGS72_UTM_zone_4S"},
- {32305, "PCS_WGS72_UTM_zone_5S"},
- {32306, "PCS_WGS72_UTM_zone_6S"},
- {32307, "PCS_WGS72_UTM_zone_7S"},
- {32308, "PCS_WGS72_UTM_zone_8S"},
- {32309, "PCS_WGS72_UTM_zone_9S"},
- {32310, "PCS_WGS72_UTM_zone_10S"},
- {32311, "PCS_WGS72_UTM_zone_11S"},
- {32312, "PCS_WGS72_UTM_zone_12S"},
- {32313, "PCS_WGS72_UTM_zone_13S"},
- {32314, "PCS_WGS72_UTM_zone_14S"},
- {32315, "PCS_WGS72_UTM_zone_15S"},
- {32316, "PCS_WGS72_UTM_zone_16S"},
- {32317, "PCS_WGS72_UTM_zone_17S"},
- {32318, "PCS_WGS72_UTM_zone_18S"},
- {32319, "PCS_WGS72_UTM_zone_19S"},
- {32320, "PCS_WGS72_UTM_zone_20S"},
- {32321, "PCS_WGS72_UTM_zone_21S"},
- {32322, "PCS_WGS72_UTM_zone_22S"},
- {32323, "PCS_WGS72_UTM_zone_23S"},
- {32324, "PCS_WGS72_UTM_zone_24S"},
- {32325, "PCS_WGS72_UTM_zone_25S"},
- {32326, "PCS_WGS72_UTM_zone_26S"},
- {32327, "PCS_WGS72_UTM_zone_27S"},
- {32328, "PCS_WGS72_UTM_zone_28S"},
- {32329, "PCS_WGS72_UTM_zone_29S"},
- {32330, "PCS_WGS72_UTM_zone_30S"},
- {32331, "PCS_WGS72_UTM_zone_31S"},
- {32332, "PCS_WGS72_UTM_zone_32S"},
- {32333, "PCS_WGS72_UTM_zone_33S"},
- {32334, "PCS_WGS72_UTM_zone_34S"},
- {32335, "PCS_WGS72_UTM_zone_35S"},
- {32336, "PCS_WGS72_UTM_zone_36S"},
- {32337, "PCS_WGS72_UTM_zone_37S"},
- {32338, "PCS_WGS72_UTM_zone_38S"},
- {32339, "PCS_WGS72_UTM_zone_39S"},
- {32340, "PCS_WGS72_UTM_zone_40S"},
- {32341, "PCS_WGS72_UTM_zone_41S"},
- {32342, "PCS_WGS72_UTM_zone_42S"},
- {32343, "PCS_WGS72_UTM_zone_43S"},
- {32344, "PCS_WGS72_UTM_zone_44S"},
- {32345, "PCS_WGS72_UTM_zone_45S"},
- {32346, "PCS_WGS72_UTM_zone_46S"},
- {32347, "PCS_WGS72_UTM_zone_47S"},
- {32348, "PCS_WGS72_UTM_zone_48S"},
- {32349, "PCS_WGS72_UTM_zone_49S"},
- {32350, "PCS_WGS72_UTM_zone_50S"},
- {32351, "PCS_WGS72_UTM_zone_51S"},
- {32352, "PCS_WGS72_UTM_zone_52S"},
- {32353, "PCS_WGS72_UTM_zone_53S"},
- {32354, "PCS_WGS72_UTM_zone_54S"},
- {32355, "PCS_WGS72_UTM_zone_55S"},
- {32356, "PCS_WGS72_UTM_zone_56S"},
- {32357, "PCS_WGS72_UTM_zone_57S"},
- {32358, "PCS_WGS72_UTM_zone_58S"},
- {32359, "PCS_WGS72_UTM_zone_59S"},
- {32360, "PCS_WGS72_UTM_zone_60S"},
- {32401, "PCS_WGS72BE_UTM_zone_1N"},
- {32402, "PCS_WGS72BE_UTM_zone_2N"},
- {32403, "PCS_WGS72BE_UTM_zone_3N"},
- {32404, "PCS_WGS72BE_UTM_zone_4N"},
- {32405, "PCS_WGS72BE_UTM_zone_5N"},
- {32406, "PCS_WGS72BE_UTM_zone_6N"},
- {32407, "PCS_WGS72BE_UTM_zone_7N"},
- {32408, "PCS_WGS72BE_UTM_zone_8N"},
- {32409, "PCS_WGS72BE_UTM_zone_9N"},
- {32410, "PCS_WGS72BE_UTM_zone_10N"},
- {32411, "PCS_WGS72BE_UTM_zone_11N"},
- {32412, "PCS_WGS72BE_UTM_zone_12N"},
- {32413, "PCS_WGS72BE_UTM_zone_13N"},
- {32414, "PCS_WGS72BE_UTM_zone_14N"},
- {32415, "PCS_WGS72BE_UTM_zone_15N"},
- {32416, "PCS_WGS72BE_UTM_zone_16N"},
- {32417, "PCS_WGS72BE_UTM_zone_17N"},
- {32418, "PCS_WGS72BE_UTM_zone_18N"},
- {32419, "PCS_WGS72BE_UTM_zone_19N"},
- {32420, "PCS_WGS72BE_UTM_zone_20N"},
- {32421, "PCS_WGS72BE_UTM_zone_21N"},
- {32422, "PCS_WGS72BE_UTM_zone_22N"},
- {32423, "PCS_WGS72BE_UTM_zone_23N"},
- {32424, "PCS_WGS72BE_UTM_zone_24N"},
- {32425, "PCS_WGS72BE_UTM_zone_25N"},
- {32426, "PCS_WGS72BE_UTM_zone_26N"},
- {32427, "PCS_WGS72BE_UTM_zone_27N"},
- {32428, "PCS_WGS72BE_UTM_zone_28N"},
- {32429, "PCS_WGS72BE_UTM_zone_29N"},
- {32430, "PCS_WGS72BE_UTM_zone_30N"},
- {32431, "PCS_WGS72BE_UTM_zone_31N"},
- {32432, "PCS_WGS72BE_UTM_zone_32N"},
- {32433, "PCS_WGS72BE_UTM_zone_33N"},
- {32434, "PCS_WGS72BE_UTM_zone_34N"},
- {32435, "PCS_WGS72BE_UTM_zone_35N"},
- {32436, "PCS_WGS72BE_UTM_zone_36N"},
- {32437, "PCS_WGS72BE_UTM_zone_37N"},
- {32438, "PCS_WGS72BE_UTM_zone_38N"},
- {32439, "PCS_WGS72BE_UTM_zone_39N"},
- {32440, "PCS_WGS72BE_UTM_zone_40N"},
- {32441, "PCS_WGS72BE_UTM_zone_41N"},
- {32442, "PCS_WGS72BE_UTM_zone_42N"},
- {32443, "PCS_WGS72BE_UTM_zone_43N"},
- {32444, "PCS_WGS72BE_UTM_zone_44N"},
- {32445, "PCS_WGS72BE_UTM_zone_45N"},
- {32446, "PCS_WGS72BE_UTM_zone_46N"},
- {32447, "PCS_WGS72BE_UTM_zone_47N"},
- {32448, "PCS_WGS72BE_UTM_zone_48N"},
- {32449, "PCS_WGS72BE_UTM_zone_49N"},
- {32450, "PCS_WGS72BE_UTM_zone_50N"},
- {32451, "PCS_WGS72BE_UTM_zone_51N"},
- {32452, "PCS_WGS72BE_UTM_zone_52N"},
- {32453, "PCS_WGS72BE_UTM_zone_53N"},
- {32454, "PCS_WGS72BE_UTM_zone_54N"},
- {32455, "PCS_WGS72BE_UTM_zone_55N"},
- {32456, "PCS_WGS72BE_UTM_zone_56N"},
- {32457, "PCS_WGS72BE_UTM_zone_57N"},
- {32458, "PCS_WGS72BE_UTM_zone_58N"},
- {32459, "PCS_WGS72BE_UTM_zone_59N"},
- {32460, "PCS_WGS72BE_UTM_zone_60N"},
- {32501, "PCS_WGS72BE_UTM_zone_1S"},
- {32502, "PCS_WGS72BE_UTM_zone_2S"},
- {32503, "PCS_WGS72BE_UTM_zone_3S"},
- {32504, "PCS_WGS72BE_UTM_zone_4S"},
- {32505, "PCS_WGS72BE_UTM_zone_5S"},
- {32506, "PCS_WGS72BE_UTM_zone_6S"},
- {32507, "PCS_WGS72BE_UTM_zone_7S"},
- {32508, "PCS_WGS72BE_UTM_zone_8S"},
- {32509, "PCS_WGS72BE_UTM_zone_9S"},
- {32510, "PCS_WGS72BE_UTM_zone_10S"},
- {32511, "PCS_WGS72BE_UTM_zone_11S"},
- {32512, "PCS_WGS72BE_UTM_zone_12S"},
- {32513, "PCS_WGS72BE_UTM_zone_13S"},
- {32514, "PCS_WGS72BE_UTM_zone_14S"},
- {32515, "PCS_WGS72BE_UTM_zone_15S"},
- {32516, "PCS_WGS72BE_UTM_zone_16S"},
- {32517, "PCS_WGS72BE_UTM_zone_17S"},
- {32518, "PCS_WGS72BE_UTM_zone_18S"},
- {32519, "PCS_WGS72BE_UTM_zone_19S"},
- {32520, "PCS_WGS72BE_UTM_zone_20S"},
- {32521, "PCS_WGS72BE_UTM_zone_21S"},
- {32522, "PCS_WGS72BE_UTM_zone_22S"},
- {32523, "PCS_WGS72BE_UTM_zone_23S"},
- {32524, "PCS_WGS72BE_UTM_zone_24S"},
- {32525, "PCS_WGS72BE_UTM_zone_25S"},
- {32526, "PCS_WGS72BE_UTM_zone_26S"},
- {32527, "PCS_WGS72BE_UTM_zone_27S"},
- {32528, "PCS_WGS72BE_UTM_zone_28S"},
- {32529, "PCS_WGS72BE_UTM_zone_29S"},
- {32530, "PCS_WGS72BE_UTM_zone_30S"},
- {32531, "PCS_WGS72BE_UTM_zone_31S"},
- {32532, "PCS_WGS72BE_UTM_zone_32S"},
- {32533, "PCS_WGS72BE_UTM_zone_33S"},
- {32534, "PCS_WGS72BE_UTM_zone_34S"},
- {32535, "PCS_WGS72BE_UTM_zone_35S"},
- {32536, "PCS_WGS72BE_UTM_zone_36S"},
- {32537, "PCS_WGS72BE_UTM_zone_37S"},
- {32538, "PCS_WGS72BE_UTM_zone_38S"},
- {32539, "PCS_WGS72BE_UTM_zone_39S"},
- {32540, "PCS_WGS72BE_UTM_zone_40S"},
- {32541, "PCS_WGS72BE_UTM_zone_41S"},
- {32542, "PCS_WGS72BE_UTM_zone_42S"},
- {32543, "PCS_WGS72BE_UTM_zone_43S"},
- {32544, "PCS_WGS72BE_UTM_zone_44S"},
- {32545, "PCS_WGS72BE_UTM_zone_45S"},
- {32546, "PCS_WGS72BE_UTM_zone_46S"},
- {32547, "PCS_WGS72BE_UTM_zone_47S"},
- {32548, "PCS_WGS72BE_UTM_zone_48S"},
- {32549, "PCS_WGS72BE_UTM_zone_49S"},
- {32550, "PCS_WGS72BE_UTM_zone_50S"},
- {32551, "PCS_WGS72BE_UTM_zone_51S"},
- {32552, "PCS_WGS72BE_UTM_zone_52S"},
- {32553, "PCS_WGS72BE_UTM_zone_53S"},
- {32554, "PCS_WGS72BE_UTM_zone_54S"},
- {32555, "PCS_WGS72BE_UTM_zone_55S"},
- {32556, "PCS_WGS72BE_UTM_zone_56S"},
- {32557, "PCS_WGS72BE_UTM_zone_57S"},
- {32558, "PCS_WGS72BE_UTM_zone_58S"},
- {32559, "PCS_WGS72BE_UTM_zone_59S"},
- {32560, "PCS_WGS72BE_UTM_zone_60S"},
- {32601, "PCS_WGS84_UTM_zone_1N"},
- {32602, "PCS_WGS84_UTM_zone_2N"},
- {32603, "PCS_WGS84_UTM_zone_3N"},
- {32604, "PCS_WGS84_UTM_zone_4N"},
- {32605, "PCS_WGS84_UTM_zone_5N"},
- {32606, "PCS_WGS84_UTM_zone_6N"},
- {32607, "PCS_WGS84_UTM_zone_7N"},
- {32608, "PCS_WGS84_UTM_zone_8N"},
- {32609, "PCS_WGS84_UTM_zone_9N"},
- {32610, "PCS_WGS84_UTM_zone_10N"},
- {32611, "PCS_WGS84_UTM_zone_11N"},
- {32612, "PCS_WGS84_UTM_zone_12N"},
- {32613, "PCS_WGS84_UTM_zone_13N"},
- {32614, "PCS_WGS84_UTM_zone_14N"},
- {32615, "PCS_WGS84_UTM_zone_15N"},
- {32616, "PCS_WGS84_UTM_zone_16N"},
- {32617, "PCS_WGS84_UTM_zone_17N"},
- {32618, "PCS_WGS84_UTM_zone_18N"},
- {32619, "PCS_WGS84_UTM_zone_19N"},
- {32620, "PCS_WGS84_UTM_zone_20N"},
- {32621, "PCS_WGS84_UTM_zone_21N"},
- {32622, "PCS_WGS84_UTM_zone_22N"},
- {32623, "PCS_WGS84_UTM_zone_23N"},
- {32624, "PCS_WGS84_UTM_zone_24N"},
- {32625, "PCS_WGS84_UTM_zone_25N"},
- {32626, "PCS_WGS84_UTM_zone_26N"},
- {32627, "PCS_WGS84_UTM_zone_27N"},
- {32628, "PCS_WGS84_UTM_zone_28N"},
- {32629, "PCS_WGS84_UTM_zone_29N"},
- {32630, "PCS_WGS84_UTM_zone_30N"},
- {32631, "PCS_WGS84_UTM_zone_31N"},
- {32632, "PCS_WGS84_UTM_zone_32N"},
- {32633, "PCS_WGS84_UTM_zone_33N"},
- {32634, "PCS_WGS84_UTM_zone_34N"},
- {32635, "PCS_WGS84_UTM_zone_35N"},
- {32636, "PCS_WGS84_UTM_zone_36N"},
- {32637, "PCS_WGS84_UTM_zone_37N"},
- {32638, "PCS_WGS84_UTM_zone_38N"},
- {32639, "PCS_WGS84_UTM_zone_39N"},
- {32640, "PCS_WGS84_UTM_zone_40N"},
- {32641, "PCS_WGS84_UTM_zone_41N"},
- {32642, "PCS_WGS84_UTM_zone_42N"},
- {32643, "PCS_WGS84_UTM_zone_43N"},
- {32644, "PCS_WGS84_UTM_zone_44N"},
- {32645, "PCS_WGS84_UTM_zone_45N"},
- {32646, "PCS_WGS84_UTM_zone_46N"},
- {32647, "PCS_WGS84_UTM_zone_47N"},
- {32648, "PCS_WGS84_UTM_zone_48N"},
- {32649, "PCS_WGS84_UTM_zone_49N"},
- {32650, "PCS_WGS84_UTM_zone_50N"},
- {32651, "PCS_WGS84_UTM_zone_51N"},
- {32652, "PCS_WGS84_UTM_zone_52N"},
- {32653, "PCS_WGS84_UTM_zone_53N"},
- {32654, "PCS_WGS84_UTM_zone_54N"},
- {32655, "PCS_WGS84_UTM_zone_55N"},
- {32656, "PCS_WGS84_UTM_zone_56N"},
- {32657, "PCS_WGS84_UTM_zone_57N"},
- {32658, "PCS_WGS84_UTM_zone_58N"},
- {32659, "PCS_WGS84_UTM_zone_59N"},
- {32660, "PCS_WGS84_UTM_zone_60N"},
- {32701, "PCS_WGS84_UTM_zone_1S"},
- {32702, "PCS_WGS84_UTM_zone_2S"},
- {32703, "PCS_WGS84_UTM_zone_3S"},
- {32704, "PCS_WGS84_UTM_zone_4S"},
- {32705, "PCS_WGS84_UTM_zone_5S"},
- {32706, "PCS_WGS84_UTM_zone_6S"},
- {32707, "PCS_WGS84_UTM_zone_7S"},
- {32708, "PCS_WGS84_UTM_zone_8S"},
- {32709, "PCS_WGS84_UTM_zone_9S"},
- {32710, "PCS_WGS84_UTM_zone_10S"},
- {32711, "PCS_WGS84_UTM_zone_11S"},
- {32712, "PCS_WGS84_UTM_zone_12S"},
- {32713, "PCS_WGS84_UTM_zone_13S"},
- {32714, "PCS_WGS84_UTM_zone_14S"},
- {32715, "PCS_WGS84_UTM_zone_15S"},
- {32716, "PCS_WGS84_UTM_zone_16S"},
- {32717, "PCS_WGS84_UTM_zone_17S"},
- {32718, "PCS_WGS84_UTM_zone_18S"},
- {32719, "PCS_WGS84_UTM_zone_19S"},
- {32720, "PCS_WGS84_UTM_zone_20S"},
- {32721, "PCS_WGS84_UTM_zone_21S"},
- {32722, "PCS_WGS84_UTM_zone_22S"},
- {32723, "PCS_WGS84_UTM_zone_23S"},
- {32724, "PCS_WGS84_UTM_zone_24S"},
- {32725, "PCS_WGS84_UTM_zone_25S"},
- {32726, "PCS_WGS84_UTM_zone_26S"},
- {32727, "PCS_WGS84_UTM_zone_27S"},
- {32728, "PCS_WGS84_UTM_zone_28S"},
- {32729, "PCS_WGS84_UTM_zone_29S"},
- {32730, "PCS_WGS84_UTM_zone_30S"},
- {32731, "PCS_WGS84_UTM_zone_31S"},
- {32732, "PCS_WGS84_UTM_zone_32S"},
- {32733, "PCS_WGS84_UTM_zone_33S"},
- {32734, "PCS_WGS84_UTM_zone_34S"},
- {32735, "PCS_WGS84_UTM_zone_35S"},
- {32736, "PCS_WGS84_UTM_zone_36S"},
- {32737, "PCS_WGS84_UTM_zone_37S"},
- {32738, "PCS_WGS84_UTM_zone_38S"},
- {32739, "PCS_WGS84_UTM_zone_39S"},
- {32740, "PCS_WGS84_UTM_zone_40S"},
- {32741, "PCS_WGS84_UTM_zone_41S"},
- {32742, "PCS_WGS84_UTM_zone_42S"},
- {32743, "PCS_WGS84_UTM_zone_43S"},
- {32744, "PCS_WGS84_UTM_zone_44S"},
- {32745, "PCS_WGS84_UTM_zone_45S"},
- {32746, "PCS_WGS84_UTM_zone_46S"},
- {32747, "PCS_WGS84_UTM_zone_47S"},
- {32748, "PCS_WGS84_UTM_zone_48S"},
- {32749, "PCS_WGS84_UTM_zone_49S"},
- {32750, "PCS_WGS84_UTM_zone_50S"},
- {32751, "PCS_WGS84_UTM_zone_51S"},
- {32752, "PCS_WGS84_UTM_zone_52S"},
- {32753, "PCS_WGS84_UTM_zone_53S"},
- {32754, "PCS_WGS84_UTM_zone_54S"},
- {32755, "PCS_WGS84_UTM_zone_55S"},
- {32756, "PCS_WGS84_UTM_zone_56S"},
- {32757, "PCS_WGS84_UTM_zone_57S"},
- {32758, "PCS_WGS84_UTM_zone_58S"},
- {32759, "PCS_WGS84_UTM_zone_59S"},
- {32760, "PCS_WGS84_UTM_zone_60S"}
-};
+extern const TiffGeoTagKeyName ff_tiff_proj_cs_type_codes[978];
-static const TiffGeoTagKeyName tiff_projection_codes[] = {
- {10101, "Proj_Alabama_CS27_East"},
- {10102, "Proj_Alabama_CS27_West"},
- {10131, "Proj_Alabama_CS83_East"},
- {10132, "Proj_Alabama_CS83_West"},
- {10201, "Proj_Arizona_Coordinate_System_east"},
- {10202, "Proj_Arizona_Coordinate_System_Central"},
- {10203, "Proj_Arizona_Coordinate_System_west"},
- {10231, "Proj_Arizona_CS83_east"},
- {10232, "Proj_Arizona_CS83_Central"},
- {10233, "Proj_Arizona_CS83_west"},
- {10301, "Proj_Arkansas_CS27_North"},
- {10302, "Proj_Arkansas_CS27_South"},
- {10331, "Proj_Arkansas_CS83_North"},
- {10332, "Proj_Arkansas_CS83_South"},
- {10401, "Proj_California_CS27_I"},
- {10402, "Proj_California_CS27_II"},
- {10403, "Proj_California_CS27_III"},
- {10404, "Proj_California_CS27_IV"},
- {10405, "Proj_California_CS27_V"},
- {10406, "Proj_California_CS27_VI"},
- {10407, "Proj_California_CS27_VII"},
- {10431, "Proj_California_CS83_1"},
- {10432, "Proj_California_CS83_2"},
- {10433, "Proj_California_CS83_3"},
- {10434, "Proj_California_CS83_4"},
- {10435, "Proj_California_CS83_5"},
- {10436, "Proj_California_CS83_6"},
- {10501, "Proj_Colorado_CS27_North"},
- {10502, "Proj_Colorado_CS27_Central"},
- {10503, "Proj_Colorado_CS27_South"},
- {10531, "Proj_Colorado_CS83_North"},
- {10532, "Proj_Colorado_CS83_Central"},
- {10533, "Proj_Colorado_CS83_South"},
- {10600, "Proj_Connecticut_CS27"},
- {10630, "Proj_Connecticut_CS83"},
- {10700, "Proj_Delaware_CS27"},
- {10730, "Proj_Delaware_CS83"},
- {10901, "Proj_Florida_CS27_East"},
- {10902, "Proj_Florida_CS27_West"},
- {10903, "Proj_Florida_CS27_North"},
- {10931, "Proj_Florida_CS83_East"},
- {10932, "Proj_Florida_CS83_West"},
- {10933, "Proj_Florida_CS83_North"},
- {11001, "Proj_Georgia_CS27_East"},
- {11002, "Proj_Georgia_CS27_West"},
- {11031, "Proj_Georgia_CS83_East"},
- {11032, "Proj_Georgia_CS83_West"},
- {11101, "Proj_Idaho_CS27_East"},
- {11102, "Proj_Idaho_CS27_Central"},
- {11103, "Proj_Idaho_CS27_West"},
- {11131, "Proj_Idaho_CS83_East"},
- {11132, "Proj_Idaho_CS83_Central"},
- {11133, "Proj_Idaho_CS83_West"},
- {11201, "Proj_Illinois_CS27_East"},
- {11202, "Proj_Illinois_CS27_West"},
- {11231, "Proj_Illinois_CS83_East"},
- {11232, "Proj_Illinois_CS83_West"},
- {11301, "Proj_Indiana_CS27_East"},
- {11302, "Proj_Indiana_CS27_West"},
- {11331, "Proj_Indiana_CS83_East"},
- {11332, "Proj_Indiana_CS83_West"},
- {11401, "Proj_Iowa_CS27_North"},
- {11402, "Proj_Iowa_CS27_South"},
- {11431, "Proj_Iowa_CS83_North"},
- {11432, "Proj_Iowa_CS83_South"},
- {11501, "Proj_Kansas_CS27_North"},
- {11502, "Proj_Kansas_CS27_South"},
- {11531, "Proj_Kansas_CS83_North"},
- {11532, "Proj_Kansas_CS83_South"},
- {11601, "Proj_Kentucky_CS27_North"},
- {11602, "Proj_Kentucky_CS27_South"},
- {11631, "Proj_Kentucky_CS83_North"},
- {11632, "Proj_Kentucky_CS83_South"},
- {11701, "Proj_Louisiana_CS27_North"},
- {11702, "Proj_Louisiana_CS27_South"},
- {11731, "Proj_Louisiana_CS83_North"},
- {11732, "Proj_Louisiana_CS83_South"},
- {11801, "Proj_Maine_CS27_East"},
- {11802, "Proj_Maine_CS27_West"},
- {11831, "Proj_Maine_CS83_East"},
- {11832, "Proj_Maine_CS83_West"},
- {11900, "Proj_Maryland_CS27"},
- {11930, "Proj_Maryland_CS83"},
- {12001, "Proj_Massachusetts_CS27_Mainland"},
- {12002, "Proj_Massachusetts_CS27_Island"},
- {12031, "Proj_Massachusetts_CS83_Mainland"},
- {12032, "Proj_Massachusetts_CS83_Island"},
- {12101, "Proj_Michigan_State_Plane_East"},
- {12102, "Proj_Michigan_State_Plane_Old_Central"},
- {12103, "Proj_Michigan_State_Plane_West"},
- {12111, "Proj_Michigan_CS27_North"},
- {12112, "Proj_Michigan_CS27_Central"},
- {12113, "Proj_Michigan_CS27_South"},
- {12141, "Proj_Michigan_CS83_North"},
- {12142, "Proj_Michigan_CS83_Central"},
- {12143, "Proj_Michigan_CS83_South"},
- {12201, "Proj_Minnesota_CS27_North"},
- {12202, "Proj_Minnesota_CS27_Central"},
- {12203, "Proj_Minnesota_CS27_South"},
- {12231, "Proj_Minnesota_CS83_North"},
- {12232, "Proj_Minnesota_CS83_Central"},
- {12233, "Proj_Minnesota_CS83_South"},
- {12301, "Proj_Mississippi_CS27_East"},
- {12302, "Proj_Mississippi_CS27_West"},
- {12331, "Proj_Mississippi_CS83_East"},
- {12332, "Proj_Mississippi_CS83_West"},
- {12401, "Proj_Missouri_CS27_East"},
- {12402, "Proj_Missouri_CS27_Central"},
- {12403, "Proj_Missouri_CS27_West"},
- {12431, "Proj_Missouri_CS83_East"},
- {12432, "Proj_Missouri_CS83_Central"},
- {12433, "Proj_Missouri_CS83_West"},
- {12501, "Proj_Montana_CS27_North"},
- {12502, "Proj_Montana_CS27_Central"},
- {12503, "Proj_Montana_CS27_South"},
- {12530, "Proj_Montana_CS83"},
- {12601, "Proj_Nebraska_CS27_North"},
- {12602, "Proj_Nebraska_CS27_South"},
- {12630, "Proj_Nebraska_CS83"},
- {12701, "Proj_Nevada_CS27_East"},
- {12702, "Proj_Nevada_CS27_Central"},
- {12703, "Proj_Nevada_CS27_West"},
- {12731, "Proj_Nevada_CS83_East"},
- {12732, "Proj_Nevada_CS83_Central"},
- {12733, "Proj_Nevada_CS83_West"},
- {12800, "Proj_New_Hampshire_CS27"},
- {12830, "Proj_New_Hampshire_CS83"},
- {12900, "Proj_New_Jersey_CS27"},
- {12930, "Proj_New_Jersey_CS83"},
- {13001, "Proj_New_Mexico_CS27_East"},
- {13002, "Proj_New_Mexico_CS27_Central"},
- {13003, "Proj_New_Mexico_CS27_West"},
- {13031, "Proj_New_Mexico_CS83_East"},
- {13032, "Proj_New_Mexico_CS83_Central"},
- {13033, "Proj_New_Mexico_CS83_West"},
- {13101, "Proj_New_York_CS27_East"},
- {13102, "Proj_New_York_CS27_Central"},
- {13103, "Proj_New_York_CS27_West"},
- {13104, "Proj_New_York_CS27_Long_Island"},
- {13131, "Proj_New_York_CS83_East"},
- {13132, "Proj_New_York_CS83_Central"},
- {13133, "Proj_New_York_CS83_West"},
- {13134, "Proj_New_York_CS83_Long_Island"},
- {13200, "Proj_North_Carolina_CS27"},
- {13230, "Proj_North_Carolina_CS83"},
- {13301, "Proj_North_Dakota_CS27_North"},
- {13302, "Proj_North_Dakota_CS27_South"},
- {13331, "Proj_North_Dakota_CS83_North"},
- {13332, "Proj_North_Dakota_CS83_South"},
- {13401, "Proj_Ohio_CS27_North"},
- {13402, "Proj_Ohio_CS27_South"},
- {13431, "Proj_Ohio_CS83_North"},
- {13432, "Proj_Ohio_CS83_South"},
- {13501, "Proj_Oklahoma_CS27_North"},
- {13502, "Proj_Oklahoma_CS27_South"},
- {13531, "Proj_Oklahoma_CS83_North"},
- {13532, "Proj_Oklahoma_CS83_South"},
- {13601, "Proj_Oregon_CS27_North"},
- {13602, "Proj_Oregon_CS27_South"},
- {13631, "Proj_Oregon_CS83_North"},
- {13632, "Proj_Oregon_CS83_South"},
- {13701, "Proj_Pennsylvania_CS27_North"},
- {13702, "Proj_Pennsylvania_CS27_South"},
- {13731, "Proj_Pennsylvania_CS83_North"},
- {13732, "Proj_Pennsylvania_CS83_South"},
- {13800, "Proj_Rhode_Island_CS27"},
- {13830, "Proj_Rhode_Island_CS83"},
- {13901, "Proj_South_Carolina_CS27_North"},
- {13902, "Proj_South_Carolina_CS27_South"},
- {13930, "Proj_South_Carolina_CS83"},
- {14001, "Proj_South_Dakota_CS27_North"},
- {14002, "Proj_South_Dakota_CS27_South"},
- {14031, "Proj_South_Dakota_CS83_North"},
- {14032, "Proj_South_Dakota_CS83_South"},
- {14100, "Proj_Tennessee_CS27"},
- {14130, "Proj_Tennessee_CS83"},
- {14201, "Proj_Texas_CS27_North"},
- {14202, "Proj_Texas_CS27_North_Central"},
- {14203, "Proj_Texas_CS27_Central"},
- {14204, "Proj_Texas_CS27_South_Central"},
- {14205, "Proj_Texas_CS27_South"},
- {14231, "Proj_Texas_CS83_North"},
- {14232, "Proj_Texas_CS83_North_Central"},
- {14233, "Proj_Texas_CS83_Central"},
- {14234, "Proj_Texas_CS83_South_Central"},
- {14235, "Proj_Texas_CS83_South"},
- {14301, "Proj_Utah_CS27_North"},
- {14302, "Proj_Utah_CS27_Central"},
- {14303, "Proj_Utah_CS27_South"},
- {14331, "Proj_Utah_CS83_North"},
- {14332, "Proj_Utah_CS83_Central"},
- {14333, "Proj_Utah_CS83_South"},
- {14400, "Proj_Vermont_CS27"},
- {14430, "Proj_Vermont_CS83"},
- {14501, "Proj_Virginia_CS27_North"},
- {14502, "Proj_Virginia_CS27_South"},
- {14531, "Proj_Virginia_CS83_North"},
- {14532, "Proj_Virginia_CS83_South"},
- {14601, "Proj_Washington_CS27_North"},
- {14602, "Proj_Washington_CS27_South"},
- {14631, "Proj_Washington_CS83_North"},
- {14632, "Proj_Washington_CS83_South"},
- {14701, "Proj_West_Virginia_CS27_North"},
- {14702, "Proj_West_Virginia_CS27_South"},
- {14731, "Proj_West_Virginia_CS83_North"},
- {14732, "Proj_West_Virginia_CS83_South"},
- {14801, "Proj_Wisconsin_CS27_North"},
- {14802, "Proj_Wisconsin_CS27_Central"},
- {14803, "Proj_Wisconsin_CS27_South"},
- {14831, "Proj_Wisconsin_CS83_North"},
- {14832, "Proj_Wisconsin_CS83_Central"},
- {14833, "Proj_Wisconsin_CS83_South"},
- {14901, "Proj_Wyoming_CS27_East"},
- {14902, "Proj_Wyoming_CS27_East_Central"},
- {14903, "Proj_Wyoming_CS27_West_Central"},
- {14904, "Proj_Wyoming_CS27_West"},
- {14931, "Proj_Wyoming_CS83_East"},
- {14932, "Proj_Wyoming_CS83_East_Central"},
- {14933, "Proj_Wyoming_CS83_West_Central"},
- {14934, "Proj_Wyoming_CS83_West"},
- {15001, "Proj_Alaska_CS27_1"},
- {15002, "Proj_Alaska_CS27_2"},
- {15003, "Proj_Alaska_CS27_3"},
- {15004, "Proj_Alaska_CS27_4"},
- {15005, "Proj_Alaska_CS27_5"},
- {15006, "Proj_Alaska_CS27_6"},
- {15007, "Proj_Alaska_CS27_7"},
- {15008, "Proj_Alaska_CS27_8"},
- {15009, "Proj_Alaska_CS27_9"},
- {15010, "Proj_Alaska_CS27_10"},
- {15031, "Proj_Alaska_CS83_1"},
- {15032, "Proj_Alaska_CS83_2"},
- {15033, "Proj_Alaska_CS83_3"},
- {15034, "Proj_Alaska_CS83_4"},
- {15035, "Proj_Alaska_CS83_5"},
- {15036, "Proj_Alaska_CS83_6"},
- {15037, "Proj_Alaska_CS83_7"},
- {15038, "Proj_Alaska_CS83_8"},
- {15039, "Proj_Alaska_CS83_9"},
- {15040, "Proj_Alaska_CS83_10"},
- {15101, "Proj_Hawaii_CS27_1"},
- {15102, "Proj_Hawaii_CS27_2"},
- {15103, "Proj_Hawaii_CS27_3"},
- {15104, "Proj_Hawaii_CS27_4"},
- {15105, "Proj_Hawaii_CS27_5"},
- {15131, "Proj_Hawaii_CS83_1"},
- {15132, "Proj_Hawaii_CS83_2"},
- {15133, "Proj_Hawaii_CS83_3"},
- {15134, "Proj_Hawaii_CS83_4"},
- {15135, "Proj_Hawaii_CS83_5"},
- {15201, "Proj_Puerto_Rico_CS27"},
- {15202, "Proj_St_Croix"},
- {15230, "Proj_Puerto_Rico_Virgin_Is"},
- {15914, "Proj_BLM_14N_feet"},
- {15915, "Proj_BLM_15N_feet"},
- {15916, "Proj_BLM_16N_feet"},
- {15917, "Proj_BLM_17N_feet"},
- {17348, "Proj_Map_Grid_of_Australia_48"},
- {17349, "Proj_Map_Grid_of_Australia_49"},
- {17350, "Proj_Map_Grid_of_Australia_50"},
- {17351, "Proj_Map_Grid_of_Australia_51"},
- {17352, "Proj_Map_Grid_of_Australia_52"},
- {17353, "Proj_Map_Grid_of_Australia_53"},
- {17354, "Proj_Map_Grid_of_Australia_54"},
- {17355, "Proj_Map_Grid_of_Australia_55"},
- {17356, "Proj_Map_Grid_of_Australia_56"},
- {17357, "Proj_Map_Grid_of_Australia_57"},
- {17358, "Proj_Map_Grid_of_Australia_58"},
- {17448, "Proj_Australian_Map_Grid_48"},
- {17449, "Proj_Australian_Map_Grid_49"},
- {17450, "Proj_Australian_Map_Grid_50"},
- {17451, "Proj_Australian_Map_Grid_51"},
- {17452, "Proj_Australian_Map_Grid_52"},
- {17453, "Proj_Australian_Map_Grid_53"},
- {17454, "Proj_Australian_Map_Grid_54"},
- {17455, "Proj_Australian_Map_Grid_55"},
- {17456, "Proj_Australian_Map_Grid_56"},
- {17457, "Proj_Australian_Map_Grid_57"},
- {17458, "Proj_Australian_Map_Grid_58"},
- {18031, "Proj_Argentina_1"},
- {18032, "Proj_Argentina_2"},
- {18033, "Proj_Argentina_3"},
- {18034, "Proj_Argentina_4"},
- {18035, "Proj_Argentina_5"},
- {18036, "Proj_Argentina_6"},
- {18037, "Proj_Argentina_7"},
- {18051, "Proj_Colombia_3W"},
- {18052, "Proj_Colombia_Bogota"},
- {18053, "Proj_Colombia_3E"},
- {18054, "Proj_Colombia_6E"},
- {18072, "Proj_Egypt_Red_Belt"},
- {18073, "Proj_Egypt_Purple_Belt"},
- {18074, "Proj_Extended_Purple_Belt"},
- {18141, "Proj_New_Zealand_North_Island_Nat_Grid"},
- {18142, "Proj_New_Zealand_South_Island_Nat_Grid"},
- {19900, "Proj_Bahrain_Grid"},
- {19905, "Proj_Netherlands_E_Indies_Equatorial"},
- {19912, "Proj_RSO_Borneo"}
-};
+extern const TiffGeoTagKeyName ff_tiff_projection_codes[298];
#define TIFF_COORD_TRANS_OFFSET 1
-static const char *const tiff_coord_trans_codes[] = {
- "CT_TransverseMercator",
- "CT_TransvMercator_Modified_Alaska",
- "CT_ObliqueMercator",
- "CT_ObliqueMercator_Laborde",
- "CT_ObliqueMercator_Rosenmund",
- "CT_ObliqueMercator_Spherical",
- "CT_Mercator",
- "CT_LambertConfConic_2SP",
- "CT_LambertConfConic_Helmert",
- "CT_LambertAzimEqualArea",
- "CT_AlbersEqualArea",
- "CT_AzimuthalEquidistant",
- "CT_EquidistantConic",
- "CT_Stereographic",
- "CT_PolarStereographic",
- "CT_ObliqueStereographic",
- "CT_Equirectangular",
- "CT_CassiniSoldner",
- "CT_Gnomonic",
- "CT_MillerCylindrical",
- "CT_Orthographic",
- "CT_Polyconic",
- "CT_Robinson",
- "CT_Sinusoidal",
- "CT_VanDerGrinten",
- "CT_NewZealandMapGrid",
- "CT_TransvMercator_SouthOriented"
-};
+extern const char *const ff_tiff_coord_trans_codes[27];
#define TIFF_VERT_CS_OFFSET 5001
-static const char *const tiff_vert_cs_codes[] = {
- "VertCS_Airy_1830_ellipsoid",
- "VertCS_Airy_Modified_1849_ellipsoid",
- "VertCS_ANS_ellipsoid",
- "VertCS_Bessel_1841_ellipsoid",
- "VertCS_Bessel_Modified_ellipsoid",
- "VertCS_Bessel_Namibia_ellipsoid",
- "VertCS_Clarke_1858_ellipsoid",
- "VertCS_Clarke_1866_ellipsoid",
- "VertCS_Clarke_1880_Benoit_ellipsoid",
- "VertCS_Clarke_1880_IGN_ellipsoid",
- "VertCS_Clarke_1880_RGS_ellipsoid",
- "VertCS_Clarke_1880_Arc_ellipsoid",
- "VertCS_Clarke_1880_SGA_1922_ellipsoid",
- "VertCS_Everest_1830_1937_Adjustment_ellipsoid",
- "VertCS_Everest_1830_1967_Definition_ellipsoid",
- "VertCS_Everest_1830_1975_Definition_ellipsoid",
- "VertCS_Everest_1830_Modified_ellipsoid",
- "VertCS_GRS_1980_ellipsoid",
- "VertCS_Helmert_1906_ellipsoid",
- "VertCS_INS_ellipsoid",
- "VertCS_International_1924_ellipsoid",
- "VertCS_International_1967_ellipsoid",
- "VertCS_Krassowsky_1940_ellipsoid",
- "VertCS_NWL_9D_ellipsoid",
- "VertCS_NWL_10D_ellipsoid",
- "VertCS_Plessis_1817_ellipsoid",
- "VertCS_Struve_1860_ellipsoid",
- "VertCS_War_Office_ellipsoid",
- "VertCS_WGS_84_ellipsoid",
- "VertCS_GEM_10C_ellipsoid",
- "VertCS_OSU86F_ellipsoid",
- "VertCS_OSU91A_ellipsoid"
-};
+extern const char *const ff_tiff_vert_cs_codes[32];
#define TIFF_ORTHO_VERT_CS_OFFSET 5101
-static const char *const tiff_ortho_vert_cs_codes[] = {
- "VertCS_Newlyn",
- "VertCS_North_American_Vertical_Datum_1929",
- "VertCS_North_American_Vertical_Datum_1988",
- "VertCS_Yellow_Sea_1956",
- "VertCS_Baltic_Sea",
- "VertCS_Caspian_Sea"
-};
-
+extern const char *const ff_tiff_ortho_vert_cs_codes[6];
#endif
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 272fc43..3cdae8c 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -21,8 +21,6 @@
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "bswapdsp.h"
#include "get_bits.h"
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index d33639f..6d03081 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -72,7 +72,7 @@
int palette_has_changed = 0;
if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) {
- buffer_size_t size;
+ int size;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, &size);
if (pal && size == AVPALETTE_SIZE) {
diff --git a/libavcodec/ttmlenc.c b/libavcodec/ttmlenc.c
deleted file mode 100644
index 3972b43..0000000
--- a/libavcodec/ttmlenc.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * TTML subtitle encoder
- * Copyright (c) 2020 24i
- *
- * 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
- */
-
-/**
- * @file
- * TTML subtitle encoder
- * @see https://www.w3.org/TR/ttml1/
- * @see https://www.w3.org/TR/ttml2/
- * @see https://www.w3.org/TR/ttml-imsc/rec
- */
-
-#include "avcodec.h"
-#include "internal.h"
-#include "libavutil/avstring.h"
-#include "libavutil/bprint.h"
-#include "libavutil/internal.h"
-#include "ass_split.h"
-#include "ass.h"
-#include "ttmlenc.h"
-
-typedef struct {
- AVCodecContext *avctx;
- ASSSplitContext *ass_ctx;
- AVBPrint buffer;
-} TTMLContext;
-
-static void ttml_text_cb(void *priv, const char *text, int len)
-{
- TTMLContext *s = priv;
- AVBPrint cur_line = { 0 };
- AVBPrint *buffer = &s->buffer;
-
- av_bprint_init(&cur_line, len, AV_BPRINT_SIZE_UNLIMITED);
-
- av_bprint_append_data(&cur_line, text, len);
- if (!av_bprint_is_complete(&cur_line)) {
- av_log(s->avctx, AV_LOG_ERROR,
- "Failed to move the current subtitle dialog to AVBPrint!\n");
- av_bprint_finalize(&cur_line, NULL);
- return;
- }
-
-
- av_bprint_escape(buffer, cur_line.str, NULL, AV_ESCAPE_MODE_XML,
- 0);
-
- av_bprint_finalize(&cur_line, NULL);
-}
-
-static void ttml_new_line_cb(void *priv, int forced)
-{
- TTMLContext *s = priv;
-
- av_bprintf(&s->buffer, "<br/>");
-}
-
-static const ASSCodesCallbacks ttml_callbacks = {
- .text = ttml_text_cb,
- .new_line = ttml_new_line_cb,
-};
-
-static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf,
- int bufsize, const AVSubtitle *sub)
-{
- TTMLContext *s = avctx->priv_data;
- ASSDialog *dialog;
- int i;
-
- av_bprint_clear(&s->buffer);
-
- for (i=0; i<sub->num_rects; i++) {
- const char *ass = sub->rects[i]->ass;
-
- if (sub->rects[i]->type != SUBTITLE_ASS) {
- av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
- return AVERROR(EINVAL);
- }
-
-#if FF_API_ASS_TIMING
- if (!strncmp(ass, "Dialogue: ", 10)) {
- int num;
- dialog = ff_ass_split_dialog(s->ass_ctx, ass, 0, &num);
-
- for (; dialog && num--; dialog++) {
- int ret = ff_ass_split_override_codes(&ttml_callbacks, s,
- dialog->text);
- int log_level = (ret != AVERROR_INVALIDDATA ||
- avctx->err_recognition & AV_EF_EXPLODE) ?
- AV_LOG_ERROR : AV_LOG_WARNING;
-
- if (ret < 0) {
- av_log(avctx, log_level,
- "Splitting received ASS dialog failed: %s\n",
- av_err2str(ret));
-
- if (log_level == AV_LOG_ERROR)
- return ret;
- }
- }
- } else {
-#endif
- dialog = ff_ass_split_dialog2(s->ass_ctx, ass);
- if (!dialog)
- return AVERROR(ENOMEM);
-
- {
- int ret = ff_ass_split_override_codes(&ttml_callbacks, s,
- dialog->text);
- int log_level = (ret != AVERROR_INVALIDDATA ||
- avctx->err_recognition & AV_EF_EXPLODE) ?
- AV_LOG_ERROR : AV_LOG_WARNING;
-
- if (ret < 0) {
- av_log(avctx, log_level,
- "Splitting received ASS dialog text %s failed: %s\n",
- dialog->text,
- av_err2str(ret));
-
- if (log_level == AV_LOG_ERROR) {
- ff_ass_free_dialog(&dialog);
- return ret;
- }
- }
-
- ff_ass_free_dialog(&dialog);
- }
-#if FF_API_ASS_TIMING
- }
-#endif
- }
-
- if (!av_bprint_is_complete(&s->buffer))
- return AVERROR(ENOMEM);
- if (!s->buffer.len)
- return 0;
-
- // force null-termination, so in case our destination buffer is
- // too small, the return value is larger than bufsize minus null.
- if (av_strlcpy(buf, s->buffer.str, bufsize) > bufsize - 1) {
- av_log(avctx, AV_LOG_ERROR, "Buffer too small for TTML event.\n");
- return AVERROR_BUFFER_TOO_SMALL;
- }
-
- return s->buffer.len;
-}
-
-static av_cold int ttml_encode_close(AVCodecContext *avctx)
-{
- TTMLContext *s = avctx->priv_data;
-
- ff_ass_split_free(s->ass_ctx);
-
- av_bprint_finalize(&s->buffer, NULL);
-
- return 0;
-}
-
-static av_cold int ttml_encode_init(AVCodecContext *avctx)
-{
- TTMLContext *s = avctx->priv_data;
-
- s->avctx = avctx;
-
- if (!(s->ass_ctx = ff_ass_split(avctx->subtitle_header))) {
- return AVERROR_INVALIDDATA;
- }
-
- if (!(avctx->extradata = av_mallocz(TTMLENC_EXTRADATA_SIGNATURE_SIZE +
- 1 + AV_INPUT_BUFFER_PADDING_SIZE))) {
- return AVERROR(ENOMEM);
- }
-
- avctx->extradata_size = TTMLENC_EXTRADATA_SIGNATURE_SIZE;
- memcpy(avctx->extradata, TTMLENC_EXTRADATA_SIGNATURE,
- TTMLENC_EXTRADATA_SIGNATURE_SIZE);
-
- av_bprint_init(&s->buffer, 0, AV_BPRINT_SIZE_UNLIMITED);
-
- return 0;
-}
-
-AVCodec ff_ttml_encoder = {
- .name = "ttml",
- .long_name = NULL_IF_CONFIG_SMALL("TTML subtitle"),
- .type = AVMEDIA_TYPE_SUBTITLE,
- .id = AV_CODEC_ID_TTML,
- .priv_data_size = sizeof(TTMLContext),
- .init = ttml_encode_init,
- .encode_sub = ttml_encode_frame,
- .close = ttml_encode_close,
- .capabilities = FF_CODEC_CAP_INIT_CLEANUP,
-};
diff --git a/libavcodec/twinvq_data.h b/libavcodec/twinvq_data.h
index 1d9678e..375acc2 100644
--- a/libavcodec/twinvq_data.h
+++ b/libavcodec/twinvq_data.h
@@ -135,6 +135,7 @@
* without risking a segfault on malformed files.
*/
static const struct twinvq_data {
+ float lsp08[504];
int16_t fcb08l[640];
int16_t fcb08m[320];
int16_t fcb08s[320];
@@ -158,6 +159,7 @@
int16_t fcb11m[320];
int16_t fcb11s[320];
int16_t shape11[1280];
+ float lsp11[1312];
int16_t cb1110l0[1280];
int16_t cb1110l1[1280];
@@ -170,6 +172,7 @@
int16_t fcb16m[320];
int16_t fcb16s[320];
int16_t shape16[1920];
+ float lsp16[1400];
int16_t cb1616l0[1024];
int16_t cb1616l1[1024];
@@ -189,6 +192,7 @@
int16_t fcb22m_1[640];
int16_t fcb22s_1[640];
int16_t shape22_1[1152];
+ float lsp22_1[1312];
int16_t cb2224l0[960];
int16_t cb2224l1[960];
@@ -221,6 +225,7 @@
int16_t fcb44m[640];
int16_t fcb44s[640];
int16_t shape44[1152];
+ float lsp44[1640];
int16_t cb4448l0[896];
int16_t cb4448l1[896];
@@ -10031,6 +10036,584 @@
-3976, -66, -594, 6181, -110, 292, 1129, -591
},
+.lsp08 = {
+ 0.2702, 0.5096, 0.6437, 0.7672, 0.9639, 1.0696, 1.2625, 1.5789,
+ 1.9285, 2.2383, 2.5129, 2.8470, 0.1740, 0.3677, 0.6082, 0.8387,
+ 1.1084, 1.3721, 1.6362, 1.8733, 2.0640, 2.3442, 2.6087, 2.8548,
+ 0.1536, 0.3279, 0.5143, 0.6859, 0.9763, 1.2744, 1.5605, 1.8566,
+ 2.1007, 2.3450, 2.6075, 2.8850, 0.2075, 0.4533, 0.7709, 1.0377,
+ 1.2953, 1.5132, 1.7826, 2.0351, 2.2590, 2.4996, 2.6795, 2.8748,
+ 0.1393, 0.2453, 0.3754, 0.5453, 0.8148, 1.1289, 1.4389, 1.7592,
+ 2.0353, 2.3215, 2.5934, 2.8588, 0.1250, 0.3627, 0.7613, 1.1380,
+ 1.4163, 1.5565, 1.6920, 1.8130, 1.8678, 2.0427, 2.4318, 2.8544,
+ 0.2256, 0.4223, 0.6452, 0.8599, 1.0673, 1.3118, 1.5486, 1.8366,
+ 2.0759, 2.3026, 2.5284, 2.8030, 0.2304, 0.4404, 0.6891, 0.8964,
+ 1.1510, 1.4202, 1.6483, 1.8580, 2.1181, 2.3686, 2.6078, 2.9128,
+ 0.2230, 0.3816, 0.5520, 0.6062, 0.7909, 1.0988, 1.4330, 1.7846,
+ 2.0713, 2.3457, 2.6048, 2.8708, 0.2447, 0.5800, 0.8249, 0.9905,
+ 1.1721, 1.3990, 1.6694, 1.9064, 2.1307, 2.4255, 2.6815, 2.9117,
+ 0.1974, 0.3812, 0.5802, 0.7759, 0.9280, 1.1547, 1.4170, 1.6369,
+ 1.8890, 2.2587, 2.5626, 2.8239, 0.1209, 0.2510, 0.4841, 0.8048,
+ 1.1197, 1.3563, 1.6073, 1.8926, 2.1350, 2.3669, 2.6291, 2.8985,
+ 0.2352, 0.4347, 0.6582, 0.8178, 0.9548, 1.1654, 1.4942, 1.8812,
+ 2.1703, 2.3779, 2.6412, 2.8871, 0.2091, 0.4084, 0.6730, 0.9151,
+ 1.1259, 1.3262, 1.5937, 1.8129, 2.0237, 2.3317, 2.5778, 2.8620,
+ 0.1167, 0.2406, 0.4520, 0.7298, 0.9848, 1.2448, 1.5137, 1.7874,
+ 2.0280, 2.3020, 2.5914, 2.8794, 0.3003, 0.4966, 0.6520, 0.8505,
+ 1.1600, 1.3981, 1.5805, 1.8346, 2.0757, 2.3102, 2.5760, 2.8499,
+ 0.2451, 0.4163, 0.5960, 0.7805, 0.9507, 1.2438, 1.5587, 1.8581,
+ 2.0735, 2.3198, 2.5704, 2.8220, 0.3112, 0.5517, 0.7032, 0.8528,
+ 1.1489, 1.4257, 1.6848, 1.9388, 2.1577, 2.4265, 2.6678, 2.9051,
+ 0.2249, 0.3897, 0.5559, 0.7473, 1.0158, 1.3581, 1.6914, 1.9930,
+ 2.1843, 2.3534, 2.5512, 2.8065, 0.2600, 0.4574, 0.7349, 0.9691,
+ 1.1696, 1.3848, 1.6335, 1.9021, 2.1174, 2.3481, 2.5902, 2.8390,
+ 0.2246, 0.3372, 0.4560, 0.5249, 0.7056, 1.0273, 1.3810, 1.7132,
+ 1.9819, 2.2574, 2.5410, 2.8491, 0.1419, 0.4834, 0.8835, 1.1453,
+ 1.2839, 1.4224, 1.5593, 1.7877, 2.1285, 2.4070, 2.6043, 2.8511,
+ 0.1886, 0.3677, 0.5617, 0.8099, 1.1277, 1.3841, 1.5804, 1.8136,
+ 2.0307, 2.2805, 2.5399, 2.8322, 0.2351, 0.4151, 0.6675, 0.8713,
+ 1.0464, 1.3292, 1.6586, 1.9281, 2.1355, 2.3495, 2.6222, 2.8782,
+ 0.2700, 0.4489, 0.6206, 0.7121, 0.7737, 0.9848, 1.3658, 1.7433,
+ 2.0139, 2.2243, 2.4806, 2.8175, 0.2479, 0.4425, 0.6490, 0.8745,
+ 1.1161, 1.3849, 1.6773, 1.9566, 2.1491, 2.3624, 2.5685, 2.8114,
+ 0.2035, 0.3701, 0.5567, 0.7953, 1.0082, 1.2758, 1.5373, 1.7822,
+ 2.0175, 2.2601, 2.4759, 2.7771, 0.1856, 0.3461, 0.5998, 0.9041,
+ 1.2383, 1.4612, 1.6667, 1.9305, 2.1617, 2.4107, 2.6477, 2.8656,
+ 0.2107, 0.3715, 0.5289, 0.6651, 0.8420, 1.1168, 1.4401, 1.7230,
+ 1.9901, 2.2687, 2.5452, 2.8655, 0.1218, 0.2999, 0.6348, 0.9482,
+ 1.2745, 1.5876, 1.9129, 2.2348, 2.4020, 2.4922, 2.6351, 2.8357,
+ 0.1617, 0.3483, 0.5869, 0.8163, 1.0366, 1.2344, 1.4609, 1.7029,
+ 1.9476, 2.2337, 2.5258, 2.8442, 0.2505, 0.4894, 0.7510, 0.9152,
+ 1.0845, 1.3657, 1.6528, 1.8346, 2.0160, 2.2811, 2.5338, 2.8136,
+ 0.0947, 0.1158, 0.0578, -0.0337, -0.0066, 0.0104, -0.0447, -0.0505,
+-0.0778, -0.0293, 0.0251, -0.0143, 0.0349, -0.0227, -0.0909, 0.0523,
+ 0.0325, -0.0410, -0.1045, -0.0899, -0.0009, 0.0075, -0.0575, -0.0855,
+-0.0129, 0.0575, 0.0597, 0.0391, 0.0371, -0.0184, -0.0083, 0.0287,
+ 0.0143, 0.0167, 0.0120, -0.0168, 0.0452, 0.0223, -0.0352, 0.0119,
+-0.0496, -0.0965, -0.0661, -0.0072, 0.1099, 0.0843, -0.0087, -0.0478,
+-0.0128, -0.0120, -0.0004, 0.0731, 0.1047, 0.0630, 0.0196, -0.0103,
+-0.0399, -0.0986, -0.0912, -0.0390, -0.0247, -0.0694, -0.0749, -0.0066,
+ 0.0223, 0.0634, 0.0343, -0.0134, 0.0727, 0.0241, 0.0066, 0.0437,
+ 0.0610, 0.0364, 0.0248, -0.0358, -0.0686, -0.0104, 0.0426, 0.0088,
+-0.0137, -0.0165, 0.0671, 0.0815, -0.0863, -0.0644, -0.0088, 0.0023,
+ 0.0482, 0.1174, 0.1270, 0.0594, 0.0165, 0.0949, 0.1098, 0.0137,
+ 0.4951, 0.4999, 0.4958, 0.4907, 0.4984, 0.4965, 0.4958, 0.4996,
+ 0.4987, 0.4958, 0.4986, 0.4977, 0.2841, 0.2186, 0.1474, 0.1687,
+ 0.2217, 0.2632, 0.2706, 0.2624, 0.2162, 0.2453, 0.2460, 0.2531
+},
+
+.lsp11 = {
+ 0.1103, 0.3862, 0.6863, 0.8447, 0.9231, 1.0261, 1.1248, 1.4057,
+ 1.6621, 1.8010, 1.8692, 2.0704, 2.3490, 2.6060, 2.7539, 2.8977,
+ 0.1273, 0.2407, 0.3812, 0.6004, 0.7767, 0.9383, 1.1344, 1.3351,
+ 1.5233, 1.7262, 1.9466, 2.1739, 2.3495, 2.5162, 2.7164, 2.9202,
+ 0.2010, 0.3330, 0.4488, 0.6465, 0.8046, 0.9889, 1.1479, 1.2964,
+ 1.4770, 1.6606, 1.8789, 2.1155, 2.3287, 2.5199, 2.7101, 2.9119,
+ 0.1168, 0.2197, 0.3279, 0.4691, 0.6268, 0.8251, 1.0533, 1.2714,
+ 1.4712, 1.6762, 1.8831, 2.1114, 2.3230, 2.5297, 2.7365, 2.9270,
+ 0.1405, 0.3109, 0.4986, 0.6891, 0.8634, 1.0583, 1.2594, 1.4349,
+ 1.6232, 1.8116, 1.9905, 2.1935, 2.3799, 2.5656, 2.7661, 2.9486,
+ 0.1703, 0.3057, 0.4403, 0.5225, 0.5969, 0.8110, 1.0729, 1.3215,
+ 1.5407, 1.7381, 1.9477, 2.1680, 2.3586, 2.5612, 2.7630, 2.9410,
+ 0.1128, 0.2628, 0.4523, 0.6495, 0.8176, 0.9816, 1.1746, 1.3710,
+ 1.5568, 1.7518, 1.9497, 2.1452, 2.3346, 2.5389, 2.7362, 2.9264,
+ 0.1809, 0.3287, 0.5205, 0.7264, 0.9298, 1.1217, 1.2970, 1.4894,
+ 1.6874, 1.8493, 2.0576, 2.2382, 2.4097, 2.6041, 2.7796, 2.9389,
+ 0.2502, 0.4709, 0.6892, 0.8346, 0.9209, 1.0455, 1.2399, 1.4616,
+ 1.6463, 1.8380, 2.0475, 2.2397, 2.4665, 2.6550, 2.7701, 2.8895,
+ 0.1040, 0.2340, 0.3964, 0.5740, 0.7764, 0.9941, 1.2000, 1.4014,
+ 1.6024, 1.7974, 1.9939, 2.1959, 2.3783, 2.5663, 2.7613, 2.9484,
+ 0.1912, 0.3393, 0.4743, 0.6313, 0.8014, 0.9879, 1.1855, 1.3922,
+ 1.5678, 1.7289, 1.9271, 2.1165, 2.3089, 2.5414, 2.7448, 2.9269,
+ 0.0965, 0.2025, 0.3398, 0.4990, 0.6934, 0.9386, 1.1730, 1.3766,
+ 1.5783, 1.7783, 1.9790, 2.1831, 2.3670, 2.5578, 2.7641, 2.9516,
+ 0.2126, 0.3652, 0.5545, 0.7170, 0.8674, 1.0640, 1.2558, 1.4061,
+ 1.5904, 1.8095, 1.9760, 2.1505, 2.3549, 2.5575, 2.7023, 2.8877,
+ 0.1827, 0.3426, 0.4894, 0.6488, 0.7960, 0.9535, 1.1217, 1.2798,
+ 1.4566, 1.6453, 1.8044, 2.0042, 2.2379, 2.4611, 2.6697, 2.8966,
+ 0.2034, 0.3822, 0.5231, 0.6960, 0.9200, 1.0394, 1.1616, 1.3772,
+ 1.5493, 1.7330, 1.9646, 2.1233, 2.3334, 2.5361, 2.7087, 2.9470,
+ 0.1050, 0.2060, 0.3705, 0.5998, 0.8337, 1.0577, 1.2559, 1.4327,
+ 1.6334, 1.8165, 1.9853, 2.2058, 2.4063, 2.5818, 2.7625, 2.9458,
+ 0.1419, 0.4053, 0.6660, 0.8911, 1.0405, 1.1547, 1.2506, 1.3926,
+ 1.5669, 1.7527, 1.9694, 2.2054, 2.3889, 2.5743, 2.7586, 2.9174,
+ 0.1514, 0.2825, 0.4309, 0.5772, 0.7470, 0.9703, 1.1462, 1.3316,
+ 1.5321, 1.7259, 1.9282, 2.1266, 2.3106, 2.5064, 2.7067, 2.9094,
+ 0.1693, 0.3156, 0.4878, 0.6635, 0.8206, 0.9569, 1.1154, 1.3064,
+ 1.5109, 1.7184, 1.9179, 2.1036, 2.2763, 2.4820, 2.6949, 2.9105,
+ 0.1432, 0.2718, 0.4241, 0.5564, 0.6939, 0.9011, 1.1582, 1.3948,
+ 1.6181, 1.8024, 1.9814, 2.1740, 2.3459, 2.5456, 2.7491, 2.9307,
+ 0.2294, 0.3857, 0.5590, 0.7434, 0.9189, 1.0941, 1.2740, 1.4456,
+ 1.6178, 1.7994, 1.9689, 2.1644, 2.3525, 2.5385, 2.7468, 2.9405,
+ 0.1667, 0.3109, 0.4612, 0.6032, 0.7375, 0.8866, 1.0840, 1.3053,
+ 1.4982, 1.7044, 1.9146, 2.1117, 2.2942, 2.4983, 2.7084, 2.9132,
+ 0.1810, 0.3205, 0.4696, 0.6231, 0.7641, 0.9959, 1.2427, 1.4361,
+ 1.5889, 1.7544, 1.9083, 2.0733, 2.2457, 2.4461, 2.6793, 2.9098,
+ 0.1164, 0.3753, 0.6068, 0.7503, 1.0100, 1.2131, 1.3793, 1.5302,
+ 1.6300, 1.7950, 1.9057, 2.1031, 2.3830, 2.5745, 2.6949, 2.8779,
+ 0.1571, 0.4378, 0.6735, 0.8312, 0.8944, 0.9818, 1.1622, 1.4094,
+ 1.6423, 1.8066, 1.9258, 2.1838, 2.4363, 2.6279, 2.7358, 2.8790,
+ 0.1398, 0.2686, 0.4248, 0.6156, 0.7870, 1.0035, 1.2012, 1.3689,
+ 1.5363, 1.7398, 1.9604, 2.1619, 2.3345, 2.5097, 2.7271, 2.9368,
+ 0.1913, 0.3338, 0.4987, 0.6446, 0.7852, 1.0163, 1.1886, 1.3610,
+ 1.5379, 1.7230, 1.8880, 2.0862, 2.2960, 2.4928, 2.7122, 2.9151,
+ 0.0908, 0.1752, 0.2899, 0.5365, 0.7761, 1.0100, 1.2124, 1.4060,
+ 1.6019, 1.8010, 1.9774, 2.1905, 2.3733, 2.5623, 2.7660, 2.9565,
+ 0.1773, 0.3179, 0.4925, 0.6864, 0.8452, 0.9897, 1.1860, 1.3722,
+ 1.5515, 1.7658, 1.9802, 2.1819, 2.3620, 2.5442, 2.7250, 2.9220,
+ 0.1286, 0.2341, 0.3689, 0.5364, 0.7176, 0.9350, 1.1083, 1.2943,
+ 1.4974, 1.7059, 1.9047, 2.1145, 2.3242, 2.5361, 2.7453, 2.9329,
+ 0.2273, 0.3834, 0.5565, 0.7192, 0.8431, 0.9962, 1.1763, 1.3571,
+ 1.5774, 1.7419, 1.9202, 2.1131, 2.2919, 2.4898, 2.6895, 2.9180,
+ 0.1775, 0.3058, 0.4274, 0.6023, 0.8151, 1.0734, 1.3211, 1.5178,
+ 1.6706, 1.8154, 1.9686, 2.1537, 2.3461, 2.5276, 2.7181, 2.9121,
+ 0.1653, 0.4304, 0.6361, 0.7824, 0.9183, 1.0452, 1.2071, 1.4077,
+ 1.6206, 1.8299, 2.0089, 2.1948, 2.3900, 2.5982, 2.7844, 2.9487,
+ 0.1492, 0.2609, 0.3820, 0.5485, 0.7243, 0.9319, 1.1538, 1.3579,
+ 1.5266, 1.7002, 1.8873, 2.1016, 2.3175, 2.5221, 2.7241, 2.9243,
+ 0.2074, 0.3781, 0.5209, 0.6869, 0.8577, 0.9875, 1.1849, 1.3568,
+ 1.4907, 1.7335, 1.8902, 2.1224, 2.3099, 2.4918, 2.7023, 2.8765,
+ 0.1359, 0.2254, 0.3286, 0.4432, 0.6586, 0.8964, 1.1125, 1.3523,
+ 1.5626, 1.7579, 1.9846, 2.1905, 2.3548, 2.5542, 2.7663, 2.9346,
+ 0.1430, 0.2966, 0.4685, 0.6493, 0.8315, 1.0304, 1.2220, 1.4082,
+ 1.5995, 1.7888, 1.9774, 2.1737, 2.3607, 2.5577, 2.7558, 2.9405,
+ 0.1477, 0.2694, 0.4056, 0.5626, 0.7051, 0.8647, 1.0491, 1.2488,
+ 1.4814, 1.7072, 1.9150, 2.1147, 2.3038, 2.5144, 2.7184, 2.9202,
+ 0.1690, 0.3033, 0.4580, 0.6686, 0.8536, 1.0293, 1.2124, 1.3998,
+ 1.5718, 1.7607, 1.9580, 2.1245, 2.2971, 2.4762, 2.6896, 2.9177,
+ 0.1092, 0.2779, 0.4853, 0.6880, 0.9011, 1.0953, 1.2752, 1.4618,
+ 1.6623, 1.8484, 2.0264, 2.2152, 2.4017, 2.5835, 2.7671, 2.9436,
+ 0.1497, 0.3637, 0.6014, 0.8032, 0.9963, 1.1835, 1.3741, 1.5698,
+ 1.7382, 1.9094, 2.0710, 2.2392, 2.4082, 2.5926, 2.7762, 2.9536,
+ 0.1434, 0.2492, 0.3966, 0.5934, 0.8033, 1.0657, 1.2796, 1.4276,
+ 1.5745, 1.7833, 1.9288, 2.1247, 2.3543, 2.5412, 2.7049, 2.8872,
+ 0.1612, 0.2926, 0.4574, 0.6387, 0.8265, 1.0180, 1.1808, 1.3526,
+ 1.5564, 1.7536, 1.9187, 2.1192, 2.3149, 2.5006, 2.7101, 2.9217,
+ 0.0828, 0.1863, 0.3235, 0.5050, 0.7250, 0.9867, 1.2093, 1.3941,
+ 1.5980, 1.7932, 1.9809, 2.1894, 2.3918, 2.5773, 2.7540, 2.9329,
+ 0.2001, 0.3655, 0.5290, 0.6761, 0.8027, 0.9972, 1.2090, 1.4255,
+ 1.6085, 1.7825, 1.9804, 2.1681, 2.3457, 2.5325, 2.7319, 2.9196,
+ 0.1505, 0.2767, 0.4254, 0.6054, 0.7821, 0.9567, 1.1294, 1.3080,
+ 1.4984, 1.6954, 1.8666, 2.0736, 2.2875, 2.4969, 2.7072, 2.9163,
+ 0.1589, 0.4151, 0.5749, 0.6651, 0.8061, 1.0470, 1.2616, 1.3690,
+ 1.4985, 1.7808, 1.9825, 2.1068, 2.2751, 2.5448, 2.7133, 2.8689,
+ 0.0916, 0.1846, 0.3788, 0.6329, 0.8774, 1.0687, 1.2653, 1.4561,
+ 1.6573, 1.8449, 2.0402, 2.2254, 2.3968, 2.5861, 2.7792, 2.9508,
+ 0.2282, 0.4159, 0.5834, 0.6899, 0.8108, 1.0321, 1.2795, 1.5262,
+ 1.6936, 1.8469, 2.0922, 2.2607, 2.3795, 2.5301, 2.7386, 2.9530,
+ 0.1651, 0.3004, 0.4555, 0.6179, 0.7891, 0.9584, 1.1372, 1.3707,
+ 1.5951, 1.7880, 1.9434, 2.1465, 2.3311, 2.5081, 2.6977, 2.8970,
+ 0.1279, 0.3828, 0.6330, 0.8323, 0.9652, 1.1175, 1.2319, 1.3511,
+ 1.5115, 1.6392, 1.7835, 1.9558, 2.2008, 2.4635, 2.6910, 2.9058,
+ 0.1193, 0.2185, 0.3521, 0.5311, 0.7378, 0.9239, 1.1105, 1.3217,
+ 1.5362, 1.7504, 1.9536, 2.1627, 2.3560, 2.5506, 2.7548, 2.9453,
+ 0.1806, 0.3432, 0.4981, 0.6948, 0.8928, 1.0527, 1.2467, 1.4140,
+ 1.6326, 1.7950, 1.9935, 2.1969, 2.3512, 2.5682, 2.7445, 2.9277,
+ 0.1846, 0.3112, 0.4568, 0.5891, 0.7317, 0.8493, 1.0204, 1.2022,
+ 1.3688, 1.6020, 1.8428, 2.0710, 2.2725, 2.4879, 2.7057, 2.9160,
+ 0.0880, 0.2514, 0.5332, 0.7272, 0.8906, 1.1354, 1.3199, 1.4941,
+ 1.6010, 1.7151, 1.8712, 2.0643, 2.2755, 2.5375, 2.7054, 2.8891,
+ 0.1382, 0.2833, 0.4658, 0.6897, 0.9071, 1.0716, 1.2469, 1.4143,
+ 1.5910, 1.7947, 1.9805, 2.1581, 2.3338, 2.5215, 2.7292, 2.9211,
+ 0.1061, 0.3494, 0.6327, 0.8570, 0.9748, 1.0560, 1.1529, 1.3250,
+ 1.6032, 1.8340, 1.9711, 2.1157, 2.3011, 2.5464, 2.8078, 2.9803,
+ 0.1603, 0.2839, 0.4307, 0.5980, 0.7980, 1.0399, 1.1971, 1.3524,
+ 1.5715, 1.7838, 1.9468, 2.1498, 2.3627, 2.5514, 2.7327, 2.9148,
+ 0.1691, 0.3117, 0.4796, 0.6895, 0.8732, 1.0164, 1.1916, 1.3707,
+ 1.5384, 1.7202, 1.8857, 2.0672, 2.2487, 2.4593, 2.6789, 2.8940,
+ 0.0965, 0.1702, 0.3191, 0.5721, 0.8100, 1.0241, 1.2272, 1.4196,
+ 1.6093, 1.8057, 1.9884, 2.2037, 2.3925, 2.5805, 2.7578, 2.9366,
+ 0.1950, 0.3519, 0.5272, 0.6973, 0.8732, 1.0656, 1.2112, 1.3959,
+ 1.6116, 1.7821, 1.9445, 2.1592, 2.3348, 2.5142, 2.7440, 2.9297,
+ 0.1388, 0.2557, 0.4120, 0.5727, 0.7354, 0.9196, 1.0985, 1.2805,
+ 1.4643, 1.6535, 1.8340, 2.0546, 2.2758, 2.4778, 2.6921, 2.9122,
+ 0.1823, 0.3336, 0.4957, 0.6771, 0.8563, 1.0137, 1.2299, 1.3849,
+ 1.5718, 1.7667, 1.9193, 2.1326, 2.3135, 2.5268, 2.7133, 2.8998,
+ 0.0790, 0.1901, 0.4083, 0.6456, 0.8463, 1.0285, 1.2297, 1.4181,
+ 1.6159, 1.8056, 1.9971, 2.1912, 2.3816, 2.5746, 2.7692, 2.9497,
+ 0.0049, 0.0116, 0.0045, 0.0039, -0.0010, -0.0122, -0.0205, -0.0034,
+-0.0140, -0.0041, 0.0191, -0.0322, 0.0002, -0.0124, -0.0269, 0.0059,
+ 0.0586, 0.0339, -0.0389, -0.0319, -0.0079, -0.0205, -0.0363, -0.0211,
+ 0.0241, 0.0595, 0.0469, 0.0283, 0.0176, -0.0183, -0.0173, -0.0004,
+ 0.0024, 0.0145, 0.0534, 0.0197, -0.0065, -0.0067, 0.0133, 0.0358,
+-0.0104, -0.0386, -0.0109, -0.0078, 0.0275, 0.0565, 0.0251, -0.0027,
+-0.0053, 0.0171, 0.0088, 0.0495, 0.0141, 0.0039, -0.0445, -0.0426,
+-0.0184, -0.0280, -0.0223, 0.0039, -0.0171, -0.0606, -0.0786, -0.0430,
+ 0.0544, 0.0595, 0.0320, -0.0012, 0.0108, 0.0185, 0.0066, 0.0408,
+ 0.0552, -0.0073, -0.0247, -0.0480, -0.0288, 0.0186, 0.0212, -0.0013,
+ 0.0403, 0.0598, 0.0690, 0.0516, -0.0298, -0.0177, 0.0278, 0.0168,
+-0.0106, 0.0251, 0.0386, 0.0331, -0.0052, 0.0133, 0.0291, -0.0158,
+-0.0329, -0.0367, 0.0287, 0.0462, -0.0176, 0.0049, 0.0242, -0.0034,
+ 0.0135, 0.0086, -0.0149, 0.0241, 0.0504, 0.0246, -0.0273, -0.0369,
+-0.0108, -0.0449, -0.0625, -0.0414, -0.0292, -0.0571, -0.0440, -0.0088,
+ 0.0098, 0.0009, -0.0004, 0.0007, -0.0314, -0.0208, -0.0138, -0.0277,
+-0.0044, 0.0522, 0.0315, -0.0270, -0.0277, -0.0256, -0.0103, -0.0201,
+-0.0287, -0.0279, -0.0182, 0.0472, 0.0613, 0.0450, 0.0413, 0.0333,
+ 0.0444, 0.0223, 0.0061, 0.0316, 0.0321, 0.0501, 0.0460, 0.0250,
+ 0.0227, 0.0235, 0.0099, 0.0185, -0.0347, -0.0684, -0.0189, 0.0242,
+-0.0190, -0.0273, -0.0012, -0.0253, 0.0293, -0.0231, -0.0219, -0.0010,
+ 0.0153, 0.0128, -0.0166, -0.0435, -0.0417, -0.0121, -0.0351, -0.0390,
+ 0.0077, -0.0278, -0.0355, 0.0092, -0.0063, 0.0005, 0.0216, 0.0461,
+ 0.0538, 0.0451, 0.0298, -0.0130, 0.0058, 0.0206, 0.0471, 0.0499,
+ 0.0280, 0.0086, -0.0007, -0.0317, 0.0259, 0.0176, 0.0043, 0.0212,
+ 0.0138, 0.0106, 0.0220, -0.0025, 0.0050, 0.0122, -0.0051, -0.0086,
+-0.0472, -0.0005, 0.0193, 0.0032, 0.0246, 0.0222, 0.0090, -0.0320,
+-0.0713, -0.0526, -0.0151, -0.0440, -0.0648, -0.0466, -0.0092, 0.0115,
+-0.0129, 0.0053, -0.0344, -0.0385, 0.0392, 0.0599, 0.0414, 0.0165,
+-0.0098, -0.0320, -0.0261, -0.0055, -0.0139, -0.0110, 0.0084, 0.0172,
+-0.0492, -0.0537, -0.0320, -0.0036, 0.0265, 0.0385, 0.0064, -0.0280,
+-0.0230, 0.0134, 0.0241, 0.0106, 0.0387, 0.0105, 0.0068, 0.0260,
+ 0.4940, 0.4911, 0.4849, 0.4820, 0.4837, 0.4839, 0.4824, 0.4799,
+ 0.4812, 0.4782, 0.4788, 0.4711, 0.4706, 0.4671, 0.4601, 0.4578,
+ 0.2954, 0.2121, 0.1859, 0.1958, 0.1474, 0.1086, 0.1351, 0.1362,
+ 0.1486, 0.1342, 0.1215, 0.1423, 0.1634, 0.1588, 0.1539, 0.1857
+},
+
+.lsp16 = {
+ 0.1813, 0.3911, 0.6301, 0.8012, 1.0057, 1.2041, 1.4271, 1.6943,
+ 1.9402, 2.1733, 2.3521, 2.4989, 2.5839, 2.6846, 2.7634, 2.8950,
+ 0.1311, 0.3183, 0.4659, 0.5601, 0.6658, 0.7828, 1.0065, 1.2717,
+ 1.5185, 1.7339, 1.9530, 2.2189, 2.3739, 2.4991, 2.6984, 2.9256,
+ 0.1627, 0.4519, 0.6323, 0.7012, 0.7848, 0.9801, 1.1810, 1.3222,
+ 1.5413, 1.8129, 1.9338, 2.0809, 2.3180, 2.5189, 2.7066, 2.9514,
+ 0.1475, 0.2447, 0.4240, 0.5669, 0.7872, 0.9838, 1.1823, 1.3814,
+ 1.5358, 1.6820, 1.8794, 2.1419, 2.4132, 2.6112, 2.7911, 2.9511,
+ 0.1224, 0.2876, 0.5013, 0.6985, 0.8902, 1.0901, 1.2835, 1.4768,
+ 1.6596, 1.8538, 2.0467, 2.2304, 2.4124, 2.5942, 2.7729, 2.9531,
+ 0.1741, 0.3034, 0.4677, 0.5879, 0.7258, 0.9648, 1.1417, 1.3220,
+ 1.5081, 1.7151, 1.9212, 2.1286, 2.3208, 2.4938, 2.6765, 2.8891,
+ 0.1657, 0.3174, 0.4907, 0.6559, 0.8295, 1.0254, 1.2071, 1.3880,
+ 1.5737, 1.7845, 1.9027, 2.1139, 2.3323, 2.5157, 2.7323, 2.9015,
+ 0.1592, 0.2758, 0.4417, 0.6315, 0.8257, 0.9873, 1.1277, 1.2830,
+ 1.4337, 1.6315, 1.8899, 2.1356, 2.3572, 2.5632, 2.7468, 2.9420,
+ 0.1524, 0.4325, 0.5931, 0.7036, 0.7696, 0.8923, 1.1739, 1.4773,
+ 1.6609, 1.7911, 1.9666, 2.1972, 2.3754, 2.5045, 2.6613, 2.8882,
+ 0.2130, 0.3013, 0.3721, 0.4257, 0.5079, 0.7015, 0.9815, 1.2554,
+ 1.4648, 1.6966, 1.9138, 2.1075, 2.3318, 2.5292, 2.7453, 2.9347,
+ 0.1142, 0.3748, 0.6205, 0.7642, 0.8121, 0.9022, 0.9843, 1.1558,
+ 1.4467, 1.7422, 1.9574, 2.1302, 2.3812, 2.5898, 2.7720, 2.9583,
+ 0.1255, 0.2339, 0.3570, 0.5323, 0.7458, 1.0003, 1.1729, 1.3567,
+ 1.5217, 1.6977, 1.8924, 2.0942, 2.3145, 2.5408, 2.7553, 2.9337,
+ 0.1316, 0.2289, 0.4327, 0.6663, 0.8509, 0.9994, 1.1697, 1.3804,
+ 1.5609, 1.6903, 1.8572, 2.1019, 2.3687, 2.5789, 2.7715, 2.9472,
+ 0.1502, 0.2546, 0.3883, 0.5333, 0.6976, 0.9163, 1.1071, 1.3364,
+ 1.5420, 1.7525, 1.8948, 2.0839, 2.2819, 2.4651, 2.6875, 2.8987,
+ 0.1593, 0.3014, 0.4573, 0.6354, 0.8157, 0.9805, 1.1783, 1.3747,
+ 1.5678, 1.7326, 1.9286, 2.1340, 2.3253, 2.5280, 2.7180, 2.9298,
+ 0.1811, 0.3167, 0.4655, 0.6507, 0.8198, 1.0075, 1.1892, 1.3743,
+ 1.5227, 1.7090, 1.8849, 2.0743, 2.2750, 2.4830, 2.6896, 2.8953,
+ 0.1846, 0.3577, 0.5315, 0.7290, 0.9176, 1.1016, 1.2654, 1.4525,
+ 1.6315, 1.8268, 2.0238, 2.1934, 2.3868, 2.5753, 2.7682, 2.9469,
+ 0.0876, 0.1439, 0.2048, 0.3654, 0.6281, 0.8853, 1.0907, 1.2992,
+ 1.5227, 1.7373, 1.9395, 2.1419, 2.3488, 2.5486, 2.7466, 2.9348,
+ 0.1391, 0.4170, 0.6561, 0.7953, 0.8734, 0.9986, 1.1870, 1.4520,
+ 1.6042, 1.7910, 2.0135, 2.1870, 2.3358, 2.5066, 2.7409, 2.9955,
+ 0.0804, 0.1355, 0.2599, 0.4998, 0.7408, 0.9474, 1.1276, 1.3428,
+ 1.5556, 1.7712, 1.9699, 2.1535, 2.3605, 2.5548, 2.7489, 2.9325,
+ 0.1304, 0.3087, 0.4979, 0.6584, 0.8414, 1.0329, 1.2244, 1.4189,
+ 1.6118, 1.8200, 1.9985, 2.1893, 2.3915, 2.5794, 2.7647, 2.9344,
+ 0.1895, 0.2849, 0.3705, 0.4126, 0.6265, 0.9207, 1.1774, 1.3762,
+ 1.5757, 1.7728, 1.9568, 2.1662, 2.3615, 2.5575, 2.7561, 2.9416,
+ 0.1800, 0.3078, 0.4805, 0.6796, 0.8503, 1.0046, 1.1703, 1.3269,
+ 1.4862, 1.6502, 1.8454, 2.0873, 2.3175, 2.5356, 2.7516, 2.9469,
+ 0.1950, 0.3233, 0.4568, 0.5940, 0.7589, 0.9978, 1.1701, 1.3383,
+ 1.5017, 1.6565, 1.8243, 2.0605, 2.2938, 2.5147, 2.7419, 2.9396,
+ 0.2531, 0.4391, 0.5790, 0.7170, 0.8998, 1.1430, 1.3577, 1.5326,
+ 1.6328, 1.7627, 1.9726, 2.1762, 2.3563, 2.5478, 2.7385, 2.9067,
+ 0.1805, 0.2788, 0.3591, 0.3881, 0.5441, 0.8055, 1.0766, 1.3165,
+ 1.5316, 1.7508, 1.9477, 2.1374, 2.3438, 2.5484, 2.7501, 2.9410,
+ 0.2044, 0.3671, 0.5396, 0.7042, 0.8582, 0.9831, 1.1261, 1.3194,
+ 1.4769, 1.6979, 1.8717, 2.0463, 2.2620, 2.4739, 2.7054, 2.9208,
+ 0.1048, 0.2175, 0.4206, 0.5923, 0.7483, 0.9400, 1.1356, 1.3799,
+ 1.5958, 1.7320, 1.8984, 2.1296, 2.3594, 2.5492, 2.7387, 2.9305,
+ 0.0842, 0.1729, 0.3951, 0.6447, 0.8688, 1.0605, 1.2472, 1.4330,
+ 1.6232, 1.8144, 2.0216, 2.1915, 2.3878, 2.5763, 2.7685, 2.9464,
+ 0.1461, 0.2593, 0.4105, 0.5677, 0.7328, 0.8919, 1.0484, 1.2302,
+ 1.4386, 1.6635, 1.8873, 2.1024, 2.3116, 2.5268, 2.7273, 2.9269,
+ 0.1503, 0.3108, 0.4756, 0.6731, 0.8600, 1.0233, 1.2115, 1.3971,
+ 1.5915, 1.7892, 1.9517, 2.1603, 2.3487, 2.5460, 2.7308, 2.8998,
+ 0.2163, 0.3669, 0.5125, 0.6709, 0.8143, 0.9930, 1.2095, 1.4205,
+ 1.6176, 1.7112, 1.8398, 2.0896, 2.3513, 2.5290, 2.6667, 2.8960,
+ 0.2133, 0.4382, 0.6287, 0.8702, 1.1088, 1.3749, 1.6062, 1.7446,
+ 1.8333, 1.9122, 1.9614, 2.0669, 2.1789, 2.3449, 2.6038, 2.8849,
+ 0.1598, 0.2719, 0.3877, 0.4815, 0.5926, 0.7795, 1.0449, 1.3045,
+ 1.5210, 1.7391, 1.9462, 2.1397, 2.3553, 2.5458, 2.7540, 2.9392,
+ 0.2918, 0.5607, 0.6801, 0.7404, 0.8285, 0.9431, 1.1579, 1.4080,
+ 1.6332, 1.8472, 1.9738, 2.0771, 2.2890, 2.5178, 2.7445, 2.9830,
+ 0.1664, 0.2842, 0.3965, 0.5463, 0.8162, 1.0346, 1.1849, 1.3446,
+ 1.5122, 1.7563, 1.9960, 2.2002, 2.3796, 2.5689, 2.7712, 2.9550,
+ 0.0911, 0.2397, 0.5052, 0.7868, 1.0299, 1.1311, 1.2244, 1.3333,
+ 1.4395, 1.6790, 1.9369, 2.1717, 2.3689, 2.5538, 2.7340, 2.9326,
+ 0.1647, 0.2931, 0.3836, 0.4978, 0.6255, 0.9243, 1.1339, 1.3001,
+ 1.5269, 1.8010, 1.9715, 2.1419, 2.3784, 2.5503, 2.6719, 2.8745,
+ 0.2440, 0.3802, 0.4756, 0.6613, 0.8627, 1.0292, 1.2291, 1.4060,
+ 1.5198, 1.7354, 1.9044, 2.1010, 2.3147, 2.4996, 2.7171, 2.9041,
+ 0.1590, 0.2876, 0.4572, 0.5996, 0.7713, 0.9490, 1.1205, 1.2815,
+ 1.4516, 1.6385, 1.8179, 2.0457, 2.2759, 2.4785, 2.6861, 2.9080,
+ 0.2297, 0.4309, 0.5712, 0.6717, 0.8138, 1.0463, 1.2492, 1.4560,
+ 1.6796, 1.8458, 1.9642, 2.1452, 2.3636, 2.5395, 2.7456, 2.9495,
+ 0.2975, 0.4678, 0.4996, 0.5809, 0.6279, 0.6884, 0.8606, 1.1386,
+ 1.4412, 1.6876, 1.8760, 2.0932, 2.3178, 2.5166, 2.7345, 2.9280,
+ 0.1278, 0.3737, 0.6004, 0.7069, 0.8147, 1.0180, 1.2581, 1.3812,
+ 1.4855, 1.7268, 1.9970, 2.1258, 2.2936, 2.5702, 2.7563, 2.8983,
+ 0.1314, 0.2508, 0.3999, 0.5680, 0.7424, 0.9367, 1.1286, 1.3175,
+ 1.5336, 1.7404, 1.9317, 2.1404, 2.3514, 2.5562, 2.7510, 2.9402,
+ 0.1043, 0.2367, 0.4293, 0.6376, 0.8160, 0.9836, 1.1779, 1.3850,
+ 1.5835, 1.7875, 1.9765, 2.1593, 2.3654, 2.5577, 2.7465, 2.9398,
+ 0.1529, 0.2515, 0.3454, 0.4374, 0.7011, 0.9015, 1.0744, 1.3532,
+ 1.5699, 1.7545, 2.0021, 2.1259, 2.2278, 2.4546, 2.7264, 2.9425,
+ 0.1429, 0.2808, 0.4395, 0.6334, 0.8069, 0.9705, 1.1520, 1.3250,
+ 1.5109, 1.7285, 1.9356, 2.1469, 2.3479, 2.5554, 2.7512, 2.9348,
+ 0.1625, 0.3022, 0.4756, 0.6315, 0.8032, 0.9924, 1.1596, 1.3204,
+ 1.4994, 1.6929, 1.8955, 2.1090, 2.3025, 2.5018, 2.6908, 2.8980,
+ 0.1692, 0.3427, 0.5228, 0.7756, 0.9688, 1.0950, 1.3056, 1.4360,
+ 1.5675, 1.8049, 1.9376, 2.1151, 2.3407, 2.5012, 2.7192, 2.9258,
+ 0.0474, 0.1251, 0.1939, 0.3841, 0.6501, 0.9231, 1.1153, 1.3240,
+ 1.5478, 1.7599, 1.9651, 2.1510, 2.3645, 2.5552, 2.7542, 2.9393,
+ 0.2196, 0.4656, 0.7492, 0.9922, 1.1678, 1.2489, 1.3112, 1.3657,
+ 1.4223, 1.5302, 1.7212, 1.9996, 2.2523, 2.4844, 2.7036, 2.9145,
+ 0.1128, 0.2368, 0.3704, 0.5476, 0.7723, 0.9968, 1.1930, 1.3992,
+ 1.6013, 1.7957, 1.9888, 2.1857, 2.3825, 2.5705, 2.7616, 2.9434,
+ 0.1341, 0.2768, 0.4510, 0.6359, 0.8332, 1.0335, 1.2004, 1.3952,
+ 1.5762, 1.7681, 1.9815, 2.1735, 2.3657, 2.5552, 2.7514, 2.9498,
+ 0.1247, 0.2559, 0.3516, 0.4726, 0.6861, 0.9483, 1.1852, 1.3858,
+ 1.5851, 1.7815, 1.9778, 2.1737, 2.3729, 2.5664, 2.7620, 2.9429,
+ 0.1988, 0.3320, 0.4777, 0.6737, 0.8425, 1.0265, 1.1694, 1.3655,
+ 1.5463, 1.7135, 1.9385, 2.1650, 2.3529, 2.5367, 2.7545, 2.9585,
+ 0.1376, 0.2620, 0.4273, 0.6169, 0.7755, 0.9441, 1.1169, 1.3157,
+ 1.5179, 1.7020, 1.8931, 2.1059, 2.3112, 2.5136, 2.7169, 2.9198,
+ 0.2112, 0.4385, 0.6091, 0.7618, 0.9553, 1.1543, 1.3445, 1.5396,
+ 1.7153, 1.9192, 2.1263, 2.3593, 2.5958, 2.8171, 2.9394, 3.0409,
+ 0.1347, 0.2099, 0.2646, 0.3453, 0.5266, 0.7869, 1.0513, 1.2795,
+ 1.4880, 1.7181, 1.9294, 2.1332, 2.3362, 2.5442, 2.7433, 2.9362,
+ 0.3141, 0.5935, 0.7517, 0.8313, 0.8568, 0.9570, 1.0250, 1.1275,
+ 1.3422, 1.6303, 1.8577, 2.0705, 2.2957, 2.5095, 2.7244, 2.9262,
+ 0.0962, 0.2116, 0.3961, 0.5641, 0.7122, 0.8883, 1.1023, 1.3481,
+ 1.5623, 1.7554, 1.9618, 2.1675, 2.3706, 2.5556, 2.7430, 2.9337,
+ 0.0898, 0.1510, 0.3060, 0.5820, 0.8221, 1.0388, 1.2261, 1.4289,
+ 1.6054, 1.8103, 1.9941, 2.1844, 2.3742, 2.5711, 2.7632, 2.9474,
+ 0.1326, 0.2316, 0.3761, 0.5177, 0.6782, 0.8761, 1.0952, 1.3175,
+ 1.5078, 1.7034, 1.9051, 2.1245, 2.3424, 2.5484, 2.7444, 2.9389,
+ 0.1740, 0.3293, 0.5174, 0.6824, 0.8394, 1.0372, 1.2046, 1.3723,
+ 1.5656, 1.7444, 1.9442, 2.1386, 2.3139, 2.4960, 2.7071, 2.9297,
+ 0.2304, 0.3775, 0.4865, 0.6182, 0.7842, 0.9208, 1.1151, 1.2843,
+ 1.4641, 1.6988, 1.9209, 2.1260, 2.3099, 2.5229, 2.7414, 2.9276,
+ 0.0094, 0.0261, -0.0037, 0.0041, -0.0092, -0.0044, -0.0232, -0.0073,
+-0.0047, -0.0021, 0.0250, -0.0580, -0.0140, -0.0342, -0.0586, 0.0020,
+ 0.0449, 0.0155, -0.0523, -0.0279, 0.0299, -0.0183, -0.0736, -0.0639,
+-0.0017, 0.0336, 0.0209, 0.0046, 0.0077, -0.0148, -0.0114, -0.0120,
+ 0.0115, -0.0050, 0.0445, 0.0048, 0.0188, -0.0137, -0.0080, 0.0239,
+-0.0184, -0.0524, -0.0195, -0.0126, 0.0284, 0.0632, 0.0141, -0.0093,
+-0.0096, 0.0196, 0.0230, 0.0379, 0.0308, 0.0237, -0.0224, -0.0600,
+-0.0755, -0.1074, -0.0988, -0.0606, -0.1038, -0.1552, -0.1480, -0.0672,
+ 0.0504, 0.0676, 0.0336, -0.0042, 0.0729, 0.1013, 0.0868, 0.0846,
+ 0.0954, 0.0515, -0.0066, -0.0851, -0.0485, 0.0294, 0.0395, 0.0087,
+ 0.0078, 0.0446, 0.0881, 0.0672, -0.0384, -0.0025, 0.0415, 0.0353,
+ 0.0080, 0.0052, 0.0190, 0.0182, 0.0069, 0.0168, 0.0374, 0.0037,
+-0.0292, -0.0429, 0.0302, 0.0681, -0.0233, -0.0238, -0.0003, -0.0043,
+ 0.0054, -0.0029, -0.0149, 0.0642, 0.0622, 0.0341, -0.0232, -0.0461,
+-0.0082, -0.0469, -0.0618, -0.0326, -0.0452, -0.0649, -0.0597, -0.0398,
+-0.0318, -0.0116, 0.0011, 0.0009, -0.0384, -0.0384, -0.0156, -0.0260,
+-0.0007, 0.0473, 0.0111, -0.0358, -0.0484, -0.0204, -0.0029, -0.0090,
+-0.0285, -0.0495, -0.0376, 0.0917, 0.1192, 0.1026, 0.0745, 0.0397,
+ 0.0463, 0.0253, 0.0025, 0.0465, 0.0100, 0.0488, 0.0416, 0.0223,
+ 0.0263, 0.0072, -0.0053, 0.0595, 0.0060, -0.0518, -0.0316, -0.0043,
+-0.0133, -0.0233, -0.0075, -0.0251, 0.0277, -0.0067, -0.0136, -0.0004,
+ 0.0235, 0.0112, -0.0182, -0.0324, -0.0210, -0.0035, -0.0395, -0.0384,
+ 0.0005, -0.0150, -0.0356, 0.0127, -0.0033, -0.0034, 0.0205, 0.0747,
+ 0.1138, 0.1015, 0.0995, -0.0161, -0.0045, 0.0129, 0.0472, 0.0575,
+ 0.0222, 0.0091, 0.0037, -0.0471, 0.0371, 0.0132, 0.0208, 0.0247,
+ 0.0117, 0.0164, 0.0225, 0.0124, -0.0023, 0.0088, -0.0046, 0.0047,
+-0.0393, 0.0018, 0.0148, 0.0020, 0.0044, 0.0165, 0.0229, -0.0208,
+-0.0477, -0.0310, -0.0164, -0.0390, -0.0764, -0.0525, -0.0094, 0.0075,
+-0.0102, -0.0045, -0.0504, -0.0709, 0.0822, 0.0710, 0.0426, 0.0014,
+-0.0371, -0.0400, -0.0157, -0.0155, -0.0173, -0.0138, -0.0015, 0.0134,
+-0.0418, -0.0682, -0.0256, 0.0050, 0.0360, 0.0354, 0.0074, -0.0396,
+-0.0235, 0.0284, 0.0494, 0.0153, 0.0448, 0.0025, -0.0061, 0.0252,
+ 0.1000, 0.2260, 0.2158, 0.2116, 0.2198, 0.2055, 0.2110, 0.1873,
+ 0.1907, 0.2071, 0.2164, 0.2009, 0.2059, 0.2124, 0.2141, 0.2093,
+ 0.0875, 0.0981, 0.1177, 0.1071, 0.1033, 0.1248, 0.1048, 0.1238,
+ 0.1166, 0.1008, 0.1062, 0.0992, 0.0994, 0.1067, 0.0999, 0.1187,
+ 0.0750, 0.0794, 0.0828, 0.0854, 0.0859, 0.0801, 0.0891, 0.0933,
+ 0.0969, 0.0920, 0.0915, 0.0862, 0.0868, 0.0891, 0.0842, 0.0824,
+ 0.0625, 0.0930, 0.0815, 0.0853, 0.0898, 0.0828, 0.0822, 0.0910,
+ 0.0873, 0.0906, 0.0856, 0.0840, 0.0774, 0.0785, 0.0684, 0.0711,
+ 0.3319, 0.4219, 0.4588, 0.4090, 0.4092, 0.4014, 0.3548, 0.3353,
+ 0.3708, 0.3352, 0.3720, 0.3538, 0.4084, 0.4289, 0.4060, 0.4210,
+ 0.0588, 0.0209, -0.0082, -0.0115, -0.0343, -0.0621, -0.0541, -0.0346,
+-0.0346, -0.0366, -0.0220, -0.0265, -0.0102, 0.0374, 0.0306, 0.0404,
+ 0.0306, 0.0090, -0.0054, 0.0333, 0.0047, 0.0238, 0.0141, 0.0165,
+ 0.0306, 0.0420, 0.0159, 0.0124, 0.0414, 0.0158, -0.0237, 0.0141,
+ 0.0765, 0.0057, -0.0260, -0.0426, -0.0395, -0.0126, -0.0579, -0.0417
+},
+
+.lsp22_1 = {
+ 0.0664, 0.1875, 0.4300, 0.6730, 0.8793, 1.0640, 1.2563, 1.4433,
+ 1.6394, 1.8176, 2.0029, 2.1921, 2.3796, 2.5671, 2.7595, 2.9536,
+ 0.2128, 0.4052, 0.5311, 0.6404, 0.7875, 0.8775, 1.0974, 1.3261,
+ 1.5563, 1.6790, 1.8339, 2.1195, 2.3226, 2.4609, 2.6440, 2.8947,
+ 0.2024, 0.3362, 0.4834, 0.6784, 0.9088, 1.0850, 1.2188, 1.4054,
+ 1.6102, 1.7767, 1.9679, 2.1436, 2.3445, 2.5467, 2.7429, 2.9320,
+ 0.1181, 0.2279, 0.4413, 0.6114, 0.7710, 0.9427, 1.1142, 1.2707,
+ 1.4892, 1.7416, 1.9526, 2.1466, 2.3629, 2.5445, 2.7293, 2.9205,
+ 0.1155, 0.2720, 0.4886, 0.6812, 0.8594, 1.0422, 1.2315, 1.4116,
+ 1.6137, 1.8020, 1.9758, 2.1743, 2.3602, 2.5568, 2.7472, 2.9374,
+ 0.1110, 0.3312, 0.4735, 0.5612, 0.7129, 0.8146, 1.0233, 1.3155,
+ 1.5765, 1.7746, 1.9574, 2.1416, 2.3220, 2.5384, 2.7334, 2.9318,
+ 0.1656, 0.3350, 0.4215, 0.5609, 0.6759, 0.8503, 1.1405, 1.4094,
+ 1.6057, 1.6860, 1.7639, 2.0031, 2.2680, 2.5076, 2.7263, 2.9368,
+ 0.1466, 0.3638, 0.4587, 0.5674, 0.7381, 0.8669, 0.9619, 1.1658,
+ 1.4667, 1.7440, 1.9335, 2.1018, 2.3022, 2.5281, 2.7359, 2.9261,
+ 0.1061, 0.2566, 0.4739, 0.6751, 0.8711, 1.0704, 1.2720, 1.4655,
+ 1.6605, 1.8494, 2.0290, 2.2197, 2.4008, 2.5912, 2.7772, 2.9513,
+ 0.1116, 0.2364, 0.3971, 0.6316, 0.8583, 1.0335, 1.1686, 1.3302,
+ 1.5612, 1.7877, 1.9829, 2.2052, 2.3596, 2.5460, 2.7341, 2.9290,
+ 0.2661, 0.4186, 0.5126, 0.6477, 0.8818, 1.1045, 1.2852, 1.4128,
+ 1.5851, 1.7593, 1.9399, 2.1757, 2.3684, 2.5136, 2.6927, 2.9064,
+ 0.1495, 0.2749, 0.4391, 0.6304, 0.8239, 1.0181, 1.1995, 1.3759,
+ 1.5669, 1.7722, 1.9671, 2.1635, 2.3586, 2.5528, 2.7445, 2.9311,
+ 0.0912, 0.1759, 0.3066, 0.5660, 0.8005, 0.9568, 1.1832, 1.4504,
+ 1.6259, 1.7948, 2.0113, 2.2002, 2.3654, 2.5583, 2.7929, 2.9735,
+ 0.1353, 0.2747, 0.4078, 0.5977, 0.7658, 0.9124, 1.1081, 1.3630,
+ 1.5875, 1.7847, 1.9323, 2.1181, 2.3321, 2.5046, 2.7183, 2.9225,
+ 0.1938, 0.4063, 0.4982, 0.6002, 0.7702, 0.9071, 1.1631, 1.3885,
+ 1.6043, 1.8118, 1.9306, 2.0893, 2.2724, 2.4609, 2.6283, 2.8802,
+ 0.1857, 0.3351, 0.4381, 0.6101, 0.7561, 0.8555, 1.0384, 1.3171,
+ 1.5667, 1.6904, 1.7552, 1.9689, 2.2597, 2.5260, 2.7272, 2.9337,
+ 0.1037, 0.2159, 0.4188, 0.6174, 0.8035, 1.0285, 1.2256, 1.4230,
+ 1.6400, 1.8322, 2.0144, 2.1988, 2.3810, 2.5682, 2.7613, 2.9438,
+ 0.1625, 0.2776, 0.4225, 0.6001, 0.7879, 0.9087, 1.0801, 1.2759,
+ 1.4899, 1.7448, 1.9911, 2.1770, 2.3723, 2.5777, 2.7971, 2.9444,
+ 0.2111, 0.3640, 0.5839, 0.7290, 0.8051, 1.0023, 1.2315, 1.4143,
+ 1.5878, 1.7755, 1.9804, 2.1498, 2.3312, 2.5350, 2.7613, 2.9472,
+ 0.1423, 0.2646, 0.4136, 0.6350, 0.8070, 0.9514, 1.1168, 1.3213,
+ 1.5776, 1.7721, 1.9404, 2.1545, 2.3385, 2.5137, 2.7396, 2.9553,
+ 0.1132, 0.2386, 0.4103, 0.5931, 0.7808, 0.9881, 1.1840, 1.3860,
+ 1.6021, 1.7990, 1.9922, 2.1885, 2.3852, 2.5717, 2.7640, 2.9510,
+ 0.1267, 0.2602, 0.3913, 0.5944, 0.7598, 0.9198, 1.0781, 1.2715,
+ 1.5299, 1.7573, 1.9308, 2.1346, 2.3267, 2.5419, 2.7466, 2.9320,
+ 0.2023, 0.3417, 0.4392, 0.6141, 0.7439, 0.8593, 1.1096, 1.3543,
+ 1.5185, 1.6553, 1.7862, 2.0341, 2.2718, 2.4834, 2.7103, 2.9466,
+ 0.1113, 0.2470, 0.3677, 0.5686, 0.7700, 0.9356, 1.0806, 1.2452,
+ 1.4830, 1.7344, 1.9268, 2.1404, 2.3371, 2.5169, 2.7329, 2.9012,
+ 0.1664, 0.3554, 0.5573, 0.7471, 0.9245, 1.0998, 1.2787, 1.4655,
+ 1.6654, 1.8346, 2.0179, 2.2159, 2.4096, 2.5946, 2.7790, 2.9530,
+ 0.1313, 0.2625, 0.4731, 0.6444, 0.8110, 0.9878, 1.1493, 1.3212,
+ 1.5719, 1.8138, 1.9861, 2.1943, 2.3714, 2.5578, 2.7346, 2.9296,
+ 0.1186, 0.3035, 0.5049, 0.6860, 0.8670, 0.9975, 1.1364, 1.3471,
+ 1.5695, 1.7412, 1.9346, 2.1506, 2.3413, 2.5531, 2.7794, 2.9627,
+ 0.1108, 0.2697, 0.4787, 0.6344, 0.7909, 0.9586, 1.1440, 1.3511,
+ 1.5686, 1.7601, 1.9246, 2.1241, 2.3293, 2.5390, 2.7315, 2.9333,
+ 0.0985, 0.2302, 0.3544, 0.5759, 0.7620, 0.9651, 1.1497, 1.3080,
+ 1.5500, 1.7845, 1.9518, 2.1734, 2.3565, 2.5665, 2.7605, 2.9102,
+ 0.1208, 0.2727, 0.4381, 0.5736, 0.7382, 0.8390, 1.0102, 1.2648,
+ 1.5100, 1.7440, 1.9619, 2.1430, 2.3307, 2.5159, 2.7264, 2.9211,
+ 0.1582, 0.2777, 0.4475, 0.6551, 0.8591, 1.0084, 1.1414, 1.3291,
+ 1.5902, 1.7826, 1.9543, 2.1659, 2.3233, 2.5044, 2.6935, 2.9199,
+ 0.1360, 0.2873, 0.4585, 0.6295, 0.7592, 0.9089, 1.0492, 1.2733,
+ 1.5391, 1.7768, 1.9372, 2.1329, 2.3168, 2.5015, 2.6857, 2.8837,
+ 0.0886, 0.1829, 0.3696, 0.6126, 0.8334, 1.0135, 1.2303, 1.4674,
+ 1.6743, 1.8564, 2.0530, 2.2370, 2.3960, 2.5787, 2.7756, 2.9377,
+ 0.2005, 0.3537, 0.4700, 0.6249, 0.7385, 0.9097, 1.1759, 1.3811,
+ 1.5314, 1.6705, 1.8546, 2.1229, 2.3292, 2.5251, 2.7951, 2.9646,
+ 0.1999, 0.3112, 0.4722, 0.7146, 0.8908, 1.0028, 1.1831, 1.3903,
+ 1.6125, 1.7514, 1.9083, 2.1248, 2.3271, 2.5339, 2.6945, 2.8918,
+ 0.1243, 0.2606, 0.4382, 0.5850, 0.7705, 0.9727, 1.1214, 1.3059,
+ 1.5218, 1.7406, 1.9137, 2.1353, 2.3354, 2.5299, 2.7287, 2.9068,
+ 0.1039, 0.2426, 0.4265, 0.6284, 0.8152, 0.9941, 1.2004, 1.4038,
+ 1.5912, 1.7763, 1.9650, 2.1598, 2.3474, 2.5488, 2.7419, 2.9322,
+ 0.1364, 0.2420, 0.3886, 0.5864, 0.7663, 0.8844, 1.0860, 1.3242,
+ 1.5518, 1.7893, 2.0004, 2.1562, 2.3619, 2.5516, 2.7687, 2.9181,
+ 0.1483, 0.2851, 0.4479, 0.6312, 0.7924, 0.9821, 1.1705, 1.3386,
+ 1.5375, 1.7226, 1.9053, 2.0991, 2.2898, 2.4953, 2.7000, 2.9146,
+ 0.2332, 0.4561, 0.5407, 0.6212, 0.7524, 0.8215, 0.9522, 1.1685,
+ 1.5216, 1.7132, 1.8291, 2.0647, 2.2811, 2.4857, 2.7071, 2.9281,
+ 0.1348, 0.3126, 0.5179, 0.7192, 0.9227, 1.1363, 1.3223, 1.4756,
+ 1.6509, 1.8191, 1.9991, 2.1976, 2.3877, 2.5768, 2.7590, 2.9386,
+ 0.1093, 0.2211, 0.4763, 0.6703, 0.8282, 0.9536, 1.1202, 1.3796,
+ 1.6043, 1.8031, 1.9832, 2.1604, 2.3578, 2.5856, 2.7650, 2.9291,
+ 0.1865, 0.3027, 0.4580, 0.6719, 0.8400, 1.0082, 1.1901, 1.3782,
+ 1.5448, 1.6885, 1.9477, 2.1381, 2.2797, 2.5113, 2.7465, 2.9414,
+ 0.1575, 0.3124, 0.4649, 0.6262, 0.8095, 0.9858, 1.1676, 1.3602,
+ 1.5646, 1.7582, 1.9550, 2.1671, 2.3628, 2.5734, 2.7670, 2.9519,
+ 0.1174, 0.2777, 0.4663, 0.6333, 0.8169, 1.0096, 1.1885, 1.3847,
+ 1.5803, 1.7571, 1.9380, 2.1398, 2.3414, 2.5407, 2.7360, 2.9375,
+ 0.1073, 0.2264, 0.4083, 0.5973, 0.7474, 0.9514, 1.1349, 1.3337,
+ 1.5433, 1.7348, 1.9380, 2.1436, 2.3441, 2.5438, 2.7457, 2.9383,
+ 0.1472, 0.2880, 0.4793, 0.6268, 0.8015, 1.0063, 1.1715, 1.3644,
+ 1.5525, 1.7410, 1.9258, 2.1227, 2.3214, 2.5149, 2.7148, 2.9196,
+ 0.1414, 0.2565, 0.4349, 0.6111, 0.7695, 0.9496, 1.1212, 1.3265,
+ 1.5218, 1.7209, 1.9015, 2.0887, 2.3158, 2.5077, 2.7233, 2.9421,
+ 0.1252, 0.2667, 0.4454, 0.6431, 0.8371, 1.0124, 1.2110, 1.4160,
+ 1.6240, 1.8242, 2.0047, 2.1974, 2.3902, 2.5778, 2.7637, 2.9481,
+ 0.1321, 0.2565, 0.3846, 0.5847, 0.7578, 0.9259, 1.0637, 1.2239,
+ 1.4690, 1.7346, 1.9750, 2.1882, 2.3712, 2.5509, 2.7280, 2.8885,
+ 0.1437, 0.2930, 0.4428, 0.6156, 0.8045, 0.9638, 1.1450, 1.3138,
+ 1.5144, 1.7355, 1.9469, 2.1534, 2.3414, 2.5452, 2.7353, 2.9334,
+ 0.1692, 0.2770, 0.3831, 0.6100, 0.7825, 0.9302, 1.0690, 1.2481,
+ 1.4615, 1.6799, 1.9165, 2.1739, 2.3435, 2.5349, 2.7520, 2.9163,
+ 0.1235, 0.2489, 0.4354, 0.6343, 0.8236, 1.0066, 1.1908, 1.3474,
+ 1.5656, 1.8275, 2.0620, 2.2548, 2.4135, 2.5913, 2.7639, 2.9334,
+ 0.1090, 0.1961, 0.3854, 0.5701, 0.7024, 0.8843, 1.1393, 1.3785,
+ 1.5940, 1.7797, 1.9442, 2.1740, 2.3853, 2.5773, 2.7727, 2.9406,
+ 0.1560, 0.3477, 0.5011, 0.6287, 0.7612, 0.9896, 1.1510, 1.3420,
+ 1.5435, 1.6816, 1.8731, 2.0651, 2.2613, 2.4999, 2.7027, 2.8971,
+ 0.1459, 0.2416, 0.3833, 0.5450, 0.7916, 0.9223, 1.0662, 1.1953,
+ 1.4029, 1.6616, 1.9320, 2.1459, 2.3386, 2.5081, 2.6799, 2.9195,
+ 0.1546, 0.3854, 0.6184, 0.8460, 1.0599, 1.2428, 1.3906, 1.5550,
+ 1.7388, 1.8945, 2.0757, 2.2386, 2.4014, 2.5705, 2.7574, 2.9400,
+ 0.1080, 0.2307, 0.4112, 0.6067, 0.7725, 0.9467, 1.1285, 1.3205,
+ 1.5348, 1.7609, 1.9937, 2.1878, 2.3583, 2.5515, 2.7199, 2.9049,
+ 0.1482, 0.3178, 0.4983, 0.6342, 0.7783, 0.9880, 1.2019, 1.3404,
+ 1.5223, 1.7296, 1.9211, 2.0943, 2.2928, 2.5008, 2.7136, 2.9224,
+ 0.1145, 0.2910, 0.4891, 0.6492, 0.8126, 0.9530, 1.1180, 1.3155,
+ 1.5054, 1.6893, 1.8899, 2.1188, 2.3389, 2.5512, 2.7313, 2.9224,
+ 0.0939, 0.1689, 0.3250, 0.5792, 0.7698, 0.9245, 1.1574, 1.3865,
+ 1.5959, 1.7977, 1.9821, 2.1528, 2.3326, 2.5540, 2.7553, 2.9179,
+ 0.1243, 0.2474, 0.3923, 0.6199, 0.7908, 0.9379, 1.1497, 1.3734,
+ 1.5582, 1.7420, 1.9539, 2.1385, 2.3240, 2.5277, 2.7311, 2.9178,
+ 0.1961, 0.3748, 0.5176, 0.6387, 0.8169, 1.0477, 1.2124, 1.3869,
+ 1.5604, 1.7225, 1.8770, 2.0837, 2.2960, 2.5103, 2.6945, 2.8862,
+ 0.1295, 0.2403, 0.4149, 0.6189, 0.7913, 0.9130, 1.0832, 1.2787,
+ 1.4860, 1.7112, 1.9502, 2.1348, 2.2776, 2.4982, 2.7431, 2.9522,
+ 0.0160, 0.0362, 0.0097, 0.0057, -0.0014, -0.0073, -0.0046, -0.0064,
+-0.0121, 0.0019, 0.0149, -0.0440, -0.0479, -0.0382, -0.0480, -0.0182,
+ 0.0170, 0.0114, -0.0298, -0.0175, -0.0033, -0.0354, -0.0510, -0.0025,
+ 0.0307, 0.0351, 0.0338, 0.0420, 0.0138, -0.0175, -0.0102, 0.0053,
+ 0.0084, -0.0003, 0.0412, -0.0027, 0.0145, -0.0039, 0.0083, 0.0400,
+ 0.0001, -0.0262, 0.0055, -0.0082, 0.0348, 0.0433, 0.0137, -0.0024,
+-0.0055, 0.0262, 0.0521, 0.0349, 0.0185, 0.0076, -0.0319, -0.0561,
+-0.0460, -0.0253, -0.0097, 0.0163, 0.0184, -0.0037, -0.0480, -0.0371,
+ 0.0628, 0.0665, 0.0296, -0.0057, 0.0253, 0.0227, 0.0350, 0.0692,
+ 0.0545, 0.0218, 0.0094, -0.0449, -0.0372, 0.0005, 0.0258, 0.0118,
+ 0.0285, 0.0760, 0.0822, 0.0527, -0.0299, -0.0049, 0.0170, 0.0195,
+ 0.0136, 0.0286, 0.0289, 0.0139, 0.0054, 0.0152, 0.0244, 0.0028,
+-0.0056, -0.0260, 0.0307, 0.0572, -0.0087, 0.0088, 0.0062, 0.0000,
+ 0.0125, 0.0000, -0.0292, 0.0820, 0.0872, 0.0646, 0.0346, 0.0076,
+-0.0022, -0.0253, -0.0567, -0.0188, -0.0336, -0.0673, -0.0549, -0.0166,
+-0.0259, -0.0140, 0.0040, -0.0029, -0.0430, -0.0531, -0.0253, -0.0019,
+-0.0071, 0.0393, 0.0072, -0.0327, -0.0236, -0.0235, -0.0177, -0.0186,
+-0.0280, -0.0201, -0.0077, 0.0383, 0.0418, 0.0321, 0.0294, 0.0169,
+ 0.0468, 0.0301, 0.0133, 0.0363, 0.0516, 0.0937, 0.1240, 0.1404,
+ 0.1325, 0.1178, 0.0999, 0.0251, -0.0037, -0.0495, -0.0703, -0.0219,
+-0.0261, -0.0304, -0.0204, -0.0372, 0.0355, 0.0131, -0.0093, -0.0099,
+-0.0069, -0.0034, -0.0065, -0.0208, -0.0231, -0.0117, -0.0211, -0.0243,
+ 0.0046, -0.0107, -0.0070, 0.0123, 0.0230, 0.0152, 0.0164, 0.0412,
+ 0.0619, 0.0858, 0.0862, -0.0056, 0.0125, 0.0182, 0.0347, 0.0388,
+ 0.0456, 0.0407, -0.0249, -0.0460, 0.0206, 0.0299, 0.0253, 0.0207,
+ 0.0177, 0.0238, 0.0253, 0.0030, 0.0042, 0.0020, -0.0081, -0.0136,
+-0.0290, -0.0042, 0.0122, 0.0051, 0.0107, 0.0228, 0.0211, -0.0068,
+-0.0436, -0.0299, -0.0078, -0.0779, -0.1157, -0.0679, 0.0172, 0.0150,
+-0.0051, 0.0081, -0.0512, -0.0616, 0.0576, 0.0799, 0.0803, 0.0336,
+ 0.0001, -0.0298, -0.0747, -0.0115, -0.0101, -0.0170, -0.0050, 0.0174,
+-0.0290, -0.0601, -0.0150, 0.0121, 0.0165, 0.0230, 0.0028, -0.0317,
+-0.0165, 0.0356, 0.0451, 0.0120, 0.0321, 0.0084, -0.0058, 0.0122,
+ 0.1935, 0.1802, 0.2195, 0.2410, 0.2201, 0.1915, 0.1840, 0.1935,
+ 0.2213, 0.2079, 0.1858, 0.1974, 0.2239, 0.2173, 0.1840, 0.2120,
+ 0.4912, 0.4777, 0.4607, 0.4395, 0.4426, 0.4388, 0.4416, 0.4345,
+ 0.4239, 0.4331, 0.4522, 0.4423, 0.4475, 0.4387, 0.4525, 0.4446
+},
+
.lsp22_2 = {
0.0712, 0.1830, 0.4167, 0.6669, 0.8738, 1.0696, 1.2555, 1.4426,
1.6427, 1.8138, 1.9966, 2.1925, 2.3872, 2.5748, 2.7713, 2.9597,
@@ -10198,6 +10781,213 @@
0.4938, 0.4951, 0.4994, 0.4971, 0.4981, 0.4983, 0.4967, 0.4789
},
+.lsp44 = {
+ 0.0927, 0.2291, 0.4059, 0.5779, 0.7288, 0.8821, 1.0377, 1.1915,
+ 1.3433, 1.4931, 1.6475, 1.7989, 1.9381, 2.0858, 2.2321, 2.3765,
+ 2.5187, 2.6530, 2.7895, 2.9354, 0.0944, 0.1974, 0.3046, 0.4714,
+ 0.6116, 0.7829, 0.9027, 1.0375, 1.1869, 1.3488, 1.5036, 1.6781,
+ 1.8276, 1.9983, 2.1449, 2.3089, 2.4534, 2.6113, 2.7553, 2.9062,
+ 0.1168, 0.2843, 0.4907, 0.6706, 0.8100, 0.9417, 1.0753, 1.2014,
+ 1.3151, 1.4496, 1.5832, 1.7379, 1.8642, 2.0230, 2.1681, 2.3250,
+ 2.4676, 2.6242, 2.7602, 2.9066, 0.1353, 0.2335, 0.3370, 0.4380,
+ 0.5819, 0.7353, 0.8671, 1.0160, 1.1435, 1.2977, 1.4860, 1.6739,
+ 1.8412, 2.0028, 2.1537, 2.3124, 2.4741, 2.6272, 2.7862, 2.9536,
+ 0.1003, 0.2226, 0.3584, 0.4971, 0.6291, 0.7710, 0.9157, 1.0669,
+ 1.2143, 1.3624, 1.5104, 1.6681, 1.8164, 1.9823, 2.1394, 2.3082,
+ 2.4677, 2.6306, 2.7909, 2.9382, 0.1056, 0.2027, 0.2956, 0.4005,
+ 0.5215, 0.6708, 0.8545, 1.0557, 1.2344, 1.4023, 1.5676, 1.7278,
+ 1.8808, 2.0381, 2.1846, 2.3376, 2.4887, 2.6377, 2.7878, 2.9504,
+ 0.1015, 0.2462, 0.4122, 0.5783, 0.7233, 0.8833, 1.0377, 1.1903,
+ 1.3341, 1.4727, 1.6138, 1.7582, 1.8912, 2.0370, 2.1701, 2.3125,
+ 2.4500, 2.6006, 2.7507, 2.9166, 0.1787, 0.2418, 0.3265, 0.5379,
+ 0.6584, 0.7681, 0.9545, 1.1050, 1.2125, 1.3528, 1.4763, 1.6705,
+ 1.8136, 1.9594, 2.0936, 2.2724, 2.4394, 2.5919, 2.7037, 2.8747,
+ 0.0859, 0.1600, 0.2980, 0.4933, 0.6696, 0.8285, 0.9958, 1.1545,
+ 1.3107, 1.4591, 1.6127, 1.7652, 1.9143, 2.0680, 2.2171, 2.3643,
+ 2.5141, 2.6611, 2.8143, 2.9691, 0.0910, 0.2110, 0.3364, 0.4718,
+ 0.5856, 0.7298, 0.8910, 1.0514, 1.1988, 1.3572, 1.5178, 1.6861,
+ 1.8399, 2.0099, 2.1639, 2.3225, 2.4774, 2.6321, 2.7863, 2.9412,
+ 0.1904, 0.2874, 0.3681, 0.4981, 0.6248, 0.7880, 0.9121, 1.0750,
+ 1.2185, 1.3809, 1.5296, 1.7007, 1.8592, 2.0470, 2.1913, 2.3250,
+ 2.4519, 2.5984, 2.7408, 2.9023, 0.0917, 0.2067, 0.3246, 0.4961,
+ 0.6310, 0.8024, 0.9438, 1.1008, 1.2362, 1.3892, 1.5407, 1.7033,
+ 1.8427, 2.0061, 2.1498, 2.3117, 2.4550, 2.6053, 2.7462, 2.9029,
+ 0.0989, 0.2193, 0.3756, 0.5410, 0.6929, 0.8368, 0.9801, 1.1250,
+ 1.2677, 1.4184, 1.5677, 1.7292, 1.8770, 2.0311, 2.1803, 2.3306,
+ 2.4836, 2.6339, 2.7943, 2.9549, 0.0861, 0.1943, 0.3057, 0.4867,
+ 0.6194, 0.7592, 0.9184, 1.1052, 1.2486, 1.4064, 1.5609, 1.7273,
+ 1.8703, 2.0291, 2.1686, 2.3225, 2.4628, 2.6115, 2.7471, 2.9005,
+ 0.0932, 0.2110, 0.3737, 0.5479, 0.7120, 0.8570, 0.9975, 1.1364,
+ 1.2772, 1.4220, 1.5612, 1.7089, 1.8410, 1.9827, 2.1263, 2.2859,
+ 2.4459, 2.6172, 2.7788, 2.9395, 0.1193, 0.2341, 0.3523, 0.5029,
+ 0.6437, 0.7803, 0.9367, 1.1007, 1.2392, 1.3869, 1.5425, 1.7168,
+ 1.8709, 2.0248, 2.1584, 2.2949, 2.4308, 2.5823, 2.7235, 2.9034,
+ 0.0834, 0.1988, 0.3557, 0.5261, 0.6767, 0.8427, 1.0029, 1.1683,
+ 1.3138, 1.4527, 1.6046, 1.7583, 1.9011, 2.0517, 2.1928, 2.3397,
+ 2.4839, 2.6291, 2.7771, 2.9329, 0.0938, 0.1967, 0.3213, 0.4675,
+ 0.6068, 0.7664, 0.9418, 1.1120, 1.2535, 1.3932, 1.5243, 1.6801,
+ 1.8346, 1.9931, 2.1376, 2.3035, 2.4636, 2.6244, 2.7829, 2.9371,
+ 0.1017, 0.2552, 0.4327, 0.6017, 0.7467, 0.8797, 1.0097, 1.1442,
+ 1.2628, 1.4049, 1.5541, 1.7090, 1.8461, 1.9982, 2.1486, 2.3029,
+ 2.4513, 2.6075, 2.7594, 2.9209, 0.1031, 0.2295, 0.3747, 0.5122,
+ 0.6596, 0.7935, 0.9345, 1.1050, 1.2384, 1.3543, 1.4739, 1.6136,
+ 1.7447, 1.8914, 2.0434, 2.1916, 2.3557, 2.5396, 2.7419, 2.9401,
+ 0.1007, 0.2374, 0.3715, 0.5173, 0.6465, 0.8069, 0.9553, 1.1145,
+ 1.2594, 1.4143, 1.5617, 1.7166, 1.8457, 2.0012, 2.1462, 2.2864,
+ 2.4258, 2.5910, 2.7372, 2.9018, 0.0808, 0.1726, 0.2849, 0.4592,
+ 0.6118, 0.7853, 0.9588, 1.1256, 1.2751, 1.4392, 1.5898, 1.7514,
+ 1.8977, 2.0554, 2.1937, 2.3430, 2.4831, 2.6249, 2.7601, 2.9155,
+ 0.1669, 0.2574, 0.3694, 0.5569, 0.6773, 0.8061, 1.0160, 1.1667,
+ 1.2791, 1.4041, 1.5452, 1.7207, 1.8524, 2.0038, 2.1414, 2.3338,
+ 2.4747, 2.6157, 2.7303, 2.8848, 0.1598, 0.2521, 0.3416, 0.5149,
+ 0.6703, 0.7941, 0.9408, 1.1164, 1.2017, 1.3293, 1.4908, 1.6783,
+ 1.8438, 1.9927, 2.1149, 2.2698, 2.4420, 2.6193, 2.7583, 2.9103,
+ 0.0902, 0.1978, 0.3265, 0.4578, 0.5878, 0.7439, 0.9110, 1.0906,
+ 1.2556, 1.4125, 1.5688, 1.7295, 1.8829, 2.0472, 2.2058, 2.3537,
+ 2.5075, 2.6548, 2.8058, 2.9538, 0.0818, 0.1695, 0.2794, 0.4470,
+ 0.6069, 0.7641, 0.9313, 1.0946, 1.2411, 1.4072, 1.5640, 1.7186,
+ 1.8651, 2.0254, 2.1726, 2.3286, 2.4784, 2.6287, 2.7750, 2.9339,
+ 0.1980, 0.3134, 0.4099, 0.4975, 0.6491, 0.8376, 0.9441, 1.0298,
+ 1.1795, 1.3866, 1.5784, 1.7209, 1.8137, 1.9271, 2.0863, 2.2930,
+ 2.4696, 2.6184, 2.7587, 2.9251, 0.1338, 0.2341, 0.3566, 0.4797,
+ 0.6129, 0.7580, 0.9093, 1.0491, 1.1911, 1.3313, 1.4841, 1.6503,
+ 1.8035, 1.9685, 2.1128, 2.2694, 2.4093, 2.5728, 2.7206, 2.8994,
+ 0.0937, 0.2034, 0.3447, 0.5032, 0.6370, 0.7993, 0.9674, 1.1323,
+ 1.2830, 1.4199, 1.5492, 1.7010, 1.8513, 2.0087, 2.1550, 2.3115,
+ 2.4643, 2.6237, 2.7812, 2.9392, 0.1085, 0.2152, 0.3126, 0.4569,
+ 0.5718, 0.7213, 0.8837, 1.0604, 1.2053, 1.3755, 1.5397, 1.7001,
+ 1.8409, 2.0039, 2.1498, 2.3080, 2.4535, 2.6063, 2.7505, 2.9110,
+ 0.0562, 0.2066, 0.4034, 0.5490, 0.6682, 0.7924, 0.9495, 1.0800,
+ 1.1869, 1.3156, 1.4834, 1.6619, 1.8404, 2.0199, 2.1509, 2.2755,
+ 2.4072, 2.5580, 2.6993, 2.8913, 0.0939, 0.2303, 0.3742, 0.5260,
+ 0.6662, 0.8294, 0.9769, 1.1315, 1.2792, 1.4153, 1.5436, 1.6701,
+ 1.8215, 1.9920, 2.1310, 2.3005, 2.4534, 2.5786, 2.7204, 2.9068,
+ 0.1005, 0.2442, 0.3898, 0.5398, 0.6958, 0.8474, 1.0008, 1.1556,
+ 1.3020, 1.4456, 1.5954, 1.7470, 1.8922, 2.0500, 2.2019, 2.3492,
+ 2.4963, 2.6412, 2.7890, 2.9423, 0.1022, 0.2031, 0.3213, 0.4402,
+ 0.5637, 0.7117, 0.8673, 1.0242, 1.1727, 1.3206, 1.4846, 1.6465,
+ 1.8015, 1.9655, 2.1233, 2.2873, 2.4464, 2.6074, 2.7685, 2.9409,
+ 0.1985, 0.3497, 0.4622, 0.5982, 0.7489, 0.8752, 0.9925, 1.1679,
+ 1.3288, 1.4606, 1.5820, 1.7492, 1.8922, 2.0511, 2.1780, 2.3373,
+ 2.4760, 2.6233, 2.7466, 2.8978, 0.1284, 0.2433, 0.3630, 0.4852,
+ 0.6117, 0.7460, 0.8904, 1.0360, 1.1738, 1.3142, 1.4696, 1.6185,
+ 1.7719, 1.9318, 2.0961, 2.2697, 2.4408, 2.6046, 2.7681, 2.9451,
+ 0.1042, 0.2286, 0.3598, 0.5064, 0.6438, 0.7899, 0.9350, 1.0891,
+ 1.2323, 1.3807, 1.5225, 1.6747, 1.8153, 1.9669, 2.1145, 2.2832,
+ 2.4430, 2.6085, 2.7748, 2.9346, 0.0780, 0.1724, 0.2440, 0.3489,
+ 0.5280, 0.7426, 0.9272, 1.0914, 1.2562, 1.4188, 1.5804, 1.7376,
+ 1.8909, 2.0473, 2.1946, 2.3457, 2.4950, 2.6424, 2.7926, 2.9549,
+ 0.1103, 0.2608, 0.4087, 0.5538, 0.6923, 0.8418, 0.9940, 1.1507,
+ 1.2919, 1.4406, 1.5802, 1.7262, 1.8638, 2.0085, 2.1572, 2.2975,
+ 2.4329, 2.5866, 2.7380, 2.9107, 0.1297, 0.2532, 0.4003, 0.5329,
+ 0.6733, 0.7950, 0.9557, 1.0859, 1.2235, 1.3538, 1.5037, 1.6389,
+ 1.7964, 1.9285, 2.0898, 2.2541, 2.4231, 2.5711, 2.6875, 2.8947,
+ 0.0871, 0.1968, 0.3425, 0.4949, 0.6424, 0.7959, 0.9534, 1.1132,
+ 1.2656, 1.4229, 1.5785, 1.7271, 1.8729, 2.0355, 2.1998, 2.3562,
+ 2.5151, 2.6663, 2.8145, 2.9534, 0.1038, 0.2204, 0.3248, 0.4566,
+ 0.5947, 0.7443, 0.8811, 1.0379, 1.2031, 1.3772, 1.5430, 1.7092,
+ 1.8625, 2.0322, 2.1904, 2.3417, 2.4960, 2.6458, 2.7979, 2.9485,
+ 0.1329, 0.2763, 0.3943, 0.5147, 0.6512, 0.8071, 0.9410, 1.0879,
+ 1.2298, 1.3850, 1.5282, 1.6674, 1.8137, 1.9993, 2.1344, 2.2749,
+ 2.4257, 2.5863, 2.7410, 2.9184, 0.1052, 0.2142, 0.3584, 0.5033,
+ 0.6387, 0.7804, 0.9320, 1.0780, 1.2172, 1.3764, 1.5421, 1.6887,
+ 1.8246, 1.9833, 2.1245, 2.2797, 2.4237, 2.5779, 2.7257, 2.9097,
+ 0.1092, 0.2676, 0.4071, 0.5355, 0.6661, 0.8142, 0.9621, 1.1173,
+ 1.2628, 1.4185, 1.5696, 1.7220, 1.8595, 2.0178, 2.1720, 2.3221,
+ 2.4718, 2.6259, 2.7775, 2.9334, 0.0929, 0.2017, 0.3073, 0.4570,
+ 0.5775, 0.7635, 0.9299, 1.0832, 1.2334, 1.3935, 1.5420, 1.7112,
+ 1.8601, 2.0309, 2.1735, 2.3230, 2.4543, 2.6034, 2.7418, 2.8988,
+ 0.0775, 0.2005, 0.3490, 0.5200, 0.6747, 0.8383, 0.9885, 1.1738,
+ 1.3141, 1.4236, 1.5892, 1.7402, 1.8474, 2.0210, 2.1593, 2.2730,
+ 2.4235, 2.5604, 2.7128, 2.9005, 0.1104, 0.2292, 0.3353, 0.4732,
+ 0.6152, 0.7675, 0.9164, 1.0907, 1.2594, 1.4064, 1.5218, 1.6426,
+ 1.8018, 1.9937, 2.1362, 2.2961, 2.4523, 2.6083, 2.7613, 2.9202,
+ 0.0826, 0.2000, 0.3384, 0.5144, 0.6694, 0.8377, 0.9870, 1.1461,
+ 1.2950, 1.4495, 1.5872, 1.7387, 1.8793, 2.0329, 2.1723, 2.3114,
+ 2.4415, 2.5908, 2.7354, 2.9028, 0.1063, 0.2268, 0.3442, 0.4735,
+ 0.6116, 0.7507, 0.9028, 1.0768, 1.2426, 1.4052, 1.5566, 1.7015,
+ 1.8243, 1.9742, 2.1276, 2.2824, 2.4262, 2.5953, 2.7627, 2.9290,
+ 0.1150, 0.2814, 0.4543, 0.6095, 0.7373, 0.8592, 0.9908, 1.1108,
+ 1.2339, 1.3590, 1.4864, 1.6168, 1.7392, 1.8752, 2.0212, 2.1688,
+ 2.3128, 2.4869, 2.7019, 2.9239, 0.0948, 0.2074, 0.3433, 0.4943,
+ 0.6346, 0.7645, 0.8809, 1.0610, 1.2307, 1.3487, 1.4655, 1.6186,
+ 1.7534, 1.8859, 2.0486, 2.2200, 2.3835, 2.5581, 2.7565, 2.9502,
+ 0.1062, 0.2239, 0.3683, 0.5197, 0.6704, 0.8184, 0.9642, 1.1127,
+ 1.2556, 1.3976, 1.5405, 1.6940, 1.8375, 1.9888, 2.1377, 2.2980,
+ 2.4555, 2.6184, 2.7849, 2.9452, 0.0888, 0.2005, 0.2847, 0.4322,
+ 0.5763, 0.7577, 0.9262, 1.1095, 1.2719, 1.4331, 1.5843, 1.7452,
+ 1.8845, 2.0385, 2.1805, 2.3345, 2.4750, 2.6217, 2.7555, 2.9013,
+ 0.1713, 0.2617, 0.3868, 0.5859, 0.7073, 0.8535, 1.0593, 1.1778,
+ 1.3109, 1.4508, 1.5910, 1.7463, 1.8911, 2.0651, 2.2035, 2.3355,
+ 2.4947, 2.6440, 2.7424, 2.8943, 0.1346, 0.2549, 0.4089, 0.5488,
+ 0.6949, 0.8394, 0.9810, 1.1145, 1.2528, 1.4044, 1.5423, 1.6872,
+ 1.8274, 1.9726, 2.1403, 2.2809, 2.4128, 2.5564, 2.6887, 2.8895,
+ 0.0776, 0.1621, 0.2553, 0.4191, 0.5988, 0.7921, 0.9651, 1.1350,
+ 1.2930, 1.4475, 1.6011, 1.7585, 1.9068, 2.0638, 2.2102, 2.3594,
+ 2.5096, 2.6581, 2.8099, 2.9654, 0.0864, 0.1778, 0.2854, 0.4235,
+ 0.5568, 0.7220, 0.8963, 1.0609, 1.2217, 1.3830, 1.5422, 1.7018,
+ 1.8551, 2.0206, 2.1783, 2.3328, 2.4869, 2.6366, 2.7923, 2.9539,
+ 0.1144, 0.2576, 0.4186, 0.5594, 0.6875, 0.8221, 0.9598, 1.0944,
+ 1.2273, 1.3713, 1.5152, 1.6628, 1.8070, 1.9525, 2.0965, 2.2535,
+ 2.4132, 2.5725, 2.7250, 2.9150, 0.1079, 0.2221, 0.3334, 0.4845,
+ 0.6083, 0.7516, 0.9018, 1.0594, 1.2060, 1.3673, 1.5212, 1.6880,
+ 1.8208, 1.9831, 2.1269, 2.2909, 2.4366, 2.6027, 2.7339, 2.8924,
+ 0.0994, 0.2233, 0.3634, 0.5145, 0.6568, 0.8131, 0.9746, 1.1296,
+ 1.2666, 1.4116, 1.5748, 1.7264, 1.8649, 2.0217, 2.1716, 2.3293,
+ 2.4900, 2.6455, 2.7818, 2.9362, 0.1120, 0.2079, 0.3128, 0.4124,
+ 0.5291, 0.6816, 0.8478, 1.0150, 1.1772, 1.3456, 1.5208, 1.6882,
+ 1.8458, 2.0078, 2.1627, 2.3198, 2.4733, 2.6251, 2.7796, 2.9489,
+ 0.0853, 0.2030, 0.3669, 0.5326, 0.6678, 0.8086, 0.9526, 1.1142,
+ 1.2551, 1.4158, 1.5694, 1.7073, 1.8431, 1.9686, 2.1153, 2.2376,
+ 2.3686, 2.5591, 2.7320, 2.9104, 0.0905, 0.2166, 0.3539, 0.5201,
+ 0.6700, 0.8346, 0.9883, 1.1457, 1.2714, 1.3845, 1.5172, 1.6688,
+ 1.8008, 1.9535, 2.1019, 2.2708, 2.4135, 2.5974, 2.7486, 2.9033,
+ 0.0084, 0.0374, 0.0164, -0.0153, 0.0288, 0.0107, -0.0255, -0.0242,
+ 0.0000, -0.0055, -0.0081, -0.0075, -0.0022, -0.0052, -0.0069, -0.0017,
+ 0.0003, 0.0091, 0.0028, -0.0027, 0.0085, 0.0043, -0.0235, -0.0411,
+ 0.0202, 0.0359, 0.0376, 0.0321, 0.0306, -0.0358, -0.0276, -0.0090,
+ 0.0032, 0.0048, 0.0309, 0.0332, 0.0284, 0.0237, 0.0051, -0.0101,
+-0.0233, -0.0428, -0.0585, -0.0387, 0.0039, 0.0081, 0.0029, -0.0017,
+-0.0006, -0.0068, 0.0044, 0.0182, 0.0376, 0.0387, -0.0334, -0.0269,
+-0.0182, -0.0069, -0.0026, 0.0035, -0.0049, -0.0212, -0.0408, -0.0245,
+ 0.0186, 0.0189, 0.0153, 0.0120, 0.0157, 0.0055, -0.0046, 0.0179,
+ 0.0284, -0.0032, -0.0261, -0.0205, -0.0039, 0.0174, 0.0299, 0.0207,
+ 0.0012, -0.0056, 0.0010, 0.0141, -0.0119, 0.0190, 0.0315, 0.0033,
+-0.0128, 0.0300, 0.0328, 0.0308, 0.0353, 0.0266, 0.0066, -0.0328,
+-0.0273, 0.0054, 0.0145, 0.0175, 0.0015, -0.0171, 0.0062, -0.0164,
+ 0.0045, -0.0071, 0.0025, 0.0278, 0.0283, 0.0117, -0.0026, -0.0285,
+-0.0408, -0.0366, -0.0059, -0.0208, -0.0354, -0.0334, -0.0263, -0.0064,
+ 0.0072, -0.0006, -0.0235, -0.0037, -0.0307, -0.0294, -0.0163, -0.0197,
+-0.0235, 0.0192, 0.0013, -0.0219, -0.0123, -0.0004, -0.0081, -0.0096,
+-0.0123, -0.0101, 0.0021, 0.0151, 0.0106, 0.0151, 0.0292, 0.0033,
+ 0.0283, 0.0124, 0.0058, -0.0017, -0.0038, 0.0152, 0.0141, 0.0132,
+ 0.0178, 0.0157, 0.0073, 0.0176, 0.0141, 0.0097, -0.0092, -0.0163,
+-0.0230, -0.0134, -0.0099, -0.0147, 0.0040, -0.0183, -0.0175, -0.0080,
+-0.0083, -0.0290, -0.0417, -0.0398, -0.0269, -0.0199, -0.0143, -0.0053,
+-0.0099, -0.0054, -0.0199, -0.0219, -0.0170, 0.0107, 0.0194, 0.0035,
+ 0.0437, 0.0406, 0.0215, 0.0120, 0.0053, -0.0028, 0.0238, 0.0337,
+ 0.0217, 0.0011, 0.0227, 0.0244, 0.0327, 0.0378, 0.0437, 0.0356,
+-0.0033, 0.0113, 0.0407, 0.0334, -0.0125, -0.0003, -0.0141, -0.0273,
+-0.0137, -0.0079, -0.0145, -0.0071, 0.0114, 0.0181, 0.0150, 0.0085,
+-0.0077, -0.0038, -0.0219, -0.0263, -0.0187, -0.0233, 0.0133, 0.0265,
+-0.0156, -0.0091, -0.0110, -0.0016, 0.0143, 0.0177, 0.0240, 0.0082,
+-0.0143, -0.0257, -0.0014, 0.0002, 0.0082, 0.0180, 0.0325, 0.0340,
+-0.0153, -0.0389, -0.0240, 0.0082, 0.0140, 0.0046, -0.0138, -0.0378,
+-0.0366, 0.0297, 0.0252, 0.0078, 0.0063, 0.0006, 0.0044, 0.0074,
+ 0.0094, 0.0113, 0.0105, 0.0137, 0.0438, 0.0262, -0.0078, -0.0185,
+-0.0215, -0.0407, -0.0435, -0.0208, -0.0004, -0.0144, -0.0205, -0.0248,
+-0.0159, -0.0069, -0.0153, 0.0132, 0.0355, 0.0298, 0.0120, 0.0072,
+ 0.0236, 0.0526, 0.0479, 0.0233, -0.0133, -0.0283, -0.0468, -0.0549,
+-0.0370, 0.0032, 0.0056, 0.0023, 0.0050, 0.0024, 0.0279, 0.0116,
+-0.0045, -0.0012, 0.0107, 0.0190, 0.0253, 0.0191, 0.0043, 0.0193,
+-0.0348, -0.0246, 0.0123, 0.0210, 0.0135, -0.0096, -0.0109, -0.0076,
+-0.0156, -0.0290, 0.0160, 0.0194, 0.0219, 0.0259, 0.0250, 0.0195,
+ 0.4948, 0.4961, 0.4940, 0.4878, 0.4849, 0.4727, 0.4571, 0.4551,
+ 0.4534, 0.4468, 0.4412, 0.4354, 0.4298, 0.4272, 0.4498, 0.4506,
+ 0.4560, 0.4592, 0.4758, 0.4941, 0.2476, 0.1771, 0.1974, 0.1881,
+ 0.1667, 0.1826, 0.2067, 0.2031, 0.1734, 0.1534, 0.1415, 0.1761,
+ 0.1897, 0.1772, 0.1651, 0.1247, 0.1041, 0.1231, 0.1809, 0.2234
+ },
};
static const uint8_t tab7[][35] = {
diff --git a/libavcodec/twinvqdec.c b/libavcodec/twinvqdec.c
index 0c1782e..b13f8a0 100644
--- a/libavcodec/twinvqdec.c
+++ b/libavcodec/twinvqdec.c
@@ -27,7 +27,6 @@
#include "get_bits.h"
#include "internal.h"
#include "twinvq.h"
-#include "metasound_data.h"
#include "twinvq_data.h"
static const TwinVQModeTab mode_08_08 = {
@@ -36,7 +35,7 @@
{ 2, bark_tab_m08_256, 20, tab.fcb08m, 2, 5, tab.cb0808m0, tab.cb0808m1, 16 },
{ 1, bark_tab_l08_512, 30, tab.fcb08l, 3, 6, tab.cb0808l0, tab.cb0808l1, 17 }
},
- 512, 12, ff_metasound_lsp8, 1, 5, 3, 3, tab.shape08, 8, 28, 20, 6, 40
+ 512, 12, tab.lsp08, 1, 5, 3, 3, tab.shape08, 8, 28, 20, 6, 40
};
static const TwinVQModeTab mode_11_08 = {
@@ -45,7 +44,7 @@
{ 2, bark_tab_m11_256, 20, tab.fcb11m, 2, 5, tab.cb1108m0, tab.cb1108m1, 24 },
{ 1, bark_tab_l11_512, 30, tab.fcb11l, 3, 6, tab.cb1108l0, tab.cb1108l1, 27 }
},
- 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90
+ 512, 16, tab.lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90
};
static const TwinVQModeTab mode_11_10 = {
@@ -54,7 +53,7 @@
{ 2, bark_tab_m11_256, 20, tab.fcb11m, 2, 5, tab.cb1110m0, tab.cb1110m1, 18 },
{ 1, bark_tab_l11_512, 30, tab.fcb11l, 3, 6, tab.cb1110l0, tab.cb1110l1, 20 }
},
- 512, 16, ff_metasound_lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90
+ 512, 16, tab.lsp11, 1, 6, 4, 3, tab.shape11, 9, 36, 30, 7, 90
};
static const TwinVQModeTab mode_16_16 = {
@@ -63,7 +62,7 @@
{ 2, bark_tab_m16_512, 20, tab.fcb16m, 2, 5, tab.cb1616m0, tab.cb1616m1, 15 },
{ 1, bark_tab_l16_1024, 30, tab.fcb16l, 3, 6, tab.cb1616l0, tab.cb1616l1, 16 }
},
- 1024, 16, ff_metasound_lsp16, 1, 6, 4, 3, tab.shape16, 9, 56, 60, 7, 180
+ 1024, 16, tab.lsp16, 1, 6, 4, 3, tab.shape16, 9, 56, 60, 7, 180
};
static const TwinVQModeTab mode_22_20 = {
@@ -72,7 +71,7 @@
{ 2, bark_tab_m22_512, 20, tab.fcb22m_1, 2, 6, tab.cb2220m0, tab.cb2220m1, 17 },
{ 1, bark_tab_l22_1024, 32, tab.fcb22l_1, 4, 6, tab.cb2220l0, tab.cb2220l1, 18 }
},
- 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
+ 1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
};
static const TwinVQModeTab mode_22_24 = {
@@ -81,7 +80,7 @@
{ 2, bark_tab_m22_512, 20, tab.fcb22m_1, 2, 6, tab.cb2224m0, tab.cb2224m1, 14 },
{ 1, bark_tab_l22_1024, 32, tab.fcb22l_1, 4, 6, tab.cb2224l0, tab.cb2224l1, 15 }
},
- 1024, 16, ff_metasound_lsp22, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
+ 1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
};
static const TwinVQModeTab mode_22_32 = {
@@ -99,7 +98,7 @@
{ 4, bark_tab_m44_512, 20, tab.fcb44m, 2, 6, tab.cb4440m0, tab.cb4440m1, 17 },
{ 1, bark_tab_l44_2048, 40, tab.fcb44l, 4, 6, tab.cb4440l0, tab.cb4440l1, 17 }
},
- 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432
+ 2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432
};
static const TwinVQModeTab mode_44_48 = {
@@ -108,7 +107,7 @@
{ 4, bark_tab_m44_512, 20, tab.fcb44m, 2, 6, tab.cb4448m0, tab.cb4448m1, 14 },
{ 1, bark_tab_l44_2048, 40, tab.fcb44l, 4, 6, tab.cb4448l0, tab.cb4448l1, 14 }
},
- 2048, 20, ff_metasound_lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432
+ 2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44, 9, 84, 54, 7, 432
};
/**
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b8a8c0a..0226e36 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -50,6 +50,7 @@
#include "thread.h"
#include "frame_thread_encoder.h"
#include "internal.h"
+#include "packet_internal.h"
#include "put_bits.h"
#include "raw.h"
#include "bytestream.h"
@@ -512,14 +513,7 @@
break;
case AVMEDIA_TYPE_AUDIO:
bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
- if (bits_per_sample) {
- bit_rate = ctx->sample_rate * (int64_t)ctx->channels;
- if (bit_rate > INT64_MAX / bits_per_sample) {
- bit_rate = 0;
- } else
- bit_rate *= bits_per_sample;
- } else
- bit_rate = ctx->bit_rate;
+ bit_rate = bits_per_sample ? ctx->sample_rate * (int64_t)ctx->channels * bits_per_sample : ctx->bit_rate;
break;
default:
bit_rate = 0;
@@ -579,24 +573,18 @@
}
avctx->internal = avci;
-#if FF_API_OLD_ENCDEC
avci->to_free = av_frame_alloc();
avci->compat_decode_frame = av_frame_alloc();
avci->compat_encode_packet = av_packet_alloc();
- if (!avci->to_free || !avci->compat_decode_frame || !avci->compat_encode_packet) {
- ret = AVERROR(ENOMEM);
- goto free_and_end;
- }
-#endif
avci->buffer_frame = av_frame_alloc();
avci->buffer_pkt = av_packet_alloc();
avci->es.in_frame = av_frame_alloc();
avci->ds.in_pkt = av_packet_alloc();
avci->last_pkt_props = av_packet_alloc();
- avci->pkt_props = av_fifo_alloc(sizeof(*avci->last_pkt_props));
- if (!avci->buffer_frame || !avci->buffer_pkt ||
+ if (!avci->compat_decode_frame || !avci->compat_encode_packet ||
+ !avci->buffer_frame || !avci->buffer_pkt ||
!avci->es.in_frame || !avci->ds.in_pkt ||
- !avci->last_pkt_props || !avci->pkt_props) {
+ !avci->to_free || !avci->last_pkt_props) {
ret = AVERROR(ENOMEM);
goto free_and_end;
}
@@ -1070,15 +1058,12 @@
av_freep(&avctx->priv_data);
av_freep(&avctx->subtitle_header);
-#if FF_API_OLD_ENCDEC
av_frame_free(&avci->to_free);
av_frame_free(&avci->compat_decode_frame);
- av_packet_free(&avci->compat_encode_packet);
-#endif
av_frame_free(&avci->buffer_frame);
+ av_packet_free(&avci->compat_encode_packet);
av_packet_free(&avci->buffer_pkt);
av_packet_free(&avci->last_pkt_props);
- av_fifo_freep(&avci->pkt_props);
av_packet_free(&avci->ds.in_pkt);
av_frame_free(&avci->es.in_frame);
@@ -1114,20 +1099,13 @@
avci->draining_done = 0;
avci->nb_draining_errors = 0;
av_frame_unref(avci->buffer_frame);
-#if FF_API_OLD_ENCDEC
av_frame_unref(avci->compat_decode_frame);
av_packet_unref(avci->compat_encode_packet);
-#endif
av_packet_unref(avci->buffer_pkt);
av_packet_unref(avci->last_pkt_props);
- while (av_fifo_size(avci->pkt_props) >= sizeof(*avci->last_pkt_props)) {
- av_fifo_generic_read(avci->pkt_props,
- avci->last_pkt_props, sizeof(*avci->last_pkt_props),
- NULL);
- av_packet_unref(avci->last_pkt_props);
- }
- av_fifo_reset(avci->pkt_props);
+ avpriv_packet_list_free(&avci->pkt_props,
+ &avci->pkt_props_tail);
av_frame_unref(avci->es.in_frame);
av_packet_unref(avci->ds.in_pkt);
@@ -1143,12 +1121,8 @@
if (av_codec_is_decoder(avctx->codec))
av_bsf_flush(avci->bsf);
-#if FF_API_OLD_ENCDEC
-FF_DISABLE_DEPRECATION_WARNINGS
if (!avctx->refcounted_frames)
av_frame_unref(avci->to_free);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
void avsubtitle_free(AVSubtitle *sub)
@@ -1188,24 +1162,14 @@
avctx->codec->close(avctx);
avctx->internal->byte_buffer_size = 0;
av_freep(&avctx->internal->byte_buffer);
-#if FF_API_OLD_ENCDEC
av_frame_free(&avctx->internal->to_free);
av_frame_free(&avctx->internal->compat_decode_frame);
- av_packet_free(&avctx->internal->compat_encode_packet);
-#endif
av_frame_free(&avctx->internal->buffer_frame);
+ av_packet_free(&avctx->internal->compat_encode_packet);
av_packet_free(&avctx->internal->buffer_pkt);
- av_packet_unref(avctx->internal->last_pkt_props);
- while (av_fifo_size(avctx->internal->pkt_props) >=
- sizeof(*avctx->internal->last_pkt_props)) {
- av_fifo_generic_read(avctx->internal->pkt_props,
- avctx->internal->last_pkt_props,
- sizeof(*avctx->internal->last_pkt_props),
- NULL);
- av_packet_unref(avctx->internal->last_pkt_props);
- }
av_packet_free(&avctx->internal->last_pkt_props);
- av_fifo_freep(&avctx->internal->pkt_props);
+ avpriv_packet_list_free(&avctx->internal->pkt_props,
+ &avctx->internal->pkt_props_tail);
av_packet_free(&avctx->internal->ds.in_pkt);
av_frame_free(&avctx->internal->es.in_frame);
@@ -1561,7 +1525,6 @@
case AV_CODEC_ID_PCM_VIDC:
case AV_CODEC_ID_PCM_S8:
case AV_CODEC_ID_PCM_S8_PLANAR:
- case AV_CODEC_ID_PCM_SGA:
case AV_CODEC_ID_PCM_U8:
case AV_CODEC_ID_SDX2_DPCM:
case AV_CODEC_ID_DERF_DPCM:
@@ -1683,10 +1646,14 @@
return 256 * sr / 245;
else if (id == AV_CODEC_ID_DST)
return 588 * sr / 44100;
- else if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
- if (sr / 22050 > 22)
- return 0;
- return (480 << (sr / 22050));
+
+ if (ch > 0) {
+ /* calc from sample rate and channels */
+ if (id == AV_CODEC_ID_BINKAUDIO_DCT) {
+ if (sr / 22050 > 22)
+ return 0;
+ return (480 << (sr / 22050)) / ch;
+ }
}
if (id == AV_CODEC_ID_MP3)
@@ -1736,10 +1703,7 @@
return frame_bytes / (9 * ch) * 16;
case AV_CODEC_ID_ADPCM_PSX:
case AV_CODEC_ID_ADPCM_DTK:
- frame_bytes /= 16 * ch;
- if (frame_bytes > INT_MAX / 28)
- return 0;
- return frame_bytes * 28;
+ return frame_bytes / (16 * ch) * 28;
case AV_CODEC_ID_ADPCM_4XM:
case AV_CODEC_ID_ADPCM_IMA_DAT4:
case AV_CODEC_ID_ADPCM_IMA_ISS:
diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c
index 1809b48..b76e217 100644
--- a/libavcodec/vaapi_av1.c
+++ b/libavcodec/vaapi_av1.c
@@ -61,7 +61,6 @@
VADecPictureParameterBufferAV1 pic_param;
int8_t bit_depth_idx;
int err = 0;
- int apply_grain = !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && film_grain->apply_grain;
uint8_t remap_lr_type[4] = {AV1_RESTORE_NONE, AV1_RESTORE_SWITCHABLE, AV1_RESTORE_WIENER, AV1_RESTORE_SGRPROJ};
pic->output_surface = vaapi_av1_surface_id(&s->cur_frame);
@@ -108,8 +107,7 @@
.subsampling_x = seq->color_config.subsampling_x,
.subsampling_y = seq->color_config.subsampling_y,
.chroma_sample_position = seq->color_config.chroma_sample_position,
- .film_grain_params_present = seq->film_grain_params_present &&
- !(avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN),
+ .film_grain_params_present = seq->film_grain_params_present,
},
.seg_info.segment_info_fields.bits = {
.enabled = frame_header->segmentation_enabled,
@@ -119,7 +117,7 @@
},
.film_grain_info = {
.film_grain_info_fields.bits = {
- .apply_grain = apply_grain,
+ .apply_grain = film_grain->apply_grain,
.chroma_scaling_from_luma = film_grain->chroma_scaling_from_luma,
.grain_scaling_minus_8 = film_grain->grain_scaling_minus_8,
.ar_coeff_lag = film_grain->ar_coeff_lag,
@@ -217,7 +215,7 @@
for (int j = 0; j < 6; j++)
pic_param.wm[i - 1].wmmat[j] = s->cur_frame.gm_params[i][j];
}
- if (apply_grain) {
+ if (film_grain->apply_grain) {
for (int i = 0; i < film_grain->num_y_points; i++) {
pic_param.film_grain_info.point_y_value[i] =
film_grain->point_y_value[i];
diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c
index 3c57c07..518e5b2 100644
--- a/libavcodec/vaapi_encode.c
+++ b/libavcodec/vaapi_encode.c
@@ -21,7 +21,6 @@
#include "libavutil/avassert.h"
#include "libavutil/common.h"
-#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/pixdesc.h"
@@ -2235,7 +2234,7 @@
}
static AVBufferRef *vaapi_encode_alloc_output_buffer(void *opaque,
- buffer_size_t size)
+ int size)
{
AVCodecContext *avctx = opaque;
VAAPIEncodeContext *ctx = avctx->priv_data;
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index ce73e26..e52a0e3 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -90,12 +90,13 @@
H264RawAUD raw_aud;
H264RawSPS raw_sps;
H264RawPPS raw_pps;
+ H264RawSEI raw_sei;
H264RawSlice raw_slice;
H264RawSEIBufferingPeriod sei_buffering_period;
H264RawSEIPicTiming sei_pic_timing;
H264RawSEIRecoveryPoint sei_recovery_point;
- SEIRawUserDataUnregistered sei_identifier;
+ H264RawSEIUserDataUnregistered sei_identifier;
char *sei_identifier_string;
int aud_needed;
@@ -209,9 +210,11 @@
{
VAAPIEncodeH264Context *priv = avctx->priv_data;
CodedBitstreamFragment *au = &priv->current_access_unit;
- int err;
+ int err, i;
if (priv->sei_needed) {
+ H264RawSEI *sei = &priv->raw_sei;
+
if (priv->aud_needed) {
err = vaapi_encode_h264_add_nal(avctx, au, &priv->raw_aud);
if (err < 0)
@@ -219,35 +222,41 @@
priv->aud_needed = 0;
}
+ *sei = (H264RawSEI) {
+ .nal_unit_header = {
+ .nal_unit_type = H264_NAL_SEI,
+ },
+ };
+
+ i = 0;
+
if (priv->sei_needed & SEI_IDENTIFIER) {
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_USER_DATA_UNREGISTERED,
- &priv->sei_identifier, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = H264_SEI_TYPE_USER_DATA_UNREGISTERED;
+ sei->payload[i].payload.user_data_unregistered = priv->sei_identifier;
+ ++i;
}
if (priv->sei_needed & SEI_TIMING) {
if (pic->type == PICTURE_TYPE_IDR) {
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_BUFFERING_PERIOD,
- &priv->sei_buffering_period, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = H264_SEI_TYPE_BUFFERING_PERIOD;
+ sei->payload[i].payload.buffering_period = priv->sei_buffering_period;
+ ++i;
}
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_PIC_TIMING,
- &priv->sei_pic_timing, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = H264_SEI_TYPE_PIC_TIMING;
+ sei->payload[i].payload.pic_timing = priv->sei_pic_timing;
+ ++i;
}
if (priv->sei_needed & SEI_RECOVERY_POINT) {
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_RECOVERY_POINT,
- &priv->sei_recovery_point, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = H264_SEI_TYPE_RECOVERY_POINT;
+ sei->payload[i].payload.recovery_point = priv->sei_recovery_point;
+ ++i;
}
+ sei->payload_count = i;
+ av_assert0(sei->payload_count > 0);
+
+ err = vaapi_encode_h264_add_nal(avctx, au, sei);
+ if (err < 0)
+ goto fail;
priv->sei_needed = 0;
err = vaapi_encode_h264_write_access_unit(avctx, data, data_len, au);
diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index 2c356fb..3e0af17 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -73,10 +73,11 @@
H265RawVPS raw_vps;
H265RawSPS raw_sps;
H265RawPPS raw_pps;
+ H265RawSEI raw_sei;
H265RawSlice raw_slice;
- SEIRawMasteringDisplayColourVolume sei_mastering_display;
- SEIRawContentLightLevelInfo sei_content_light_level;
+ H265RawSEIMasteringDisplayColourVolume sei_mastering_display;
+ H265RawSEIContentLightLevelInfo sei_content_light_level;
CodedBitstreamContext *cbc;
CodedBitstreamFragment current_access_unit;
@@ -194,9 +195,11 @@
{
VAAPIEncodeH265Context *priv = avctx->priv_data;
CodedBitstreamFragment *au = &priv->current_access_unit;
- int err;
+ int err, i;
if (priv->sei_needed) {
+ H265RawSEI *sei = &priv->raw_sei;
+
if (priv->aud_needed) {
err = vaapi_encode_h265_add_nal(avctx, au, &priv->aud);
if (err < 0)
@@ -204,22 +207,34 @@
priv->aud_needed = 0;
}
+ *sei = (H265RawSEI) {
+ .nal_unit_header = {
+ .nal_unit_type = HEVC_NAL_SEI_PREFIX,
+ .nuh_layer_id = 0,
+ .nuh_temporal_id_plus1 = 1,
+ },
+ };
+
+ i = 0;
+
if (priv->sei_needed & SEI_MASTERING_DISPLAY) {
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME,
- &priv->sei_mastering_display, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO;
+ sei->payload[i].payload.mastering_display = priv->sei_mastering_display;
+ ++i;
}
if (priv->sei_needed & SEI_CONTENT_LIGHT_LEVEL) {
- err = ff_cbs_sei_add_message(priv->cbc, au, 1,
- SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO,
- &priv->sei_content_light_level, NULL);
- if (err < 0)
- goto fail;
+ sei->payload[i].payload_type = HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO;
+ sei->payload[i].payload.content_light_level = priv->sei_content_light_level;
+ ++i;
}
+ sei->payload_count = i;
+ av_assert0(sei->payload_count > 0);
+
+ err = vaapi_encode_h265_add_nal(avctx, au, sei);
+ if (err < 0)
+ goto fail;
priv->sei_needed = 0;
err = vaapi_encode_h265_write_access_unit(avctx, data, data_len, au);
@@ -766,7 +781,7 @@
// SEI is needed when both the primaries and luminance are set
if (mdm->has_primaries && mdm->has_luminance) {
- SEIRawMasteringDisplayColourVolume *mdcv =
+ H265RawSEIMasteringDisplayColourVolume *mdcv =
&priv->sei_mastering_display;
const int mapping[3] = {1, 2, 0};
const int chroma_den = 50000;
@@ -811,7 +826,7 @@
if (sd) {
AVContentLightMetadata *clm =
(AVContentLightMetadata *)sd->data;
- SEIRawContentLightLevelInfo *clli =
+ H265RawSEIContentLightLevelInfo *clli =
&priv->sei_content_light_level;
clli->max_content_light_level = FFMIN(clm->MaxCLL, 65535);
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index b6ace37..5c33170 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -592,6 +592,10 @@
} else {
dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3);
}
+ if (dcdiff < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n");
+ return -1;
+ }
if (dcdiff) {
const int m = (v->pq == 1 || v->pq == 2) ? 3 - v->pq : 0;
if (dcdiff == 119 /* ESC index value */) {
@@ -736,6 +740,10 @@
} else {
dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3);
}
+ if (dcdiff < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n");
+ return -1;
+ }
if (dcdiff) {
const int m = (quant == 1 || quant == 2) ? 3 - quant : 0;
if (dcdiff == 119 /* ESC index value */) {
@@ -936,6 +944,10 @@
} else {
dcdiff = get_vlc2(&s->gb, ff_msmp4_dc_chroma_vlc[s->dc_table_index].table, DC_VLC_BITS, 3);
}
+ if (dcdiff < 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "Illegal DC VLC\n");
+ return -1;
+ }
if (dcdiff) {
const int m = (quant == 1 || quant == 2) ? 3 - quant : 0;
if (dcdiff == 119 /* ESC index value */) {
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 47940fb..7809234 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1217,7 +1217,7 @@
.flush = ff_mpeg_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.pix_fmts = vc1_hwaccel_pixfmt_list_420,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_VC1_DXVA2_HWACCEL
HWACCEL_DXVA2(vc1),
#endif
@@ -1254,7 +1254,7 @@
.flush = ff_mpeg_flush,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.pix_fmts = vc1_hwaccel_pixfmt_list_420,
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_WMV3_DXVA2_HWACCEL
HWACCEL_DXVA2(wmv3),
#endif
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index 7bd2e4c..bab9d0f 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -423,7 +423,7 @@
}
/* 1st idx = LL, second - vertical, third - horizontal, fourth - total */
-static const uint8_t vc2_qm_col_tab[][4] = {
+const uint8_t vc2_qm_col_tab[][4] = {
{20, 9, 15, 4},
{ 0, 6, 6, 4},
{ 0, 3, 3, 5},
@@ -431,7 +431,7 @@
{ 0, 11, 10, 11}
};
-static const uint8_t vc2_qm_flat_tab[][4] = {
+const uint8_t vc2_qm_flat_tab[][4] = {
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
{ 0, 0, 0, 0},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3124ec8..5b92afe 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,8 +28,8 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
-#define LIBAVCODEC_VERSION_MINOR 130
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MINOR 115
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
@@ -51,6 +51,12 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
+#ifndef FF_API_LOWRES
+#define FF_API_LOWRES (LIBAVCODEC_VERSION_MAJOR < 59)
+#endif
+#ifndef FF_API_DEBUG_MV
+#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
+#endif
#ifndef FF_API_AVCTX_TIMEBASE
#define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
@@ -141,26 +147,8 @@
#ifndef FF_API_AVPRIV_PUT_BITS
#define FF_API_AVPRIV_PUT_BITS (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
-#ifndef FF_API_OLD_ENCDEC
-#define FF_API_OLD_ENCDEC (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
-#ifndef FF_API_AVCODEC_PIX_FMT
-#define FF_API_AVCODEC_PIX_FMT (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
-#ifndef FF_API_MPV_RC_STRATEGY
-#define FF_API_MPV_RC_STRATEGY (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
-#ifndef FF_API_PARSER_CHANGE
-#define FF_API_PARSER_CHANGE (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
#ifndef FF_API_THREAD_SAFE_CALLBACKS
#define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
#endif
-#ifndef FF_API_DEBUG_MV
-#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
-#endif
-#ifndef FF_API_GET_FRAME_CLASS
-#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
-#endif
#endif /* AVCODEC_VERSION_H */
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 49e726a..8773de3 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -1088,13 +1088,7 @@
vtctx->vt_ctx->cv_pix_fmt_type =
av_map_videotoolbox_format_from_pixfmt2(hw_frames->sw_format, full_range);
if (!vtctx->vt_ctx->cv_pix_fmt_type) {
- const AVPixFmtDescriptor *attempted_format =
- av_pix_fmt_desc_get(hw_frames->sw_format);
- av_log(avctx, AV_LOG_ERROR,
- "Failed to map underlying FFmpeg pixel format %s (%s range) to "
- "a VideoToolbox format!\n",
- attempted_format ? attempted_format->name : "<unknown>",
- av_color_range_name(avctx->color_range));
+ av_log(avctx, AV_LOG_ERROR, "Unknown sw_format.\n");
err = AVERROR(EINVAL);
goto fail;
}
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index c487d2d..4004015 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -1751,7 +1751,7 @@
remaining_dst_size--;
wrote_bytes = write_sei(sei,
- SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35,
+ H264_SEI_TYPE_USER_DATA_REGISTERED,
dst_data,
remaining_dst_size);
@@ -1807,7 +1807,7 @@
return status;
wrote_bytes = write_sei(sei,
- SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35,
+ H264_SEI_TYPE_USER_DATA_REGISTERED,
new_sei,
remaining_dst_size - old_sei_length);
if (wrote_bytes < 0)
@@ -1903,7 +1903,7 @@
if (sei) {
size_t msg_size = get_sei_msg_bytes(sei,
- SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35);
+ H264_SEI_TYPE_USER_DATA_REGISTERED);
sei_nalu_size = sizeof(start_code) + 1 + msg_size + 1;
}
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index 69ddbd2..98dd14f 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -26,6 +26,7 @@
extern const float ff_vorbis_floor1_inverse_db_table[256];
extern const float * const ff_vorbis_vwin[8];
extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
+extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8];
extern const uint64_t ff_vorbis_channel_layouts[9];
typedef struct vorbis_floor1_entry {
diff --git a/libavcodec/vorbis_data.c b/libavcodec/vorbis_data.c
index fd7e291..063a075 100644
--- a/libavcodec/vorbis_data.c
+++ b/libavcodec/vorbis_data.c
@@ -19,8 +19,7 @@
*/
#include "libavutil/channel_layout.h"
-#include "libavutil/mem_internal.h"
-
+#include "libavutil/mem.h"
#include "vorbis.h"
const uint8_t ff_vorbis_channel_layout_offsets[8][8] = {
@@ -34,6 +33,17 @@
{ 0, 2, 1, 7, 5, 6, 3, 4 },
};
+const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8] = {
+ { 0 },
+ { 0, 1 },
+ { 0, 2, 1 },
+ { 0, 1, 2, 3 },
+ { 0, 2, 1, 3, 4 },
+ { 0, 2, 1, 4, 5, 3 },
+ { 0, 2, 1, 5, 6, 4, 3 },
+ { 0, 2, 1, 6, 7, 4, 5, 3 },
+};
+
const uint64_t ff_vorbis_channel_layouts[9] = {
AV_CH_LAYOUT_MONO,
AV_CH_LAYOUT_STEREO,
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 57c6eb1..cf64a8c 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -35,7 +35,6 @@
#include <string.h>
#include "libavutil/imgutils.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -2875,9 +2874,6 @@
int ret;
AVRational fps, aspect;
- if (get_bits_left(gb) < 206)
- return AVERROR_INVALIDDATA;
-
s->theora_header = 0;
s->theora = get_bits(gb, 24);
av_log(avctx, AV_LOG_DEBUG, "Theora bitstream version %X\n", s->theora);
diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h
index 272af4e..1fbeac7 100644
--- a/libavcodec/vp3data.h
+++ b/libavcodec/vp3data.h
@@ -179,7 +179,8 @@
static const int16_t coeff_table_token_16[2] = { 6, -6 };
static const int16_t coeff_table_token_23_24_25_26_27_28_29[2] = { 1, -1 };
-static const int16_t coeff_table_token_30_31[4] = { 2, 3, -2, -3 };
+static const int16_t coeff_table_token_30[4] = { 2, 3, -2, -3 };
+static const int16_t coeff_table_token_31[4] = { 2, 3, -2, -3 };
static const int16_t coeff_table_token_17[4] = {
7, 8, -7, -8
@@ -376,8 +377,8 @@
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
coeff_table_token_23_24_25_26_27_28_29,
- coeff_table_token_30_31,
- coeff_table_token_30_31
+ coeff_table_token_30,
+ coeff_table_token_31
};
static const uint8_t vp3_bias[5 * 16][32][2] = {
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 46090f2..65cf468 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -26,8 +26,6 @@
#ifndef AVCODEC_VP56_H
#define AVCODEC_VP56_H
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "hpeldsp.h"
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index d16e7b6..d5d1335 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -25,7 +25,6 @@
*/
#include "libavutil/imgutils.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "hwconfig.h"
@@ -2293,10 +2292,10 @@
s->mv_bounds.mv_min.x = -MARGIN;
s->mv_bounds.mv_max.x = ((s->mb_width - 1) << 6) + MARGIN;
+ if (vpX_rac_is_end(&s->c)) {
+ return AVERROR_INVALIDDATA;
+ }
for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb_xy++, mb++) {
- if (vpX_rac_is_end(&s->c)) {
- return AVERROR_INVALIDDATA;
- }
if (mb_y == 0)
AV_WN32A((mb - s->mb_width - 1)->intra4x4_pred_mode_top,
DC_PRED * 0x01010101);
@@ -2622,7 +2621,7 @@
static av_always_inline
int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
- const AVPacket *avpkt, int is_vp7)
+ AVPacket *avpkt, int is_vp7)
{
VP8Context *s = avctx->priv_data;
int ret, i, referenced, num_jobs;
@@ -2966,7 +2965,7 @@
AV_CODEC_CAP_SLICE_THREADS,
.flush = vp8_decode_flush,
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp8_decode_update_thread_context),
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_VP8_VAAPI_HWACCEL
HWACCEL_VAAPI(vp8),
#endif
diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h
index e6091df..70d21e3 100644
--- a/libavcodec/vp8.h
+++ b/libavcodec/vp8.h
@@ -29,7 +29,6 @@
#include <stdatomic.h>
#include "libavutil/buffer.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "h264pred.h"
diff --git a/libavcodec/vp8data.h b/libavcodec/vp8data.h
index 1fcce13..5e6dea7 100644
--- a/libavcodec/vp8data.h
+++ b/libavcodec/vp8data.h
@@ -316,6 +316,12 @@
},
};
+static const int8_t vp8_segmentid_tree[][2] = {
+ { 1, 2 },
+ { -0, -1 }, // '00', '01'
+ { -2, -3 }, // '10', '11'
+};
+
static const uint8_t vp8_coeff_band[16] = {
0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7
};
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 4659f94..294059f 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1894,7 +1894,7 @@
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context),
.profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
.bsfs = "vp9_superframe_split",
- .hw_configs = (const AVCodecHWConfigInternal *const []) {
+ .hw_configs = (const AVCodecHWConfigInternal*[]) {
#if CONFIG_VP9_DXVA2_HWACCEL
HWACCEL_DXVA2(vp9),
#endif
diff --git a/libavcodec/vp9_metadata_bsf.c b/libavcodec/vp9_metadata_bsf.c
index d904a00..00a5580 100644
--- a/libavcodec/vp9_metadata_bsf.c
+++ b/libavcodec/vp9_metadata_bsf.c
@@ -21,12 +21,15 @@
#include "libavutil/opt.h"
#include "bsf.h"
+#include "bsf_internal.h"
#include "cbs.h"
-#include "cbs_bsf.h"
#include "cbs_vp9.h"
typedef struct VP9MetadataContext {
- CBSBSFContext common;
+ const AVClass *class;
+
+ CodedBitstreamContext *cbc;
+ CodedBitstreamFragment fragment;
int color_space;
int color_range;
@@ -35,11 +38,21 @@
} VP9MetadataContext;
-static int vp9_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt,
- CodedBitstreamFragment *frag)
+static int vp9_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
{
VP9MetadataContext *ctx = bsf->priv_data;
- int i;
+ CodedBitstreamFragment *frag = &ctx->fragment;
+ int err, i;
+
+ err = ff_bsf_get_packet_ref(bsf, pkt);
+ if (err < 0)
+ return err;
+
+ err = ff_cbs_read_packet(ctx->cbc, frag, pkt);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to read packet.\n");
+ goto fail;
+ }
for (i = 0; i < frag->nb_units; i++) {
VP9RawFrame *frame = frag->units[i].content;
@@ -77,19 +90,35 @@
}
}
- return 0;
-}
+ err = ff_cbs_write_packet(ctx->cbc, pkt, frag);
+ if (err < 0) {
+ av_log(bsf, AV_LOG_ERROR, "Failed to write packet.\n");
+ goto fail;
+ }
-static const CBSBSFType vp9_metadata_type = {
- .codec_id = AV_CODEC_ID_VP9,
- .fragment_name = "superframe",
- .unit_name = "frame",
- .update_fragment = &vp9_metadata_update_fragment,
-};
+ err = 0;
+fail:
+ ff_cbs_fragment_reset(frag);
+
+ if (err < 0)
+ av_packet_unref(pkt);
+
+ return err;
+}
static int vp9_metadata_init(AVBSFContext *bsf)
{
- return ff_cbs_bsf_generic_init(bsf, &vp9_metadata_type);
+ VP9MetadataContext *ctx = bsf->priv_data;
+
+ return ff_cbs_init(&ctx->cbc, AV_CODEC_ID_VP9, bsf);
+}
+
+static void vp9_metadata_close(AVBSFContext *bsf)
+{
+ VP9MetadataContext *ctx = bsf->priv_data;
+
+ ff_cbs_fragment_free(&ctx->fragment);
+ ff_cbs_close(&ctx->cbc);
}
#define OFFSET(x) offsetof(VP9MetadataContext, x)
@@ -140,7 +169,7 @@
.priv_data_size = sizeof(VP9MetadataContext),
.priv_class = &vp9_metadata_class,
.init = &vp9_metadata_init,
- .close = &ff_cbs_bsf_generic_close,
- .filter = &ff_cbs_bsf_generic_filter,
+ .close = &vp9_metadata_close,
+ .filter = &vp9_metadata_filter,
.codec_ids = vp9_metadata_codec_ids,
};
diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
index d82b258..cc2440b 100644
--- a/libavcodec/vp9dec.h
+++ b/libavcodec/vp9dec.h
@@ -29,7 +29,6 @@
#include <stdatomic.h>
#include "libavutil/buffer.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/thread.h"
#include "libavutil/internal.h"
diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c
index 41b8ad1..f6d73f7 100644
--- a/libavcodec/vp9dsp.c
+++ b/libavcodec/vp9dsp.c
@@ -23,8 +23,6 @@
#include "libavutil/avassert.h"
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
-
#include "vp9dsp.h"
const DECLARE_ALIGNED(16, int16_t, ff_vp9_subpel_filters)[3][16][8] = {
diff --git a/libavcodec/vp9dsp_template.c b/libavcodec/vp9dsp_template.c
index 9b11661..3acf94c 100644
--- a/libavcodec/vp9dsp_template.c
+++ b/libavcodec/vp9dsp_template.c
@@ -1138,7 +1138,7 @@
for (j = 0; j < sz; j++) \
dst[j * stride] = av_clip_pixel(dst[j * stride] + \
(bits ? \
- (int)(t + (1U << (bits - 1))) >> bits : \
+ (t + (1 << (bits - 1))) >> bits : \
t)); \
dst++; \
} \
@@ -1153,7 +1153,7 @@
for (j = 0; j < sz; j++) \
dst[j * stride] = av_clip_pixel(dst[j * stride] + \
(bits ? \
- (int)(out[j] + (1U << (bits - 1))) >> bits : \
+ (out[j] + (1 << (bits - 1))) >> bits : \
out[j])); \
dst++; \
} \
diff --git a/libavcodec/vp9recon.c b/libavcodec/vp9recon.c
index e38cf99..9a4e7c7 100644
--- a/libavcodec/vp9recon.c
+++ b/libavcodec/vp9recon.c
@@ -22,7 +22,6 @@
*/
#include "libavutil/avassert.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h
index 7e7dfce..43aaac8 100644
--- a/libavcodec/wavpack.h
+++ b/libavcodec/wavpack.h
@@ -124,8 +124,43 @@
};
// exponent table copied from WavPack source
-extern const uint8_t ff_wp_exp2_table[256];
-extern const uint8_t ff_wp_log2_table[256];
+static const uint8_t wp_exp2_table[256] = {
+ 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b,
+ 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16,
+ 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23,
+ 0x24, 0x24, 0x25, 0x26, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3a, 0x3b, 0x3c, 0x3d,
+ 0x3e, 0x3f, 0x40, 0x41, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b,
+ 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
+ 0x5b, 0x5c, 0x5d, 0x5e, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
+ 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
+ 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a,
+ 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
+ 0x9c, 0x9d, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad,
+ 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0,
+ 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4,
+ 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9,
+ 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff
+};
+
+static const uint8_t wp_log2_table [] = {
+ 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15,
+ 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a,
+ 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e,
+ 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
+ 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
+ 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75,
+ 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
+ 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95,
+ 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4,
+ 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2,
+ 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0,
+ 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce,
+ 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb,
+ 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7,
+ 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4,
+ 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff
+};
static av_always_inline int wp_exp2(int16_t val)
{
@@ -136,7 +171,7 @@
neg = 1;
}
- res = ff_wp_exp2_table[val & 0xFF] | 0x100;
+ res = wp_exp2_table[val & 0xFF] | 0x100;
val >>= 8;
if (val > 31U)
return INT_MIN;
@@ -155,9 +190,9 @@
val += val >> 9;
bits = av_log2(val) + 1;
if (bits < 9)
- return (bits << 8) + ff_wp_log2_table[(val << (9 - bits)) & 0xFF];
+ return (bits << 8) + wp_log2_table[(val << (9 - bits)) & 0xFF];
else
- return (bits << 8) + ff_wp_log2_table[(val >> (bits - 9)) & 0xFF];
+ return (bits << 8) + wp_log2_table[(val >> (bits - 9)) & 0xFF];
}
#endif /* AVCODEC_WAVPACK_H */
diff --git a/libavcodec/wavpackdata.c b/libavcodec/wavpackdata.c
deleted file mode 100644
index 1c777af..0000000
--- a/libavcodec/wavpackdata.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * WavPack decoder/encoder common data
- * Copyright (c) 2006,2011 Konstantin Shishkov
- *
- * 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
- */
-
-#include "wavpack.h"
-
-const uint8_t ff_wp_exp2_table[256] = {
- 0x00, 0x01, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x08, 0x09, 0x0a, 0x0b,
- 0x0b, 0x0c, 0x0d, 0x0e, 0x0e, 0x0f, 0x10, 0x10, 0x11, 0x12, 0x13, 0x13, 0x14, 0x15, 0x16, 0x16,
- 0x17, 0x18, 0x19, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1d, 0x1e, 0x1f, 0x20, 0x20, 0x21, 0x22, 0x23,
- 0x24, 0x24, 0x25, 0x26, 0x27, 0x28, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2c, 0x2d, 0x2e, 0x2f, 0x30,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3a, 0x3b, 0x3c, 0x3d,
- 0x3e, 0x3f, 0x40, 0x41, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x48, 0x49, 0x4a, 0x4b,
- 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a,
- 0x5b, 0x5c, 0x5d, 0x5e, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
- 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
- 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x87, 0x88, 0x89, 0x8a,
- 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
- 0x9c, 0x9d, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad,
- 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0,
- 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc8, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4,
- 0xd6, 0xd7, 0xd8, 0xd9, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe4, 0xe5, 0xe6, 0xe8, 0xe9,
- 0xea, 0xec, 0xed, 0xee, 0xf0, 0xf1, 0xf2, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xff
-};
-
-const uint8_t ff_wp_log2_table[256] = {
- 0x00, 0x01, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0a, 0x0b, 0x0d, 0x0e, 0x10, 0x11, 0x12, 0x14, 0x15,
- 0x16, 0x18, 0x19, 0x1a, 0x1c, 0x1d, 0x1e, 0x20, 0x21, 0x22, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a,
- 0x2c, 0x2d, 0x2e, 0x2f, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3b, 0x3c, 0x3d, 0x3e,
- 0x3f, 0x41, 0x42, 0x43, 0x44, 0x45, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
- 0x52, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63,
- 0x64, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x74, 0x75,
- 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85,
- 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95,
- 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4,
- 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb2,
- 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc0,
- 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcb, 0xcc, 0xcd, 0xce,
- 0xcf, 0xd0, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd8, 0xd9, 0xda, 0xdb,
- 0xdc, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe4, 0xe5, 0xe6, 0xe7, 0xe7,
- 0xe8, 0xe9, 0xea, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xee, 0xef, 0xf0, 0xf1, 0xf1, 0xf2, 0xf3, 0xf4,
- 0xf4, 0xf5, 0xf6, 0xf7, 0xf7, 0xf8, 0xf9, 0xf9, 0xfa, 0xfb, 0xfc, 0xfc, 0xfd, 0xfe, 0xff, 0xff
-};
diff --git a/libavcodec/wavpackenc.c b/libavcodec/wavpackenc.c
index 0a79843..0c85fbe 100644
--- a/libavcodec/wavpackenc.c
+++ b/libavcodec/wavpackenc.c
@@ -644,9 +644,9 @@
uint32_t dbits = count_bits(v);
if ((v += v >> 9) < (1 << 8)) {
- *result += (dbits << 8) + ff_wp_log2_table[(v << (9 - dbits)) & 0xff];
+ *result += (dbits << 8) + wp_log2_table[(v << (9 - dbits)) & 0xff];
} else {
- *result += dbits = (dbits << 8) + ff_wp_log2_table[(v >> (dbits - 9)) & 0xff];
+ *result += dbits = (dbits << 8) + wp_log2_table[(v >> (dbits - 9)) & 0xff];
if (limit && dbits >= limit)
return 1;
diff --git a/libavcodec/wma.h b/libavcodec/wma.h
index aea7ba2..7935bcd 100644
--- a/libavcodec/wma.h
+++ b/libavcodec/wma.h
@@ -23,7 +23,6 @@
#define AVCODEC_WMA_H
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "fft.h"
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index e1fcf8a..a8fd997 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -26,7 +26,6 @@
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
-#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 8024ce1..63e7680 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -92,8 +92,6 @@
#include "libavutil/float_dsp.h"
#include "libavutil/intfloat.h"
#include "libavutil/intreadwrite.h"
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
@@ -1721,12 +1719,6 @@
}
} else {
int frame_size;
-
- if (avpkt->size < s->next_packet_start) {
- s->packet_loss = 1;
- return AVERROR_INVALIDDATA;
- }
-
s->buf_bit_size = (avpkt->size - s->next_packet_start) << 3;
init_get_bits(gb, avpkt->data, s->buf_bit_size);
skip_bits(gb, s->packet_offset);
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index fbdb865..a588bb6 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -29,7 +29,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "internal.h"
diff --git a/libavcodec/wmv2.h b/libavcodec/wmv2.h
index f425332..0f459ae 100644
--- a/libavcodec/wmv2.h
+++ b/libavcodec/wmv2.h
@@ -21,8 +21,6 @@
#ifndef AVCODEC_WMV2_H
#define AVCODEC_WMV2_H
-#include "libavutil/mem_internal.h"
-
#include "avcodec.h"
#include "intrax8.h"
#include "mpegvideo.h"
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 7aae115..a16c446 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -278,16 +278,22 @@
return 0;
}
-static inline void wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr)
+static inline int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr)
{
MpegEncContext *const s = &w->s;
+ int ret;
- ff_msmpeg4_decode_motion(s, mx_ptr, my_ptr);
+ ret = ff_msmpeg4_decode_motion(s, mx_ptr, my_ptr);
+
+ if (ret < 0)
+ return ret;
if ((((*mx_ptr) | (*my_ptr)) & 1) && s->mspel)
w->hshift = get_bits1(&s->gb);
else
w->hshift = 0;
+
+ return 0;
}
static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py)
@@ -403,6 +409,8 @@
code = get_vlc2(&s->gb, ff_mb_non_intra_vlc[w->cbp_table_index].table,
MB_NON_INTRA_VLC_BITS, 3);
+ if (code < 0)
+ return AVERROR_INVALIDDATA;
s->mb_intra = (~code & 0x40) >> 6;
cbp = code & 0x3f;
@@ -411,6 +419,11 @@
if (get_bits_left(&s->gb) <= 0)
return AVERROR_INVALIDDATA;
code = get_vlc2(&s->gb, ff_msmp4_mb_i_vlc.table, MB_INTRA_VLC_BITS, 2);
+ if (code < 0) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "II-cbp illegal at %d %d\n", s->mb_x, s->mb_y);
+ return AVERROR_INVALIDDATA;
+ }
/* predict coded block pattern */
cbp = 0;
for (i = 0; i < 6; i++) {
@@ -443,7 +456,8 @@
w->per_block_abt = 0;
}
- wmv2_decode_motion(w, &mx, &my);
+ if ((ret = wmv2_decode_motion(w, &mx, &my)) < 0)
+ return ret;
s->mv_dir = MV_DIR_FORWARD;
s->mv_type = MV_TYPE_16X16;
diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile
index 6361161..884dc0c 100644
--- a/libavcodec/x86/Makefile
+++ b/libavcodec/x86/Makefile
@@ -51,7 +51,6 @@
OBJS-$(CONFIG_APNG_DECODER) += x86/pngdsp_init.o
OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsdsp.o
OBJS-$(CONFIG_CFHD_DECODER) += x86/cfhddsp_init.o
-OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp_init.o
OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp_init.o x86/synth_filter_init.o
OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhdenc_init.o
OBJS-$(CONFIG_EXR_DECODER) += x86/exrdsp_init.o
@@ -155,7 +154,6 @@
X86ASM-OBJS-$(CONFIG_ALAC_DECODER) += x86/alacdsp.o
X86ASM-OBJS-$(CONFIG_APNG_DECODER) += x86/pngdsp.o
X86ASM-OBJS-$(CONFIG_CAVS_DECODER) += x86/cavsidct.o
-X86ASM-OBJS-$(CONFIG_CFHD_ENCODER) += x86/cfhdencdsp.o
X86ASM-OBJS-$(CONFIG_CFHD_DECODER) += x86/cfhddsp.o
X86ASM-OBJS-$(CONFIG_DCA_DECODER) += x86/dcadsp.o x86/synth_filter.o
X86ASM-OBJS-$(CONFIG_DIRAC_DECODER) += x86/diracdsp.o \
diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
index 4ddaa94..675ade3 100644
--- a/libavcodec/x86/ac3dsp.asm
+++ b/libavcodec/x86/ac3dsp.asm
@@ -35,6 +35,10 @@
cextern pd_1
pd_151: times 4 dd 151
+; used in ff_apply_window_int16()
+pb_revwords: SHUFFLE_MASK_W 7, 6, 5, 4, 3, 2, 1, 0
+pd_16384: times 4 dd 16384
+
SECTION .text
;-----------------------------------------------------------------------------
@@ -78,6 +82,133 @@
%undef LOOP_ALIGN
;-----------------------------------------------------------------------------
+; int ff_ac3_max_msb_abs_int16(const int16_t *src, int len)
+;
+; This function uses 2 different methods to calculate a valid result.
+; 1) logical 'or' of abs of each element
+; This is used for ssse3 because of the pabsw instruction.
+; It is also used for mmx because of the lack of min/max instructions.
+; 2) calculate min/max for the array, then or(abs(min),abs(max))
+; This is used for mmxext and sse2 because they have pminsw/pmaxsw.
+;-----------------------------------------------------------------------------
+
+; logical 'or' of 4 or 8 words in an mmx or xmm register into the low word
+%macro OR_WORDS_HORIZ 2 ; src, tmp
+%if cpuflag(sse2)
+ movhlps %2, %1
+ por %1, %2
+ pshuflw %2, %1, q0032
+ por %1, %2
+ pshuflw %2, %1, q0001
+ por %1, %2
+%elif cpuflag(mmxext)
+ pshufw %2, %1, q0032
+ por %1, %2
+ pshufw %2, %1, q0001
+ por %1, %2
+%else ; mmx
+ movq %2, %1
+ psrlq %2, 32
+ por %1, %2
+ movq %2, %1
+ psrlq %2, 16
+ por %1, %2
+%endif
+%endmacro
+
+%macro AC3_MAX_MSB_ABS_INT16 1
+cglobal ac3_max_msb_abs_int16, 2,2,5, src, len
+ pxor m2, m2
+ pxor m3, m3
+.loop:
+%ifidn %1, min_max
+ mova m0, [srcq]
+ mova m1, [srcq+mmsize]
+ pminsw m2, m0
+ pminsw m2, m1
+ pmaxsw m3, m0
+ pmaxsw m3, m1
+%else ; or_abs
+%if notcpuflag(ssse3)
+ mova m0, [srcq]
+ mova m1, [srcq+mmsize]
+ ABS2 m0, m1, m3, m4
+%else ; ssse3
+ ; using memory args is faster for ssse3
+ pabsw m0, [srcq]
+ pabsw m1, [srcq+mmsize]
+%endif
+ por m2, m0
+ por m2, m1
+%endif
+ add srcq, mmsize*2
+ sub lend, mmsize
+ ja .loop
+%ifidn %1, min_max
+ ABS2 m2, m3, m0, m1
+ por m2, m3
+%endif
+ OR_WORDS_HORIZ m2, m0
+ movd eax, m2
+ and eax, 0xFFFF
+ RET
+%endmacro
+
+INIT_MMX mmx
+AC3_MAX_MSB_ABS_INT16 or_abs
+INIT_MMX mmxext
+AC3_MAX_MSB_ABS_INT16 min_max
+INIT_XMM sse2
+AC3_MAX_MSB_ABS_INT16 min_max
+INIT_XMM ssse3
+AC3_MAX_MSB_ABS_INT16 or_abs
+
+;-----------------------------------------------------------------------------
+; macro used for ff_ac3_lshift_int16() and ff_ac3_rshift_int32()
+;-----------------------------------------------------------------------------
+
+%macro AC3_SHIFT 3 ; l/r, 16/32, shift instruction, instruction set
+cglobal ac3_%1shift_int%2, 3, 3, 5, src, len, shift
+ movd m0, shiftd
+.loop:
+ mova m1, [srcq ]
+ mova m2, [srcq+mmsize ]
+ mova m3, [srcq+mmsize*2]
+ mova m4, [srcq+mmsize*3]
+ %3 m1, m0
+ %3 m2, m0
+ %3 m3, m0
+ %3 m4, m0
+ mova [srcq ], m1
+ mova [srcq+mmsize ], m2
+ mova [srcq+mmsize*2], m3
+ mova [srcq+mmsize*3], m4
+ add srcq, mmsize*4
+ sub lend, mmsize*32/%2
+ ja .loop
+.end:
+ REP_RET
+%endmacro
+
+;-----------------------------------------------------------------------------
+; void ff_ac3_lshift_int16(int16_t *src, unsigned int len, unsigned int shift)
+;-----------------------------------------------------------------------------
+
+INIT_MMX mmx
+AC3_SHIFT l, 16, psllw
+INIT_XMM sse2
+AC3_SHIFT l, 16, psllw
+
+;-----------------------------------------------------------------------------
+; void ff_ac3_rshift_int32(int32_t *src, unsigned int len, unsigned int shift)
+;-----------------------------------------------------------------------------
+
+INIT_MMX mmx
+AC3_SHIFT r, 32, psrad
+INIT_XMM sse2
+AC3_SHIFT r, 32, psrad
+
+;-----------------------------------------------------------------------------
; void ff_float_to_fixed24(int32_t *dst, const float *src, unsigned int len)
;-----------------------------------------------------------------------------
@@ -292,3 +423,130 @@
INIT_XMM ssse3
AC3_EXTRACT_EXPONENTS
%endif
+
+;-----------------------------------------------------------------------------
+; void ff_apply_window_int16(int16_t *output, const int16_t *input,
+; const int16_t *window, unsigned int len)
+;-----------------------------------------------------------------------------
+
+%macro REVERSE_WORDS 1-2
+%if cpuflag(ssse3) && notcpuflag(atom)
+ pshufb %1, %2
+%elif cpuflag(sse2)
+ pshuflw %1, %1, 0x1B
+ pshufhw %1, %1, 0x1B
+ pshufd %1, %1, 0x4E
+%elif cpuflag(mmxext)
+ pshufw %1, %1, 0x1B
+%endif
+%endmacro
+
+%macro MUL16FIXED 3
+%if cpuflag(ssse3) ; dst, src, unused
+; dst = ((dst * src) + (1<<14)) >> 15
+ pmulhrsw %1, %2
+%elif cpuflag(mmxext) ; dst, src, temp
+; dst = (dst * src) >> 15
+; pmulhw cuts off the bottom bit, so we have to lshift by 1 and add it back
+; in from the pmullw result.
+ mova %3, %1
+ pmulhw %1, %2
+ pmullw %3, %2
+ psrlw %3, 15
+ psllw %1, 1
+ por %1, %3
+%endif
+%endmacro
+
+%macro APPLY_WINDOW_INT16 1 ; %1 bitexact version
+%if %1
+cglobal apply_window_int16, 4,5,6, output, input, window, offset, offset2
+%else
+cglobal apply_window_int16_round, 4,5,6, output, input, window, offset, offset2
+%endif
+ lea offset2q, [offsetq-mmsize]
+%if cpuflag(ssse3) && notcpuflag(atom)
+ mova m5, [pb_revwords]
+ ALIGN 16
+%elif %1
+ mova m5, [pd_16384]
+%endif
+.loop:
+%if cpuflag(ssse3)
+ ; This version does the 16x16->16 multiplication in-place without expanding
+ ; to 32-bit. The ssse3 version is bit-identical.
+ mova m0, [windowq+offset2q]
+ mova m1, [ inputq+offset2q]
+ pmulhrsw m1, m0
+ REVERSE_WORDS m0, m5
+ pmulhrsw m0, [ inputq+offsetq ]
+ mova [outputq+offset2q], m1
+ mova [outputq+offsetq ], m0
+%elif %1
+ ; This version expands 16-bit to 32-bit, multiplies by the window,
+ ; adds 16384 for rounding, right shifts 15, then repacks back to words to
+ ; save to the output. The window is reversed for the second half.
+ mova m3, [windowq+offset2q]
+ mova m4, [ inputq+offset2q]
+ pxor m0, m0
+ punpcklwd m0, m3
+ punpcklwd m1, m4
+ pmaddwd m0, m1
+ paddd m0, m5
+ psrad m0, 15
+ pxor m2, m2
+ punpckhwd m2, m3
+ punpckhwd m1, m4
+ pmaddwd m2, m1
+ paddd m2, m5
+ psrad m2, 15
+ packssdw m0, m2
+ mova [outputq+offset2q], m0
+ REVERSE_WORDS m3
+ mova m4, [ inputq+offsetq]
+ pxor m0, m0
+ punpcklwd m0, m3
+ punpcklwd m1, m4
+ pmaddwd m0, m1
+ paddd m0, m5
+ psrad m0, 15
+ pxor m2, m2
+ punpckhwd m2, m3
+ punpckhwd m1, m4
+ pmaddwd m2, m1
+ paddd m2, m5
+ psrad m2, 15
+ packssdw m0, m2
+ mova [outputq+offsetq], m0
+%else
+ ; This version does the 16x16->16 multiplication in-place without expanding
+ ; to 32-bit. The mmxext and sse2 versions do not use rounding, and
+ ; therefore are not bit-identical to the C version.
+ mova m0, [windowq+offset2q]
+ mova m1, [ inputq+offset2q]
+ mova m2, [ inputq+offsetq ]
+ MUL16FIXED m1, m0, m3
+ REVERSE_WORDS m0
+ MUL16FIXED m2, m0, m3
+ mova [outputq+offset2q], m1
+ mova [outputq+offsetq ], m2
+%endif
+ add offsetd, mmsize
+ sub offset2d, mmsize
+ jae .loop
+ REP_RET
+%endmacro
+
+INIT_MMX mmxext
+APPLY_WINDOW_INT16 0
+INIT_XMM sse2
+APPLY_WINDOW_INT16 0
+
+INIT_MMX mmxext
+APPLY_WINDOW_INT16 1
+INIT_XMM sse2
+APPLY_WINDOW_INT16 1
+INIT_XMM ssse3
+APPLY_WINDOW_INT16 1
+INIT_XMM ssse3, atom
+APPLY_WINDOW_INT16 1
diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c
index 2ae762a..2e7e2fb 100644
--- a/libavcodec/x86/ac3dsp_init.c
+++ b/libavcodec/x86/ac3dsp_init.c
@@ -30,6 +30,17 @@
void ff_ac3_exponent_min_mmxext(uint8_t *exp, int num_reuse_blocks, int nb_coefs);
void ff_ac3_exponent_min_sse2 (uint8_t *exp, int num_reuse_blocks, int nb_coefs);
+int ff_ac3_max_msb_abs_int16_mmx (const int16_t *src, int len);
+int ff_ac3_max_msb_abs_int16_mmxext(const int16_t *src, int len);
+int ff_ac3_max_msb_abs_int16_sse2 (const int16_t *src, int len);
+int ff_ac3_max_msb_abs_int16_ssse3(const int16_t *src, int len);
+
+void ff_ac3_lshift_int16_mmx (int16_t *src, unsigned int len, unsigned int shift);
+void ff_ac3_lshift_int16_sse2(int16_t *src, unsigned int len, unsigned int shift);
+
+void ff_ac3_rshift_int32_mmx (int32_t *src, unsigned int len, unsigned int shift);
+void ff_ac3_rshift_int32_sse2(int32_t *src, unsigned int len, unsigned int shift);
+
void ff_float_to_fixed24_3dnow(int32_t *dst, const float *src, unsigned int len);
void ff_float_to_fixed24_sse (int32_t *dst, const float *src, unsigned int len);
void ff_float_to_fixed24_sse2 (int32_t *dst, const float *src, unsigned int len);
@@ -39,12 +50,28 @@
void ff_ac3_extract_exponents_sse2 (uint8_t *exp, int32_t *coef, int nb_coefs);
void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs);
+void ff_apply_window_int16_round_mmxext(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+void ff_apply_window_int16_round_sse2(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+void ff_apply_window_int16_mmxext(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+void ff_apply_window_int16_sse2(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+void ff_apply_window_int16_ssse3(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+void ff_apply_window_int16_ssse3_atom(int16_t *output, const int16_t *input,
+ const int16_t *window, unsigned int len);
+
av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
{
int cpu_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(cpu_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_mmx;
+ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmx;
+ c->ac3_lshift_int16 = ff_ac3_lshift_int16_mmx;
+ c->ac3_rshift_int32 = ff_ac3_rshift_int32_mmx;
}
if (EXTERNAL_AMD3DNOW(cpu_flags)) {
if (!bit_exact) {
@@ -53,20 +80,43 @@
}
if (EXTERNAL_MMXEXT(cpu_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_mmxext;
+ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_mmxext;
+ if (bit_exact) {
+ c->apply_window_int16 = ff_apply_window_int16_mmxext;
+ } else {
+ c->apply_window_int16 = ff_apply_window_int16_round_mmxext;
+ }
}
if (EXTERNAL_SSE(cpu_flags)) {
c->float_to_fixed24 = ff_float_to_fixed24_sse;
}
if (EXTERNAL_SSE2(cpu_flags)) {
c->ac3_exponent_min = ff_ac3_exponent_min_sse2;
+ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_sse2;
c->float_to_fixed24 = ff_float_to_fixed24_sse2;
c->compute_mantissa_size = ff_ac3_compute_mantissa_size_sse2;
c->extract_exponents = ff_ac3_extract_exponents_sse2;
+ if (bit_exact) {
+ c->apply_window_int16 = ff_apply_window_int16_sse2;
+ }
+ }
+
+ if (EXTERNAL_SSE2_FAST(cpu_flags)) {
+ c->ac3_lshift_int16 = ff_ac3_lshift_int16_sse2;
+ c->ac3_rshift_int32 = ff_ac3_rshift_int32_sse2;
+ if (!bit_exact) {
+ c->apply_window_int16 = ff_apply_window_int16_round_sse2;
+ }
}
if (EXTERNAL_SSSE3(cpu_flags)) {
- if (!(cpu_flags & AV_CPU_FLAG_ATOM))
+ c->ac3_max_msb_abs_int16 = ff_ac3_max_msb_abs_int16_ssse3;
+ if (cpu_flags & AV_CPU_FLAG_ATOM) {
+ c->apply_window_int16 = ff_apply_window_int16_ssse3_atom;
+ } else {
c->extract_exponents = ff_ac3_extract_exponents_ssse3;
+ c->apply_window_int16 = ff_apply_window_int16_ssse3;
+ }
}
}
diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index 53d74c5..cfd3b75 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -21,8 +21,6 @@
#ifndef AVCODEC_X86_CABAC_H
#define AVCODEC_X86_CABAC_H
-#include <stddef.h>
-
#include "libavcodec/cabac.h"
#include "libavutil/attributes.h"
#include "libavutil/macros.h"
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index f974f93..becb3a4 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -25,7 +25,6 @@
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/cavsdsp.h"
diff --git a/libavcodec/x86/cfhdencdsp.asm b/libavcodec/x86/cfhdencdsp.asm
deleted file mode 100644
index 4aaeb56..0000000
--- a/libavcodec/x86/cfhdencdsp.asm
+++ /dev/null
@@ -1,432 +0,0 @@
-;******************************************************************************
-;* x86-optimized functions for the CFHD encoder
-;* Copyright (c) 2021 Paul B Mahol
-;*
-;* 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
-;******************************************************************************
-
-%include "libavutil/x86/x86util.asm"
-
-SECTION_RODATA
-
-pw_p1_n1: dw 1, -1, 1, -1, 1, -1, 1, -1
-pw_n1_p1: dw -1, 1, -1, 1, -1, 1, -1, 1
-pw_p5_n11: dw 5, -11, 5, -11, 5, -11, 5, -11
-pw_n5_p11: dw -5, 11, -5, 11, -5, 11, -5, 11
-pw_p11_n5: dw 11, -5, 11, -5, 11, -5, 11, -5
-pw_n11_p5: dw -11, 5, -11, 5, -11, 5, -11, 5
-pd_4: times 4 dd 4
-pw_n4: times 8 dw -4
-cextern pw_m1
-cextern pw_1
-cextern pw_4
-
-SECTION .text
-
-%if ARCH_X86_64
-INIT_XMM sse2
-cglobal cfhdenc_horiz_filter, 8, 10, 11, input, low, high, istride, lwidth, hwidth, width, y, x, temp
- shl istrideq, 1
- shl lwidthq, 1
- shl hwidthq, 1
- mova m7, [pd_4]
- mova m8, [pw_1]
- mova m9, [pw_m1]
- mova m10,[pw_p1_n1]
- movsxdifnidn yq, yd
- movsxdifnidn widthq, widthd
- neg yq
-.looph:
- movsx xq, word [inputq]
-
- movsx tempq, word [inputq + 2]
- add tempq, xq
-
- movd xm0, tempd
- packssdw m0, m0
- movd tempd, m0
- mov word [lowq], tempw
-
- movsx xq, word [inputq]
- imul xq, 5
- movsx tempq, word [inputq + 2]
- imul tempq, -11
- add tempq, xq
-
- movsx xq, word [inputq + 4]
- imul xq, 4
- add tempq, xq
-
- movsx xq, word [inputq + 6]
- imul xq, 4
- add tempq, xq
-
- movsx xq, word [inputq + 8]
- imul xq, -1
- add tempq, xq
-
- movsx xq, word [inputq + 10]
- imul xq, -1
- add tempq, xq
-
- add tempq, 4
- sar tempq, 3
-
- movd xm0, tempd
- packssdw m0, m0
- movd tempd, m0
- mov word [highq], tempw
-
- mov xq, 2
-
-.loopw:
- movu m0, [inputq + xq * 2]
- movu m1, [inputq + xq * 2 + mmsize]
-
- pmaddwd m0, m8
- pmaddwd m1, m8
-
- packssdw m0, m1
- movu [lowq+xq], m0
-
- movu m2, [inputq + xq * 2 - 4]
- movu m3, [inputq + xq * 2 - 4 + mmsize]
-
- pmaddwd m2, m9
- pmaddwd m3, m9
-
- movu m0, [inputq + xq * 2 + 4]
- movu m1, [inputq + xq * 2 + 4 + mmsize]
-
- pmaddwd m0, m8
- pmaddwd m1, m8
-
- paddd m0, m2
- paddd m1, m3
-
- paddd m0, m7
- paddd m1, m7
-
- psrad m0, 3
- psrad m1, 3
-
- movu m5, [inputq + xq * 2 + 0]
- movu m6, [inputq + xq * 2 + mmsize]
-
- pmaddwd m5, m10
- pmaddwd m6, m10
-
- paddd m0, m5
- paddd m1, m6
-
- packssdw m0, m1
- movu [highq+xq], m0
-
- add xq, mmsize
- cmp xq, widthq
- jl .loopw
-
- add lowq, widthq
- add highq, widthq
- lea inputq, [inputq + widthq * 2]
-
- movsx xq, word [inputq - 4]
- movsx tempq, word [inputq - 2]
- add tempq, xq
-
- movd xm0, tempd
- packssdw m0, m0
- movd tempd, m0
- mov word [lowq-2], tempw
-
- movsx tempq, word [inputq - 4]
- imul tempq, 11
- movsx xq, word [inputq - 2]
- imul xq, -5
- add tempq, xq
-
- movsx xq, word [inputq - 6]
- imul xq, -4
- add tempq, xq
-
- movsx xq, word [inputq - 8]
- imul xq, -4
- add tempq, xq
-
- movsx xq, word [inputq - 10]
- add tempq, xq
-
- movsx xq, word [inputq - 12]
- add tempq, xq
-
- add tempq, 4
- sar tempq, 3
-
- movd xm0, tempd
- packssdw m0, m0
- movd tempd, m0
- mov word [highq-2], tempw
-
- sub inputq, widthq
- sub inputq, widthq
- sub highq, widthq
- sub lowq, widthq
-
- add lowq, lwidthq
- add highq, hwidthq
- add inputq, istrideq
- add yq, 1
- jl .looph
-
- RET
-%endif
-
-%if ARCH_X86_64
-INIT_XMM sse2
-cglobal cfhdenc_vert_filter, 8, 11, 14, input, low, high, istride, lwidth, hwidth, width, height, x, y, pos
- shl istrideq, 1
-
- shl widthd, 1
- sub heightd, 2
-
- xor xq, xq
-
- mova m7, [pd_4]
- mova m8, [pw_1]
- mova m9, [pw_m1]
- mova m10,[pw_p1_n1]
- mova m11,[pw_n1_p1]
- mova m12,[pw_4]
- mova m13,[pw_n4]
-.loopw:
- mov yq, 2
-
- mov posq, xq
- movu m0, [inputq + posq]
- add posq, istrideq
- movu m1, [inputq + posq]
-
- paddsw m0, m1
-
- movu [lowq + xq], m0
-
- mov posq, xq
-
- movu m0, [inputq + posq]
- add posq, istrideq
- movu m1, [inputq + posq]
- add posq, istrideq
- movu m2, [inputq + posq]
- add posq, istrideq
- movu m3, [inputq + posq]
- add posq, istrideq
- movu m4, [inputq + posq]
- add posq, istrideq
- movu m5, [inputq + posq]
-
- mova m6, m0
- punpcklwd m0, m1
- punpckhwd m1, m6
-
- mova m6, m2
- punpcklwd m2, m3
- punpckhwd m3, m6
-
- mova m6, m4
- punpcklwd m4, m5
- punpckhwd m5, m6
-
- pmaddwd m0, [pw_p5_n11]
- pmaddwd m1, [pw_n11_p5]
- pmaddwd m2, m12
- pmaddwd m3, m12
- pmaddwd m4, m9
- pmaddwd m5, m9
-
- paddd m0, m2
- paddd m1, m3
- paddd m0, m4
- paddd m1, m5
-
- paddd m0, m7
- paddd m1, m7
-
- psrad m0, 3
- psrad m1, 3
- packssdw m0, m1
-
- movu [highq + xq], m0
-
-.looph:
-
- mov posq, istrideq
- imul posq, yq
- add posq, xq
-
- movu m0, [inputq + posq]
-
- add posq, istrideq
- movu m1, [inputq + posq]
-
- paddsw m0, m1
-
- mov posq, lwidthq
- imul posq, yq
- add posq, xq
-
- movu [lowq + posq], m0
-
- add yq, -2
-
- mov posq, istrideq
- imul posq, yq
- add posq, xq
-
- movu m0, [inputq + posq]
- add posq, istrideq
- movu m1, [inputq + posq]
- add posq, istrideq
- movu m2, [inputq + posq]
- add posq, istrideq
- movu m3, [inputq + posq]
- add posq, istrideq
- movu m4, [inputq + posq]
- add posq, istrideq
- movu m5, [inputq + posq]
-
- add yq, 2
-
- mova m6, m0
- punpcklwd m0, m1
- punpckhwd m1, m6
-
- mova m6, m2
- punpcklwd m2, m3
- punpckhwd m3, m6
-
- mova m6, m4
- punpcklwd m4, m5
- punpckhwd m5, m6
-
- pmaddwd m0, m9
- pmaddwd m1, m9
- pmaddwd m2, m10
- pmaddwd m3, m11
- pmaddwd m4, m8
- pmaddwd m5, m8
-
- paddd m0, m4
- paddd m1, m5
-
- paddd m0, m7
- paddd m1, m7
-
- psrad m0, 3
- psrad m1, 3
- paddd m0, m2
- paddd m1, m3
- packssdw m0, m1
-
- mov posq, hwidthq
- imul posq, yq
- add posq, xq
-
- movu [highq + posq], m0
-
- add yq, 2
- cmp yq, heightq
- jl .looph
-
- mov posq, istrideq
- imul posq, yq
- add posq, xq
-
- movu m0, [inputq + posq]
- add posq, istrideq
- movu m1, [inputq + posq]
-
- paddsw m0, m1
-
- mov posq, lwidthq
- imul posq, yq
- add posq, xq
-
- movu [lowq + posq], m0
-
- sub yq, 4
-
- mov posq, istrideq
- imul posq, yq
- add posq, xq
-
- movu m0, [inputq + posq]
- add posq, istrideq
- movu m1, [inputq + posq]
- add posq, istrideq
- movu m2, [inputq + posq]
- add posq, istrideq
- movu m3, [inputq + posq]
- add posq, istrideq
- movu m4, [inputq + posq]
- add posq, istrideq
- movu m5, [inputq + posq]
-
- add yq, 4
-
- mova m6, m0
- punpcklwd m0, m1
- punpckhwd m1, m6
-
- mova m6, m2
- punpcklwd m2, m3
- punpckhwd m3, m6
-
- mova m6, m4
- punpcklwd m4, m5
- punpckhwd m5, m6
-
- pmaddwd m0, m8
- pmaddwd m1, m8
- pmaddwd m2, m13
- pmaddwd m3, m13
- pmaddwd m4, [pw_p11_n5]
- pmaddwd m5, [pw_n5_p11]
-
- paddd m4, m2
- paddd m5, m3
-
- paddd m4, m0
- paddd m5, m1
-
- paddd m4, m7
- paddd m5, m7
-
- psrad m4, 3
- psrad m5, 3
- packssdw m4, m5
-
- mov posq, hwidthq
- imul posq, yq
- add posq, xq
-
- movu [highq + posq], m4
-
- add xq, mmsize
- cmp xq, widthq
- jl .loopw
- RET
-%endif
diff --git a/libavcodec/x86/cfhdencdsp_init.c b/libavcodec/x86/cfhdencdsp_init.c
deleted file mode 100644
index 28f1dd5..0000000
--- a/libavcodec/x86/cfhdencdsp_init.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-#include <stdint.h>
-
-#include "libavutil/attributes.h"
-#include "libavutil/cpu.h"
-#include "libavutil/x86/cpu.h"
-#include "libavcodec/avcodec.h"
-#include "libavcodec/cfhdencdsp.h"
-
-void ff_cfhdenc_horiz_filter_sse2(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height);
-void ff_cfhdenc_vert_filter_sse2(int16_t *input, int16_t *low, int16_t *high,
- ptrdiff_t in_stride, ptrdiff_t low_stride,
- ptrdiff_t high_stride,
- int width, int height);
-
-av_cold void ff_cfhdencdsp_init_x86(CFHDEncDSPContext *c)
-{
- int cpu_flags = av_get_cpu_flags();
-
-#if ARCH_X86_64
- if (EXTERNAL_SSE2(cpu_flags)) {
- c->horiz_filter = ff_cfhdenc_horiz_filter_sse2;
- c->vert_filter = ff_cfhdenc_vert_filter_sse2;
- }
-#endif
-}
diff --git a/libavcodec/x86/constants.c b/libavcodec/x86/constants.c
index bc7f2b1..4bfb78c 100644
--- a/libavcodec/x86/constants.c
+++ b/libavcodec/x86/constants.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libavutil/mem_internal.h"
+#include "libavutil/mem.h"
#include "libavutil/x86/asm.h" // for xmm_reg
#include "constants.h"
@@ -34,6 +34,7 @@
DECLARE_ASM_ALIGNED(16, const xmm_reg, ff_pw_9) = { 0x0009000900090009ULL, 0x0009000900090009ULL };
DECLARE_ALIGNED(8, const uint64_t, ff_pw_15) = 0x000F000F000F000FULL;
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_16) = { 0x0010001000100010ULL, 0x0010001000100010ULL };
+DECLARE_ALIGNED(16, const xmm_reg, ff_pw_17) = { 0x0011001100110011ULL, 0x0011001100110011ULL };
DECLARE_ASM_ALIGNED(16, const xmm_reg, ff_pw_18) = { 0x0012001200120012ULL, 0x0012001200120012ULL };
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_20) = { 0x0014001400140014ULL, 0x0014001400140014ULL };
DECLARE_ALIGNED(16, const xmm_reg, ff_pw_32) = { 0x0020002000200020ULL, 0x0020002000200020ULL };
diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
index 8baacf3..8cb84eb 100644
--- a/libavcodec/x86/diracdsp_init.c
+++ b/libavcodec/x86/diracdsp_init.c
@@ -22,6 +22,15 @@
#include "libavcodec/diracdsp.h"
#include "fpel.h"
+DECL_DIRAC_PIXOP(put, mmx);
+DECL_DIRAC_PIXOP(avg, mmx);
+DECL_DIRAC_PIXOP(avg, mmxext);
+
+void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h);
+void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h);
+void ff_put_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h);
+void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h);
+
void ff_add_rect_clamped_mmx(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int);
void ff_add_rect_clamped_sse2(uint8_t *, const uint16_t *, int, const int16_t *, int, int, int);
@@ -63,47 +72,89 @@
}
#define PIXFUNC(PFX, IDX, EXT) \
- /*MMXDISABLEDc->PFX ## _dirac_pixels_tab[0][IDX] = PFX ## _dirac_pixels8_ ## EXT;*/ \
- c->PFX ## _dirac_pixels_tab[1][IDX] = PFX ## _dirac_pixels16_ ## EXT; \
- c->PFX ## _dirac_pixels_tab[2][IDX] = PFX ## _dirac_pixels32_ ## EXT
+ /*MMXDISABLEDc->PFX ## _dirac_pixels_tab[0][IDX] = ff_ ## PFX ## _dirac_pixels8_ ## EXT;*/ \
+ c->PFX ## _dirac_pixels_tab[1][IDX] = ff_ ## PFX ## _dirac_pixels16_ ## EXT; \
+ c->PFX ## _dirac_pixels_tab[2][IDX] = ff_ ## PFX ## _dirac_pixels32_ ## EXT
-#define DIRAC_PIXOP(OPNAME, EXT)\
-static void OPNAME ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], \
- int stride, int h) \
+#define DIRAC_PIXOP(OPNAME2, OPNAME, EXT)\
+void ff_ ## OPNAME2 ## _dirac_pixels8_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
{\
if (h&3)\
- ff_ ## OPNAME ## _dirac_pixels16_c(dst, src, stride, h);\
+ ff_ ## OPNAME2 ## _dirac_pixels8_c(dst, src, stride, h);\
else\
- ff_ ## OPNAME ## _pixels16_ ## EXT(dst, src[0], stride, h);\
+ OPNAME ## _pixels8_ ## EXT(dst, src[0], stride, h);\
}\
-static void OPNAME ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], \
- int stride, int h) \
+void ff_ ## OPNAME2 ## _dirac_pixels16_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
+{\
+ if (h&3)\
+ ff_ ## OPNAME2 ## _dirac_pixels16_c(dst, src, stride, h);\
+ else\
+ OPNAME ## _pixels16_ ## EXT(dst, src[0], stride, h);\
+}\
+void ff_ ## OPNAME2 ## _dirac_pixels32_ ## EXT(uint8_t *dst, const uint8_t *src[5], int stride, int h)\
{\
if (h&3) {\
- ff_ ## OPNAME ## _dirac_pixels32_c(dst, src, stride, h);\
+ ff_ ## OPNAME2 ## _dirac_pixels32_c(dst, src, stride, h);\
} else {\
- ff_ ## OPNAME ## _pixels16_ ## EXT(dst , src[0] , stride, h);\
- ff_ ## OPNAME ## _pixels16_ ## EXT(dst+16, src[0]+16, stride, h);\
+ OPNAME ## _pixels16_ ## EXT(dst , src[0] , stride, h);\
+ OPNAME ## _pixels16_ ## EXT(dst+16, src[0]+16, stride, h);\
}\
}
-DIRAC_PIXOP(put, mmx)
-DIRAC_PIXOP(avg, mmx)
-DIRAC_PIXOP(avg, mmxext)
+DIRAC_PIXOP(put, ff_put, mmx)
+DIRAC_PIXOP(avg, ff_avg, mmx)
+DIRAC_PIXOP(avg, ff_avg, mmxext)
-DIRAC_PIXOP(put, sse2)
-DIRAC_PIXOP(avg, sse2)
+void ff_put_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
+{
+ if (h&3)
+ ff_put_dirac_pixels16_c(dst, src, stride, h);
+ else
+ ff_put_pixels16_sse2(dst, src[0], stride, h);
+}
+void ff_avg_dirac_pixels16_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
+{
+ if (h&3)
+ ff_avg_dirac_pixels16_c(dst, src, stride, h);
+ else
+ ff_avg_pixels16_sse2(dst, src[0], stride, h);
+}
+void ff_put_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
+{
+ if (h&3) {
+ ff_put_dirac_pixels32_c(dst, src, stride, h);
+ } else {
+ ff_put_pixels16_sse2(dst , src[0] , stride, h);
+ ff_put_pixels16_sse2(dst+16, src[0]+16, stride, h);
+ }
+}
+void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, int h)
+{
+ if (h&3) {
+ ff_avg_dirac_pixels32_c(dst, src, stride, h);
+ } else {
+ ff_avg_pixels16_sse2(dst , src[0] , stride, h);
+ ff_avg_pixels16_sse2(dst+16, src[0]+16, stride, h);
+ }
+}
+
+#else // HAVE_X86ASM
+
+#define HPEL_FILTER(MMSIZE, EXT) \
+ void dirac_hpel_filter_ ## EXT(uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, \
+ const uint8_t *src, int stride, int width, int height);
+
+#define PIXFUNC(PFX, IDX, EXT) do {} while (0)
+
+#endif // HAVE_X86ASM
#if !ARCH_X86_64
HPEL_FILTER(8, mmx)
#endif
HPEL_FILTER(16, sse2)
-#endif // HAVE_X86ASM
-
void ff_diracdsp_init_x86(DiracDSPContext* c)
{
-#if HAVE_X86ASM
int mm_flags = av_get_cpu_flags();
if (EXTERNAL_MMX(mm_flags)) {
@@ -131,15 +182,14 @@
c->add_dirac_obmc[1] = ff_add_dirac_obmc16_sse2;
c->add_dirac_obmc[2] = ff_add_dirac_obmc32_sse2;
- c->put_dirac_pixels_tab[1][0] = put_dirac_pixels16_sse2;
- c->avg_dirac_pixels_tab[1][0] = avg_dirac_pixels16_sse2;
- c->put_dirac_pixels_tab[2][0] = put_dirac_pixels32_sse2;
- c->avg_dirac_pixels_tab[2][0] = avg_dirac_pixels32_sse2;
+ c->put_dirac_pixels_tab[1][0] = ff_put_dirac_pixels16_sse2;
+ c->avg_dirac_pixels_tab[1][0] = ff_avg_dirac_pixels16_sse2;
+ c->put_dirac_pixels_tab[2][0] = ff_put_dirac_pixels32_sse2;
+ c->avg_dirac_pixels_tab[2][0] = ff_avg_dirac_pixels32_sse2;
}
if (EXTERNAL_SSE4(mm_flags)) {
c->dequant_subband[1] = ff_dequant_subband_32_sse4;
c->put_signed_rect_clamped[1] = ff_put_signed_rect_clamped_10_sse4;
}
-#endif
}
diff --git a/libavcodec/x86/fdct.c b/libavcodec/x86/fdct.c
index d77f60c..112566d 100644
--- a/libavcodec/x86/fdct.c
+++ b/libavcodec/x86/fdct.c
@@ -31,7 +31,6 @@
*/
#include "libavutil/common.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "fdct.h"
diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm
index b36c198..f3aa317 100644
--- a/libavcodec/x86/h264_intrapred.asm
+++ b/libavcodec/x86/h264_intrapred.asm
@@ -42,7 +42,11 @@
cextern pb_1
cextern pb_3
cextern pw_4
+cextern pw_5
cextern pw_8
+cextern pw_16
+cextern pw_17
+cextern pw_32
;-----------------------------------------------------------------------------
; void ff_pred16x16_vertical_8(uint8_t *src, ptrdiff_t stride)
diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index a2d8a64..0d3dbba 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -21,7 +21,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/h264dec.h"
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index 8a3fa27..17cd233 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -22,7 +22,6 @@
#include "config.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/get_bits.h" /* required for hevcdsp.h GetBitContext */
diff --git a/libavcodec/x86/me_cmp_init.c b/libavcodec/x86/me_cmp_init.c
index 701eb1a..6aec93e 100644
--- a/libavcodec/x86/me_cmp_init.c
+++ b/libavcodec/x86/me_cmp_init.c
@@ -24,7 +24,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/me_cmp.h"
diff --git a/libavcodec/x86/mpegaudiodsp.c b/libavcodec/x86/mpegaudiodsp.c
index 50692f2..d646c6d 100644
--- a/libavcodec/x86/mpegaudiodsp.c
+++ b/libavcodec/x86/mpegaudiodsp.c
@@ -22,7 +22,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/mpegaudiodsp.h"
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
index 4bad6a8..c884cf1 100644
--- a/libavcodec/x86/mpegvideoenc.c
+++ b/libavcodec/x86/mpegvideoenc.c
@@ -21,7 +21,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/avcodec.h"
diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c
index b32b1b0..1201be5 100644
--- a/libavcodec/x86/mpegvideoenc_template.c
+++ b/libavcodec/x86/mpegvideoenc_template.c
@@ -23,7 +23,6 @@
#include <stdint.h>
#include "libavutil/internal.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/mpegutils.h"
#include "libavcodec/mpegvideo.h"
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index 79a617f..b57a3fc 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -29,7 +29,6 @@
#include "libavcodec/rv34dsp.h"
#include "libavutil/attributes.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/cpu.h"
#include "hpeldsp.h"
diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c
index 6541dda..45c8a68 100644
--- a/libavcodec/x86/vc1dsp_mmx.c
+++ b/libavcodec/x86/vc1dsp_mmx.c
@@ -26,7 +26,6 @@
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/vc1dsp.h"
diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c
index dffa7a2..397b251 100644
--- a/libavcodec/x86/vp8dsp_init.c
+++ b/libavcodec/x86/vp8dsp_init.c
@@ -23,7 +23,6 @@
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/vp8dsp.h"
diff --git a/libavcodec/x86/vp9dsp_init.h b/libavcodec/x86/vp9dsp_init.h
index ebe7ca8..e410cab 100644
--- a/libavcodec/x86/vp9dsp_init.h
+++ b/libavcodec/x86/vp9dsp_init.h
@@ -23,8 +23,6 @@
#ifndef AVCODEC_X86_VP9DSP_INIT_H
#define AVCODEC_X86_VP9DSP_INIT_H
-#include "libavutil/mem_internal.h"
-
#include "libavcodec/vp9dsp.h"
// hack to force-expand BPC
diff --git a/libavcodec/x86/w64xmmtest.c b/libavcodec/x86/w64xmmtest.c
index d0782b9..8f2b8a6 100644
--- a/libavcodec/x86/w64xmmtest.c
+++ b/libavcodec/x86/w64xmmtest.c
@@ -29,7 +29,6 @@
testxmmclobbers(avcodec_open2, avctx, codec, options);
}
-#if FF_API_OLD_ENCDEC
wrap(avcodec_decode_audio4(AVCodecContext *avctx,
AVFrame *frame,
int *got_frame_ptr,
@@ -48,22 +47,6 @@
got_picture_ptr, avpkt);
}
-wrap(avcodec_encode_audio2(AVCodecContext *avctx,
- AVPacket *avpkt,
- const AVFrame *frame,
- int *got_packet_ptr))
-{
- testxmmclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
- got_packet_ptr);
-}
-
-wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
- const AVFrame *frame, int *got_packet_ptr))
-{
- testxmmclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
-}
-#endif
-
wrap(avcodec_decode_subtitle2(AVCodecContext *avctx,
AVSubtitle *sub,
int *got_sub_ptr,
@@ -73,6 +56,15 @@
got_sub_ptr, avpkt);
}
+wrap(avcodec_encode_audio2(AVCodecContext *avctx,
+ AVPacket *avpkt,
+ const AVFrame *frame,
+ int *got_packet_ptr))
+{
+ testxmmclobbers(avcodec_encode_audio2, avctx, avpkt, frame,
+ got_packet_ptr);
+}
+
wrap(avcodec_encode_subtitle(AVCodecContext *avctx,
uint8_t *buf, int buf_size,
const AVSubtitle *sub))
@@ -80,6 +72,12 @@
testxmmclobbers(avcodec_encode_subtitle, avctx, buf, buf_size, sub);
}
+wrap(avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
+ const AVFrame *frame, int *got_packet_ptr))
+{
+ testxmmclobbers(avcodec_encode_video2, avctx, avpkt, frame, got_packet_ptr);
+}
+
wrap(avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt))
{
testxmmclobbers(avcodec_send_packet, avctx, avpkt);
diff --git a/libavcodec/xbm_parser.c b/libavcodec/xbm_parser.c
deleted file mode 100644
index 6b0eea6..0000000
--- a/libavcodec/xbm_parser.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * XBM parser
- * Copyright (c) 2021 Paul B Mahol
- *
- * 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
- */
-
-/**
- * @file
- * XBM parser
- */
-
-#include "libavutil/common.h"
-
-#include "parser.h"
-
-typedef struct XBMParseContext {
- ParseContext pc;
- uint16_t state16;
- int count;
-} XBMParseContext;
-
-#define KEY (((uint64_t)'\n' << 56) | ((uint64_t)'#' << 48) | \
- ((uint64_t)'d' << 40) | ((uint64_t)'e' << 32) | \
- ((uint64_t)'f' << 24) | ('i' << 16) | ('n' << 8) | \
- ('e' << 0))
-
-#define END ((';' << 8) | ('\n' << 0))
-
-static int xbm_init(AVCodecParserContext *s)
-{
- XBMParseContext *bpc = s->priv_data;
-
- bpc->count = 1;
-
- return 0;
-}
-
-static int xbm_parse(AVCodecParserContext *s, AVCodecContext *avctx,
- const uint8_t **poutbuf, int *poutbuf_size,
- const uint8_t *buf, int buf_size)
-{
- XBMParseContext *bpc = s->priv_data;
- uint64_t state = bpc->pc.state64;
- uint16_t state16 = bpc->state16;
- int next = END_NOT_FOUND, i = 0;
-
- s->pict_type = AV_PICTURE_TYPE_I;
- s->key_frame = 1;
- s->duration = 1;
-
- *poutbuf_size = 0;
- *poutbuf = NULL;
-
- for (; i < buf_size; i++) {
- state = (state << 8) | buf[i];
- state16 = (state16 << 8) | buf[i];
-
- if (state == KEY)
- bpc->count++;
-
- if ((state == KEY && bpc->count == 1)) {
- next = i - 6;
- break;
- } else if (state16 == END) {
- next = i + 1;
- bpc->count = 0;
- break;
- }
- }
-
- bpc->pc.state64 = state;
- bpc->state16 = state16;
- if (ff_combine_frame(&bpc->pc, next, &buf, &buf_size) < 0) {
- *poutbuf = NULL;
- *poutbuf_size = 0;
- return buf_size;
- }
-
- *poutbuf = buf;
- *poutbuf_size = buf_size;
-
- return next;
-}
-
-AVCodecParser ff_xbm_parser = {
- .codec_ids = { AV_CODEC_ID_XBM },
- .priv_data_size = sizeof(XBMParseContext),
- .parser_init = xbm_init,
- .parser_parse = xbm_parse,
- .parser_close = ff_parse_close,
-};
diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c
index c1fc6cb..d19bdae 100644
--- a/libavcodec/xbmdec.c
+++ b/libavcodec/xbmdec.c
@@ -26,31 +26,26 @@
#include "internal.h"
#include "mathops.h"
-static int get_nibble(uint8_t x)
+static int convert(uint8_t x)
{
- int ret = 255;
-
- if (x <= '9') {
- if (x >= '0')
- ret = x - '0';
- } else if (x >= 'a') {
- if (x <= 'f')
- ret = x - ('a' - 10);
- } else if (x >= 'A' && x <= 'F')
- ret = x - ('A' - 10);
- return ret;
+ if (x >= 'a')
+ x -= 87;
+ else if (x >= 'A')
+ x -= 55;
+ else
+ x -= '0';
+ return x;
}
-static int parse_str_int(const uint8_t *p, const uint8_t *end, const uint8_t *key)
+static int parse_str_int(const uint8_t *p, int len, const uint8_t *key)
{
- int keylen = strlen(key);
- const uint8_t *e = end - keylen;
+ const uint8_t *end = p + len;
- for(; p < e; p++) {
- if (!memcmp(p, key, keylen))
+ for(; p<end - strlen(key); p++) {
+ if (!memcmp(p, key, strlen(key)))
break;
}
- p += keylen;
+ p += strlen(key);
if (p >= end)
return INT_MIN;
@@ -77,8 +72,8 @@
avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
end = avpkt->data + avpkt->size;
- width = parse_str_int(avpkt->data, end, "_width");
- height = parse_str_int(avpkt->data, end, "_height");
+ width = parse_str_int(avpkt->data, avpkt->size, "_width");
+ height = parse_str_int(avpkt->data, avpkt->size, "_height");
if ((ret = ff_set_dimensions(avctx, width, height)) < 0)
return ret;
@@ -98,26 +93,22 @@
for (i = 0; i < avctx->height; i++) {
dst = p->data[0] + i * p->linesize[0];
for (j = 0; j < linesize; j++) {
- uint8_t nib, val;
+ uint8_t val;
while (ptr < end && *ptr != 'x' && *ptr != '$')
ptr++;
ptr ++;
- if (ptr < end && (val = get_nibble(*ptr)) <= 15) {
- ptr++;
- if ((nib = get_nibble(*ptr)) <= 15) {
- val = (val << 4) + nib;
- ptr++;
- }
+ if (ptr < end && av_isxdigit(*ptr)) {
+ val = convert(*ptr++);
+ if (av_isxdigit(*ptr))
+ val = (val << 4) + convert(*ptr++);
*dst++ = ff_reverse[val];
- if ((val = get_nibble(*ptr)) <= 15 && j+1 < linesize) {
+ if (av_isxdigit(*ptr) && j+1 < linesize) {
j++;
- ptr++;
- if ((nib = get_nibble(*ptr)) <= 15) {
- val = (val << 4) + nib;
- ptr++;
- }
+ val = convert(*ptr++);
+ if (av_isxdigit(*ptr))
+ val = (val << 4) + convert(*ptr++);
*dst++ = ff_reverse[val];
}
} else {
diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c
index 1cf13f6..b25615f 100644
--- a/libavcodec/xbmenc.c
+++ b/libavcodec/xbmenc.c
@@ -24,25 +24,14 @@
#include "internal.h"
#include "mathops.h"
-#define ANSI_MIN_READLINE 509
-
static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *p, int *got_packet)
{
- int i, j, l, commas, ret, size, linesize, lineout, rowsout;
+ int i, j, ret, size, linesize;
uint8_t *ptr, *buf;
- linesize = lineout = (avctx->width + 7) / 8;
- commas = avctx->height * linesize;
-
- /* ANSI worst case minimum readline is 509 chars. */
- rowsout = avctx->height;
- if (lineout > (ANSI_MIN_READLINE / 6)) {
- lineout = ANSI_MIN_READLINE / 6;
- rowsout = (commas + lineout - 1) / lineout;
- }
-
- size = rowsout * (lineout * 6 + 1) + 106;
+ linesize = (avctx->width + 7) / 8;
+ size = avctx->height * (linesize * 7 + 2) + 110;
if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0)
return ret;
@@ -51,21 +40,12 @@
buf += snprintf(buf, 32, "#define image_width %u\n", avctx->width);
buf += snprintf(buf, 33, "#define image_height %u\n", avctx->height);
- buf += snprintf(buf, 39, "static unsigned char image_bits[] = {\n");
- for (i = 0, l = lineout; i < avctx->height; i++) {
- for (j = 0; j < linesize; j++) {
- buf += snprintf(buf, 6, " 0x%02X", ff_reverse[*ptr++]);
- if (--commas <= 0) {
- buf += snprintf(buf, 2, "\n");
- break;
- }
- buf += snprintf(buf, 2, ",");
- if (--l <= 0) {
- buf += snprintf(buf, 2, "\n");
- l = lineout;
- }
- }
+ buf += snprintf(buf, 40, "static unsigned char image_bits[] = {\n");
+ for (i = 0; i < avctx->height; i++) {
+ for (j = 0; j < linesize; j++)
+ buf += snprintf(buf, 7, " 0x%02X,", ff_reverse[*ptr++]);
ptr += p->linesize[0] - linesize;
+ buf += snprintf(buf, 2, "\n");
}
buf += snprintf(buf, 5, " };\n");
diff --git a/libavcodec/ylc.c b/libavcodec/ylc.c
index ab1f895..f68fcf0 100644
--- a/libavcodec/ylc.c
+++ b/libavcodec/ylc.c
@@ -38,9 +38,11 @@
typedef struct YLCContext {
VLC vlc[4];
- uint32_t table[256];
- uint8_t *buffer;
- int buffer_size;
+ uint32_t table[1024];
+ uint8_t *table_bits;
+ uint8_t *bitstream_bits;
+ int table_bits_size;
+ int bitstream_bits_size;
BswapDSPContext bdsp;
} YLCContext;
@@ -56,6 +58,7 @@
typedef struct Node {
int16_t sym;
+ int16_t n0;
uint32_t count;
int16_t l, r;
} Node;
@@ -96,6 +99,7 @@
for (i = 0; i < 256; i++) {
nodes[i].count = table[i];
nodes[i].sym = i;
+ nodes[i].n0 = -2;
nodes[i].l = i;
nodes[i].r = i;
}
@@ -137,6 +141,7 @@
}
nodes[cur_node].count = nd + st;
nodes[cur_node].sym = -1;
+ nodes[cur_node].n0 = cur_node;
nodes[cur_node].l = first_node;
nodes[cur_node].r = second_node;
cur_node++;
@@ -310,39 +315,50 @@
if ((ret = ff_thread_get_buffer(avctx, &frame, 0)) < 0)
return ret;
- av_fast_malloc(&s->buffer, &s->buffer_size,
- FFMAX(boffset - toffset, avpkt->size - boffset)
- + AV_INPUT_BUFFER_PADDING_SIZE);
- if (!s->buffer)
+ av_fast_malloc(&s->table_bits, &s->table_bits_size,
+ boffset - toffset + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!s->table_bits)
return AVERROR(ENOMEM);
- memcpy(s->buffer, avpkt->data + toffset, boffset - toffset);
- memset(s->buffer + boffset - toffset, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- s->bdsp.bswap_buf((uint32_t *) s->buffer,
- (uint32_t *) s->buffer,
+ memcpy(s->table_bits, avpkt->data + toffset, boffset - toffset);
+ memset(s->table_bits + boffset - toffset, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ s->bdsp.bswap_buf((uint32_t *) s->table_bits,
+ (uint32_t *) s->table_bits,
(boffset - toffset + 3) >> 2);
- if ((ret = init_get_bits8(&gb, s->buffer, boffset - toffset)) < 0)
+ if ((ret = init_get_bits8(&gb, s->table_bits, boffset - toffset)) < 0)
return ret;
- for (int i = 0; i < 4; i++) {
- for (x = 0; x < 256; x++) {
- unsigned len = get_unary(&gb, 1, 31);
- uint32_t val = ((1U << len) - 1) + get_bits_long(&gb, len);
+ for (x = 0; x < 1024; x++) {
+ unsigned len = get_unary(&gb, 1, 31);
+ uint32_t val = ((1U << len) - 1) + get_bits_long(&gb, len);
- s->table[x] = val;
- }
-
- ret = build_vlc(avctx, &s->vlc[i], s->table);
- if (ret < 0)
- return ret;
+ s->table[x] = val;
}
- memcpy(s->buffer, avpkt->data + boffset, avpkt->size - boffset);
- memset(s->buffer + avpkt->size - boffset, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- s->bdsp.bswap_buf((uint32_t *) s->buffer,
- (uint32_t *) s->buffer,
+ ret = build_vlc(avctx, &s->vlc[0], &s->table[0 ]);
+ if (ret < 0)
+ return ret;
+ ret = build_vlc(avctx, &s->vlc[1], &s->table[256]);
+ if (ret < 0)
+ return ret;
+ ret = build_vlc(avctx, &s->vlc[2], &s->table[512]);
+ if (ret < 0)
+ return ret;
+ ret = build_vlc(avctx, &s->vlc[3], &s->table[768]);
+ if (ret < 0)
+ return ret;
+
+ av_fast_malloc(&s->bitstream_bits, &s->bitstream_bits_size,
+ avpkt->size - boffset + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!s->bitstream_bits)
+ return AVERROR(ENOMEM);
+
+ memcpy(s->bitstream_bits, avpkt->data + boffset, avpkt->size - boffset);
+ memset(s->bitstream_bits + avpkt->size - boffset, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ s->bdsp.bswap_buf((uint32_t *) s->bitstream_bits,
+ (uint32_t *) s->bitstream_bits,
(avpkt->size - boffset) >> 2);
- if ((ret = init_get_bits8(&gb, s->buffer, avpkt->size - boffset)) < 0)
+ if ((ret = init_get_bits8(&gb, s->bitstream_bits, avpkt->size - boffset)) < 0)
return ret;
dst = p->data[0];
@@ -444,10 +460,14 @@
{
YLCContext *s = avctx->priv_data;
- for (int i = 0; i < FF_ARRAY_ELEMS(s->vlc); i++)
- ff_free_vlc(&s->vlc[i]);
- av_freep(&s->buffer);
- s->buffer_size = 0;
+ ff_free_vlc(&s->vlc[0]);
+ ff_free_vlc(&s->vlc[1]);
+ ff_free_vlc(&s->vlc[2]);
+ ff_free_vlc(&s->vlc[3]);
+ av_freep(&s->table_bits);
+ s->table_bits_size = 0;
+ av_freep(&s->bitstream_bits);
+ s->bitstream_bits_size = 0;
return 0;
}
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 554debc..ec84d3b 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -27,11 +27,39 @@
#include "libavutil/ffversion.h"
const char av_device_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
-#if FF_API_DEVICE_CAPABILITIES
+#define E AV_OPT_FLAG_ENCODING_PARAM
+#define D AV_OPT_FLAG_DECODING_PARAM
+#define A AV_OPT_FLAG_AUDIO_PARAM
+#define V AV_OPT_FLAG_VIDEO_PARAM
+#define OFFSET(x) offsetof(AVDeviceCapabilitiesQuery, x)
+
const AVOption av_device_capabilities[] = {
+ { "codec", "codec", OFFSET(codec), AV_OPT_TYPE_INT,
+ {.i64 = AV_CODEC_ID_NONE}, AV_CODEC_ID_NONE, INT_MAX, E|D|A|V },
+ { "sample_format", "sample format", OFFSET(sample_format), AV_OPT_TYPE_SAMPLE_FMT,
+ {.i64 = AV_SAMPLE_FMT_NONE}, AV_SAMPLE_FMT_NONE, INT_MAX, E|D|A },
+ { "sample_rate", "sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT,
+ {.i64 = -1}, -1, INT_MAX, E|D|A },
+ { "channels", "channels", OFFSET(channels), AV_OPT_TYPE_INT,
+ {.i64 = -1}, -1, INT_MAX, E|D|A },
+ { "channel_layout", "channel layout", OFFSET(channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT,
+ {.i64 = -1}, -1, INT_MAX, E|D|A },
+ { "pixel_format", "pixel format", OFFSET(pixel_format), AV_OPT_TYPE_PIXEL_FMT,
+ {.i64 = AV_PIX_FMT_NONE}, AV_PIX_FMT_NONE, INT_MAX, E|D|V },
+ { "window_size", "window size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE,
+ {.str = NULL}, -1, INT_MAX, E|D|V },
+ { "frame_size", "frame size", OFFSET(frame_width), AV_OPT_TYPE_IMAGE_SIZE,
+ {.str = NULL}, -1, INT_MAX, E|D|V },
+ { "fps", "fps", OFFSET(fps), AV_OPT_TYPE_RATIONAL,
+ {.dbl = -1}, -1, INT_MAX, E|D|V },
{ NULL }
};
-#endif
+
+#undef E
+#undef D
+#undef A
+#undef V
+#undef OFFSET
unsigned avdevice_version(void)
{
@@ -66,18 +94,49 @@
return s->control_message_cb(s, type, data, data_size);
}
-#if FF_API_DEVICE_CAPABILITIES
int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,
AVDictionary **device_options)
{
- return AVERROR(ENOSYS);
+ int ret;
+ av_assert0(s && caps);
+ av_assert0(s->iformat || s->oformat);
+ if ((s->oformat && !s->oformat->create_device_capabilities) ||
+ (s->iformat && !s->iformat->create_device_capabilities))
+ return AVERROR(ENOSYS);
+ *caps = av_mallocz(sizeof(**caps));
+ if (!(*caps))
+ return AVERROR(ENOMEM);
+ (*caps)->device_context = s;
+ if (((ret = av_opt_set_dict(s->priv_data, device_options)) < 0))
+ goto fail;
+ if (s->iformat) {
+ if ((ret = s->iformat->create_device_capabilities(s, *caps)) < 0)
+ goto fail;
+ } else {
+ if ((ret = s->oformat->create_device_capabilities(s, *caps)) < 0)
+ goto fail;
+ }
+ av_opt_set_defaults(*caps);
+ return 0;
+ fail:
+ av_freep(caps);
+ return ret;
}
void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s)
{
- return;
+ if (!s || !caps || !(*caps))
+ return;
+ av_assert0(s->iformat || s->oformat);
+ if (s->iformat) {
+ if (s->iformat->free_device_capabilities)
+ s->iformat->free_device_capabilities(s, *caps);
+ } else {
+ if (s->oformat->free_device_capabilities)
+ s->oformat->free_device_capabilities(s, *caps);
+ }
+ av_freep(caps);
}
-#endif
int avdevice_list_devices(AVFormatContext *s, AVDeviceInfoList **device_list)
{
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h
index 85a4dcc..ee94624 100644
--- a/libavdevice/avdevice.h
+++ b/libavdevice/avdevice.h
@@ -321,7 +321,6 @@
enum AVDevToAppMessageType type,
void *data, size_t data_size);
-#if FF_API_DEVICE_CAPABILITIES
/**
* Following API allows user to probe device capabilities (supported codecs,
* pixel formats, sample formats, resolutions, channel counts, etc).
@@ -417,7 +416,6 @@
/**
* AVOption table used by devices to implement device capabilities API. Should not be used by a user.
*/
-attribute_deprecated
extern const AVOption av_device_capabilities[];
/**
@@ -437,7 +435,6 @@
*
* @return >= 0 on success, negative otherwise.
*/
-attribute_deprecated
int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s,
AVDictionary **device_options);
@@ -447,9 +444,7 @@
* @param caps Device capabilities data to be freed.
* @param s Context of the device.
*/
-attribute_deprecated
void avdevice_capabilities_free(AVDeviceCapabilitiesQuery **caps, AVFormatContext *s);
-#endif
/**
* Structure describes basic parameters of the device.
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 0688028..2601adb 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -225,14 +225,14 @@
{
uint64_t curtime;
- curtime = av_gettime_relative();
+ curtime = av_gettime();
if (!last_frame_time
|| ((last_frame_time + per_frame) > curtime)) {
if (!usleep(last_frame_time + per_frame + per_frame / 8 - curtime)) {
if (!nsignals)
av_log(NULL, AV_LOG_INFO,
"SLEPT NO signals - %d microseconds late\n",
- (int)(av_gettime_relative() - last_frame_time - per_frame));
+ (int)(av_gettime() - last_frame_time - per_frame));
}
}
nsignals = 0;
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 6c0a338..d56d31e 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -789,7 +789,7 @@
return pts;
}
-static int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)
+int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)
{
IDeckLinkTimecode *timecode;
int ret = AVERROR(ENOENT);
@@ -811,7 +811,7 @@
return ret;
}
-static int get_frame_timecode(AVFormatContext *avctx, decklink_ctx *ctx, AVTimecode *tc, IDeckLinkVideoInputFrame *videoFrame)
+int get_frame_timecode(AVFormatContext *avctx, decklink_ctx *ctx, AVTimecode *tc, IDeckLinkVideoInputFrame *videoFrame)
{
AVRational frame_rate = ctx->video_st->r_frame_rate;
int ret;
@@ -1320,26 +1320,34 @@
switch(ctx->raw_format) {
case bmdFormat8BitYUV:
st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
+ st->codecpar->codec_tag = MKTAG('U', 'Y', 'V', 'Y');
st->codecpar->format = AV_PIX_FMT_UYVY422;
st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 16, st->time_base.den, st->time_base.num);
break;
case bmdFormat10BitYUV:
st->codecpar->codec_id = AV_CODEC_ID_V210;
+ st->codecpar->codec_tag = MKTAG('V','2','1','0');
st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 64, st->time_base.den, st->time_base.num * 3);
+ st->codecpar->bits_per_coded_sample = 10;
break;
case bmdFormat8BitARGB:
st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codecpar->format = AV_PIX_FMT_0RGB;
+ st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format);
st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num);
break;
case bmdFormat8BitBGRA:
st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codecpar->format = AV_PIX_FMT_BGR0;
+ st->codecpar->codec_tag = avcodec_pix_fmt_to_codec_tag((enum AVPixelFormat)st->codecpar->format);
st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 32, st->time_base.den, st->time_base.num);
break;
case bmdFormat10BitRGB:
st->codecpar->codec_id = AV_CODEC_ID_R210;
+ st->codecpar->codec_tag = MKTAG('R','2','1','0');
+ st->codecpar->format = AV_PIX_FMT_RGB48LE;
st->codecpar->bit_rate = av_rescale(ctx->bmd_width * ctx->bmd_height * 30, st->time_base.den, st->time_base.num);
+ st->codecpar->bits_per_coded_sample = 10;
break;
default:
char fourcc_str[AV_FOURCC_MAX_STRING_SIZE] = {0};
@@ -1437,7 +1445,7 @@
avpacket_queue_get(&ctx->queue, pkt, 1);
if (ctx->tc_format && !(av_dict_get(ctx->video_st->metadata, "timecode", NULL, 0))) {
- buffer_size_t size;
+ int size;
const uint8_t *side_metadata = av_packet_get_side_data(pkt, AV_PKT_DATA_STRINGS_METADATA, &size);
if (side_metadata) {
if (av_packet_unpack_dictionary(side_metadata, size, &ctx->video_st->metadata) < 0)
diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp
index df901b0..6c73968 100644
--- a/libavdevice/decklink_enc.cpp
+++ b/libavdevice/decklink_enc.cpp
@@ -312,8 +312,7 @@
uint16_t *cdp_words;
uint16_t len;
uint8_t cc_count;
- buffer_size_t size;
- int ret, i;
+ int size, ret, i;
const uint8_t *data = av_packet_get_side_data(pkt, AV_PKT_DATA_A53_CC, &size);
if (!data)
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index a16764d..d7f5bd7 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -87,13 +87,13 @@
}
if (ctx->capture_pin[VideoDevice])
- ff_dshow_pin_Release(ctx->capture_pin[VideoDevice]);
+ libAVPin_Release(ctx->capture_pin[VideoDevice]);
if (ctx->capture_pin[AudioDevice])
- ff_dshow_pin_Release(ctx->capture_pin[AudioDevice]);
+ libAVPin_Release(ctx->capture_pin[AudioDevice]);
if (ctx->capture_filter[VideoDevice])
- ff_dshow_filter_Release(ctx->capture_filter[VideoDevice]);
+ libAVFilter_Release(ctx->capture_filter[VideoDevice]);
if (ctx->capture_filter[AudioDevice])
- ff_dshow_filter_Release(ctx->capture_filter[AudioDevice]);
+ libAVFilter_Release(ctx->capture_filter[AudioDevice]);
if (ctx->device_pin[VideoDevice])
IPin_Release(ctx->device_pin[VideoDevice]);
@@ -510,7 +510,7 @@
* Pops up a user dialog allowing them to adjust properties for the given filter, if possible.
*/
void
-ff_dshow_show_filter_properties(IBaseFilter *device_filter, AVFormatContext *avctx) {
+dshow_show_filter_properties(IBaseFilter *device_filter, AVFormatContext *avctx) {
ISpecifyPropertyPages *property_pages = NULL;
IUnknown *device_filter_iunknown = NULL;
HRESULT hr;
@@ -582,7 +582,7 @@
int should_show_properties = (devtype == VideoDevice) ? ctx->show_video_device_dialog : ctx->show_audio_device_dialog;
if (should_show_properties)
- ff_dshow_show_filter_properties(device_filter, avctx);
+ dshow_show_filter_properties(device_filter, avctx);
r = IBaseFilter_EnumPins(device_filter, &pins);
if (r != S_OK) {
@@ -731,8 +731,8 @@
char *device_filter_unique_name = NULL;
IGraphBuilder *graph = ctx->graph;
IPin *device_pin = NULL;
- DShowPin *capture_pin = NULL;
- DShowFilter *capture_filter = NULL;
+ libAVPin *capture_pin = NULL;
+ libAVFilter *capture_filter = NULL;
ICaptureGraphBuilder2 *graph_builder2 = NULL;
int ret = AVERROR(EIO);
int r;
@@ -807,7 +807,7 @@
ctx->device_pin[devtype] = device_pin;
- capture_filter = ff_dshow_filter_Create(avctx, callback, devtype);
+ capture_filter = libAVFilter_Create(avctx, callback, devtype);
if (!capture_filter) {
av_log(avctx, AV_LOG_ERROR, "Could not create grabber filter.\n");
goto error;
@@ -863,7 +863,7 @@
goto error;
}
- ff_dshow_pin_AddRef(capture_filter->pin);
+ libAVPin_AddRef(capture_filter->pin);
capture_pin = capture_filter->pin;
ctx->capture_pin[devtype] = capture_pin;
@@ -887,7 +887,7 @@
goto error;
}
- r = ff_dshow_try_setup_crossbar_options(graph_builder2, device_filter, devtype, avctx);
+ r = dshow_try_setup_crossbar_options(graph_builder2, device_filter, devtype, avctx);
if (r != S_OK) {
av_log(avctx, AV_LOG_ERROR, "Could not setup CrossBar\n");
@@ -953,7 +953,7 @@
ctx->capture_filter[devtype]->stream_index = st->index;
- ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type);
+ libAVPin_ConnectionMediaType(ctx->capture_pin[devtype], &type);
par = st->codecpar;
if (devtype == VideoDevice) {
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h
index 710b65c..475d62b 100644
--- a/libavdevice/dshow_capture.h
+++ b/libavdevice/dshow_capture.h
@@ -68,20 +68,20 @@
AudioSourceDevice = 1,
};
-#define DECLARE_QUERYINTERFACE(prefix, class, ...) \
-long \
-ff_dshow_##prefix##_QueryInterface(class *this, const GUID *riid, void **ppvObject) \
+#define DECLARE_QUERYINTERFACE(class, ...) \
+long WINAPI \
+class##_QueryInterface(class *this, const GUID *riid, void **ppvObject) \
{ \
struct GUIDoffset ifaces[] = __VA_ARGS__; \
int i; \
- dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_QueryInterface(%p, %p, %p)\n", this, riid, ppvObject); \
+ dshowdebug(AV_STRINGIFY(class)"_QueryInterface(%p, %p, %p)\n", this, riid, ppvObject); \
ff_printGUID(riid); \
if (!ppvObject) \
return E_POINTER; \
for (i = 0; i < sizeof(ifaces)/sizeof(ifaces[0]); i++) { \
if (IsEqualGUID(riid, ifaces[i].iid)) { \
void *obj = (void *) ((uint8_t *) this + ifaces[i].offset); \
- ff_dshow_##prefix##_AddRef(this); \
+ class##_AddRef(this); \
dshowdebug("\tfound %d with offset %d\n", i, ifaces[i].offset); \
*ppvObject = (void *) obj; \
return S_OK; \
@@ -91,28 +91,28 @@
*ppvObject = NULL; \
return E_NOINTERFACE; \
}
-#define DECLARE_ADDREF(prefix, class) \
-unsigned long \
-ff_dshow_##prefix##_AddRef(class *this) \
+#define DECLARE_ADDREF(class) \
+unsigned long WINAPI \
+class##_AddRef(class *this) \
{ \
- dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_AddRef(%p)\t%ld\n", this, this->ref+1); \
+ dshowdebug(AV_STRINGIFY(class)"_AddRef(%p)\t%ld\n", this, this->ref+1); \
return InterlockedIncrement(&this->ref); \
}
-#define DECLARE_RELEASE(prefix, class) \
-unsigned long \
-ff_dshow_##prefix##_Release(class *this) \
+#define DECLARE_RELEASE(class) \
+unsigned long WINAPI \
+class##_Release(class *this) \
{ \
long ref = InterlockedDecrement(&this->ref); \
- dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Release(%p)\t%ld\n", this, ref); \
+ dshowdebug(AV_STRINGIFY(class)"_Release(%p)\t%ld\n", this, ref); \
if (!ref) \
- ff_dshow_##prefix##_Destroy(this); \
+ class##_Destroy(this); \
return ref; \
}
-#define DECLARE_DESTROY(prefix, class, func) \
-void ff_dshow_##prefix##_Destroy(class *this) \
+#define DECLARE_DESTROY(class, func) \
+void class##_Destroy(class *this) \
{ \
- dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Destroy(%p)\n", this); \
+ dshowdebug(AV_STRINGIFY(class)"_Destroy(%p)\n", this); \
func(this); \
if (this) { \
if (this->vtbl) \
@@ -120,12 +120,12 @@
CoTaskMemFree(this); \
} \
}
-#define DECLARE_CREATE(prefix, class, setup, ...) \
-class *ff_dshow_##prefix##_Create(__VA_ARGS__) \
+#define DECLARE_CREATE(class, setup, ...) \
+class *class##_Create(__VA_ARGS__) \
{ \
class *this = CoTaskMemAlloc(sizeof(class)); \
void *vtbl = CoTaskMemAlloc(sizeof(*this->vtbl)); \
- dshowdebug("ff_dshow_"AV_STRINGIFY(prefix)"_Create(%p)\n", this); \
+ dshowdebug(AV_STRINGIFY(class)"_Create(%p)\n", this); \
if (!this || !vtbl) \
goto fail; \
ZeroMemory(this, sizeof(class)); \
@@ -134,123 +134,123 @@
this->vtbl = vtbl; \
if (!setup) \
goto fail; \
- dshowdebug("created ff_dshow_"AV_STRINGIFY(prefix)" %p\n", this); \
+ dshowdebug("created "AV_STRINGIFY(class)" %p\n", this); \
return this; \
fail: \
- ff_dshow_##prefix##_Destroy(this); \
- dshowdebug("could not create ff_dshow_"AV_STRINGIFY(prefix)"\n"); \
+ class##_Destroy(this); \
+ dshowdebug("could not create "AV_STRINGIFY(class)"\n"); \
return NULL; \
}
-#define SETVTBL(vtbl, prefix, fn) \
- do { (vtbl)->fn = (void *) ff_dshow_##prefix##_##fn; } while(0)
+#define SETVTBL(vtbl, class, fn) \
+ do { (vtbl)->fn = (void *) class##_##fn; } while(0)
/*****************************************************************************
* Forward Declarations
****************************************************************************/
-typedef struct DShowPin DShowPin;
-typedef struct DShowMemInputPin DShowMemInputPin;
-typedef struct DShowEnumPins DShowEnumPins;
-typedef struct DShowEnumMediaTypes DShowEnumMediaTypes;
-typedef struct DShowFilter DShowFilter;
+typedef struct libAVPin libAVPin;
+typedef struct libAVMemInputPin libAVMemInputPin;
+typedef struct libAVEnumPins libAVEnumPins;
+typedef struct libAVEnumMediaTypes libAVEnumMediaTypes;
+typedef struct libAVFilter libAVFilter;
/*****************************************************************************
- * DShowPin
+ * libAVPin
****************************************************************************/
-struct DShowPin {
+struct libAVPin {
IPinVtbl *vtbl;
long ref;
- DShowFilter *filter;
+ libAVFilter *filter;
IPin *connectedto;
AM_MEDIA_TYPE type;
IMemInputPinVtbl *imemvtbl;
};
-long ff_dshow_pin_QueryInterface (DShowPin *, const GUID *, void **);
-unsigned long ff_dshow_pin_AddRef (DShowPin *);
-unsigned long ff_dshow_pin_Release (DShowPin *);
-long ff_dshow_pin_Connect (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
-long ff_dshow_pin_ReceiveConnection (DShowPin *, IPin *, const AM_MEDIA_TYPE *);
-long ff_dshow_pin_Disconnect (DShowPin *);
-long ff_dshow_pin_ConnectedTo (DShowPin *, IPin **);
-long ff_dshow_pin_ConnectionMediaType (DShowPin *, AM_MEDIA_TYPE *);
-long ff_dshow_pin_QueryPinInfo (DShowPin *, PIN_INFO *);
-long ff_dshow_pin_QueryDirection (DShowPin *, PIN_DIRECTION *);
-long ff_dshow_pin_QueryId (DShowPin *, wchar_t **);
-long ff_dshow_pin_QueryAccept (DShowPin *, const AM_MEDIA_TYPE *);
-long ff_dshow_pin_EnumMediaTypes (DShowPin *, IEnumMediaTypes **);
-long ff_dshow_pin_QueryInternalConnections(DShowPin *, IPin **, unsigned long *);
-long ff_dshow_pin_EndOfStream (DShowPin *);
-long ff_dshow_pin_BeginFlush (DShowPin *);
-long ff_dshow_pin_EndFlush (DShowPin *);
-long ff_dshow_pin_NewSegment (DShowPin *, REFERENCE_TIME, REFERENCE_TIME, double);
+long WINAPI libAVPin_QueryInterface (libAVPin *, const GUID *, void **);
+unsigned long WINAPI libAVPin_AddRef (libAVPin *);
+unsigned long WINAPI libAVPin_Release (libAVPin *);
+long WINAPI libAVPin_Connect (libAVPin *, IPin *, const AM_MEDIA_TYPE *);
+long WINAPI libAVPin_ReceiveConnection (libAVPin *, IPin *, const AM_MEDIA_TYPE *);
+long WINAPI libAVPin_Disconnect (libAVPin *);
+long WINAPI libAVPin_ConnectedTo (libAVPin *, IPin **);
+long WINAPI libAVPin_ConnectionMediaType (libAVPin *, AM_MEDIA_TYPE *);
+long WINAPI libAVPin_QueryPinInfo (libAVPin *, PIN_INFO *);
+long WINAPI libAVPin_QueryDirection (libAVPin *, PIN_DIRECTION *);
+long WINAPI libAVPin_QueryId (libAVPin *, wchar_t **);
+long WINAPI libAVPin_QueryAccept (libAVPin *, const AM_MEDIA_TYPE *);
+long WINAPI libAVPin_EnumMediaTypes (libAVPin *, IEnumMediaTypes **);
+long WINAPI libAVPin_QueryInternalConnections(libAVPin *, IPin **, unsigned long *);
+long WINAPI libAVPin_EndOfStream (libAVPin *);
+long WINAPI libAVPin_BeginFlush (libAVPin *);
+long WINAPI libAVPin_EndFlush (libAVPin *);
+long WINAPI libAVPin_NewSegment (libAVPin *, REFERENCE_TIME, REFERENCE_TIME, double);
-long ff_dshow_meminputpin_QueryInterface (DShowMemInputPin *, const GUID *, void **);
-unsigned long ff_dshow_meminputpin_AddRef (DShowMemInputPin *);
-unsigned long ff_dshow_meminputpin_Release (DShowMemInputPin *);
-long ff_dshow_meminputpin_GetAllocator (DShowMemInputPin *, IMemAllocator **);
-long ff_dshow_meminputpin_NotifyAllocator (DShowMemInputPin *, IMemAllocator *, BOOL);
-long ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *, ALLOCATOR_PROPERTIES *);
-long ff_dshow_meminputpin_Receive (DShowMemInputPin *, IMediaSample *);
-long ff_dshow_meminputpin_ReceiveMultiple (DShowMemInputPin *, IMediaSample **, long, long *);
-long ff_dshow_meminputpin_ReceiveCanBlock (DShowMemInputPin *);
+long WINAPI libAVMemInputPin_QueryInterface (libAVMemInputPin *, const GUID *, void **);
+unsigned long WINAPI libAVMemInputPin_AddRef (libAVMemInputPin *);
+unsigned long WINAPI libAVMemInputPin_Release (libAVMemInputPin *);
+long WINAPI libAVMemInputPin_GetAllocator (libAVMemInputPin *, IMemAllocator **);
+long WINAPI libAVMemInputPin_NotifyAllocator (libAVMemInputPin *, IMemAllocator *, BOOL);
+long WINAPI libAVMemInputPin_GetAllocatorRequirements(libAVMemInputPin *, ALLOCATOR_PROPERTIES *);
+long WINAPI libAVMemInputPin_Receive (libAVMemInputPin *, IMediaSample *);
+long WINAPI libAVMemInputPin_ReceiveMultiple (libAVMemInputPin *, IMediaSample **, long, long *);
+long WINAPI libAVMemInputPin_ReceiveCanBlock (libAVMemInputPin *);
-void ff_dshow_pin_Destroy(DShowPin *);
-DShowPin *ff_dshow_pin_Create (DShowFilter *filter);
+void libAVPin_Destroy(libAVPin *);
+libAVPin *libAVPin_Create (libAVFilter *filter);
-void ff_dshow_meminputpin_Destroy(DShowMemInputPin *);
+void libAVMemInputPin_Destroy(libAVMemInputPin *);
/*****************************************************************************
- * DShowEnumPins
+ * libAVEnumPins
****************************************************************************/
-struct DShowEnumPins {
+struct libAVEnumPins {
IEnumPinsVtbl *vtbl;
long ref;
int pos;
- DShowPin *pin;
- DShowFilter *filter;
+ libAVPin *pin;
+ libAVFilter *filter;
};
-long ff_dshow_enumpins_QueryInterface(DShowEnumPins *, const GUID *, void **);
-unsigned long ff_dshow_enumpins_AddRef (DShowEnumPins *);
-unsigned long ff_dshow_enumpins_Release (DShowEnumPins *);
-long ff_dshow_enumpins_Next (DShowEnumPins *, unsigned long, IPin **, unsigned long *);
-long ff_dshow_enumpins_Skip (DShowEnumPins *, unsigned long);
-long ff_dshow_enumpins_Reset (DShowEnumPins *);
-long ff_dshow_enumpins_Clone (DShowEnumPins *, DShowEnumPins **);
+long WINAPI libAVEnumPins_QueryInterface(libAVEnumPins *, const GUID *, void **);
+unsigned long WINAPI libAVEnumPins_AddRef (libAVEnumPins *);
+unsigned long WINAPI libAVEnumPins_Release (libAVEnumPins *);
+long WINAPI libAVEnumPins_Next (libAVEnumPins *, unsigned long, IPin **, unsigned long *);
+long WINAPI libAVEnumPins_Skip (libAVEnumPins *, unsigned long);
+long WINAPI libAVEnumPins_Reset (libAVEnumPins *);
+long WINAPI libAVEnumPins_Clone (libAVEnumPins *, libAVEnumPins **);
-void ff_dshow_enumpins_Destroy(DShowEnumPins *);
-DShowEnumPins *ff_dshow_enumpins_Create (DShowPin *pin, DShowFilter *filter);
+void libAVEnumPins_Destroy(libAVEnumPins *);
+libAVEnumPins *libAVEnumPins_Create (libAVPin *pin, libAVFilter *filter);
/*****************************************************************************
- * DShowEnumMediaTypes
+ * libAVEnumMediaTypes
****************************************************************************/
-struct DShowEnumMediaTypes {
+struct libAVEnumMediaTypes {
IEnumMediaTypesVtbl *vtbl;
long ref;
int pos;
AM_MEDIA_TYPE type;
};
-long ff_dshow_enummediatypes_QueryInterface(DShowEnumMediaTypes *, const GUID *, void **);
-unsigned long ff_dshow_enummediatypes_AddRef (DShowEnumMediaTypes *);
-unsigned long ff_dshow_enummediatypes_Release (DShowEnumMediaTypes *);
-long ff_dshow_enummediatypes_Next (DShowEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *);
-long ff_dshow_enummediatypes_Skip (DShowEnumMediaTypes *, unsigned long);
-long ff_dshow_enummediatypes_Reset (DShowEnumMediaTypes *);
-long ff_dshow_enummediatypes_Clone (DShowEnumMediaTypes *, DShowEnumMediaTypes **);
+long WINAPI libAVEnumMediaTypes_QueryInterface(libAVEnumMediaTypes *, const GUID *, void **);
+unsigned long WINAPI libAVEnumMediaTypes_AddRef (libAVEnumMediaTypes *);
+unsigned long WINAPI libAVEnumMediaTypes_Release (libAVEnumMediaTypes *);
+long WINAPI libAVEnumMediaTypes_Next (libAVEnumMediaTypes *, unsigned long, AM_MEDIA_TYPE **, unsigned long *);
+long WINAPI libAVEnumMediaTypes_Skip (libAVEnumMediaTypes *, unsigned long);
+long WINAPI libAVEnumMediaTypes_Reset (libAVEnumMediaTypes *);
+long WINAPI libAVEnumMediaTypes_Clone (libAVEnumMediaTypes *, libAVEnumMediaTypes **);
-void ff_dshow_enummediatypes_Destroy(DShowEnumMediaTypes *);
-DShowEnumMediaTypes *ff_dshow_enummediatypes_Create(const AM_MEDIA_TYPE *type);
+void libAVEnumMediaTypes_Destroy(libAVEnumMediaTypes *);
+libAVEnumMediaTypes *libAVEnumMediaTypes_Create(const AM_MEDIA_TYPE *type);
/*****************************************************************************
- * DShowFilter
+ * libAVFilter
****************************************************************************/
-struct DShowFilter {
+struct libAVFilter {
IBaseFilterVtbl *vtbl;
long ref;
const wchar_t *name;
- DShowPin *pin;
+ libAVPin *pin;
FILTER_INFO info;
FILTER_STATE state;
IReferenceClock *clock;
@@ -261,24 +261,24 @@
void (*callback)(void *priv_data, int index, uint8_t *buf, int buf_size, int64_t time, enum dshowDeviceType type);
};
-long ff_dshow_filter_QueryInterface (DShowFilter *, const GUID *, void **);
-unsigned long ff_dshow_filter_AddRef (DShowFilter *);
-unsigned long ff_dshow_filter_Release (DShowFilter *);
-long ff_dshow_filter_GetClassID (DShowFilter *, CLSID *);
-long ff_dshow_filter_Stop (DShowFilter *);
-long ff_dshow_filter_Pause (DShowFilter *);
-long ff_dshow_filter_Run (DShowFilter *, REFERENCE_TIME);
-long ff_dshow_filter_GetState (DShowFilter *, DWORD, FILTER_STATE *);
-long ff_dshow_filter_SetSyncSource (DShowFilter *, IReferenceClock *);
-long ff_dshow_filter_GetSyncSource (DShowFilter *, IReferenceClock **);
-long ff_dshow_filter_EnumPins (DShowFilter *, IEnumPins **);
-long ff_dshow_filter_FindPin (DShowFilter *, const wchar_t *, IPin **);
-long ff_dshow_filter_QueryFilterInfo(DShowFilter *, FILTER_INFO *);
-long ff_dshow_filter_JoinFilterGraph(DShowFilter *, IFilterGraph *, const wchar_t *);
-long ff_dshow_filter_QueryVendorInfo(DShowFilter *, wchar_t **);
+long WINAPI libAVFilter_QueryInterface (libAVFilter *, const GUID *, void **);
+unsigned long WINAPI libAVFilter_AddRef (libAVFilter *);
+unsigned long WINAPI libAVFilter_Release (libAVFilter *);
+long WINAPI libAVFilter_GetClassID (libAVFilter *, CLSID *);
+long WINAPI libAVFilter_Stop (libAVFilter *);
+long WINAPI libAVFilter_Pause (libAVFilter *);
+long WINAPI libAVFilter_Run (libAVFilter *, REFERENCE_TIME);
+long WINAPI libAVFilter_GetState (libAVFilter *, DWORD, FILTER_STATE *);
+long WINAPI libAVFilter_SetSyncSource (libAVFilter *, IReferenceClock *);
+long WINAPI libAVFilter_GetSyncSource (libAVFilter *, IReferenceClock **);
+long WINAPI libAVFilter_EnumPins (libAVFilter *, IEnumPins **);
+long WINAPI libAVFilter_FindPin (libAVFilter *, const wchar_t *, IPin **);
+long WINAPI libAVFilter_QueryFilterInfo(libAVFilter *, FILTER_INFO *);
+long WINAPI libAVFilter_JoinFilterGraph(libAVFilter *, IFilterGraph *, const wchar_t *);
+long WINAPI libAVFilter_QueryVendorInfo(libAVFilter *, wchar_t **);
-void ff_dshow_filter_Destroy(DShowFilter *);
-DShowFilter *ff_dshow_filter_Create (void *, void *, enum dshowDeviceType);
+void libAVFilter_Destroy(libAVFilter *);
+libAVFilter *libAVFilter_Create (void *, void *, enum dshowDeviceType);
/*****************************************************************************
* dshow_ctx
@@ -314,8 +314,8 @@
IBaseFilter *device_filter[2];
IPin *device_pin[2];
- DShowFilter *capture_filter[2];
- DShowPin *capture_pin[2];
+ libAVFilter *capture_filter[2];
+ libAVPin *capture_pin[2];
HANDLE mutex;
HANDLE event[2]; /* event[0] is set by DirectShow
@@ -346,9 +346,9 @@
/*****************************************************************************
* CrossBar
****************************************************************************/
-HRESULT ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
+HRESULT dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx);
-void ff_dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx);
+void dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx);
#endif /* AVDEVICE_DSHOW_CAPTURE_H */
diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c
index 2438683..95fb466 100644
--- a/libavdevice/dshow_crossbar.c
+++ b/libavdevice/dshow_crossbar.c
@@ -137,7 +137,7 @@
* Given a fully constructed graph, check if there is a cross bar filter, and configure its pins if so.
*/
HRESULT
-ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
+dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2,
IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx)
{
struct dshow_ctx *ctx = avctx->priv_data;
@@ -163,7 +163,7 @@
hr = IAMCrossbar_QueryInterface(cross_bar, &IID_IBaseFilter, (void **) &cross_bar_base_filter);
if (hr != S_OK)
goto end;
- ff_dshow_show_filter_properties(cross_bar_base_filter, avctx);
+ dshow_show_filter_properties(cross_bar_base_filter, avctx);
}
if (devtype == VideoDevice && ctx->show_analog_tv_tuner_dialog) {
@@ -173,7 +173,7 @@
hr = IAMCrossbar_QueryInterface(tv_tuner_filter, &IID_IBaseFilter, (void **) &tv_tuner_base_filter);
if (hr != S_OK)
goto end;
- ff_dshow_show_filter_properties(tv_tuner_base_filter, avctx);
+ dshow_show_filter_properties(tv_tuner_base_filter, avctx);
} else {
av_log(avctx, AV_LOG_WARNING, "unable to find a tv tuner to display dialog for!");
}
@@ -185,7 +185,7 @@
hr = IAMCrossbar_QueryInterface(tv_audio_filter, &IID_IBaseFilter, (void **) &tv_audio_base_filter);
if (hr != S_OK)
goto end;
- ff_dshow_show_filter_properties(tv_audio_base_filter, avctx);
+ dshow_show_filter_properties(tv_audio_base_filter, avctx);
} else {
av_log(avctx, AV_LOG_WARNING, "unable to find a tv audio tuner to display dialog for!");
}
diff --git a/libavdevice/dshow_enummediatypes.c b/libavdevice/dshow_enummediatypes.c
index 8294450..3a66a4d 100644
--- a/libavdevice/dshow_enummediatypes.c
+++ b/libavdevice/dshow_enummediatypes.c
@@ -21,16 +21,17 @@
#include "dshow_capture.h"
-DECLARE_QUERYINTERFACE(enummediatypes, DShowEnumMediaTypes,
+DECLARE_QUERYINTERFACE(libAVEnumMediaTypes,
{ {&IID_IUnknown,0}, {&IID_IEnumMediaTypes,0} })
-DECLARE_ADDREF(enummediatypes, DShowEnumMediaTypes)
-DECLARE_RELEASE(enummediatypes, DShowEnumMediaTypes)
+DECLARE_ADDREF(libAVEnumMediaTypes)
+DECLARE_RELEASE(libAVEnumMediaTypes)
-long ff_dshow_enummediatypes_Next(DShowEnumMediaTypes *this, unsigned long n,
+long WINAPI
+libAVEnumMediaTypes_Next(libAVEnumMediaTypes *this, unsigned long n,
AM_MEDIA_TYPE **types, unsigned long *fetched)
{
int count = 0;
- dshowdebug("ff_dshow_enummediatypes_Next(%p)\n", this);
+ dshowdebug("libAVEnumMediaTypes_Next(%p)\n", this);
if (!types)
return E_POINTER;
if (!this->pos && n == 1) {
@@ -50,26 +51,29 @@
return S_FALSE;
return S_OK;
}
-long ff_dshow_enummediatypes_Skip(DShowEnumMediaTypes *this, unsigned long n)
+long WINAPI
+libAVEnumMediaTypes_Skip(libAVEnumMediaTypes *this, unsigned long n)
{
- dshowdebug("ff_dshow_enummediatypes_Skip(%p)\n", this);
+ dshowdebug("libAVEnumMediaTypes_Skip(%p)\n", this);
if (n) /* Any skip will always fall outside of the only valid type. */
return S_FALSE;
return S_OK;
}
-long ff_dshow_enummediatypes_Reset(DShowEnumMediaTypes *this)
+long WINAPI
+libAVEnumMediaTypes_Reset(libAVEnumMediaTypes *this)
{
- dshowdebug("ff_dshow_enummediatypes_Reset(%p)\n", this);
+ dshowdebug("libAVEnumMediaTypes_Reset(%p)\n", this);
this->pos = 0;
return S_OK;
}
-long ff_dshow_enummediatypes_Clone(DShowEnumMediaTypes *this, DShowEnumMediaTypes **enums)
+long WINAPI
+libAVEnumMediaTypes_Clone(libAVEnumMediaTypes *this, libAVEnumMediaTypes **enums)
{
- DShowEnumMediaTypes *new;
- dshowdebug("ff_dshow_enummediatypes_Clone(%p)\n", this);
+ libAVEnumMediaTypes *new;
+ dshowdebug("libAVEnumMediaTypes_Clone(%p)\n", this);
if (!enums)
return E_POINTER;
- new = ff_dshow_enummediatypes_Create(&this->type);
+ new = libAVEnumMediaTypes_Create(&this->type);
if (!new)
return E_OUTOFMEMORY;
new->pos = this->pos;
@@ -77,16 +81,17 @@
return S_OK;
}
-static int ff_dshow_enummediatypes_Setup(DShowEnumMediaTypes *this, const AM_MEDIA_TYPE *type)
+static int
+libAVEnumMediaTypes_Setup(libAVEnumMediaTypes *this, const AM_MEDIA_TYPE *type)
{
IEnumMediaTypesVtbl *vtbl = this->vtbl;
- SETVTBL(vtbl, enummediatypes, QueryInterface);
- SETVTBL(vtbl, enummediatypes, AddRef);
- SETVTBL(vtbl, enummediatypes, Release);
- SETVTBL(vtbl, enummediatypes, Next);
- SETVTBL(vtbl, enummediatypes, Skip);
- SETVTBL(vtbl, enummediatypes, Reset);
- SETVTBL(vtbl, enummediatypes, Clone);
+ SETVTBL(vtbl, libAVEnumMediaTypes, QueryInterface);
+ SETVTBL(vtbl, libAVEnumMediaTypes, AddRef);
+ SETVTBL(vtbl, libAVEnumMediaTypes, Release);
+ SETVTBL(vtbl, libAVEnumMediaTypes, Next);
+ SETVTBL(vtbl, libAVEnumMediaTypes, Skip);
+ SETVTBL(vtbl, libAVEnumMediaTypes, Reset);
+ SETVTBL(vtbl, libAVEnumMediaTypes, Clone);
if (!type) {
this->type.majortype = GUID_NULL;
@@ -96,5 +101,5 @@
return 1;
}
-DECLARE_CREATE(enummediatypes, DShowEnumMediaTypes, ff_dshow_enummediatypes_Setup(this, type), const AM_MEDIA_TYPE *type)
-DECLARE_DESTROY(enummediatypes, DShowEnumMediaTypes, nothing)
+DECLARE_CREATE(libAVEnumMediaTypes, libAVEnumMediaTypes_Setup(this, type), const AM_MEDIA_TYPE *type)
+DECLARE_DESTROY(libAVEnumMediaTypes, nothing)
diff --git a/libavdevice/dshow_enumpins.c b/libavdevice/dshow_enumpins.c
index 6bf5992..e5c11cb 100644
--- a/libavdevice/dshow_enumpins.c
+++ b/libavdevice/dshow_enumpins.c
@@ -21,20 +21,21 @@
#include "dshow_capture.h"
-DECLARE_QUERYINTERFACE(enumpins, DShowEnumPins,
+DECLARE_QUERYINTERFACE(libAVEnumPins,
{ {&IID_IUnknown,0}, {&IID_IEnumPins,0} })
-DECLARE_ADDREF(enumpins, DShowEnumPins)
-DECLARE_RELEASE(enumpins, DShowEnumPins)
+DECLARE_ADDREF(libAVEnumPins)
+DECLARE_RELEASE(libAVEnumPins)
-long ff_dshow_enumpins_Next(DShowEnumPins *this, unsigned long n, IPin **pins,
+long WINAPI
+libAVEnumPins_Next(libAVEnumPins *this, unsigned long n, IPin **pins,
unsigned long *fetched)
{
int count = 0;
- dshowdebug("ff_dshow_enumpins_Next(%p)\n", this);
+ dshowdebug("libAVEnumPins_Next(%p)\n", this);
if (!pins)
return E_POINTER;
if (!this->pos && n == 1) {
- ff_dshow_pin_AddRef(this->pin);
+ libAVPin_AddRef(this->pin);
*pins = (IPin *) this->pin;
count = 1;
this->pos = 1;
@@ -45,26 +46,29 @@
return S_FALSE;
return S_OK;
}
-long ff_dshow_enumpins_Skip(DShowEnumPins *this, unsigned long n)
+long WINAPI
+libAVEnumPins_Skip(libAVEnumPins *this, unsigned long n)
{
- dshowdebug("ff_dshow_enumpins_Skip(%p)\n", this);
+ dshowdebug("libAVEnumPins_Skip(%p)\n", this);
if (n) /* Any skip will always fall outside of the only valid pin. */
return S_FALSE;
return S_OK;
}
-long ff_dshow_enumpins_Reset(DShowEnumPins *this)
+long WINAPI
+libAVEnumPins_Reset(libAVEnumPins *this)
{
- dshowdebug("ff_dshow_enumpins_Reset(%p)\n", this);
+ dshowdebug("libAVEnumPins_Reset(%p)\n", this);
this->pos = 0;
return S_OK;
}
-long ff_dshow_enumpins_Clone(DShowEnumPins *this, DShowEnumPins **pins)
+long WINAPI
+libAVEnumPins_Clone(libAVEnumPins *this, libAVEnumPins **pins)
{
- DShowEnumPins *new;
- dshowdebug("ff_dshow_enumpins_Clone(%p)\n", this);
+ libAVEnumPins *new;
+ dshowdebug("libAVEnumPins_Clone(%p)\n", this);
if (!pins)
return E_POINTER;
- new = ff_dshow_enumpins_Create(this->pin, this->filter);
+ new = libAVEnumPins_Create(this->pin, this->filter);
if (!new)
return E_OUTOFMEMORY;
new->pos = this->pos;
@@ -72,28 +76,30 @@
return S_OK;
}
-static int ff_dshow_enumpins_Setup(DShowEnumPins *this, DShowPin *pin, DShowFilter *filter)
+static int
+libAVEnumPins_Setup(libAVEnumPins *this, libAVPin *pin, libAVFilter *filter)
{
IEnumPinsVtbl *vtbl = this->vtbl;
- SETVTBL(vtbl, enumpins, QueryInterface);
- SETVTBL(vtbl, enumpins, AddRef);
- SETVTBL(vtbl, enumpins, Release);
- SETVTBL(vtbl, enumpins, Next);
- SETVTBL(vtbl, enumpins, Skip);
- SETVTBL(vtbl, enumpins, Reset);
- SETVTBL(vtbl, enumpins, Clone);
+ SETVTBL(vtbl, libAVEnumPins, QueryInterface);
+ SETVTBL(vtbl, libAVEnumPins, AddRef);
+ SETVTBL(vtbl, libAVEnumPins, Release);
+ SETVTBL(vtbl, libAVEnumPins, Next);
+ SETVTBL(vtbl, libAVEnumPins, Skip);
+ SETVTBL(vtbl, libAVEnumPins, Reset);
+ SETVTBL(vtbl, libAVEnumPins, Clone);
this->pin = pin;
this->filter = filter;
- ff_dshow_filter_AddRef(this->filter);
+ libAVFilter_AddRef(this->filter);
return 1;
}
-static int ff_dshow_enumpins_Cleanup(DShowEnumPins *this)
+static int
+libAVEnumPins_Cleanup(libAVEnumPins *this)
{
- ff_dshow_filter_Release(this->filter);
+ libAVFilter_Release(this->filter);
return 1;
}
-DECLARE_CREATE(enumpins, DShowEnumPins, ff_dshow_enumpins_Setup(this, pin, filter),
- DShowPin *pin, DShowFilter *filter)
-DECLARE_DESTROY(enumpins, DShowEnumPins, ff_dshow_enumpins_Cleanup)
+DECLARE_CREATE(libAVEnumPins, libAVEnumPins_Setup(this, pin, filter),
+ libAVPin *pin, libAVFilter *filter)
+DECLARE_DESTROY(libAVEnumPins, libAVEnumPins_Cleanup)
diff --git a/libavdevice/dshow_filter.c b/libavdevice/dshow_filter.c
index 61e057a..db4bff6 100644
--- a/libavdevice/dshow_filter.c
+++ b/libavdevice/dshow_filter.c
@@ -21,47 +21,53 @@
#include "dshow_capture.h"
-DECLARE_QUERYINTERFACE(filter, DShowFilter,
+DECLARE_QUERYINTERFACE(libAVFilter,
{ {&IID_IUnknown,0}, {&IID_IBaseFilter,0} })
-DECLARE_ADDREF(filter, DShowFilter)
-DECLARE_RELEASE(filter, DShowFilter)
+DECLARE_ADDREF(libAVFilter)
+DECLARE_RELEASE(libAVFilter)
-long ff_dshow_filter_GetClassID(DShowFilter *this, CLSID *id)
+long WINAPI
+libAVFilter_GetClassID(libAVFilter *this, CLSID *id)
{
- dshowdebug("ff_dshow_filter_GetClassID(%p)\n", this);
+ dshowdebug("libAVFilter_GetClassID(%p)\n", this);
/* I'm not creating a ClassID just for this. */
return E_FAIL;
}
-long ff_dshow_filter_Stop(DShowFilter *this)
+long WINAPI
+libAVFilter_Stop(libAVFilter *this)
{
- dshowdebug("ff_dshow_filter_Stop(%p)\n", this);
+ dshowdebug("libAVFilter_Stop(%p)\n", this);
this->state = State_Stopped;
return S_OK;
}
-long ff_dshow_filter_Pause(DShowFilter *this)
+long WINAPI
+libAVFilter_Pause(libAVFilter *this)
{
- dshowdebug("ff_dshow_filter_Pause(%p)\n", this);
+ dshowdebug("libAVFilter_Pause(%p)\n", this);
this->state = State_Paused;
return S_OK;
}
-long ff_dshow_filter_Run(DShowFilter *this, REFERENCE_TIME start)
+long WINAPI
+libAVFilter_Run(libAVFilter *this, REFERENCE_TIME start)
{
- dshowdebug("ff_dshow_filter_Run(%p) %"PRId64"\n", this, start);
+ dshowdebug("libAVFilter_Run(%p) %"PRId64"\n", this, start);
this->state = State_Running;
this->start_time = start;
return S_OK;
}
-long ff_dshow_filter_GetState(DShowFilter *this, DWORD ms, FILTER_STATE *state)
+long WINAPI
+libAVFilter_GetState(libAVFilter *this, DWORD ms, FILTER_STATE *state)
{
- dshowdebug("ff_dshow_filter_GetState(%p)\n", this);
+ dshowdebug("libAVFilter_GetState(%p)\n", this);
if (!state)
return E_POINTER;
*state = this->state;
return S_OK;
}
-long ff_dshow_filter_SetSyncSource(DShowFilter *this, IReferenceClock *clock)
+long WINAPI
+libAVFilter_SetSyncSource(libAVFilter *this, IReferenceClock *clock)
{
- dshowdebug("ff_dshow_filter_SetSyncSource(%p)\n", this);
+ dshowdebug("libAVFilter_SetSyncSource(%p)\n", this);
if (this->clock != clock) {
if (this->clock)
@@ -73,9 +79,10 @@
return S_OK;
}
-long ff_dshow_filter_GetSyncSource(DShowFilter *this, IReferenceClock **clock)
+long WINAPI
+libAVFilter_GetSyncSource(libAVFilter *this, IReferenceClock **clock)
{
- dshowdebug("ff_dshow_filter_GetSyncSource(%p)\n", this);
+ dshowdebug("libAVFilter_GetSyncSource(%p)\n", this);
if (!clock)
return E_POINTER;
@@ -85,30 +92,32 @@
return S_OK;
}
-long ff_dshow_filter_EnumPins(DShowFilter *this, IEnumPins **enumpin)
+long WINAPI
+libAVFilter_EnumPins(libAVFilter *this, IEnumPins **enumpin)
{
- DShowEnumPins *new;
- dshowdebug("ff_dshow_filter_EnumPins(%p)\n", this);
+ libAVEnumPins *new;
+ dshowdebug("libAVFilter_EnumPins(%p)\n", this);
if (!enumpin)
return E_POINTER;
- new = ff_dshow_enumpins_Create(this->pin, this);
+ new = libAVEnumPins_Create(this->pin, this);
if (!new)
return E_OUTOFMEMORY;
*enumpin = (IEnumPins *) new;
return S_OK;
}
-long ff_dshow_filter_FindPin(DShowFilter *this, const wchar_t *id, IPin **pin)
+long WINAPI
+libAVFilter_FindPin(libAVFilter *this, const wchar_t *id, IPin **pin)
{
- DShowPin *found = NULL;
- dshowdebug("ff_dshow_filter_FindPin(%p)\n", this);
+ libAVPin *found = NULL;
+ dshowdebug("libAVFilter_FindPin(%p)\n", this);
if (!id || !pin)
return E_POINTER;
if (!wcscmp(id, L"In")) {
found = this->pin;
- ff_dshow_pin_AddRef(found);
+ libAVPin_AddRef(found);
}
*pin = (IPin *) found;
if (!found)
@@ -116,9 +125,10 @@
return S_OK;
}
-long ff_dshow_filter_QueryFilterInfo(DShowFilter *this, FILTER_INFO *info)
+long WINAPI
+libAVFilter_QueryFilterInfo(libAVFilter *this, FILTER_INFO *info)
{
- dshowdebug("ff_dshow_filter_QueryFilterInfo(%p)\n", this);
+ dshowdebug("libAVFilter_QueryFilterInfo(%p)\n", this);
if (!info)
return E_POINTER;
@@ -128,10 +138,11 @@
return S_OK;
}
-long ff_dshow_filter_JoinFilterGraph(DShowFilter *this, IFilterGraph *graph,
+long WINAPI
+libAVFilter_JoinFilterGraph(libAVFilter *this, IFilterGraph *graph,
const wchar_t *name)
{
- dshowdebug("ff_dshow_filter_JoinFilterGraph(%p)\n", this);
+ dshowdebug("libAVFilter_JoinFilterGraph(%p)\n", this);
this->info.pGraph = graph;
if (name)
@@ -139,9 +150,10 @@
return S_OK;
}
-long ff_dshow_filter_QueryVendorInfo(DShowFilter *this, wchar_t **info)
+long WINAPI
+libAVFilter_QueryVendorInfo(libAVFilter *this, wchar_t **info)
{
- dshowdebug("ff_dshow_filter_QueryVendorInfo(%p)\n", this);
+ dshowdebug("libAVFilter_QueryVendorInfo(%p)\n", this);
if (!info)
return E_POINTER;
@@ -149,27 +161,27 @@
}
static int
-ff_dshow_filter_Setup(DShowFilter *this, void *priv_data, void *callback,
+libAVFilter_Setup(libAVFilter *this, void *priv_data, void *callback,
enum dshowDeviceType type)
{
IBaseFilterVtbl *vtbl = this->vtbl;
- SETVTBL(vtbl, filter, QueryInterface);
- SETVTBL(vtbl, filter, AddRef);
- SETVTBL(vtbl, filter, Release);
- SETVTBL(vtbl, filter, GetClassID);
- SETVTBL(vtbl, filter, Stop);
- SETVTBL(vtbl, filter, Pause);
- SETVTBL(vtbl, filter, Run);
- SETVTBL(vtbl, filter, GetState);
- SETVTBL(vtbl, filter, SetSyncSource);
- SETVTBL(vtbl, filter, GetSyncSource);
- SETVTBL(vtbl, filter, EnumPins);
- SETVTBL(vtbl, filter, FindPin);
- SETVTBL(vtbl, filter, QueryFilterInfo);
- SETVTBL(vtbl, filter, JoinFilterGraph);
- SETVTBL(vtbl, filter, QueryVendorInfo);
+ SETVTBL(vtbl, libAVFilter, QueryInterface);
+ SETVTBL(vtbl, libAVFilter, AddRef);
+ SETVTBL(vtbl, libAVFilter, Release);
+ SETVTBL(vtbl, libAVFilter, GetClassID);
+ SETVTBL(vtbl, libAVFilter, Stop);
+ SETVTBL(vtbl, libAVFilter, Pause);
+ SETVTBL(vtbl, libAVFilter, Run);
+ SETVTBL(vtbl, libAVFilter, GetState);
+ SETVTBL(vtbl, libAVFilter, SetSyncSource);
+ SETVTBL(vtbl, libAVFilter, GetSyncSource);
+ SETVTBL(vtbl, libAVFilter, EnumPins);
+ SETVTBL(vtbl, libAVFilter, FindPin);
+ SETVTBL(vtbl, libAVFilter, QueryFilterInfo);
+ SETVTBL(vtbl, libAVFilter, JoinFilterGraph);
+ SETVTBL(vtbl, libAVFilter, QueryVendorInfo);
- this->pin = ff_dshow_pin_Create(this);
+ this->pin = libAVPin_Create(this);
this->priv_data = priv_data;
this->callback = callback;
@@ -177,11 +189,12 @@
return 1;
}
-static int ff_dshow_filter_Cleanup(DShowFilter *this)
+static int
+libAVFilter_Cleanup(libAVFilter *this)
{
- ff_dshow_pin_Release(this->pin);
+ libAVPin_Release(this->pin);
return 1;
}
-DECLARE_CREATE(filter, DShowFilter, ff_dshow_filter_Setup(this, priv_data, callback, type),
+DECLARE_CREATE(libAVFilter, libAVFilter_Setup(this, priv_data, callback, type),
void *priv_data, void *callback, enum dshowDeviceType type)
-DECLARE_DESTROY(filter, DShowFilter, ff_dshow_filter_Cleanup)
+DECLARE_DESTROY(libAVFilter, libAVFilter_Cleanup)
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 3dae405..53b1c91 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -22,24 +22,26 @@
#include "dshow_capture.h"
#include <stddef.h>
-#define imemoffset offsetof(DShowPin, imemvtbl)
+#define imemoffset offsetof(libAVPin, imemvtbl)
-DECLARE_QUERYINTERFACE(pin, DShowPin,
+DECLARE_QUERYINTERFACE(libAVPin,
{ {&IID_IUnknown,0}, {&IID_IPin,0}, {&IID_IMemInputPin,imemoffset} })
-DECLARE_ADDREF(pin, DShowPin)
-DECLARE_RELEASE(pin, DShowPin)
+DECLARE_ADDREF(libAVPin)
+DECLARE_RELEASE(libAVPin)
-long ff_dshow_pin_Connect(DShowPin *this, IPin *pin, const AM_MEDIA_TYPE *type)
+long WINAPI
+libAVPin_Connect(libAVPin *this, IPin *pin, const AM_MEDIA_TYPE *type)
{
- dshowdebug("ff_dshow_pin_Connect(%p, %p, %p)\n", this, pin, type);
+ dshowdebug("libAVPin_Connect(%p, %p, %p)\n", this, pin, type);
/* Input pins receive connections. */
return S_FALSE;
}
-long ff_dshow_pin_ReceiveConnection(DShowPin *this, IPin *pin,
+long WINAPI
+libAVPin_ReceiveConnection(libAVPin *this, IPin *pin,
const AM_MEDIA_TYPE *type)
{
enum dshowDeviceType devtype = this->filter->type;
- dshowdebug("ff_dshow_pin_ReceiveConnection(%p)\n", this);
+ dshowdebug("libAVPin_ReceiveConnection(%p)\n", this);
if (!pin)
return E_POINTER;
@@ -62,9 +64,10 @@
return S_OK;
}
-long ff_dshow_pin_Disconnect(DShowPin *this)
+long WINAPI
+libAVPin_Disconnect(libAVPin *this)
{
- dshowdebug("ff_dshow_pin_Disconnect(%p)\n", this);
+ dshowdebug("libAVPin_Disconnect(%p)\n", this);
if (this->filter->state != State_Stopped)
return VFW_E_NOT_STOPPED;
@@ -75,9 +78,10 @@
return S_OK;
}
-long ff_dshow_pin_ConnectedTo(DShowPin *this, IPin **pin)
+long WINAPI
+libAVPin_ConnectedTo(libAVPin *this, IPin **pin)
{
- dshowdebug("ff_dshow_pin_ConnectedTo(%p)\n", this);
+ dshowdebug("libAVPin_ConnectedTo(%p)\n", this);
if (!pin)
return E_POINTER;
@@ -88,9 +92,10 @@
return S_OK;
}
-long ff_dshow_pin_ConnectionMediaType(DShowPin *this, AM_MEDIA_TYPE *type)
+long WINAPI
+libAVPin_ConnectionMediaType(libAVPin *this, AM_MEDIA_TYPE *type)
{
- dshowdebug("ff_dshow_pin_ConnectionMediaType(%p)\n", this);
+ dshowdebug("libAVPin_ConnectionMediaType(%p)\n", this);
if (!type)
return E_POINTER;
@@ -99,15 +104,16 @@
return ff_copy_dshow_media_type(type, &this->type);
}
-long ff_dshow_pin_QueryPinInfo(DShowPin *this, PIN_INFO *info)
+long WINAPI
+libAVPin_QueryPinInfo(libAVPin *this, PIN_INFO *info)
{
- dshowdebug("ff_dshow_pin_QueryPinInfo(%p)\n", this);
+ dshowdebug("libAVPin_QueryPinInfo(%p)\n", this);
if (!info)
return E_POINTER;
if (this->filter)
- ff_dshow_filter_AddRef(this->filter);
+ libAVFilter_AddRef(this->filter);
info->pFilter = (IBaseFilter *) this->filter;
info->dir = PINDIR_INPUT;
@@ -115,17 +121,19 @@
return S_OK;
}
-long ff_dshow_pin_QueryDirection(DShowPin *this, PIN_DIRECTION *dir)
+long WINAPI
+libAVPin_QueryDirection(libAVPin *this, PIN_DIRECTION *dir)
{
- dshowdebug("ff_dshow_pin_QueryDirection(%p)\n", this);
+ dshowdebug("libAVPin_QueryDirection(%p)\n", this);
if (!dir)
return E_POINTER;
*dir = PINDIR_INPUT;
return S_OK;
}
-long ff_dshow_pin_QueryId(DShowPin *this, wchar_t **id)
+long WINAPI
+libAVPin_QueryId(libAVPin *this, wchar_t **id)
{
- dshowdebug("ff_dshow_pin_QueryId(%p)\n", this);
+ dshowdebug("libAVPin_QueryId(%p)\n", this);
if (!id)
return E_POINTER;
@@ -134,59 +142,67 @@
return S_OK;
}
-long ff_dshow_pin_QueryAccept(DShowPin *this, const AM_MEDIA_TYPE *type)
+long WINAPI
+libAVPin_QueryAccept(libAVPin *this, const AM_MEDIA_TYPE *type)
{
- dshowdebug("ff_dshow_pin_QueryAccept(%p)\n", this);
+ dshowdebug("libAVPin_QueryAccept(%p)\n", this);
return S_FALSE;
}
-long ff_dshow_pin_EnumMediaTypes(DShowPin *this, IEnumMediaTypes **enumtypes)
+long WINAPI
+libAVPin_EnumMediaTypes(libAVPin *this, IEnumMediaTypes **enumtypes)
{
const AM_MEDIA_TYPE *type = NULL;
- DShowEnumMediaTypes *new;
- dshowdebug("ff_dshow_pin_EnumMediaTypes(%p)\n", this);
+ libAVEnumMediaTypes *new;
+ dshowdebug("libAVPin_EnumMediaTypes(%p)\n", this);
if (!enumtypes)
return E_POINTER;
- new = ff_dshow_enummediatypes_Create(type);
+ new = libAVEnumMediaTypes_Create(type);
if (!new)
return E_OUTOFMEMORY;
*enumtypes = (IEnumMediaTypes *) new;
return S_OK;
}
-long ff_dshow_pin_QueryInternalConnections(DShowPin *this, IPin **pin,
+long WINAPI
+libAVPin_QueryInternalConnections(libAVPin *this, IPin **pin,
unsigned long *npin)
{
- dshowdebug("ff_dshow_pin_QueryInternalConnections(%p)\n", this);
+ dshowdebug("libAVPin_QueryInternalConnections(%p)\n", this);
return E_NOTIMPL;
}
-long ff_dshow_pin_EndOfStream(DShowPin *this)
+long WINAPI
+libAVPin_EndOfStream(libAVPin *this)
{
- dshowdebug("ff_dshow_pin_EndOfStream(%p)\n", this);
+ dshowdebug("libAVPin_EndOfStream(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_BeginFlush(DShowPin *this)
+long WINAPI
+libAVPin_BeginFlush(libAVPin *this)
{
- dshowdebug("ff_dshow_pin_BeginFlush(%p)\n", this);
+ dshowdebug("libAVPin_BeginFlush(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_EndFlush(DShowPin *this)
+long WINAPI
+libAVPin_EndFlush(libAVPin *this)
{
- dshowdebug("ff_dshow_pin_EndFlush(%p)\n", this);
+ dshowdebug("libAVPin_EndFlush(%p)\n", this);
/* I don't care. */
return S_OK;
}
-long ff_dshow_pin_NewSegment(DShowPin *this, REFERENCE_TIME start, REFERENCE_TIME stop,
+long WINAPI
+libAVPin_NewSegment(libAVPin *this, REFERENCE_TIME start, REFERENCE_TIME stop,
double rate)
{
- dshowdebug("ff_dshow_pin_NewSegment(%p)\n", this);
+ dshowdebug("libAVPin_NewSegment(%p)\n", this);
/* I don't care. */
return S_OK;
}
-static int ff_dshow_pin_Setup(DShowPin *this, DShowFilter *filter)
+static int
+libAVPin_Setup(libAVPin *this, libAVFilter *filter)
{
IPinVtbl *vtbl = this->vtbl;
IMemInputPinVtbl *imemvtbl;
@@ -198,43 +214,44 @@
if (!imemvtbl)
return 0;
- SETVTBL(imemvtbl, meminputpin, QueryInterface);
- SETVTBL(imemvtbl, meminputpin, AddRef);
- SETVTBL(imemvtbl, meminputpin, Release);
- SETVTBL(imemvtbl, meminputpin, GetAllocator);
- SETVTBL(imemvtbl, meminputpin, NotifyAllocator);
- SETVTBL(imemvtbl, meminputpin, GetAllocatorRequirements);
- SETVTBL(imemvtbl, meminputpin, Receive);
- SETVTBL(imemvtbl, meminputpin, ReceiveMultiple);
- SETVTBL(imemvtbl, meminputpin, ReceiveCanBlock);
+ SETVTBL(imemvtbl, libAVMemInputPin, QueryInterface);
+ SETVTBL(imemvtbl, libAVMemInputPin, AddRef);
+ SETVTBL(imemvtbl, libAVMemInputPin, Release);
+ SETVTBL(imemvtbl, libAVMemInputPin, GetAllocator);
+ SETVTBL(imemvtbl, libAVMemInputPin, NotifyAllocator);
+ SETVTBL(imemvtbl, libAVMemInputPin, GetAllocatorRequirements);
+ SETVTBL(imemvtbl, libAVMemInputPin, Receive);
+ SETVTBL(imemvtbl, libAVMemInputPin, ReceiveMultiple);
+ SETVTBL(imemvtbl, libAVMemInputPin, ReceiveCanBlock);
this->imemvtbl = imemvtbl;
- SETVTBL(vtbl, pin, QueryInterface);
- SETVTBL(vtbl, pin, AddRef);
- SETVTBL(vtbl, pin, Release);
- SETVTBL(vtbl, pin, Connect);
- SETVTBL(vtbl, pin, ReceiveConnection);
- SETVTBL(vtbl, pin, Disconnect);
- SETVTBL(vtbl, pin, ConnectedTo);
- SETVTBL(vtbl, pin, ConnectionMediaType);
- SETVTBL(vtbl, pin, QueryPinInfo);
- SETVTBL(vtbl, pin, QueryDirection);
- SETVTBL(vtbl, pin, QueryId);
- SETVTBL(vtbl, pin, QueryAccept);
- SETVTBL(vtbl, pin, EnumMediaTypes);
- SETVTBL(vtbl, pin, QueryInternalConnections);
- SETVTBL(vtbl, pin, EndOfStream);
- SETVTBL(vtbl, pin, BeginFlush);
- SETVTBL(vtbl, pin, EndFlush);
- SETVTBL(vtbl, pin, NewSegment);
+ SETVTBL(vtbl, libAVPin, QueryInterface);
+ SETVTBL(vtbl, libAVPin, AddRef);
+ SETVTBL(vtbl, libAVPin, Release);
+ SETVTBL(vtbl, libAVPin, Connect);
+ SETVTBL(vtbl, libAVPin, ReceiveConnection);
+ SETVTBL(vtbl, libAVPin, Disconnect);
+ SETVTBL(vtbl, libAVPin, ConnectedTo);
+ SETVTBL(vtbl, libAVPin, ConnectionMediaType);
+ SETVTBL(vtbl, libAVPin, QueryPinInfo);
+ SETVTBL(vtbl, libAVPin, QueryDirection);
+ SETVTBL(vtbl, libAVPin, QueryId);
+ SETVTBL(vtbl, libAVPin, QueryAccept);
+ SETVTBL(vtbl, libAVPin, EnumMediaTypes);
+ SETVTBL(vtbl, libAVPin, QueryInternalConnections);
+ SETVTBL(vtbl, libAVPin, EndOfStream);
+ SETVTBL(vtbl, libAVPin, BeginFlush);
+ SETVTBL(vtbl, libAVPin, EndFlush);
+ SETVTBL(vtbl, libAVPin, NewSegment);
this->filter = filter;
return 1;
}
-static void ff_dshow_pin_Free(DShowPin *this)
+static void
+libAVPin_Free(libAVPin *this)
{
if (!this)
return;
@@ -244,51 +261,58 @@
this->type.pbFormat = NULL;
}
}
-DECLARE_CREATE(pin, DShowPin, ff_dshow_pin_Setup(this, filter), DShowFilter *filter)
-DECLARE_DESTROY(pin, DShowPin, ff_dshow_pin_Free)
+DECLARE_CREATE(libAVPin, libAVPin_Setup(this, filter), libAVFilter *filter)
+DECLARE_DESTROY(libAVPin, libAVPin_Free)
/*****************************************************************************
- * DShowMemInputPin
+ * libAVMemInputPin
****************************************************************************/
-long ff_dshow_meminputpin_QueryInterface(DShowMemInputPin *this, const GUID *riid,
+long WINAPI
+libAVMemInputPin_QueryInterface(libAVMemInputPin *this, const GUID *riid,
void **ppvObject)
{
- DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
- dshowdebug("ff_dshow_meminputpin_QueryInterface(%p)\n", this);
- return ff_dshow_pin_QueryInterface(pin, riid, ppvObject);
+ libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
+ dshowdebug("libAVMemInputPin_QueryInterface(%p)\n", this);
+ return libAVPin_QueryInterface(pin, riid, ppvObject);
}
-unsigned long ff_dshow_meminputpin_AddRef(DShowMemInputPin *this)
+unsigned long WINAPI
+libAVMemInputPin_AddRef(libAVMemInputPin *this)
{
- DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
- dshowdebug("ff_dshow_meminputpin_AddRef(%p)\n", this);
- return ff_dshow_pin_AddRef(pin);
+ libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
+ dshowdebug("libAVMemInputPin_AddRef(%p)\n", this);
+ return libAVPin_AddRef(pin);
}
-unsigned long ff_dshow_meminputpin_Release(DShowMemInputPin *this)
+unsigned long WINAPI
+libAVMemInputPin_Release(libAVMemInputPin *this)
{
- DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
- dshowdebug("ff_dshow_meminputpin_Release(%p)\n", this);
- return ff_dshow_pin_Release(pin);
+ libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
+ dshowdebug("libAVMemInputPin_Release(%p)\n", this);
+ return libAVPin_Release(pin);
}
-long ff_dshow_meminputpin_GetAllocator(DShowMemInputPin *this, IMemAllocator **alloc)
+long WINAPI
+libAVMemInputPin_GetAllocator(libAVMemInputPin *this, IMemAllocator **alloc)
{
- dshowdebug("ff_dshow_meminputpin_GetAllocator(%p)\n", this);
+ dshowdebug("libAVMemInputPin_GetAllocator(%p)\n", this);
return VFW_E_NO_ALLOCATOR;
}
-long ff_dshow_meminputpin_NotifyAllocator(DShowMemInputPin *this, IMemAllocator *alloc,
+long WINAPI
+libAVMemInputPin_NotifyAllocator(libAVMemInputPin *this, IMemAllocator *alloc,
BOOL rdwr)
{
- dshowdebug("ff_dshow_meminputpin_NotifyAllocator(%p)\n", this);
+ dshowdebug("libAVMemInputPin_NotifyAllocator(%p)\n", this);
return S_OK;
}
-long ff_dshow_meminputpin_GetAllocatorRequirements(DShowMemInputPin *this,
+long WINAPI
+libAVMemInputPin_GetAllocatorRequirements(libAVMemInputPin *this,
ALLOCATOR_PROPERTIES *props)
{
- dshowdebug("ff_dshow_meminputpin_GetAllocatorRequirements(%p)\n", this);
+ dshowdebug("libAVMemInputPin_GetAllocatorRequirements(%p)\n", this);
return E_NOTIMPL;
}
-long ff_dshow_meminputpin_Receive(DShowMemInputPin *this, IMediaSample *sample)
+long WINAPI
+libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
{
- DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
+ libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
enum dshowDeviceType devtype = pin->filter->type;
void *priv_data;
AVFormatContext *s;
@@ -304,7 +328,7 @@
struct dshow_ctx *ctx;
- dshowdebug("ff_dshow_meminputpin_Receive(%p)\n", this);
+ dshowdebug("libAVMemInputPin_Receive(%p)\n", this);
if (!sample)
return E_POINTER;
@@ -342,28 +366,31 @@
return S_OK;
}
-long ff_dshow_meminputpin_ReceiveMultiple(DShowMemInputPin *this,
+long WINAPI
+libAVMemInputPin_ReceiveMultiple(libAVMemInputPin *this,
IMediaSample **samples, long n, long *nproc)
{
int i;
- dshowdebug("ff_dshow_meminputpin_ReceiveMultiple(%p)\n", this);
+ dshowdebug("libAVMemInputPin_ReceiveMultiple(%p)\n", this);
for (i = 0; i < n; i++)
- ff_dshow_meminputpin_Receive(this, samples[i]);
+ libAVMemInputPin_Receive(this, samples[i]);
*nproc = n;
return S_OK;
}
-long ff_dshow_meminputpin_ReceiveCanBlock(DShowMemInputPin *this)
+long WINAPI
+libAVMemInputPin_ReceiveCanBlock(libAVMemInputPin *this)
{
- dshowdebug("ff_dshow_meminputpin_ReceiveCanBlock(%p)\n", this);
+ dshowdebug("libAVMemInputPin_ReceiveCanBlock(%p)\n", this);
/* I swear I will not block. */
return S_FALSE;
}
-void ff_dshow_meminputpin_Destroy(DShowMemInputPin *this)
+void
+libAVMemInputPin_Destroy(libAVMemInputPin *this)
{
- DShowPin *pin = (DShowPin *) ((uint8_t *) this - imemoffset);
- dshowdebug("ff_dshow_meminputpin_Destroy(%p)\n", this);
- ff_dshow_pin_Destroy(pin);
+ libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
+ dshowdebug("libAVMemInputPin_Destroy(%p)\n", this);
+ libAVPin_Destroy(pin);
}
diff --git a/libavdevice/fbdev_dec.c b/libavdevice/fbdev_dec.c
index 586caee..6a51816 100644
--- a/libavdevice/fbdev_dec.c
+++ b/libavdevice/fbdev_dec.c
@@ -157,11 +157,11 @@
uint8_t *pin, *pout;
if (fbdev->time_frame == AV_NOPTS_VALUE)
- fbdev->time_frame = av_gettime_relative();
+ fbdev->time_frame = av_gettime();
/* wait based on the frame rate */
while (1) {
- curtime = av_gettime_relative();
+ curtime = av_gettime();
delay = fbdev->time_frame - curtime;
av_log(avctx, AV_LOG_TRACE,
"time_frame:%"PRId64" curtime:%"PRId64" delay:%"PRId64"\n",
@@ -186,7 +186,7 @@
"Error refreshing variable info: %s\n", av_err2str(AVERROR(errno)));
}
- pkt->pts = av_gettime();
+ pkt->pts = curtime;
/* compute visible data offset */
pin = fbdev->data + fbdev->bytes_per_pixel * fbdev->varinfo.xoffset +
diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c
index 9b2c55f..f444440 100644
--- a/libavdevice/gdigrab.c
+++ b/libavdevice/gdigrab.c
@@ -394,7 +394,7 @@
gdigrab->header_size = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) +
(bpp <= 8 ? (1 << bpp) : 0) * sizeof(RGBQUAD) /* palette size */;
gdigrab->time_base = av_inv_q(gdigrab->framerate);
- gdigrab->time_frame = av_gettime_relative() / av_q2d(gdigrab->time_base);
+ gdigrab->time_frame = av_gettime() / av_q2d(gdigrab->time_base);
gdigrab->hwnd = hwnd;
gdigrab->source_hdc = source_hdc;
@@ -551,7 +551,7 @@
/* wait based on the frame rate */
for (;;) {
- curtime = av_gettime_relative();
+ curtime = av_gettime();
delay = time_frame * av_q2d(time_base) - curtime;
if (delay <= 0) {
if (delay < INT64_C(-1000000) * av_q2d(time_base)) {
@@ -568,7 +568,7 @@
if (av_new_packet(pkt, file_size) < 0)
return AVERROR(ENOMEM);
- pkt->pts = av_gettime();
+ pkt->pts = curtime;
/* Blit screen grab */
if (!BitBlt(dest_hdc, 0, 0,
diff --git a/libavdevice/kmsgrab.c b/libavdevice/kmsgrab.c
index 6cc305b..a0aa9dc 100644
--- a/libavdevice/kmsgrab.c
+++ b/libavdevice/kmsgrab.c
@@ -160,7 +160,6 @@
KMSGrabContext *ctx = avctx->priv_data;
drmModeFB2 *fb;
int err, i, nb_objects;
- uint64_t modifier = ctx->drm_format_modifier;
fb = drmModeGetFB2(ctx->hwctx->fd, plane->fb_id);
if (!fb) {
@@ -176,6 +175,13 @@
err = AVERROR(EIO);
goto fail;
}
+ if (fb->modifier != ctx->drm_format_modifier) {
+ av_log(avctx, AV_LOG_ERROR, "Plane %"PRIu32" framebuffer "
+ "format modifier changed: now %"PRIx64".\n",
+ ctx->plane_id, fb->modifier);
+ err = AVERROR(EIO);
+ goto fail;
+ }
if (fb->width != ctx->width || fb->height != ctx->height) {
av_log(avctx, AV_LOG_ERROR, "Plane %"PRIu32" framebuffer "
"dimensions changed: now %"PRIu32"x%"PRIu32".\n",
@@ -189,9 +195,6 @@
goto fail;
}
- if (fb->flags & DRM_MODE_FB_MODIFIERS)
- modifier = fb->modifier;
-
*desc = (AVDRMFrameDescriptor) {
.nb_layers = 1,
.layers[0] = {
@@ -240,7 +243,7 @@
desc->objects[obj] = (AVDRMObjectDescriptor) {
.fd = fd,
.size = size,
- .format_modifier = modifier,
+ .format_modifier = fb->modifier,
};
desc->layers[0].planes[i] = (AVDRMPlaneDescriptor) {
.object_index = obj,
@@ -268,7 +271,7 @@
int64_t now;
int err;
- now = av_gettime_relative();
+ now = av_gettime();
if (ctx->frame_last) {
int64_t delay;
while (1) {
@@ -276,11 +279,10 @@
if (delay <= 0)
break;
av_usleep(delay);
- now = av_gettime_relative();
+ now = av_gettime();
}
}
ctx->frame_last = now;
- now = av_gettime();
plane = drmModeGetPlane(ctx->hwctx->fd, ctx->plane_id);
if (!plane) {
@@ -555,18 +557,15 @@
err = AVERROR(EINVAL);
goto fail;
}
-
- if (fb2->flags & DRM_MODE_FB_MODIFIERS) {
- if (ctx->drm_format_modifier != DRM_FORMAT_MOD_INVALID &&
- ctx->drm_format_modifier != fb2->modifier) {
- av_log(avctx, AV_LOG_ERROR, "Framebuffer format modifier "
- "%"PRIx64" does not match expected modifier.\n",
- fb2->modifier);
- err = AVERROR(EINVAL);
- goto fail;
- } else {
- ctx->drm_format_modifier = fb2->modifier;
- }
+ if (ctx->drm_format_modifier != DRM_FORMAT_MOD_INVALID &&
+ ctx->drm_format_modifier != fb2->modifier) {
+ av_log(avctx, AV_LOG_ERROR, "Framebuffer format modifier "
+ "%"PRIx64" does not match expected modifier.\n",
+ fb2->modifier);
+ err = AVERROR(EINVAL);
+ goto fail;
+ } else {
+ ctx->drm_format_modifier = fb2->modifier;
}
av_log(avctx, AV_LOG_VERBOSE, "Format is %s, from "
"DRM format %"PRIx32" modifier %"PRIx64".\n",
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 94ad032..ff0be64 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -440,7 +440,7 @@
size = frame->nb_samples * av_get_bytes_per_sample(frame->format) *
frame->channels;
if ((ret = av_new_packet(pkt, size)) < 0)
- goto fail;
+ goto fail;;
memcpy(pkt->data, frame->data[0], size);
}
@@ -456,7 +456,7 @@
if ((ret = av_packet_add_side_data(pkt, AV_PKT_DATA_STRINGS_METADATA,
metadata, size)) < 0) {
av_freep(&metadata);
- goto fail;
+ goto fail;;
}
}
diff --git a/libavdevice/timefilter.h b/libavdevice/timefilter.h
index de70945..cb3d0a7 100644
--- a/libavdevice/timefilter.h
+++ b/libavdevice/timefilter.h
@@ -39,6 +39,16 @@
/**
* Create a new Delay Locked Loop time filter
*
+ * feedback2_factor and feedback3_factor are the factors used for the
+ * multiplications that are respectively performed in the second and third
+ * feedback paths of the loop.
+ *
+ * Unless you know what you are doing, you should set these as follow:
+ *
+ * o = 2 * M_PI * bandwidth * period_in_seconds
+ * feedback2_factor = sqrt(2) * o
+ * feedback3_factor = o * o
+ *
* Where bandwidth is up to you to choose. Smaller values will filter out more
* of the jitter, but also take a longer time for the loop to settle. A good
* starting point is something between 0.3 and 3 Hz.
@@ -49,8 +59,11 @@
* @param brandwidth filtering bandwidth, in Hz
*
* @return a pointer to a TimeFilter struct, or NULL on error
+ *
+ * For more details about these parameters and background concepts please see:
+ * http://www.kokkinizita.net/papers/usingdll.pdf
*/
-TimeFilter * ff_timefilter_new(double time_base, double period, double bandwidth);
+TimeFilter * ff_timefilter_new(double clock_period, double feedback2_factor, double feedback3_factor);
/**
* Update the filter
diff --git a/libavdevice/version.h b/libavdevice/version.h
index f5aaa16..7022fdb 100644
--- a/libavdevice/version.h
+++ b/libavdevice/version.h
@@ -28,8 +28,8 @@
#include "libavutil/version.h"
#define LIBAVDEVICE_VERSION_MAJOR 58
-#define LIBAVDEVICE_VERSION_MINOR 12
-#define LIBAVDEVICE_VERSION_MICRO 100
+#define LIBAVDEVICE_VERSION_MINOR 11
+#define LIBAVDEVICE_VERSION_MICRO 103
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
LIBAVDEVICE_VERSION_MINOR, \
@@ -46,8 +46,5 @@
* dropped at a future version bump. The defines themselves are not part of
* the public API and may change, break or disappear at any time.
*/
-#ifndef FF_API_DEVICE_CAPABILITIES
-#define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60)
-#endif
#endif /* AVDEVICE_VERSION_H */
diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c
index f9ea5a5..95bdc8a 100644
--- a/libavdevice/xcbgrab.c
+++ b/libavdevice/xcbgrab.c
@@ -206,7 +206,7 @@
c->time_frame += c->frame_duration;
for (;;) {
- curtime = av_gettime_relative();
+ curtime = av_gettime();
delay = c->time_frame - curtime;
if (delay <= 0)
break;
@@ -236,7 +236,7 @@
shmdt(data);
}
-static AVBufferRef *allocate_shm_buffer(void *opaque, buffer_size_t size)
+static AVBufferRef *allocate_shm_buffer(void *opaque, int size)
{
xcb_connection_t *conn = opaque;
xcb_shm_seg_t segment;
@@ -422,8 +422,7 @@
int ret = 0;
int64_t pts;
- wait_frame(s, pkt);
- pts = av_gettime();
+ pts = wait_frame(s, pkt);
if (c->follow_mouse || c->draw_mouse) {
pc = xcb_query_pointer(c->conn, c->screen->root);
@@ -514,26 +513,21 @@
switch (depth) {
case 32:
if (fmt->bits_per_pixel == 32)
- *pix_fmt = setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST ?
- AV_PIX_FMT_BGR0 : AV_PIX_FMT_0RGB;
+ *pix_fmt = AV_PIX_FMT_0RGB;
break;
case 24:
if (fmt->bits_per_pixel == 32)
- *pix_fmt = setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST ?
- AV_PIX_FMT_BGR0 : AV_PIX_FMT_0RGB;
+ *pix_fmt = AV_PIX_FMT_0RGB32;
else if (fmt->bits_per_pixel == 24)
- *pix_fmt = setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST ?
- AV_PIX_FMT_BGR24 : AV_PIX_FMT_RGB24;
+ *pix_fmt = AV_PIX_FMT_RGB24;
break;
case 16:
if (fmt->bits_per_pixel == 16)
- *pix_fmt = setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST ?
- AV_PIX_FMT_RGB565LE : AV_PIX_FMT_RGB565BE;
+ *pix_fmt = AV_PIX_FMT_RGB565;
break;
case 15:
if (fmt->bits_per_pixel == 16)
- *pix_fmt = setup->image_byte_order == XCB_IMAGE_ORDER_LSB_FIRST ?
- AV_PIX_FMT_RGB555LE : AV_PIX_FMT_RGB555BE;
+ *pix_fmt = AV_PIX_FMT_RGB555;
break;
case 8:
if (fmt->bits_per_pixel == 8)
@@ -597,7 +591,7 @@
c->time_base = (AVRational){ st->avg_frame_rate.den,
st->avg_frame_rate.num };
c->frame_duration = av_rescale_q(1, c->time_base, AV_TIME_BASE_Q);
- c->time_frame = av_gettime_relative();
+ c->time_frame = av_gettime();
ret = pixfmt_from_pixmap_format(s, geo->depth, &st->codecpar->format, &c->bpp);
free(geo);
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index b2c254e..77b5d3a 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -27,7 +27,6 @@
# subsystems
OBJS-$(CONFIG_QSVVPP) += qsvvpp.o
OBJS-$(CONFIG_SCENE_SAD) += scene_sad.o
-OBJS-$(CONFIG_DNN) += dnn_filter_common.o
include $(SRC_PATH)/libavfilter/dnn/Makefile
# audio filters
@@ -47,7 +46,6 @@
OBJS-$(CONFIG_AECHO_FILTER) += af_aecho.o
OBJS-$(CONFIG_AEMPHASIS_FILTER) += af_aemphasis.o
OBJS-$(CONFIG_AEVAL_FILTER) += aeval.o
-OBJS-$(CONFIG_AEXCITER_FILTER) += af_aexciter.o
OBJS-$(CONFIG_AFADE_FILTER) += af_afade.o
OBJS-$(CONFIG_AFFTDN_FILTER) += af_afftdn.o
OBJS-$(CONFIG_AFFTFILT_FILTER) += af_afftfilt.o
@@ -195,12 +193,9 @@
OBJS-$(CONFIG_CHROMANR_FILTER) += vf_chromanr.o
OBJS-$(CONFIG_CHROMASHIFT_FILTER) += vf_chromashift.o
OBJS-$(CONFIG_CIESCOPE_FILTER) += vf_ciescope.o
-OBJS-$(CONFIG_CODECVIEW_FILTER) += vf_codecview.o qp_table.o
+OBJS-$(CONFIG_CODECVIEW_FILTER) += vf_codecview.o
OBJS-$(CONFIG_COLORBALANCE_FILTER) += vf_colorbalance.o
OBJS-$(CONFIG_COLORCHANNELMIXER_FILTER) += vf_colorchannelmixer.o
-OBJS-$(CONFIG_COLORCONTRAST_FILTER) += vf_colorcontrast.o
-OBJS-$(CONFIG_COLORCORRECT_FILTER) += vf_colorcorrect.o
-OBJS-$(CONFIG_COLORIZE_FILTER) += vf_colorize.o
OBJS-$(CONFIG_COLORKEY_FILTER) += vf_colorkey.o
OBJS-$(CONFIG_COLORKEY_OPENCL_FILTER) += vf_colorkey_opencl.o opencl.o \
opencl/colorkey.o
@@ -208,7 +203,6 @@
OBJS-$(CONFIG_COLORLEVELS_FILTER) += vf_colorlevels.o
OBJS-$(CONFIG_COLORMATRIX_FILTER) += vf_colormatrix.o
OBJS-$(CONFIG_COLORSPACE_FILTER) += vf_colorspace.o colorspace.o colorspacedsp.o
-OBJS-$(CONFIG_COLORTEMPERATURE_FILTER) += vf_colortemperature.o
OBJS-$(CONFIG_CONVOLUTION_FILTER) += vf_convolution.o
OBJS-$(CONFIG_CONVOLUTION_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o \
opencl/convolution.o
@@ -254,13 +248,10 @@
OBJS-$(CONFIG_EDGEDETECT_FILTER) += vf_edgedetect.o
OBJS-$(CONFIG_ELBG_FILTER) += vf_elbg.o
OBJS-$(CONFIG_ENTROPY_FILTER) += vf_entropy.o
-OBJS-$(CONFIG_EPX_FILTER) += vf_epx.o
OBJS-$(CONFIG_EQ_FILTER) += vf_eq.o
OBJS-$(CONFIG_EROSION_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_EROSION_OPENCL_FILTER) += vf_neighbor_opencl.o opencl.o \
opencl/neighbor.o
-OBJS-$(CONFIG_ESTDIF_FILTER) += vf_estdif.o
-OBJS-$(CONFIG_EXPOSURE_FILTER) += vf_exposure.o
OBJS-$(CONFIG_EXTRACTPLANES_FILTER) += vf_extractplanes.o
OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o
OBJS-$(CONFIG_FFTDNOIZ_FILTER) += vf_fftdnoiz.o
@@ -280,7 +271,7 @@
OBJS-$(CONFIG_FREEZEDETECT_FILTER) += vf_freezedetect.o
OBJS-$(CONFIG_FREEZEFRAMES_FILTER) += vf_freezeframes.o
OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
-OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o qp_table.o
+OBJS-$(CONFIG_FSPP_FILTER) += vf_fspp.o
OBJS-$(CONFIG_GBLUR_FILTER) += vf_gblur.o
OBJS-$(CONFIG_GEQ_FILTER) += vf_geq.o
OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.o
@@ -299,14 +290,12 @@
OBJS-$(CONFIG_HWUPLOAD_CUDA_FILTER) += vf_hwupload_cuda.o
OBJS-$(CONFIG_HWUPLOAD_FILTER) += vf_hwupload.o
OBJS-$(CONFIG_HYSTERESIS_FILTER) += vf_hysteresis.o framesync.o
-OBJS-$(CONFIG_IDENTITY_FILTER) += vf_identity.o
OBJS-$(CONFIG_IDET_FILTER) += vf_idet.o
OBJS-$(CONFIG_IL_FILTER) += vf_il.o
OBJS-$(CONFIG_INFLATE_FILTER) += vf_neighbor.o
OBJS-$(CONFIG_INTERLACE_FILTER) += vf_tinterlace.o
OBJS-$(CONFIG_INTERLEAVE_FILTER) += f_interleave.o
OBJS-$(CONFIG_KERNDEINT_FILTER) += vf_kerndeint.o
-OBJS-$(CONFIG_KIRSCH_FILTER) += vf_convolution.o
OBJS-$(CONFIG_LAGFUN_FILTER) += vf_lagfun.o
OBJS-$(CONFIG_LENSCORRECTION_FILTER) += vf_lenscorrection.o
OBJS-$(CONFIG_LENSFUN_FILTER) += vf_lensfun.o
@@ -334,7 +323,6 @@
OBJS-$(CONFIG_MIDEQUALIZER_FILTER) += vf_midequalizer.o framesync.o
OBJS-$(CONFIG_MINTERPOLATE_FILTER) += vf_minterpolate.o motion_estimation.o
OBJS-$(CONFIG_MIX_FILTER) += vf_mix.o framesync.o
-OBJS-$(CONFIG_MONOCHROME_FILTER) += vf_monochrome.o
OBJS-$(CONFIG_MPDECIMATE_FILTER) += vf_mpdecimate.o
OBJS-$(CONFIG_NEGATE_FILTER) += vf_lut.o
OBJS-$(CONFIG_NLMEANS_FILTER) += vf_nlmeans.o
@@ -364,8 +352,8 @@
OBJS-$(CONFIG_PHOTOSENSITIVITY_FILTER) += vf_photosensitivity.o
OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o
OBJS-$(CONFIG_PIXSCOPE_FILTER) += vf_datascope.o
-OBJS-$(CONFIG_PP_FILTER) += vf_pp.o qp_table.o
-OBJS-$(CONFIG_PP7_FILTER) += vf_pp7.o qp_table.o
+OBJS-$(CONFIG_PP_FILTER) += vf_pp.o
+OBJS-$(CONFIG_PP7_FILTER) += vf_pp7.o
OBJS-$(CONFIG_PREMULTIPLY_FILTER) += vf_premultiply.o framesync.o
OBJS-$(CONFIG_PREWITT_FILTER) += vf_convolution.o
OBJS-$(CONFIG_PREWITT_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o \
@@ -413,11 +401,9 @@
OBJS-$(CONFIG_SETSAR_FILTER) += vf_aspect.o
OBJS-$(CONFIG_SETTB_FILTER) += settb.o
OBJS-$(CONFIG_SHARPNESS_VAAPI_FILTER) += vf_misc_vaapi.o vaapi_vpp.o
-OBJS-$(CONFIG_SHEAR_FILTER) += vf_shear.o
OBJS-$(CONFIG_SHOWINFO_FILTER) += vf_showinfo.o
OBJS-$(CONFIG_SHOWPALETTE_FILTER) += vf_showpalette.o
OBJS-$(CONFIG_SHUFFLEFRAMES_FILTER) += vf_shuffleframes.o
-OBJS-$(CONFIG_SHUFFLEPIXELS_FILTER) += vf_shufflepixels.o
OBJS-$(CONFIG_SHUFFLEPLANES_FILTER) += vf_shuffleplanes.o
OBJS-$(CONFIG_SIDEDATA_FILTER) += f_sidedata.o
OBJS-$(CONFIG_SIGNALSTATS_FILTER) += vf_signalstats.o
@@ -427,7 +413,7 @@
OBJS-$(CONFIG_SOBEL_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o \
opencl/convolution.o
OBJS-$(CONFIG_SPLIT_FILTER) += split.o
-OBJS-$(CONFIG_SPP_FILTER) += vf_spp.o qp_table.o
+OBJS-$(CONFIG_SPP_FILTER) += vf_spp.o
OBJS-$(CONFIG_SR_FILTER) += vf_sr.o
OBJS-$(CONFIG_SSIM_FILTER) += vf_ssim.o framesync.o
OBJS-$(CONFIG_STEREO3D_FILTER) += vf_stereo3d.o
@@ -446,7 +432,6 @@
OBJS-$(CONFIG_TINTERLACE_FILTER) += vf_tinterlace.o
OBJS-$(CONFIG_TLUT2_FILTER) += vf_lut2.o framesync.o
OBJS-$(CONFIG_TMEDIAN_FILTER) += vf_xmedian.o framesync.o
-OBJS-$(CONFIG_TMIDEQUALIZER_FILTER) += vf_tmidequalizer.o
OBJS-$(CONFIG_TMIX_FILTER) += vf_mix.o framesync.o
OBJS-$(CONFIG_TONEMAP_FILTER) += vf_tonemap.o colorspace.o
OBJS-$(CONFIG_TONEMAP_OPENCL_FILTER) += vf_tonemap_opencl.o colorspace.o opencl.o \
@@ -463,7 +448,7 @@
OBJS-$(CONFIG_UNSHARP_OPENCL_FILTER) += vf_unsharp_opencl.o opencl.o \
opencl/unsharp.o
OBJS-$(CONFIG_UNTILE_FILTER) += vf_untile.o
-OBJS-$(CONFIG_USPP_FILTER) += vf_uspp.o qp_table.o
+OBJS-$(CONFIG_USPP_FILTER) += vf_uspp.o
OBJS-$(CONFIG_V360_FILTER) += vf_v360.o
OBJS-$(CONFIG_VAGUEDENOISER_FILTER) += vf_vaguedenoiser.o
OBJS-$(CONFIG_VECTORSCOPE_FILTER) += vf_vectorscope.o
@@ -472,7 +457,6 @@
OBJS-$(CONFIG_VIBRANCE_FILTER) += vf_vibrance.o
OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect.o
OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o
-OBJS-$(CONFIG_VIF_FILTER) += vf_vif.o framesync.o
OBJS-$(CONFIG_VIGNETTE_FILTER) += vf_vignette.o
OBJS-$(CONFIG_VMAFMOTION_FILTER) += vf_vmafmotion.o framesync.o
OBJS-$(CONFIG_VPP_QSV_FILTER) += vf_vpp_qsv.o
diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c
index d3c31c2..ddce744 100644
--- a/libavfilter/af_acrusher.c
+++ b/libavfilter/af_acrusher.c
@@ -68,7 +68,7 @@
} ACrusherContext;
#define OFFSET(x) offsetof(ACrusherContext, x)
-#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
+#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption acrusher_options[] = {
{ "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A },
@@ -325,27 +325,13 @@
s->lfo.srate = inlink->sample_rate;
s->lfo.amount = .5;
- if (!s->sr)
- s->sr = av_calloc(inlink->channels, sizeof(*s->sr));
+ s->sr = av_calloc(inlink->channels, sizeof(*s->sr));
if (!s->sr)
return AVERROR(ENOMEM);
return 0;
}
-static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
- char *res, int res_len, int flags)
-{
- AVFilterLink *inlink = ctx->inputs[0];
- int ret;
-
- ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
- if (ret < 0)
- return ret;
-
- return config_input(inlink);
-}
-
static const AVFilterPad avfilter_af_acrusher_inputs[] = {
{
.name = "default",
@@ -373,5 +359,4 @@
.query_formats = query_formats,
.inputs = avfilter_af_acrusher_inputs,
.outputs = avfilter_af_acrusher_outputs,
- .process_command = process_command,
};
diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c
index c8a41cd..e86a1f7 100644
--- a/libavfilter/af_adeclick.c
+++ b/libavfilter/af_adeclick.c
@@ -92,21 +92,13 @@
#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption adeclick_options[] = {
- { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
{ "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
- { "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
{ "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
- { "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
{ "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 25, AF },
- { "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
{ "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 1, 100, AF },
- { "burst", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
{ "b", "set burst fusion", OFFSET(burst), AV_OPT_TYPE_DOUBLE, {.dbl=2}, 0, 10, AF },
- { "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
{ "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
- { "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
- { "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ NULL }
};
@@ -777,22 +769,14 @@
};
static const AVOption adeclip_options[] = {
- { "window", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
- { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
- { "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
- { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
- { "arorder", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
- { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
- { "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
- { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
- { "hsize", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
- { "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
- { "method", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
- { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
- { "add", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
- { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
- { "save", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
- { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
+ { "w", "set window size", OFFSET(w), AV_OPT_TYPE_DOUBLE, {.dbl=55}, 10, 100, AF },
+ { "o", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_DOUBLE, {.dbl=75}, 50, 95, AF },
+ { "a", "set autoregression order", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=8}, 0, 25, AF },
+ { "t", "set threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=10}, 1, 100, AF },
+ { "n", "set histogram size", OFFSET(nb_hbins), AV_OPT_TYPE_INT, {.i64=1000}, 100, 9999, AF },
+ { "m", "set overlap method", OFFSET(method), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "m" },
+ { "a", "overlap-add", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
+ { "s", "overlap-save", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ NULL }
};
diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c
deleted file mode 100644
index f09c999..0000000
--- a/libavfilter/af_aexciter.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) Markus Schmidt and Christian Holschuh
- *
- * 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
- */
-
-#include "libavutil/opt.h"
-#include "avfilter.h"
-#include "internal.h"
-#include "audio.h"
-
-typedef struct ChannelParams {
- double blend_old, drive_old;
- double rdrive, rbdr, kpa, kpb, kna, knb, ap,
- an, imr, kc, srct, sq, pwrq;
- double prev_med, prev_out;
-
- double hp[5], lp[5];
- double hw[4][2], lw[2][2];
-} ChannelParams;
-
-typedef struct AExciterContext {
- const AVClass *class;
-
- double level_in;
- double level_out;
- double amount;
- double drive;
- double blend;
- double freq;
- double ceil;
- int listen;
-
- ChannelParams *cp;
-} AExciterContext;
-
-#define OFFSET(x) offsetof(AExciterContext, x)
-#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
-
-static const AVOption aexciter_options[] = {
- { "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
- { "level_out", "set level out", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
- { "amount", "set amount", OFFSET(amount), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
- { "drive", "set harmonics", OFFSET(drive), AV_OPT_TYPE_DOUBLE, {.dbl=8.5}, 0.1, 10, A },
- { "blend", "set blend harmonics", OFFSET(blend), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -10, 10, A },
- { "freq", "set scope", OFFSET(freq), AV_OPT_TYPE_DOUBLE, {.dbl=7500}, 2000, 12000, A },
- { "ceil", "set ceiling", OFFSET(ceil), AV_OPT_TYPE_DOUBLE, {.dbl=9999}, 9999, 20000, A },
- { "listen", "enable listen mode", OFFSET(listen), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, A },
- { NULL }
-};
-
-AVFILTER_DEFINE_CLASS(aexciter);
-
-static inline double M(double x)
-{
- return (fabs(x) > 0.00000001) ? x : 0.0;
-}
-
-static inline double D(double x)
-{
- x = fabs(x);
-
- return (x > 0.00000001) ? sqrt(x) : 0.0;
-}
-
-static void set_params(ChannelParams *p,
- double blend, double drive,
- double srate, double freq,
- double ceil)
-{
- double a0, a1, a2, b0, b1, b2, w0, alpha;
-
- p->rdrive = 12.0 / drive;
- p->rbdr = p->rdrive / (10.5 - blend) * 780.0 / 33.0;
- p->kpa = D(2.0 * (p->rdrive*p->rdrive) - 1.0) + 1.0;
- p->kpb = (2.0 - p->kpa) / 2.0;
- p->ap = ((p->rdrive*p->rdrive) - p->kpa + 1.0) / 2.0;
- p->kc = p->kpa / D(2.0 * D(2.0 * (p->rdrive*p->rdrive) - 1.0) - 2.0 * p->rdrive*p->rdrive);
-
- p->srct = (0.1 * srate) / (0.1 * srate + 1.0);
- p->sq = p->kc*p->kc + 1.0;
- p->knb = -1.0 * p->rbdr / D(p->sq);
- p->kna = 2.0 * p->kc * p->rbdr / D(p->sq);
- p->an = p->rbdr*p->rbdr / p->sq;
- p->imr = 2.0 * p->knb + D(2.0 * p->kna + 4.0 * p->an - 1.0);
- p->pwrq = 2.0 / (p->imr + 1.0);
-
- w0 = 2 * M_PI * freq / srate;
- alpha = sin(w0) / (2. * 0.707);
- a0 = 1 + alpha;
- a1 = -2 * cos(w0);
- a2 = 1 - alpha;
- b0 = (1 + cos(w0)) / 2;
- b1 = -(1 + cos(w0));
- b2 = (1 + cos(w0)) / 2;
-
- p->hp[0] =-a1 / a0;
- p->hp[1] =-a2 / a0;
- p->hp[2] = b0 / a0;
- p->hp[3] = b1 / a0;
- p->hp[4] = b2 / a0;
-
- w0 = 2 * M_PI * ceil / srate;
- alpha = sin(w0) / (2. * 0.707);
- a0 = 1 + alpha;
- a1 = -2 * cos(w0);
- a2 = 1 - alpha;
- b0 = (1 - cos(w0)) / 2;
- b1 = 1 - cos(w0);
- b2 = (1 - cos(w0)) / 2;
-
- p->lp[0] =-a1 / a0;
- p->lp[1] =-a2 / a0;
- p->lp[2] = b0 / a0;
- p->lp[3] = b1 / a0;
- p->lp[4] = b2 / a0;
-}
-
-static double bprocess(double in, const double *const c,
- double *w1, double *w2)
-{
- double out = c[2] * in + *w1;
-
- *w1 = c[3] * in + *w2 + c[0] * out;
- *w2 = c[4] * in + c[1] * out;
-
- return out;
-}
-
-static double distortion_process(AExciterContext *s, ChannelParams *p, double in)
-{
- double proc = in, med;
-
- proc = bprocess(proc, p->hp, &p->hw[0][0], &p->hw[0][1]);
- proc = bprocess(proc, p->hp, &p->hw[1][0], &p->hw[1][1]);
-
- if (proc >= 0.0) {
- med = (D(p->ap + proc * (p->kpa - proc)) + p->kpb) * p->pwrq;
- } else {
- med = (D(p->an - proc * (p->kna + proc)) + p->knb) * p->pwrq * -1.0;
- }
-
- proc = p->srct * (med - p->prev_med + p->prev_out);
- p->prev_med = M(med);
- p->prev_out = M(proc);
-
- proc = bprocess(proc, p->hp, &p->hw[2][0], &p->hw[2][1]);
- proc = bprocess(proc, p->hp, &p->hw[3][0], &p->hw[3][1]);
-
- if (s->ceil >= 10000.) {
- proc = bprocess(proc, p->lp, &p->lw[0][0], &p->lw[0][1]);
- proc = bprocess(proc, p->lp, &p->lw[1][0], &p->lw[1][1]);
- }
-
- return proc;
-}
-
-static int filter_frame(AVFilterLink *inlink, AVFrame *in)
-{
- AVFilterContext *ctx = inlink->dst;
- AExciterContext *s = ctx->priv;
- AVFilterLink *outlink = ctx->outputs[0];
- AVFrame *out;
- const double *src = (const double *)in->data[0];
- const double level_in = s->level_in;
- const double level_out = s->level_out;
- const double amount = s->amount;
- const double listen = 1.0 - s->listen;
- double *dst;
-
- if (av_frame_is_writable(in)) {
- out = in;
- } else {
- out = ff_get_audio_buffer(inlink, in->nb_samples);
- if (!out) {
- av_frame_free(&in);
- return AVERROR(ENOMEM);
- }
- av_frame_copy_props(out, in);
- }
-
- dst = (double *)out->data[0];
- for (int n = 0; n < in->nb_samples; n++) {
- for (int c = 0; c < inlink->channels; c++) {
- double sample = src[c] * level_in;
-
- sample = distortion_process(s, &s->cp[c], sample);
- sample = sample * amount + listen * src[c];
-
- sample *= level_out;
- if (ctx->is_disabled)
- dst[c] = src[c];
- else
- dst[c] = sample;
- }
-
- src += inlink->channels;
- dst += inlink->channels;
- }
-
- if (in != out)
- av_frame_free(&in);
-
- return ff_filter_frame(outlink, out);
-}
-
-static int query_formats(AVFilterContext *ctx)
-{
- AVFilterFormats *formats;
- AVFilterChannelLayouts *layouts;
- static const enum AVSampleFormat sample_fmts[] = {
- AV_SAMPLE_FMT_DBL,
- AV_SAMPLE_FMT_NONE
- };
- int ret;
-
- layouts = ff_all_channel_counts();
- if (!layouts)
- return AVERROR(ENOMEM);
- ret = ff_set_common_channel_layouts(ctx, layouts);
- if (ret < 0)
- return ret;
-
- formats = ff_make_format_list(sample_fmts);
- if (!formats)
- return AVERROR(ENOMEM);
- ret = ff_set_common_formats(ctx, formats);
- if (ret < 0)
- return ret;
-
- formats = ff_all_samplerates();
- if (!formats)
- return AVERROR(ENOMEM);
- return ff_set_common_samplerates(ctx, formats);
-}
-
-static av_cold void uninit(AVFilterContext *ctx)
-{
- AExciterContext *s = ctx->priv;
-
- av_freep(&s->cp);
-}
-
-static int config_input(AVFilterLink *inlink)
-{
- AVFilterContext *ctx = inlink->dst;
- AExciterContext *s = ctx->priv;
-
- if (!s->cp)
- s->cp = av_calloc(inlink->channels, sizeof(*s->cp));
- if (!s->cp)
- return AVERROR(ENOMEM);
-
- for (int i = 0; i < inlink->channels; i++)
- set_params(&s->cp[i], s->blend, s->drive, inlink->sample_rate,
- s->freq, s->ceil);
-
- return 0;
-}
-
-static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
- char *res, int res_len, int flags)
-{
- AVFilterLink *inlink = ctx->inputs[0];
- int ret;
-
- ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
- if (ret < 0)
- return ret;
-
- return config_input(inlink);
-}
-
-static const AVFilterPad avfilter_af_aexciter_inputs[] = {
- {
- .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .config_props = config_input,
- .filter_frame = filter_frame,
- },
- { NULL }
-};
-
-static const AVFilterPad avfilter_af_aexciter_outputs[] = {
- {
- .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- },
- { NULL }
-};
-
-AVFilter ff_af_aexciter = {
- .name = "aexciter",
- .description = NULL_IF_CONFIG_SMALL("Enhance high frequency part of audio."),
- .priv_size = sizeof(AExciterContext),
- .priv_class = &aexciter_class,
- .uninit = uninit,
- .query_formats = query_formats,
- .inputs = avfilter_af_aexciter_inputs,
- .outputs = avfilter_af_aexciter_outputs,
- .process_command = process_command,
- .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
-};
diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c
index 976b675..16e468b 100644
--- a/libavfilter/af_afade.c
+++ b/libavfilter/af_afade.c
@@ -249,10 +249,10 @@
{ "ss", "set number of first sample to start fading", OFFSET(start_sample), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, TFLAGS },
{ "nb_samples", "set number of samples for fade duration", OFFSET(nb_samples), AV_OPT_TYPE_INT64, {.i64 = 44100}, 1, INT64_MAX, TFLAGS },
{ "ns", "set number of samples for fade duration", OFFSET(nb_samples), AV_OPT_TYPE_INT64, {.i64 = 44100}, 1, INT64_MAX, TFLAGS },
- { "start_time", "set time to start fading", OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, INT64_MAX, TFLAGS },
- { "st", "set time to start fading", OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, INT64_MAX, TFLAGS },
- { "duration", "set fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, INT64_MAX, TFLAGS },
- { "d", "set fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, INT64_MAX, TFLAGS },
+ { "start_time", "set time to start fading", OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT64_MAX, TFLAGS },
+ { "st", "set time to start fading", OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT64_MAX, TFLAGS },
+ { "duration", "set fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT64_MAX, TFLAGS },
+ { "d", "set fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT64_MAX, TFLAGS },
{ "curve", "set fade curve type", OFFSET(curve), AV_OPT_TYPE_INT, {.i64 = TRI }, NONE, NB_CURVES - 1, TFLAGS, "curve" },
{ "c", "set fade curve type", OFFSET(curve), AV_OPT_TYPE_INT, {.i64 = TRI }, NONE, NB_CURVES - 1, TFLAGS, "curve" },
{ "nofade", "no fade; keep audio as-is", 0, AV_OPT_TYPE_CONST, {.i64 = NONE }, 0, 0, TFLAGS, "curve" },
@@ -385,8 +385,8 @@
static const AVOption acrossfade_options[] = {
{ "nb_samples", "set number of samples for cross fade duration", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 44100}, 1, INT32_MAX/10, FLAGS },
{ "ns", "set number of samples for cross fade duration", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 44100}, 1, INT32_MAX/10, FLAGS },
- { "duration", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, 60000000, FLAGS },
- { "d", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0 }, 0, 60000000, FLAGS },
+ { "duration", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, 60000000, FLAGS },
+ { "d", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, 60000000, FLAGS },
{ "overlap", "overlap 1st stream end with 2nd stream start", OFFSET(overlap), AV_OPT_TYPE_BOOL, {.i64 = 1 }, 0, 1, FLAGS },
{ "o", "overlap 1st stream end with 2nd stream start", OFFSET(overlap), AV_OPT_TYPE_BOOL, {.i64 = 1 }, 0, 1, FLAGS },
{ "curve1", "set fade curve type for 1st stream", OFFSET(curve), AV_OPT_TYPE_INT, {.i64 = TRI }, NONE, NB_CURVES - 1, FLAGS, "curve" },
diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c
index 9b9001a..a6156bf 100644
--- a/libavfilter/af_afftfilt.c
+++ b/libavfilter/af_afftfilt.c
@@ -118,7 +118,7 @@
static double imagf(void *priv, double x, double ch) { return getimag(priv, x, ch); }
static const char *const func2_names[] = { "real", "imag", NULL };
-static double (*const func2[])(void *, double, double) = { realf, imagf, NULL };
+double (*func2[])(void *, double, double) = { realf, imagf, NULL };
static int config_input(AVFilterLink *inlink)
{
diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c
index 6141730..4cc4e27 100644
--- a/libavfilter/af_afreqshift.c
+++ b/libavfilter/af_afreqshift.c
@@ -34,8 +34,7 @@
double shift;
double level;
- double cd[NB_COEFS];
- float cf[NB_COEFS];
+ double c[NB_COEFS];
int64_t in_samples;
@@ -43,8 +42,11 @@
AVFrame *i2, *o2;
void (*filter_channel)(AVFilterContext *ctx,
- int channel,
- AVFrame *in, AVFrame *out);
+ int nb_samples,
+ int sample_rate,
+ const double *src, double *dst,
+ double *i1, double *o1,
+ double *i2, double *o2);
} AFreqShift;
static int query_formats(AVFilterContext *ctx)
@@ -52,7 +54,6 @@
AVFilterFormats *formats = NULL;
AVFilterChannelLayouts *layouts = NULL;
static const enum AVSampleFormat sample_fmts[] = {
- AV_SAMPLE_FMT_FLTP,
AV_SAMPLE_FMT_DBLP,
AV_SAMPLE_FMT_NONE
};
@@ -77,105 +78,89 @@
return ff_set_common_samplerates(ctx, formats);
}
-#define PFILTER(name, type, sin, cos, cc) \
-static void pfilter_channel_## name(AVFilterContext *ctx, \
- int ch, \
- AVFrame *in, AVFrame *out) \
-{ \
- AFreqShift *s = ctx->priv; \
- const int nb_samples = in->nb_samples; \
- const type *src = (const type *)in->extended_data[ch]; \
- type *dst = (type *)out->extended_data[ch]; \
- type *i1 = (type *)s->i1->extended_data[ch]; \
- type *o1 = (type *)s->o1->extended_data[ch]; \
- type *i2 = (type *)s->i2->extended_data[ch]; \
- type *o2 = (type *)s->o2->extended_data[ch]; \
- const type *c = s->cc; \
- const type level = s->level; \
- type shift = s->shift * M_PI; \
- type cos_theta = cos(shift); \
- type sin_theta = sin(shift); \
- \
- for (int n = 0; n < nb_samples; n++) { \
- type xn1 = src[n], xn2 = src[n]; \
- type I, Q; \
- \
- for (int j = 0; j < NB_COEFS / 2; j++) { \
- I = c[j] * (xn1 + o2[j]) - i2[j]; \
- i2[j] = i1[j]; \
- i1[j] = xn1; \
- o2[j] = o1[j]; \
- o1[j] = I; \
- xn1 = I; \
- } \
- \
- for (int j = NB_COEFS / 2; j < NB_COEFS; j++) { \
- Q = c[j] * (xn2 + o2[j]) - i2[j]; \
- i2[j] = i1[j]; \
- i1[j] = xn2; \
- o2[j] = o1[j]; \
- o1[j] = Q; \
- xn2 = Q; \
- } \
- Q = o2[NB_COEFS - 1]; \
- \
- dst[n] = (I * cos_theta - Q * sin_theta) * level; \
- } \
+static void pfilter_channel(AVFilterContext *ctx,
+ int nb_samples,
+ int sample_rate,
+ const double *src, double *dst,
+ double *i1, double *o1,
+ double *i2, double *o2)
+{
+ AFreqShift *s = ctx->priv;
+ const double *c = s->c;
+ const double level = s->level;
+ double shift = s->shift * M_PI;
+ double cos_theta = cos(shift);
+ double sin_theta = sin(shift);
+
+ for (int n = 0; n < nb_samples; n++) {
+ double xn1 = src[n], xn2 = src[n];
+ double I, Q;
+
+ for (int j = 0; j < NB_COEFS / 2; j++) {
+ I = c[j] * (xn1 + o2[j]) - i2[j];
+ i2[j] = i1[j];
+ i1[j] = xn1;
+ o2[j] = o1[j];
+ o1[j] = I;
+ xn1 = I;
+ }
+
+ for (int j = NB_COEFS / 2; j < NB_COEFS; j++) {
+ Q = c[j] * (xn2 + o2[j]) - i2[j];
+ i2[j] = i1[j];
+ i1[j] = xn2;
+ o2[j] = o1[j];
+ o1[j] = Q;
+ xn2 = Q;
+ }
+ Q = o2[NB_COEFS - 1];
+
+ dst[n] = (I * cos_theta - Q * sin_theta) * level;
+ }
}
-PFILTER(flt, float, sin, cos, cf)
-PFILTER(dbl, double, sin, cos, cd)
+static void ffilter_channel(AVFilterContext *ctx,
+ int nb_samples,
+ int sample_rate,
+ const double *src, double *dst,
+ double *i1, double *o1,
+ double *i2, double *o2)
+{
+ AFreqShift *s = ctx->priv;
+ const double *c = s->c;
+ const double level = s->level;
+ double ts = 1. / sample_rate;
+ double shift = s->shift;
+ int64_t N = s->in_samples;
-#define FFILTER(name, type, sin, cos, fmod, cc) \
-static void ffilter_channel_## name(AVFilterContext *ctx, \
- int ch, \
- AVFrame *in, AVFrame *out) \
-{ \
- AFreqShift *s = ctx->priv; \
- const int nb_samples = in->nb_samples; \
- const type *src = (const type *)in->extended_data[ch]; \
- type *dst = (type *)out->extended_data[ch]; \
- type *i1 = (type *)s->i1->extended_data[ch]; \
- type *o1 = (type *)s->o1->extended_data[ch]; \
- type *i2 = (type *)s->i2->extended_data[ch]; \
- type *o2 = (type *)s->o2->extended_data[ch]; \
- const type *c = s->cc; \
- const type level = s->level; \
- type ts = 1. / in->sample_rate; \
- type shift = s->shift; \
- int64_t N = s->in_samples; \
- \
- for (int n = 0; n < nb_samples; n++) { \
- type xn1 = src[n], xn2 = src[n]; \
- type I, Q, theta; \
- \
- for (int j = 0; j < NB_COEFS / 2; j++) { \
- I = c[j] * (xn1 + o2[j]) - i2[j]; \
- i2[j] = i1[j]; \
- i1[j] = xn1; \
- o2[j] = o1[j]; \
- o1[j] = I; \
- xn1 = I; \
- } \
- \
- for (int j = NB_COEFS / 2; j < NB_COEFS; j++) { \
- Q = c[j] * (xn2 + o2[j]) - i2[j]; \
- i2[j] = i1[j]; \
- i1[j] = xn2; \
- o2[j] = o1[j]; \
- o1[j] = Q; \
- xn2 = Q; \
- } \
- Q = o2[NB_COEFS - 1]; \
- \
- theta = 2. * M_PI * fmod(shift * (N + n) * ts, 1.); \
- dst[n] = (I * cos(theta) - Q * sin(theta)) * level; \
- } \
+ for (int n = 0; n < nb_samples; n++) {
+ double xn1 = src[n], xn2 = src[n];
+ double I, Q, theta;
+
+ for (int j = 0; j < NB_COEFS / 2; j++) {
+ I = c[j] * (xn1 + o2[j]) - i2[j];
+ i2[j] = i1[j];
+ i1[j] = xn1;
+ o2[j] = o1[j];
+ o1[j] = I;
+ xn1 = I;
+ }
+
+ for (int j = NB_COEFS / 2; j < NB_COEFS; j++) {
+ Q = c[j] * (xn2 + o2[j]) - i2[j];
+ i2[j] = i1[j];
+ i1[j] = xn2;
+ o2[j] = o1[j];
+ o1[j] = Q;
+ xn2 = Q;
+ }
+ Q = o2[NB_COEFS - 1];
+
+ theta = 2. * M_PI * fmod(shift * (N + n) * ts, 1.);
+ dst[n] = (I * cos(theta) - Q * sin(theta)) * level;
+ }
}
-FFILTER(flt, float, sinf, cosf, fmodf, cf)
-FFILTER(dbl, double, sin, cos, fmod, cd)
-
static void compute_transition_param(double *K, double *Q, double transition)
{
double kksqrt, e, e2, e4, k, q;
@@ -258,19 +243,15 @@
return coef;
}
-static void compute_coefs(double *coef_arrd, float *coef_arrf, int nbr_coefs, double transition)
+static void compute_coefs(double *coef_arr, int nbr_coefs, double transition)
{
const int order = nbr_coefs * 2 + 1;
double k, q;
compute_transition_param(&k, &q, transition);
- for (int n = 0; n < nbr_coefs; n++) {
- const int idx = (n / 2) + (n & 1) * nbr_coefs / 2;
-
- coef_arrd[idx] = compute_coef(n, k, q, order);
- coef_arrf[idx] = coef_arrd[idx];
- }
+ for (int n = 0; n < nbr_coefs; n++)
+ coef_arr[(n / 2) + (n & 1) * nbr_coefs / 2] = compute_coef(n, k, q, order);
}
static int config_input(AVFilterLink *inlink)
@@ -278,7 +259,7 @@
AVFilterContext *ctx = inlink->dst;
AFreqShift *s = ctx->priv;
- compute_coefs(s->cd, s->cf, NB_COEFS, 2. * 20. / inlink->sample_rate);
+ compute_coefs(s->c, NB_COEFS, 2. * 20. / inlink->sample_rate);
s->i1 = ff_get_audio_buffer(inlink, NB_COEFS);
s->o1 = ff_get_audio_buffer(inlink, NB_COEFS);
@@ -287,17 +268,10 @@
if (!s->i1 || !s->o1 || !s->i2 || !s->o2)
return AVERROR(ENOMEM);
- if (inlink->format == AV_SAMPLE_FMT_DBLP) {
- if (!strcmp(ctx->filter->name, "afreqshift"))
- s->filter_channel = ffilter_channel_dbl;
- else
- s->filter_channel = pfilter_channel_dbl;
- } else {
- if (!strcmp(ctx->filter->name, "afreqshift"))
- s->filter_channel = ffilter_channel_flt;
- else
- s->filter_channel = pfilter_channel_flt;
- }
+ if (!strcmp(ctx->filter->name, "afreqshift"))
+ s->filter_channel = ffilter_channel;
+ else
+ s->filter_channel = pfilter_channel;
return 0;
}
@@ -315,8 +289,16 @@
const int start = (in->channels * jobnr) / nb_jobs;
const int end = (in->channels * (jobnr+1)) / nb_jobs;
- for (int ch = start; ch < end; ch++)
- s->filter_channel(ctx, ch, in, out);
+ for (int ch = start; ch < end; ch++) {
+ s->filter_channel(ctx, in->nb_samples,
+ in->sample_rate,
+ (const double *)in->extended_data[ch],
+ (double *)out->extended_data[ch],
+ (double *)s->i1->extended_data[ch],
+ (double *)s->o1->extended_data[ch],
+ (double *)s->i2->extended_data[ch],
+ (double *)s->o2->extended_data[ch]);
+ }
return 0;
}
diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c
index 0f4129c..59d2232 100644
--- a/libavfilter/af_aiir.c
+++ b/libavfilter/af_aiir.c
@@ -453,7 +453,7 @@
return 0;
}
-static const char *const format[] = { "%lf", "%lf %lfi", "%lf %lfr", "%lf %lfd", "%lf %lfi" };
+static const char *format[] = { "%lf", "%lf %lfi", "%lf %lfr", "%lf %lfd", "%lf %lfi" };
static int read_channels(AVFilterContext *ctx, int channels, uint8_t *item_str, int ab)
{
@@ -966,7 +966,7 @@
for (int k = FFMAX(n - N + i, 0); k <= FFMIN(i, n); k++) {
acc += ((fact(i) * fact(N - i)) /
(fact(k) * fact(i - k) * fact(n - k) * fact(N - i - n + k))) *
- ((k & 1) ? -1. : 1.);
+ ((k & 1) ? -1. : 1.);;
}
z += a[i] * pow(2., i) * acc;
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 45a5dad..c4d8916 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -164,7 +164,6 @@
int duration_mode; /**< mode for determining duration */
float dropout_transition; /**< transition time when an input drops out */
char *weights_str; /**< string for custom weights for every input */
- int normalize; /**< if inputs are scaled */
int nb_channels; /**< number of channels */
int sample_rate; /**< sample rate */
@@ -196,8 +195,6 @@
OFFSET(dropout_transition), AV_OPT_TYPE_FLOAT, { .dbl = 2.0 }, 0, INT_MAX, A|F },
{ "weights", "Set weight for each input.",
OFFSET(weights_str), AV_OPT_TYPE_STRING, {.str="1 1"}, 0, 0, A|F|T },
- { "normalize", "Scale inputs",
- OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, A|F|T },
{ NULL }
};
@@ -230,14 +227,10 @@
}
for (i = 0; i < s->nb_inputs; i++) {
- if (s->input_state[i] & INPUT_ON) {
- if (!s->normalize)
- s->input_scale[i] = FFABS(s->weights[i]);
- else
- s->input_scale[i] = 1.0f / s->scale_norm[i] * FFSIGN(s->weights[i]);
- } else {
+ if (s->input_state[i] & INPUT_ON)
+ s->input_scale[i] = 1.0f / s->scale_norm[i] * FFSIGN(s->weights[i]);
+ else
s->input_scale[i] = 0.0f;
- }
}
}
diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c
index 049865b..4551ce2 100644
--- a/libavfilter/af_arnndn.c
+++ b/libavfilter/af_arnndn.c
@@ -36,7 +36,6 @@
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/float_dsp.h"
-#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
#include "libavutil/tx.h"
#include "avfilter.h"
@@ -129,7 +128,7 @@
float mem_hp_x[2];
float lastg[NB_BANDS];
float history[FRAME_SIZE];
- RNNState rnn[2];
+ RNNState rnn;
AVTXContext *tx, *txi;
av_tx_fn tx_fn, txi_fn;
} DenoiseState;
@@ -146,7 +145,7 @@
DECLARE_ALIGNED(32, float, window)[WINDOW_SIZE];
DECLARE_ALIGNED(32, float, dct_table)[FFALIGN(NB_BANDS, 4)][FFALIGN(NB_BANDS, 4)];
- RNNModel *model[2];
+ RNNModel *model;
AVFloatDSPContext *fdsp;
} AudioRNNContext;
@@ -185,9 +184,9 @@
av_free(model);
}
-static int rnnoise_model_from_file(FILE *f, RNNModel **rnn)
+static RNNModel *rnnoise_model_from_file(FILE *f)
{
- RNNModel *ret = NULL;
+ RNNModel *ret;
DenseLayer *input_dense;
GRULayer *vad_gru;
GRULayer *noise_gru;
@@ -197,17 +196,17 @@
int in;
if (fscanf(f, "rnnoise-nu model file version %d\n", &in) != 1 || in != 1)
- return AVERROR_INVALIDDATA;
+ return NULL;
ret = av_calloc(1, sizeof(RNNModel));
if (!ret)
- return AVERROR(ENOMEM);
+ return NULL;
#define ALLOC_LAYER(type, name) \
name = av_calloc(1, sizeof(type)); \
if (!name) { \
rnnoise_model_free(ret); \
- return AVERROR(ENOMEM); \
+ return NULL; \
} \
ret->name = name
@@ -221,7 +220,7 @@
#define INPUT_VAL(name) do { \
if (fscanf(f, "%d", &in) != 1 || in < 0 || in > 128) { \
rnnoise_model_free(ret); \
- return AVERROR(EINVAL); \
+ return NULL; \
} \
name = in; \
} while (0)
@@ -245,13 +244,13 @@
float *values = av_calloc((len), sizeof(float)); \
if (!values) { \
rnnoise_model_free(ret); \
- return AVERROR(ENOMEM); \
+ return NULL; \
} \
name = values; \
for (int i = 0; i < (len); i++) { \
if (fscanf(f, "%d", &in) != 1) { \
rnnoise_model_free(ret); \
- return AVERROR(EINVAL); \
+ return NULL; \
} \
values[i] = in; \
} \
@@ -261,7 +260,7 @@
float *values = av_calloc(FFALIGN((len0), 4) * FFALIGN((len1), 4) * (len2), sizeof(float)); \
if (!values) { \
rnnoise_model_free(ret); \
- return AVERROR(ENOMEM); \
+ return NULL; \
} \
name = values; \
for (int k = 0; k < (len0); k++) { \
@@ -269,7 +268,7 @@
for (int j = 0; j < (len1); j++) { \
if (fscanf(f, "%d", &in) != 1) { \
rnnoise_model_free(ret); \
- return AVERROR(EINVAL); \
+ return NULL; \
} \
values[j * (len2) * FFALIGN((len0), 4) + i * FFALIGN((len0), 4) + k] = in; \
} \
@@ -277,24 +276,13 @@
} \
} while (0)
-#define NEW_LINE() do { \
- int c; \
- while ((c = fgetc(f)) != EOF) { \
- if (c == '\n') \
- break; \
- } \
- } while (0)
-
#define INPUT_DENSE(name) do { \
INPUT_VAL(name->nb_inputs); \
INPUT_VAL(name->nb_neurons); \
ret->name ## _size = name->nb_neurons; \
INPUT_ACTIVATION(name->activation); \
- NEW_LINE(); \
INPUT_ARRAY(name->input_weights, name->nb_inputs * name->nb_neurons); \
- NEW_LINE(); \
INPUT_ARRAY(name->bias, name->nb_neurons); \
- NEW_LINE(); \
} while (0)
#define INPUT_GRU(name) do { \
@@ -302,13 +290,9 @@
INPUT_VAL(name->nb_neurons); \
ret->name ## _size = name->nb_neurons; \
INPUT_ACTIVATION(name->activation); \
- NEW_LINE(); \
INPUT_ARRAY3(name->input_weights, name->nb_inputs, name->nb_neurons, 3); \
- NEW_LINE(); \
INPUT_ARRAY3(name->recurrent_weights, name->nb_neurons, name->nb_neurons, 3); \
- NEW_LINE(); \
INPUT_ARRAY(name->bias, name->nb_neurons * 3); \
- NEW_LINE(); \
} while (0)
INPUT_DENSE(input_dense);
@@ -320,12 +304,10 @@
if (vad_output->nb_neurons != 1) {
rnnoise_model_free(ret);
- return AVERROR(EINVAL);
+ return NULL;
}
- *rnn = ret;
-
- return 0;
+ return ret;
}
static int query_formats(AVFilterContext *ctx)
@@ -367,34 +349,27 @@
s->channels = inlink->channels;
- if (!s->st)
- s->st = av_calloc(s->channels, sizeof(DenoiseState));
+ s->st = av_calloc(s->channels, sizeof(DenoiseState));
if (!s->st)
return AVERROR(ENOMEM);
for (int i = 0; i < s->channels; i++) {
DenoiseState *st = &s->st[i];
- st->rnn[0].model = s->model[0];
- st->rnn[0].vad_gru_state = av_calloc(sizeof(float), FFALIGN(s->model[0]->vad_gru_size, 16));
- st->rnn[0].noise_gru_state = av_calloc(sizeof(float), FFALIGN(s->model[0]->noise_gru_size, 16));
- st->rnn[0].denoise_gru_state = av_calloc(sizeof(float), FFALIGN(s->model[0]->denoise_gru_size, 16));
- if (!st->rnn[0].vad_gru_state ||
- !st->rnn[0].noise_gru_state ||
- !st->rnn[0].denoise_gru_state)
+ st->rnn.model = s->model;
+ st->rnn.vad_gru_state = av_calloc(sizeof(float), FFALIGN(s->model->vad_gru_size, 16));
+ st->rnn.noise_gru_state = av_calloc(sizeof(float), FFALIGN(s->model->noise_gru_size, 16));
+ st->rnn.denoise_gru_state = av_calloc(sizeof(float), FFALIGN(s->model->denoise_gru_size, 16));
+ if (!st->rnn.vad_gru_state ||
+ !st->rnn.noise_gru_state ||
+ !st->rnn.denoise_gru_state)
return AVERROR(ENOMEM);
- }
- for (int i = 0; i < s->channels; i++) {
- DenoiseState *st = &s->st[i];
-
- if (!st->tx)
- ret = av_tx_init(&st->tx, &st->tx_fn, AV_TX_FLOAT_FFT, 0, WINDOW_SIZE, NULL, 0);
+ ret = av_tx_init(&st->tx, &st->tx_fn, AV_TX_FLOAT_FFT, 0, WINDOW_SIZE, NULL, 0);
if (ret < 0)
return ret;
- if (!st->txi)
- ret = av_tx_init(&st->txi, &st->txi_fn, AV_TX_FLOAT_FFT, 1, WINDOW_SIZE, NULL, 0);
+ ret = av_tx_init(&st->txi, &st->txi_fn, AV_TX_FLOAT_FFT, 1, WINDOW_SIZE, NULL, 0);
if (ret < 0)
return ret;
}
@@ -1392,7 +1367,7 @@
silence = compute_frame_features(s, st, X, P, Ex, Ep, Exp, features, x);
if (!silence && !disabled) {
- compute_rnn(s, &st->rnn[0], g, &vad_prob, features);
+ compute_rnn(s, &st->rnn, g, &vad_prob, features);
pitch_filter(X, P, Ex, Ep, Exp, g);
for (int i = 0; i < NB_BANDS; i++) {
float alpha = .6f;
@@ -1482,40 +1457,25 @@
return FFERROR_NOT_READY;
}
-static int open_model(AVFilterContext *ctx, RNNModel **model)
-{
- AudioRNNContext *s = ctx->priv;
- int ret;
- FILE *f;
-
- if (!s->model_name)
- return AVERROR(EINVAL);
- f = av_fopen_utf8(s->model_name, "r");
- if (!f) {
- av_log(ctx, AV_LOG_ERROR, "Failed to open model file: %s\n", s->model_name);
- return AVERROR(EINVAL);
- }
-
- ret = rnnoise_model_from_file(f, model);
- fclose(f);
- if (!*model || ret < 0)
- return ret;
-
- return 0;
-}
-
static av_cold int init(AVFilterContext *ctx)
{
AudioRNNContext *s = ctx->priv;
- int ret;
+ FILE *f;
s->fdsp = avpriv_float_dsp_alloc(0);
if (!s->fdsp)
return AVERROR(ENOMEM);
- ret = open_model(ctx, &s->model[0]);
- if (ret < 0)
- return ret;
+ if (!s->model_name)
+ return AVERROR(EINVAL);
+ f = av_fopen_utf8(s->model_name, "r");
+ if (!f)
+ return AVERROR(EINVAL);
+
+ s->model = rnnoise_model_from_file(f);
+ fclose(f);
+ if (!s->model)
+ return AVERROR(EINVAL);
for (int i = 0; i < FRAME_SIZE; i++) {
s->window[i] = sin(.5*M_PI*sin(.5*M_PI*(i+.5)/FRAME_SIZE) * sin(.5*M_PI*(i+.5)/FRAME_SIZE));
@@ -1533,59 +1493,22 @@
return 0;
}
-static void free_model(AVFilterContext *ctx, int n)
-{
- AudioRNNContext *s = ctx->priv;
-
- rnnoise_model_free(s->model[n]);
- s->model[n] = NULL;
-
- for (int ch = 0; ch < s->channels && s->st; ch++) {
- av_freep(&s->st[ch].rnn[n].vad_gru_state);
- av_freep(&s->st[ch].rnn[n].noise_gru_state);
- av_freep(&s->st[ch].rnn[n].denoise_gru_state);
- }
-}
-
-static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
- char *res, int res_len, int flags)
-{
- AudioRNNContext *s = ctx->priv;
- int ret;
-
- ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
- if (ret < 0)
- return ret;
-
- ret = open_model(ctx, &s->model[1]);
- if (ret < 0)
- return ret;
-
- FFSWAP(RNNModel *, s->model[0], s->model[1]);
- for (int ch = 0; ch < s->channels; ch++)
- FFSWAP(RNNState, s->st[ch].rnn[0], s->st[ch].rnn[1]);
-
- ret = config_input(ctx->inputs[0]);
- if (ret < 0) {
- for (int ch = 0; ch < s->channels; ch++)
- FFSWAP(RNNState, s->st[ch].rnn[0], s->st[ch].rnn[1]);
- FFSWAP(RNNModel *, s->model[0], s->model[1]);
- return ret;
- }
-
- free_model(ctx, 1);
- return 0;
-}
-
static av_cold void uninit(AVFilterContext *ctx)
{
AudioRNNContext *s = ctx->priv;
av_freep(&s->fdsp);
- free_model(ctx, 0);
- for (int ch = 0; ch < s->channels && s->st; ch++) {
- av_tx_uninit(&s->st[ch].tx);
- av_tx_uninit(&s->st[ch].txi);
+ rnnoise_model_free(s->model);
+ s->model = NULL;
+
+ if (s->st) {
+ for (int ch = 0; ch < s->channels; ch++) {
+ av_freep(&s->st[ch].rnn.vad_gru_state);
+ av_freep(&s->st[ch].rnn.noise_gru_state);
+ av_freep(&s->st[ch].rnn.denoise_gru_state);
+ av_tx_uninit(&s->st[ch].tx);
+ av_tx_uninit(&s->st[ch].txi);
+ }
}
av_freep(&s->st);
}
@@ -1608,7 +1531,7 @@
};
#define OFFSET(x) offsetof(AudioRNNContext, x)
-#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
+#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption arnndn_options[] = {
{ "model", "set model name", OFFSET(model_name), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, AF },
@@ -1632,5 +1555,4 @@
.outputs = outputs,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
AVFILTER_FLAG_SLICE_THREADS,
- .process_command = process_command,
};
diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c
index 4900cb6..aaae3c6 100644
--- a/libavfilter/af_asoftclip.c
+++ b/libavfilter/af_asoftclip.c
@@ -45,8 +45,6 @@
int type;
int oversample;
int64_t delay;
- double threshold;
- double output;
double param;
SwrContext *up_ctx;
@@ -73,8 +71,6 @@
{ "quintic", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ASC_QUINTIC},0, 0, A, "types" },
{ "sin", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ASC_SIN}, 0, 0, A, "types" },
{ "erf", NULL, 0, AV_OPT_TYPE_CONST, {.i64=ASC_ERF}, 0, 0, A, "types" },
- { "threshold", "set softclip threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.000001, 1, A },
- { "output", "set softclip output gain", OFFSET(output), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.000001, 16, A },
{ "param", "set softclip parameter", OFFSET(param), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.01, 3, A },
{ "oversample", "set oversample factor", OFFSET(oversample), AV_OPT_TYPE_INT, {.i64=1}, 1, 32, F },
{ NULL }
@@ -112,14 +108,13 @@
return ff_set_common_samplerates(ctx, formats);
}
+#define SQR(x) ((x) * (x))
+
static void filter_flt(ASoftClipContext *s,
void **dptr, const void **sptr,
int nb_samples, int channels,
int start, int end)
{
- float threshold = s->threshold;
- float gain = s->output * threshold;
- float factor = 1.f / threshold;
float param = s->param;
for (int c = start; c < end; c++) {
@@ -129,73 +124,53 @@
switch (s->type) {
case ASC_HARD:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = av_clipf(src[n] * factor, -1.f, 1.f);
- dst[n] *= gain;
+ dst[n] = av_clipf(src[n], -1.f, 1.f);
}
break;
case ASC_TANH:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = tanhf(src[n] * factor * param);
- dst[n] *= gain;
+ dst[n] = tanhf(src[n] * param);
}
break;
case ASC_ATAN:
- for (int n = 0; n < nb_samples; n++) {
- dst[n] = 2.f / M_PI * atanf(src[n] * factor * param);
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = 2.f / M_PI * atanf(src[n] * param);
break;
case ASC_CUBIC:
for (int n = 0; n < nb_samples; n++) {
- float sample = src[n] * factor;
-
- if (FFABS(sample) >= 1.5f)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= 1.5f)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sample - 0.1481f * powf(sample, 3.f);
- dst[n] *= gain;
+ dst[n] = src[n] - 0.1481f * powf(src[n], 3.f);
}
break;
case ASC_EXP:
- for (int n = 0; n < nb_samples; n++) {
- dst[n] = 2.f / (1.f + expf(-2.f * src[n] * factor)) - 1.;
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = 2.f / (1.f + expf(-2.f * src[n])) - 1.;
break;
case ASC_ALG:
- for (int n = 0; n < nb_samples; n++) {
- float sample = src[n] * factor;
-
- dst[n] = sample / (sqrtf(param + sample * sample));
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = src[n] / (sqrtf(param + src[n] * src[n]));
break;
case ASC_QUINTIC:
for (int n = 0; n < nb_samples; n++) {
- float sample = src[n] * factor;
-
- if (FFABS(sample) >= 1.25)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= 1.25)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sample - 0.08192f * powf(sample, 5.f);
- dst[n] *= gain;
+ dst[n] = src[n] - 0.08192f * powf(src[n], 5.f);
}
break;
case ASC_SIN:
for (int n = 0; n < nb_samples; n++) {
- float sample = src[n] * factor;
-
- if (FFABS(sample) >= M_PI_2)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= M_PI_2)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sinf(sample);
- dst[n] *= gain;
+ dst[n] = sinf(src[n]);
}
break;
case ASC_ERF:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = erff(src[n] * factor);
- dst[n] *= gain;
+ dst[n] = erff(src[n]);
}
break;
default:
@@ -209,9 +184,6 @@
int nb_samples, int channels,
int start, int end)
{
- double threshold = s->threshold;
- double gain = s->output * threshold;
- double factor = 1. / threshold;
double param = s->param;
for (int c = start; c < end; c++) {
@@ -221,73 +193,53 @@
switch (s->type) {
case ASC_HARD:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = av_clipd(src[n] * factor, -1., 1.);
- dst[n] *= gain;
+ dst[n] = av_clipd(src[n], -1., 1.);
}
break;
case ASC_TANH:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = tanh(src[n] * factor * param);
- dst[n] *= gain;
+ dst[n] = tanh(src[n] * param);
}
break;
case ASC_ATAN:
- for (int n = 0; n < nb_samples; n++) {
- dst[n] = 2. / M_PI * atan(src[n] * factor * param);
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = 2. / M_PI * atan(src[n] * param);
break;
case ASC_CUBIC:
for (int n = 0; n < nb_samples; n++) {
- double sample = src[n] * factor;
-
- if (FFABS(sample) >= 1.5)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= 1.5)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sample - 0.1481 * pow(sample, 3.);
- dst[n] *= gain;
+ dst[n] = src[n] - 0.1481 * pow(src[n], 3.);
}
break;
case ASC_EXP:
- for (int n = 0; n < nb_samples; n++) {
- dst[n] = 2. / (1. + exp(-2. * src[n] * factor)) - 1.;
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = 2. / (1. + exp(-2. * src[n])) - 1.;
break;
case ASC_ALG:
- for (int n = 0; n < nb_samples; n++) {
- double sample = src[n] * factor;
-
- dst[n] = sample / (sqrt(param + sample * sample));
- dst[n] *= gain;
- }
+ for (int n = 0; n < nb_samples; n++)
+ dst[n] = src[n] / (sqrt(param + src[n] * src[n]));
break;
case ASC_QUINTIC:
for (int n = 0; n < nb_samples; n++) {
- double sample = src[n] * factor;
-
- if (FFABS(sample) >= 1.25)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= 1.25)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sample - 0.08192 * pow(sample, 5.);
- dst[n] *= gain;
+ dst[n] = src[n] - 0.08192 * pow(src[n], 5.);
}
break;
case ASC_SIN:
for (int n = 0; n < nb_samples; n++) {
- double sample = src[n] * factor;
-
- if (FFABS(sample) >= M_PI_2)
- dst[n] = FFSIGN(sample);
+ if (FFABS(src[n]) >= M_PI_2)
+ dst[n] = FFSIGN(src[n]);
else
- dst[n] = sin(sample);
- dst[n] *= gain;
+ dst[n] = sin(src[n]);
}
break;
case ASC_ERF:
for (int n = 0; n < nb_samples; n++) {
- dst[n] = erf(src[n] * factor);
- dst[n] *= gain;
+ dst[n] = erf(src[n]);
}
break;
default:
diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c
index f50cbe1..2703638 100644
--- a/libavfilter/af_astats.c
+++ b/libavfilter/af_astats.c
@@ -329,11 +329,11 @@
drop = p->win_samples[p->win_pos];
p->win_samples[p->win_pos] = nd;
- index = av_clip(lrint(av_clipd(FFABS(nd), 0.0, 1.0) * HISTOGRAM_MAX), 0, HISTOGRAM_MAX);
+ index = av_clip(FFABS(nd) * HISTOGRAM_MAX, 0, HISTOGRAM_MAX);
p->max_index = FFMAX(p->max_index, index);
p->histogram[index]++;
if (!isnan(p->noise_floor))
- p->histogram[av_clip(lrint(av_clipd(FFABS(drop), 0.0, 1.0) * HISTOGRAM_MAX), 0, HISTOGRAM_MAX)]--;
+ p->histogram[av_clip(FFABS(drop) * HISTOGRAM_MAX, 0, HISTOGRAM_MAX)]--;
p->win_pos++;
while (p->histogram[p->max_index] == 0)
diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c
index d5c9a75..89f4cf0 100644
--- a/libavfilter/af_asupercut.c
+++ b/libavfilter/af_asupercut.c
@@ -405,7 +405,7 @@
AVFILTER_FLAG_SLICE_THREADS,
};
-static const AVOption asuperpass_asuperstop_options[] = {
+static const AVOption asuperpass_options[] = {
{ "centerf","set center frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 999999, FLAGS },
{ "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=4}, 4, 20, FLAGS },
{ "qfactor","set Q-factor", OFFSET(qfactor),AV_OPT_TYPE_DOUBLE, {.dbl=1.},0.01, 100., FLAGS },
@@ -413,7 +413,6 @@
{ NULL }
};
-#define asuperpass_options asuperpass_asuperstop_options
AVFILTER_DEFINE_CLASS(asuperpass);
AVFilter ff_af_asuperpass = {
@@ -430,7 +429,14 @@
AVFILTER_FLAG_SLICE_THREADS,
};
-#define asuperstop_options asuperpass_asuperstop_options
+static const AVOption asuperstop_options[] = {
+ { "centerf","set center frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 999999, FLAGS },
+ { "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=4}, 4, 20, FLAGS },
+ { "qfactor","set Q-factor", OFFSET(qfactor),AV_OPT_TYPE_DOUBLE, {.dbl=1.},0.01, 100., FLAGS },
+ { "level", "set input level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0., 2., FLAGS },
+ { NULL }
+};
+
AVFILTER_DEFINE_CLASS(asuperstop);
AVFilter ff_af_asuperstop = {
diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c
index 4a09f82..edefe15 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -514,54 +514,22 @@
case bass:
beta = sqrt((A * A + 1) - (A - 1) * (A - 1));
case lowshelf:
- if (s->poles == 1) {
- double A = ff_exp10(s->gain / 20);
- double ro = -sin(w0 / 2. - M_PI_4) / sin(w0 / 2. + M_PI_4);
- double n = (A + 1) / (A - 1);
- double alpha1 = A == 1. ? 0. : n - FFSIGN(n) * sqrt(n * n - 1);
- double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5;
- double beta1 = ((1 - A) + (1 + A) * alpha1) * 0.5;
-
- s->a0 = 1 + ro * alpha1;
- s->a1 = -ro - alpha1;
- s->a2 = 0;
- s->b0 = beta0 + ro * beta1;
- s->b1 = -beta1 - ro * beta0;
- s->b2 = 0;
- } else {
- s->a0 = (A + 1) + (A - 1) * cos(w0) + beta * alpha;
- s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));
- s->a2 = (A + 1) + (A - 1) * cos(w0) - beta * alpha;
- s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + beta * alpha);
- s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0));
- s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - beta * alpha);
- }
+ s->a0 = (A + 1) + (A - 1) * cos(w0) + beta * alpha;
+ s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));
+ s->a2 = (A + 1) + (A - 1) * cos(w0) - beta * alpha;
+ s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + beta * alpha);
+ s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0));
+ s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - beta * alpha);
break;
case treble:
beta = sqrt((A * A + 1) - (A - 1) * (A - 1));
case highshelf:
- if (s->poles == 1) {
- double A = ff_exp10(s->gain / 20);
- double ro = sin(w0 / 2. - M_PI_4) / sin(w0 / 2. + M_PI_4);
- double n = (A + 1) / (A - 1);
- double alpha1 = A == 1. ? 0. : n - FFSIGN(n) * sqrt(n * n - 1);
- double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5;
- double beta1 = ((1 - A) + (1 + A) * alpha1) * 0.5;
-
- s->a0 = 1 + ro * alpha1;
- s->a1 = ro + alpha1;
- s->a2 = 0;
- s->b0 = beta0 + ro * beta1;
- s->b1 = beta1 + ro * beta0;
- s->b2 = 0;
- } else {
- s->a0 = (A + 1) - (A - 1) * cos(w0) + beta * alpha;
- s->a1 = 2 * ((A - 1) - (A + 1) * cos(w0));
- s->a2 = (A + 1) - (A - 1) * cos(w0) - beta * alpha;
- s->b0 = A * ((A + 1) + (A - 1) * cos(w0) + beta * alpha);
- s->b1 =-2 * A * ((A - 1) + (A + 1) * cos(w0));
- s->b2 = A * ((A + 1) + (A - 1) * cos(w0) - beta * alpha);
- }
+ s->a0 = (A + 1) - (A - 1) * cos(w0) + beta * alpha;
+ s->a1 = 2 * ((A - 1) - (A + 1) * cos(w0));
+ s->a2 = (A + 1) - (A - 1) * cos(w0) - beta * alpha;
+ s->b0 = A * ((A + 1) + (A - 1) * cos(w0) + beta * alpha);
+ s->b1 =-2 * A * ((A - 1) + (A + 1) * cos(w0));
+ s->b2 = A * ((A + 1) + (A - 1) * cos(w0) - beta * alpha);
break;
case bandpass:
if (s->csg) {
@@ -873,6 +841,7 @@
static av_cold int name_##_init(AVFilterContext *ctx) \
{ \
BiquadsContext *s = ctx->priv; \
+ s->class = &name_##_class; \
s->filter_type = name_; \
return 0; \
} \
@@ -930,8 +899,8 @@
DEFINE_BIQUAD_FILTER(equalizer, "Apply two-pole peaking equalization (EQ) filter.");
#endif /* CONFIG_EQUALIZER_FILTER */
-#if CONFIG_BASS_FILTER || CONFIG_LOWSHELF_FILTER
-static const AVOption bass_lowshelf_options[] = {
+#if CONFIG_BASS_FILTER
+static const AVOption bass_options[] = {
{"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
{"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
{"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
@@ -945,8 +914,6 @@
{"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
{"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
{"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
- {"poles", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF},
- {"p", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF},
{"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
{"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
{"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
@@ -969,18 +936,10 @@
{NULL}
};
-#if CONFIG_BASS_FILTER
-#define bass_options bass_lowshelf_options
DEFINE_BIQUAD_FILTER(bass, "Boost or cut lower frequencies.");
#endif /* CONFIG_BASS_FILTER */
-
-#if CONFIG_LOWSHELF_FILTER
-#define lowshelf_options bass_lowshelf_options
-DEFINE_BIQUAD_FILTER(lowshelf, "Apply a low shelf filter.");
-#endif /* CONFIG_LOWSHELF_FILTER */
-#endif /* CONFIG_BASS_FILTER || CONFIG LOWSHELF_FILTER */
-#if CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER
-static const AVOption treble_highshelf_options[] = {
+#if CONFIG_TREBLE_FILTER
+static const AVOption treble_options[] = {
{"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
{"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
{"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
@@ -994,8 +953,6 @@
{"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
{"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
{"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
- {"poles", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF},
- {"p", "set number of poles", OFFSET(poles), AV_OPT_TYPE_INT, {.i64=2}, 1, 2, AF},
{"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
{"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
{"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
@@ -1018,16 +975,8 @@
{NULL}
};
-#if CONFIG_TREBLE_FILTER
-#define treble_options treble_highshelf_options
DEFINE_BIQUAD_FILTER(treble, "Boost or cut upper frequencies.");
#endif /* CONFIG_TREBLE_FILTER */
-
-#if CONFIG_HIGHSHELF_FILTER
-#define highshelf_options treble_highshelf_options
-DEFINE_BIQUAD_FILTER(highshelf, "Apply a high shelf filter.");
-#endif /* CONFIG_HIGHSHELF_FILTER */
-#endif /* CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER */
#if CONFIG_BANDPASS_FILTER
static const AVOption bandpass_options[] = {
{"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
@@ -1220,6 +1169,84 @@
DEFINE_BIQUAD_FILTER(allpass, "Apply a two-pole all-pass filter.");
#endif /* CONFIG_ALLPASS_FILTER */
+#if CONFIG_LOWSHELF_FILTER
+static const AVOption lowshelf_options[] = {
+ {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
+ {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 0, 999999, FLAGS},
+ {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
+ {"t", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
+ {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HERTZ}, 0, 0, FLAGS, "width_type"},
+ {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
+ {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
+ {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
+ {"k", "kHz", 0, AV_OPT_TYPE_CONST, {.i64=KHERTZ}, 0, 0, FLAGS, "width_type"},
+ {"width", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
+ {"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
+ {"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
+ {"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
+ {"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
+ {"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
+ {"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
+ {"c", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
+ {"normalize", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"n", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"transform", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"},
+ {"a", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"},
+ {"di", "direct form I", 0, AV_OPT_TYPE_CONST, {.i64=DI}, 0, 0, AF, "transform_type"},
+ {"dii", "direct form II", 0, AV_OPT_TYPE_CONST, {.i64=DII}, 0, 0, AF, "transform_type"},
+ {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
+ {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
+ {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
+ {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
+ {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
+ {"s16", "signed 16-bit", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "precision"},
+ {"s32", "signed 32-bit", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "precision"},
+ {"f32", "floating-point single", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, "precision"},
+ {"f64", "floating-point double", 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, AF, "precision"},
+ {NULL}
+};
+
+DEFINE_BIQUAD_FILTER(lowshelf, "Apply a low shelf filter.");
+#endif /* CONFIG_LOWSHELF_FILTER */
+#if CONFIG_HIGHSHELF_FILTER
+static const AVOption highshelf_options[] = {
+ {"frequency", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
+ {"f", "set central frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=3000}, 0, 999999, FLAGS},
+ {"width_type", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
+ {"t", "set filter-width type", OFFSET(width_type), AV_OPT_TYPE_INT, {.i64=QFACTOR}, HERTZ, NB_WTYPE-1, FLAGS, "width_type"},
+ {"h", "Hz", 0, AV_OPT_TYPE_CONST, {.i64=HERTZ}, 0, 0, FLAGS, "width_type"},
+ {"q", "Q-Factor", 0, AV_OPT_TYPE_CONST, {.i64=QFACTOR}, 0, 0, FLAGS, "width_type"},
+ {"o", "octave", 0, AV_OPT_TYPE_CONST, {.i64=OCTAVE}, 0, 0, FLAGS, "width_type"},
+ {"s", "slope", 0, AV_OPT_TYPE_CONST, {.i64=SLOPE}, 0, 0, FLAGS, "width_type"},
+ {"k", "kHz", 0, AV_OPT_TYPE_CONST, {.i64=KHERTZ}, 0, 0, FLAGS, "width_type"},
+ {"width", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
+ {"w", "set shelf transition steep", OFFSET(width), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0, 99999, FLAGS},
+ {"gain", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
+ {"g", "set gain", OFFSET(gain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -900, 900, FLAGS},
+ {"mix", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
+ {"m", "set mix", OFFSET(mix), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 1, FLAGS},
+ {"channels", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
+ {"c", "set channels to filter", OFFSET(channels), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64=-1}, INT64_MIN, INT64_MAX, FLAGS},
+ {"normalize", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"n", "normalize coefficients", OFFSET(normalize), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
+ {"transform", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"},
+ {"a", "set transform type", OFFSET(transform_type), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_TTYPE-1, AF, "transform_type"},
+ {"di", "direct form I", 0, AV_OPT_TYPE_CONST, {.i64=DI}, 0, 0, AF, "transform_type"},
+ {"dii", "direct form II", 0, AV_OPT_TYPE_CONST, {.i64=DII}, 0, 0, AF, "transform_type"},
+ {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
+ {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
+ {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
+ {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
+ {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
+ {"s16", "signed 16-bit", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "precision"},
+ {"s32", "signed 32-bit", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "precision"},
+ {"f32", "floating-point single", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, "precision"},
+ {"f64", "floating-point double", 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, AF, "precision"},
+ {NULL}
+};
+
+DEFINE_BIQUAD_FILTER(highshelf, "Apply a high shelf filter.");
+#endif /* CONFIG_HIGHSHELF_FILTER */
#if CONFIG_BIQUAD_FILTER
static const AVOption biquad_options[] = {
{"a0", NULL, OFFSET(oa0), AV_OPT_TYPE_DOUBLE, {.dbl=1}, INT32_MIN, INT32_MAX, FLAGS},
diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c
index d1f4498..f3d8ae6 100644
--- a/libavfilter/af_crystalizer.c
+++ b/libavfilter/af_crystalizer.c
@@ -36,7 +36,7 @@
#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
static const AVOption crystalizer_options[] = {
- { "i", "set intensity", OFFSET(mult), AV_OPT_TYPE_FLOAT, {.dbl=2.0},-10, 10, A },
+ { "i", "set intensity", OFFSET(mult), AV_OPT_TYPE_FLOAT, {.dbl=2.0}, 0, 10, A },
{ "c", "enable clipping", OFFSET(clip), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, A },
{ NULL }
};
@@ -91,7 +91,7 @@
const void **s = td->s;
const int nb_samples = td->nb_samples;
const int channels = td->channels;
- const float mult = td->mult;
+ float mult = td->mult;
const int clip = td->clip;
const int start = (channels * jobnr) / nb_jobs;
const int end = (channels * (jobnr+1)) / nb_jobs;
@@ -126,7 +126,7 @@
const void **s = td->s;
const int nb_samples = td->nb_samples;
const int channels = td->channels;
- double mult = td->mult;
+ float mult = td->mult;
const int clip = td->clip;
const int start = (channels * jobnr) / nb_jobs;
const int end = (channels * (jobnr+1)) / nb_jobs;
@@ -195,7 +195,7 @@
const void **s = td->s;
const int nb_samples = td->nb_samples;
const int channels = td->channels;
- const double mult = td->mult;
+ float mult = td->mult;
const int clip = td->clip;
const int start = (channels * jobnr) / nb_jobs;
const int end = (channels * (jobnr+1)) / nb_jobs;
@@ -220,157 +220,16 @@
return 0;
}
-static int ifilter_flt(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
-{
- ThreadData *td = arg;
- void **d = td->d;
- void **p = td->p;
- const void **s = td->s;
- const int nb_samples = td->nb_samples;
- const int channels = td->channels;
- const float mult = -td->mult;
- const float div = -td->mult + 1.f;
- const int clip = td->clip;
- const int start = (channels * jobnr) / nb_jobs;
- const int end = (channels * (jobnr+1)) / nb_jobs;
- float *prv = p[0];
- int n, c;
-
- for (c = start; c < end; c++) {
- const float *src = s[0];
- float *dst = d[0];
-
- for (n = 0; n < nb_samples; n++) {
- float current = src[c];
- dst[c] = (current + prv[c] * mult) / div;
- prv[c] = dst[c];
- if (clip) {
- dst[c] = av_clipf(dst[c], -1, 1);
- }
-
- dst += channels;
- src += channels;
- }
- }
-
- return 0;
-}
-
-static int ifilter_dbl(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
-{
- ThreadData *td = arg;
- void **d = td->d;
- void **p = td->p;
- const void **s = td->s;
- const int nb_samples = td->nb_samples;
- const int channels = td->channels;
- const double mult = -td->mult;
- const double div = -td->mult + 1.f;
- const int clip = td->clip;
- const int start = (channels * jobnr) / nb_jobs;
- const int end = (channels * (jobnr+1)) / nb_jobs;
- double *prv = p[0];
- int n, c;
-
- for (c = start; c < end; c++) {
- const double *src = s[0];
- double *dst = d[0];
-
- for (n = 0; n < nb_samples; n++) {
- double current = src[c];
-
- dst[c] = (current + prv[c] * mult) / div;
- prv[c] = dst[c];
- if (clip) {
- dst[c] = av_clipd(dst[c], -1, 1);
- }
-
- dst += channels;
- src += channels;
- }
- }
-
- return 0;
-}
-
-static int ifilter_fltp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
-{
- ThreadData *td = arg;
- void **d = td->d;
- void **p = td->p;
- const void **s = td->s;
- const int nb_samples = td->nb_samples;
- const int channels = td->channels;
- const float mult = -td->mult;
- const float div = -td->mult + 1.f;
- const int clip = td->clip;
- const int start = (channels * jobnr) / nb_jobs;
- const int end = (channels * (jobnr+1)) / nb_jobs;
- int n, c;
-
- for (c = start; c < end; c++) {
- const float *src = s[c];
- float *dst = d[c];
- float *prv = p[c];
-
- for (n = 0; n < nb_samples; n++) {
- float current = src[n];
-
- dst[n] = (current + prv[0] * mult) / div;
- prv[0] = dst[n];
- if (clip) {
- dst[n] = av_clipf(dst[n], -1, 1);
- }
- }
- }
-
- return 0;
-}
-
-static int ifilter_dblp(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
-{
- ThreadData *td = arg;
- void **d = td->d;
- void **p = td->p;
- const void **s = td->s;
- const int nb_samples = td->nb_samples;
- const int channels = td->channels;
- const double mult = -td->mult;
- const double div = -td->mult + 1.f;
- const int clip = td->clip;
- const int start = (channels * jobnr) / nb_jobs;
- const int end = (channels * (jobnr+1)) / nb_jobs;
- int n, c;
-
- for (c = start; c < end; c++) {
- const double *src = s[c];
- double *dst = d[c];
- double *prv = p[c];
-
- for (n = 0; n < nb_samples; n++) {
- double current = src[n];
-
- dst[n] = (current + prv[0] * mult) / div;
- prv[0] = dst[n];
- if (clip) {
- dst[n] = av_clipd(dst[n], -1, 1);
- }
- }
- }
-
- return 0;
-}
-
static int config_input(AVFilterLink *inlink)
{
AVFilterContext *ctx = inlink->dst;
CrystalizerContext *s = ctx->priv;
switch (inlink->format) {
- case AV_SAMPLE_FMT_FLT: s->filter = s->mult >= 0.f ? filter_flt : ifilter_flt; break;
- case AV_SAMPLE_FMT_DBL: s->filter = s->mult >= 0.f ? filter_dbl : ifilter_dbl; break;
- case AV_SAMPLE_FMT_FLTP: s->filter = s->mult >= 0.f ? filter_fltp : ifilter_fltp; break;
- case AV_SAMPLE_FMT_DBLP: s->filter = s->mult >= 0.f ? filter_dblp : ifilter_dblp; break;
+ case AV_SAMPLE_FMT_FLT: s->filter = filter_flt; break;
+ case AV_SAMPLE_FMT_DBL: s->filter = filter_dbl; break;
+ case AV_SAMPLE_FMT_FLTP: s->filter = filter_fltp; break;
+ case AV_SAMPLE_FMT_DBLP: s->filter = filter_dblp; break;
}
return 0;
@@ -426,18 +285,6 @@
av_frame_free(&s->prev);
}
-static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
- char *res, int res_len, int flags)
-{
- int ret;
-
- ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
- if (ret < 0)
- return ret;
-
- return config_input(ctx->inputs[0]);
-}
-
static const AVFilterPad inputs[] = {
{
.name = "default",
@@ -458,14 +305,14 @@
AVFilter ff_af_crystalizer = {
.name = "crystalizer",
- .description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."),
+ .description = NULL_IF_CONFIG_SMALL("Simple expand audio dynamic range filter."),
.query_formats = query_formats,
.priv_size = sizeof(CrystalizerContext),
.priv_class = &crystalizer_class,
.uninit = uninit,
.inputs = inputs,
.outputs = outputs,
- .process_command = process_command,
+ .process_command = ff_filter_process_command,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
AVFILTER_FLAG_SLICE_THREADS,
};
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index 81fa62b..365453d 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -719,7 +719,6 @@
cqueue_dequeue(s->is_enabled, &is_enabled);
amplify_frame(s, out, is_enabled > 0.);
- s->pts = out->pts + out->nb_samples;
ret = ff_filter_frame(outlink, out);
}
@@ -770,7 +769,7 @@
} else if (s->queue.available) {
AVFrame *out = ff_bufqueue_get(&s->queue);
- s->pts = out->pts + out->nb_samples;
+ s->pts = out->pts;
ret = ff_filter_frame(outlink, out);
}
@@ -798,7 +797,7 @@
return ret;
}
- if (ff_inlink_check_available_samples(inlink, s->frame_len) > 0) {
+ if (ff_inlink_queued_samples(inlink) >= s->frame_len) {
ff_filter_set_ready(ctx, 10);
return 0;
}
diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c
index 6baeb7f..f55e8e2 100644
--- a/libavfilter/af_tremolo.c
+++ b/libavfilter/af_tremolo.c
@@ -126,7 +126,7 @@
const double offset = 1. - s->depth / 2.;
int i;
- s->table_size = lrint(inlink->sample_rate / s->freq + 0.5);
+ s->table_size = inlink->sample_rate / s->freq;
s->table = av_malloc_array(s->table_size, sizeof(*s->table));
if (!s->table)
return AVERROR(ENOMEM);
diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c
index 5db1f0f..22bbab6 100644
--- a/libavfilter/af_vibrato.c
+++ b/libavfilter/af_vibrato.c
@@ -162,7 +162,7 @@
s->buf = av_calloc(inlink->channels, sizeof(*s->buf));
if (!s->buf)
return AVERROR(ENOMEM);
- s->buf_size = lrint(inlink->sample_rate * 0.005 + 0.5);
+ s->buf_size = inlink->sample_rate * 0.005;
for (c = 0; c < s->channels; c++) {
s->buf[c] = av_malloc_array(s->buf_size, sizeof(*s->buf[c]));
if (!s->buf[c])
@@ -170,7 +170,7 @@
}
s->buf_index = 0;
- s->wave_table_size = lrint(inlink->sample_rate / s->freq + 0.5);
+ s->wave_table_size = inlink->sample_rate / s->freq;
s->wave_table = av_malloc_array(s->wave_table_size, sizeof(*s->wave_table));
if (!s->wave_table)
return AVERROR(ENOMEM);
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 0872c6e..a145d0a 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -39,7 +39,6 @@
extern AVFilter ff_af_aecho;
extern AVFilter ff_af_aemphasis;
extern AVFilter ff_af_aeval;
-extern AVFilter ff_af_aexciter;
extern AVFilter ff_af_afade;
extern AVFilter ff_af_afftdn;
extern AVFilter ff_af_afftfilt;
@@ -187,16 +186,12 @@
extern AVFilter ff_vf_codecview;
extern AVFilter ff_vf_colorbalance;
extern AVFilter ff_vf_colorchannelmixer;
-extern AVFilter ff_vf_colorcontrast;
-extern AVFilter ff_vf_colorcorrect;
-extern AVFilter ff_vf_colorize;
extern AVFilter ff_vf_colorkey;
extern AVFilter ff_vf_colorkey_opencl;
extern AVFilter ff_vf_colorhold;
extern AVFilter ff_vf_colorlevels;
extern AVFilter ff_vf_colormatrix;
extern AVFilter ff_vf_colorspace;
-extern AVFilter ff_vf_colortemperature;
extern AVFilter ff_vf_convolution;
extern AVFilter ff_vf_convolution_opencl;
extern AVFilter ff_vf_convolve;
@@ -239,12 +234,9 @@
extern AVFilter ff_vf_edgedetect;
extern AVFilter ff_vf_elbg;
extern AVFilter ff_vf_entropy;
-extern AVFilter ff_vf_epx;
extern AVFilter ff_vf_eq;
extern AVFilter ff_vf_erosion;
extern AVFilter ff_vf_erosion_opencl;
-extern AVFilter ff_vf_estdif;
-extern AVFilter ff_vf_exposure;
extern AVFilter ff_vf_extractplanes;
extern AVFilter ff_vf_fade;
extern AVFilter ff_vf_fftdnoiz;
@@ -283,14 +275,12 @@
extern AVFilter ff_vf_hwupload;
extern AVFilter ff_vf_hwupload_cuda;
extern AVFilter ff_vf_hysteresis;
-extern AVFilter ff_vf_identity;
extern AVFilter ff_vf_idet;
extern AVFilter ff_vf_il;
extern AVFilter ff_vf_inflate;
extern AVFilter ff_vf_interlace;
extern AVFilter ff_vf_interleave;
extern AVFilter ff_vf_kerndeint;
-extern AVFilter ff_vf_kirsch;
extern AVFilter ff_vf_lagfun;
extern AVFilter ff_vf_lenscorrection;
extern AVFilter ff_vf_lensfun;
@@ -318,9 +308,7 @@
extern AVFilter ff_vf_midequalizer;
extern AVFilter ff_vf_minterpolate;
extern AVFilter ff_vf_mix;
-extern AVFilter ff_vf_monochrome;
extern AVFilter ff_vf_mpdecimate;
-extern AVFilter ff_vf_msad;
extern AVFilter ff_vf_negate;
extern AVFilter ff_vf_nlmeans;
extern AVFilter ff_vf_nlmeans_opencl;
@@ -394,11 +382,9 @@
extern AVFilter ff_vf_setsar;
extern AVFilter ff_vf_settb;
extern AVFilter ff_vf_sharpness_vaapi;
-extern AVFilter ff_vf_shear;
extern AVFilter ff_vf_showinfo;
extern AVFilter ff_vf_showpalette;
extern AVFilter ff_vf_shuffleframes;
-extern AVFilter ff_vf_shufflepixels;
extern AVFilter ff_vf_shuffleplanes;
extern AVFilter ff_vf_sidedata;
extern AVFilter ff_vf_signalstats;
@@ -426,7 +412,6 @@
extern AVFilter ff_vf_tinterlace;
extern AVFilter ff_vf_tlut2;
extern AVFilter ff_vf_tmedian;
-extern AVFilter ff_vf_tmidequalizer;
extern AVFilter ff_vf_tmix;
extern AVFilter ff_vf_tonemap;
extern AVFilter ff_vf_tonemap_opencl;
@@ -450,7 +435,6 @@
extern AVFilter ff_vf_vibrance;
extern AVFilter ff_vf_vidstabdetect;
extern AVFilter ff_vf_vidstabtransform;
-extern AVFilter ff_vf_vif;
extern AVFilter ff_vf_vignette;
extern AVFilter ff_vf_vmafmotion;
extern AVFilter ff_vf_vpp_qsv;
diff --git a/libavfilter/atadenoise.h b/libavfilter/atadenoise.h
index 7d92ece..26cb20b 100644
--- a/libavfilter/atadenoise.h
+++ b/libavfilter/atadenoise.h
@@ -31,12 +31,12 @@
};
typedef struct ATADenoiseDSPContext {
- void (*filter_row[4])(const uint8_t *src, uint8_t *dst,
- const uint8_t **srcf,
- int w, int mid, int size,
- int thra, int thrb, const float *weight);
+ void (*filter_row)(const uint8_t *src, uint8_t *dst,
+ const uint8_t **srcf,
+ int w, int mid, int size,
+ int thra, int thrb);
} ATADenoiseDSPContext;
-void ff_atadenoise_init_x86(ATADenoiseDSPContext *dsp, int depth, int algorithm, const float *sigma);
+void ff_atadenoise_init_x86(ATADenoiseDSPContext *dsp, int depth, int algorithm);
#endif /* AVFILTER_ATADENOISE_H */
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index dba1f08..115174a 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -1133,11 +1133,11 @@
int64_t last_time, cur_time;
#define UPDATE_TIME(t) \
- cur_time = av_gettime_relative(); \
+ cur_time = av_gettime(); \
t += cur_time - last_time; \
last_time = cur_time
- last_time = av_gettime_relative();
+ last_time = av_gettime();
memcpy(s->fft_result, s->fft_data, s->fft_len * sizeof(*s->fft_data));
if (s->attack_data) {
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 22ecad5..8ff22c7 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -232,12 +232,11 @@
ff_filter_set_ready(link->src, 200);
}
-#if FF_API_FILTER_LINK_SET_CLOSED
void avfilter_link_set_closed(AVFilterLink *link, int closed)
{
ff_avfilter_link_set_out_status(link, closed ? AVERROR_EOF : 0, AV_NOPTS_VALUE);
}
-#endif
+
int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt,
unsigned filt_srcpad_idx, unsigned filt_dstpad_idx)
{
@@ -621,12 +620,11 @@
#define OFFSET(x) offsetof(AVFilterContext, x)
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM
-#define TFLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
static const AVOption avfilter_options[] = {
{ "thread_type", "Allowed thread types", OFFSET(thread_type), AV_OPT_TYPE_FLAGS,
{ .i64 = AVFILTER_THREAD_SLICE }, 0, INT_MAX, FLAGS, "thread_type" },
{ "slice", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AVFILTER_THREAD_SLICE }, .flags = FLAGS, .unit = "thread_type" },
- { "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = TFLAGS },
+ { "enable", "set enable expression", OFFSET(enable_str), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "threads", "Allowed number of threads", OFFSET(nb_threads), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "extra_hw_frames", "Number of extra hardware frames to allocate for the user",
@@ -876,6 +874,11 @@
count++;
}
+ if (ctx->enable_str) {
+ ret = set_enable_expr(ctx, ctx->enable_str);
+ if (ret < 0)
+ return ret;
+ }
return count;
}
@@ -926,12 +929,6 @@
else if (ctx->filter->init_dict)
ret = ctx->filter->init_dict(ctx, options);
- if (ctx->enable_str) {
- ret = set_enable_expr(ctx, ctx->enable_str);
- if (ret < 0)
- return ret;
- }
-
return ret;
}
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index be12424..100183f 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -588,6 +588,11 @@
int channels;
/**
+ * Link processing flags.
+ */
+ unsigned flags;
+
+ /**
* Number of past frames sent through the link.
*/
int64_t frame_count_in, frame_count_out;
@@ -681,7 +686,7 @@
attribute_deprecated
int avfilter_link_get_channels(AVFilterLink *link);
#endif
-#if FF_API_FILTER_LINK_SET_CLOSED
+
/**
* Set the closed field of a link.
* @deprecated applications are not supposed to mess with links, they should
@@ -689,7 +694,7 @@
*/
attribute_deprecated
void avfilter_link_set_closed(AVFilterLink *link, int closed);
-#endif
+
/**
* Negotiate the media format, dimensions, etc of all inputs to a filter.
*
diff --git a/libavfilter/bbox.c b/libavfilter/bbox.c
index 3ed9045..be9b2e6 100644
--- a/libavfilter/bbox.c
+++ b/libavfilter/bbox.c
@@ -20,71 +20,56 @@
#include "bbox.h"
-#define BBOX(type, name) \
-static int bbox_##name(FFBoundingBox *bbox, \
- const type *data, int linesize, int w, int h, \
- int min_val) \
-{ \
- int x, y; \
- int start_x; \
- int start_y; \
- int end_x; \
- int end_y; \
- const type *line; \
- \
- /* left bound */ \
- for (start_x = 0; start_x < w; start_x++) \
- for (y = 0; y < h; y++) \
- if ((data[y * linesize + start_x] > min_val)) \
- goto outl; \
-outl: \
- if (start_x == w) /* no points found */ \
- return 0; \
- \
- /* right bound */ \
- for (end_x = w - 1; end_x >= start_x; end_x--) \
- for (y = 0; y < h; y++) \
- if ((data[y * linesize + end_x] > min_val)) \
- goto outr; \
-outr: \
- \
- /* top bound */ \
- line = data; \
- for (start_y = 0; start_y < h; start_y++) { \
- for (x = 0; x < w; x++) \
- if (line[x] > min_val) \
- goto outt; \
- line += linesize; \
- } \
-outt: \
- \
- /* bottom bound */ \
- line = data + (h-1)*linesize; \
- for (end_y = h - 1; end_y >= start_y; end_y--) { \
- for (x = 0; x < w; x++) \
- if (line[x] > min_val) \
- goto outb; \
- line -= linesize; \
- } \
-outb: \
- \
- bbox->x1 = start_x; \
- bbox->y1 = start_y; \
- bbox->x2 = end_x; \
- bbox->y2 = end_y; \
- return 1; \
-}
-
-BBOX(uint8_t, 8)
-BBOX(uint16_t, 16)
-
int ff_calculate_bounding_box(FFBoundingBox *bbox,
- const uint8_t *data, int linesize,
- int w, int h,
- int min_val, int depth)
+ const uint8_t *data, int linesize, int w, int h,
+ int min_val)
{
- if (depth <= 8)
- return bbox_8(bbox, data, linesize, w, h, min_val);
- else
- return bbox_16(bbox, (const uint16_t *)data, linesize / 2, w, h, min_val);
+ int x, y;
+ int start_x;
+ int start_y;
+ int end_x;
+ int end_y;
+ const uint8_t *line;
+
+ /* left bound */
+ for (start_x = 0; start_x < w; start_x++)
+ for (y = 0; y < h; y++)
+ if ((data[y * linesize + start_x] > min_val))
+ goto outl;
+outl:
+ if (start_x == w) /* no points found */
+ return 0;
+
+ /* right bound */
+ for (end_x = w - 1; end_x >= start_x; end_x--)
+ for (y = 0; y < h; y++)
+ if ((data[y * linesize + end_x] > min_val))
+ goto outr;
+outr:
+
+ /* top bound */
+ line = data;
+ for (start_y = 0; start_y < h; start_y++) {
+ for (x = 0; x < w; x++)
+ if (line[x] > min_val)
+ goto outt;
+ line += linesize;
+ }
+outt:
+
+ /* bottom bound */
+ line = data + (h-1)*linesize;
+ for (end_y = h - 1; end_y >= start_y; end_y--) {
+ for (x = 0; x < w; x++)
+ if (line[x] > min_val)
+ goto outb;
+ line -= linesize;
+ }
+outb:
+
+ bbox->x1 = start_x;
+ bbox->y1 = start_y;
+ bbox->x2 = end_x;
+ bbox->y2 = end_y;
+ return 1;
}
diff --git a/libavfilter/bbox.h b/libavfilter/bbox.h
index 116158d..cf026b8 100644
--- a/libavfilter/bbox.h
+++ b/libavfilter/bbox.h
@@ -39,6 +39,6 @@
*/
int ff_calculate_bounding_box(FFBoundingBox *bbox,
const uint8_t *data, int linesize,
- int w, int h, int min_val, int depth);
+ int w, int h, int min_val);
#endif /* AVFILTER_BBOX_H */
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 15d897c..5884894 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -148,7 +148,7 @@
return get_frame_internal(ctx, frame, 0, nb_samples);
}
-#if FF_API_BUFFERSINK_ALLOC
+#if FF_API_NEXT
AVBufferSinkParams *av_buffersink_params_alloc(void)
{
static const int pixel_fmts[] = { AV_PIX_FMT_NONE };
diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h
index 69ed0f2..65d0cca 100644
--- a/libavfilter/buffersink.h
+++ b/libavfilter/buffersink.h
@@ -95,7 +95,7 @@
*/
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2
-#if FF_API_BUFFERSINK_ALLOC
+#if FF_API_NEXT
/**
* Deprecated and unused struct to use for initializing a buffersink context.
*/
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index da1cf99..bf30f54 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -149,6 +149,33 @@
return av_buffersrc_add_frame_flags(ctx, frame, 0);
}
+static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
+ AVFrame *frame, int flags);
+
+int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
+{
+ AVFrame *copy = NULL;
+ int ret = 0;
+
+ if (frame && frame->channel_layout &&
+ av_get_channel_layout_nb_channels(frame->channel_layout) != frame->channels) {
+ av_log(ctx, AV_LOG_ERROR, "Layout indicates a different number of channels than actually present\n");
+ return AVERROR(EINVAL);
+ }
+
+ if (!(flags & AV_BUFFERSRC_FLAG_KEEP_REF) || !frame)
+ return av_buffersrc_add_frame_internal(ctx, frame, flags);
+
+ if (!(copy = av_frame_alloc()))
+ return AVERROR(ENOMEM);
+ ret = av_frame_ref(copy, frame);
+ if (ret >= 0)
+ ret = av_buffersrc_add_frame_internal(ctx, copy, flags);
+
+ av_frame_free(©);
+ return ret;
+}
+
static int push_frame(AVFilterGraph *graph)
{
int ret;
@@ -163,18 +190,13 @@
return 0;
}
-int attribute_align_arg av_buffersrc_add_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags)
+static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
+ AVFrame *frame, int flags)
{
BufferSourceContext *s = ctx->priv;
AVFrame *copy;
int refcounted, ret;
- if (frame && frame->channel_layout &&
- av_get_channel_layout_nb_channels(frame->channel_layout) != frame->channels) {
- av_log(ctx, AV_LOG_ERROR, "Layout indicates a different number of channels than actually present\n");
- return AVERROR(EINVAL);
- }
-
s->nb_failed_requests = 0;
if (!frame)
@@ -207,7 +229,7 @@
if (!(copy = av_frame_alloc()))
return AVERROR(ENOMEM);
- if (refcounted && !(flags & AV_BUFFERSRC_FLAG_KEEP_REF)) {
+ if (refcounted) {
av_frame_move_ref(copy, frame);
} else {
ret = av_frame_ref(copy, frame);
diff --git a/libavfilter/convolution.h b/libavfilter/convolution.h
index 88aabe9..fc6aad5 100644
--- a/libavfilter/convolution.h
+++ b/libavfilter/convolution.h
@@ -57,7 +57,7 @@
void (*filter[4])(uint8_t *dst, int width,
float rdiv, float bias, const int *const matrix,
const uint8_t *c[], int peak, int radius,
- int dstride, int stride, int size);
+ int dstride, int stride);
} ConvolutionContext;
void ff_convolution_init_x86(ConvolutionContext *s);
diff --git a/libavfilter/dnn/Makefile b/libavfilter/dnn/Makefile
index d6d58f4..b0b7630 100644
--- a/libavfilter/dnn/Makefile
+++ b/libavfilter/dnn/Makefile
@@ -1,7 +1,5 @@
OBJS-$(CONFIG_DNN) += dnn/dnn_interface.o
OBJS-$(CONFIG_DNN) += dnn/dnn_io_proc.o
-OBJS-$(CONFIG_DNN) += dnn/queue.o
-OBJS-$(CONFIG_DNN) += dnn/safe_queue.o
OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native.o
OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layers.o
OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_avgpool.o
diff --git a/libavfilter/dnn/dnn_backend_native.c b/libavfilter/dnn/dnn_backend_native.c
index 3bc253c..4fc3ba2 100644
--- a/libavfilter/dnn/dnn_backend_native.c
+++ b/libavfilter/dnn/dnn_backend_native.c
@@ -36,7 +36,7 @@
{ NULL },
};
-static const AVClass dnn_native_class = {
+const AVClass dnn_native_class = {
.class_name = "dnn_native",
.item_name = av_default_item_name,
.option = dnn_native_options,
@@ -50,7 +50,7 @@
static DNNReturnType get_input_native(void *model, DNNData *input, const char *input_name)
{
- NativeModel *native_model = model;
+ NativeModel *native_model = (NativeModel *)model;
NativeContext *ctx = &native_model->ctx;
for (int i = 0; i < native_model->operands_num; ++i) {
@@ -78,7 +78,7 @@
const char *output_name, int *output_width, int *output_height)
{
DNNReturnType ret;
- NativeModel *native_model = model;
+ NativeModel *native_model = (NativeModel *)model;
NativeContext *ctx = &native_model->ctx;
AVFrame *in_frame = av_frame_alloc();
AVFrame *out_frame = NULL;
@@ -112,7 +112,7 @@
// layers_num,layer_type,layer_parameterss,layer_type,layer_parameters...
// For CONV layer: activation_function, input_num, output_num, kernel_size, kernel, biases
// For DEPTH_TO_SPACE layer: block_size
-DNNModel *ff_dnn_load_model_native(const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx)
+DNNModel *ff_dnn_load_model_native(const char *model_filename, const char *options, void *userdata)
{
DNNModel *model = NULL;
char header_expected[] = "FFMPEGDNNNATIVE";
@@ -208,7 +208,7 @@
}
native_model->layers[layer].type = layer_type;
- parsed_size = ff_layer_funcs[layer_type].pf_load(&native_model->layers[layer], model_file_context, file_size, native_model->operands_num);
+ parsed_size = layer_funcs[layer_type].pf_load(&native_model->layers[layer], model_file_context, file_size, native_model->operands_num);
if (!parsed_size) {
goto fail;
}
@@ -255,8 +255,7 @@
model->get_input = &get_input_native;
model->get_output = &get_output_native;
- model->filter_ctx = filter_ctx;
- model->func_type = func_type;
+ model->userdata = userdata;
return model;
@@ -270,7 +269,7 @@
const char **output_names, uint32_t nb_output, AVFrame *out_frame,
int do_ioproc)
{
- NativeModel *native_model = model->model;
+ NativeModel *native_model = (NativeModel *)model->model;
NativeContext *ctx = &native_model->ctx;
int32_t layer;
DNNData input, output;
@@ -301,7 +300,7 @@
oprd->dims[2] = in_frame->width;
av_freep(&oprd->data);
- oprd->length = ff_calculate_operand_data_length(oprd);
+ oprd->length = calculate_operand_data_length(oprd);
if (oprd->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The input data length overflow\n");
return DNN_ERROR;
@@ -319,22 +318,22 @@
input.dt = oprd->data_type;
if (do_ioproc) {
if (native_model->model->pre_proc != NULL) {
- native_model->model->pre_proc(in_frame, &input, native_model->model->filter_ctx);
+ native_model->model->pre_proc(in_frame, &input, native_model->model->userdata);
} else {
- ff_proc_from_frame_to_dnn(in_frame, &input, native_model->model->func_type, ctx);
+ proc_from_frame_to_dnn(in_frame, &input, ctx);
}
}
if (nb_output != 1) {
// currently, the filter does not need multiple outputs,
// so we just pending the support until we really need it.
- avpriv_report_missing_feature(ctx, "multiple outputs");
+ av_log(ctx, AV_LOG_ERROR, "do not support multiple outputs\n");
return DNN_ERROR;
}
for (layer = 0; layer < native_model->layers_num; ++layer){
DNNLayerType layer_type = native_model->layers[layer].type;
- if (ff_layer_funcs[layer_type].pf_exec(native_model->operands,
+ if (layer_funcs[layer_type].pf_exec(native_model->operands,
native_model->layers[layer].input_operand_indexes,
native_model->layers[layer].output_operand_index,
native_model->layers[layer].params,
@@ -367,9 +366,9 @@
if (do_ioproc) {
if (native_model->model->post_proc != NULL) {
- native_model->model->post_proc(out_frame, &output, native_model->model->filter_ctx);
+ native_model->model->post_proc(out_frame, &output, native_model->model->userdata);
} else {
- ff_proc_from_dnn_to_frame(out_frame, &output, ctx);
+ proc_from_dnn_to_frame(out_frame, &output, ctx);
}
} else {
out_frame->width = output.width;
@@ -383,7 +382,7 @@
DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, const char *input_name, AVFrame *in_frame,
const char **output_names, uint32_t nb_output, AVFrame *out_frame)
{
- NativeModel *native_model = model->model;
+ NativeModel *native_model = (NativeModel *)model->model;
NativeContext *ctx = &native_model->ctx;
if (!in_frame) {
@@ -399,7 +398,7 @@
return execute_model_native(model, input_name, in_frame, output_names, nb_output, out_frame, 1);
}
-int32_t ff_calculate_operand_dims_count(const DnnOperand *oprd)
+int32_t calculate_operand_dims_count(const DnnOperand *oprd)
{
int32_t result = 1;
for (int i = 0; i < 4; ++i)
@@ -408,7 +407,7 @@
return result;
}
-int32_t ff_calculate_operand_data_length(const DnnOperand* oprd)
+int32_t calculate_operand_data_length(const DnnOperand* oprd)
{
// currently, we just support DNN_FLOAT
uint64_t len = sizeof(float);
@@ -429,7 +428,7 @@
if (*model)
{
if ((*model)->model) {
- native_model = (*model)->model;
+ native_model = (NativeModel *)(*model)->model;
if (native_model->layers) {
for (layer = 0; layer < native_model->layers_num; ++layer){
if (native_model->layers[layer].type == DLT_CONV2D){
diff --git a/libavfilter/dnn/dnn_backend_native.h b/libavfilter/dnn/dnn_backend_native.h
index d313c48..2d02c06 100644
--- a/libavfilter/dnn/dnn_backend_native.h
+++ b/libavfilter/dnn/dnn_backend_native.h
@@ -128,7 +128,7 @@
int32_t operands_num;
} NativeModel;
-DNNModel *ff_dnn_load_model_native(const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx);
+DNNModel *ff_dnn_load_model_native(const char *model_filename, const char *options, void *userdata);
DNNReturnType ff_dnn_execute_model_native(const DNNModel *model, const char *input_name, AVFrame *in_frame,
const char **output_names, uint32_t nb_output, AVFrame *out_frame);
@@ -137,6 +137,6 @@
// NOTE: User must check for error (return value <= 0) to handle
// case like integer overflow.
-int32_t ff_calculate_operand_data_length(const DnnOperand *oprd);
-int32_t ff_calculate_operand_dims_count(const DnnOperand *oprd);
+int32_t calculate_operand_data_length(const DnnOperand *oprd);
+int32_t calculate_operand_dims_count(const DnnOperand *oprd);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_avgpool.c b/libavfilter/dnn/dnn_backend_native_layer_avgpool.c
index dcfb8c8..989006d 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_avgpool.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_avgpool.c
@@ -26,7 +26,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_avgpool.h"
-int ff_dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
AvgPoolParams *avgpool_params;
int dnn_size = 0;
@@ -55,8 +55,8 @@
return dnn_size;
}
-int ff_dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
float *output;
int height_end, width_end, height_radius, width_radius, output_height, output_width, kernel_area;
@@ -66,7 +66,7 @@
int width = operands[input_operand_index].dims[2];
int channel = operands[input_operand_index].dims[3];
const float *input = operands[input_operand_index].data;
- const AvgPoolParams *avgpool_params = parameters;
+ const AvgPoolParams *avgpool_params = (const AvgPoolParams *)parameters;
int kernel_strides = avgpool_params->strides;
int src_linesize = width * channel;
@@ -106,7 +106,7 @@
// not support pooling in channel dimension now
output_operand->dims[3] = channel;
output_operand->data_type = operands[input_operand_index].data_type;
- output_operand->length = ff_calculate_operand_data_length(output_operand);
+ output_operand->length = calculate_operand_data_length(output_operand);
if (output_operand->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_avgpool.h b/libavfilter/dnn/dnn_backend_native_layer_avgpool.h
index 75d9eb1..543370f 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_avgpool.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_avgpool.h
@@ -33,8 +33,8 @@
DNNPaddingParam padding_method;
} AvgPoolParams;
-int ff_dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_avg_pool(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
index b5c2c39..0fb968a 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.c
@@ -26,21 +26,21 @@
#define CLAMP_TO_EDGE(x, w) ((x) < 0 ? 0 : ((x) >= (w) ? (w - 1) : (x)))
//struct to pass parameters
-typedef struct ThreadCommonParam{
+typedef struct thread_common_param{
DnnOperand *operands;
const int32_t *input_operand_indexes;
int32_t output_operand_index;
const void *parameters;
NativeContext *ctx;
float *output_data;
-} ThreadCommonParam;
+} thread_common_param;
-typedef struct ThreadParam{
- ThreadCommonParam *thread_common_param;
+typedef struct thread_param{
+ thread_common_param *thread_common_param;
int thread_start, thread_end;
-} ThreadParam;
+} thread_param;
-int ff_dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
ConvolutionalParams *conv_params;
int kernel_size;
@@ -70,7 +70,7 @@
return 0;
}
- conv_params->kernel = av_malloc_array(kernel_size, sizeof(*conv_params->kernel));
+ conv_params->kernel = av_malloc(kernel_size * sizeof(float));
if (!conv_params->kernel) {
av_freep(&conv_params);
return 0;
@@ -81,7 +81,7 @@
conv_params->biases = NULL;
if (conv_params->has_bias) {
- conv_params->biases = av_malloc_array(conv_params->output_num, sizeof(*conv_params->biases));
+ conv_params->biases = av_malloc(conv_params->output_num * sizeof(float));
if (!conv_params->biases){
av_freep(&conv_params->kernel);
av_freep(&conv_params);
@@ -108,15 +108,15 @@
static void * dnn_execute_layer_conv2d_thread(void *threadarg)
{
//pass parameters
- ThreadParam *thread_param = threadarg;
- ThreadCommonParam *thread_common_param = thread_param->thread_common_param;
+ thread_param *thread_param = (struct thread_param *)threadarg;
+ thread_common_param *thread_common_param = thread_param->thread_common_param;
DnnOperand *operands = thread_common_param->operands;
int32_t input_operand_index = thread_common_param->input_operand_indexes[0];
int height = operands[input_operand_index].dims[1];
int width = operands[input_operand_index].dims[2];
int channel = operands[input_operand_index].dims[3];
const float *input = operands[input_operand_index].data;
- const ConvolutionalParams *conv_params = thread_common_param->parameters;
+ const ConvolutionalParams *conv_params = (const ConvolutionalParams *)(thread_common_param->parameters);
int radius = conv_params->kernel_size >> 1;
int src_linesize = width * conv_params->input_num;
@@ -181,18 +181,18 @@
}
-int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
int thread_num = (ctx->options.conv2d_threads <= 0 || ctx->options.conv2d_threads > av_cpu_count())
? (av_cpu_count() + 1) : (ctx->options.conv2d_threads);
#if HAVE_PTHREAD_CANCEL
- pthread_t *thread_id = av_malloc_array(thread_num, sizeof(*thread_id));
+ pthread_t *thread_id = av_malloc(thread_num * sizeof(pthread_t));
int thread_stride;
#endif
- ThreadParam **thread_param = av_malloc_array(thread_num, sizeof(*thread_param));
- ThreadCommonParam thread_common_param;
- const ConvolutionalParams *conv_params = parameters;
+ thread_param **thread_param = av_malloc(thread_num * sizeof(*thread_param));
+ thread_common_param thread_common_param;
+ const ConvolutionalParams *conv_params = (const ConvolutionalParams *)(parameters);
int height = operands[input_operand_indexes[0]].dims[1];
int width = operands[input_operand_indexes[0]].dims[2];
int pad_size = (conv_params->padding_method == VALID) ? (conv_params->kernel_size - 1) / 2 * conv_params->dilation : 0;
@@ -203,7 +203,7 @@
output_operand->dims[2] = width - pad_size * 2;
output_operand->dims[3] = conv_params->output_num;
output_operand->data_type = operands[input_operand_indexes[0]].data_type;
- output_operand->length = ff_calculate_operand_data_length(output_operand);
+ output_operand->length = calculate_operand_data_length(output_operand);
if (output_operand->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
@@ -224,7 +224,7 @@
thread_stride = (height - pad_size * 2) / thread_num;
//create threads
for (int i = 0; i < thread_num; i++){
- thread_param[i] = av_malloc(sizeof(*thread_param[0]));
+ thread_param[i] = av_malloc(sizeof(**thread_param));
thread_param[i]->thread_common_param = &thread_common_param;
thread_param[i]->thread_start = thread_stride * i + pad_size;
thread_param[i]->thread_end = (i == thread_num - 1) ? (height - pad_size) : (thread_param[i]->thread_start + thread_stride);
@@ -237,20 +237,20 @@
}
//release memory
- av_freep(&thread_id);
+ av_free(thread_id);
for (int i = 0; i < thread_num; i++){
- av_freep(&thread_param[i]);
+ av_free(thread_param[i]);
}
#else
- thread_param[0] = av_malloc(sizeof(*thread_param[0]));
+ thread_param[0] = av_malloc(sizeof(**thread_param));
thread_param[0]->thread_common_param = &thread_common_param;
thread_param[0]->thread_start = pad_size;
thread_param[0]->thread_end = height - pad_size;
dnn_execute_layer_conv2d_thread((void *)thread_param[0]);
- av_freep(&thread_param[0]);
+ av_free(thread_param[0]);
#endif
- av_freep(&thread_param);
+ av_free(thread_param);
return DNN_SUCCESS;
}
diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h
index 03ca795..1295028 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h
@@ -34,7 +34,7 @@
float *biases;
} ConvolutionalParams;
-int ff_dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_conv2d(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_conv2d(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_dense.c b/libavfilter/dnn/dnn_backend_native_layer_dense.c
index 117590d..1029137 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_dense.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_dense.c
@@ -21,7 +21,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_dense.h"
-int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
DenseParams *dense_params;
int kernel_size;
@@ -82,8 +82,8 @@
return dnn_size;
}
-int ff_dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
float *output;
int32_t input_operand_index = input_operand_indexes[0];
@@ -92,7 +92,7 @@
int width = operands[input_operand_index].dims[2];
int channel = operands[input_operand_index].dims[3];
const float *input = operands[input_operand_index].data;
- const DenseParams *dense_params = parameters;
+ const DenseParams *dense_params = (const DenseParams *)parameters;
int src_linesize = width * channel;
DnnOperand *output_operand = &operands[output_operand_index];
@@ -101,7 +101,7 @@
output_operand->dims[2] = width;
output_operand->dims[3] = dense_params->output_num;
output_operand->data_type = operands[input_operand_index].data_type;
- output_operand->length = ff_calculate_operand_data_length(output_operand);
+ output_operand->length = calculate_operand_data_length(output_operand);
if (output_operand->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_dense.h b/libavfilter/dnn/dnn_backend_native_layer_dense.h
index 8624885..f98284b 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_dense.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_dense.h
@@ -31,7 +31,7 @@
float *biases;
} DenseParams;
-int ff_dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_dense(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_depth2space.c b/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
index 2fde6d1..4107ee6 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_depth2space.c
@@ -27,7 +27,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_depth2space.h"
-int ff_dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
DepthToSpaceParams *params;
int dnn_size = 0;
@@ -49,11 +49,11 @@
return dnn_size;
}
-int ff_dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
float *output;
- const DepthToSpaceParams *params = parameters;
+ const DepthToSpaceParams *params = (const DepthToSpaceParams *)parameters;
int block_size = params->block_size;
int32_t input_operand_index = input_operand_indexes[0];
int number = operands[input_operand_index].dims[0];
@@ -74,7 +74,7 @@
output_operand->dims[2] = width * block_size;
output_operand->dims[3] = new_channels;
output_operand->data_type = operands[input_operand_index].data_type;
- output_operand->length = ff_calculate_operand_data_length(output_operand);
+ output_operand->length = calculate_operand_data_length(output_operand);
if (output_operand->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h
index ef59394..648a927 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_depth2space.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_depth2space.h
@@ -34,8 +34,8 @@
int block_size;
} DepthToSpaceParams;
-int ff_dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_depth2space(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_depth2space(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
index c116188..998a752 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c
@@ -28,6 +28,7 @@
#include "dnn_backend_native_layer_mathbinary.h"
typedef float (*FunType)(float src0, float src1);
+FunType pfun;
static float sub(float src0, float src1)
{
@@ -59,7 +60,7 @@
int dims_count;
const float *src;
float *dst;
- dims_count = ff_calculate_operand_dims_count(output);
+ dims_count = calculate_operand_dims_count(output);
src = input->data;
dst = output->data;
if (params->input0_broadcast || params->input1_broadcast) {
@@ -79,7 +80,7 @@
int dims_count;
const float *src;
float *dst;
- dims_count = ff_calculate_operand_dims_count(output);
+ dims_count = calculate_operand_dims_count(output);
src = input->data;
dst = output->data;
if (params->input0_broadcast) {
@@ -98,7 +99,7 @@
}
}
}
-int ff_dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
DnnLayerMathBinaryParams *params;
int dnn_size = 0;
@@ -147,18 +148,18 @@
return dnn_size;
}
-int ff_dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
const DnnOperand *input = &operands[input_operand_indexes[0]];
DnnOperand *output = &operands[output_operand_index];
- const DnnLayerMathBinaryParams *params = parameters;
+ const DnnLayerMathBinaryParams *params = (const DnnLayerMathBinaryParams *)parameters;
for (int i = 0; i < 4; ++i)
output->dims[i] = input->dims[i];
output->data_type = input->data_type;
- output->length = ff_calculate_operand_data_length(output);
+ output->length = calculate_operand_data_length(output);
if (output->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h
index eee294b..bb97ba2 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h
@@ -47,8 +47,8 @@
float v;
} DnnLayerMathBinaryParams;
-int ff_dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_math_binary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_math_binary(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathunary.c b/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
index 1bb05d0..ae5d4da 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathunary.c
@@ -29,7 +29,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_mathunary.h"
-int ff_dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
DnnLayerMathUnaryParams *params;
int dnn_size = 0;
@@ -52,12 +52,12 @@
}
-int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
const DnnOperand *input = &operands[input_operand_indexes[0]];
DnnOperand *output = &operands[output_operand_index];
- const DnnLayerMathUnaryParams *params = parameters;
+ const DnnLayerMathUnaryParams *params = (const DnnLayerMathUnaryParams *)parameters;
int dims_count;
const float *src;
float *dst;
@@ -66,7 +66,7 @@
output->dims[i] = input->dims[i];
output->data_type = input->data_type;
- output->length = ff_calculate_operand_data_length(output);
+ output->length = calculate_operand_data_length(output);
if (output->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
@@ -77,7 +77,7 @@
return DNN_ERROR;
}
- dims_count = ff_calculate_operand_dims_count(output);
+ dims_count = calculate_operand_dims_count(output);
src = input->data;
dst = output->data;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
index 2199931..301d02e 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_mathunary.h
@@ -53,8 +53,8 @@
DNNMathUnaryOperation un_op;
} DnnLayerMathUnaryParams;
-int ff_dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_math_unary(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_math_unary(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_maximum.c b/libavfilter/dnn/dnn_backend_native_layer_maximum.c
index 65af553..7ad5a22 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_maximum.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_maximum.c
@@ -27,7 +27,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_maximum.h"
-int ff_dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
DnnLayerMaximumParams *params;
int dnn_size = 0;
@@ -49,12 +49,12 @@
return dnn_size;
}
-int ff_dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
const DnnOperand *input = &operands[input_operand_indexes[0]];
DnnOperand *output = &operands[output_operand_index];
- const DnnLayerMaximumParams *params = parameters;
+ const DnnLayerMaximumParams *params = (const DnnLayerMaximumParams *)parameters;
int dims_count;
const float *src;
float *dst;
@@ -63,7 +63,7 @@
output->dims[i] = input->dims[i];
output->data_type = input->data_type;
- output->length = ff_calculate_operand_data_length(output);
+ output->length = calculate_operand_data_length(output);
if (output->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
@@ -74,7 +74,7 @@
return DNN_ERROR;
}
- dims_count = ff_calculate_operand_dims_count(output);
+ dims_count = calculate_operand_dims_count(output);
src = input->data;
dst = output->data;
for (int i = 0; i < dims_count; ++i)
diff --git a/libavfilter/dnn/dnn_backend_native_layer_maximum.h b/libavfilter/dnn/dnn_backend_native_layer_maximum.h
index 523acbe..be63a3a 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_maximum.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_maximum.h
@@ -37,8 +37,8 @@
}val;
} DnnLayerMaximumParams;
-int ff_dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_maximum(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_maximum(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layer_pad.c b/libavfilter/dnn/dnn_backend_native_layer_pad.c
index a60451a..05892d4 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_pad.c
+++ b/libavfilter/dnn/dnn_backend_native_layer_pad.c
@@ -22,7 +22,7 @@
#include "libavutil/avassert.h"
#include "dnn_backend_native_layer_pad.h"
-int ff_dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
+int dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num)
{
LayerPadParams *params;
int dnn_size = 0;
@@ -75,13 +75,13 @@
}
}
-int ff_dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx)
+int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx)
{
int32_t before_paddings;
int32_t after_paddings;
float* output;
- const LayerPadParams *params = parameters;
+ const LayerPadParams *params = (const LayerPadParams *)parameters;
// suppose format is <N, H, W, C>
int32_t input_operand_index = input_operand_indexes[0];
@@ -110,7 +110,7 @@
output_operand->dims[2] = new_width;
output_operand->dims[3] = new_channel;
output_operand->data_type = operands[input_operand_index].data_type;
- output_operand->length = ff_calculate_operand_data_length(output_operand);
+ output_operand->length = calculate_operand_data_length(output_operand);
if (output_operand->length <= 0) {
av_log(ctx, AV_LOG_ERROR, "The output data length overflow\n");
return DNN_ERROR;
diff --git a/libavfilter/dnn/dnn_backend_native_layer_pad.h b/libavfilter/dnn/dnn_backend_native_layer_pad.h
index 4f76c67..6c69211 100644
--- a/libavfilter/dnn/dnn_backend_native_layer_pad.h
+++ b/libavfilter/dnn/dnn_backend_native_layer_pad.h
@@ -36,8 +36,8 @@
float constant_values;
} LayerPadParams;
-int ff_dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
-int ff_dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
- int32_t output_operand_index, const void *parameters, NativeContext *ctx);
+int dnn_load_layer_pad(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num);
+int dnn_execute_layer_pad(DnnOperand *operands, const int32_t *input_operand_indexes,
+ int32_t output_operand_index, const void *parameters, NativeContext *ctx);
#endif
diff --git a/libavfilter/dnn/dnn_backend_native_layers.c b/libavfilter/dnn/dnn_backend_native_layers.c
index 492939f..638a94e 100644
--- a/libavfilter/dnn/dnn_backend_native_layers.c
+++ b/libavfilter/dnn/dnn_backend_native_layers.c
@@ -29,14 +29,14 @@
#include "dnn_backend_native_layer_avgpool.h"
#include "dnn_backend_native_layer_dense.h"
-const LayerFunc ff_layer_funcs[DLT_COUNT] = {
+LayerFunc layer_funcs[DLT_COUNT] = {
{NULL, NULL},
- {ff_dnn_execute_layer_conv2d, ff_dnn_load_layer_conv2d},
- {ff_dnn_execute_layer_depth2space, ff_dnn_load_layer_depth2space},
- {ff_dnn_execute_layer_pad, ff_dnn_load_layer_pad},
- {ff_dnn_execute_layer_maximum, ff_dnn_load_layer_maximum},
- {ff_dnn_execute_layer_math_binary, ff_dnn_load_layer_math_binary},
- {ff_dnn_execute_layer_math_unary, ff_dnn_load_layer_math_unary},
- {ff_dnn_execute_layer_avg_pool, ff_dnn_load_layer_avg_pool},
- {ff_dnn_execute_layer_dense, ff_dnn_load_layer_dense},
+ {dnn_execute_layer_conv2d, dnn_load_layer_conv2d},
+ {dnn_execute_layer_depth2space, dnn_load_layer_depth2space},
+ {dnn_execute_layer_pad, dnn_load_layer_pad},
+ {dnn_execute_layer_maximum, dnn_load_layer_maximum},
+ {dnn_execute_layer_math_binary, dnn_load_layer_math_binary},
+ {dnn_execute_layer_math_unary, dnn_load_layer_math_unary},
+ {dnn_execute_layer_avg_pool, dnn_load_layer_avg_pool},
+ {dnn_execute_layer_dense, dnn_load_layer_dense},
};
diff --git a/libavfilter/dnn/dnn_backend_native_layers.h b/libavfilter/dnn/dnn_backend_native_layers.h
index bbd0292..dc76ace 100644
--- a/libavfilter/dnn/dnn_backend_native_layers.h
+++ b/libavfilter/dnn/dnn_backend_native_layers.h
@@ -33,6 +33,6 @@
LAYER_LOAD_FUNC pf_load;
}LayerFunc;
-extern const LayerFunc ff_layer_funcs[DLT_COUNT];
+extern LayerFunc layer_funcs[DLT_COUNT];
#endif
diff --git a/libavfilter/dnn/dnn_backend_openvino.c b/libavfilter/dnn/dnn_backend_openvino.c
index 5be053b..d510e16 100644
--- a/libavfilter/dnn/dnn_backend_openvino.c
+++ b/libavfilter/dnn/dnn_backend_openvino.c
@@ -30,15 +30,10 @@
#include "libavutil/opt.h"
#include "libavutil/avstring.h"
#include "../internal.h"
-#include "queue.h"
-#include "safe_queue.h"
#include <c_api/ie_c_api.h>
typedef struct OVOptions{
char *device_type;
- int nireq;
- int batch_size;
- int input_resizable;
} OVOptions;
typedef struct OVContext {
@@ -53,30 +48,8 @@
ie_network_t *network;
ie_executable_network_t *exe_network;
ie_infer_request_t *infer_request;
-
- /* for async execution */
- SafeQueue *request_queue; // holds RequestItem
- Queue *task_queue; // holds TaskItem
} OVModel;
-typedef struct TaskItem {
- OVModel *ov_model;
- const char *input_name;
- AVFrame *in_frame;
- const char *output_name;
- AVFrame *out_frame;
- int do_ioproc;
- int async;
- int done;
-} TaskItem;
-
-typedef struct RequestItem {
- ie_infer_request_t *infer_request;
- TaskItem **tasks;
- int task_count;
- ie_complete_call_back_t callback;
-} RequestItem;
-
#define APPEND_STRING(generated_string, iterate_string) \
generated_string = generated_string ? av_asprintf("%s %s", generated_string, iterate_string) : \
av_asprintf("%s", iterate_string);
@@ -85,351 +58,30 @@
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM
static const AVOption dnn_openvino_options[] = {
{ "device", "device to run model", OFFSET(options.device_type), AV_OPT_TYPE_STRING, { .str = "CPU" }, 0, 0, FLAGS },
- { "nireq", "number of request", OFFSET(options.nireq), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
- { "batch_size", "batch size per request", OFFSET(options.batch_size), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 1000, FLAGS},
- { "input_resizable", "can input be resizable or not", OFFSET(options.input_resizable), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
{ NULL }
};
AVFILTER_DEFINE_CLASS(dnn_openvino);
+static DNNReturnType execute_model_ov(const DNNModel *model, const char *input_name, AVFrame *in_frame,
+ const char **output_names, uint32_t nb_output, AVFrame *out_frame,
+ int do_ioproc);
+
static DNNDataType precision_to_datatype(precision_e precision)
{
switch (precision)
{
case FP32:
return DNN_FLOAT;
- case U8:
- return DNN_UINT8;
default:
av_assert0(!"not supported yet.");
return DNN_FLOAT;
}
}
-static int get_datatype_size(DNNDataType dt)
-{
- switch (dt)
- {
- case DNN_FLOAT:
- return sizeof(float);
- case DNN_UINT8:
- return sizeof(uint8_t);
- default:
- av_assert0(!"not supported yet.");
- return 1;
- }
-}
-
-static DNNReturnType fill_model_input_ov(OVModel *ov_model, RequestItem *request)
-{
- dimensions_t dims;
- precision_e precision;
- ie_blob_buffer_t blob_buffer;
- OVContext *ctx = &ov_model->ctx;
- IEStatusCode status;
- DNNData input;
- ie_blob_t *input_blob = NULL;
- TaskItem *task = request->tasks[0];
-
- status = ie_infer_request_get_blob(request->infer_request, task->input_name, &input_blob);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get input blob with name %s\n", task->input_name);
- return DNN_ERROR;
- }
-
- status |= ie_blob_get_dims(input_blob, &dims);
- status |= ie_blob_get_precision(input_blob, &precision);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get input blob dims/precision\n");
- return DNN_ERROR;
- }
-
- status = ie_blob_get_buffer(input_blob, &blob_buffer);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get input blob buffer\n");
- return DNN_ERROR;
- }
-
- input.height = dims.dims[2];
- input.width = dims.dims[3];
- input.channels = dims.dims[1];
- input.data = blob_buffer.buffer;
- input.dt = precision_to_datatype(precision);
- // all models in openvino open model zoo use BGR as input,
- // change to be an option when necessary.
- input.order = DCO_BGR;
-
- av_assert0(request->task_count <= dims.dims[0]);
- for (int i = 0; i < request->task_count; ++i) {
- task = request->tasks[i];
- if (task->do_ioproc) {
- if (ov_model->model->pre_proc != NULL) {
- ov_model->model->pre_proc(task->in_frame, &input, ov_model->model->filter_ctx);
- } else {
- ff_proc_from_frame_to_dnn(task->in_frame, &input, ov_model->model->func_type, ctx);
- }
- }
- input.data = (uint8_t *)input.data
- + input.width * input.height * input.channels * get_datatype_size(input.dt);
- }
- ie_blob_free(&input_blob);
-
- return DNN_SUCCESS;
-}
-
-static void infer_completion_callback(void *args)
-{
- dimensions_t dims;
- precision_e precision;
- IEStatusCode status;
- RequestItem *request = args;
- TaskItem *task = request->tasks[0];
- SafeQueue *requestq = task->ov_model->request_queue;
- ie_blob_t *output_blob = NULL;
- ie_blob_buffer_t blob_buffer;
- DNNData output;
- OVContext *ctx = &task->ov_model->ctx;
-
- status = ie_infer_request_get_blob(request->infer_request, task->output_name, &output_blob);
- if (status != OK) {
- //incorrect output name
- char *model_output_name = NULL;
- char *all_output_names = NULL;
- size_t model_output_count = 0;
- av_log(ctx, AV_LOG_ERROR, "Failed to get model output data\n");
- status = ie_network_get_outputs_number(task->ov_model->network, &model_output_count);
- for (size_t i = 0; i < model_output_count; i++) {
- status = ie_network_get_output_name(task->ov_model->network, i, &model_output_name);
- APPEND_STRING(all_output_names, model_output_name)
- }
- av_log(ctx, AV_LOG_ERROR,
- "output \"%s\" may not correct, all output(s) are: \"%s\"\n",
- task->output_name, all_output_names);
- return;
- }
-
- status = ie_blob_get_buffer(output_blob, &blob_buffer);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to access output memory\n");
- return;
- }
-
- status |= ie_blob_get_dims(output_blob, &dims);
- status |= ie_blob_get_precision(output_blob, &precision);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get dims or precision of output\n");
- return;
- }
-
- output.channels = dims.dims[1];
- output.height = dims.dims[2];
- output.width = dims.dims[3];
- output.dt = precision_to_datatype(precision);
- output.data = blob_buffer.buffer;
-
- av_assert0(request->task_count <= dims.dims[0]);
- av_assert0(request->task_count >= 1);
- for (int i = 0; i < request->task_count; ++i) {
- task = request->tasks[i];
- if (task->do_ioproc) {
- if (task->ov_model->model->post_proc != NULL) {
- task->ov_model->model->post_proc(task->out_frame, &output, task->ov_model->model->filter_ctx);
- } else {
- ff_proc_from_dnn_to_frame(task->out_frame, &output, ctx);
- }
- } else {
- task->out_frame->width = output.width;
- task->out_frame->height = output.height;
- }
- task->done = 1;
- output.data = (uint8_t *)output.data
- + output.width * output.height * output.channels * get_datatype_size(output.dt);
- }
- ie_blob_free(&output_blob);
-
- request->task_count = 0;
-
- if (task->async) {
- if (ff_safe_queue_push_back(requestq, request) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Failed to push back request_queue.\n");
- return;
- }
- }
-}
-
-static DNNReturnType init_model_ov(OVModel *ov_model, const char *input_name, const char *output_name)
-{
- OVContext *ctx = &ov_model->ctx;
- IEStatusCode status;
- ie_available_devices_t a_dev;
- ie_config_t config = {NULL, NULL, NULL};
- char *all_dev_names = NULL;
-
- // batch size
- if (ctx->options.batch_size <= 0) {
- ctx->options.batch_size = 1;
- }
-
- if (ctx->options.batch_size > 1) {
- input_shapes_t input_shapes;
- status = ie_network_get_input_shapes(ov_model->network, &input_shapes);
- if (status != OK)
- goto err;
- for (int i = 0; i < input_shapes.shape_num; i++)
- input_shapes.shapes[i].shape.dims[0] = ctx->options.batch_size;
- status = ie_network_reshape(ov_model->network, input_shapes);
- ie_network_input_shapes_free(&input_shapes);
- if (status != OK)
- goto err;
- }
-
- // The order of dims in the openvino is fixed and it is always NCHW for 4-D data.
- // while we pass NHWC data from FFmpeg to openvino
- status = ie_network_set_input_layout(ov_model->network, input_name, NHWC);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to set layout as NHWC for input %s\n", input_name);
- goto err;
- }
- status = ie_network_set_output_layout(ov_model->network, output_name, NHWC);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to set layout as NHWC for output %s\n", output_name);
- goto err;
- }
-
- // all models in openvino open model zoo use BGR with range [0.0f, 255.0f] as input,
- // we don't have a AVPixelFormat to descibe it, so we'll use AV_PIX_FMT_BGR24 and
- // ask openvino to do the conversion internally.
- // the current supported SR model (frame processing) is generated from tensorflow model,
- // and its input is Y channel as float with range [0.0f, 1.0f], so do not set for this case.
- // TODO: we need to get a final clear&general solution with all backends/formats considered.
- if (ov_model->model->func_type != DFT_PROCESS_FRAME) {
- status = ie_network_set_input_precision(ov_model->network, input_name, U8);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to set input precision as U8 for %s\n", input_name);
- return DNN_ERROR;
- }
- }
-
- status = ie_core_load_network(ov_model->core, ov_model->network, ctx->options.device_type, &config, &ov_model->exe_network);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to load OpenVINO model network\n");
- status = ie_core_get_available_devices(ov_model->core, &a_dev);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to get available devices\n");
- goto err;
- }
- for (int i = 0; i < a_dev.num_devices; i++) {
- APPEND_STRING(all_dev_names, a_dev.devices[i])
- }
- av_log(ctx, AV_LOG_ERROR,"device %s may not be supported, all available devices are: \"%s\"\n",
- ctx->options.device_type, all_dev_names);
- goto err;
- }
-
- // create infer_request for sync execution
- status = ie_exec_network_create_infer_request(ov_model->exe_network, &ov_model->infer_request);
- if (status != OK)
- goto err;
-
- // create infer_requests for async execution
- if (ctx->options.nireq <= 0) {
- // the default value is a rough estimation
- ctx->options.nireq = av_cpu_count() / 2 + 1;
- }
-
- ov_model->request_queue = ff_safe_queue_create();
- if (!ov_model->request_queue) {
- goto err;
- }
-
- for (int i = 0; i < ctx->options.nireq; i++) {
- RequestItem *item = av_mallocz(sizeof(*item));
- if (!item) {
- goto err;
- }
-
- status = ie_exec_network_create_infer_request(ov_model->exe_network, &item->infer_request);
- if (status != OK) {
- av_freep(&item);
- goto err;
- }
-
- item->tasks = av_malloc_array(ctx->options.batch_size, sizeof(*item->tasks));
- if (!item->tasks) {
- av_freep(&item);
- goto err;
- }
- item->task_count = 0;
-
- item->callback.completeCallBackFunc = infer_completion_callback;
- item->callback.args = item;
- if (ff_safe_queue_push_back(ov_model->request_queue, item) < 0) {
- av_freep(&item);
- goto err;
- }
- }
-
- ov_model->task_queue = ff_queue_create();
- if (!ov_model->task_queue) {
- goto err;
- }
-
- return DNN_SUCCESS;
-
-err:
- ff_dnn_free_model_ov(&ov_model->model);
- return DNN_ERROR;
-}
-
-static DNNReturnType execute_model_ov(RequestItem *request)
-{
- IEStatusCode status;
- DNNReturnType ret;
- TaskItem *task = request->tasks[0];
- OVContext *ctx = &task->ov_model->ctx;
-
- if (task->async) {
- if (request->task_count < ctx->options.batch_size) {
- if (ff_safe_queue_push_front(task->ov_model->request_queue, request) < 0) {
- av_log(ctx, AV_LOG_ERROR, "Failed to push back request_queue.\n");
- return DNN_ERROR;
- }
- return DNN_SUCCESS;
- }
- ret = fill_model_input_ov(task->ov_model, request);
- if (ret != DNN_SUCCESS) {
- return ret;
- }
- status = ie_infer_set_completion_callback(request->infer_request, &request->callback);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to set completion callback for inference\n");
- return DNN_ERROR;
- }
- status = ie_infer_request_infer_async(request->infer_request);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to start async inference\n");
- return DNN_ERROR;
- }
- return DNN_SUCCESS;
- } else {
- ret = fill_model_input_ov(task->ov_model, request);
- if (ret != DNN_SUCCESS) {
- return ret;
- }
- status = ie_infer_request_infer(request->infer_request);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to start synchronous model inference\n");
- return DNN_ERROR;
- }
- infer_completion_callback(request);
- return task->done ? DNN_SUCCESS : DNN_ERROR;
- }
-}
-
static DNNReturnType get_input_ov(void *model, DNNData *input, const char *input_name)
{
- OVModel *ov_model = model;
+ OVModel *ov_model = (OVModel *)model;
OVContext *ctx = &ov_model->ctx;
char *model_input_name = NULL;
char *all_input_names = NULL;
@@ -437,7 +89,6 @@
size_t model_input_count = 0;
dimensions_t dims;
precision_e precision;
- int input_resizable = ctx->options.input_resizable;
status = ie_network_get_inputs_number(ov_model->network, &model_input_count);
if (status != OK) {
@@ -460,9 +111,17 @@
return DNN_ERROR;
}
+ // The order of dims in the openvino is fixed and it is always NCHW for 4-D data.
+ // while we pass NHWC data from FFmpeg to openvino
+ status = ie_network_set_input_layout(ov_model->network, input_name, NHWC);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Input \"%s\" does not match layout NHWC\n", input_name);
+ return DNN_ERROR;
+ }
+
input->channels = dims.dims[1];
- input->height = input_resizable ? -1 : dims.dims[2];
- input->width = input_resizable ? -1 : dims.dims[3];
+ input->height = dims.dims[2];
+ input->width = dims.dims[3];
input->dt = precision_to_datatype(precision);
return DNN_SUCCESS;
} else {
@@ -481,15 +140,10 @@
const char *output_name, int *output_width, int *output_height)
{
DNNReturnType ret;
- OVModel *ov_model = model;
+ OVModel *ov_model = (OVModel *)model;
OVContext *ctx = &ov_model->ctx;
- TaskItem task;
- RequestItem request;
AVFrame *in_frame = av_frame_alloc();
AVFrame *out_frame = NULL;
- TaskItem *ptask = &task;
- IEStatusCode status;
- input_shapes_t input_shapes;
if (!in_frame) {
av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for input frame\n");
@@ -504,39 +158,7 @@
in_frame->width = input_width;
in_frame->height = input_height;
- if (ctx->options.input_resizable) {
- status = ie_network_get_input_shapes(ov_model->network, &input_shapes);
- input_shapes.shapes->shape.dims[2] = input_height;
- input_shapes.shapes->shape.dims[3] = input_width;
- status |= ie_network_reshape(ov_model->network, input_shapes);
- ie_network_input_shapes_free(&input_shapes);
- if (status != OK) {
- av_log(ctx, AV_LOG_ERROR, "Failed to reshape input size for %s\n", input_name);
- return DNN_ERROR;
- }
- }
-
- if (!ov_model->exe_network) {
- if (init_model_ov(ov_model, input_name, output_name) != DNN_SUCCESS) {
- av_log(ctx, AV_LOG_ERROR, "Failed init OpenVINO exectuable network or inference request\n");
- return DNN_ERROR;
- }
- }
-
- task.done = 0;
- task.do_ioproc = 0;
- task.async = 0;
- task.input_name = input_name;
- task.in_frame = in_frame;
- task.output_name = output_name;
- task.out_frame = out_frame;
- task.ov_model = ov_model;
-
- request.infer_request = ov_model->infer_request;
- request.task_count = 1;
- request.tasks = &ptask;
-
- ret = execute_model_ov(&request);
+ ret = execute_model_ov(ov_model->model, input_name, in_frame, &output_name, 1, out_frame, 0);
*output_width = out_frame->width;
*output_height = out_frame->height;
@@ -545,12 +167,15 @@
return ret;
}
-DNNModel *ff_dnn_load_model_ov(const char *model_filename, DNNFunctionType func_type, const char *options, AVFilterContext *filter_ctx)
+DNNModel *ff_dnn_load_model_ov(const char *model_filename, const char *options, void *userdata)
{
+ char *all_dev_names = NULL;
DNNModel *model = NULL;
OVModel *ov_model = NULL;
OVContext *ctx = NULL;
IEStatusCode status;
+ ie_config_t config = {NULL, NULL, NULL};
+ ie_available_devices_t a_dev;
model = av_mallocz(sizeof(DNNModel));
if (!model){
@@ -558,11 +183,8 @@
}
ov_model = av_mallocz(sizeof(OVModel));
- if (!ov_model) {
- av_freep(&model);
- return NULL;
- }
- model->model = ov_model;
+ if (!ov_model)
+ goto err;
ov_model->model = model;
ov_model->ctx.class = &dnn_openvino_class;
ctx = &ov_model->ctx;
@@ -579,223 +201,191 @@
goto err;
status = ie_core_read_network(ov_model->core, model_filename, NULL, &ov_model->network);
+ if (status != OK)
+ goto err;
+
+ status = ie_core_load_network(ov_model->core, ov_model->network, ctx->options.device_type, &config, &ov_model->exe_network);
if (status != OK) {
- ie_version_t ver;
- ver = ie_c_api_version();
- av_log(ctx, AV_LOG_ERROR, "Failed to read the network from model file %s,\n"
- "Please check if the model version matches the runtime OpenVINO %s\n",
- model_filename, ver.api_version);
- ie_version_free(&ver);
+ av_log(ctx, AV_LOG_ERROR, "Failed to init OpenVINO model\n");
+ status = ie_core_get_available_devices(ov_model->core, &a_dev);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to get available devices\n");
+ goto err;
+ }
+ for (int i = 0; i < a_dev.num_devices; i++) {
+ APPEND_STRING(all_dev_names, a_dev.devices[i])
+ }
+ av_log(ctx, AV_LOG_ERROR,"device %s may not be supported, all available devices are: \"%s\"\n",
+ ctx->options.device_type, all_dev_names);
goto err;
}
+ status = ie_exec_network_create_infer_request(ov_model->exe_network, &ov_model->infer_request);
+ if (status != OK)
+ goto err;
+
+ model->model = (void *)ov_model;
model->get_input = &get_input_ov;
model->get_output = &get_output_ov;
model->options = options;
- model->filter_ctx = filter_ctx;
- model->func_type = func_type;
+ model->userdata = userdata;
return model;
err:
- ff_dnn_free_model_ov(&model);
+ if (model)
+ av_freep(&model);
+ if (ov_model) {
+ if (ov_model->infer_request)
+ ie_infer_request_free(&ov_model->infer_request);
+ if (ov_model->exe_network)
+ ie_exec_network_free(&ov_model->exe_network);
+ if (ov_model->network)
+ ie_network_free(&ov_model->network);
+ if (ov_model->core)
+ ie_core_free(&ov_model->core);
+ av_freep(&ov_model);
+ }
return NULL;
}
+static DNNReturnType execute_model_ov(const DNNModel *model, const char *input_name, AVFrame *in_frame,
+ const char **output_names, uint32_t nb_output, AVFrame *out_frame,
+ int do_ioproc)
+{
+ char *model_output_name = NULL;
+ char *all_output_names = NULL;
+ dimensions_t dims;
+ precision_e precision;
+ ie_blob_buffer_t blob_buffer;
+ OVModel *ov_model = (OVModel *)model->model;
+ OVContext *ctx = &ov_model->ctx;
+ IEStatusCode status;
+ size_t model_output_count = 0;
+ DNNData input, output;
+ ie_blob_t *input_blob = NULL;
+
+ status = ie_infer_request_get_blob(ov_model->infer_request, input_name, &input_blob);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to get input blob\n");
+ return DNN_ERROR;
+ }
+
+ status |= ie_blob_get_dims(input_blob, &dims);
+ status |= ie_blob_get_precision(input_blob, &precision);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to get input blob dims/precision\n");
+ return DNN_ERROR;
+ }
+
+ status = ie_blob_get_buffer(input_blob, &blob_buffer);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to get input blob buffer\n");
+ return DNN_ERROR;
+ }
+
+ input.height = dims.dims[2];
+ input.width = dims.dims[3];
+ input.channels = dims.dims[1];
+ input.data = blob_buffer.buffer;
+ input.dt = precision_to_datatype(precision);
+ if (do_ioproc) {
+ if (ov_model->model->pre_proc != NULL) {
+ ov_model->model->pre_proc(in_frame, &input, ov_model->model->userdata);
+ } else {
+ proc_from_frame_to_dnn(in_frame, &input, ctx);
+ }
+ }
+ ie_blob_free(&input_blob);
+
+ if (nb_output != 1) {
+ // currently, the filter does not need multiple outputs,
+ // so we just pending the support until we really need it.
+ av_log(ctx, AV_LOG_ERROR, "do not support multiple outputs\n");
+ return DNN_ERROR;
+ }
+
+ status = ie_infer_request_infer(ov_model->infer_request);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to start synchronous model inference\n");
+ return DNN_ERROR;
+ }
+
+ for (uint32_t i = 0; i < nb_output; ++i) {
+ const char *output_name = output_names[i];
+ ie_blob_t *output_blob = NULL;
+ status = ie_infer_request_get_blob(ov_model->infer_request, output_name, &output_blob);
+ if (status != OK) {
+ //incorrect output name
+ av_log(ctx, AV_LOG_ERROR, "Failed to get model output data\n");
+ status = ie_network_get_outputs_number(ov_model->network, &model_output_count);
+ for (size_t i = 0; i < model_output_count; i++) {
+ status = ie_network_get_output_name(ov_model->network, i, &model_output_name);
+ APPEND_STRING(all_output_names, model_output_name)
+ }
+ av_log(ctx, AV_LOG_ERROR,
+ "output \"%s\" may not correct, all output(s) are: \"%s\"\n",
+ output_name, all_output_names);
+ return DNN_ERROR;
+ }
+
+ status = ie_blob_get_buffer(output_blob, &blob_buffer);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to access output memory\n");
+ return DNN_ERROR;
+ }
+
+ status |= ie_blob_get_dims(output_blob, &dims);
+ status |= ie_blob_get_precision(output_blob, &precision);
+ if (status != OK) {
+ av_log(ctx, AV_LOG_ERROR, "Failed to get dims or precision of output\n");
+ return DNN_ERROR;
+ }
+
+ output.channels = dims.dims[1];
+ output.height = dims.dims[2];
+ output.width = dims.dims[3];
+ output.dt = precision_to_datatype(precision);
+ output.data = blob_buffer.buffer;
+ if (do_ioproc) {
+ if (ov_model->model->post_proc != NULL) {
+ ov_model->model->post_proc(out_frame, &output, ov_model->model->userdata);
+ } else {
+ proc_from_dnn_to_frame(out_frame, &output, ctx);
+ }
+ } else {
+ out_frame->width = output.width;
+ out_frame->height = output.height;
+ }
+ ie_blob_free(&output_blob);
+ }
+
+ return DNN_SUCCESS;
+}
+
DNNReturnType ff_dnn_execute_model_ov(const DNNModel *model, const char *input_name, AVFrame *in_frame,
const char **output_names, uint32_t nb_output, AVFrame *out_frame)
{
- OVModel *ov_model = model->model;
+ OVModel *ov_model = (OVModel *)model->model;
OVContext *ctx = &ov_model->ctx;
- TaskItem task;
- RequestItem request;
- TaskItem *ptask = &task;