Compare commits
62 Commits
release/4.4
..
n4.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e12af29d1 | |||
| 716b5c6ec9 | |||
| 9d921e38f4 | |||
| c49dfee90b | |||
| 3f3cfddb37 | |||
| b7897f0319 | |||
| 6eac7d79f4 | |||
| 04e1d16f65 | |||
| 49b60a9a52 | |||
| 3201350dc7 | |||
| 157bbc779c | |||
| bf29cf8eb6 | |||
| 6e64260a19 | |||
| 7754a2ea12 | |||
| d84b9ab4ab | |||
| f172490742 | |||
| 330a757d41 | |||
| ea27fe480e | |||
| db2002aee7 | |||
| 788a7c027b | |||
| 7c0a9ff9c0 | |||
| 30d66abc80 | |||
| 5171e0ee18 | |||
| 245d0f1889 | |||
| 0260352d92 | |||
| a2ab8babef | |||
| 751f285152 | |||
| 2c738c7521 | |||
| 82d70d8038 | |||
| cc948a1c8c | |||
| 5c1e458b34 | |||
| 8bdc64d45f | |||
| a3e0c9f8f0 | |||
| 95b9ac040e | |||
| f823932349 | |||
| fa0a71ac41 | |||
| e149b24c63 | |||
| 2ce670fc48 | |||
| 6011484167 | |||
| c372189443 | |||
| 335ddf2fe9 | |||
| 6514919306 | |||
| 0e51c7b64a | |||
| 28460ece95 | |||
| 63d14168a5 | |||
| 838e17ffec | |||
| d078f39a51 | |||
| e468d9248c | |||
| e625d40b93 | |||
| bb788dec83 | |||
| 611fc7244a | |||
| 8dee726b1a | |||
| dba8e32e44 | |||
| e6ab99f324 | |||
| cdf88b5a0c | |||
| 3a390eadd2 | |||
| e929799065 | |||
| 0c37321362 | |||
| cfec756a6d | |||
| 569a9d3d70 | |||
| 52dc21a68d | |||
| c1ebaffba9 |
@@ -1,23 +0,0 @@
|
||||
exclude: ^tests/ref/
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-case-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-illegal-windows-names
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: fix-byte-order-marker
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: aarch64-asm-indent
|
||||
name: fix aarch64 assembly indentation
|
||||
files: ^.*/aarch64/.*\.S$
|
||||
language: script
|
||||
entry: ./tools/check_arm_indent.sh --apply
|
||||
pass_filenames: false
|
||||
@@ -1,29 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/4.4
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Pre-Commit
|
||||
runs-on: utilities
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pre-commit CI
|
||||
id: install
|
||||
run: |
|
||||
python3 -m venv ~/pre-commit
|
||||
~/pre-commit/bin/pip install --upgrade pip setuptools
|
||||
~/pre-commit/bin/pip install pre-commit
|
||||
echo "envhash=$({ python3 --version && cat .forgejo/pre-commit/config.yaml; } | sha256sum | cut -d' ' -f1)" >> $FORGEJO_OUTPUT
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit-${{ steps.install.outputs.envhash }}
|
||||
- name: Run pre-commit CI
|
||||
run: ~/pre-commit/bin/pre-commit run -c .forgejo/pre-commit/config.yaml --show-diff-on-failure --color=always --all-files
|
||||
@@ -1,80 +0,0 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release/4.4
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
run_fate:
|
||||
name: Fate (${{ matrix.runner }}, ${{ matrix.shared }}, ${{ matrix.bits }} bit)
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runner: [linux-aarch64]
|
||||
shared: ['static']
|
||||
bits: ['64']
|
||||
include:
|
||||
- runner: linux-amd64
|
||||
shared: 'static'
|
||||
bits: '32'
|
||||
- runner: linux-amd64
|
||||
shared: 'shared'
|
||||
bits: '64'
|
||||
runs-on: ${{ matrix.runner }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --enable-gpl --enable-nonfree --enable-memory-poisoning --assert-level=2 \
|
||||
$([ "${{ matrix.bits }}" != "32" ] || echo --arch=x86_32 --extra-cflags=-m32 --extra-cxxflags=-m32 --extra-ldflags=-m32) \
|
||||
$([ "${{ matrix.shared }}" != "shared" ] || echo --enable-shared --disable-static) \
|
||||
|| CFGRES=$? && CFGRES=$?
|
||||
cat ffbuild/config.log
|
||||
exit $CFGRES
|
||||
- name: Build
|
||||
run: make -j$(nproc)
|
||||
- name: Restore Cached Fate-Suite
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: fate-suite
|
||||
key: fate-suite
|
||||
restore-keys: |
|
||||
fate-suite-
|
||||
- name: Sync Fate-Suite
|
||||
id: fate
|
||||
run: |
|
||||
make fate-rsync SAMPLES=$PWD/fate-suite
|
||||
echo "hash=$(find fate-suite -type f -printf "%P %s %T@\n" | sort | sha256sum | cut -d' ' -f1)" >> $FORGEJO_OUTPUT
|
||||
- name: Cache Fate-Suite
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ format('fate-suite-{0}', steps.fate.outputs.hash) != steps.cache.outputs.cache-matched-key }}
|
||||
with:
|
||||
path: fate-suite
|
||||
key: fate-suite-${{ steps.fate.outputs.hash }}
|
||||
- name: Run Fate
|
||||
run: LD_LIBRARY_PATH="$(printf "%s:" "$PWD"/lib*)$PWD" make fate fate-build SAMPLES=$PWD/fate-suite -j$(nproc)
|
||||
compile_only:
|
||||
name: Fate (Win64, Build-Only)
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: ["ghcr.io/btbn/ffmpeg-builds/win64-gpl-4.4:latest"]
|
||||
runs-on: linux-amd64
|
||||
container: ${{ matrix.image }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --pkg-config-flags="--static" $FFBUILD_TARGET_FLAGS $FF_CONFIGURE \
|
||||
--cc="$CC" --cxx="$CXX" --ar="$AR" --ranlib="$RANLIB" --nm="$NM" \
|
||||
--extra-cflags="$FF_CFLAGS" --extra-cxxflags="$FF_CXXFLAGS" \
|
||||
--extra-libs="$FF_LIBS" --extra-ldflags="$FF_LDFLAGS" --extra-ldexeflags="$FF_LDEXEFLAGS"
|
||||
- name: Build
|
||||
run: make -j$(nproc)
|
||||
- name: Run Fate
|
||||
run: make -j$(nproc) fate-build
|
||||
@@ -10,16 +10,12 @@
|
||||
<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>
|
||||
<atomnuker@gmail.com> <rpehlivanov@obe.tv>
|
||||
<lizhong1008@gmail.com> <zhong.li@intel.com>
|
||||
<lizhong1008@gmail.com> <zhongli_dev@126.com>
|
||||
<zhong.li@intel.com> <zhongli_dev@126.com>
|
||||
<andreas.rheinhardt@gmail.com> <andreas.rheinhardt@googlemail.com>
|
||||
rcombs <rcombs@rcombs.me> <rodger.combs@gmail.com>
|
||||
<thilo.borgmann@mail.de> <thilo.borgmann@googlemail.com>
|
||||
<liuqi05@kuaishou.com> <lq@chinaffmpeg.org>
|
||||
<ruiling.song83@gmail.com> <ruiling.song@intel.com>
|
||||
|
||||
+9
-9
@@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@@ -158,7 +158,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
See the Git history of the project (https://git.ffmpeg.org/ffmpeg) to
|
||||
See the Git history of the project (git://source.ffmpeg.org/ffmpeg) to
|
||||
get the names of people who have contributed to FFmpeg.
|
||||
|
||||
To check the log, you can type the command "git log" in the FFmpeg
|
||||
source directory, or browse the online repository at
|
||||
https://git.ffmpeg.org/ffmpeg
|
||||
http://source.ffmpeg.org.
|
||||
|
||||
@@ -15,11 +15,3 @@ NOTICE
|
||||
------
|
||||
|
||||
- Non system dependencies (e.g. libx264, libvpx) are disabled by default.
|
||||
|
||||
NOTICE for Package Maintainers
|
||||
------------------------------
|
||||
|
||||
- It is recommended to build FFmpeg twice, first with minimal external dependencies so
|
||||
that 3rd party packages, which depend on FFmpegs libavutil/libavfilter/libavcodec/libavformat
|
||||
can then be built. And last build FFmpeg with full dependancies (which may in turn depend on
|
||||
some of these 3rd party packages). This avoids circular dependencies during build.
|
||||
|
||||
+8
-17
@@ -55,9 +55,9 @@ fate.ffmpeg.org Timothy Gu
|
||||
Trac bug tracker Alexander Strasser, Michael Niedermayer, Carl Eugen Hoyos
|
||||
Patchwork Andriy Gelman
|
||||
mailing lists Baptiste Coudurier
|
||||
Twitter Reynaldo H. Verdejo Pinochet
|
||||
Twitter Lou Logan, 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 @@ Codecs:
|
||||
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
|
||||
@@ -235,6 +235,7 @@ Codecs:
|
||||
rv10.c Michael Niedermayer
|
||||
s3tc* Ivo van Poorten
|
||||
smc.c Mike Melanson
|
||||
smvjpegdec.c Ash Hughes
|
||||
snow* Michael Niedermayer, Loren Merritt
|
||||
sonic.c Alex Beregszaszi
|
||||
speedhq.c Steinar H. Gunderson
|
||||
@@ -392,12 +393,7 @@ Muxers/Demuxers:
|
||||
afc.c Paul B Mahol
|
||||
aiffdec.c Baptiste Coudurier, Matthieu Bouron
|
||||
aiffenc.c Baptiste Coudurier, Matthieu Bouron
|
||||
alp.c Zane van Iperen
|
||||
amvenc.c Zane van Iperen
|
||||
apm.c Zane van Iperen
|
||||
apngdec.c Benoit Fouet
|
||||
argo_asf.c Zane van Iperen
|
||||
argo_brp.c Zane van Iperen
|
||||
ass* Aurelien Jacobs
|
||||
astdec.c Paul B Mahol
|
||||
astenc.c James Almer
|
||||
@@ -435,7 +431,6 @@ Muxers/Demuxers:
|
||||
ircam* Paul B Mahol
|
||||
iss.c Stefan Gehrer
|
||||
jvdec.c Peter Ross
|
||||
kvag.c Zane van Iperen
|
||||
libmodplug.c Clément Bœsch
|
||||
libopenmpt.c Josh de Kock
|
||||
lmlm4.c Ivo van Poorten
|
||||
@@ -468,7 +463,6 @@ Muxers/Demuxers:
|
||||
oggparse*.c David Conrad
|
||||
oma.c Maxim Poliakovski
|
||||
paf.c Paul B Mahol
|
||||
pp_bnk.c Zane van Iperen
|
||||
psxstr.c Mike Melanson
|
||||
pva.c Ivo van Poorten
|
||||
pvfdec.c Paul B Mahol
|
||||
@@ -583,12 +577,10 @@ wm4
|
||||
Releases
|
||||
========
|
||||
|
||||
7.0 Michael Niedermayer
|
||||
6.1 Michael Niedermayer
|
||||
5.1 Michael Niedermayer
|
||||
4.4 Michael Niedermayer
|
||||
3.4 Michael Niedermayer
|
||||
2.8 Michael Niedermayer
|
||||
2.7 Michael Niedermayer
|
||||
2.6 Michael Niedermayer
|
||||
2.5 Michael Niedermayer
|
||||
|
||||
If you want to maintain an older release, please contact us
|
||||
|
||||
@@ -615,9 +607,9 @@ Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
||||
James Almer 7751 2E8C FD94 A169 57E6 9A7A 1463 01AD 7376 59E0
|
||||
Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A
|
||||
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
||||
Lou Logan (llogan) 7D68 DC73 CBEF EABB 671A B6CF 621C 2E28 82F8 DC3A
|
||||
Lynne FE50 139C 6805 72CA FD52 1F8D A2FE A5F0 3F03 4464
|
||||
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
|
||||
DD1E C9E8 DE08 5C62 9B3E 1846 B18E 8928 B394 8D64
|
||||
Nicolas George 24CE 01CE 9ACC 5CEB 74D8 8D9D B063 D997 36E5 4C93
|
||||
Nikolay Aleksandrov 8978 1D8C FB71 588E 4B27 EAA8 C4F0 B5FC E011 13B1
|
||||
Panagiotis Issaris 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029
|
||||
@@ -637,4 +629,3 @@ Tiancheng "Timothy" Gu 9456 AFC0 814A 8139 E994 8351 7FE6 B095 B582 B0D4
|
||||
Tim Nicholson 38CF DB09 3ED0 F607 8B67 6CED 0C0B FC44 8B0B FC83
|
||||
Tomas Härdin (thardin) A79D 4E3D F38F 763F 91F5 8B33 A01E 8AE0 41BB 2551
|
||||
Wei Gao 4269 7741 857A 0E60 9EC5 08D2 4744 4EFA 62C1 87B9
|
||||
Zane van Iperen (zane) 61AE D40F 368B 6F26 9DAE 3892 6861 6B2D 8AC4 DCC5
|
||||
|
||||
@@ -53,23 +53,13 @@ target_dec_%_fuzzer$(EXESUF): target_dec_%_fuzzer.o $(FF_DEP_LIBS)
|
||||
tools/target_bsf_%_fuzzer$(EXESUF): tools/target_bsf_%_fuzzer.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
|
||||
|
||||
target_dem_%_fuzzer$(EXESUF): target_dem_%_fuzzer.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
|
||||
|
||||
tools/target_dem_fuzzer$(EXESUF): tools/target_dem_fuzzer.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
|
||||
|
||||
tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS)
|
||||
$(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH)
|
||||
|
||||
|
||||
tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS)
|
||||
tools/enum_options$(EXESUF): $(FF_DEP_LIBS)
|
||||
tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS)
|
||||
tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
|
||||
tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
|
||||
tools/target_dec_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
|
||||
tools/target_dem_%_fuzzer$(EXESUF): $(FF_DEP_LIBS)
|
||||
|
||||
CONFIGURABLE_COMPONENTS = \
|
||||
$(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c)) \
|
||||
@@ -110,7 +100,7 @@ include $(SRC_PATH)/fftools/Makefile
|
||||
include $(SRC_PATH)/doc/Makefile
|
||||
include $(SRC_PATH)/doc/examples/Makefile
|
||||
|
||||
libavcodec/avcodec.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
|
||||
libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
|
||||
|
||||
$(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
||||
ifeq ($(STRIPTYPE),direct)
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
|
||||
┌────────────────────────────────────┐
|
||||
│ RELEASE NOTES for FFmpeg 4.4 "Rao" │
|
||||
│ RELEASE NOTES for FFmpeg 4.3 "4:3" │
|
||||
└────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 4.4 "Rao", about 10
|
||||
months after the release of FFmpeg 4.3.
|
||||
The FFmpeg Project proudly presents FFmpeg 4.3 "4:3", about 10
|
||||
months after the release of FFmpeg 4.2.
|
||||
|
||||
A complete Changelog is available at the root of the project, and the
|
||||
complete Git history on https://git.ffmpeg.org/gitweb/ffmpeg.git
|
||||
|
||||
We hope you will like this release as much as we enjoyed working on it, and
|
||||
as usual, if you have any questions about it, or any FFmpeg related topic,
|
||||
feel free to join us on the #ffmpeg IRC channel (on irc.libera.chat) or ask
|
||||
feel free to join us on the #ffmpeg IRC channel (on irc.freenode.net) or ask
|
||||
on the mailing-lists.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Minimum CUDA compatibility definitions header
|
||||
*
|
||||
* Copyright (c) 2019 rcombs
|
||||
* Copyright (c) 2019 Rodger Combs
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
@@ -49,16 +49,6 @@ typedef struct __device_builtin__ __align__(4) ushort2
|
||||
unsigned short x, y;
|
||||
} ushort2;
|
||||
|
||||
typedef struct __device_builtin__ __align__(8) float2
|
||||
{
|
||||
float x, y;
|
||||
} float2;
|
||||
|
||||
typedef struct __device_builtin__ __align__(8) int2
|
||||
{
|
||||
int x, y;
|
||||
} int2;
|
||||
|
||||
typedef struct __device_builtin__ uint3
|
||||
{
|
||||
unsigned int x, y, z;
|
||||
@@ -66,6 +56,11 @@ typedef struct __device_builtin__ uint3
|
||||
|
||||
typedef struct uint3 dim3;
|
||||
|
||||
typedef struct __device_builtin__ __align__(8) int2
|
||||
{
|
||||
int x, y;
|
||||
} int2;
|
||||
|
||||
typedef struct __device_builtin__ __align__(4) uchar4
|
||||
{
|
||||
unsigned char x, y, z, w;
|
||||
@@ -73,7 +68,7 @@ typedef struct __device_builtin__ __align__(4) uchar4
|
||||
|
||||
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
|
||||
@@ -81,11 +76,6 @@ typedef struct __device_builtin__ __align__(16) int4
|
||||
int x, y, z, w;
|
||||
} int4;
|
||||
|
||||
typedef struct __device_builtin__ __align__(16) float4
|
||||
{
|
||||
float x, y, z, w;
|
||||
} float4;
|
||||
|
||||
// Accessors for special registers
|
||||
#define GETCOMP(reg, comp) \
|
||||
asm("mov.u32 %0, %%" #reg "." #comp ";" : "=r"(tmp)); \
|
||||
@@ -110,31 +100,24 @@ GET(getThreadIdx, tid)
|
||||
#define threadIdx (getThreadIdx())
|
||||
|
||||
// Basic initializers (simple macros rather than inline functions)
|
||||
#define make_int2(a, b) ((int2){.x = a, .y = b})
|
||||
#define make_uchar2(a, b) ((uchar2){.x = a, .y = b})
|
||||
#define make_ushort2(a, b) ((ushort2){.x = a, .y = b})
|
||||
#define make_float2(a, b) ((float2){.x = a, .y = b})
|
||||
#define make_int4(a, b, c, d) ((int4){.x = a, .y = b, .z = c, .w = d})
|
||||
#define make_uchar4(a, b, c, d) ((uchar4){.x = a, .y = b, .z = c, .w = d})
|
||||
#define make_ushort4(a, b, c, d) ((ushort4){.x = a, .y = b, .z = c, .w = d})
|
||||
#define make_float4(a, b, c, d) ((float4){.x = a, .y = b, .z = c, .w = d})
|
||||
|
||||
// Conversions from the tex instruction's 4-register output to various types
|
||||
#define TEX2D(type, ret) static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);}
|
||||
|
||||
TEX2D(unsigned char, a & 0xFF)
|
||||
TEX2D(unsigned short, a & 0xFFFF)
|
||||
TEX2D(float, a)
|
||||
TEX2D(uchar2, make_uchar2(a & 0xFF, b & 0xFF))
|
||||
TEX2D(ushort2, make_ushort2(a & 0xFFFF, b & 0xFFFF))
|
||||
TEX2D(float2, make_float2(a, b))
|
||||
TEX2D(uchar4, make_uchar4(a & 0xFF, b & 0xFF, c & 0xFF, d & 0xFF))
|
||||
TEX2D(ushort4, make_ushort4(a & 0xFFFF, b & 0xFFFF, c & 0xFFFF, d & 0xFFFF))
|
||||
TEX2D(float4, make_float4(a, b, c, d))
|
||||
|
||||
// Template calling tex instruction and converting the output to the selected type
|
||||
template<typename T>
|
||||
inline __device__ T tex2D(cudaTextureObject_t texObject, float x, float y)
|
||||
template <class T>
|
||||
static inline __device__ T tex2D(cudaTextureObject_t texObject, float x, float y)
|
||||
{
|
||||
T ret;
|
||||
unsigned ret1, ret2, ret3, ret4;
|
||||
@@ -145,44 +128,4 @@ inline __device__ T tex2D(cudaTextureObject_t texObject, float x, float y)
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline __device__ float4 tex2D<float4>(cudaTextureObject_t texObject, float x, float y)
|
||||
{
|
||||
float4 ret;
|
||||
asm("tex.2d.v4.f32.f32 {%0, %1, %2, %3}, [%4, {%5, %6}];" :
|
||||
"=r"(ret.x), "=r"(ret.y), "=r"(ret.z), "=r"(ret.w) :
|
||||
"l"(texObject), "f"(x), "f"(y));
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline __device__ float tex2D<float>(cudaTextureObject_t texObject, float x, float y)
|
||||
{
|
||||
return tex2D<float4>(texObject, x, y).x;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline __device__ float2 tex2D<float2>(cudaTextureObject_t texObject, float x, float y)
|
||||
{
|
||||
float4 ret = tex2D<float4>(texObject, x, y);
|
||||
return make_float2(ret.x, ret.y);
|
||||
}
|
||||
|
||||
// Math helper functions
|
||||
static inline __device__ float floorf(float a) { return __builtin_floorf(a); }
|
||||
static inline __device__ float floor(float a) { return __builtin_floorf(a); }
|
||||
static inline __device__ double floor(double a) { return __builtin_floor(a); }
|
||||
static inline __device__ float ceilf(float a) { return __builtin_ceilf(a); }
|
||||
static inline __device__ float ceil(float a) { return __builtin_ceilf(a); }
|
||||
static inline __device__ double ceil(double a) { return __builtin_ceil(a); }
|
||||
static inline __device__ float truncf(float a) { return __builtin_truncf(a); }
|
||||
static inline __device__ float trunc(float a) { return __builtin_truncf(a); }
|
||||
static inline __device__ double trunc(double a) { return __builtin_trunc(a); }
|
||||
static inline __device__ float fabsf(float a) { return __builtin_fabsf(a); }
|
||||
static inline __device__ float fabs(float a) { return __builtin_fabsf(a); }
|
||||
static inline __device__ double fabs(double a) { return __builtin_fabs(a); }
|
||||
|
||||
static inline __device__ float __sinf(float a) { return __nvvm_sin_approx_f(a); }
|
||||
static inline __device__ float __cosf(float a) { return __nvvm_cos_approx_f(a); }
|
||||
|
||||
#endif /* COMPAT_CUDA_CUDA_RUNTIME_H */
|
||||
|
||||
@@ -190,9 +190,9 @@ External library support:
|
||||
Using any of the following switches will allow FFmpeg to link to the
|
||||
corresponding external library. All the components depending on that library
|
||||
will become enabled, if all their other dependencies are met and they are not
|
||||
explicitly disabled. E.g. --enable-libopus will enable linking to
|
||||
libopus and allow the libopus encoder to be built, unless it is
|
||||
specifically disabled with --disable-encoder=libopus.
|
||||
explicitly disabled. E.g. --enable-libwavpack will enable linking to
|
||||
libwavpack and allow the libwavpack encoder to be built, unless it is
|
||||
specifically disabled with --disable-encoder=libwavpack.
|
||||
|
||||
Note that only the system libraries are auto-detected. All the other external
|
||||
libraries must be explicitly enabled.
|
||||
@@ -253,13 +253,10 @@ External library support:
|
||||
--enable-libopenh264 enable H.264 encoding via OpenH264 [no]
|
||||
--enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
|
||||
--enable-libopenmpt enable decoding tracked files via libopenmpt [no]
|
||||
--enable-libopenvino enable OpenVINO as a DNN module backend
|
||||
for DNN based filters like dnn_processing [no]
|
||||
--enable-libopus enable Opus de/encoding via libopus [no]
|
||||
--enable-libpulse enable Pulseaudio input via libpulse [no]
|
||||
--enable-librabbitmq enable RabbitMQ library [no]
|
||||
--enable-librav1e enable AV1 encoding via rav1e [no]
|
||||
--enable-librist enable RIST via librist [no]
|
||||
--enable-librsvg enable SVG rasterization via librsvg [no]
|
||||
--enable-librubberband enable rubberband needed for rubberband filter [no]
|
||||
--enable-librtmp enable RTMP[E] support via librtmp [no]
|
||||
@@ -270,7 +267,6 @@ External library support:
|
||||
--enable-libspeex enable Speex de/encoding via libspeex [no]
|
||||
--enable-libsrt enable Haivision SRT protocol via libsrt [no]
|
||||
--enable-libssh enable SFTP protocol via libssh [no]
|
||||
--enable-libsvtav1 enable AV1 encoding via SVT [no]
|
||||
--enable-libtensorflow enable TensorFlow as a DNN module backend
|
||||
for DNN based filters like sr [no]
|
||||
--enable-libtesseract enable Tesseract, needed for ocr filter [no]
|
||||
@@ -278,7 +274,6 @@ External library support:
|
||||
--enable-libtls enable LibreSSL (via libtls), needed for https support
|
||||
if openssl, gnutls or mbedtls is not used [no]
|
||||
--enable-libtwolame enable MP2 encoding via libtwolame [no]
|
||||
--enable-libuavs3d enable AVS3 decoding via libuavs3d [no]
|
||||
--enable-libv4l2 enable libv4l2/v4l-utils [no]
|
||||
--enable-libvidstab enable video stabilization using vid.stab [no]
|
||||
--enable-libvmaf enable vmaf filter via libvmaf [no]
|
||||
@@ -286,6 +281,7 @@ External library support:
|
||||
--enable-libvorbis enable Vorbis en/decoding via libvorbis,
|
||||
native implementation exists [no]
|
||||
--enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
|
||||
--enable-libwavpack enable wavpack encoding via libwavpack [no]
|
||||
--enable-libwebp enable WebP encoding via libwebp [no]
|
||||
--enable-libx264 enable H.264 encoding via x264 [no]
|
||||
--enable-libx265 enable HEVC encoding via x265 [no]
|
||||
@@ -416,9 +412,7 @@ Advanced options (experts only):
|
||||
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
|
||||
--disable-safe-bitstream-reader
|
||||
disable buffer boundary checking in bitreaders
|
||||
(This disables some security checks and can cause undefined behavior,
|
||||
crashes and arbitrary code execution, it may be faster, but
|
||||
should only be used with trusted input)
|
||||
(faster, but may crash)
|
||||
--sws-max-filter-size=N the max filter size swscale uses [$sws_max_filter_size_default]
|
||||
|
||||
Optimization options (experts only):
|
||||
@@ -538,7 +532,7 @@ die(){
|
||||
|
||||
If you think configure made a mistake, make sure you are using the latest
|
||||
version from Git. If the latest version fails, report the problem to the
|
||||
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
|
||||
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
|
||||
EOF
|
||||
if disabled logging; then
|
||||
cat <<EOF
|
||||
@@ -1737,6 +1731,7 @@ EXTERNAL_LIBRARY_GPL_LIST="
|
||||
EXTERNAL_LIBRARY_NONFREE_LIST="
|
||||
decklink
|
||||
libfdk_aac
|
||||
openssl
|
||||
libtls
|
||||
"
|
||||
|
||||
@@ -1746,6 +1741,7 @@ EXTERNAL_LIBRARY_VERSION3_LIST="
|
||||
liblensfun
|
||||
libopencore_amrnb
|
||||
libopencore_amrwb
|
||||
libvmaf
|
||||
libvo_amrwbenc
|
||||
mbedtls
|
||||
rkmpp
|
||||
@@ -1794,12 +1790,10 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libopenh264
|
||||
libopenjpeg
|
||||
libopenmpt
|
||||
libopenvino
|
||||
libopus
|
||||
libpulse
|
||||
librabbitmq
|
||||
librav1e
|
||||
librist
|
||||
librsvg
|
||||
librtmp
|
||||
libshine
|
||||
@@ -1809,16 +1803,14 @@ EXTERNAL_LIBRARY_LIST="
|
||||
libspeex
|
||||
libsrt
|
||||
libssh
|
||||
libsvtav1
|
||||
libtensorflow
|
||||
libtesseract
|
||||
libtheora
|
||||
libtwolame
|
||||
libuavs3d
|
||||
libv4l2
|
||||
libvmaf
|
||||
libvorbis
|
||||
libvpx
|
||||
libwavpack
|
||||
libwebp
|
||||
libxml2
|
||||
libzimg
|
||||
@@ -1828,7 +1820,6 @@ EXTERNAL_LIBRARY_LIST="
|
||||
mediacodec
|
||||
openal
|
||||
opengl
|
||||
openssl
|
||||
pocketsphinx
|
||||
vapoursynth
|
||||
"
|
||||
@@ -2062,7 +2053,6 @@ ARCH_EXT_LIST_PPC="
|
||||
ldbrx
|
||||
power8
|
||||
ppc4xx
|
||||
vec_xl
|
||||
vsx
|
||||
"
|
||||
|
||||
@@ -2130,7 +2120,6 @@ HEADERS_LIST="
|
||||
ES2_gl_h
|
||||
gsm_h
|
||||
io_h
|
||||
linux_dma_buf_h
|
||||
linux_perf_event_h
|
||||
machine_ioctl_bt848_h
|
||||
machine_ioctl_meteor_h
|
||||
@@ -2293,7 +2282,6 @@ TOOLCHAIN_FEATURES="
|
||||
|
||||
TYPES_LIST="
|
||||
kCMVideoCodecType_HEVC
|
||||
kCMVideoCodecType_HEVCWithAlpha
|
||||
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange
|
||||
kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ
|
||||
kCVImageBufferTransferFunction_ITU_R_2100_HLG
|
||||
@@ -2332,7 +2320,6 @@ HAVE_LIST="
|
||||
$THREADS_LIST
|
||||
$TOOLCHAIN_FEATURES
|
||||
$TYPES_LIST
|
||||
libdrm_getfb2
|
||||
makeinfo
|
||||
makeinfo_html
|
||||
opencl_d3d11
|
||||
@@ -2343,7 +2330,6 @@ HAVE_LIST="
|
||||
opencl_vaapi_intel_media
|
||||
perl
|
||||
pod2man
|
||||
posix_ioctl
|
||||
texi2html
|
||||
"
|
||||
|
||||
@@ -2352,7 +2338,6 @@ CONFIG_EXTRA="
|
||||
aandcttables
|
||||
ac3dsp
|
||||
adts_header
|
||||
atsc_a53
|
||||
audio_frame_queue
|
||||
audiodsp
|
||||
blockdsp
|
||||
@@ -2553,7 +2538,6 @@ altivec_deps="ppc"
|
||||
dcbzl_deps="ppc"
|
||||
ldbrx_deps="ppc"
|
||||
ppc4xx_deps="ppc"
|
||||
vec_xl_deps="altivec"
|
||||
vsx_deps="altivec"
|
||||
power8_deps="vsx"
|
||||
|
||||
@@ -2567,7 +2551,7 @@ mips64r6_deps="mips"
|
||||
mipsfpu_deps="mips"
|
||||
mipsdsp_deps="mips"
|
||||
mipsdspr2_deps="mips"
|
||||
mmi_deps_any="loongson2 loongson3"
|
||||
mmi_deps="mips"
|
||||
msa_deps="mipsfpu"
|
||||
msa2_deps="msa"
|
||||
|
||||
@@ -2636,15 +2620,14 @@ cbs_mpeg2_select="cbs"
|
||||
cbs_vp9_select="cbs"
|
||||
dct_select="rdft"
|
||||
dirac_parse_select="golomb"
|
||||
dnn_suggest="libtensorflow libopenvino"
|
||||
dnn_deps="swscale"
|
||||
dnn_suggest="libtensorflow"
|
||||
error_resilience_select="me_cmp"
|
||||
faandct_deps="faan"
|
||||
faandct_select="fdctdsp"
|
||||
faanidct_deps="faan"
|
||||
faanidct_select="idctdsp"
|
||||
h264dsp_select="startcode"
|
||||
hevcparse_select="atsc_a53 golomb"
|
||||
hevcparse_select="golomb"
|
||||
frame_thread_encoder_deps="encoders threads"
|
||||
intrax8_select="blockdsp idctdsp"
|
||||
mdct_select="fft"
|
||||
@@ -2660,7 +2643,7 @@ rdft_select="fft"
|
||||
|
||||
# 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"
|
||||
@@ -2695,7 +2678,7 @@ atrac3al_decoder_select="mdct"
|
||||
atrac3p_decoder_select="mdct sinewin"
|
||||
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"
|
||||
@@ -2723,7 +2706,6 @@ eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp mpegvideo"
|
||||
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"
|
||||
@@ -2749,12 +2731,12 @@ h263_encoder_select="h263dsp mpegvideoenc"
|
||||
h263i_decoder_select="h263_decoder"
|
||||
h263p_decoder_select="h263_decoder"
|
||||
h263p_encoder_select="h263_encoder"
|
||||
h264_decoder_select="atsc_a53 cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp"
|
||||
h264_decoder_select="cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp"
|
||||
h264_decoder_suggest="error_resilience"
|
||||
hap_decoder_select="snappy texturedsp"
|
||||
hap_encoder_deps="libsnappy"
|
||||
hap_encoder_select="texturedspenc"
|
||||
hevc_decoder_select="atsc_a53 bswapdsp cabac golomb hevcparse videodsp"
|
||||
hevc_decoder_select="bswapdsp cabac golomb hevcparse videodsp"
|
||||
huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp"
|
||||
huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp"
|
||||
hymt_decoder_select="huffyuv_decoder"
|
||||
@@ -2766,11 +2748,10 @@ indeo3_decoder_select="hpeldsp"
|
||||
indeo4_decoder_select="ividsp"
|
||||
indeo5_decoder_select="ividsp"
|
||||
interplay_video_decoder_select="hpeldsp"
|
||||
ipu_decoder_select="mpegvideo"
|
||||
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"
|
||||
@@ -2782,7 +2763,6 @@ mjpeg_encoder_select="jpegtables mpegvideoenc"
|
||||
mjpegb_decoder_select="mjpeg_decoder"
|
||||
mlp_decoder_select="mlp_parser"
|
||||
mlp_encoder_select="lpc audio_frame_queue"
|
||||
mobiclip_decoder_select="bswapdsp golomb"
|
||||
motionpixels_decoder_select="bswapdsp"
|
||||
mp1_decoder_select="mpegaudio"
|
||||
mp1float_decoder_select="mpegaudio"
|
||||
@@ -2811,7 +2791,7 @@ msmpeg4v2_encoder_select="h263_encoder"
|
||||
msmpeg4v3_decoder_select="h263_decoder"
|
||||
msmpeg4v3_encoder_select="h263_encoder"
|
||||
mss2_decoder_select="mpegvideo qpeldsp vc1_decoder"
|
||||
mts2_decoder_select="jpegtables mss34dsp"
|
||||
mts2_decoder_select="mss34dsp"
|
||||
mv30_decoder_select="aandcttables blockdsp"
|
||||
mvha_decoder_deps="zlib"
|
||||
mvha_decoder_select="llviddsp"
|
||||
@@ -2848,7 +2828,6 @@ rv40_decoder_select="golomb h264pred h264qpel mpegvideo rv34dsp"
|
||||
screenpresso_decoder_deps="zlib"
|
||||
shorten_decoder_select="bswapdsp"
|
||||
sipr_decoder_select="lsp"
|
||||
smvjpeg_decoder_select="mjpeg_decoder"
|
||||
snow_decoder_select="dwt h264qpel hpeldsp me_cmp rangecoder videodsp"
|
||||
snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder"
|
||||
sonic_decoder_select="golomb rangecoder"
|
||||
@@ -2856,7 +2835,6 @@ sonic_encoder_select="golomb rangecoder"
|
||||
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"
|
||||
@@ -2930,16 +2908,6 @@ videotoolbox_hwaccel_deps="videotoolbox pthreads"
|
||||
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
|
||||
xvmc_deps="X11_extensions_XvMClib_h"
|
||||
|
||||
av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
|
||||
av1_d3d11va_hwaccel_select="av1_decoder"
|
||||
av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
|
||||
av1_d3d11va2_hwaccel_select="av1_decoder"
|
||||
av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1"
|
||||
av1_dxva2_hwaccel_select="av1_decoder"
|
||||
av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS"
|
||||
av1_nvdec_hwaccel_select="av1_decoder"
|
||||
av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx"
|
||||
av1_vaapi_hwaccel_select="av1_decoder"
|
||||
h263_vaapi_hwaccel_deps="vaapi"
|
||||
h263_vaapi_hwaccel_select="h263_decoder"
|
||||
h263_videotoolbox_hwaccel_deps="videotoolbox"
|
||||
@@ -3074,7 +3042,6 @@ nvenc_encoder_deps="nvenc"
|
||||
|
||||
aac_mf_encoder_deps="mediafoundation"
|
||||
ac3_mf_encoder_deps="mediafoundation"
|
||||
av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS"
|
||||
h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m"
|
||||
h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m"
|
||||
h264_amf_encoder_deps="amf"
|
||||
@@ -3086,10 +3053,9 @@ h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser"
|
||||
h264_mf_encoder_deps="mediafoundation"
|
||||
h264_mmal_decoder_deps="mmal"
|
||||
h264_nvenc_encoder_deps="nvenc"
|
||||
h264_nvenc_encoder_select="atsc_a53"
|
||||
h264_omx_encoder_deps="omx"
|
||||
h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec"
|
||||
h264_qsv_encoder_select="atsc_a53 qsvenc"
|
||||
h264_qsv_encoder_select="qsvenc"
|
||||
h264_rkmpp_decoder_deps="rkmpp"
|
||||
h264_rkmpp_decoder_select="h264_mp4toannexb_bsf"
|
||||
h264_vaapi_encoder_select="cbs_h264 vaapi_encode"
|
||||
@@ -3103,7 +3069,6 @@ hevc_mediacodec_decoder_deps="mediacodec"
|
||||
hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser"
|
||||
hevc_mf_encoder_deps="mediafoundation"
|
||||
hevc_nvenc_encoder_deps="nvenc"
|
||||
hevc_nvenc_encoder_select="atsc_a53"
|
||||
hevc_qsv_decoder_select="hevc_mp4toannexb_bsf qsvdec"
|
||||
hevc_qsv_encoder_select="hevcparse qsvenc"
|
||||
hevc_rkmpp_decoder_deps="rkmpp"
|
||||
@@ -3163,12 +3128,11 @@ vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9"
|
||||
vp9_qsv_encoder_select="qsvenc"
|
||||
vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m"
|
||||
wmv3_crystalhd_decoder_select="crystalhd"
|
||||
av1_qsv_decoder_select="qsvdec"
|
||||
|
||||
# parsers
|
||||
aac_parser_select="adts_header"
|
||||
av1_parser_select="cbs_av1"
|
||||
h264_parser_select="atsc_a53 golomb h264dsp h264parse"
|
||||
h264_parser_select="golomb h264dsp h264parse"
|
||||
hevc_parser_select="hevcparse"
|
||||
mpegaudio_parser_select="mpegaudioheader"
|
||||
mpegvideo_parser_select="mpegvideo"
|
||||
@@ -3229,9 +3193,9 @@ pcm_mulaw_at_encoder_deps="audiotoolbox"
|
||||
pcm_mulaw_at_encoder_select="audio_frame_queue"
|
||||
chromaprint_muxer_deps="chromaprint"
|
||||
h264_videotoolbox_encoder_deps="pthreads"
|
||||
h264_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder"
|
||||
h264_videotoolbox_encoder_select="videotoolbox_encoder"
|
||||
hevc_videotoolbox_encoder_deps="pthreads"
|
||||
hevc_videotoolbox_encoder_select="atsc_a53 videotoolbox_encoder"
|
||||
hevc_videotoolbox_encoder_select="videotoolbox_encoder"
|
||||
libaom_av1_decoder_deps="libaom"
|
||||
libaom_av1_encoder_deps="libaom"
|
||||
libaom_av1_encoder_select="extract_extradata_bsf"
|
||||
@@ -3240,7 +3204,6 @@ libcelt_decoder_deps="libcelt"
|
||||
libcodec2_decoder_deps="libcodec2"
|
||||
libcodec2_encoder_deps="libcodec2"
|
||||
libdav1d_decoder_deps="libdav1d"
|
||||
libdav1d_decoder_select="atsc_a53"
|
||||
libdavs2_decoder_deps="libdavs2"
|
||||
libfdk_aac_decoder_deps="libfdk_aac"
|
||||
libfdk_aac_encoder_deps="libfdk_aac"
|
||||
@@ -3273,14 +3236,12 @@ librav1e_encoder_deps="librav1e"
|
||||
librav1e_encoder_select="extract_extradata_bsf"
|
||||
librsvg_decoder_deps="librsvg"
|
||||
libshine_encoder_deps="libshine"
|
||||
libshine_encoder_select="audio_frame_queue mpegaudioheader"
|
||||
libshine_encoder_select="audio_frame_queue"
|
||||
libspeex_decoder_deps="libspeex"
|
||||
libspeex_encoder_deps="libspeex"
|
||||
libspeex_encoder_select="audio_frame_queue"
|
||||
libsvtav1_encoder_deps="libsvtav1"
|
||||
libtheora_encoder_deps="libtheora"
|
||||
libtwolame_encoder_deps="libtwolame"
|
||||
libuavs3d_decoder_deps="libuavs3d"
|
||||
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
|
||||
libvorbis_decoder_deps="libvorbis"
|
||||
libvorbis_encoder_deps="libvorbis libvorbisenc"
|
||||
@@ -3289,11 +3250,12 @@ libvpx_vp8_decoder_deps="libvpx"
|
||||
libvpx_vp8_encoder_deps="libvpx"
|
||||
libvpx_vp9_decoder_deps="libvpx"
|
||||
libvpx_vp9_encoder_deps="libvpx"
|
||||
libwavpack_encoder_deps="libwavpack"
|
||||
libwavpack_encoder_select="audio_frame_queue"
|
||||
libwebp_encoder_deps="libwebp"
|
||||
libwebp_anim_encoder_deps="libwebp"
|
||||
libx262_encoder_deps="libx262"
|
||||
libx264_encoder_deps="libx264"
|
||||
libx264_encoder_select="atsc_a53"
|
||||
libx264rgb_encoder_deps="libx264 x264_csp_bgr"
|
||||
libx264rgb_encoder_select="libx264_encoder"
|
||||
libx265_encoder_deps="libx265"
|
||||
@@ -3315,9 +3277,9 @@ asf_o_demuxer_select="riffdec"
|
||||
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"
|
||||
@@ -3343,9 +3305,9 @@ ismv_muxer_select="mov_muxer"
|
||||
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"
|
||||
@@ -3355,14 +3317,13 @@ mp3_demuxer_select="mpegaudio_parser"
|
||||
mp3_muxer_select="mpegaudioheader"
|
||||
mp4_muxer_select="mov_muxer"
|
||||
mpegts_demuxer_select="iso_media"
|
||||
mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf"
|
||||
mpegts_muxer_select="adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf"
|
||||
mpegtsraw_demuxer_select="mpegts_demuxer"
|
||||
mxf_muxer_select="golomb pcm_rechunk_bsf"
|
||||
mxf_d10_muxer_select="mxf_muxer"
|
||||
mxf_opatom_muxer_select="mxf_muxer"
|
||||
nut_muxer_select="riffenc"
|
||||
nuv_demuxer_select="riffdec"
|
||||
obu_demuxer_select="av1_frame_merge_bsf av1_parser"
|
||||
oga_muxer_select="ogg_muxer"
|
||||
ogg_demuxer_select="dirac_parse"
|
||||
ogv_muxer_select="ogg_muxer"
|
||||
@@ -3370,7 +3331,6 @@ opus_muxer_select="ogg_muxer"
|
||||
psp_muxer_select="mov_muxer"
|
||||
rtp_demuxer_select="sdp_demuxer"
|
||||
rtp_muxer_select="golomb jpegtables"
|
||||
rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer"
|
||||
rtpdec_select="asf_demuxer jpegtables mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp"
|
||||
rtsp_demuxer_select="http_protocol rtpdec"
|
||||
rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol rtpenc_chain"
|
||||
@@ -3392,7 +3352,7 @@ w64_muxer_select="wav_muxer"
|
||||
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"
|
||||
@@ -3407,8 +3367,6 @@ alsa_outdev_deps="alsa"
|
||||
avfoundation_indev_deps="avfoundation corevideo coremedia pthreads"
|
||||
avfoundation_indev_suggest="coregraphics applicationservices"
|
||||
avfoundation_indev_extralibs="-framework Foundation"
|
||||
audiotoolbox_outdev_deps="audiotoolbox pthreads"
|
||||
audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework CoreAudio"
|
||||
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
|
||||
caca_outdev_deps="libcaca"
|
||||
decklink_deps_any="libdl LoadLibrary"
|
||||
@@ -3459,8 +3417,7 @@ ffrtmpcrypt_protocol_select="tcp_protocol"
|
||||
ffrtmphttp_protocol_conflict="librtmp_protocol"
|
||||
ffrtmphttp_protocol_select="http_protocol"
|
||||
ftp_protocol_select="tcp_protocol"
|
||||
gopher_protocol_select="tcp_protocol"
|
||||
gophers_protocol_select="tls_protocol"
|
||||
gopher_protocol_select="network"
|
||||
http_protocol_select="tcp_protocol"
|
||||
http_protocol_suggest="zlib"
|
||||
httpproxy_protocol_select="tcp_protocol"
|
||||
@@ -3501,8 +3458,6 @@ unix_protocol_select="network"
|
||||
# external library protocols
|
||||
libamqp_protocol_deps="librabbitmq"
|
||||
libamqp_protocol_select="network"
|
||||
librist_protocol_deps="librist"
|
||||
librist_protocol_select="network"
|
||||
librtmp_protocol_deps="librtmp"
|
||||
librtmpe_protocol_deps="librtmp"
|
||||
librtmps_protocol_deps="librtmp"
|
||||
@@ -3525,7 +3480,6 @@ afir_filter_deps="avcodec"
|
||||
afir_filter_select="rdft"
|
||||
amovie_filter_deps="avcodec avformat"
|
||||
aresample_filter_deps="swresample"
|
||||
asoftclip_filter_deps="swresample"
|
||||
asr_filter_deps="pocketsphinx"
|
||||
ass_filter_deps="libass"
|
||||
atempo_filter_deps="avcodec"
|
||||
@@ -3561,6 +3515,7 @@ derain_filter_select="dnn"
|
||||
deshake_filter_select="pixelutils"
|
||||
deshake_opencl_filter_deps="opencl"
|
||||
dilation_opencl_filter_deps="opencl"
|
||||
dnn_processing_filter_deps="swscale"
|
||||
dnn_processing_filter_select="dnn"
|
||||
drawtext_filter_deps="libfreetype"
|
||||
drawtext_filter_suggest="libfontconfig libfribidi"
|
||||
@@ -3711,23 +3666,23 @@ cws2fws_extralibs="zlib_extralibs"
|
||||
|
||||
# libraries, in any order
|
||||
avcodec_deps="avutil"
|
||||
avcodec_suggest="libm stdatomic"
|
||||
avcodec_suggest="libm"
|
||||
avcodec_select="null_bsf"
|
||||
avdevice_deps="avformat avcodec avutil"
|
||||
avdevice_suggest="libm stdatomic"
|
||||
avdevice_suggest="libm"
|
||||
avfilter_deps="avutil"
|
||||
avfilter_suggest="libm stdatomic"
|
||||
avfilter_suggest="libm"
|
||||
avformat_deps="avcodec avutil"
|
||||
avformat_suggest="libm network zlib stdatomic"
|
||||
avformat_suggest="libm network zlib"
|
||||
avresample_deps="avutil"
|
||||
avresample_suggest="libm"
|
||||
avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic"
|
||||
avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt"
|
||||
postproc_deps="avutil gpl"
|
||||
postproc_suggest="libm stdatomic"
|
||||
postproc_suggest="libm"
|
||||
swresample_deps="avutil"
|
||||
swresample_suggest="libm libsoxr stdatomic"
|
||||
swresample_suggest="libm libsoxr"
|
||||
swscale_deps="avutil"
|
||||
swscale_suggest="libm stdatomic"
|
||||
swscale_suggest="libm"
|
||||
|
||||
avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs"
|
||||
avfilter_extralibs="pthreads_extralibs"
|
||||
@@ -4281,7 +4236,7 @@ case "$toolchain" in
|
||||
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"
|
||||
;;
|
||||
@@ -5045,6 +5000,8 @@ elif enabled bfin; then
|
||||
|
||||
elif enabled mips; then
|
||||
|
||||
cpuflags="-march=$cpu"
|
||||
|
||||
if [ "$cpu" != "generic" ]; then
|
||||
disable mips32r2
|
||||
disable mips32r5
|
||||
@@ -5053,40 +5010,81 @@ elif enabled mips; then
|
||||
disable mips64r6
|
||||
disable loongson2
|
||||
disable loongson3
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
|
||||
cpuflags="-march=$cpu"
|
||||
|
||||
case $cpu in
|
||||
# General ISA levels
|
||||
mips1|mips3)
|
||||
;;
|
||||
mips32r2)
|
||||
24kc|24kf*|24kec|34kc|1004kc|24kef*|34kf*|1004kf*|74kc|74kf)
|
||||
enable mips32r2
|
||||
disable msa
|
||||
;;
|
||||
mips32r5)
|
||||
enable mips32r2
|
||||
enable mips32r5
|
||||
p5600|i6400|p6600)
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
;;
|
||||
mips64r2|mips64r5)
|
||||
enable mips64r2
|
||||
loongson*)
|
||||
enable loongson2
|
||||
enable loongson3
|
||||
enable local_aligned
|
||||
enable simd_align_16
|
||||
enable fast_64bit
|
||||
enable fast_clz
|
||||
enable fast_cmov
|
||||
enable fast_unaligned
|
||||
disable aligned_stack
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
# When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
|
||||
if [ $cc == gcc ]; then
|
||||
gcc_version=$(gcc -dumpversion)
|
||||
if [ "$(echo "$gcc_version 5.3.0" | tr " " "\n" | sort -rV | head -n 1)" == "$gcc_version" ]; then
|
||||
expensive_optimization_flag=""
|
||||
else
|
||||
expensive_optimization_flag="-fno-expensive-optimizations"
|
||||
fi
|
||||
fi
|
||||
case $cpu in
|
||||
loongson3*)
|
||||
cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
loongson2e)
|
||||
cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
loongson2f)
|
||||
cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
# Cores from MIPS(MTI)
|
||||
*)
|
||||
# Unknown CPU. Disable everything.
|
||||
warn "unknown CPU. Disabling all MIPS optimizations."
|
||||
disable mipsfpu
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
disable msa
|
||||
disable mmi
|
||||
;;
|
||||
esac
|
||||
|
||||
case $cpu in
|
||||
24kc)
|
||||
disable mipsfpu
|
||||
enable mips32r2
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
;;
|
||||
24kf*|24kec|34kc|74Kc|1004kc)
|
||||
enable mips32r2
|
||||
24kf*)
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
;;
|
||||
24kec|34kc|1004kc)
|
||||
disable mipsfpu
|
||||
disable mipsdspr2
|
||||
;;
|
||||
24kef*|34kf*|1004kf*)
|
||||
enable mipsdsp
|
||||
enable mips32r2
|
||||
disable mipsdspr2
|
||||
;;
|
||||
74kc)
|
||||
disable mipsfpu
|
||||
;;
|
||||
p5600)
|
||||
enable mips32r2
|
||||
enable mips32r5
|
||||
check_cflags "-mtune=p5600" && check_cflags "-msched-weight -mload-store-pairs -funroll-loops"
|
||||
;;
|
||||
@@ -5098,51 +5096,9 @@ elif enabled mips; then
|
||||
enable mips64r6
|
||||
check_cflags "-mtune=p6600 -mabi=64" && check_cflags "-msched-weight -mload-store-pairs -funroll-loops" && check_ldflags "-mabi=64"
|
||||
;;
|
||||
# Cores from Loongson
|
||||
loongson2e|loongson2f|loongson3*)
|
||||
enable local_aligned
|
||||
enable simd_align_16
|
||||
enable fast_64bit
|
||||
enable fast_clz
|
||||
enable fast_cmov
|
||||
enable fast_unaligned
|
||||
disable aligned_stack
|
||||
# When gcc version less than 5.3.0, add -fno-expensive-optimizations flag.
|
||||
if test "$cc_type" = "gcc"; then
|
||||
case $gcc_basever in
|
||||
2|2.*|3.*|4.*|5.0|5.1|5.2)
|
||||
expensive_optimization_flag="-fno-expensive-optimizations"
|
||||
;;
|
||||
*)
|
||||
expensive_optimization_flag=""
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $cpu in
|
||||
loongson3*)
|
||||
enable loongson3
|
||||
cpuflags="-march=loongson3a -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
loongson2e)
|
||||
enable loongson2
|
||||
cpuflags="-march=loongson2e -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
loongson2f)
|
||||
enable loongson2
|
||||
cpuflags="-march=loongson2f -mhard-float $expensive_optimization_flag"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
warn "unknown MIPS CPU"
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
disable mipsdsp
|
||||
disable mipsdspr2
|
||||
# Disable DSP stuff for generic CPU, it can't be detected at runtime.
|
||||
# We do not disable anything. Is up to the user to disable the unwanted features.
|
||||
warn 'generic cpu selected'
|
||||
fi
|
||||
|
||||
@@ -5374,7 +5330,6 @@ case $target_os in
|
||||
;;
|
||||
netbsd)
|
||||
disable symver
|
||||
enable section_data_rel_ro
|
||||
oss_indev_extralibs="-lossaudio"
|
||||
oss_outdev_extralibs="-lossaudio"
|
||||
enabled gcc || check_ldflags -Wl,-zmuldefs
|
||||
@@ -5393,7 +5348,6 @@ case $target_os in
|
||||
disable symver
|
||||
;;
|
||||
freebsd)
|
||||
enable section_data_rel_ro
|
||||
;;
|
||||
bsd/os)
|
||||
add_extralibs -lpoll -lgnugetopt
|
||||
@@ -5891,42 +5845,28 @@ EOF
|
||||
|
||||
elif enabled mips; then
|
||||
|
||||
# Check toolchain ISA level
|
||||
enabled loongson2 && check_inline_asm loongson2 '"dmult.g $8, $9, $10"'
|
||||
enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"'
|
||||
enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"'
|
||||
|
||||
# Enable minimum ISA based on selected options
|
||||
if enabled mips64; then
|
||||
enabled mips64r6 && check_inline_asm mips64r6 '"dlsa $0, $0, $0, 1"' &&
|
||||
disable mips64r2
|
||||
|
||||
enabled mips64r2 && check_inline_asm mips64r2 '"dext $0, $0, 0, 1"'
|
||||
|
||||
disable mips32r6 && disable mips32r5 && disable mips32r2
|
||||
enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
|
||||
enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
|
||||
disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
|
||||
else
|
||||
enabled mips32r6 && check_inline_asm mips32r6 '"aui $0, $0, 0"' &&
|
||||
disable mips32r5 && disable mips32r2
|
||||
|
||||
enabled mips32r5 && check_inline_asm mips32r5 '"eretnc"'
|
||||
enabled mips32r2 && check_inline_asm mips32r2 '"ext $0, $0, 0, 1"'
|
||||
|
||||
disable mips64r6 && disable mips64r5 && disable mips64r2
|
||||
enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
|
||||
enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
|
||||
enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
|
||||
disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
|
||||
fi
|
||||
|
||||
enabled mipsfpu && check_inline_asm mipsfpu '"cvt.d.l $f0, $f2"'
|
||||
enabled mipsfpu && check_inline_asm_flags mipsfpu '"cvt.d.l $f0, $f2"' '-mhard-float'
|
||||
enabled mipsfpu && (enabled mips32r5 || enabled mips32r6 || enabled mips64r6) && check_inline_asm_flags mipsfpu '"cvt.d.l $f0, $f1"' '-mfp64'
|
||||
|
||||
enabled mipsfpu && enabled msa && check_inline_asm_flags msa '"addvi.b $w0, $w1, 1"' '-mmsa' && check_headers msa.h || disable msa
|
||||
enabled mipsdsp && check_inline_asm_flags mipsdsp '"addu.qb $t0, $t1, $t2"' '-mdsp'
|
||||
enabled mipsdspr2 && check_inline_asm_flags mipsdspr2 '"absq_s.qb $t0, $t1"' '-mdspr2'
|
||||
|
||||
# MSA and MSA2 can be detected at runtime so we supply extra flags here
|
||||
enabled mipsfpu && enabled msa && check_inline_asm msa '"addvi.b $w0, $w1, 1"' '-mmsa' && append MSAFLAGS '-mmsa'
|
||||
enabled msa && enabled msa2 && check_inline_asm msa2 '"nxbits.any.b $w0, $w0"' '-mmsa2' && append MSAFLAGS '-mmsa2'
|
||||
|
||||
# loongson2 have no switch cflag so we can only probe toolchain ability
|
||||
enabled loongson2 && check_inline_asm loongson2 '"dmult.g $8, $9, $10"' && disable loongson3
|
||||
|
||||
# loongson3 is paired with MMI
|
||||
enabled loongson3 && check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"' '-mloongson-ext' && append MMIFLAGS '-mloongson-ext'
|
||||
|
||||
# MMI can be detected at runtime too
|
||||
enabled mmi && check_inline_asm mmi '"punpcklhw $f0, $f0, $f0"' '-mloongson-mmi' && append MMIFLAGS '-mloongson-mmi'
|
||||
enabled msa && enabled msa2 && check_inline_asm_flags msa2 '"nxbits.any.b $w0, $w0"' '-mmsa2' && check_headers msa2.h || disable msa2
|
||||
|
||||
if enabled bigendian && enabled msa; then
|
||||
disable msa
|
||||
@@ -5970,11 +5910,6 @@ elif enabled ppc; then
|
||||
check_cpp_condition power8 "altivec.h" "defined(_ARCH_PWR8)"
|
||||
fi
|
||||
|
||||
if enabled altivec; then
|
||||
check_cc vec_xl altivec.h "const unsigned char *y1i = { 0 };
|
||||
vector unsigned char y0 = vec_xl(0, y1i);"
|
||||
fi
|
||||
|
||||
elif enabled x86; then
|
||||
|
||||
check_builtin rdtsc intrin.h "__rdtsc()"
|
||||
@@ -6173,9 +6108,6 @@ check_headers dxgidebug.h
|
||||
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
|
||||
@@ -6198,14 +6130,7 @@ check_headers asm/types.h
|
||||
# it seems there are versions of clang in some distros that try to use the
|
||||
# gcc headers, which explodes for stdatomic
|
||||
# so we also check that atomics actually work here
|
||||
#
|
||||
# some configurations also require linking to libatomic, so try
|
||||
# both with -latomic and without
|
||||
for LATOMIC in "-latomic" ""; do
|
||||
check_builtin stdatomic stdatomic.h \
|
||||
"atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar" \
|
||||
$LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break
|
||||
done
|
||||
check_builtin stdatomic stdatomic.h "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar"
|
||||
|
||||
check_lib advapi32 "windows.h" RegCloseKey -ladvapi32
|
||||
check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt &&
|
||||
@@ -6227,7 +6152,6 @@ enabled videotoolbox && check_apple_framework VideoToolbox
|
||||
check_apple_framework CoreFoundation
|
||||
check_apple_framework CoreMedia
|
||||
check_apple_framework CoreVideo
|
||||
check_apple_framework CoreAudio
|
||||
|
||||
enabled avfoundation && {
|
||||
disable coregraphics applicationservices
|
||||
@@ -6237,7 +6161,6 @@ enabled avfoundation && {
|
||||
enabled videotoolbox && {
|
||||
check_lib coreservices CoreServices/CoreServices.h UTGetOSTypeFromString "-framework CoreServices"
|
||||
check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVC "-framework CoreMedia"
|
||||
check_func_headers CoreMedia/CMFormatDescription.h kCMVideoCodecType_HEVCWithAlpha "-framework CoreMedia"
|
||||
check_func_headers CoreVideo/CVPixelBuffer.h kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange "-framework CoreVideo"
|
||||
check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_SMPTE_ST_2084_PQ "-framework CoreVideo"
|
||||
check_func_headers CoreVideo/CVImageBuffer.h kCVImageBufferTransferFunction_ITU_R_2100_HLG "-framework CoreVideo"
|
||||
@@ -6246,7 +6169,6 @@ enabled videotoolbox && {
|
||||
|
||||
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
|
||||
|
||||
check_type "windows.h dxva.h" "DXVA_PicParams_AV1" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
|
||||
check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
|
||||
check_type "windows.h dxva.h" "DXVA_PicParams_VP9" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0
|
||||
check_type "windows.h d3d11.h" "ID3D11VideoDecoder"
|
||||
@@ -6270,7 +6192,7 @@ fi
|
||||
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
|
||||
|
||||
@@ -6353,7 +6275,7 @@ enabled avisynth && require_headers "avisynth/avisynth_c.h"
|
||||
enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; }
|
||||
enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint
|
||||
enabled decklink && { require_headers DeckLinkAPI.h &&
|
||||
{ test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0a0000" || die "ERROR: Decklink API version must be >= 10.10"; } }
|
||||
{ test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink API version must be >= 10.9.5."; } }
|
||||
enabled frei0r && require_headers "frei0r.h dlfcn.h"
|
||||
enabled gmp && require gmp gmp.h mpz_export -lgmp
|
||||
enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init
|
||||
@@ -6373,7 +6295,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
|
||||
die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
|
||||
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas
|
||||
enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2
|
||||
enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d/dav1d.h" dav1d_version
|
||||
enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.4.0" "dav1d/dav1d.h" dav1d_version
|
||||
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
|
||||
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
|
||||
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
|
||||
@@ -6386,7 +6308,7 @@ enabled fontconfig && enable libfontconfig
|
||||
enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit
|
||||
enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType
|
||||
enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info
|
||||
enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
|
||||
enabled libglslang && require_cpp libglslang glslang/SPIRV/GlslangToSpv.h "glslang::TIntermediate*" -lglslang -lOSDependent -lHLSL -lOGLCompiler -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++
|
||||
enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu ||
|
||||
require libgme gme/gme.h gme_new_emu -lgme -lstdc++; }
|
||||
enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
|
||||
@@ -6425,7 +6347,6 @@ enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_
|
||||
enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
|
||||
{ require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
|
||||
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
|
||||
enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
|
||||
enabled libopus && {
|
||||
enabled libopus_decoder && {
|
||||
require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
|
||||
@@ -6436,8 +6357,7 @@ enabled libopus && {
|
||||
}
|
||||
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 librist && require_pkg_config librist "librist >= 0.2" librist/librist.h rist_receiver_create
|
||||
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++"
|
||||
@@ -6449,7 +6369,6 @@ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
|
||||
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init
|
||||
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init
|
||||
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket
|
||||
enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.8.4" EbSvtAv1Enc.h svt_av1_enc_init_handle
|
||||
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow
|
||||
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
|
||||
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
|
||||
@@ -6457,10 +6376,9 @@ enabled libtls && require_pkg_config libtls libtls tls.h tls_configur
|
||||
enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
|
||||
{ check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
|
||||
die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
|
||||
enabled libuavs3d && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uavs3d.h uavs3d_decode
|
||||
enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl
|
||||
enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
|
||||
enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.5.2" libvmaf.h compute_vmaf
|
||||
enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 1.3.9" libvmaf.h compute_vmaf
|
||||
enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
|
||||
enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
|
||||
require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
|
||||
@@ -6487,6 +6405,7 @@ enabled libvpx && {
|
||||
fi
|
||||
}
|
||||
|
||||
enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack
|
||||
enabled libwebp && {
|
||||
enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
|
||||
enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
|
||||
@@ -6543,10 +6462,7 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
|
||||
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
|
||||
enable omx
|
||||
enabled omx && require_headers OMX_Core.h
|
||||
enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
|
||||
{ enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
|
||||
{ enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
|
||||
check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
|
||||
enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
|
||||
check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
|
||||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
|
||||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
|
||||
@@ -6577,7 +6493,7 @@ fi
|
||||
|
||||
if enabled sdl2; then
|
||||
SDL2_CONFIG="${cross_prefix}sdl2-config"
|
||||
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h SDL_PollEvent
|
||||
test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent
|
||||
if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
|
||||
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
|
||||
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
|
||||
@@ -6621,15 +6537,13 @@ enabled makeinfo \
|
||||
disabled makeinfo_html && texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
|
||||
perl -v > /dev/null 2>&1 && enable perl || disable perl
|
||||
pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
|
||||
rsync --help 2> /dev/null | grep -q 'contimeout=' && enable rsync_contimeout || disable rsync_contimeout
|
||||
|
||||
check_headers linux/fb.h
|
||||
check_headers linux/videodev2.h
|
||||
test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
|
||||
test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl
|
||||
rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
|
||||
|
||||
# check V4L2 codecs available in the API
|
||||
if enabled v4l2_m2m; then
|
||||
check_headers linux/fb.h
|
||||
check_headers linux/videodev2.h
|
||||
test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete
|
||||
check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;"
|
||||
check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;"
|
||||
check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;"
|
||||
@@ -6674,7 +6588,7 @@ enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimesta
|
||||
enabled libjack &&
|
||||
require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range
|
||||
|
||||
enabled sndio && check_pkg_config sndio sndio sndio.h sio_open
|
||||
enabled sndio && check_lib sndio sndio.h sio_open -lsndio
|
||||
|
||||
if enabled libcdio; then
|
||||
check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open ||
|
||||
@@ -6710,9 +6624,6 @@ test_cpp <<EOF && enable uwp && d3d11va_extralibs="-ldxgi -ld3d11"
|
||||
#endif
|
||||
EOF
|
||||
|
||||
enabled libdrm &&
|
||||
check_pkg_config libdrm_getfb2 libdrm "xf86drmMode.h" drmModeGetFB2
|
||||
|
||||
enabled vaapi &&
|
||||
check_pkg_config vaapi "libva >= 0.35.0" "va/va.h" vaInitialize
|
||||
|
||||
@@ -6727,7 +6638,6 @@ if enabled vaapi; then
|
||||
|
||||
check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC"
|
||||
check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth
|
||||
check_struct "va/va.h" "VADecPictureParameterBufferAV1" bit_depth_idx
|
||||
check_type "va/va.h va/va_vpp.h" "VAProcFilterParameterBufferHDRToneMapping"
|
||||
check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags
|
||||
check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC"
|
||||
@@ -6775,7 +6685,7 @@ enabled vulkan &&
|
||||
|
||||
if enabled x86; then
|
||||
case $target_os in
|
||||
freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
mingw32*|mingw64*|win32|win64|linux|cygwin*)
|
||||
;;
|
||||
*)
|
||||
disable ffnvcodec cuvid nvdec nvenc
|
||||
@@ -6803,10 +6713,6 @@ void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } };
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
|
||||
if enabled_any nvdec cuvid; then
|
||||
check_type "ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h" "CUVIDAV1PICPARAMS"
|
||||
fi
|
||||
|
||||
enabled amf &&
|
||||
check_cpp_condition amf "AMF/core/Version.h" \
|
||||
"(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400090000"
|
||||
@@ -7374,7 +7280,6 @@ if enabled ppc; then
|
||||
echo "POWER8 enabled ${power8-no}"
|
||||
echo "PPC 4xx optimizations ${ppc4xx-no}"
|
||||
echo "dcbzl available ${dcbzl-no}"
|
||||
echo "vec_xl available ${vec_xl-no}"
|
||||
fi
|
||||
echo "debug symbols ${debug-no}"
|
||||
echo "strip symbols ${stripping-no}"
|
||||
@@ -7527,6 +7432,7 @@ LD_LIB=$LD_LIB
|
||||
LD_PATH=$LD_PATH
|
||||
DLLTOOL=$dlltool
|
||||
WINDRES=$windres
|
||||
DEPWINDRES=$dep_cc
|
||||
DOXYGEN=$doxygen
|
||||
LDFLAGS=$LDFLAGS
|
||||
LDEXEFLAGS=$LDEXEFLAGS
|
||||
@@ -7534,8 +7440,6 @@ LDSOFLAGS=$LDSOFLAGS
|
||||
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
|
||||
ASMSTRIPFLAGS=$ASMSTRIPFLAGS
|
||||
X86ASMFLAGS=$X86ASMFLAGS
|
||||
MSAFLAGS=$MSAFLAGS
|
||||
MMIFLAGS=$MMIFLAGS
|
||||
BUILDSUF=$build_suffix
|
||||
PROGSSUF=$progs_suffix
|
||||
FULLNAME=$FULLNAME
|
||||
@@ -7609,11 +7513,10 @@ cat > $TMPH <<EOF
|
||||
#define FFMPEG_CONFIG_H
|
||||
#define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
|
||||
#define FFMPEG_LICENSE "$(c_escape $license)"
|
||||
#define CONFIG_THIS_YEAR 2026
|
||||
#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}
|
||||
|
||||
-128
@@ -15,134 +15,6 @@ libavutil: 2017-10-21
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
-------- 8< --------- FFmpeg 4.4 was cut here -------- 8< ---------
|
||||
|
||||
2021-03-19 - e8c0bca6bd - lavu 56.69.100 - adler32.h
|
||||
Added a typedef for the type of the Adler-32 checksums
|
||||
used by av_adler32_update(). It will be changed to uint32_t
|
||||
at the next major bump.
|
||||
The type of the parameter for the length of the input buffer
|
||||
will also be changed to size_t at the next major bump.
|
||||
|
||||
2021-03-19 - e318438f2f - lavf 58.75.100 - avformat.h
|
||||
AVChapter.id will be changed from int to int64_t
|
||||
on the next major version bump.
|
||||
|
||||
2021-03-17 - f7db77bd87 - lavc 58.133.100 - codec.h
|
||||
Deprecated av_init_packet(). Once removed, sizeof(AVPacket) will
|
||||
no longer be a part of the public ABI.
|
||||
Deprecated AVPacketList.
|
||||
|
||||
2021-03-16 - 7d09579190 - lavc 58.132.100 - codec.h
|
||||
Add AV_CODEC_CAP_OTHER_THREADS as a new name for
|
||||
AV_CODEC_CAP_AUTO_THREADS. AV_CODEC_CAP_AUTO_THREADS
|
||||
is now deprecated.
|
||||
|
||||
2021-03-12 - 6e7e3a3820 - lavc 58.131.100 - avcodec.h codec.h
|
||||
Add a get_encode_buffer callback to AVCodecContext, similar to
|
||||
get_buffer2 but for encoders.
|
||||
Add avcodec_default_get_encode_buffer().
|
||||
Add AV_GET_ENCODE_BUFFER_FLAG_REF.
|
||||
Encoders may now be flagged as AV_CODEC_CAP_DR1 capable.
|
||||
|
||||
2021-03-10 - 42e68fe015 - 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 - d79e0fe65c - 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 - 14040a1d91 - 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 - a0eec776b6 - lavc 58.128.101 - avcodec.h
|
||||
Enable err_recognition to be set for encoders.
|
||||
|
||||
2021-03-03 - 2ff40b98ec - 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 - dd9227e48f - lavc 58.126.100 - avcodec.h
|
||||
Deprecated avcodec_get_frame_class().
|
||||
|
||||
2021-02-21 - 5ca40d6d94 - lavu 56.66.100 - tx.h
|
||||
Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE
|
||||
|
||||
2021-02-14 - 4f49ca7bbc - lavd 58.12.100 - avdevice.h
|
||||
Deprecated avdevice_capabilities_create() and
|
||||
avdevice_capabilities_free().
|
||||
|
||||
2021-02-10 - 1bda9bb68a - lavu 56.65.100 - common.h
|
||||
Add FFABS64U()
|
||||
|
||||
2021-01-26 - 5dd9567080 - lavu 56.64.100 - common.h
|
||||
Add FFABSU()
|
||||
|
||||
2021-01-25 - 56709ca8aa - 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 - ebdd33086a - lavc 58.116.100 - avcodec.h
|
||||
Add FF_PROFILE_VVC_MAIN_10 and FF_PROFILE_VVC_MAIN_10_444.
|
||||
|
||||
2020-01-01 - baecaa16c1 - lavu 56.63.100 - video_enc_params.h
|
||||
Add AV_VIDEO_ENC_PARAMS_MPEG2
|
||||
|
||||
2020-12-03 - eca12f4d5a - lavu 56.62.100 - timecode.h
|
||||
Add av_timecode_init_from_components.
|
||||
|
||||
2020-11-27 - a83098ab03 - lavc 58.114.100 - avcodec.h
|
||||
Deprecate AVCodecContext.thread_safe_callbacks. Starting with
|
||||
LIBAVCODEC_VERSION_MAJOR=60, user callbacks must always be
|
||||
thread-safe when frame threading is used.
|
||||
|
||||
2020-11-25 - d243dd540a - lavc 58.113.100 - avcodec.h
|
||||
Adds a new flag AV_CODEC_EXPORT_DATA_FILM_GRAIN for export_side_data.
|
||||
|
||||
2020-11-25 - 4f9ee87253 - lavu 56.61.100 - film_grain_params.h
|
||||
Adds a new API for extracting codec film grain parameters as side data.
|
||||
Adds a new AVFrameSideDataType entry AV_FRAME_DATA_FILM_GRAIN_PARAMS for it.
|
||||
|
||||
2020-10-28 - f95d9510ff - lavf 58.64.100 - avformat.h
|
||||
Add AVSTREAM_EVENT_FLAG_NEW_PACKETS.
|
||||
|
||||
2020-09-28 - 68918d3b7f - lavu 56.60.100 - buffer.h
|
||||
Add a av_buffer_replace() convenience function.
|
||||
|
||||
2020-09-13 - 837b6eb90e - lavu 56.59.100 - timecode.h
|
||||
Add av_timecode_make_smpte_tc_string2.
|
||||
|
||||
2020-08-21 - 06f2651204 - lavu 56.58.100 - avstring.h
|
||||
Deprecate av_d2str(). Use av_asprintf() instead.
|
||||
|
||||
2020-08-04 - 34de0abbe7 - lavu 56.58.100 - channel_layout.h
|
||||
Add AV_CH_LAYOUT_22POINT2 together with its newly required pieces:
|
||||
AV_CH_TOP_SIDE_LEFT, AV_CH_TOP_SIDE_RIGHT, AV_CH_BOTTOM_FRONT_CENTER,
|
||||
AV_CH_BOTTOM_FRONT_LEFT, AV_CH_BOTTOM_FRONT_RIGHT.
|
||||
|
||||
2020-07-23 - 84655b7101 - lavu 56.57.100 - cpu.h
|
||||
Add AV_CPU_FLAG_MMI and AV_CPU_FLAG_MSA.
|
||||
|
||||
2020-07-22 - 3a8e927176 - lavu 56.56.100 - imgutils.h
|
||||
Add av_image_fill_plane_sizes().
|
||||
|
||||
2020-07-15 - 448a9aaa78 - lavc 58.96.100 - packet.h
|
||||
Add AV_PKT_DATA_S12M_TIMECODE.
|
||||
|
||||
2020-06-12 - b09fb030c1 - lavu 56.55.100 - pixdesc.h
|
||||
Add AV_PIX_FMT_X2RGB10.
|
||||
|
||||
2020-06-11 - bc8ab084fb - lavu 56.54.100 - frame.h
|
||||
Add AV_FRAME_DATA_SEI_UNREGISTERED.
|
||||
|
||||
2020-06-10 - 1b4a98b029 - lavu 56.53.100 - log.h opt.h
|
||||
Add av_opt_child_class_iterate() and AVClass.child_class_iterate().
|
||||
Deprecate av_opt_child_class_next() and AVClass.child_class_next().
|
||||
|
||||
-------- 8< --------- FFmpeg 4.3 was cut here -------- 8< ---------
|
||||
|
||||
2020-06-05 - ec39c2276a - lavu 56.50.100 - buffer.h
|
||||
Passing NULL as alloc argument to av_buffer_pool_init2() is now allowed.
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ PROJECT_NAME = FFmpeg
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 4.4.7
|
||||
PROJECT_NUMBER = 4.3
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@
|
||||
The FFmpeg developers.
|
||||
|
||||
For details about the authorship, see the Git history of the project
|
||||
(https://git.ffmpeg.org/ffmpeg), e.g. by typing the command
|
||||
(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
|
||||
@command{git log} in the FFmpeg source directory, or browsing the
|
||||
online repository at @url{https://git.ffmpeg.org/ffmpeg}.
|
||||
online repository at @url{http://source.ffmpeg.org}.
|
||||
|
||||
Maintainers for the specific components are listed in the file
|
||||
@file{MAINTAINERS} in the source code tree.
|
||||
|
||||
@@ -675,63 +675,6 @@ Remove extradata from all frames.
|
||||
@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
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -63,3 +63,4 @@ make -j<num>
|
||||
make -k
|
||||
Continue build in case of errors, this is useful for the regression tests
|
||||
sometimes but note that it will still not run all reg tests.
|
||||
|
||||
|
||||
+121
-13
@@ -50,6 +50,8 @@ Use internal 2pass ratecontrol in first pass mode.
|
||||
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 @@ This ensures that file and data checksums are reproducible and match between
|
||||
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 @@ Use closed gop.
|
||||
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 @@ Default value is 0.
|
||||
@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 @@ Possible values:
|
||||
@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 @@ Xvid interlacing bug (autodetected if fourcc==XVIX)
|
||||
padding bug (autodetected)
|
||||
@item amv
|
||||
|
||||
@item ac_vlc
|
||||
illegal vlc bug (autodetected per fourcc)
|
||||
@item qpel_chroma
|
||||
|
||||
@item std_qpel
|
||||
@@ -195,6 +242,14 @@ Workaround various bugs in microsoft broken decoders.
|
||||
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 @@ consider things that a sane encoder should not do as an error
|
||||
@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 @@ encode. It is of little use elsewise.
|
||||
@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 @@ Automatically pick a IDCT compatible with the simple one
|
||||
|
||||
@item simpleneon
|
||||
|
||||
@item xvid
|
||||
@item simplealpha
|
||||
|
||||
@item ipp
|
||||
|
||||
@item xvidmmx
|
||||
|
||||
@item faani
|
||||
floating point AAN IDCT
|
||||
@@ -631,9 +714,19 @@ Set diamond type & size for motion estimation pre-pass.
|
||||
@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 @@ arithmetic coder
|
||||
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 fewest bits
|
||||
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 @@ for codecs that support it. See also @file{doc/examples/export_mvs.c}.
|
||||
@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 @@ automatically select the number of threads to set
|
||||
|
||||
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 @@ noise preserving sum of squared differences
|
||||
|
||||
@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 @@ Adjust sensitivity of b_frame_strategy 1.
|
||||
@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})
|
||||
|
||||
@@ -996,12 +1110,6 @@ BT.2020 NCL
|
||||
BT.2020 CL
|
||||
@item smpte2085
|
||||
SMPTE 2085
|
||||
@item chroma-derived-nc
|
||||
Chroma-derived NCL
|
||||
@item chroma-derived-c
|
||||
Chroma-derived CL
|
||||
@item ictcp
|
||||
ICtCp
|
||||
@end table
|
||||
|
||||
@item color_range @var{integer} (@emph{decoding/encoding,video})
|
||||
|
||||
+1
-35
@@ -25,19 +25,6 @@ enabled decoders.
|
||||
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.
|
||||
@@ -101,27 +88,6 @@ This decoder allows libavcodec to decode AVS2 streams with davs2 library.
|
||||
|
||||
@c man end VIDEO DECODERS
|
||||
|
||||
@section libuavs3d
|
||||
|
||||
AVS3-P2/IEEE1857.10 video decoder.
|
||||
|
||||
libuavs3d allows libavcodec to decode AVS3 streams.
|
||||
Requires the presence of the libuavs3d headers and library during configuration.
|
||||
You need to explicitly configure the build with @code{--enable-libuavs3d}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
The following option is supported by the libuavs3d wrapper.
|
||||
|
||||
@table @option
|
||||
|
||||
@item frame_threads
|
||||
Set amount of frame threads to use during decoding. The default value is 0 (autodetect).
|
||||
|
||||
@end table
|
||||
|
||||
@c man end VIDEO DECODERS
|
||||
|
||||
@chapter Audio Decoders
|
||||
@c man begin AUDIO DECODERS
|
||||
|
||||
@@ -141,7 +107,7 @@ the undocumented RealAudio 3 (a.k.a. dnet).
|
||||
|
||||
@item -drc_scale @var{value}
|
||||
Dynamic Range Scale Factor. The factor to apply to dynamic range values
|
||||
from the AC-3 stream. This factor is applied exponentially. The default value is 1.
|
||||
from the AC-3 stream. This factor is applied exponentially.
|
||||
There are 3 notable scale factor ranges:
|
||||
@table @option
|
||||
@item drc_scale == 0
|
||||
|
||||
@@ -327,13 +327,6 @@ segment index to start live streams at (negative values are from the end).
|
||||
@item allowed_extensions
|
||||
',' separated list of file extensions that hls is allowed to access.
|
||||
|
||||
@item extension_picky
|
||||
This blocks disallowed extensions from probing
|
||||
It also requires all available segments to have matching extensions to the format
|
||||
except mpegts, which is always allowed.
|
||||
It is recommended to set the whitelists correctly instead of depending on extensions
|
||||
Enabled by default.
|
||||
|
||||
@item max_reload
|
||||
Maximum number of times a insufficient list is attempted to be reloaded.
|
||||
Default value is 1000.
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
# FFmpeg project
|
||||
|
||||
## Organisation
|
||||
|
||||
The FFmpeg project is organized through a community working on global consensus.
|
||||
|
||||
Decisions are taken by the ensemble of active members, through voting and
|
||||
are aided by two committees.
|
||||
|
||||
## General Assembly
|
||||
|
||||
The ensemble of active members is called the General Assembly (GA).
|
||||
|
||||
The General Assembly is sovereign and legitimate for all its decisions
|
||||
regarding the FFmpeg project.
|
||||
|
||||
The General Assembly is made up of active contributors.
|
||||
|
||||
Contributors are considered "active contributors" if they have pushed more
|
||||
than 20 patches in the last 36 months in the main FFmpeg repository, or
|
||||
if they have been voted in by the GA.
|
||||
|
||||
Additional members are added to the General Assembly through a vote after
|
||||
proposal by a member of the General Assembly.
|
||||
They are part of the GA for two years, after which they need a confirmation by
|
||||
the GA.
|
||||
|
||||
## Voting
|
||||
|
||||
Voting is done using a ranked voting system, currently running on https://vote.ffmpeg.org/ .
|
||||
|
||||
Majority vote means more than 50% of the expressed ballots.
|
||||
|
||||
## Technical Committee
|
||||
|
||||
The Technical Committee (TC) is here to arbitrate and make decisions when
|
||||
technical conflicts occur in the project.
|
||||
They will consider the merits of all the positions, judge them and make a
|
||||
decision.
|
||||
|
||||
The TC resolves technical conflicts but is not a technical steering committee.
|
||||
|
||||
Decisions by the TC are binding for all the contributors.
|
||||
|
||||
Decisions made by the TC can be re-opened after 1 year or by a majority vote
|
||||
of the General Assembly, requested by one of the member of the GA.
|
||||
|
||||
The TC is elected by the General Assembly for a duration of 1 year, and
|
||||
is composed of 5 members.
|
||||
Members can be re-elected if they wish. A majority vote in the General Assembly
|
||||
can trigger a new election of the TC.
|
||||
|
||||
The members of the TC can be elected from outside of the GA.
|
||||
Candidates for election can either be suggested or self-nominated.
|
||||
|
||||
The conflict resolution process is detailed in the [resolution process](resolution_process.md) document.
|
||||
|
||||
## Community committee
|
||||
|
||||
The Community Committee (CC) is here to arbitrage and make decisions when
|
||||
inter-personal conflicts occur in the project. It will decide quickly and
|
||||
take actions, for the sake of the project.
|
||||
|
||||
The CC can remove privileges of offending members, including removal of
|
||||
commit access and temporary ban from the community.
|
||||
|
||||
Decisions made by the CC can be re-opened after 1 year or by a majority vote
|
||||
of the General Assembly. Indefinite bans from the community must be confirmed
|
||||
by the General Assembly, in a majority vote.
|
||||
|
||||
The CC is elected by the General Assembly for a duration of 1 year, and is
|
||||
composed of 5 members.
|
||||
Members can be re-elected if they wish. A majority vote in the General Assembly
|
||||
can trigger a new election of the CC.
|
||||
|
||||
The members of the CC can be elected from outside of the GA.
|
||||
Candidates for election can either be suggested or self-nominated.
|
||||
|
||||
The CC is governed by and responsible for enforcing the Code of Conduct.
|
||||
@@ -1,90 +0,0 @@
|
||||
# Technical Committee
|
||||
|
||||
_This document only makes sense with the rules from [the community document](community)_.
|
||||
|
||||
The Technical Committee (**TC**) is here to arbitrate and make decisions when
|
||||
technical conflicts occur in the project.
|
||||
|
||||
The TC main role is to resolve technical conflicts.
|
||||
It is therefore not a technical steering committee, but it is understood that
|
||||
some decisions might impact the future of the project.
|
||||
|
||||
# Process
|
||||
|
||||
## Seizing
|
||||
|
||||
The TC can take possession of any technical matter that it sees fit.
|
||||
|
||||
To involve the TC in a matter, email tc@ or CC them on an ongoing discussion.
|
||||
|
||||
As members of TC are developers, they also can email tc@ to raise an issue.
|
||||
|
||||
## Announcement
|
||||
|
||||
The TC, once seized, must announce itself on the main mailing list, with a _[TC]_ tag.
|
||||
|
||||
The TC has 2 modes of operation: a RFC one and an internal one.
|
||||
|
||||
If the TC thinks it needs the input from the larger community, the TC can call
|
||||
for a RFC. Else, it can decide by itself.
|
||||
|
||||
If the disagreement involves a member of the TC, that member should recuse
|
||||
themselves from the decision.
|
||||
|
||||
The decision to use a RFC process or an internal discussion is a discretionary
|
||||
decision of the TC.
|
||||
|
||||
The TC can also reject a seizure for a few reasons such as:
|
||||
the matter was not discussed enough previously; it lacks expertise to reach a
|
||||
beneficial decision on the matter; or the matter is too trivial.
|
||||
|
||||
### RFC call
|
||||
|
||||
In the RFC mode, one person from the TC posts on the mailing list the
|
||||
technical question and will request input from the community.
|
||||
|
||||
The mail will have the following specification:
|
||||
* a precise title
|
||||
* a specific tag [TC RFC]
|
||||
* a top-level email
|
||||
* contain a precise question that does not exceed 100 words and that is answerable by developers
|
||||
* may have an extra description, or a link to a previous discussion, if deemed necessary,
|
||||
* contain a precise end date for the answers.
|
||||
|
||||
The answers from the community must be on the main mailing list and must have
|
||||
the following specification:
|
||||
* keep the tag and the title unchanged
|
||||
* limited to 400 words
|
||||
* a first-level, answering directly to the main email
|
||||
* answering to the question.
|
||||
|
||||
Further replies to answers are permitted, as long as they conform to the
|
||||
community standards of politeness, they are limited to 100 words, and are not
|
||||
nested more than once. (max-depth=2)
|
||||
|
||||
After the end-date, mails on the thread will be ignored.
|
||||
|
||||
Violations of those rules will be escalated through the Community Committee.
|
||||
|
||||
After all the emails are in, the TC has 96 hours to give its final decision.
|
||||
Exceptionally, the TC can request an extra delay, that will be notified on the
|
||||
mailing list.
|
||||
|
||||
### Within TC
|
||||
|
||||
In the internal case, the TC has 96 hours to give its final decision.
|
||||
Exceptionally, the TC can request an extra delay.
|
||||
|
||||
|
||||
## Decisions
|
||||
|
||||
The decisions from the TC will be sent on the mailing list, with the _[TC]_ tag.
|
||||
|
||||
Internally, the TC should take decisions with a majority, or using
|
||||
ranked-choice voting.
|
||||
|
||||
The decision from the TC should be published with a summary of the reasons that
|
||||
lead to this decision.
|
||||
|
||||
The decisions from the TC are final, until the matters are reopened after
|
||||
no less than one year.
|
||||
@@ -762,25 +762,6 @@ In case you need finer control over how valgrind is invoked, use the
|
||||
@code{--target-exec='valgrind <your_custom_valgrind_options>} option in
|
||||
your configure line instead.
|
||||
|
||||
@anchor{Maintenance}
|
||||
@chapter Maintenance process
|
||||
|
||||
@anchor{MAINTAINERS}
|
||||
@section MAINTAINERS
|
||||
|
||||
The developers maintaining each part of the codebase are listed in @file{MAINTAINERS}.
|
||||
Being listed in @file{MAINTAINERS}, gives one the right to have git write access to
|
||||
the specific repository.
|
||||
|
||||
@anchor{Becoming a maintainer}
|
||||
@section Becoming a maintainer
|
||||
|
||||
People add themselves to @file{MAINTAINERS} by sending a patch like any other code
|
||||
change. These get reviewed by the community like any other patch. It is expected
|
||||
that, if someone has an objection to a new maintainer, she is willing to object
|
||||
in public with her full name and is willing to take over maintainership for the area.
|
||||
|
||||
|
||||
@anchor{Release process}
|
||||
@chapter Release process
|
||||
|
||||
|
||||
+64
-305
@@ -151,9 +151,10 @@ the undocumented RealAudio 3 (a.k.a. dnet).
|
||||
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
|
||||
|
||||
@@ -952,11 +953,6 @@ The default is 20ms.
|
||||
@item packet_loss (@emph{expect-loss})
|
||||
Set expected packet loss percentage. The default is 0.
|
||||
|
||||
@item fec (@emph{n/a})
|
||||
Enable inband forward error correction. @option{packet_loss} must be non-zero
|
||||
to take advantage - frequency of FEC 'side-data' is proportional to expected packet loss.
|
||||
Default is disabled.
|
||||
|
||||
@item application (N.A.)
|
||||
Set intended application type. Valid options are listed below:
|
||||
|
||||
@@ -1184,6 +1180,53 @@ transient response is a higher bitrate.
|
||||
|
||||
@end table
|
||||
|
||||
@anchor{libwavpack}
|
||||
@section libwavpack
|
||||
|
||||
A wrapper providing WavPack encoding through libwavpack.
|
||||
|
||||
Only lossless mode using 32-bit integer samples is supported currently.
|
||||
|
||||
Requires the presence of the libwavpack headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libwavpack}.
|
||||
|
||||
Note that a libavcodec-native encoder for the WavPack codec exists so users can
|
||||
encode audios with this codec without using this encoder. See @ref{wavpackenc}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@command{wavpack} command line utility's corresponding options are listed in
|
||||
parentheses, if any.
|
||||
|
||||
@table @option
|
||||
@item frame_size (@emph{--blocksize})
|
||||
Default is 32768.
|
||||
|
||||
@item compression_level
|
||||
Set speed vs. compression tradeoff. Acceptable arguments are listed below:
|
||||
|
||||
@table @samp
|
||||
@item 0 (@emph{-f})
|
||||
Fast mode.
|
||||
|
||||
@item 1
|
||||
Normal (default) settings.
|
||||
|
||||
@item 2 (@emph{-h})
|
||||
High quality.
|
||||
|
||||
@item 3 (@emph{-hh})
|
||||
Very high quality.
|
||||
|
||||
@item 4-8 (@emph{-hh -x}@var{EXTRAPROC})
|
||||
Same as @samp{3}, but with extra processing enabled.
|
||||
|
||||
@samp{4} is the same as @option{-x2} and @samp{8} is the same as @option{-x6}.
|
||||
|
||||
@end table
|
||||
@end table
|
||||
|
||||
@anchor{mjpegenc}
|
||||
@section mjpeg
|
||||
|
||||
@@ -1210,6 +1253,11 @@ Compute and use optimal huffman tables.
|
||||
|
||||
WavPack lossless audio encoder.
|
||||
|
||||
This is a libavcodec-native WavPack encoder. There is also an encoder based on
|
||||
libwavpack, but there is virtually no reason to use that encoder.
|
||||
|
||||
See also @ref{libwavpack}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
The equivalent options for @command{wavpack} command line utility are listed in
|
||||
@@ -1230,6 +1278,7 @@ For the complete formula of calculating default, see
|
||||
@file{libavcodec/wavpackenc.c}.
|
||||
|
||||
@item compression_level (@emph{-f}, @emph{-h}, @emph{-hh}, and @emph{-x})
|
||||
This option's syntax is consistent with @ref{libwavpack}'s.
|
||||
@end table
|
||||
|
||||
@subsubsection Private options
|
||||
@@ -1268,44 +1317,6 @@ disabled
|
||||
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.
|
||||
@@ -1354,58 +1365,10 @@ can be selected with @code{-pred 1}.
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item format @var{integer}
|
||||
@item format
|
||||
Can be set to either @code{j2k} or @code{jp2} (the default) that
|
||||
makes it possible to store non-rgb pix_fmts.
|
||||
|
||||
@item tile_width @var{integer}
|
||||
Sets tile width. Range is 1 to 1073741824. Default is 256.
|
||||
|
||||
@item tile_height @var{integer}
|
||||
Sets tile height. Range is 1 to 1073741824. Default is 256.
|
||||
|
||||
@item pred @var{integer}
|
||||
Allows setting the discrete wavelet transform (DWT) type
|
||||
@table @option
|
||||
@item dwt97int (Lossy)
|
||||
@item dwt53 (Lossless)
|
||||
@end table
|
||||
Default is @code{dwt97int}
|
||||
|
||||
@item sop @var{boolean}
|
||||
Enable this to add SOP marker at the start of each packet. Disabled by default.
|
||||
|
||||
@item eph @var{boolean}
|
||||
Enable this to add EPH marker at the end of each packet header. Disabled by default.
|
||||
|
||||
@item prog @var{integer}
|
||||
Sets the progression order to be used by the encoder.
|
||||
Possible values are:
|
||||
@table @option
|
||||
@item lrcp
|
||||
@item rlcp
|
||||
@item rpcl
|
||||
@item pcrl
|
||||
@item cprl
|
||||
@end table
|
||||
Set to @code{lrcp} by default.
|
||||
|
||||
@item layer_rates @var{string}
|
||||
By default, when this option is not used, compression is done using the quality metric.
|
||||
This option allows for compression using compression ratio. The compression ratio for each
|
||||
level could be specified. The compression ratio of a layer @code{l} species the what ratio of
|
||||
total file size is contained in the first @code{l} layers.
|
||||
|
||||
Example usage:
|
||||
|
||||
@example
|
||||
ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k
|
||||
@end example
|
||||
|
||||
This would compress the image to contain 3 layers, where the data contained in the
|
||||
first layer would be compressed by 1000 times, compressed by 100 in the first two layers,
|
||||
and shall contain all data while using all 3 layers.
|
||||
|
||||
@end table
|
||||
|
||||
@section librav1e
|
||||
@@ -1636,165 +1599,6 @@ Enable the use of global motion for block prediction. Default is true.
|
||||
Enable block copy mode for intra block prediction. This mode is
|
||||
useful for screen content. Default is true.
|
||||
|
||||
@item enable-rect-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable rectangular partitions. Default is true.
|
||||
|
||||
@item enable-1to4-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable 1:4/4:1 partitions. Default is true.
|
||||
|
||||
@item enable-ab-partitions (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable AB shape partitions. Default is true.
|
||||
|
||||
@item enable-angle-delta (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable angle delta intra prediction. Default is true.
|
||||
|
||||
@item enable-cfl-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable chroma predicted from luma intra prediction. Default is true.
|
||||
|
||||
@item enable-filter-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable filter intra predictor. Default is true.
|
||||
|
||||
@item enable-intra-edge-filter (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable intra edge filter. Default is true.
|
||||
|
||||
@item enable-smooth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable smooth intra prediction mode. Default is true.
|
||||
|
||||
@item enable-paeth-intra (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable paeth predictor in intra prediction. Default is true.
|
||||
|
||||
@item enable-palette (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable palette prediction mode. Default is true.
|
||||
|
||||
@item enable-flip-idtx (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable extended transform type, including FLIPADST_DCT, DCT_FLIPADST,
|
||||
FLIPADST_FLIPADST, ADST_FLIPADST, FLIPADST_ADST, IDTX, V_DCT, H_DCT,
|
||||
V_ADST, H_ADST, V_FLIPADST, H_FLIPADST. Default is true.
|
||||
|
||||
@item enable-tx64 (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable 64-pt transform. Default is true.
|
||||
|
||||
@item reduced-tx-type-set (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use reduced set of transform types. Default is false.
|
||||
|
||||
@item use-intra-dct-only (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use DCT only for INTRA modes. Default is false.
|
||||
|
||||
@item use-inter-dct-only (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use DCT only for INTER modes. Default is false.
|
||||
|
||||
@item use-intra-default-tx-only (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use Default-transform only for INTRA modes. Default is false.
|
||||
|
||||
@item enable-ref-frame-mvs (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable temporal mv prediction. Default is true.
|
||||
|
||||
@item enable-reduced-reference-set (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Use reduced set of single and compound references. Default is false.
|
||||
|
||||
@item enable-obmc (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable obmc. Default is true.
|
||||
|
||||
@item enable-dual-filter (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable dual filter. Default is true.
|
||||
|
||||
@item enable-diff-wtd-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable difference-weighted compound. Default is true.
|
||||
|
||||
@item enable-dist-wtd-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable distance-weighted compound. Default is true.
|
||||
|
||||
@item enable-onesided-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable one sided compound. Default is true.
|
||||
|
||||
@item enable-interinter-wedge (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interinter wedge compound. Default is true.
|
||||
|
||||
@item enable-interintra-wedge (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interintra wedge compound. Default is true.
|
||||
|
||||
@item enable-masked-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable masked compound. Default is true.
|
||||
|
||||
@item enable-interintra-comp (@emph{boolean}) (Requires libaom >= v2.0.0)
|
||||
Enable interintra compound. Default is true.
|
||||
|
||||
@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
|
||||
|
||||
SVT-AV1 encoder wrapper.
|
||||
|
||||
Requires the presence of the SVT-AV1 headers and library during configuration.
|
||||
You need to explicitly configure the build with @code{--enable-libsvtav1}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item profile
|
||||
Set the encoding profile.
|
||||
|
||||
@item level
|
||||
Set the operating point level.
|
||||
|
||||
@item tier
|
||||
Set the operating point tier.
|
||||
|
||||
@item rc
|
||||
Set the rate control mode to use.
|
||||
|
||||
Possible modes:
|
||||
@table @option
|
||||
@item cqp
|
||||
Constant quantizer: use fixed values of qindex (dependent on the frame type)
|
||||
throughout the stream. This mode is the default.
|
||||
|
||||
@item vbr
|
||||
Variable bitrate: use a target bitrate for the whole stream.
|
||||
|
||||
@item cvbr
|
||||
Constrained variable bitrate: use a target bitrate for each GOP.
|
||||
@end table
|
||||
|
||||
@item qmax
|
||||
Set the maximum quantizer to use when using a bitrate mode.
|
||||
|
||||
@item qmin
|
||||
Set the minimum quantizer to use when using a bitrate mode.
|
||||
|
||||
@item qp
|
||||
Set the quantizer used in cqp rate control mode (0-63).
|
||||
|
||||
@item sc_detection
|
||||
Enable scene change detection.
|
||||
|
||||
@item la_depth
|
||||
Set number of frames to look ahead (0-120).
|
||||
|
||||
@item preset
|
||||
Set the quality-speed tradeoff, in the range 0 to 8. Higher values are
|
||||
faster but lower quality. Defaults to 8 (highest speed).
|
||||
|
||||
@item tile_rows
|
||||
Set log2 of the number of rows of tiles to use (0-6).
|
||||
|
||||
@item tile_columns
|
||||
Set log2 of the number of columns of tiles to use (0-4).
|
||||
|
||||
@end table
|
||||
|
||||
@section libkvazaar
|
||||
@@ -2177,38 +1981,6 @@ midpoint is passed in rather than calculated for a specific clip or chunk.
|
||||
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
|
||||
@@ -2305,7 +2077,9 @@ pixel formats as input instead of YUV.
|
||||
@subsection Supported Pixel Formats
|
||||
|
||||
x264 supports 8- to 10-bit color spaces. The exact bit depth is controlled at
|
||||
x264's configure time.
|
||||
x264's configure time. FFmpeg only supports one bit depth in one particular
|
||||
build. In other words, it is not possible to build one FFmpeg with multiple
|
||||
versions of x264 with different bit depths.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@@ -2966,28 +2740,18 @@ MPEG-2 video encoder.
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item profile
|
||||
@item profile @var{integer}
|
||||
Select the mpeg2 profile to encode:
|
||||
|
||||
@table @samp
|
||||
@item 422
|
||||
@item high
|
||||
@item main
|
||||
@item ss
|
||||
Spatially Scalable
|
||||
@item snr
|
||||
SNR Scalable
|
||||
@item main
|
||||
@item simple
|
||||
@end table
|
||||
|
||||
@item level
|
||||
Select the mpeg2 level to encode:
|
||||
|
||||
@table @samp
|
||||
@item high
|
||||
@item high1440
|
||||
@item main
|
||||
@item low
|
||||
@item simple
|
||||
@end table
|
||||
|
||||
@item seq_disp_ext @var{integer}
|
||||
@@ -3351,11 +3115,6 @@ Include HDR metadata if the input frames have it
|
||||
messages).
|
||||
@end table
|
||||
|
||||
@item tiles
|
||||
Set the number of tiles to encode the input video with, as columns x rows.
|
||||
Larger numbers allow greater parallelism in both encoding and decoding, but
|
||||
may decrease coding efficiency.
|
||||
|
||||
@end table
|
||||
|
||||
@item mjpeg_vaapi
|
||||
|
||||
@@ -96,7 +96,6 @@ int main(int argc, char *argv[])
|
||||
avio_ctx = avio_alloc_context(avio_ctx_buffer, avio_ctx_buffer_size,
|
||||
0, &bd, &read_packet, NULL, NULL);
|
||||
if (!avio_ctx) {
|
||||
av_freep(&avio_ctx_buffer);
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -127,10 +127,6 @@ int main(int argc, char **argv)
|
||||
outfilename = argv[2];
|
||||
|
||||
pkt = av_packet_alloc();
|
||||
if (!pkt) {
|
||||
fprintf(stderr, "Could not allocate AVPacket\n");
|
||||
exit(1); /* or proper cleanup and returning */
|
||||
}
|
||||
|
||||
/* find the MPEG audio decoder */
|
||||
codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
|
||||
@@ -164,7 +160,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
outfile = fopen(outfilename, "wb");
|
||||
if (!outfile) {
|
||||
fprintf(stderr, "Could not open %s\n", outfilename);
|
||||
av_free(c);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ static void pgm_save(unsigned char *buf, int wrap, int xsize, int ysize,
|
||||
FILE *f;
|
||||
int i;
|
||||
|
||||
f = fopen(filename,"wb");
|
||||
f = fopen(filename,"w");
|
||||
fprintf(f, "P5\n%d %d\n%d\n", xsize, ysize, 255);
|
||||
for (i = 0; i < ysize; i++)
|
||||
fwrite(buf + i * wrap, 1, xsize, f);
|
||||
|
||||
@@ -51,7 +51,7 @@ static int video_dst_bufsize;
|
||||
|
||||
static int video_stream_idx = -1, audio_stream_idx = -1;
|
||||
static AVFrame *frame = NULL;
|
||||
static AVPacket *pkt = NULL;
|
||||
static AVPacket pkt;
|
||||
static int video_frame_count = 0;
|
||||
static int audio_frame_count = 0;
|
||||
|
||||
@@ -137,9 +137,11 @@ static int decode_packet(AVCodecContext *dec, const AVPacket *pkt)
|
||||
ret = output_audio_frame(frame);
|
||||
|
||||
av_frame_unref(frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int open_codec_context(int *stream_idx,
|
||||
@@ -301,12 +303,10 @@ int main (int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
|
||||
pkt = av_packet_alloc();
|
||||
if (!pkt) {
|
||||
fprintf(stderr, "Could not allocate packet\n");
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
/* initialize packet, set data to NULL, let the demuxer fill it */
|
||||
av_init_packet(&pkt);
|
||||
pkt.data = NULL;
|
||||
pkt.size = 0;
|
||||
|
||||
if (video_stream)
|
||||
printf("Demuxing video from file '%s' into '%s'\n", src_filename, video_dst_filename);
|
||||
@@ -314,14 +314,14 @@ int main (int argc, char **argv)
|
||||
printf("Demuxing audio from file '%s' into '%s'\n", src_filename, audio_dst_filename);
|
||||
|
||||
/* read frames from the file */
|
||||
while (av_read_frame(fmt_ctx, pkt) >= 0) {
|
||||
while (av_read_frame(fmt_ctx, &pkt) >= 0) {
|
||||
// check if the packet belongs to a stream we are interested in, otherwise
|
||||
// skip it
|
||||
if (pkt->stream_index == video_stream_idx)
|
||||
ret = decode_packet(video_dec_ctx, pkt);
|
||||
else if (pkt->stream_index == audio_stream_idx)
|
||||
ret = decode_packet(audio_dec_ctx, pkt);
|
||||
av_packet_unref(pkt);
|
||||
if (pkt.stream_index == video_stream_idx)
|
||||
ret = decode_packet(video_dec_ctx, &pkt);
|
||||
else if (pkt.stream_index == audio_stream_idx)
|
||||
ret = decode_packet(audio_dec_ctx, &pkt);
|
||||
av_packet_unref(&pkt);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
@@ -372,7 +372,6 @@ end:
|
||||
fclose(video_dst_file);
|
||||
if (audio_dst_file)
|
||||
fclose(audio_dst_file);
|
||||
av_packet_free(&pkt);
|
||||
av_frame_free(&frame);
|
||||
av_free(video_dst_data[0]);
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
/* open the file to dump raw data */
|
||||
output_file = fopen(argv[3], "w+b");
|
||||
output_file = fopen(argv[3], "w+");
|
||||
|
||||
/* actual decoding and dump the raw data */
|
||||
while (ret >= 0) {
|
||||
|
||||
+23
-21
@@ -200,7 +200,7 @@ static void add_stream(OutputStream *ost, AVFormatContext *oc,
|
||||
* the motion of the chroma plane does not match the luma plane. */
|
||||
c->mb_decision = 2;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -284,25 +284,25 @@ static void open_audio(AVFormatContext *oc, AVCodec *codec, OutputStream *ost, A
|
||||
}
|
||||
|
||||
/* create resampler context */
|
||||
ost->swr_ctx = swr_alloc();
|
||||
if (!ost->swr_ctx) {
|
||||
fprintf(stderr, "Could not allocate resampler context\n");
|
||||
exit(1);
|
||||
}
|
||||
ost->swr_ctx = swr_alloc();
|
||||
if (!ost->swr_ctx) {
|
||||
fprintf(stderr, "Could not allocate resampler context\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* set options */
|
||||
av_opt_set_int (ost->swr_ctx, "in_channel_count", c->channels, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "in_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(ost->swr_ctx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "out_channel_count", c->channels, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "out_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(ost->swr_ctx, "out_sample_fmt", c->sample_fmt, 0);
|
||||
/* set options */
|
||||
av_opt_set_int (ost->swr_ctx, "in_channel_count", c->channels, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "in_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(ost->swr_ctx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "out_channel_count", c->channels, 0);
|
||||
av_opt_set_int (ost->swr_ctx, "out_sample_rate", c->sample_rate, 0);
|
||||
av_opt_set_sample_fmt(ost->swr_ctx, "out_sample_fmt", c->sample_fmt, 0);
|
||||
|
||||
/* initialize the resampling context */
|
||||
if ((ret = swr_init(ost->swr_ctx)) < 0) {
|
||||
fprintf(stderr, "Failed to initialize the resampling context\n");
|
||||
exit(1);
|
||||
}
|
||||
/* initialize the resampling context */
|
||||
if ((ret = swr_init(ost->swr_ctx)) < 0) {
|
||||
fprintf(stderr, "Failed to initialize the resampling context\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Prepare a 16 bit dummy audio frame of 'frame_size' samples and
|
||||
@@ -349,9 +349,10 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost)
|
||||
|
||||
if (frame) {
|
||||
/* convert samples from native format to destination codec format, using the resampler */
|
||||
/* compute destination number of samples */
|
||||
dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples;
|
||||
av_assert0(dst_nb_samples == frame->nb_samples);
|
||||
/* compute destination number of samples */
|
||||
dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples,
|
||||
c->sample_rate, c->sample_rate, AV_ROUND_UP);
|
||||
av_assert0(dst_nb_samples == frame->nb_samples);
|
||||
|
||||
/* when we pass a frame to the encoder, it may keep a reference to it
|
||||
* internally;
|
||||
@@ -518,6 +519,7 @@ static AVFrame *get_video_frame(OutputStream *ost)
|
||||
static int write_video_frame(AVFormatContext *oc, OutputStream *ost)
|
||||
{
|
||||
return write_frame(oc, ost->enc, ost->st, get_video_frame(ost));
|
||||
|
||||
}
|
||||
|
||||
static void close_stream(AVFormatContext *oc, OutputStream *ost)
|
||||
|
||||
@@ -245,16 +245,14 @@ cleanup:
|
||||
|
||||
/**
|
||||
* Initialize one data packet for reading or writing.
|
||||
* @param[out] packet Packet to be initialized
|
||||
* @return Error code (0 if successful)
|
||||
* @param packet Packet to be initialized
|
||||
*/
|
||||
static int init_packet(AVPacket **packet)
|
||||
static void init_packet(AVPacket *packet)
|
||||
{
|
||||
if (!(*packet = av_packet_alloc())) {
|
||||
fprintf(stderr, "Could not allocate packet\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
return 0;
|
||||
av_init_packet(packet);
|
||||
/* Set the packet data and size so that it is recognized as being empty. */
|
||||
packet->data = NULL;
|
||||
packet->size = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -373,31 +371,28 @@ static int decode_audio_frame(AVFrame *frame,
|
||||
int *data_present, int *finished)
|
||||
{
|
||||
/* Packet used for temporary storage. */
|
||||
AVPacket *input_packet;
|
||||
AVPacket input_packet;
|
||||
int error;
|
||||
|
||||
error = init_packet(&input_packet);
|
||||
if (error < 0)
|
||||
return error;
|
||||
init_packet(&input_packet);
|
||||
|
||||
/* Read one audio frame from the input file into a temporary packet. */
|
||||
if ((error = av_read_frame(input_format_context, input_packet)) < 0) {
|
||||
if ((error = av_read_frame(input_format_context, &input_packet)) < 0) {
|
||||
/* If we are at the end of the file, flush the decoder below. */
|
||||
if (error == AVERROR_EOF)
|
||||
*finished = 1;
|
||||
else {
|
||||
fprintf(stderr, "Could not read frame (error '%s')\n",
|
||||
av_err2str(error));
|
||||
goto cleanup;
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
/* Send the audio frame stored in the temporary packet to the decoder.
|
||||
* The input audio stream decoder is used to do this. */
|
||||
if ((error = avcodec_send_packet(input_codec_context, input_packet)) < 0) {
|
||||
if ((error = avcodec_send_packet(input_codec_context, &input_packet)) < 0) {
|
||||
fprintf(stderr, "Could not send packet for decoding (error '%s')\n",
|
||||
av_err2str(error));
|
||||
goto cleanup;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Receive one frame from the decoder. */
|
||||
@@ -423,7 +418,7 @@ static int decode_audio_frame(AVFrame *frame,
|
||||
}
|
||||
|
||||
cleanup:
|
||||
av_packet_free(&input_packet);
|
||||
av_packet_unref(&input_packet);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -666,12 +661,9 @@ static int encode_audio_frame(AVFrame *frame,
|
||||
int *data_present)
|
||||
{
|
||||
/* Packet used for temporary storage. */
|
||||
AVPacket *output_packet;
|
||||
AVPacket output_packet;
|
||||
int error;
|
||||
|
||||
error = init_packet(&output_packet);
|
||||
if (error < 0)
|
||||
return error;
|
||||
init_packet(&output_packet);
|
||||
|
||||
/* Set a timestamp based on the sample rate for the container. */
|
||||
if (frame) {
|
||||
@@ -689,11 +681,11 @@ static int encode_audio_frame(AVFrame *frame,
|
||||
} else if (error < 0) {
|
||||
fprintf(stderr, "Could not send packet for encoding (error '%s')\n",
|
||||
av_err2str(error));
|
||||
goto cleanup;
|
||||
return error;
|
||||
}
|
||||
|
||||
/* Receive one encoded frame from the encoder. */
|
||||
error = avcodec_receive_packet(output_codec_context, output_packet);
|
||||
error = avcodec_receive_packet(output_codec_context, &output_packet);
|
||||
/* If the encoder asks for more data to be able to provide an
|
||||
* encoded frame, return indicating that no data is present. */
|
||||
if (error == AVERROR(EAGAIN)) {
|
||||
@@ -714,14 +706,14 @@ static int encode_audio_frame(AVFrame *frame,
|
||||
|
||||
/* Write one audio frame from the temporary packet to the output file. */
|
||||
if (*data_present &&
|
||||
(error = av_write_frame(output_format_context, output_packet)) < 0) {
|
||||
(error = av_write_frame(output_format_context, &output_packet)) < 0) {
|
||||
fprintf(stderr, "Could not write frame (error '%s')\n",
|
||||
av_err2str(error));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
av_packet_free(&output_packet);
|
||||
av_packet_unref(&output_packet);
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
+81
-82
@@ -41,17 +41,12 @@ typedef struct FilteringContext {
|
||||
AVFilterContext *buffersink_ctx;
|
||||
AVFilterContext *buffersrc_ctx;
|
||||
AVFilterGraph *filter_graph;
|
||||
|
||||
AVPacket *enc_pkt;
|
||||
AVFrame *filtered_frame;
|
||||
} FilteringContext;
|
||||
static FilteringContext *filter_ctx;
|
||||
|
||||
typedef struct StreamContext {
|
||||
AVCodecContext *dec_ctx;
|
||||
AVCodecContext *enc_ctx;
|
||||
|
||||
AVFrame *dec_frame;
|
||||
} StreamContext;
|
||||
static StreamContext *stream_ctx;
|
||||
|
||||
@@ -107,10 +102,6 @@ static int open_input_file(const char *filename)
|
||||
}
|
||||
}
|
||||
stream_ctx[i].dec_ctx = codec_ctx;
|
||||
|
||||
stream_ctx[i].dec_frame = av_frame_alloc();
|
||||
if (!stream_ctx[i].dec_frame)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
av_dump_format(ifmt_ctx, 0, filename, 0);
|
||||
@@ -407,63 +398,54 @@ static int init_filters(void)
|
||||
stream_ctx[i].enc_ctx, filter_spec);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
filter_ctx[i].enc_pkt = av_packet_alloc();
|
||||
if (!filter_ctx[i].enc_pkt)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
filter_ctx[i].filtered_frame = av_frame_alloc();
|
||||
if (!filter_ctx[i].filtered_frame)
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int encode_write_frame(unsigned int stream_index, int flush)
|
||||
{
|
||||
StreamContext *stream = &stream_ctx[stream_index];
|
||||
FilteringContext *filter = &filter_ctx[stream_index];
|
||||
AVFrame *filt_frame = flush ? NULL : filter->filtered_frame;
|
||||
AVPacket *enc_pkt = filter->enc_pkt;
|
||||
static int encode_write_frame(AVFrame *filt_frame, unsigned int stream_index, int *got_frame) {
|
||||
int ret;
|
||||
int got_frame_local;
|
||||
AVPacket enc_pkt;
|
||||
int (*enc_func)(AVCodecContext *, AVPacket *, const AVFrame *, int *) =
|
||||
(ifmt_ctx->streams[stream_index]->codecpar->codec_type ==
|
||||
AVMEDIA_TYPE_VIDEO) ? avcodec_encode_video2 : avcodec_encode_audio2;
|
||||
|
||||
if (!got_frame)
|
||||
got_frame = &got_frame_local;
|
||||
|
||||
av_log(NULL, AV_LOG_INFO, "Encoding frame\n");
|
||||
/* encode filtered frame */
|
||||
av_packet_unref(enc_pkt);
|
||||
|
||||
ret = avcodec_send_frame(stream->enc_ctx, filt_frame);
|
||||
|
||||
enc_pkt.data = NULL;
|
||||
enc_pkt.size = 0;
|
||||
av_init_packet(&enc_pkt);
|
||||
ret = enc_func(stream_ctx[stream_index].enc_ctx, &enc_pkt,
|
||||
filt_frame, got_frame);
|
||||
av_frame_free(&filt_frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (!(*got_frame))
|
||||
return 0;
|
||||
|
||||
while (ret >= 0) {
|
||||
ret = avcodec_receive_packet(stream->enc_ctx, enc_pkt);
|
||||
|
||||
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
||||
return 0;
|
||||
|
||||
/* prepare packet for muxing */
|
||||
enc_pkt->stream_index = stream_index;
|
||||
av_packet_rescale_ts(enc_pkt,
|
||||
stream->enc_ctx->time_base,
|
||||
ofmt_ctx->streams[stream_index]->time_base);
|
||||
|
||||
av_log(NULL, AV_LOG_DEBUG, "Muxing frame\n");
|
||||
/* mux encoded frame */
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, enc_pkt);
|
||||
}
|
||||
/* prepare packet for muxing */
|
||||
enc_pkt.stream_index = stream_index;
|
||||
av_packet_rescale_ts(&enc_pkt,
|
||||
stream_ctx[stream_index].enc_ctx->time_base,
|
||||
ofmt_ctx->streams[stream_index]->time_base);
|
||||
|
||||
av_log(NULL, AV_LOG_DEBUG, "Muxing frame\n");
|
||||
/* mux encoded frame */
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, &enc_pkt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int filter_encode_write_frame(AVFrame *frame, unsigned int stream_index)
|
||||
{
|
||||
FilteringContext *filter = &filter_ctx[stream_index];
|
||||
int ret;
|
||||
AVFrame *filt_frame;
|
||||
|
||||
av_log(NULL, AV_LOG_INFO, "Pushing decoded frame to filters\n");
|
||||
/* push the decoded frame into the filtergraph */
|
||||
ret = av_buffersrc_add_frame_flags(filter->buffersrc_ctx,
|
||||
ret = av_buffersrc_add_frame_flags(filter_ctx[stream_index].buffersrc_ctx,
|
||||
frame, 0);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Error while feeding the filtergraph\n");
|
||||
@@ -472,9 +454,14 @@ static int filter_encode_write_frame(AVFrame *frame, unsigned int stream_index)
|
||||
|
||||
/* pull filtered frames from the filtergraph */
|
||||
while (1) {
|
||||
filt_frame = av_frame_alloc();
|
||||
if (!filt_frame) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
break;
|
||||
}
|
||||
av_log(NULL, AV_LOG_INFO, "Pulling filtered frame from filters\n");
|
||||
ret = av_buffersink_get_frame(filter->buffersink_ctx,
|
||||
filter->filtered_frame);
|
||||
ret = av_buffersink_get_frame(filter_ctx[stream_index].buffersink_ctx,
|
||||
filt_frame);
|
||||
if (ret < 0) {
|
||||
/* if no more frames for output - returns AVERROR(EAGAIN)
|
||||
* if flushed and no more frames for output - returns AVERROR_EOF
|
||||
@@ -482,12 +469,12 @@ static int filter_encode_write_frame(AVFrame *frame, unsigned int stream_index)
|
||||
*/
|
||||
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
||||
ret = 0;
|
||||
av_frame_free(&filt_frame);
|
||||
break;
|
||||
}
|
||||
|
||||
filter->filtered_frame->pict_type = AV_PICTURE_TYPE_NONE;
|
||||
ret = encode_write_frame(stream_index, 0);
|
||||
av_frame_unref(filter->filtered_frame);
|
||||
filt_frame->pict_type = AV_PICTURE_TYPE_NONE;
|
||||
ret = encode_write_frame(filt_frame, stream_index, NULL);
|
||||
if (ret < 0)
|
||||
break;
|
||||
}
|
||||
@@ -497,20 +484,34 @@ static int filter_encode_write_frame(AVFrame *frame, unsigned int stream_index)
|
||||
|
||||
static int flush_encoder(unsigned int stream_index)
|
||||
{
|
||||
int ret;
|
||||
int got_frame;
|
||||
|
||||
if (!(stream_ctx[stream_index].enc_ctx->codec->capabilities &
|
||||
AV_CODEC_CAP_DELAY))
|
||||
return 0;
|
||||
|
||||
av_log(NULL, AV_LOG_INFO, "Flushing stream #%u encoder\n", stream_index);
|
||||
return encode_write_frame(stream_index, 1);
|
||||
while (1) {
|
||||
av_log(NULL, AV_LOG_INFO, "Flushing stream #%u encoder\n", stream_index);
|
||||
ret = encode_write_frame(NULL, stream_index, &got_frame);
|
||||
if (ret < 0)
|
||||
break;
|
||||
if (!got_frame)
|
||||
return 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret;
|
||||
AVPacket *packet = NULL;
|
||||
AVPacket packet = { .data = NULL, .size = 0 };
|
||||
AVFrame *frame = NULL;
|
||||
enum AVMediaType type;
|
||||
unsigned int stream_index;
|
||||
unsigned int i;
|
||||
int got_frame;
|
||||
int (*dec_func)(AVCodecContext *, AVFrame *, int *, const AVPacket *);
|
||||
|
||||
if (argc != 3) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Usage: %s <input file> <output file>\n", argv[0]);
|
||||
@@ -523,54 +524,56 @@ int main(int argc, char **argv)
|
||||
goto end;
|
||||
if ((ret = init_filters()) < 0)
|
||||
goto end;
|
||||
if (!(packet = av_packet_alloc()))
|
||||
goto end;
|
||||
|
||||
/* read all packets */
|
||||
while (1) {
|
||||
if ((ret = av_read_frame(ifmt_ctx, packet)) < 0)
|
||||
if ((ret = av_read_frame(ifmt_ctx, &packet)) < 0)
|
||||
break;
|
||||
stream_index = packet->stream_index;
|
||||
stream_index = packet.stream_index;
|
||||
type = ifmt_ctx->streams[packet.stream_index]->codecpar->codec_type;
|
||||
av_log(NULL, AV_LOG_DEBUG, "Demuxer gave frame of stream_index %u\n",
|
||||
stream_index);
|
||||
|
||||
if (filter_ctx[stream_index].filter_graph) {
|
||||
StreamContext *stream = &stream_ctx[stream_index];
|
||||
|
||||
av_log(NULL, AV_LOG_DEBUG, "Going to reencode&filter the frame\n");
|
||||
|
||||
av_packet_rescale_ts(packet,
|
||||
frame = av_frame_alloc();
|
||||
if (!frame) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
break;
|
||||
}
|
||||
av_packet_rescale_ts(&packet,
|
||||
ifmt_ctx->streams[stream_index]->time_base,
|
||||
stream->dec_ctx->time_base);
|
||||
ret = avcodec_send_packet(stream->dec_ctx, packet);
|
||||
stream_ctx[stream_index].dec_ctx->time_base);
|
||||
dec_func = (type == AVMEDIA_TYPE_VIDEO) ? avcodec_decode_video2 :
|
||||
avcodec_decode_audio4;
|
||||
ret = dec_func(stream_ctx[stream_index].dec_ctx, frame,
|
||||
&got_frame, &packet);
|
||||
if (ret < 0) {
|
||||
av_frame_free(&frame);
|
||||
av_log(NULL, AV_LOG_ERROR, "Decoding failed\n");
|
||||
break;
|
||||
}
|
||||
|
||||
while (ret >= 0) {
|
||||
ret = avcodec_receive_frame(stream->dec_ctx, stream->dec_frame);
|
||||
if (ret == AVERROR_EOF || ret == AVERROR(EAGAIN))
|
||||
break;
|
||||
else if (ret < 0)
|
||||
goto end;
|
||||
|
||||
stream->dec_frame->pts = stream->dec_frame->best_effort_timestamp;
|
||||
ret = filter_encode_write_frame(stream->dec_frame, stream_index);
|
||||
if (got_frame) {
|
||||
frame->pts = frame->best_effort_timestamp;
|
||||
ret = filter_encode_write_frame(frame, stream_index);
|
||||
av_frame_free(&frame);
|
||||
if (ret < 0)
|
||||
goto end;
|
||||
} else {
|
||||
av_frame_free(&frame);
|
||||
}
|
||||
} else {
|
||||
/* remux this frame without reencoding */
|
||||
av_packet_rescale_ts(packet,
|
||||
av_packet_rescale_ts(&packet,
|
||||
ifmt_ctx->streams[stream_index]->time_base,
|
||||
ofmt_ctx->streams[stream_index]->time_base);
|
||||
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, packet);
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, &packet);
|
||||
if (ret < 0)
|
||||
goto end;
|
||||
}
|
||||
av_packet_unref(packet);
|
||||
av_packet_unref(&packet);
|
||||
}
|
||||
|
||||
/* flush filters and encoders */
|
||||
@@ -594,18 +597,14 @@ int main(int argc, char **argv)
|
||||
|
||||
av_write_trailer(ofmt_ctx);
|
||||
end:
|
||||
av_packet_free(&packet);
|
||||
av_packet_unref(&packet);
|
||||
av_frame_free(&frame);
|
||||
for (i = 0; i < ifmt_ctx->nb_streams; i++) {
|
||||
avcodec_free_context(&stream_ctx[i].dec_ctx);
|
||||
if (ofmt_ctx && ofmt_ctx->nb_streams > i && ofmt_ctx->streams[i] && stream_ctx[i].enc_ctx)
|
||||
avcodec_free_context(&stream_ctx[i].enc_ctx);
|
||||
if (filter_ctx && filter_ctx[i].filter_graph) {
|
||||
if (filter_ctx && filter_ctx[i].filter_graph)
|
||||
avfilter_graph_free(&filter_ctx[i].filter_graph);
|
||||
av_packet_free(&filter_ctx[i].enc_pkt);
|
||||
av_frame_free(&filter_ctx[i].filtered_frame);
|
||||
}
|
||||
|
||||
av_frame_free(&stream_ctx[i].dec_frame);
|
||||
}
|
||||
av_free(filter_ctx);
|
||||
av_free(stream_ctx);
|
||||
|
||||
@@ -74,31 +74,27 @@ static int set_hwframe_ctx(AVCodecContext *ctx, AVBufferRef *hw_device_ctx)
|
||||
static int encode_write(AVCodecContext *avctx, AVFrame *frame, FILE *fout)
|
||||
{
|
||||
int ret = 0;
|
||||
AVPacket *enc_pkt;
|
||||
AVPacket enc_pkt;
|
||||
|
||||
if (!(enc_pkt = av_packet_alloc()))
|
||||
return AVERROR(ENOMEM);
|
||||
av_init_packet(&enc_pkt);
|
||||
enc_pkt.data = NULL;
|
||||
enc_pkt.size = 0;
|
||||
|
||||
if ((ret = avcodec_send_frame(avctx, frame)) < 0) {
|
||||
fprintf(stderr, "Error code: %s\n", av_err2str(ret));
|
||||
goto end;
|
||||
}
|
||||
while (1) {
|
||||
ret = avcodec_receive_packet(avctx, enc_pkt);
|
||||
ret = avcodec_receive_packet(avctx, &enc_pkt);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
enc_pkt->stream_index = 0;
|
||||
ret = fwrite(enc_pkt->data, enc_pkt->size, 1, fout);
|
||||
av_packet_unref(enc_pkt);
|
||||
if (ret != enc_pkt->size) {
|
||||
ret = AVERROR(errno);
|
||||
break;
|
||||
}
|
||||
enc_pkt.stream_index = 0;
|
||||
ret = fwrite(enc_pkt.data, enc_pkt.size, 1, fout);
|
||||
av_packet_unref(&enc_pkt);
|
||||
}
|
||||
|
||||
end:
|
||||
av_packet_free(&enc_pkt);
|
||||
ret = ((ret == AVERROR(EAGAIN)) ? 0 : -1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -109,25 +109,28 @@ static int open_input_file(const char *filename)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int encode_write(AVPacket *enc_pkt, AVFrame *frame)
|
||||
static int encode_write(AVFrame *frame)
|
||||
{
|
||||
int ret = 0;
|
||||
AVPacket enc_pkt;
|
||||
|
||||
av_packet_unref(enc_pkt);
|
||||
av_init_packet(&enc_pkt);
|
||||
enc_pkt.data = NULL;
|
||||
enc_pkt.size = 0;
|
||||
|
||||
if ((ret = avcodec_send_frame(encoder_ctx, frame)) < 0) {
|
||||
fprintf(stderr, "Error during encoding. Error code: %s\n", av_err2str(ret));
|
||||
goto end;
|
||||
}
|
||||
while (1) {
|
||||
ret = avcodec_receive_packet(encoder_ctx, enc_pkt);
|
||||
ret = avcodec_receive_packet(encoder_ctx, &enc_pkt);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
enc_pkt->stream_index = 0;
|
||||
av_packet_rescale_ts(enc_pkt, ifmt_ctx->streams[video_stream]->time_base,
|
||||
enc_pkt.stream_index = 0;
|
||||
av_packet_rescale_ts(&enc_pkt, ifmt_ctx->streams[video_stream]->time_base,
|
||||
ofmt_ctx->streams[0]->time_base);
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, enc_pkt);
|
||||
ret = av_interleaved_write_frame(ofmt_ctx, &enc_pkt);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "Error during writing data to output file. "
|
||||
"Error code: %s\n", av_err2str(ret));
|
||||
@@ -213,19 +216,21 @@ static int dec_enc(AVPacket *pkt, AVCodec *enc_codec)
|
||||
initialized = 1;
|
||||
}
|
||||
|
||||
if ((ret = encode_write(pkt, frame)) < 0)
|
||||
if ((ret = encode_write(frame)) < 0)
|
||||
fprintf(stderr, "Error during encoding and writing.\n");
|
||||
|
||||
fail:
|
||||
av_frame_free(&frame);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int ret = 0;
|
||||
AVPacket *dec_pkt;
|
||||
AVPacket dec_pkt;
|
||||
AVCodec *enc_codec;
|
||||
|
||||
if (argc != 4) {
|
||||
@@ -241,12 +246,6 @@ int main(int argc, char **argv)
|
||||
return -1;
|
||||
}
|
||||
|
||||
dec_pkt = av_packet_alloc();
|
||||
if (!dec_pkt) {
|
||||
fprintf(stderr, "Failed to allocate decode packet\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((ret = open_input_file(argv[1])) < 0)
|
||||
goto end;
|
||||
|
||||
@@ -276,21 +275,23 @@ int main(int argc, char **argv)
|
||||
|
||||
/* read all packets and only transcoding video */
|
||||
while (ret >= 0) {
|
||||
if ((ret = av_read_frame(ifmt_ctx, dec_pkt)) < 0)
|
||||
if ((ret = av_read_frame(ifmt_ctx, &dec_pkt)) < 0)
|
||||
break;
|
||||
|
||||
if (video_stream == dec_pkt->stream_index)
|
||||
ret = dec_enc(dec_pkt, enc_codec);
|
||||
if (video_stream == dec_pkt.stream_index)
|
||||
ret = dec_enc(&dec_pkt, enc_codec);
|
||||
|
||||
av_packet_unref(dec_pkt);
|
||||
av_packet_unref(&dec_pkt);
|
||||
}
|
||||
|
||||
/* flush decoder */
|
||||
av_packet_unref(dec_pkt);
|
||||
ret = dec_enc(dec_pkt, enc_codec);
|
||||
dec_pkt.data = NULL;
|
||||
dec_pkt.size = 0;
|
||||
ret = dec_enc(&dec_pkt, enc_codec);
|
||||
av_packet_unref(&dec_pkt);
|
||||
|
||||
/* flush encoder */
|
||||
ret = encode_write(dec_pkt, NULL);
|
||||
ret = encode_write(NULL);
|
||||
|
||||
/* write the trailer for output stream */
|
||||
av_write_trailer(ofmt_ctx);
|
||||
@@ -301,6 +302,5 @@ end:
|
||||
avcodec_free_context(&decoder_ctx);
|
||||
avcodec_free_context(&encoder_ctx);
|
||||
av_buffer_unref(&hw_device_ctx);
|
||||
av_packet_free(&dec_pkt);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
slot= # some unique identifier
|
||||
repo=https://git.ffmpeg.org/ffmpeg.git # the source repository
|
||||
repo=git://source.ffmpeg.org/ffmpeg.git # the source repository
|
||||
#branch=release/2.6 # the branch to test
|
||||
samples= # path to samples directory
|
||||
workdir= # directory in which to do all the work
|
||||
@@ -11,21 +11,16 @@ ignore_tests=
|
||||
# the following are optional and map to configure options
|
||||
arch=
|
||||
cpu=
|
||||
toolchain=
|
||||
cross_prefix=
|
||||
as=
|
||||
cc=
|
||||
cxx=
|
||||
ld=
|
||||
nm=
|
||||
target_os=
|
||||
sysroot=
|
||||
target_exec=
|
||||
target_path=
|
||||
target_samples=
|
||||
extra_cflags=
|
||||
extra_cxxflags=
|
||||
extra_objcflags=
|
||||
extra_ldflags=
|
||||
extra_libs=
|
||||
extra_conf= # extra configure options not covered above
|
||||
|
||||
+25
-174
@@ -617,102 +617,6 @@ they do not conflict with the standard, as in:
|
||||
ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
|
||||
@end example
|
||||
|
||||
The parameters set for each target are as follows.
|
||||
|
||||
@strong{VCD}
|
||||
@example
|
||||
@var{pal}:
|
||||
-f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
|
||||
-s 352x288 -r 25
|
||||
-codec:v mpeg1video -g 15 -b:v 1150k -maxrate:v 1150v -minrate:v 1150k -bufsize:v 327680
|
||||
-ar 44100 -ac 2
|
||||
-codec:a mp2 -b:a 224k
|
||||
|
||||
@var{ntsc}:
|
||||
-f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
|
||||
-s 352x240 -r 30000/1001
|
||||
-codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150v -minrate:v 1150k -bufsize:v 327680
|
||||
-ar 44100 -ac 2
|
||||
-codec:a mp2 -b:a 224k
|
||||
|
||||
@var{film}:
|
||||
-f vcd -muxrate 1411200 -muxpreload 0.44 -packetsize 2324
|
||||
-s 352x240 -r 24000/1001
|
||||
-codec:v mpeg1video -g 18 -b:v 1150k -maxrate:v 1150v -minrate:v 1150k -bufsize:v 327680
|
||||
-ar 44100 -ac 2
|
||||
-codec:a mp2 -b:a 224k
|
||||
@end example
|
||||
|
||||
@strong{SVCD}
|
||||
@example
|
||||
@var{pal}:
|
||||
-f svcd -packetsize 2324
|
||||
-s 480x576 -pix_fmt yuv420p -r 25
|
||||
-codec:v mpeg2video -g 15 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
|
||||
-ar 44100
|
||||
-codec:a mp2 -b:a 224k
|
||||
|
||||
@var{ntsc}:
|
||||
-f svcd -packetsize 2324
|
||||
-s 480x480 -pix_fmt yuv420p -r 30000/1001
|
||||
-codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
|
||||
-ar 44100
|
||||
-codec:a mp2 -b:a 224k
|
||||
|
||||
@var{film}:
|
||||
-f svcd -packetsize 2324
|
||||
-s 480x480 -pix_fmt yuv420p -r 24000/1001
|
||||
-codec:v mpeg2video -g 18 -b:v 2040k -maxrate:v 2516k -minrate:v 0 -bufsize:v 1835008 -scan_offset 1
|
||||
-ar 44100
|
||||
-codec:a mp2 -b:a 224k
|
||||
@end example
|
||||
|
||||
@strong{DVD}
|
||||
@example
|
||||
@var{pal}:
|
||||
-f dvd -muxrate 10080k -packetsize 2048
|
||||
-s 720x576 -pix_fmt yuv420p -r 25
|
||||
-codec:v mpeg2video -g 15 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
|
||||
-ar 48000
|
||||
-codec:a ac3 -b:a 448k
|
||||
|
||||
@var{ntsc}:
|
||||
-f dvd -muxrate 10080k -packetsize 2048
|
||||
-s 720x480 -pix_fmt yuv420p -r 30000/1001
|
||||
-codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
|
||||
-ar 48000
|
||||
-codec:a ac3 -b:a 448k
|
||||
|
||||
@var{film}:
|
||||
-f dvd -muxrate 10080k -packetsize 2048
|
||||
-s 720x480 -pix_fmt yuv420p -r 24000/1001
|
||||
-codec:v mpeg2video -g 18 -b:v 6000k -maxrate:v 9000k -minrate:v 0 -bufsize:v 1835008
|
||||
-ar 48000
|
||||
-codec:a ac3 -b:a 448k
|
||||
@end example
|
||||
|
||||
@strong{DV}
|
||||
@example
|
||||
@var{pal}:
|
||||
-f dv
|
||||
-s 720x576 -pix_fmt yuv420p -r 25
|
||||
-ar 48000 -ac 2
|
||||
|
||||
@var{ntsc}:
|
||||
-f dv
|
||||
-s 720x480 -pix_fmt yuv411p -r 30000/1001
|
||||
-ar 48000 -ac 2
|
||||
|
||||
@var{film}:
|
||||
-f dv
|
||||
-s 720x480 -pix_fmt yuv411p -r 24000/1001
|
||||
-ar 48000 -ac 2
|
||||
@end example
|
||||
The @code{dv50} target is identical to the @code{dv} target except that the pixel format set is @code{yuv422p} for all three standards.
|
||||
|
||||
Any user-set value for a parameter above will override the target preset value. In that case, the output may
|
||||
not comply with the target standard.
|
||||
|
||||
@item -dn (@emph{input/output})
|
||||
As an input option, blocks all data streams of a file from being filtered or
|
||||
being automatically selected or mapped for any output. See @code{-discard}
|
||||
@@ -771,19 +675,14 @@ Specify the preset for matching stream(s).
|
||||
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
|
||||
@@ -835,6 +734,10 @@ ffmpeg -dump_attachment:t "" -i INPUT
|
||||
Technical note -- attachments are implemented as codec extradata, so this
|
||||
option can actually be used to extract extradata from any stream, not just
|
||||
attachments.
|
||||
|
||||
@item -noautorotate
|
||||
Disable automatically rotating video based on file metadata.
|
||||
|
||||
@end table
|
||||
|
||||
@section Video Options
|
||||
@@ -855,13 +758,6 @@ If in doubt use @option{-framerate} instead of the input option @option{-r}.
|
||||
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.
|
||||
|
||||
@@ -923,18 +819,6 @@ Create the filtergraph specified by @var{filtergraph} and use it to
|
||||
filter the stream.
|
||||
|
||||
This is an alias for @code{-filter:v}, see the @ref{filter_option,,-filter option}.
|
||||
|
||||
@item -autorotate
|
||||
Automatically rotate the video according to file metadata. Enabled by
|
||||
default, use @option{-noautorotate} to disable it.
|
||||
|
||||
@item -autoscale
|
||||
Automatically scale the video according to the resolution of first frame.
|
||||
Enabled by default, use @option{-noautoscale} to disable it. When autoscale is
|
||||
disabled, all output frames of filter graph might not be in the same resolution
|
||||
and may be inadequate for some encoder/muxer. Therefore, it is not recommended
|
||||
to disable it unless you really know what you are doing.
|
||||
Disable autoscale at your own risk.
|
||||
@end table
|
||||
|
||||
@section Advanced Video options
|
||||
@@ -964,8 +848,8 @@ factor if negative.
|
||||
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
|
||||
Use this option if your input file is interlaced and you want
|
||||
to keep the interlaced format for minimum losses.
|
||||
The alternative is to deinterlace the input stream by use of a filter
|
||||
such as @code{yadif} or @code{bwdif}, but deinterlacing introduces losses.
|
||||
The alternative is to deinterlace the input stream with
|
||||
@option{-deinterlace}, but deinterlacing introduces losses.
|
||||
@item -psnr
|
||||
Calculate PSNR of compressed frames.
|
||||
@item -vstats
|
||||
@@ -1608,17 +1492,6 @@ is enabled.
|
||||
|
||||
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
|
||||
@@ -1773,22 +1646,6 @@ graph will be added to the output file automatically, so we can simply write
|
||||
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
|
||||
@@ -1824,9 +1681,8 @@ not start from timestamp 0, such as transport streams.
|
||||
@item -thread_queue_size @var{size} (@emph{input})
|
||||
This option sets the maximum number of queued packets when reading from the
|
||||
file or device. With low latency / high rate live streams, packets may be
|
||||
discarded if they are not read in a timely manner; setting this value can
|
||||
force ffmpeg to use a separate input thread and read packets as soon as they
|
||||
arrive. By default ffmpeg only do this if multiple inputs are specified.
|
||||
discarded if they are not read in a timely manner; raising this value can
|
||||
avoid it.
|
||||
|
||||
@item -sdp_file @var{file} (@emph{global})
|
||||
Print sdp information for an output stream to @var{file}.
|
||||
@@ -1869,11 +1725,6 @@ No packets were passed to the muxer, the output is empty.
|
||||
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
|
||||
|
||||
@@ -1886,23 +1737,24 @@ this buffer, in packets, for the matching output stream.
|
||||
The default value of this option should be high enough for most uses, so only
|
||||
touch this option if you are sure that you need it.
|
||||
|
||||
@item -muxing_queue_data_threshold @var{bytes} (@emph{output,per-stream})
|
||||
This is a minimum threshold until which the muxing queue size is not taken into
|
||||
account. Defaults to 50 megabytes per stream, and is based on the overall size
|
||||
of packets passed to the muxer.
|
||||
|
||||
@item -auto_conversion_filters (@emph{global})
|
||||
Enable automatically inserting format conversion filters in all filter
|
||||
graphs, including those defined by @option{-vf}, @option{-af},
|
||||
@option{-filter_complex} and @option{-lavfi}. If filter format negotiation
|
||||
requires a conversion, the initialization of the filters will fail.
|
||||
Conversions can still be performed by inserting the relevant conversion
|
||||
filter (scale, aresample) in the graph.
|
||||
On by default, to explicitly disable it you need to specify
|
||||
@code{-noauto_conversion_filters}.
|
||||
|
||||
@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
|
||||
@@ -2179,7 +2031,6 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
|
||||
@ifset config-avfilter
|
||||
@include filters.texi
|
||||
@end ifset
|
||||
@include general_contents.texi
|
||||
@end ifset
|
||||
|
||||
@chapter See Also
|
||||
|
||||
@@ -295,7 +295,6 @@ Toggle full screen.
|
||||
@ifset config-avfilter
|
||||
@include filters.texi
|
||||
@end ifset
|
||||
@include general_contents.texi
|
||||
@end ifset
|
||||
|
||||
@chapter See Also
|
||||
|
||||
@@ -642,7 +642,6 @@ DV, GXF and AVI timecodes are available in format metadata
|
||||
@ifset config-avfilter
|
||||
@include filters.texi
|
||||
@end ifset
|
||||
@include general_contents.texi
|
||||
@end ifset
|
||||
|
||||
@chapter See Also
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -107,24 +107,17 @@ Print detailed information about the muxer named @var{muxer_name}. Use the
|
||||
@option{-formats} option to get a list of all muxers and demuxers.
|
||||
|
||||
@item filter=@var{filter_name}
|
||||
Print detailed information about the filter named @var{filter_name}. Use the
|
||||
Print detailed information about the filter name @var{filter_name}. Use the
|
||||
@option{-filters} option to get a list of all filters.
|
||||
|
||||
@item bsf=@var{bitstream_filter_name}
|
||||
Print detailed information about the bitstream filter named @var{bitstream_filter_name}.
|
||||
Print detailed information about the bitstream filter name @var{bitstream_filter_name}.
|
||||
Use the @option{-bsfs} option to get a list of all bitstream filters.
|
||||
|
||||
@item protocol=@var{protocol_name}
|
||||
Print detailed information about the protocol named @var{protocol_name}.
|
||||
Use the @option{-protocols} option to get a list of all protocols.
|
||||
@end table
|
||||
|
||||
@item -version
|
||||
Show version.
|
||||
|
||||
@item -buildconf
|
||||
Show the build configuration, one option per line.
|
||||
|
||||
@item -formats
|
||||
Show available formats (including devices).
|
||||
|
||||
@@ -352,12 +345,6 @@ Possible flags for this option are:
|
||||
@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
|
||||
|
||||
+76
-1629
File diff suppressed because it is too large
Load Diff
+1400
-1
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+3
-23
@@ -53,7 +53,7 @@ Most distribution and operating system provide a package for it.
|
||||
@section Cloning the source tree
|
||||
|
||||
@example
|
||||
git clone https://git.ffmpeg.org/ffmpeg.git <target>
|
||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
||||
@end example
|
||||
|
||||
This will put the FFmpeg sources into the directory @var{<target>}.
|
||||
@@ -143,7 +143,7 @@ git log <filename(s)>
|
||||
@end example
|
||||
|
||||
You may also use the graphical tools like @command{gitview} or @command{gitk}
|
||||
or the web interface available at @url{https://git.ffmpeg.org/ffmpeg.git}.
|
||||
or the web interface available at @url{http://source.ffmpeg.org/}.
|
||||
|
||||
@section Checking source tree status
|
||||
|
||||
@@ -187,18 +187,11 @@ to make sure you don't have untracked files or deletions.
|
||||
git add [-i|-p|-A] <filenames/dirnames>
|
||||
@end example
|
||||
|
||||
Make sure you have told Git your name, email address and GPG key
|
||||
Make sure you have told Git your name and email address
|
||||
|
||||
@example
|
||||
git config --global user.name "My Name"
|
||||
git config --global user.email my@@email.invalid
|
||||
git config --global user.signingkey ABCDEF0123245
|
||||
@end example
|
||||
|
||||
Enable signing all commits or use -S
|
||||
|
||||
@example
|
||||
git config --global commit.gpgsign true
|
||||
@end example
|
||||
|
||||
Use @option{--global} to set the global configuration for all your Git checkouts.
|
||||
@@ -400,19 +393,6 @@ git checkout -b svn_23456 $SHA1
|
||||
where @var{$SHA1} is the commit hash from the @command{git log} output.
|
||||
|
||||
|
||||
@chapter gpg key generation
|
||||
|
||||
If you have no gpg key yet, we recommend that you create a ed25519 based key as it
|
||||
is small, fast and secure. Especially it results in small signatures in git.
|
||||
|
||||
@example
|
||||
gpg --default-new-key-algo "ed25519/cert,sign+cv25519/encr" --quick-generate-key "human@@server.com"
|
||||
@end example
|
||||
|
||||
When generating a key, make sure the email specified matches the email used in git as some sites like
|
||||
github consider mismatches a reason to declare such commits unverified. After generating a key you
|
||||
can add it to the MAINTAINER file and upload it to a keyserver.
|
||||
|
||||
@chapter Pre-push checklist
|
||||
|
||||
Once you have a set of commits that you feel are ready for pushing,
|
||||
|
||||
+5
-56
@@ -296,31 +296,16 @@ supports it.
|
||||
Set the pixel format of the captured video.
|
||||
Available values are:
|
||||
@table @samp
|
||||
@item auto
|
||||
|
||||
This is the default which means 8-bit YUV 422 or 8-bit ARGB if format
|
||||
autodetection is used, 8-bit YUV 422 otherwise.
|
||||
|
||||
@item uyvy422
|
||||
|
||||
8-bit YUV 422.
|
||||
|
||||
@item yuv422p10
|
||||
|
||||
10-bit YUV 422.
|
||||
|
||||
@item argb
|
||||
|
||||
8-bit RGB.
|
||||
|
||||
@item bgra
|
||||
|
||||
8-bit RGB.
|
||||
|
||||
@item rgb10
|
||||
|
||||
10-bit RGB.
|
||||
|
||||
@end table
|
||||
|
||||
@item teletext_lines
|
||||
@@ -350,13 +335,8 @@ Defaults to @samp{unset}.
|
||||
@item timecode_format
|
||||
Timecode type to include in the frame and video stream metadata. Must be
|
||||
@samp{none}, @samp{rp188vitc}, @samp{rp188vitc2}, @samp{rp188ltc},
|
||||
@samp{rp188hfr}, @samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}.
|
||||
Defaults to @samp{none} (not included).
|
||||
|
||||
In order to properly support 50/60 fps timecodes, the ordering of the queried
|
||||
timecode types for @samp{rp188any} is HFR, VITC1, VITC2 and LTC for >30 fps
|
||||
content. Note that this is slightly different to the ordering used by the
|
||||
DeckLink API, which is HFR, VITC1, LTC, VITC2.
|
||||
@samp{rp188any}, @samp{vitc}, @samp{vitc2}, or @samp{serial}. Defaults to
|
||||
@samp{none} (not included).
|
||||
|
||||
@item video_input
|
||||
Sets the video input source. Must be @samp{unset}, @samp{sdi}, @samp{hdmi},
|
||||
@@ -418,12 +398,6 @@ are dropped till a frame with timecode is received.
|
||||
Option @var{timecode_format} must be specified.
|
||||
Defaults to @option{false}.
|
||||
|
||||
@item enable_klv(@emph{bool})
|
||||
If set to @option{true}, extracts KLV data from VANC and outputs KLV packets.
|
||||
KLV VANC packets are joined based on MID and PSC fields and aggregated into
|
||||
one KLV packet.
|
||||
Defaults to @option{false}.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
@@ -909,15 +883,11 @@ If you don't understand what all of that means, you probably don't want this. L
|
||||
DRM device to capture on. Defaults to @option{/dev/dri/card0}.
|
||||
|
||||
@item format
|
||||
Pixel format of the framebuffer. This can be autodetected if you are running Linux 5.7
|
||||
or later, but needs to be provided for earlier versions. Defaults to @option{bgr0},
|
||||
which is the most common format used by the Linux console and Xorg X server.
|
||||
Pixel format of the framebuffer. Defaults to @option{bgr0}.
|
||||
|
||||
@item format_modifier
|
||||
Format modifier to signal on output frames. This is necessary to import correctly into
|
||||
some APIs. It can be autodetected if you are running Linux 5.7 or later, but will need
|
||||
to be provided explicitly when needed in earlier versions. See the libdrm documentation
|
||||
for possible values.
|
||||
some APIs, but can't be autodetected. See the libdrm documentation for possible values.
|
||||
|
||||
@item crtc_id
|
||||
KMS CRTC ID to define the capture source. The first active plane on the given CRTC
|
||||
@@ -1508,14 +1478,6 @@ ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
@item select_region
|
||||
Specify whether to select the grabbing area graphically using the pointer.
|
||||
A value of @code{1} prompts the user to select the grabbing area graphically
|
||||
by clicking and dragging. A single click with no dragging will select the
|
||||
whole screen. A region with zero width or height will also select the whole
|
||||
screen. This option overwrites the @var{video_size}, @var{grab_x}, and
|
||||
@var{grab_y} options. Default value is @code{0}.
|
||||
|
||||
@item draw_mouse
|
||||
Specify whether to draw the mouse pointer. A value of @code{0} specifies
|
||||
not to draw the pointer. Default value is @code{1}.
|
||||
@@ -1564,21 +1526,8 @@ With @var{follow_mouse}:
|
||||
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
|
||||
@end example
|
||||
|
||||
@item window_id
|
||||
Grab this window, instead of the whole screen. Default value is 0, which maps to
|
||||
the whole screen (root window).
|
||||
|
||||
The id of a window can be found using the @command{xwininfo} program, possibly with options -tree and
|
||||
-root.
|
||||
|
||||
If the window is later enlarged, the new area is not recorded. Video ends when
|
||||
the window is closed, unmapped (i.e., iconified) or shrunk beyond the video
|
||||
size (which defaults to the initial window size).
|
||||
|
||||
This option disables options @option{follow_mouse} and @option{select_region}.
|
||||
|
||||
@item video_size
|
||||
Set the video frame size. Default is the full desktop or window.
|
||||
Set the video frame size. Default is the full desktop.
|
||||
|
||||
@item grab_x
|
||||
@item grab_y
|
||||
|
||||
@@ -20,7 +20,8 @@ Slice threading -
|
||||
|
||||
Frame threading -
|
||||
* Restrictions with slice threading also apply.
|
||||
* Custom get_buffer2() and get_format() callbacks must be thread-safe.
|
||||
* For best performance, the client should set thread_safe_callbacks if it
|
||||
provides a thread-safe get_buffer() callback.
|
||||
* There is one frame of delay added for every thread beyond the first one.
|
||||
Clients must be able to handle this; the pkt_dts and pkt_pts fields in
|
||||
AVFrame will work as usual.
|
||||
|
||||
+7
-47
@@ -89,12 +89,6 @@ specific scenarios, e.g. when merging multiple audio streams into one for
|
||||
compatibility with software that only supports a single audio stream in AVI
|
||||
(see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}).
|
||||
|
||||
@item flipped_raw_rgb
|
||||
If set to true, store positive height for raw RGB bitmaps, which indicates
|
||||
bitmap is stored bottom-up. Note that this option does not flip the bitmap
|
||||
which has to be done manually beforehand, e.g. by using the vflip filter.
|
||||
Default is @var{false} and indicates bitmap is stored top down.
|
||||
|
||||
@end table
|
||||
|
||||
@anchor{chromaprint}
|
||||
@@ -242,8 +236,6 @@ This is a deprecated option to set the segment length in microseconds, use @var{
|
||||
@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}
|
||||
@@ -275,10 +267,8 @@ Override User-Agent field in HTTP header. Applicable only for HTTP output.
|
||||
@item http_persistent @var{http_persistent}
|
||||
Use persistent HTTP connections. Applicable only for HTTP output.
|
||||
@item hls_playlist @var{hls_playlist}
|
||||
Generate HLS playlist files as well. The master playlist is generated with the filename @var{hls_master_name}.
|
||||
Generate HLS playlist files as well. The master playlist is generated with the filename master.m3u8.
|
||||
One media playlist file is generated for each stream with filenames media_0.m3u8, media_1.m3u8, etc.
|
||||
@item hls_master_name @var{file_name}
|
||||
HLS master playlist name. Default is "master.m3u8".
|
||||
@item streaming @var{streaming}
|
||||
Enable (1) or disable (0) chunk streaming mode of output. In chunk streaming
|
||||
mode, each frame will be a moof fragment which forms a chunk.
|
||||
@@ -374,10 +364,6 @@ adjusting playback latency and buffer occupancy during normal playback by client
|
||||
Set the maximum playback rate indicated as appropriate for the purposes of automatically
|
||||
adjusting playback latency and buffer occupancy during normal playback by clients.
|
||||
|
||||
@item update_period @var{update_period}
|
||||
Set the mpd update period ,for dynamic content.
|
||||
The unit is second.
|
||||
|
||||
@end table
|
||||
|
||||
@anchor{framecrc}
|
||||
@@ -611,21 +597,14 @@ segmentation.
|
||||
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 +819,7 @@ When enabled every segment generated is encrypted and the encryption key
|
||||
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 +827,7 @@ If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename
|
||||
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}
|
||||
@@ -868,13 +847,6 @@ fmp4 files may be used in HLS version 7 and above.
|
||||
@item hls_fmp4_init_filename @var{filename}
|
||||
Set filename to the fragment files header file, default filename is @file{init.mp4}.
|
||||
|
||||
Use @code{-strftime 1} on @var{filename} to expand the segment filename with localtime.
|
||||
@example
|
||||
ffmpeg -i in.nut -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8
|
||||
@end example
|
||||
This will produce init like this
|
||||
@file{1602678741_init.mp4}
|
||||
|
||||
@item hls_fmp4_init_resend
|
||||
Resend init file after m3u8 file refresh every time, default is @var{0}.
|
||||
|
||||
@@ -1435,13 +1407,6 @@ disposition default exists, no subtitle track will be marked as default.
|
||||
In this mode the FlagDefault is set if and only if the AV_DISPOSITION_DEFAULT
|
||||
flag is set in the disposition of the corresponding stream.
|
||||
@end table
|
||||
|
||||
@item flipped_raw_rgb
|
||||
If set to true, store positive height for raw RGB bitmaps, which indicates
|
||||
bitmap is stored bottom-up. Note that this option does not flip the bitmap
|
||||
which has to be done manually beforehand, e.g. by using the vflip filter.
|
||||
Default is @var{false} and indicates bitmap is stored top down.
|
||||
|
||||
@end table
|
||||
|
||||
@anchor{md5}
|
||||
@@ -2310,11 +2275,6 @@ certain (usually permanent) errors the recovery is not attempted even when
|
||||
Specify whether to wait for the keyframe after recovering from
|
||||
queue overflow or failure. This option is set to 0 (false) by default.
|
||||
|
||||
@item timeshift @var{duration}
|
||||
Buffer the specified amount of packets and delay writing the output. Note that
|
||||
@var{queue_size} must be big enough to store the packets for timeshift. At the
|
||||
end of the input the fifo buffer is flushed at realtime speed.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
||||
@@ -157,3 +157,4 @@ PFD[32] would for example be signed 32 bit little-endian IEEE float
|
||||
@item XVID @tab non-compliant MPEG-4 generated by old Xvid
|
||||
@item XVIX @tab non-compliant MPEG-4 generated by old Xvid with interlacing bug
|
||||
@end multitable
|
||||
|
||||
|
||||
@@ -38,52 +38,6 @@ ffmpeg -i INPUT -f alsa hw:1,7
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@section AudioToolbox
|
||||
|
||||
AudioToolbox output device.
|
||||
|
||||
Allows native output to CoreAudio devices on OSX.
|
||||
|
||||
The output filename can be empty (or @code{-}) to refer to the default system output device or a number that refers to the device index as shown using: @code{-list_devices true}.
|
||||
|
||||
Alternatively, the audio input device can be chosen by index using the
|
||||
@option{
|
||||
-audio_device_index <INDEX>
|
||||
}
|
||||
, overriding any device name or index given in the input filename.
|
||||
|
||||
All available devices can be enumerated by using @option{-list_devices true}, listing
|
||||
all device names, UIDs and corresponding indices.
|
||||
|
||||
@subsection Options
|
||||
|
||||
AudioToolbox supports the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item -audio_device_index <INDEX>
|
||||
Specify the audio device by its index. Overrides anything given in the output filename.
|
||||
|
||||
@end table
|
||||
|
||||
@subsection Examples
|
||||
|
||||
@itemize
|
||||
|
||||
@item
|
||||
Print the list of supported devices and output a sine wave to the default device:
|
||||
@example
|
||||
$ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -list_devices true -
|
||||
@end example
|
||||
|
||||
@item
|
||||
Output a sine wave to the device with the index 2, overriding any output filename:
|
||||
@example
|
||||
$ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -audio_device_index 2 -
|
||||
@end example
|
||||
|
||||
@end itemize
|
||||
|
||||
@section caca
|
||||
|
||||
CACA output device.
|
||||
|
||||
+10
-116
@@ -63,17 +63,16 @@ After starting the broker, an FFmpeg client may stream data to the broker using
|
||||
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,
|
||||
@@ -110,21 +109,6 @@ the received message may be truncated causing decoding errors.
|
||||
The timeout in seconds during the initial connection to the broker. The
|
||||
default value is rw_timeout, or 5 seconds if rw_timeout is not set.
|
||||
|
||||
@item delivery_mode @var{mode}
|
||||
Sets the delivery mode of each message sent to broker.
|
||||
The following values are accepted:
|
||||
@table @samp
|
||||
@item persistent
|
||||
Delivery mode set to "persistent" (2). This is the default value.
|
||||
Messages may be written to the broker's disk depending on its setup.
|
||||
|
||||
@item non-persistent
|
||||
Delivery mode set to "non-persistent" (1).
|
||||
Messages will stay in broker's memory unless the broker is under memory
|
||||
pressure.
|
||||
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@section async
|
||||
@@ -175,16 +159,6 @@ Caching wrapper for input stream.
|
||||
|
||||
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
|
||||
@@ -341,12 +315,6 @@ operation. ff* tools may produce incomplete content due to server limitations.
|
||||
|
||||
Gopher protocol.
|
||||
|
||||
@section gophers
|
||||
|
||||
Gophers protocol.
|
||||
|
||||
The Gopher protocol with TLS encapsulation.
|
||||
|
||||
@section hls
|
||||
|
||||
Read Apple HTTP Live Streaming compliant segmented stream as
|
||||
@@ -409,6 +377,11 @@ string describing the libavformat build. ("Lavf/<version>")
|
||||
@item user-agent
|
||||
This is a deprecated option, you can use user_agent instead it.
|
||||
|
||||
@item timeout
|
||||
Set timeout in microseconds of socket I/O operations used by the underlying low level
|
||||
operation. By default it is set to -1, which means that the timeout is
|
||||
not specified.
|
||||
|
||||
@item reconnect_at_eof
|
||||
If set then eof is treated like an error and causes reconnection, this is useful
|
||||
for live / endless streams.
|
||||
@@ -416,13 +389,6 @@ for live / endless streams.
|
||||
@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
|
||||
|
||||
@@ -500,28 +466,6 @@ Send an Expect: 100-continue header for POST. If set to 1 it will send, if set
|
||||
to 0 it won't, if set to -1 it will try to send if it is applicable. Default
|
||||
value is -1.
|
||||
|
||||
@item auth_type
|
||||
|
||||
Set HTTP authentication type. No option for Digest, since this method requires
|
||||
getting nonce parameters from the server first and can't be used straight away like
|
||||
Basic.
|
||||
|
||||
@table @option
|
||||
@item none
|
||||
Choose the HTTP authentication type automatically. This is the default.
|
||||
@item basic
|
||||
|
||||
Choose the HTTP basic authentication.
|
||||
|
||||
Basic authentication sends a Base64-encoded string that contains a user name and password
|
||||
for the client. Base64 is not a form of encryption and should be considered the same as
|
||||
sending the user name and password in clear text (Base64 is a reversible encoding).
|
||||
If a resource needs to be protected, strongly consider using an authentication scheme
|
||||
other than basic authentication. HTTPS/TLS should be used with basic authentication.
|
||||
Without these additional security enhancements, basic authentication should not be used
|
||||
to protect sensitive or valuable information.
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@subsection HTTP Cookies
|
||||
@@ -576,9 +520,6 @@ audio/mpeg.
|
||||
This enables support for Icecast versions < 2.4.0, that do not support the
|
||||
HTTP PUT method but the SOURCE method.
|
||||
|
||||
@item tls
|
||||
Establish a TLS (HTTPS) connection to Icecast.
|
||||
|
||||
@end table
|
||||
|
||||
@example
|
||||
@@ -696,42 +637,6 @@ Example usage:
|
||||
-f rtp_mpegts -fec prompeg=l=8:d=4 rtp://@var{hostname}:@var{port}
|
||||
@end example
|
||||
|
||||
@section rist
|
||||
|
||||
Reliable Internet Streaming Transport protocol
|
||||
|
||||
The accepted options are:
|
||||
@table @option
|
||||
@item rist_profile
|
||||
Supported values:
|
||||
@table @samp
|
||||
@item simple
|
||||
@item main
|
||||
This one is default.
|
||||
@item advanced
|
||||
@end table
|
||||
|
||||
@item buffer_size
|
||||
Set internal RIST buffer size in milliseconds for retransmission of data.
|
||||
Default value is 0 which means the librist default (1 sec). Maximum value is 30
|
||||
seconds.
|
||||
|
||||
@item pkt_size
|
||||
Set maximum packet size for sending data. 1316 by default.
|
||||
|
||||
@item log_level
|
||||
Set loglevel for RIST logging messages. You only need to set this if you
|
||||
explicitly want to enable debug level messages or packet loss simulation,
|
||||
otherwise the regular loglevel is respected.
|
||||
|
||||
@item secret
|
||||
Set override of encryption secret, by default is unset.
|
||||
|
||||
@item encryption
|
||||
Set encryption type, by default is disabled.
|
||||
Acceptable values are 128 and 256.
|
||||
@end table
|
||||
|
||||
@section rtmp
|
||||
|
||||
Real-Time Messaging Protocol.
|
||||
@@ -1033,9 +938,6 @@ Set the local RTCP port to @var{n}.
|
||||
@item pkt_size=@var{n}
|
||||
Set max packet size (in bytes) to @var{n}.
|
||||
|
||||
@item buffer_size=@var{size}
|
||||
Set the maximum UDP socket buffer size in bytes.
|
||||
|
||||
@item connect=0|1
|
||||
Do a @code{connect()} on the UDP socket (if set to 1) or not (if set
|
||||
to 0).
|
||||
@@ -1053,9 +955,6 @@ set to 1) or to a default remote address (if set to 0).
|
||||
@item localport=@var{n}
|
||||
Set the local RTP port to @var{n}.
|
||||
|
||||
@item timeout=@var{n}
|
||||
Set timeout (in microseconds) of socket I/O operations to @var{n}.
|
||||
|
||||
This is a deprecated option. Instead, @option{localrtpport} should be
|
||||
used.
|
||||
|
||||
@@ -1697,9 +1596,8 @@ tcp://@var{hostname}:@var{port}[?@var{options}]
|
||||
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.
|
||||
@@ -1775,10 +1673,6 @@ A file containing the private key for the certificate.
|
||||
If enabled, listen for connections on the provided port, and assume
|
||||
the server role in the handshake instead of the client role.
|
||||
|
||||
@item http_proxy
|
||||
The HTTP proxy to tunnel through, e.g. @code{http://example.com:1234}.
|
||||
The proxy must support the CONNECT method.
|
||||
|
||||
@end table
|
||||
|
||||
Example command lines:
|
||||
|
||||
+19
-103
@@ -20,45 +20,8 @@
|
||||
# License along with FFmpeg; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Texinfo 7.0 changed the syntax of various functions.
|
||||
# Provide a shim for older versions.
|
||||
sub ff_set_from_init_file($$) {
|
||||
my $key = shift;
|
||||
my $value = shift;
|
||||
if (exists &{'texinfo_set_from_init_file'}) {
|
||||
texinfo_set_from_init_file($key, $value);
|
||||
} else {
|
||||
set_from_init_file($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
sub ff_get_conf($) {
|
||||
my $key = shift;
|
||||
if (exists &{'texinfo_get_conf'}) {
|
||||
texinfo_get_conf($key);
|
||||
} else {
|
||||
get_conf($key);
|
||||
}
|
||||
}
|
||||
|
||||
sub get_formatting_function($$) {
|
||||
my $obj = shift;
|
||||
my $func = shift;
|
||||
|
||||
my $sub = $obj->can('formatting_function');
|
||||
if ($sub) {
|
||||
return $obj->formatting_function($func);
|
||||
} else {
|
||||
return $obj->{$func};
|
||||
}
|
||||
}
|
||||
|
||||
# determine texinfo version
|
||||
my $program_version_num = version->declare(ff_get_conf('PACKAGE_VERSION'))->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# no navigation elements
|
||||
ff_set_from_init_file('HEADERS', 0);
|
||||
set_from_init_file('HEADERS', 0);
|
||||
|
||||
sub ffmpeg_heading_command($$$$$)
|
||||
{
|
||||
@@ -92,7 +55,7 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$element = $command->{'parent'};
|
||||
}
|
||||
if ($element) {
|
||||
$result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname,
|
||||
$result .= &{$self->{'format_element_header'}}($self, $cmdname,
|
||||
$command, $element);
|
||||
}
|
||||
|
||||
@@ -149,11 +112,7 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$cmdname
|
||||
= $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level];
|
||||
}
|
||||
# format_heading_text expects an array of headings for texinfo >= 7.0
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$heading = [$heading];
|
||||
}
|
||||
$result .= &{get_formatting_function($self,'format_heading_text')}(
|
||||
$result .= &{$self->{'format_heading_text'}}(
|
||||
$self, $cmdname, $heading,
|
||||
$heading_level +
|
||||
$self->get_conf('CHAPTER_HEADER_LEVEL') - 1, $command);
|
||||
@@ -168,18 +127,14 @@ foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') {
|
||||
}
|
||||
|
||||
# print the TOC where @contents is used
|
||||
if ($program_version_6_8) {
|
||||
ff_set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
|
||||
} else {
|
||||
ff_set_from_init_file('INLINE_CONTENTS', 1);
|
||||
}
|
||||
set_from_init_file('INLINE_CONTENTS', 1);
|
||||
|
||||
# make chapters <h2>
|
||||
ff_set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
|
||||
# Do not add <hr>
|
||||
ff_set_from_init_file('DEFAULT_RULE', '');
|
||||
ff_set_from_init_file('BIG_RULE', '');
|
||||
set_from_init_file('DEFAULT_RULE', '');
|
||||
set_from_init_file('BIG_RULE', '');
|
||||
|
||||
# Customized file beginning
|
||||
sub ffmpeg_begin_file($$$)
|
||||
@@ -196,18 +151,7 @@ sub ffmpeg_begin_file($$$)
|
||||
my ($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator);
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_information($command);
|
||||
} else {
|
||||
($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
}
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
|
||||
my $links = $self->_get_links ($filename, $element);
|
||||
|
||||
@@ -240,11 +184,7 @@ EOT
|
||||
|
||||
return $head1 . $head_title . $head2 . $head_title . $head3;
|
||||
}
|
||||
if ($program_version_6_8) {
|
||||
texinfo_register_formatting_function('format_begin_file', \&ffmpeg_begin_file);
|
||||
} else {
|
||||
texinfo_register_formatting_function('begin_file', \&ffmpeg_begin_file);
|
||||
}
|
||||
texinfo_register_formatting_function('begin_file', \&ffmpeg_begin_file);
|
||||
|
||||
sub ffmpeg_program_string($)
|
||||
{
|
||||
@@ -261,17 +201,13 @@ sub ffmpeg_program_string($)
|
||||
$self->gdt('This document was generated automatically.'));
|
||||
}
|
||||
}
|
||||
if ($program_version_6_8) {
|
||||
texinfo_register_formatting_function('format_program_string', \&ffmpeg_program_string);
|
||||
} else {
|
||||
texinfo_register_formatting_function('program_string', \&ffmpeg_program_string);
|
||||
}
|
||||
texinfo_register_formatting_function('program_string', \&ffmpeg_program_string);
|
||||
|
||||
# Customized file ending
|
||||
sub ffmpeg_end_file($)
|
||||
{
|
||||
my $self = shift;
|
||||
my $program_string = &{get_formatting_function($self,'format_program_string')}($self);
|
||||
my $program_string = &{$self->{'format_program_string'}}($self);
|
||||
my $program_text = <<EOT;
|
||||
<p style="font-size: small;">
|
||||
$program_string
|
||||
@@ -284,15 +220,11 @@ EOT
|
||||
EOT
|
||||
return $program_text . $footer;
|
||||
}
|
||||
if ($program_version_6_8) {
|
||||
texinfo_register_formatting_function('format_end_file', \&ffmpeg_end_file);
|
||||
} else {
|
||||
texinfo_register_formatting_function('end_file', \&ffmpeg_end_file);
|
||||
}
|
||||
texinfo_register_formatting_function('end_file', \&ffmpeg_end_file);
|
||||
|
||||
# Dummy title command
|
||||
# Ignore title. Title is handled through ffmpeg_begin_file().
|
||||
ff_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
sub ffmpeg_title($$$$)
|
||||
{
|
||||
return '';
|
||||
@@ -310,14 +242,8 @@ sub ffmpeg_float($$$$$)
|
||||
my $args = shift;
|
||||
my $content = shift;
|
||||
|
||||
my ($caption, $prepended);
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($caption, $prepended) = Texinfo::Convert::Converter::float_name_caption($self,
|
||||
$command);
|
||||
} else {
|
||||
($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
}
|
||||
my ($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
my $caption_text = '';
|
||||
my $prepended_text;
|
||||
my $prepended_save = '';
|
||||
@@ -389,13 +315,8 @@ sub ffmpeg_float($$$$$)
|
||||
$caption->{'args'}->[0], 'float caption');
|
||||
}
|
||||
if ($prepended_text.$caption_text ne '') {
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$prepended_text = $self->html_attribute_class('div',['float-caption']). '>'
|
||||
. $prepended_text;
|
||||
} else {
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
}
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
$caption_text .= '</div>';
|
||||
}
|
||||
my $html_class = '';
|
||||
@@ -408,13 +329,8 @@ sub ffmpeg_float($$$$$)
|
||||
$prepended_text = '';
|
||||
$caption_text = '';
|
||||
}
|
||||
if ($program_version_num >= 7.000000) {
|
||||
return $self->html_attribute_class('div', [$html_class]). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
} else {
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
}
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
}
|
||||
|
||||
texinfo_register_command_formatting('float',
|
||||
|
||||
Executable → Regular
-9
@@ -172,9 +172,6 @@ INF: while(<$inf>) {
|
||||
} elsif ($ended =~ /^(?:itemize|enumerate|(?:multi|[fv])?table)$/) {
|
||||
$_ = "\n=back\n";
|
||||
$ic = pop @icstack;
|
||||
} elsif ($ended =~ /^float$/) {
|
||||
$_ = "\n=back\n";
|
||||
$ic = pop @icstack;
|
||||
} else {
|
||||
die "unknown command \@end $ended at line $.\n";
|
||||
}
|
||||
@@ -300,12 +297,6 @@ INF: while(<$inf>) {
|
||||
$_ = ""; # need a paragraph break
|
||||
};
|
||||
|
||||
/^\@(float)\s+\w+/ and do {
|
||||
push @endwstack, $endw;
|
||||
$endw = $1;
|
||||
$_ = "\n=over 4\n";
|
||||
};
|
||||
|
||||
/^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do {
|
||||
my $columns = $1;
|
||||
$columns =~ s/\@tab/ : /;
|
||||
|
||||
Executable → Regular
@@ -44,3 +44,4 @@ a+b*c;
|
||||
here the reader knows that a,b,c are meant to be signed integers but for C
|
||||
standard compliance / to avoid undefined behavior they are stored in unsigned
|
||||
ints.
|
||||
|
||||
|
||||
+2
-4
@@ -110,13 +110,11 @@ maximum of 2 digits. The @var{m} at the end expresses decimal value for
|
||||
@emph{or}
|
||||
|
||||
@example
|
||||
[-]@var{S}+[.@var{m}...][s|ms|us]
|
||||
[-]@var{S}+[.@var{m}...]
|
||||
@end example
|
||||
|
||||
@var{S} expresses the number of seconds, with the optional decimal part
|
||||
@var{m}. The optional literal suffixes @samp{s}, @samp{ms} or @samp{us}
|
||||
indicate to interpret the value as seconds, milliseconds or microseconds,
|
||||
respectively.
|
||||
@var{m}.
|
||||
|
||||
In both expressions, the optional @samp{-} indicates negative duration.
|
||||
|
||||
|
||||
@@ -418,4 +418,4 @@ done:
|
||||
|
||||
When all of this is done, you can submit your patch to the ffmpeg-devel
|
||||
mailing-list for review. If you need any help, feel free to come on our IRC
|
||||
channel, #ffmpeg-devel on irc.libera.chat.
|
||||
channel, #ffmpeg-devel on irc.freenode.net.
|
||||
|
||||
+3
-11
@@ -44,7 +44,7 @@ LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
|
||||
|
||||
define COMPILE
|
||||
$(call $(1)DEP,$(1))
|
||||
$($(1)) $($(1)FLAGS) $($(2)) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
|
||||
$($(1)) $($(1)FLAGS) $($(1)_DEPFLAGS) $($(1)_C) $($(1)_O) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<)
|
||||
endef
|
||||
|
||||
COMPILE_C = $(call COMPILE,CC)
|
||||
@@ -54,14 +54,6 @@ COMPILE_M = $(call COMPILE,OBJCC)
|
||||
COMPILE_X86ASM = $(call COMPILE,X86ASM)
|
||||
COMPILE_HOSTC = $(call COMPILE,HOSTCC)
|
||||
COMPILE_NVCC = $(call COMPILE,NVCC)
|
||||
COMPILE_MMI = $(call COMPILE,CC,MMIFLAGS)
|
||||
COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
|
||||
|
||||
%_mmi.o: %_mmi.c
|
||||
$(COMPILE_MMI)
|
||||
|
||||
%_msa.o: %_msa.c
|
||||
$(COMPILE_MSA)
|
||||
|
||||
%.o: %.c
|
||||
$(COMPILE_C)
|
||||
@@ -90,7 +82,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
|
||||
-$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)
|
||||
|
||||
%.o: %.rc
|
||||
$(WINDRES) $(IFLAGS) $(foreach ARG,$(CC_DEPFLAGS),--preprocessor-arg "$(ARG)") -o $@ $<
|
||||
$(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $<
|
||||
|
||||
%.i: %.c
|
||||
$(CC) $(CCFLAGS) $(CC_E) $<
|
||||
@@ -107,7 +99,7 @@ COMPILE_MSA = $(call COMPILE,CC,MSAFLAGS)
|
||||
%.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,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
toupper(){
|
||||
echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
}
|
||||
|
||||
+17
-17
@@ -202,22 +202,23 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
|
||||
void show_help_children(const AVClass *class, int flags)
|
||||
{
|
||||
void *iter = NULL;
|
||||
const AVClass *child;
|
||||
const AVClass *child = NULL;
|
||||
if (class->option) {
|
||||
av_opt_show2(&class, NULL, flags, 0);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
while (child = av_opt_child_class_iterate(class, &iter))
|
||||
while (child = av_opt_child_class_next(class, child))
|
||||
show_help_children(child, flags);
|
||||
}
|
||||
|
||||
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++;
|
||||
}
|
||||
@@ -537,7 +538,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
||||
return o;
|
||||
}
|
||||
|
||||
#define FLAGS ((o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0)
|
||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0
|
||||
int opt_default(void *optctx, const char *opt, const char *arg)
|
||||
{
|
||||
const AVOption *o;
|
||||
@@ -1163,13 +1164,13 @@ static void print_buildconf(int flags, int level)
|
||||
// Change all the ' --' strings to '~--' so that
|
||||
// they can be identified as tokens.
|
||||
while ((conflist = strstr(str, " --")) != NULL) {
|
||||
conflist[0] = '~';
|
||||
strncpy(conflist, "~--", 3);
|
||||
}
|
||||
|
||||
// Compensate for the weirdness this would cause
|
||||
// when passing 'pkg-config --static'.
|
||||
while ((remove_tilde = strstr(str, "pkg-config~")) != NULL) {
|
||||
remove_tilde[sizeof("pkg-config~") - 2] = ' ';
|
||||
strncpy(remove_tilde, "pkg-config ", 11);
|
||||
}
|
||||
|
||||
splitconf = strtok(str, "~");
|
||||
@@ -1415,7 +1416,7 @@ static void print_codec(const AVCodec *c)
|
||||
printf("variable ");
|
||||
if (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS |
|
||||
AV_CODEC_CAP_SLICE_THREADS |
|
||||
AV_CODEC_CAP_OTHER_THREADS))
|
||||
AV_CODEC_CAP_AUTO_THREADS))
|
||||
printf("threads ");
|
||||
if (c->capabilities & AV_CODEC_CAP_AVOID_PROBING)
|
||||
printf("avoidprobe ");
|
||||
@@ -1432,12 +1433,12 @@ static void print_codec(const AVCodec *c)
|
||||
printf(" Threading capabilities: ");
|
||||
switch (c->capabilities & (AV_CODEC_CAP_FRAME_THREADS |
|
||||
AV_CODEC_CAP_SLICE_THREADS |
|
||||
AV_CODEC_CAP_OTHER_THREADS)) {
|
||||
AV_CODEC_CAP_AUTO_THREADS)) {
|
||||
case AV_CODEC_CAP_FRAME_THREADS |
|
||||
AV_CODEC_CAP_SLICE_THREADS: printf("frame and slice"); break;
|
||||
case AV_CODEC_CAP_FRAME_THREADS: printf("frame"); break;
|
||||
case AV_CODEC_CAP_SLICE_THREADS: printf("slice"); break;
|
||||
case AV_CODEC_CAP_OTHER_THREADS: printf("other"); break;
|
||||
case AV_CODEC_CAP_AUTO_THREADS : printf("auto"); break;
|
||||
default: printf("none"); break;
|
||||
}
|
||||
printf("\n");
|
||||
@@ -2101,7 +2102,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
|
||||
}
|
||||
|
||||
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 +2131,6 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
|
||||
}
|
||||
|
||||
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 +2143,8 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
|
||||
|
||||
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 &&
|
||||
@@ -2307,7 +2307,7 @@ int show_sources(void *optctx, const char *opt, const char *arg)
|
||||
int ret = 0;
|
||||
int error_level = av_log_get_level();
|
||||
|
||||
av_log_set_level(AV_LOG_WARNING);
|
||||
av_log_set_level(AV_LOG_ERROR);
|
||||
|
||||
if ((ret = show_sinks_sources_parse_arg(arg, &dev, &opts)) < 0)
|
||||
goto fail;
|
||||
@@ -2345,7 +2345,7 @@ int show_sinks(void *optctx, const char *opt, const char *arg)
|
||||
int ret = 0;
|
||||
int error_level = av_log_get_level();
|
||||
|
||||
av_log_set_level(AV_LOG_WARNING);
|
||||
av_log_set_level(AV_LOG_ERROR);
|
||||
|
||||
if ((ret = show_sinks_sources_parse_arg(arg, &dev, &opts)) < 0)
|
||||
goto fail;
|
||||
|
||||
+1
-1
@@ -414,7 +414,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
|
||||
* @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().
|
||||
|
||||
+257
-398
File diff suppressed because it is too large
Load Diff
+10
-26
@@ -93,7 +93,6 @@ typedef struct {
|
||||
|
||||
typedef struct OptionsContext {
|
||||
OptionGroup *g;
|
||||
int depth;
|
||||
|
||||
/* input/output options */
|
||||
int64_t start_time;
|
||||
@@ -109,8 +108,6 @@ typedef struct OptionsContext {
|
||||
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;
|
||||
@@ -218,8 +215,6 @@ typedef struct OptionsContext {
|
||||
int nb_passlogfiles;
|
||||
SpecifierOpt *max_muxing_queue_size;
|
||||
int nb_max_muxing_queue_size;
|
||||
SpecifierOpt *muxing_queue_data_threshold;
|
||||
int nb_muxing_queue_data_threshold;
|
||||
SpecifierOpt *guess_layout_max;
|
||||
int nb_guess_layout_max;
|
||||
SpecifierOpt *apad;
|
||||
@@ -234,8 +229,6 @@ typedef struct OptionsContext {
|
||||
int nb_time_bases;
|
||||
SpecifierOpt *enc_time_bases;
|
||||
int nb_enc_time_bases;
|
||||
SpecifierOpt *autoscale;
|
||||
int nb_autoscale;
|
||||
} OptionsContext;
|
||||
|
||||
typedef struct InputFilter {
|
||||
@@ -308,10 +301,9 @@ typedef struct InputStream {
|
||||
#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 */
|
||||
AVPacket *pkt;
|
||||
|
||||
int64_t start; /* time when read started */
|
||||
/* predicted dts of the next packet read for this stream or (when there are
|
||||
@@ -420,8 +412,6 @@ typedef struct InputFile {
|
||||
int rate_emu;
|
||||
int accurate_seek;
|
||||
|
||||
AVPacket *pkt;
|
||||
|
||||
#if HAVE_THREADS
|
||||
AVThreadMessageQueue *in_thread_queue;
|
||||
pthread_t thread; /* thread reading from this file */
|
||||
@@ -474,11 +464,10 @@ typedef struct OutputStream {
|
||||
|
||||
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;
|
||||
AVPacket *pkt;
|
||||
int last_dropped;
|
||||
int last_nb0_frames[3];
|
||||
|
||||
@@ -486,12 +475,10 @@ typedef struct OutputStream {
|
||||
|
||||
/* video only */
|
||||
AVRational frame_rate;
|
||||
AVRational max_frame_rate;
|
||||
int is_cfr;
|
||||
int force_fps;
|
||||
int top_field_first;
|
||||
int rotate_overridden;
|
||||
int autoscale;
|
||||
double rotate_override_value;
|
||||
|
||||
AVRational frame_aspect_ratio;
|
||||
@@ -557,15 +544,6 @@ typedef struct OutputStream {
|
||||
/* the packets are buffered here until the muxer is ready to be initialized */
|
||||
AVFifoBuffer *muxing_queue;
|
||||
|
||||
/*
|
||||
* The size of the AVPackets' buffers in queue.
|
||||
* Updated when a packet is either pushed or pulled from the queue.
|
||||
*/
|
||||
size_t muxing_queue_data_size;
|
||||
|
||||
/* Threshold after which max_muxing_queue_size will be in effect */
|
||||
size_t muxing_queue_data_threshold;
|
||||
|
||||
/* packet picture type */
|
||||
int pict_type;
|
||||
|
||||
@@ -622,7 +600,6 @@ extern int debug_ts;
|
||||
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;
|
||||
@@ -633,7 +610,6 @@ extern char *videotoolbox_pixfmt;
|
||||
extern int filter_nbthreads;
|
||||
extern int filter_complex_nbthreads;
|
||||
extern int vstats_version;
|
||||
extern int auto_conversion_filters;
|
||||
|
||||
extern const AVIOInterruptCB int_cb;
|
||||
|
||||
@@ -648,15 +624,23 @@ extern HWDevice *filter_hw_device;
|
||||
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, AVCodec *codec, enum AVPixelFormat target);
|
||||
void choose_sample_fmt(AVStream *st, 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);
|
||||
|
||||
+43
-8
@@ -60,8 +60,7 @@ static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodec
|
||||
}
|
||||
}
|
||||
|
||||
static enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx,
|
||||
const AVCodec *codec, enum AVPixelFormat target)
|
||||
enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCodec *codec, enum AVPixelFormat target)
|
||||
{
|
||||
if (codec && codec->pix_fmts) {
|
||||
const enum AVPixelFormat *p = codec->pix_fmts;
|
||||
@@ -74,7 +73,7 @@ static enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx
|
||||
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 +90,29 @@ static enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx
|
||||
return target;
|
||||
}
|
||||
|
||||
void choose_sample_fmt(AVStream *st, 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;
|
||||
@@ -448,7 +470,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if ((ofilter->width || ofilter->height) && ofilter->ost->autoscale) {
|
||||
if (ofilter->width || ofilter->height) {
|
||||
char args[255];
|
||||
AVFilterContext *filter;
|
||||
AVDictionaryEntry *e = NULL;
|
||||
@@ -618,6 +640,13 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
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 +674,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
||||
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);
|
||||
@@ -1076,8 +1104,6 @@ int configure_filtergraph(FilterGraph *fg)
|
||||
configure_output_filter(fg, fg->outputs[i], cur);
|
||||
avfilter_inout_free(&outputs);
|
||||
|
||||
if (!auto_conversion_filters)
|
||||
avfilter_graph_set_auto_convert(fg->graph, AVFILTER_AUTO_CONVERT_NONE);
|
||||
if ((ret = avfilter_graph_config(fg->graph, NULL)) < 0)
|
||||
goto fail;
|
||||
|
||||
@@ -1177,6 +1203,15 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame)
|
||||
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;
|
||||
|
||||
+66
-132
@@ -51,50 +51,47 @@
|
||||
#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_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_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)\
|
||||
{\
|
||||
@@ -174,8 +171,6 @@ float max_error_rate = 2.0/3;
|
||||
int filter_nbthreads = 0;
|
||||
int filter_complex_nbthreads = 0;
|
||||
int vstats_version = 2;
|
||||
int auto_conversion_filters = 1;
|
||||
int64_t stats_period = 500000;
|
||||
|
||||
|
||||
static int intra_only = 0;
|
||||
@@ -232,7 +227,6 @@ static void init_options(OptionsContext *o)
|
||||
o->limit_filesize = UINT64_MAX;
|
||||
o->chapters_input_file = INT_MAX;
|
||||
o->accurate_seek = 1;
|
||||
o->thread_queue_size = -1;
|
||||
}
|
||||
|
||||
static int show_hwaccels(void *optctx, const char *opt, const char *arg)
|
||||
@@ -284,21 +278,6 @@ static int opt_abort_on(void *optctx, const char *opt, const char *arg)
|
||||
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. "
|
||||
@@ -414,8 +393,6 @@ static int opt_map(void *optctx, const char *opt, const char *arg)
|
||||
for (i = 0; i < o->nb_stream_maps; i++) {
|
||||
m = &o->stream_maps[i];
|
||||
if (file_idx == m->file_index &&
|
||||
m->stream_index >= 0 &&
|
||||
m->stream_index < input_files[m->file_index]->nb_streams &&
|
||||
check_stream_specifier(input_files[m->file_index]->ctx,
|
||||
input_files[m->file_index]->ctx->streams[m->stream_index],
|
||||
*p == ':' ? p + 1 : p) > 0)
|
||||
@@ -768,13 +745,13 @@ static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int e
|
||||
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
|
||||
@@ -870,6 +847,15 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
|
||||
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;
|
||||
@@ -1282,11 +1268,8 @@ static int open_input_file(OptionsContext *o, const char *filename)
|
||||
f->loop = o->loop;
|
||||
f->duration = 0;
|
||||
f->time_base = (AVRational){ 1, 1 };
|
||||
f->pkt = av_packet_alloc();
|
||||
if (!f->pkt)
|
||||
exit_program(1);
|
||||
#if HAVE_THREADS
|
||||
f->thread_queue_size = o->thread_queue_size;
|
||||
f->thread_queue_size = o->thread_queue_size > 0 ? o->thread_queue_size : 8;
|
||||
#endif
|
||||
|
||||
/* check if all codec options have been used */
|
||||
@@ -1479,8 +1462,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||
ost->encoder_opts = filter_codec_opts(o->g->codec_opts, ost->enc->id, oc, st, ost->enc);
|
||||
|
||||
MATCH_PER_STREAM_OPT(presets, str, preset, oc, st);
|
||||
ost->autoscale = 1;
|
||||
MATCH_PER_STREAM_OPT(autoscale, i, ost->autoscale, oc, st);
|
||||
if (preset && (!(ret = get_preset_file_2(preset, ost->enc->name, &s)))) {
|
||||
do {
|
||||
buf = get_line(s);
|
||||
@@ -1576,12 +1557,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e
|
||||
|
||||
ost->max_muxing_queue_size = 128;
|
||||
MATCH_PER_STREAM_OPT(max_muxing_queue_size, i, ost->max_muxing_queue_size, oc, st);
|
||||
ost->max_muxing_queue_size *= sizeof(ost->pkt);
|
||||
|
||||
ost->muxing_queue_data_size = 0;
|
||||
|
||||
ost->muxing_queue_data_threshold = 50*1024*1024;
|
||||
MATCH_PER_STREAM_OPT(muxing_queue_data_threshold, i, ost->muxing_queue_data_threshold, oc, st);
|
||||
ost->max_muxing_queue_size *= sizeof(AVPacket);
|
||||
|
||||
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
|
||||
ost->enc_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
@@ -1694,7 +1670,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
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;
|
||||
@@ -1705,21 +1681,8 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
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) {
|
||||
@@ -1918,7 +1881,6 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
|
||||
if (!ost->stream_copy) {
|
||||
char *sample_fmt = NULL;
|
||||
const char *apad = NULL;
|
||||
|
||||
MATCH_PER_STREAM_OPT(audio_channels, i, audio_enc->channels, oc, st);
|
||||
|
||||
@@ -1931,12 +1893,8 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
|
||||
MATCH_PER_STREAM_OPT(audio_sample_rate, i, audio_enc->sample_rate, oc, st);
|
||||
|
||||
MATCH_PER_STREAM_OPT(apad, str, apad, oc, st);
|
||||
if (apad) {
|
||||
ost->apad = av_strdup(apad);
|
||||
if (!ost->apad)
|
||||
exit_program(1);
|
||||
}
|
||||
MATCH_PER_STREAM_OPT(apad, str, ost->apad, oc, st);
|
||||
ost->apad = av_strdup(ost->apad);
|
||||
|
||||
ost->avfilter = get_ost_filters(o, oc, ost);
|
||||
if (!ost->avfilter)
|
||||
@@ -2247,23 +2205,22 @@ static int open_output_file(OptionsContext *o, const char *filename)
|
||||
|
||||
/* video: highest resolution */
|
||||
if (!o->video_disable && av_guess_codec(oc->oformat, NULL, filename, NULL, AVMEDIA_TYPE_VIDEO) != AV_CODEC_ID_NONE) {
|
||||
int best_score = 0, idx = -1;
|
||||
int area = 0, idx = -1;
|
||||
int qcr = avformat_query_codec(oc->oformat, oc->oformat->video_codec, 0);
|
||||
for (i = 0; i < nb_input_streams; i++) {
|
||||
int score;
|
||||
int new_area;
|
||||
ist = input_streams[i];
|
||||
score = ist->st->codecpar->width * ist->st->codecpar->height
|
||||
+ 100000000 * !!(ist->st->event_flags & AVSTREAM_EVENT_FLAG_NEW_PACKETS)
|
||||
new_area = ist->st->codecpar->width * ist->st->codecpar->height + 100000000*!!ist->st->codec_info_nb_frames
|
||||
+ 5000000*!!(ist->st->disposition & AV_DISPOSITION_DEFAULT);
|
||||
if (ist->user_set_discard == AVDISCARD_ALL)
|
||||
continue;
|
||||
if((qcr!=MKTAG('A', 'P', 'I', 'C')) && (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
|
||||
score = 1;
|
||||
new_area = 1;
|
||||
if (ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO &&
|
||||
score > best_score) {
|
||||
new_area > area) {
|
||||
if((qcr==MKTAG('A', 'P', 'I', 'C')) && !(ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC))
|
||||
continue;
|
||||
best_score = score;
|
||||
area = new_area;
|
||||
idx = i;
|
||||
}
|
||||
}
|
||||
@@ -2665,9 +2622,6 @@ loop_end:
|
||||
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++) {
|
||||
@@ -3021,12 +2975,6 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
|
||||
FILE *f=NULL;
|
||||
char filename[1000], line[1000], tmp_line[1000];
|
||||
const char *codec_name = NULL;
|
||||
int depth = o->depth;
|
||||
|
||||
if (depth > 2) {
|
||||
av_log(NULL, AV_LOG_ERROR, "too deep recursion\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
tmp_line[0] = *opt;
|
||||
tmp_line[1] = 0;
|
||||
@@ -3040,7 +2988,6 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
|
||||
exit_program(1);
|
||||
}
|
||||
|
||||
o->depth ++;
|
||||
while (fgets(line, sizeof(line), f)) {
|
||||
char *key = tmp_line, *value, *endptr;
|
||||
|
||||
@@ -3065,7 +3012,6 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
|
||||
}
|
||||
}
|
||||
|
||||
o->depth = depth;
|
||||
fclose(f);
|
||||
|
||||
return 0;
|
||||
@@ -3595,12 +3541,8 @@ const OptionDef options[] = {
|
||||
"create a complex filtergraph", "graph_description" },
|
||||
{ "filter_complex_script", HAS_ARG | OPT_EXPERT, { .func_arg = opt_filter_complex_script },
|
||||
"read complex filtergraph description from a file", "filename" },
|
||||
{ "auto_conversion_filters", OPT_BOOL | OPT_EXPERT, { &auto_conversion_filters },
|
||||
"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" },
|
||||
@@ -3612,7 +3554,7 @@ const OptionDef options[] = {
|
||||
{ "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", "" },
|
||||
@@ -3631,9 +3573,6 @@ const OptionDef options[] = {
|
||||
{ "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" },
|
||||
@@ -3725,9 +3664,6 @@ const OptionDef options[] = {
|
||||
{ "autorotate", HAS_ARG | OPT_BOOL | OPT_SPEC |
|
||||
OPT_EXPERT | OPT_INPUT, { .off = OFFSET(autorotate) },
|
||||
"automatically insert correct rotate filters" },
|
||||
{ "autoscale", HAS_ARG | OPT_BOOL | OPT_SPEC |
|
||||
OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(autoscale) },
|
||||
"automatically insert a scale filter at the end of the filter graph" },
|
||||
|
||||
/* audio options */
|
||||
{ "aframes", OPT_AUDIO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_audio_frames },
|
||||
@@ -3814,8 +3750,6 @@ const OptionDef options[] = {
|
||||
|
||||
{ "max_muxing_queue_size", HAS_ARG | OPT_INT | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(max_muxing_queue_size) },
|
||||
"maximum number of packets that can be buffered while waiting for all streams to initialize", "packets" },
|
||||
{ "muxing_queue_data_threshold", HAS_ARG | OPT_INT | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT, { .off = OFFSET(muxing_queue_data_threshold) },
|
||||
"set the threshold after which max_muxing_queue_size is taken into account", "bytes" },
|
||||
|
||||
/* data codec support */
|
||||
{ "dcodec", HAS_ARG | OPT_DATA | OPT_PERFILE | OPT_EXPERT | OPT_INPUT | OPT_OUTPUT, { .func_arg = opt_data_codec },
|
||||
|
||||
+134
-133
@@ -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 @@ const int program_birth_year = 2003;
|
||||
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 @@ enum {
|
||||
};
|
||||
|
||||
typedef struct Decoder {
|
||||
AVPacket *pkt;
|
||||
AVPacket pkt;
|
||||
PacketQueue *queue;
|
||||
AVCodecContext *avctx;
|
||||
int pkt_serial;
|
||||
@@ -361,6 +361,8 @@ static int filter_nbthreads = 0;
|
||||
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 @@ int64_t get_valid_channel_layout(int64_t channel_layout, int channels)
|
||||
|
||||
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_private(PacketQueue *q, AVPacket *pkt)
|
||||
|
||||
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_put_nullpacket(PacketQueue *q, AVPacket *pkt, int stream
|
||||
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 int packet_queue_init(PacketQueue *q)
|
||||
|
||||
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 @@ static void packet_queue_start(PacketQueue *q)
|
||||
{
|
||||
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 @@ static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block, int *seria
|
||||
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 @@ static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block, int *seria
|
||||
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 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
|
||||
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 @@ static void video_audio_display(VideoState *s)
|
||||
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 @@ static void video_audio_display(VideoState *s)
|
||||
}
|
||||
if (!s->paused)
|
||||
s->xpos++;
|
||||
if (s->xpos >= s->width)
|
||||
s->xpos= s->xleft;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1644,37 +1647,37 @@ retry:
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -2005,7 +2008,7 @@ static int configure_audio_filters(VideoState *is, const char *afilters, int for
|
||||
|
||||
if (force_output_format) {
|
||||
channel_layouts[0] = is->audio_tgt.channel_layout;
|
||||
channels [0] = is->audio_tgt.channel_layout ? -1 : is->audio_tgt.channels;
|
||||
channels [0] = is->audio_tgt.channels;
|
||||
sample_rates [0] = is->audio_tgt.freq;
|
||||
if ((ret = av_opt_set_int(filt_asink, "all_channel_counts", 0, AV_OPT_SEARCH_CHILDREN)) < 0)
|
||||
goto end;
|
||||
@@ -2573,7 +2576,7 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
{
|
||||
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 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
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 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
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 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
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 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
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 @@ static int read_thread(void *arg)
|
||||
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 @@ static int read_thread(void *arg)
|
||||
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 @@ static int read_thread(void *arg)
|
||||
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 @@ static int read_thread(void *arg)
|
||||
}
|
||||
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,19 +3021,15 @@ static int read_thread(void *arg)
|
||||
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) {
|
||||
if (autoexit)
|
||||
goto fail;
|
||||
else
|
||||
break;
|
||||
}
|
||||
if (ic->pb && ic->pb->error)
|
||||
break;
|
||||
SDL_LockMutex(wait_mutex);
|
||||
SDL_CondWaitTimeout(is->continue_read_thread, wait_mutex, 10);
|
||||
SDL_UnlockMutex(wait_mutex);
|
||||
@@ -3063,7 +3062,6 @@ static int read_thread(void *arg)
|
||||
if (ic && !is->ic)
|
||||
avformat_close_input(&ic);
|
||||
|
||||
av_packet_free(&pkt);
|
||||
if (ret != 0) {
|
||||
SDL_Event event;
|
||||
|
||||
@@ -3736,6 +3734,9 @@ int main(int argc, char **argv)
|
||||
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)
|
||||
|
||||
+73
-142
@@ -35,7 +35,6 @@
|
||||
#include "libavutil/bprint.h"
|
||||
#include "libavutil/display.h"
|
||||
#include "libavutil/hash.h"
|
||||
#include "libavutil/hdr_dynamic_metadata.h"
|
||||
#include "libavutil/mastering_display_metadata.h"
|
||||
#include "libavutil/dovi_meta.h"
|
||||
#include "libavutil/opt.h"
|
||||
@@ -1672,6 +1671,24 @@ static av_cold int xml_init(WriterContext *wctx)
|
||||
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 +1760,14 @@ static void xml_print_str(WriterContext *wctx, const char *key, const char *valu
|
||||
|
||||
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);
|
||||
@@ -1851,105 +1860,6 @@ static inline int show_tags(WriterContext *w, AVDictionary *tags, int section_id
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void print_dynamic_hdr10_plus(WriterContext *w, const AVDynamicHDRPlus *metadata)
|
||||
{
|
||||
if (!metadata)
|
||||
return;
|
||||
print_int("application version", metadata->application_version);
|
||||
print_int("num_windows", metadata->num_windows);
|
||||
for (int n = 1; n < metadata->num_windows; n++) {
|
||||
const AVHDRPlusColorTransformParams *params = &metadata->params[n];
|
||||
print_q("window_upper_left_corner_x",
|
||||
params->window_upper_left_corner_x,'/');
|
||||
print_q("window_upper_left_corner_y",
|
||||
params->window_upper_left_corner_y,'/');
|
||||
print_q("window_lower_right_corner_x",
|
||||
params->window_lower_right_corner_x,'/');
|
||||
print_q("window_lower_right_corner_y",
|
||||
params->window_lower_right_corner_y,'/');
|
||||
print_q("window_upper_left_corner_x",
|
||||
params->window_upper_left_corner_x,'/');
|
||||
print_q("window_upper_left_corner_y",
|
||||
params->window_upper_left_corner_y,'/');
|
||||
print_int("center_of_ellipse_x",
|
||||
params->center_of_ellipse_x ) ;
|
||||
print_int("center_of_ellipse_y",
|
||||
params->center_of_ellipse_y );
|
||||
print_int("rotation_angle",
|
||||
params->rotation_angle);
|
||||
print_int("semimajor_axis_internal_ellipse",
|
||||
params->semimajor_axis_internal_ellipse);
|
||||
print_int("semimajor_axis_external_ellipse",
|
||||
params->semimajor_axis_external_ellipse);
|
||||
print_int("semiminor_axis_external_ellipse",
|
||||
params->semiminor_axis_external_ellipse);
|
||||
print_int("overlap_process_option",
|
||||
params->overlap_process_option);
|
||||
}
|
||||
print_q("targeted_system_display_maximum_luminance",
|
||||
metadata->targeted_system_display_maximum_luminance,'/');
|
||||
if (metadata->targeted_system_display_actual_peak_luminance_flag) {
|
||||
print_int("num_rows_targeted_system_display_actual_peak_luminance",
|
||||
metadata->num_rows_targeted_system_display_actual_peak_luminance);
|
||||
print_int("num_cols_targeted_system_display_actual_peak_luminance",
|
||||
metadata->num_cols_targeted_system_display_actual_peak_luminance);
|
||||
for (int i = 0; i < metadata->num_rows_targeted_system_display_actual_peak_luminance; i++) {
|
||||
for (int j = 0; j < metadata->num_cols_targeted_system_display_actual_peak_luminance; j++) {
|
||||
print_q("targeted_system_display_actual_peak_luminance",
|
||||
metadata->targeted_system_display_actual_peak_luminance[i][j],'/');
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int n = 0; n < metadata->num_windows; n++) {
|
||||
const AVHDRPlusColorTransformParams *params = &metadata->params[n];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
print_q("maxscl",params->maxscl[i],'/');
|
||||
}
|
||||
print_q("average_maxrgb",
|
||||
params->average_maxrgb,'/');
|
||||
print_int("num_distribution_maxrgb_percentiles",
|
||||
params->num_distribution_maxrgb_percentiles);
|
||||
for (int i = 0; i < params->num_distribution_maxrgb_percentiles; i++) {
|
||||
print_int("distribution_maxrgb_percentage",
|
||||
params->distribution_maxrgb[i].percentage);
|
||||
print_q("distribution_maxrgb_percentile",
|
||||
params->distribution_maxrgb[i].percentile,'/');
|
||||
}
|
||||
print_q("fraction_bright_pixels",
|
||||
params->fraction_bright_pixels,'/');
|
||||
}
|
||||
if (metadata->mastering_display_actual_peak_luminance_flag) {
|
||||
print_int("num_rows_mastering_display_actual_peak_luminance",
|
||||
metadata->num_rows_mastering_display_actual_peak_luminance);
|
||||
print_int("num_cols_mastering_display_actual_peak_luminance",
|
||||
metadata->num_cols_mastering_display_actual_peak_luminance);
|
||||
for (int i = 0; i < metadata->num_rows_mastering_display_actual_peak_luminance; i++) {
|
||||
for (int j = 0; j < metadata->num_cols_mastering_display_actual_peak_luminance; j++) {
|
||||
print_q("mastering_display_actual_peak_luminance",
|
||||
metadata->mastering_display_actual_peak_luminance[i][j],'/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int n = 0; n < metadata->num_windows; n++) {
|
||||
const AVHDRPlusColorTransformParams *params = &metadata->params[n];
|
||||
if (params->tone_mapping_flag) {
|
||||
print_q("knee_point_x", params->knee_point_x,'/');
|
||||
print_q("knee_point_y", params->knee_point_y,'/');
|
||||
print_int("num_bezier_curve_anchors",
|
||||
params->num_bezier_curve_anchors );
|
||||
for (int i = 0; i < params->num_bezier_curve_anchors; i++) {
|
||||
print_q("bezier_curve_anchors",
|
||||
params->bezier_curve_anchors[i],'/');
|
||||
}
|
||||
}
|
||||
if (params->color_saturation_mapping_flag) {
|
||||
print_q("color_saturation_weight",
|
||||
params->color_saturation_weight,'/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void print_pkt_side_data(WriterContext *w,
|
||||
AVCodecParameters *par,
|
||||
const AVPacketSideData *side_data,
|
||||
@@ -2158,6 +2068,8 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p
|
||||
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");
|
||||
@@ -2313,7 +2225,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
|
||||
writer_print_section_header(w, SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST);
|
||||
for (int j = 1; j <= m ; j++) {
|
||||
char tcbuf[AV_TIMECODE_STR_SIZE];
|
||||
av_timecode_make_smpte_tc_string2(tcbuf, stream->avg_frame_rate, tc[j], 0, 0);
|
||||
av_timecode_make_smpte_tc_string(tcbuf, tc[j], 0);
|
||||
writer_print_section_header(w, SECTION_ID_FRAME_SIDE_DATA_TIMECODE);
|
||||
print_str("value", tcbuf);
|
||||
writer_print_section_footer(w);
|
||||
@@ -2338,9 +2250,6 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
|
||||
print_q("min_luminance", metadata->min_luminance, '/');
|
||||
print_q("max_luminance", metadata->max_luminance, '/');
|
||||
}
|
||||
} else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS) {
|
||||
AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
|
||||
print_dynamic_hdr10_plus(w, metadata);
|
||||
} else if (sd->type == AV_FRAME_DATA_CONTENT_LIGHT_LEVEL) {
|
||||
AVContentLightMetadata *metadata = (AVContentLightMetadata *)sd->data;
|
||||
print_int("max_content", metadata->MaxCLL);
|
||||
@@ -2453,12 +2362,14 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
|
||||
const ReadInterval *interval, int64_t *cur_ts)
|
||||
{
|
||||
AVFormatContext *fmt_ctx = ifile->fmt_ctx;
|
||||
AVPacket *pkt = NULL;
|
||||
AVPacket pkt;
|
||||
AVFrame *frame = NULL;
|
||||
int ret = 0, i = 0, frame_count = 0;
|
||||
int64_t start = -INT64_MAX, end = interval->end;
|
||||
int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
|
||||
|
||||
av_init_packet(&pkt);
|
||||
|
||||
av_log(NULL, AV_LOG_VERBOSE, "Processing read interval ");
|
||||
log_read_interval(interval, NULL, AV_LOG_VERBOSE);
|
||||
|
||||
@@ -2491,23 +2402,18 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
pkt = av_packet_alloc();
|
||||
if (!pkt) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
while (!av_read_frame(fmt_ctx, pkt)) {
|
||||
while (!av_read_frame(fmt_ctx, &pkt)) {
|
||||
if (fmt_ctx->nb_streams > nb_streams) {
|
||||
REALLOCZ_ARRAY_STREAM(nb_streams_frames, nb_streams, fmt_ctx->nb_streams);
|
||||
REALLOCZ_ARRAY_STREAM(nb_streams_packets, nb_streams, fmt_ctx->nb_streams);
|
||||
REALLOCZ_ARRAY_STREAM(selected_streams, nb_streams, fmt_ctx->nb_streams);
|
||||
nb_streams = fmt_ctx->nb_streams;
|
||||
}
|
||||
if (selected_streams[pkt->stream_index]) {
|
||||
AVRational tb = ifile->streams[pkt->stream_index].st->time_base;
|
||||
if (selected_streams[pkt.stream_index]) {
|
||||
AVRational tb = ifile->streams[pkt.stream_index].st->time_base;
|
||||
|
||||
if (pkt->pts != AV_NOPTS_VALUE)
|
||||
*cur_ts = av_rescale_q(pkt->pts, tb, AV_TIME_BASE_Q);
|
||||
if (pkt.pts != AV_NOPTS_VALUE)
|
||||
*cur_ts = av_rescale_q(pkt.pts, tb, AV_TIME_BASE_Q);
|
||||
|
||||
if (!has_start && *cur_ts != AV_NOPTS_VALUE) {
|
||||
start = *cur_ts;
|
||||
@@ -2529,27 +2435,26 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
|
||||
frame_count++;
|
||||
if (do_read_packets) {
|
||||
if (do_show_packets)
|
||||
show_packet(w, ifile, pkt, i++);
|
||||
nb_streams_packets[pkt->stream_index]++;
|
||||
show_packet(w, ifile, &pkt, i++);
|
||||
nb_streams_packets[pkt.stream_index]++;
|
||||
}
|
||||
if (do_read_frames) {
|
||||
int packet_new = 1;
|
||||
while (process_frame(w, ifile, frame, pkt, &packet_new) > 0);
|
||||
while (process_frame(w, ifile, frame, &pkt, &packet_new) > 0);
|
||||
}
|
||||
}
|
||||
av_packet_unref(pkt);
|
||||
av_packet_unref(&pkt);
|
||||
}
|
||||
av_packet_unref(pkt);
|
||||
av_packet_unref(&pkt);
|
||||
//Flush remaining frames that are cached in the decoder
|
||||
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
||||
pkt->stream_index = i;
|
||||
pkt.stream_index = i;
|
||||
if (do_read_frames)
|
||||
while (process_frame(w, ifile, frame, pkt, &(int){1}) > 0);
|
||||
while (process_frame(w, ifile, frame, &pkt, &(int){1}) > 0);
|
||||
}
|
||||
|
||||
end:
|
||||
av_frame_free(&frame);
|
||||
av_packet_free(&pkt);
|
||||
if (ret < 0) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Could not read packets in interval ");
|
||||
log_read_interval(interval, NULL, AV_LOG_ERROR);
|
||||
@@ -2625,6 +2530,10 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
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));
|
||||
@@ -2634,11 +2543,13 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
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) {
|
||||
@@ -2676,6 +2587,15 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
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;
|
||||
@@ -2733,10 +2653,10 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
|
||||
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);
|
||||
@@ -2934,7 +2854,7 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
{
|
||||
int err, i;
|
||||
AVFormatContext *fmt_ctx = NULL;
|
||||
AVDictionaryEntry *t = NULL;
|
||||
AVDictionaryEntry *t;
|
||||
int scan_all_pmts_set = 0;
|
||||
|
||||
fmt_ctx = avformat_alloc_context();
|
||||
@@ -2959,8 +2879,10 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
ifile->fmt_ctx = fmt_ctx;
|
||||
if (scan_all_pmts_set)
|
||||
av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
|
||||
while ((t = av_dict_get(format_opts, "", t, AV_DICT_IGNORE_SUFFIX)))
|
||||
av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
|
||||
if ((t = av_dict_get(format_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
||||
av_log(NULL, AV_LOG_ERROR, "Option %s not found.\n", t->key);
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (find_stream_info) {
|
||||
AVDictionary **opts = setup_find_stream_info_opts(fmt_ctx, codec_opts);
|
||||
@@ -2990,7 +2912,7 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
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;
|
||||
|
||||
@@ -3028,6 +2950,12 @@ static int open_input_file(InputFile *ifile, const char *filename,
|
||||
}
|
||||
|
||||
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",
|
||||
@@ -3228,6 +3156,9 @@ static void ffprobe_show_pixel_formats(WriterContext *w)
|
||||
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);
|
||||
}
|
||||
|
||||
+2
-2
@@ -131,8 +131,8 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
||||
u = x/2 + (uint16_t *)(pic->data[1] + line * pic->linesize[1]);
|
||||
v = x/2 + (uint16_t *)(pic->data[2] + line * pic->linesize[2]);
|
||||
memcpy(y, y_temp, sizeof(*y) * (width - x));
|
||||
memcpy(u, u_temp, sizeof(*u) * ((width - x + 1) / 2));
|
||||
memcpy(v, v_temp, sizeof(*v) * ((width - x + 1) / 2));
|
||||
memcpy(u, u_temp, sizeof(*u) * (width - x + 1) / 2);
|
||||
memcpy(v, v_temp, sizeof(*v) * (width - x + 1) / 2);
|
||||
}
|
||||
|
||||
line_end += stride;
|
||||
|
||||
+2
-5
@@ -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"
|
||||
@@ -499,8 +498,8 @@ static int decode_i_block(FourXContext *f, int16_t *block)
|
||||
{
|
||||
int code, i, j, level, val;
|
||||
|
||||
if (get_bits_left(&f->pre_gb) < 2) {
|
||||
av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->pre_gb));
|
||||
if (get_bits_left(&f->gb) < 2){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@@ -886,8 +885,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
if (i >= CFRAME_BUFFER_COUNT) {
|
||||
if (free_index < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
i = free_index;
|
||||
f->cfrm[i].id = id;
|
||||
}
|
||||
|
||||
+1
-4
@@ -70,9 +70,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
unsigned char *planemap = c->planemap;
|
||||
int ret;
|
||||
|
||||
if (buf_size < planes * height *2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
@@ -125,7 +122,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
+69
-105
@@ -29,7 +29,6 @@ HEADERS = ac3_parser.h \
|
||||
OBJS = ac3_parser.o \
|
||||
adts_parser.o \
|
||||
allcodecs.o \
|
||||
avcodec.o \
|
||||
avdct.o \
|
||||
avpacket.o \
|
||||
avpicture.o \
|
||||
@@ -38,7 +37,6 @@ OBJS = ac3_parser.o \
|
||||
bitstream_filters.o \
|
||||
bsf.o \
|
||||
codec_desc.o \
|
||||
codec_par.o \
|
||||
d3d11va.o \
|
||||
decode.o \
|
||||
dirac.o \
|
||||
@@ -50,6 +48,7 @@ OBJS = ac3_parser.o \
|
||||
mediacodec.o \
|
||||
mpeg12framerate.o \
|
||||
options.o \
|
||||
mjpegenc_huffman.o \
|
||||
parser.o \
|
||||
parsers.o \
|
||||
profiles.o \
|
||||
@@ -65,15 +64,14 @@ OBJS-$(CONFIG_AC3DSP) += ac3dsp.o ac3.o ac3tab.o
|
||||
OBJS-$(CONFIG_ADTS_HEADER) += adts_header.o mpeg4audio.o
|
||||
OBJS-$(CONFIG_AMF) += amfenc.o
|
||||
OBJS-$(CONFIG_AUDIO_FRAME_QUEUE) += audio_frame_queue.o
|
||||
OBJS-$(CONFIG_ATSC_A53) += atsc_a53.o
|
||||
OBJS-$(CONFIG_AUDIODSP) += audiodsp.o
|
||||
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
|
||||
@@ -84,9 +82,10 @@ OBJS-$(CONFIG_EXIF) += exif.o tiff_common.o
|
||||
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
|
||||
@@ -96,8 +95,7 @@ OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
||||
OBJS-$(CONFIG_H264PARSE) += h264_parse.o h2645_parse.o h264_ps.o
|
||||
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
||||
OBJS-$(CONFIG_H264QPEL) += h264qpel.o
|
||||
OBJS-$(CONFIG_HEVCPARSE) += hevc_parse.o h2645_parse.o hevc_ps.o hevc_sei.o hevc_data.o \
|
||||
dynamic_hdr10_plus.o
|
||||
OBJS-$(CONFIG_HEVCPARSE) += hevc_parse.o h2645_parse.o hevc_ps.o hevc_sei.o hevc_data.o
|
||||
OBJS-$(CONFIG_HPELDSP) += hpeldsp.o
|
||||
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||
OBJS-$(CONFIG_HUFFYUVDSP) += huffyuvdsp.o
|
||||
@@ -115,11 +113,11 @@ OBJS-$(CONFIG_LLVIDENCDSP) += lossless_videoencdsp.o
|
||||
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
|
||||
OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o mpegaudiodec_common.o
|
||||
OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o
|
||||
OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
||||
mpegaudiodsp_data.o \
|
||||
mpegaudiodsp_fixed.o \
|
||||
@@ -132,6 +130,7 @@ OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \
|
||||
motion_est.o ratecontrol.o \
|
||||
mpegvideoencdsp.o
|
||||
OBJS-$(CONFIG_MSS34DSP) += mss34dsp.o
|
||||
OBJS-$(CONFIG_NVENC) += nvenc.o
|
||||
OBJS-$(CONFIG_PIXBLOCKDSP) += pixblockdsp.o
|
||||
OBJS-$(CONFIG_QPELDSP) += qpeldsp.o
|
||||
OBJS-$(CONFIG_QSV) += qsv.o
|
||||
@@ -141,7 +140,7 @@ OBJS-$(CONFIG_RANGECODER) += rangecoder.o
|
||||
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
|
||||
@@ -161,10 +160,10 @@ OBJS-$(CONFIG_WMV2DSP) += wmv2dsp.o
|
||||
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 \
|
||||
@@ -173,14 +172,14 @@ OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o aacenctab.o \
|
||||
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
|
||||
@@ -210,7 +209,6 @@ OBJS-$(CONFIG_APTX_HD_ENCODER) += aptxenc.o aptx.o
|
||||
OBJS-$(CONFIG_APNG_DECODER) += png.o pngdec.o pngdsp.o
|
||||
OBJS-$(CONFIG_APNG_ENCODER) += png.o pngenc.o
|
||||
OBJS-$(CONFIG_ARBC_DECODER) += arbc.o
|
||||
OBJS-$(CONFIG_ARGO_DECODER) += argo.o
|
||||
OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o
|
||||
OBJS-$(CONFIG_SSA_ENCODER) += assenc.o ass.o
|
||||
OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o
|
||||
@@ -229,9 +227,7 @@ OBJS-$(CONFIG_ATRAC3PAL_DECODER) += atrac3plusdec.o atrac3plus.o \
|
||||
OBJS-$(CONFIG_ATRAC9_DECODER) += atrac9dec.o
|
||||
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
|
||||
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,8 +254,7 @@ OBJS-$(CONFIG_CCAPTION_DECODER) += ccaption_dec.o ass.o
|
||||
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
|
||||
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_DECODER) += cfhd.o cfhddata.o
|
||||
OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
|
||||
OBJS-$(CONFIG_CINEPAK_ENCODER) += cinepakenc.o elbg.o
|
||||
OBJS-$(CONFIG_CLEARVIDEO_DECODER) += clearvideo.o
|
||||
@@ -270,13 +265,12 @@ OBJS-$(CONFIG_COMFORTNOISE_DECODER) += cngdec.o celp_filters.o
|
||||
OBJS-$(CONFIG_COMFORTNOISE_ENCODER) += cngenc.o
|
||||
OBJS-$(CONFIG_COOK_DECODER) += cook.o
|
||||
OBJS-$(CONFIG_CPIA_DECODER) += cpia.o
|
||||
OBJS-$(CONFIG_CRI_DECODER) += cri.o
|
||||
OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
|
||||
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
|
||||
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
|
||||
@@ -285,7 +279,7 @@ OBJS-$(CONFIG_DIRAC_DECODER) += diracdec.o dirac.o diracdsp.o diractab
|
||||
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
|
||||
@@ -297,7 +291,7 @@ OBJS-$(CONFIG_DSICINVIDEO_DECODER) += dsicinvideo.o
|
||||
OBJS-$(CONFIG_DSS_SP_DECODER) += dss_sp.o
|
||||
OBJS-$(CONFIG_DST_DECODER) += dstdec.o dsd.o
|
||||
OBJS-$(CONFIG_DVBSUB_DECODER) += dvbsubdec.o
|
||||
OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsubenc.o
|
||||
OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsub.o
|
||||
OBJS-$(CONFIG_DVDSUB_DECODER) += dvdsubdec.o dvdsub.o
|
||||
OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o dvdsub.o
|
||||
OBJS-$(CONFIG_DVAUDIO_DECODER) += dvaudiodec.o
|
||||
@@ -321,8 +315,6 @@ OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o
|
||||
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
|
||||
OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
|
||||
@@ -330,19 +322,17 @@ OBJS-$(CONFIG_FIC_DECODER) += fic.o
|
||||
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 \
|
||||
@@ -357,11 +347,10 @@ OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||
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 \
|
||||
@@ -374,11 +363,11 @@ OBJS-$(CONFIG_H264_CUVID_DECODER) += cuviddec.o
|
||||
OBJS-$(CONFIG_H264_MEDIACODEC_DECODER) += mediacodecdec.o
|
||||
OBJS-$(CONFIG_H264_MF_ENCODER) += mfenc.o mf_utils.o
|
||||
OBJS-$(CONFIG_H264_MMAL_DECODER) += mmaldec.o
|
||||
OBJS-$(CONFIG_H264_NVENC_ENCODER) += nvenc.o nvenc_h264.o
|
||||
OBJS-$(CONFIG_NVENC_ENCODER) += nvenc.o nvenc_h264.o
|
||||
OBJS-$(CONFIG_NVENC_H264_ENCODER) += nvenc.o nvenc_h264.o
|
||||
OBJS-$(CONFIG_H264_NVENC_ENCODER) += nvenc_h264.o
|
||||
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
|
||||
@@ -396,9 +385,9 @@ OBJS-$(CONFIG_HEVC_AMF_ENCODER) += amfenc_hevc.o
|
||||
OBJS-$(CONFIG_HEVC_CUVID_DECODER) += cuviddec.o
|
||||
OBJS-$(CONFIG_HEVC_MEDIACODEC_DECODER) += mediacodecdec.o
|
||||
OBJS-$(CONFIG_HEVC_MF_ENCODER) += mfenc.o mf_utils.o
|
||||
OBJS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc.o nvenc_hevc.o
|
||||
OBJS-$(CONFIG_NVENC_HEVC_ENCODER) += nvenc.o nvenc_hevc.o
|
||||
OBJS-$(CONFIG_HEVC_QSV_DECODER) += qsvdec.o
|
||||
OBJS-$(CONFIG_HEVC_NVENC_ENCODER) += nvenc_hevc.o
|
||||
OBJS-$(CONFIG_NVENC_HEVC_ENCODER) += nvenc_hevc.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
|
||||
@@ -426,7 +415,6 @@ OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi.o
|
||||
OBJS-$(CONFIG_INTERPLAY_ACM_DECODER) += interplayacm.o
|
||||
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
|
||||
OBJS-$(CONFIG_IPU_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
|
||||
OBJS-$(CONFIG_JACOSUB_DECODER) += jacosubdec.o ass.o
|
||||
OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o jpeg2000.o \
|
||||
jpeg2000dwt.o
|
||||
@@ -440,7 +428,7 @@ OBJS-$(CONFIG_KMVC_DECODER) += kmvc.o
|
||||
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
|
||||
@@ -451,8 +439,8 @@ OBJS-$(CONFIG_METASOUND_DECODER) += metasound.o metasound_data.o \
|
||||
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
|
||||
@@ -462,7 +450,6 @@ OBJS-$(CONFIG_MJPEG_VAAPI_ENCODER) += vaapi_encode_mjpeg.o
|
||||
OBJS-$(CONFIG_MLP_DECODER) += mlpdec.o mlpdsp.o
|
||||
OBJS-$(CONFIG_MLP_ENCODER) += mlpenc.o mlp.o
|
||||
OBJS-$(CONFIG_MMVIDEO_DECODER) += mmvideo.o
|
||||
OBJS-$(CONFIG_MOBICLIP_DECODER) += mobiclip.o
|
||||
OBJS-$(CONFIG_MOTIONPIXELS_DECODER) += motionpixels.o
|
||||
OBJS-$(CONFIG_MOVTEXT_DECODER) += movtextdec.o ass.o
|
||||
OBJS-$(CONFIG_MOVTEXT_ENCODER) += movtextenc.o ass_split.o
|
||||
@@ -489,7 +476,7 @@ OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
|
||||
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
|
||||
@@ -498,7 +485,6 @@ OBJS-$(CONFIG_MPEG2_MEDIACODEC_DECODER) += mediacodecdec.o
|
||||
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
|
||||
@@ -512,7 +498,6 @@ OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4enc.o msmpeg4.o msmpeg4data.o
|
||||
OBJS-$(CONFIG_MSP2_DECODER) += msp2dec.o
|
||||
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
||||
OBJS-$(CONFIG_MSS1_DECODER) += mss1.o mss12.o
|
||||
OBJS-$(CONFIG_MSS2_DECODER) += mss2.o mss12.o mss2dsp.o wmv2data.o
|
||||
@@ -546,14 +531,11 @@ OBJS-$(CONFIG_PBM_ENCODER) += pnmenc.o
|
||||
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
|
||||
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o
|
||||
OBJS-$(CONFIG_PGSSUB_DECODER) += pgssubdec.o
|
||||
OBJS-$(CONFIG_PGX_DECODER) += pgxdec.o
|
||||
OBJS-$(CONFIG_PHOTOCD_DECODER) += photocd.o
|
||||
OBJS-$(CONFIG_PICTOR_DECODER) += pictordec.o cga_data.o
|
||||
OBJS-$(CONFIG_PIXLET_DECODER) += pixlet.o
|
||||
OBJS-$(CONFIG_PJS_DECODER) += textdec.o ass.o
|
||||
@@ -595,7 +577,6 @@ OBJS-$(CONFIG_ROQ_ENCODER) += roqvideoenc.o roqvideo.o elbg.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_ENCODER) += roqaudioenc.o
|
||||
OBJS-$(CONFIG_RPZA_DECODER) += rpza.o
|
||||
OBJS-$(CONFIG_RPZA_ENCODER) += rpzaenc.o
|
||||
OBJS-$(CONFIG_RSCC_DECODER) += rscc.o
|
||||
OBJS-$(CONFIG_RV10_DECODER) += rv10.o
|
||||
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o
|
||||
@@ -610,7 +591,6 @@ OBJS-$(CONFIG_SANM_DECODER) += sanm.o
|
||||
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
|
||||
@@ -621,10 +601,10 @@ OBJS-$(CONFIG_SIPR_DECODER) += sipr.o acelp_pitch_delay.o \
|
||||
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
|
||||
OBJS-$(CONFIG_SMVJPEG_DECODER) += smvjpegdec.o
|
||||
OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o snow_dwt.o
|
||||
OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o snow_dwt.o \
|
||||
h263.o h263data.o ituh263enc.o
|
||||
@@ -633,7 +613,6 @@ OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
|
||||
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
|
||||
OBJS-$(CONFIG_SONIC_LS_ENCODER) += sonic.o
|
||||
OBJS-$(CONFIG_SPEEDHQ_DECODER) += speedhq.o mpeg12.o mpeg12data.o simple_idct.o
|
||||
OBJS-$(CONFIG_SPEEDHQ_ENCODER) += speedhq.o mpeg12data.o mpeg12enc.o speedhqenc.o
|
||||
OBJS-$(CONFIG_SP5X_DECODER) += sp5xdec.o
|
||||
OBJS-$(CONFIG_SRGC_DECODER) += mscc.o
|
||||
OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o htmlsubtitles.o
|
||||
@@ -660,8 +639,8 @@ OBJS-$(CONFIG_TARGA_ENCODER) += targaenc.o rle.o
|
||||
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
|
||||
@@ -673,12 +652,11 @@ OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o
|
||||
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
|
||||
OBJS-$(CONFIG_UTVIDEO_ENCODER) += utvideoenc.o
|
||||
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideo.o utvideodsp.o
|
||||
OBJS-$(CONFIG_UTVIDEO_ENCODER) += utvideoenc.o utvideo.o
|
||||
OBJS-$(CONFIG_V210_DECODER) += v210dec.o
|
||||
OBJS-$(CONFIG_V210_ENCODER) += v210enc.o
|
||||
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
|
||||
@@ -696,7 +674,7 @@ OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1_block.o vc1_loopfilter.o
|
||||
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
|
||||
@@ -715,7 +693,7 @@ OBJS-$(CONFIG_VP7_DECODER) += vp8.o vp56rac.o
|
||||
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
|
||||
@@ -731,8 +709,8 @@ OBJS-$(CONFIG_VP9_QSV_ENCODER) += qsvenc_vp9.o
|
||||
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
|
||||
@@ -833,7 +811,6 @@ OBJS-$(CONFIG_PCM_S64BE_DECODER) += pcm.o
|
||||
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
|
||||
@@ -858,7 +835,6 @@ OBJS-$(CONFIG_ADPCM_AFC_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_AGM_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_AICA_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_ARGO_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_ARGO_ENCODER) += adpcm.o adpcmenc.o
|
||||
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_DTK_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
|
||||
@@ -874,12 +850,9 @@ OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_G726LE_DECODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_G726LE_ENCODER) += g726.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_ALP_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_ALP_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_APC_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_APM_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_APM_ENCODER) += adpcmenc.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_CUNNING_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DAT4_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o adpcm_data.o
|
||||
@@ -887,7 +860,6 @@ OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_MOFLEX_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_MTF_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_OKI_DECODER) += adpcm.o adpcm_data.o
|
||||
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o
|
||||
@@ -924,25 +896,21 @@ OBJS-$(CONFIG_VAAPI) += vaapi_decode.o
|
||||
OBJS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.o
|
||||
OBJS-$(CONFIG_VDPAU) += vdpau.o
|
||||
|
||||
OBJS-$(CONFIG_AV1_D3D11VA_HWACCEL) += dxva2_av1.o
|
||||
OBJS-$(CONFIG_AV1_DXVA2_HWACCEL) += dxva2_av1.o
|
||||
OBJS-$(CONFIG_AV1_NVDEC_HWACCEL) += nvdec_av1.o
|
||||
OBJS-$(CONFIG_AV1_VAAPI_HWACCEL) += vaapi_av1.o
|
||||
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||
OBJS-$(CONFIG_H263_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
|
||||
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_HEVC_VDPAU_HWACCEL) += vdpau_hevc.o
|
||||
OBJS-$(CONFIG_MJPEG_NVDEC_HWACCEL) += nvdec_mjpeg.o
|
||||
OBJS-$(CONFIG_MJPEG_VAAPI_HWACCEL) += vaapi_mjpeg.o
|
||||
OBJS-$(CONFIG_MPEG1_NVDEC_HWACCEL) += nvdec_mpeg12.o
|
||||
@@ -952,7 +920,7 @@ OBJS-$(CONFIG_MPEG1_XVMC_HWACCEL) += mpegvideo_xvmc.o
|
||||
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
|
||||
@@ -964,7 +932,7 @@ OBJS-$(CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
|
||||
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
|
||||
@@ -974,24 +942,26 @@ OBJS-$(CONFIG_VP9_DXVA2_HWACCEL) += dxva2_vp9.o
|
||||
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
|
||||
@@ -1054,10 +1024,8 @@ OBJS-$(CONFIG_LIBRAV1E_ENCODER) += librav1e.o
|
||||
OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
||||
OBJS-$(CONFIG_LIBSVTAV1_ENCODER) += libsvtav1.o
|
||||
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
||||
OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o
|
||||
OBJS-$(CONFIG_LIBUAVS3D_DECODER) += libuavs3d.o
|
||||
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
||||
OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o
|
||||
OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbisenc.o \
|
||||
@@ -1066,6 +1034,7 @@ OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o
|
||||
OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o
|
||||
OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o libvpx.o
|
||||
OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o libvpx.o
|
||||
OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.o
|
||||
OBJS-$(CONFIG_LIBWEBP_ENCODER) += libwebpenc_common.o libwebpenc.o
|
||||
OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_animencoder.o
|
||||
OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o
|
||||
@@ -1084,21 +1053,19 @@ OBJS-$(CONFIG_AC3_PARSER) += ac3tab.o aac_ac3_parser.o
|
||||
OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o
|
||||
OBJS-$(CONFIG_AV1_PARSER) += av1_parser.o av1_parse.o
|
||||
OBJS-$(CONFIG_AVS2_PARSER) += avs2_parser.o
|
||||
OBJS-$(CONFIG_AVS3_PARSER) += avs3_parser.o
|
||||
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
|
||||
@@ -1107,7 +1074,6 @@ OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
||||
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264_sei.o h264data.o
|
||||
OBJS-$(CONFIG_HEVC_PARSER) += hevc_parser.o hevc_data.o
|
||||
OBJS-$(CONFIG_IPU_PARSER) += ipu_parser.o
|
||||
OBJS-$(CONFIG_JPEG2000_PARSER) += jpeg2000_parser.o
|
||||
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
||||
OBJS-$(CONFIG_MLP_PARSER) += mlp_parse.o mlp_parser.o mlp.o
|
||||
@@ -1132,7 +1098,6 @@ OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
|
||||
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
|
||||
@@ -1167,7 +1132,6 @@ OBJS-$(CONFIG_OPUS_METADATA_BSF) += opus_metadata_bsf.o
|
||||
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
|
||||
@@ -1207,9 +1171,10 @@ SKIPHEADERS-$(CONFIG_MEDIAFOUNDATION) += mf_utils.h
|
||||
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
|
||||
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_encode.h
|
||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
|
||||
SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h
|
||||
SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h
|
||||
@@ -1221,15 +1186,16 @@ TESTPROGS = avpacket \
|
||||
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
|
||||
@@ -1249,7 +1215,6 @@ HOSTPROGS = aacps_tablegen \
|
||||
dv_tablegen \
|
||||
motionpixels_tablegen \
|
||||
mpegaudio_tablegen \
|
||||
mpegaudiodec_common_tablegen \
|
||||
pcm_tablegen \
|
||||
qdm2_tablegen \
|
||||
sinewin_tablegen \
|
||||
@@ -1274,8 +1239,7 @@ endif
|
||||
|
||||
GEN_HEADERS = cbrt_tables.h cbrt_fixed_tables.h aacps_tables.h aacps_fixed_tables.h \
|
||||
dv_tables.h \
|
||||
sinewin_tables.h sinewin_fixed_tables.h mpegaudio_tables.h \
|
||||
mpegaudiodec_common_tables.h motionpixels_tables.h \
|
||||
sinewin_tables.h sinewin_fixed_tables.h mpegaudio_tables.h motionpixels_tables.h \
|
||||
pcm_tables.h qdm2_tables.h
|
||||
GEN_HEADERS := $(addprefix $(SUBDIR), $(GEN_HEADERS))
|
||||
|
||||
@@ -1285,15 +1249,15 @@ $(GEN_HEADERS): $(SUBDIR)%_tables.h: $(SUBDIR)%_tablegen$(HOSTEXESUF)
|
||||
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
|
||||
$(SUBDIR)mpegaudiodec_fixed.o: $(SUBDIR)mpegaudio_tables.h
|
||||
$(SUBDIR)mpegaudiodec_float.o: $(SUBDIR)mpegaudio_tables.h
|
||||
$(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
|
||||
|
||||
@@ -107,16 +107,13 @@ static void render_charset(AVCodecContext *avctx, uint8_t *charset,
|
||||
uint8_t pix;
|
||||
int lowdiff, highdiff;
|
||||
int *best_cb = c->mc_best_cb;
|
||||
uint8_t index1[256];
|
||||
uint8_t index2[256];
|
||||
uint8_t dither[256];
|
||||
static uint8_t index1[256];
|
||||
static uint8_t index2[256];
|
||||
static uint8_t dither[256];
|
||||
int i;
|
||||
int distance;
|
||||
|
||||
/* Generate lookup-tables for dither and index before looping.
|
||||
* This code relies on c->mc_luma_vals[c->mc_pal_size - 1] being
|
||||
* the maximum of all the mc_luma_vals values and on the minimum
|
||||
* being zero; this ensures that dither is properly initialized. */
|
||||
/* generate lookup-tables for dither and index before looping */
|
||||
i = 0;
|
||||
for (a=0; a < 256; a++) {
|
||||
if(i < c->mc_pal_size -1 && a == c->mc_luma_vals[i + 1]) {
|
||||
@@ -410,7 +407,6 @@ AVCodec ff_a64multi_encoder = {
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||
.capabilities = AV_CODEC_CAP_DELAY,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
||||
};
|
||||
#endif
|
||||
#if CONFIG_A64MULTI5_ENCODER
|
||||
@@ -425,6 +421,5 @@ AVCodec ff_a64multi5_encoder = {
|
||||
.close = a64multi_close_encoder,
|
||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||
.capabilities = AV_CODEC_CAP_DELAY,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_INIT_THREADSAFE,
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -89,7 +89,7 @@ get_next:
|
||||
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;
|
||||
}
|
||||
@@ -97,12 +97,8 @@ get_next:
|
||||
avctx->audio_service_type = s->service_type;
|
||||
}
|
||||
|
||||
/* Calculate the average bit rate */
|
||||
s->frame_number++;
|
||||
if (!CONFIG_EAC3_DECODER || avctx->codec_id != AV_CODEC_ID_EAC3) {
|
||||
avctx->bit_rate +=
|
||||
(s->bit_rate - avctx->bit_rate) / s->frame_number;
|
||||
}
|
||||
if (avctx->codec_id != AV_CODEC_ID_EAC3)
|
||||
avctx->bit_rate = s->bit_rate;
|
||||
}
|
||||
|
||||
return i;
|
||||
|
||||
@@ -55,7 +55,6 @@ typedef struct AACAC3ParseContext {
|
||||
uint64_t state;
|
||||
|
||||
int need_next_header;
|
||||
int frame_number;
|
||||
enum AVCodecID codec_id;
|
||||
} AACAC3ParseContext;
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#define AAC_RENAME(x) x ## _fixed
|
||||
#define AAC_RENAME_32(x) x ## _fixed_32
|
||||
#define AAC_RENAME2(x) 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 +83,6 @@ typedef int AAC_SIGNE;
|
||||
|
||||
#define AAC_RENAME(x) x
|
||||
#define AAC_RENAME_32(x) x
|
||||
#define AAC_RENAME2(x) ff_ ## x
|
||||
typedef float INTFLOAT;
|
||||
typedef float UINTFLOAT;
|
||||
typedef float INT64FLOAT;
|
||||
|
||||
@@ -843,25 +843,25 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe)
|
||||
sce0->ics.swb_sizes[g],
|
||||
sce0->sf_idx[w*16+g],
|
||||
sce0->band_type[w*16+g],
|
||||
lambda / (band0->threshold + FLT_MIN), INFINITY, &b1, NULL, 0);
|
||||
lambda / band0->threshold, INFINITY, &b1, NULL, 0);
|
||||
dist1 += quantize_band_cost(s, &sce1->coeffs[start + (w+w2)*128],
|
||||
R34,
|
||||
sce1->ics.swb_sizes[g],
|
||||
sce1->sf_idx[w*16+g],
|
||||
sce1->band_type[w*16+g],
|
||||
lambda / (band1->threshold + FLT_MIN), INFINITY, &b2, NULL, 0);
|
||||
lambda / band1->threshold, INFINITY, &b2, NULL, 0);
|
||||
dist2 += quantize_band_cost(s, M,
|
||||
M34,
|
||||
sce0->ics.swb_sizes[g],
|
||||
mididx,
|
||||
midcb,
|
||||
lambda / (minthr + FLT_MIN), INFINITY, &b3, NULL, 0);
|
||||
lambda / minthr, INFINITY, &b3, NULL, 0);
|
||||
dist2 += quantize_band_cost(s, S,
|
||||
S34,
|
||||
sce1->ics.swb_sizes[g],
|
||||
sididx,
|
||||
sidcb,
|
||||
mslambda / (minthr * bmax + FLT_MIN), INFINITY, &b4, NULL, 0);
|
||||
mslambda / (minthr * bmax), INFINITY, &b4, NULL, 0);
|
||||
B0 += b1+b2;
|
||||
B1 += b3+b4;
|
||||
dist1 -= b1+b2;
|
||||
|
||||
@@ -69,11 +69,6 @@
|
||||
# include "mips/aacdec_mips.h"
|
||||
#endif
|
||||
|
||||
DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(sine_120))[120];
|
||||
DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(sine_960))[960];
|
||||
DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_long_960))[960];
|
||||
DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_short_120))[120];
|
||||
|
||||
static av_always_inline void reset_predict_state(PredictorState *ps)
|
||||
{
|
||||
ps->r0 = 0.0f;
|
||||
|
||||
@@ -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,9 +86,6 @@
|
||||
#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];
|
||||
|
||||
static av_always_inline void reset_predict_state(PredictorState *ps)
|
||||
{
|
||||
ps->r0.mant = 0;
|
||||
@@ -158,9 +155,9 @@ static void vector_pow43(int *coefs, int len)
|
||||
for (i=0; i<len; i++) {
|
||||
coef = coefs[i];
|
||||
if (coef < 0)
|
||||
coef = -(int)ff_cbrt_tab_fixed[(-coef) & 8191];
|
||||
coef = -(int)ff_cbrt_tab_fixed[-coef];
|
||||
else
|
||||
coef = (int)ff_cbrt_tab_fixed[ coef & 8191];
|
||||
coef = (int)ff_cbrt_tab_fixed[coef];
|
||||
coefs[i] = coef;
|
||||
}
|
||||
}
|
||||
|
||||
+83
-190
@@ -198,7 +198,7 @@ struct elem_to_channel {
|
||||
|
||||
static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID],
|
||||
uint8_t (*layout_map)[3], int offset, uint64_t left,
|
||||
uint64_t right, int pos, uint64_t *layout)
|
||||
uint64_t right, int pos)
|
||||
{
|
||||
if (layout_map[offset][0] == TYPE_CPE) {
|
||||
e2c_vec[offset] = (struct elem_to_channel) {
|
||||
@@ -207,9 +207,6 @@ static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID],
|
||||
.elem_id = layout_map[offset][1],
|
||||
.aac_position = pos
|
||||
};
|
||||
if (e2c_vec[offset].av_position != UINT64_MAX)
|
||||
*layout |= e2c_vec[offset].av_position;
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
e2c_vec[offset] = (struct elem_to_channel) {
|
||||
@@ -224,12 +221,6 @@ static int assign_pair(struct elem_to_channel e2c_vec[MAX_ELEM_ID],
|
||||
.elem_id = layout_map[offset + 1][1],
|
||||
.aac_position = pos
|
||||
};
|
||||
if (left != UINT64_MAX)
|
||||
*layout |= left;
|
||||
|
||||
if (right != UINT64_MAX)
|
||||
*layout |= right;
|
||||
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -266,13 +257,12 @@ static int count_paired_channels(uint8_t (*layout_map)[3], int tags, int pos,
|
||||
return num_pos_channels;
|
||||
}
|
||||
|
||||
#define PREFIX_FOR_22POINT2 (AV_CH_LAYOUT_7POINT1_WIDE_BACK|AV_CH_BACK_CENTER|AV_CH_SIDE_LEFT|AV_CH_SIDE_RIGHT|AV_CH_LOW_FREQUENCY_2)
|
||||
static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
{
|
||||
int i, n, total_non_cc_elements;
|
||||
struct elem_to_channel e2c_vec[4 * MAX_ELEM_ID] = { { 0 } };
|
||||
int num_front_channels, num_side_channels, num_back_channels;
|
||||
uint64_t layout = 0;
|
||||
uint64_t layout;
|
||||
|
||||
if (FF_ARRAY_ELEMS(e2c_vec) < tags)
|
||||
return 0;
|
||||
@@ -304,7 +294,6 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = AAC_CHANNEL_FRONT
|
||||
};
|
||||
layout |= e2c_vec[i].av_position;
|
||||
i++;
|
||||
num_front_channels--;
|
||||
}
|
||||
@@ -312,21 +301,21 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_FRONT_LEFT_OF_CENTER,
|
||||
AV_CH_FRONT_RIGHT_OF_CENTER,
|
||||
AAC_CHANNEL_FRONT, &layout);
|
||||
AAC_CHANNEL_FRONT);
|
||||
num_front_channels -= 2;
|
||||
}
|
||||
if (num_front_channels >= 2) {
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_FRONT_LEFT,
|
||||
AV_CH_FRONT_RIGHT,
|
||||
AAC_CHANNEL_FRONT, &layout);
|
||||
AAC_CHANNEL_FRONT);
|
||||
num_front_channels -= 2;
|
||||
}
|
||||
while (num_front_channels >= 2) {
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
UINT64_MAX,
|
||||
UINT64_MAX,
|
||||
AAC_CHANNEL_FRONT, &layout);
|
||||
AAC_CHANNEL_FRONT);
|
||||
num_front_channels -= 2;
|
||||
}
|
||||
|
||||
@@ -334,14 +323,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_SIDE_LEFT,
|
||||
AV_CH_SIDE_RIGHT,
|
||||
AAC_CHANNEL_FRONT, &layout);
|
||||
AAC_CHANNEL_FRONT);
|
||||
num_side_channels -= 2;
|
||||
}
|
||||
while (num_side_channels >= 2) {
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
UINT64_MAX,
|
||||
UINT64_MAX,
|
||||
AAC_CHANNEL_SIDE, &layout);
|
||||
AAC_CHANNEL_SIDE);
|
||||
num_side_channels -= 2;
|
||||
}
|
||||
|
||||
@@ -349,14 +338,14 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
UINT64_MAX,
|
||||
UINT64_MAX,
|
||||
AAC_CHANNEL_BACK, &layout);
|
||||
AAC_CHANNEL_BACK);
|
||||
num_back_channels -= 2;
|
||||
}
|
||||
if (num_back_channels >= 2) {
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_BACK_LEFT,
|
||||
AV_CH_BACK_RIGHT,
|
||||
AAC_CHANNEL_BACK, &layout);
|
||||
AAC_CHANNEL_BACK);
|
||||
num_back_channels -= 2;
|
||||
}
|
||||
if (num_back_channels) {
|
||||
@@ -366,7 +355,6 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = AAC_CHANNEL_BACK
|
||||
};
|
||||
layout |= e2c_vec[i].av_position;
|
||||
i++;
|
||||
num_back_channels--;
|
||||
}
|
||||
@@ -378,17 +366,6 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = AAC_CHANNEL_LFE
|
||||
};
|
||||
layout |= e2c_vec[i].av_position;
|
||||
i++;
|
||||
}
|
||||
if (i < tags && layout_map[i][2] == AAC_CHANNEL_LFE) {
|
||||
e2c_vec[i] = (struct elem_to_channel) {
|
||||
.av_position = AV_CH_LOW_FREQUENCY_2,
|
||||
.syn_ele = TYPE_LFE,
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = AAC_CHANNEL_LFE
|
||||
};
|
||||
layout |= e2c_vec[i].av_position;
|
||||
i++;
|
||||
}
|
||||
while (i < tags && layout_map[i][2] == AAC_CHANNEL_LFE) {
|
||||
@@ -401,95 +378,26 @@ static uint64_t sniff_channel_order(uint8_t (*layout_map)[3], int tags)
|
||||
i++;
|
||||
}
|
||||
|
||||
// The previous checks would end up at 8 at this point for 22.2
|
||||
if (layout == PREFIX_FOR_22POINT2 && tags == 16 && i == 8) {
|
||||
const uint8_t (*reference_layout_map)[3] = aac_channel_layout_map[12];
|
||||
for (int j = 0; j < tags; j++) {
|
||||
if (layout_map[j][0] != reference_layout_map[j][0] ||
|
||||
layout_map[j][2] != reference_layout_map[j][2])
|
||||
goto end_of_layout_definition;
|
||||
}
|
||||
|
||||
e2c_vec[i] = (struct elem_to_channel) {
|
||||
.av_position = AV_CH_TOP_FRONT_CENTER,
|
||||
.syn_ele = layout_map[i][0],
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = layout_map[i][2]
|
||||
}; layout |= e2c_vec[i].av_position; i++;
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_TOP_FRONT_LEFT,
|
||||
AV_CH_TOP_FRONT_RIGHT,
|
||||
AAC_CHANNEL_FRONT,
|
||||
&layout);
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_TOP_SIDE_LEFT,
|
||||
AV_CH_TOP_SIDE_RIGHT,
|
||||
AAC_CHANNEL_SIDE,
|
||||
&layout);
|
||||
e2c_vec[i] = (struct elem_to_channel) {
|
||||
.av_position = AV_CH_TOP_CENTER,
|
||||
.syn_ele = layout_map[i][0],
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = layout_map[i][2]
|
||||
}; layout |= e2c_vec[i].av_position; i++;
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_TOP_BACK_LEFT,
|
||||
AV_CH_TOP_BACK_RIGHT,
|
||||
AAC_CHANNEL_BACK,
|
||||
&layout);
|
||||
e2c_vec[i] = (struct elem_to_channel) {
|
||||
.av_position = AV_CH_TOP_BACK_CENTER,
|
||||
.syn_ele = layout_map[i][0],
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = layout_map[i][2]
|
||||
}; layout |= e2c_vec[i].av_position; i++;
|
||||
e2c_vec[i] = (struct elem_to_channel) {
|
||||
.av_position = AV_CH_BOTTOM_FRONT_CENTER,
|
||||
.syn_ele = layout_map[i][0],
|
||||
.elem_id = layout_map[i][1],
|
||||
.aac_position = layout_map[i][2]
|
||||
}; layout |= e2c_vec[i].av_position; i++;
|
||||
i += assign_pair(e2c_vec, layout_map, i,
|
||||
AV_CH_BOTTOM_FRONT_LEFT,
|
||||
AV_CH_BOTTOM_FRONT_RIGHT,
|
||||
AAC_CHANNEL_FRONT,
|
||||
&layout);
|
||||
}
|
||||
|
||||
end_of_layout_definition:
|
||||
|
||||
// Must choose a stable sort
|
||||
total_non_cc_elements = n = i;
|
||||
do {
|
||||
int next_n = 0;
|
||||
for (i = 1; i < n; i++)
|
||||
if (e2c_vec[i - 1].av_position > e2c_vec[i].av_position) {
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[i - 1], e2c_vec[i]);
|
||||
next_n = i;
|
||||
}
|
||||
n = next_n;
|
||||
} while (n > 0);
|
||||
|
||||
if (layout == AV_CH_LAYOUT_22POINT2) {
|
||||
// For 22.2 reorder the result as needed
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[2], e2c_vec[0]); // FL & FR first (final), FC third
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[2], e2c_vec[1]); // FC second (final), FLc & FRc third
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[6], e2c_vec[2]); // LFE1 third (final), FLc & FRc seventh
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[4], e2c_vec[3]); // BL & BR fourth (final), SiL & SiR fifth
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[6], e2c_vec[4]); // FLc & FRc fifth (final), SiL & SiR seventh
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[7], e2c_vec[6]); // LFE2 seventh (final), SiL & SiR eight (final)
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[9], e2c_vec[8]); // TpFL & TpFR ninth (final), TFC tenth (final)
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[11], e2c_vec[10]); // TC eleventh (final), TpSiL & TpSiR twelth
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[12], e2c_vec[11]); // TpBL & TpBR twelth (final), TpSiL & TpSiR thirteenth (final)
|
||||
} else {
|
||||
// For everything else, utilize the AV channel position define as a
|
||||
// stable sort.
|
||||
do {
|
||||
int next_n = 0;
|
||||
for (i = 1; i < n; i++)
|
||||
if (e2c_vec[i - 1].av_position > e2c_vec[i].av_position) {
|
||||
FFSWAP(struct elem_to_channel, e2c_vec[i - 1], e2c_vec[i]);
|
||||
next_n = i;
|
||||
}
|
||||
n = next_n;
|
||||
} while (n > 0);
|
||||
|
||||
}
|
||||
|
||||
layout = 0;
|
||||
for (i = 0; i < total_non_cc_elements; i++) {
|
||||
layout_map[i][0] = e2c_vec[i].syn_ele;
|
||||
layout_map[i][1] = e2c_vec[i].elem_id;
|
||||
layout_map[i][2] = e2c_vec[i].aac_position;
|
||||
if (e2c_vec[i].av_position != UINT64_MAX) {
|
||||
layout |= e2c_vec[i].av_position;
|
||||
}
|
||||
}
|
||||
|
||||
return layout;
|
||||
@@ -539,9 +447,6 @@ static int output_configure(AACContext *ac,
|
||||
uint8_t id_map[TYPE_END][MAX_ELEM_ID] = {{ 0 }};
|
||||
uint8_t type_counts[TYPE_END] = { 0 };
|
||||
|
||||
if (get_new_frame && !ac->frame)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (ac->oc[1].layout_map != layout_map) {
|
||||
memcpy(ac->oc[1].layout_map, layout_map, tags * sizeof(layout_map[0]));
|
||||
ac->oc[1].layout_map_tags = tags;
|
||||
@@ -621,7 +526,7 @@ static int set_default_channel_config(AACContext *ac, AVCodecContext *avctx,
|
||||
int channel_config)
|
||||
{
|
||||
if (channel_config < 1 || (channel_config > 7 && channel_config < 11) ||
|
||||
channel_config > 13) {
|
||||
channel_config > 12) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"invalid default channel configuration (%d)\n",
|
||||
channel_config);
|
||||
@@ -642,14 +547,11 @@ static int set_default_channel_config(AACContext *ac, AVCodecContext *avctx,
|
||||
* 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;
|
||||
@@ -704,13 +606,6 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
|
||||
/* For indexed channel configurations map the channels solely based
|
||||
* on position. */
|
||||
switch (ac->oc[1].m4ac.chan_config) {
|
||||
case 13:
|
||||
if (ac->tags_mapped > 3 && ((type == TYPE_CPE && elem_id < 8) ||
|
||||
(type == TYPE_SCE && elem_id < 6) ||
|
||||
(type == TYPE_LFE && elem_id < 2))) {
|
||||
ac->tags_mapped++;
|
||||
return ac->tag_che_map[type][elem_id] = ac->che[type][elem_id];
|
||||
}
|
||||
case 12:
|
||||
case 7:
|
||||
if (ac->tags_mapped == 3 && type == TYPE_CPE) {
|
||||
@@ -1079,18 +974,14 @@ static int decode_audio_specific_config_gb(AACContext *ac,
|
||||
{
|
||||
int i, ret;
|
||||
GetBitContext gbc = *gb;
|
||||
MPEG4AudioConfig m4ac_bak = *m4ac;
|
||||
|
||||
if ((i = ff_mpeg4audio_get_config_gb(m4ac, &gbc, sync_extension, avctx)) < 0) {
|
||||
*m4ac = m4ac_bak;
|
||||
if ((i = ff_mpeg4audio_get_config_gb(m4ac, &gbc, sync_extension, avctx)) < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (m4ac->sampling_index > 12) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"invalid sampling rate index %d\n",
|
||||
m4ac->sampling_index);
|
||||
*m4ac = m4ac_bak;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (m4ac->object_type == AOT_ER_AAC_LD &&
|
||||
@@ -1098,7 +989,6 @@ static int decode_audio_specific_config_gb(AACContext *ac,
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"invalid low delay sampling rate index %d\n",
|
||||
m4ac->sampling_index);
|
||||
*m4ac = m4ac_bak;
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
@@ -1206,25 +1096,29 @@ static void reset_predictor_group(PredictorState *ps, int group_num)
|
||||
reset_predict_state(&ps[i]);
|
||||
}
|
||||
|
||||
#define AAC_INIT_VLC_STATIC(num, size) \
|
||||
INIT_VLC_STATIC(&vlc_spectral[num], 8, ff_aac_spectral_sizes[num], \
|
||||
ff_aac_spectral_bits[num], sizeof(ff_aac_spectral_bits[num][0]), \
|
||||
sizeof(ff_aac_spectral_bits[num][0]), \
|
||||
ff_aac_spectral_codes[num], sizeof(ff_aac_spectral_codes[num][0]), \
|
||||
sizeof(ff_aac_spectral_codes[num][0]), \
|
||||
size);
|
||||
|
||||
static void aacdec_init(AACContext *ac);
|
||||
|
||||
static av_cold void aac_static_table_init(void)
|
||||
{
|
||||
static VLC_TYPE vlc_buf[304 + 270 + 550 + 300 + 328 +
|
||||
294 + 306 + 268 + 510 + 366 + 462][2];
|
||||
for (unsigned i = 0, offset = 0; i < 11; i++) {
|
||||
vlc_spectral[i].table = &vlc_buf[offset];
|
||||
vlc_spectral[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset;
|
||||
ff_init_vlc_sparse(&vlc_spectral[i], 8, ff_aac_spectral_sizes[i],
|
||||
ff_aac_spectral_bits[i], sizeof(ff_aac_spectral_bits[i][0]),
|
||||
sizeof(ff_aac_spectral_bits[i][0]),
|
||||
ff_aac_spectral_codes[i], sizeof(ff_aac_spectral_codes[i][0]),
|
||||
sizeof(ff_aac_spectral_codes[i][0]),
|
||||
ff_aac_codebook_vector_idx[i], sizeof(ff_aac_codebook_vector_idx[i][0]),
|
||||
sizeof(ff_aac_codebook_vector_idx[i][0]),
|
||||
INIT_VLC_STATIC_OVERLONG);
|
||||
offset += vlc_spectral[i].table_size;
|
||||
}
|
||||
AAC_INIT_VLC_STATIC( 0, 304);
|
||||
AAC_INIT_VLC_STATIC( 1, 270);
|
||||
AAC_INIT_VLC_STATIC( 2, 550);
|
||||
AAC_INIT_VLC_STATIC( 3, 300);
|
||||
AAC_INIT_VLC_STATIC( 4, 328);
|
||||
AAC_INIT_VLC_STATIC( 5, 294);
|
||||
AAC_INIT_VLC_STATIC( 6, 306);
|
||||
AAC_INIT_VLC_STATIC( 7, 268);
|
||||
AAC_INIT_VLC_STATIC( 8, 510);
|
||||
AAC_INIT_VLC_STATIC( 9, 366);
|
||||
AAC_INIT_VLC_STATIC(10, 462);
|
||||
|
||||
AAC_RENAME(ff_aac_sbr_init)();
|
||||
|
||||
@@ -1241,18 +1135,17 @@ static av_cold void aac_static_table_init(void)
|
||||
352);
|
||||
|
||||
// window initialization
|
||||
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_long_1024), 4.0, 1024);
|
||||
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_short_128), 6.0, 128);
|
||||
#if !USE_FIXED
|
||||
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960);
|
||||
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_RENAME(ff_aac_kbd_long_960), 4.0, 960);
|
||||
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(ff_aac_kbd_short_120), 6.0, 120);
|
||||
AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_960), 960);
|
||||
AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_120), 120);
|
||||
#endif
|
||||
AAC_RENAME(ff_init_ff_sine_windows)(10);
|
||||
AAC_RENAME(ff_init_ff_sine_windows)( 9);
|
||||
AAC_RENAME(ff_init_ff_sine_windows)( 7);
|
||||
|
||||
AAC_RENAME(ff_cbrt_tableinit)();
|
||||
}
|
||||
@@ -1810,6 +1703,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
#if !USE_FIXED
|
||||
const float *vq = ff_aac_codebook_vector_vals[cbt_m1];
|
||||
#endif /* !USE_FIXED */
|
||||
const uint16_t *cb_vector_idx = ff_aac_codebook_vector_idx[cbt_m1];
|
||||
VLC_TYPE (*vlc_tab)[2] = vlc_spectral[cbt_m1].table;
|
||||
OPEN_READER(re, gb);
|
||||
|
||||
@@ -1825,7 +1719,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||
cb_idx = code;
|
||||
cb_idx = cb_vector_idx[code];
|
||||
#if USE_FIXED
|
||||
cf = DEC_SQUAD(cf, cb_idx);
|
||||
#else
|
||||
@@ -1848,7 +1742,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||
cb_idx = code;
|
||||
cb_idx = cb_vector_idx[code];
|
||||
nnz = cb_idx >> 8 & 15;
|
||||
bits = nnz ? GET_CACHE(re, gb) : 0;
|
||||
LAST_SKIP_BITS(re, gb, nnz);
|
||||
@@ -1872,7 +1766,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||
cb_idx = code;
|
||||
cb_idx = cb_vector_idx[code];
|
||||
#if USE_FIXED
|
||||
cf = DEC_SPAIR(cf, cb_idx);
|
||||
#else
|
||||
@@ -1896,7 +1790,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||
cb_idx = code;
|
||||
cb_idx = cb_vector_idx[code];
|
||||
nnz = cb_idx >> 8 & 15;
|
||||
sign = nnz ? SHOW_UBITS(re, gb, nnz) << (cb_idx >> 12) : 0;
|
||||
LAST_SKIP_BITS(re, gb, nnz);
|
||||
@@ -1929,14 +1823,14 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
|
||||
|
||||
UPDATE_CACHE(re, gb);
|
||||
GET_VLC(code, re, gb, vlc_tab, 8, 2);
|
||||
cb_idx = code;
|
||||
|
||||
if (cb_idx == 0x0000) {
|
||||
if (!code) {
|
||||
*icf++ = 0;
|
||||
*icf++ = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
cb_idx = cb_vector_idx[code];
|
||||
nnz = cb_idx >> 12;
|
||||
nzt = cb_idx >> 8;
|
||||
bits = SHOW_UBITS(re, gb, nnz) << (32-nnz);
|
||||
@@ -2654,10 +2548,10 @@ static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns,
|
||||
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_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024);
|
||||
const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128);
|
||||
const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024);
|
||||
const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_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);
|
||||
@@ -2714,8 +2608,8 @@ static void update_ltp(AACContext *ac, SingleChannelElement *sce)
|
||||
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_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024);
|
||||
const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128);
|
||||
int i;
|
||||
|
||||
if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) {
|
||||
@@ -2753,9 +2647,9 @@ static void imdct_and_windowing(AACContext *ac, SingleChannelElement *sce)
|
||||
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_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128);
|
||||
const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_1024) : AAC_RENAME(ff_sine_1024);
|
||||
const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_short_128) : AAC_RENAME(ff_sine_128);
|
||||
INTFLOAT *buf = ac->buf_mdct;
|
||||
INTFLOAT *temp = ac->temp;
|
||||
int i;
|
||||
@@ -2822,9 +2716,9 @@ static void imdct_and_windowing_960(AACContext *ac, SingleChannelElement *sce)
|
||||
INTFLOAT *in = sce->coeffs;
|
||||
INTFLOAT *out = sce->ret;
|
||||
INTFLOAT *saved = sce->saved;
|
||||
const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(aac_kbd_short_120) : AAC_RENAME(sine_120);
|
||||
const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_long_960) : AAC_RENAME(sine_960);
|
||||
const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_short_120) : AAC_RENAME(sine_120);
|
||||
const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(ff_aac_kbd_short_120) : AAC_RENAME(ff_sine_120);
|
||||
const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_long_960) : AAC_RENAME(ff_sine_960);
|
||||
const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(ff_aac_kbd_short_120) : AAC_RENAME(ff_sine_120);
|
||||
INTFLOAT *buf = ac->buf_mdct;
|
||||
INTFLOAT *temp = ac->temp;
|
||||
int i;
|
||||
@@ -2901,10 +2795,10 @@ static void imdct_and_windowing_ld(AACContext *ac, SingleChannelElement *sce)
|
||||
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
|
||||
@@ -2913,7 +2807,7 @@ static void imdct_and_windowing_ld(AACContext *ac, SingleChannelElement *sce)
|
||||
|
||||
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;
|
||||
@@ -3224,8 +3118,7 @@ static int aac_decode_er_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -3320,7 +3213,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, void *data,
|
||||
break;
|
||||
|
||||
case TYPE_PCE: {
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3] = {{0}};
|
||||
uint8_t layout_map[MAX_ELEM_ID*4][3];
|
||||
int tags;
|
||||
|
||||
int pushed = push_output_configuration(ac);
|
||||
@@ -3445,11 +3338,11 @@ static int aac_decode_frame(AVCodecContext *avctx, void *data,
|
||||
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);
|
||||
|
||||
+2
-21
@@ -35,9 +35,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 4, 5, 16, 5, 0 };
|
||||
static const int8_t tags_per_config[16] = { 0, 1, 1, 2, 3, 3, 4, 5, 0, 0, 0, 4, 5, 0, 5, 0 };
|
||||
|
||||
static const uint8_t aac_channel_layout_map[16][16][3] = {
|
||||
static const uint8_t aac_channel_layout_map[16][5][3] = {
|
||||
{ { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, },
|
||||
{ { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, },
|
||||
{ { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, },
|
||||
@@ -50,24 +50,6 @@ static const uint8_t aac_channel_layout_map[16][16][3] = {
|
||||
{ { 0, } },
|
||||
{ { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_BACK }, { TYPE_SCE, 1, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, },
|
||||
{ { TYPE_SCE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 0, AAC_CHANNEL_FRONT }, { TYPE_CPE, 1, AAC_CHANNEL_SIDE }, { TYPE_CPE, 2, AAC_CHANNEL_BACK }, { TYPE_LFE, 0, AAC_CHANNEL_LFE }, },
|
||||
{
|
||||
{ TYPE_SCE, 0, AAC_CHANNEL_FRONT }, // SCE1 = FC,
|
||||
{ TYPE_CPE, 0, AAC_CHANNEL_FRONT }, // CPE1 = FLc and FRc,
|
||||
{ TYPE_CPE, 1, AAC_CHANNEL_FRONT }, // CPE2 = FL and FR,
|
||||
{ TYPE_CPE, 2, AAC_CHANNEL_SIDE }, // CPE3 = SiL and SiR,
|
||||
{ TYPE_CPE, 3, AAC_CHANNEL_BACK }, // CPE4 = BL and BR,
|
||||
{ TYPE_SCE, 1, AAC_CHANNEL_BACK }, // SCE2 = BC,
|
||||
{ TYPE_LFE, 0, AAC_CHANNEL_LFE }, // LFE1 = LFE1,
|
||||
{ TYPE_LFE, 1, AAC_CHANNEL_LFE }, // LFE2 = LFE2,
|
||||
{ TYPE_SCE, 2, AAC_CHANNEL_FRONT }, // SCE3 = TpFC,
|
||||
{ TYPE_CPE, 4, AAC_CHANNEL_FRONT }, // CPE5 = TpFL and TpFR,
|
||||
{ TYPE_CPE, 5, AAC_CHANNEL_SIDE }, // CPE6 = TpSiL and TpSiR,
|
||||
{ TYPE_SCE, 3, AAC_CHANNEL_FRONT }, // SCE4 = TpC,
|
||||
{ TYPE_CPE, 6, AAC_CHANNEL_BACK }, // CPE7 = TpBL and TpBR,
|
||||
{ TYPE_SCE, 4, AAC_CHANNEL_BACK }, // SCE5 = TpBC,
|
||||
{ TYPE_SCE, 5, AAC_CHANNEL_FRONT }, // SCE6 = BtFC,
|
||||
{ TYPE_CPE, 7, AAC_CHANNEL_FRONT }, // CPE8 = BtFL and BtFR
|
||||
},
|
||||
{ { 0, } },
|
||||
/* TODO: Add 7+1 TOP configuration */
|
||||
};
|
||||
@@ -85,7 +67,6 @@ static const uint64_t aac_channel_layout[16] = {
|
||||
0,
|
||||
AV_CH_LAYOUT_6POINT1,
|
||||
AV_CH_LAYOUT_7POINT1,
|
||||
AV_CH_LAYOUT_22POINT2,
|
||||
0,
|
||||
/* AV_CH_LAYOUT_7POINT1_TOP, */
|
||||
};
|
||||
|
||||
+33
-16
@@ -28,15 +28,16 @@
|
||||
* TODOs:
|
||||
* add sane pulse detection
|
||||
***********************************/
|
||||
#include <float.h>
|
||||
|
||||
#include "libavutil/libm.h"
|
||||
#include "libavutil/thread.h"
|
||||
#include "libavutil/float_dsp.h"
|
||||
#include "libavutil/opt.h"
|
||||
#include "avcodec.h"
|
||||
#include "put_bits.h"
|
||||
#include "internal.h"
|
||||
#include "mpeg4audio.h"
|
||||
#include "kbdwin.h"
|
||||
#include "sinewin.h"
|
||||
#include "profiles.h"
|
||||
|
||||
@@ -48,6 +49,8 @@
|
||||
|
||||
#include "psymodel.h"
|
||||
|
||||
static AVOnce aac_table_init = AV_ONCE_INIT;
|
||||
|
||||
static void put_pce(PutBitContext *pb, AVCodecContext *avctx)
|
||||
{
|
||||
int i, j;
|
||||
@@ -80,9 +83,9 @@ static void put_pce(PutBitContext *pb, AVCodecContext *avctx)
|
||||
}
|
||||
}
|
||||
|
||||
align_put_bits(pb);
|
||||
avpriv_align_put_bits(pb);
|
||||
put_bits(pb, 8, strlen(aux_data));
|
||||
ff_put_string(pb, aux_data, 0);
|
||||
avpriv_put_string(pb, aux_data, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,7 +522,7 @@ static void put_bitstream_info(AACEncContext *s, const char *name)
|
||||
put_bits(&s->pb, 8, namelen - 14);
|
||||
put_bits(&s->pb, 4, 0); //extension type - filler
|
||||
padbits = -put_bits_count(&s->pb) & 7;
|
||||
align_put_bits(&s->pb);
|
||||
avpriv_align_put_bits(&s->pb);
|
||||
for (i = 0; i < namelen - 2; i++)
|
||||
put_bits(&s->pb, 8, name[i]);
|
||||
put_bits(&s->pb, 12 - padbits, 0);
|
||||
@@ -853,7 +856,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
/* Not so fast though */
|
||||
ratio = sqrtf(ratio);
|
||||
}
|
||||
s->lambda = av_clipf(s->lambda * ratio, FLT_EPSILON, 65536.f);
|
||||
s->lambda = FFMIN(s->lambda * ratio, 65536.f);
|
||||
|
||||
/* Keep iterating if we must reduce and lambda is in the sky */
|
||||
if (ratio > 0.9f && ratio < 1.1f) {
|
||||
@@ -898,7 +901,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
|
||||
{
|
||||
AACEncContext *s = avctx->priv_data;
|
||||
|
||||
av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_count ? s->lambda_sum / s->lambda_count : NAN);
|
||||
av_log(avctx, AV_LOG_INFO, "Qavg: %.3f\n", s->lambda_sum / s->lambda_count);
|
||||
|
||||
ff_mdct_end(&s->mdct1024);
|
||||
ff_mdct_end(&s->mdct128);
|
||||
@@ -922,7 +925,10 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
// window init
|
||||
ff_aac_float_common_init();
|
||||
ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024);
|
||||
ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128);
|
||||
ff_init_ff_sine_windows(10);
|
||||
ff_init_ff_sine_windows(7);
|
||||
|
||||
if ((ret = ff_mdct_init(&s->mdct1024, 11, 0, 32768.0)) < 0)
|
||||
return ret;
|
||||
@@ -935,14 +941,20 @@ static av_cold int dsp_init(AVCodecContext *avctx, AACEncContext *s)
|
||||
static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
|
||||
{
|
||||
int ch;
|
||||
if (!FF_ALLOCZ_TYPED_ARRAY(s->buffer.samples, s->channels * 3 * 1024) ||
|
||||
!FF_ALLOCZ_TYPED_ARRAY(s->cpe, s->chan_map[0]))
|
||||
return AVERROR(ENOMEM);
|
||||
FF_ALLOCZ_ARRAY_OR_GOTO(avctx, s->buffer.samples, s->channels, 3 * 1024 * sizeof(s->buffer.samples[0]), alloc_fail);
|
||||
FF_ALLOCZ_ARRAY_OR_GOTO(avctx, s->cpe, s->chan_map[0], sizeof(ChannelElement), alloc_fail);
|
||||
|
||||
for(ch = 0; ch < s->channels; ch++)
|
||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||
|
||||
return 0;
|
||||
alloc_fail:
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
static av_cold void aac_encode_init_tables(void)
|
||||
{
|
||||
ff_aac_tableinit();
|
||||
}
|
||||
|
||||
static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
@@ -1066,13 +1078,13 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
s->options.mid_side = 0;
|
||||
|
||||
if ((ret = dsp_init(avctx, s)) < 0)
|
||||
return ret;
|
||||
goto fail;
|
||||
|
||||
if ((ret = alloc_buffers(avctx, s)) < 0)
|
||||
return ret;
|
||||
goto fail;
|
||||
|
||||
if ((ret = put_audio_specific_config(avctx)))
|
||||
return ret;
|
||||
goto fail;
|
||||
|
||||
sizes[0] = ff_aac_swb_size_1024[s->samplerate_index];
|
||||
sizes[1] = ff_aac_swb_size_128[s->samplerate_index];
|
||||
@@ -1082,7 +1094,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
grouping[i] = s->chan_map[i + 1] == TYPE_CPE;
|
||||
if ((ret = ff_psy_init(&s->psy, avctx, 2, sizes, lengths,
|
||||
s->chan_map[0], grouping)) < 0)
|
||||
return ret;
|
||||
goto fail;
|
||||
s->psypp = ff_psy_preprocess_init(avctx);
|
||||
ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
|
||||
s->random_state = 0x1f2e3d4c;
|
||||
@@ -1096,10 +1108,15 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
if (HAVE_MIPSDSP)
|
||||
ff_aac_coder_init_mips(s);
|
||||
|
||||
if ((ret = ff_thread_once(&aac_table_init, &aac_encode_init_tables)) != 0)
|
||||
return AVERROR_UNKNOWN;
|
||||
|
||||
ff_af_queue_init(avctx, &s->afq);
|
||||
ff_aac_tableinit();
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
aac_encode_end(avctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM
|
||||
@@ -1142,7 +1159,7 @@ AVCodec ff_aac_encoder = {
|
||||
.close = aac_encode_end,
|
||||
.defaults = aac_encode_defaults,
|
||||
.supported_samplerates = mpeg4audio_sample_rates,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP,
|
||||
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
|
||||
.capabilities = AV_CODEC_CAP_SMALL_LAST_FRAME | AV_CODEC_CAP_DELAY,
|
||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
+13
-27
@@ -173,7 +173,6 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
sce->ics.window_sequence[0] == LONG_START_SEQUENCE ? 0 : 2;
|
||||
const int sfb_len = sfb_end - sfb_start;
|
||||
const int coef_len = sce->ics.swb_offset[sfb_end] - sce->ics.swb_offset[sfb_start];
|
||||
const int n_filt = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
|
||||
|
||||
if (coef_len <= 0 || sfb_len <= 0) {
|
||||
sce->tns.present = 0;
|
||||
@@ -181,30 +180,16 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
}
|
||||
|
||||
for (w = 0; w < sce->ics.num_windows; w++) {
|
||||
float en[4] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
int oc_start = 0;
|
||||
float en[2] = {0.0f, 0.0f};
|
||||
int oc_start = 0, os_start = 0;
|
||||
int coef_start = sce->ics.swb_offset[sfb_start];
|
||||
|
||||
if (n_filt == 2) {
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2))
|
||||
en[1] += band->energy; /* End */
|
||||
else
|
||||
en[0] += band->energy; /* Start */
|
||||
}
|
||||
en[2] = en[0];
|
||||
} else {
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2) + (sfb_len/4))
|
||||
en[2] += band->energy; /* End */
|
||||
else if (g > sfb_start + (sfb_len/2) - (sfb_len/4))
|
||||
en[1] += band->energy; /* Middle */
|
||||
else
|
||||
en[0] += band->energy; /* Start */
|
||||
}
|
||||
en[3] = en[0];
|
||||
for (g = sfb_start; g < sce->ics.num_swb && g <= sfb_end; g++) {
|
||||
FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[w*16+g];
|
||||
if (g > sfb_start + (sfb_len/2))
|
||||
en[1] += band->energy;
|
||||
else
|
||||
en[0] += band->energy;
|
||||
}
|
||||
|
||||
/* LPC */
|
||||
@@ -214,14 +199,15 @@ void ff_aac_search_for_tns(AACEncContext *s, SingleChannelElement *sce)
|
||||
if (!order || !isfinite(gain) || gain < TNS_GAIN_THRESHOLD_LOW || gain > TNS_GAIN_THRESHOLD_HIGH)
|
||||
continue;
|
||||
|
||||
tns->n_filt[w] = n_filt;
|
||||
tns->n_filt[w] = is8 ? 1 : order != TNS_MAX_ORDER ? 2 : 3;
|
||||
for (g = 0; g < tns->n_filt[w]; g++) {
|
||||
tns->direction[w][g] = slant != 2 ? slant : en[g] < en[g + 1];
|
||||
tns->order[w][g] = order/tns->n_filt[w];
|
||||
tns->length[w][g] = sfb_len/tns->n_filt[w];
|
||||
tns->direction[w][g] = slant != 2 ? slant : en[g] < en[!g];
|
||||
tns->order[w][g] = g < tns->n_filt[w] ? order/tns->n_filt[w] : order - oc_start;
|
||||
tns->length[w][g] = g < tns->n_filt[w] ? sfb_len/tns->n_filt[w] : sfb_len - os_start;
|
||||
quantize_coefs(&coefs[oc_start], tns->coef_idx[w][g], tns->coef[w][g],
|
||||
tns->order[w][g], c_bits);
|
||||
oc_start += tns->order[w][g];
|
||||
os_start += tns->length[w][g];
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ static const uint8_t swb_size_1024_8[] = {
|
||||
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 @@ const uint8_t *const ff_aac_swb_size_128[] = {
|
||||
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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
+341
-43
@@ -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 @@ static void ipdopd_reset(int8_t *ipd_hist, int8_t *opd_hist)
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ static void decorrelation(PSContext *ps, INTFLOAT (*out)[32][2], const INTFLOAT
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
{
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
}
|
||||
|
||||
//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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
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 @@ static void stereo_processing(PSContext *ps, INTFLOAT (*l)[32][2], INTFLOAT (*r)
|
||||
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 @@ int AAC_RENAME(ff_ps_apply)(AVCodecContext *avctx, PSContext *ps, INTFLOAT L[2][
|
||||
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 @@ int AAC_RENAME(ff_ps_apply)(AVCodecContext *avctx, PSContext *ps, INTFLOAT L[2][
|
||||
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)
|
||||
|
||||
+2
-18
@@ -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 @@ typedef struct PSCommonContext {
|
||||
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 @@ typedef struct PSContext {
|
||||
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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#define BUILD_TABLES
|
||||
#define CONFIG_HARDCODED_TABLES 0
|
||||
#include "aac_defines.h"
|
||||
|
||||
|
||||
@@ -142,17 +142,22 @@ static const int8_t huff_offset[] = {
|
||||
};
|
||||
|
||||
///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)
|
||||
};
|
||||
|
||||
+1
-4
@@ -308,9 +308,6 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) {
|
||||
const int bandwidth = ctx->cutoff ? ctx->cutoff : AAC_CUTOFF(ctx->avctx);
|
||||
const float num_bark = calc_bark((float)bandwidth);
|
||||
|
||||
if (bandwidth <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
ctx->model_priv_data = av_mallocz(sizeof(AacPsyContext));
|
||||
if (!ctx->model_priv_data)
|
||||
return AVERROR(ENOMEM);
|
||||
@@ -797,7 +794,7 @@ static void psy_3gpp_analyze_channel(FFPsyContext *ctx, int channel,
|
||||
|
||||
if (pe < 1.15f * desired_pe) {
|
||||
/* 6.6.1.3.6 "Final threshold modification by linearization" */
|
||||
norm_fac = norm_fac ? 1.0f / norm_fac : 0;
|
||||
norm_fac = 1.0f / norm_fac;
|
||||
for (w = 0; w < wi->num_windows*16; w += 16) {
|
||||
for (g = 0; g < num_bands; g++) {
|
||||
AacPsyBand *band = &pch->band[w+g];
|
||||
|
||||
+1
-1
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 */
|
||||
@@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2020
|
||||
* Header file for hardcoded AAC SBR windows
|
||||
*
|
||||
* Copyright (c) 2014 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
|
||||
*
|
||||
* This file is part of FFmpeg.
|
||||
*
|
||||
@@ -18,19 +20,9 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef AVFILTER_DNN_SAFE_QUEUE_H
|
||||
#define AVFILTER_DNN_SAFE_QUEUE_H
|
||||
#ifndef AVCODEC_AACSBR_TABLEGEN_H
|
||||
#define AVCODEC_AACSBR_TABLEGEN_H
|
||||
|
||||
typedef struct SafeQueue SafeQueue;
|
||||
#include "aacsbr_tablegen_common.h"
|
||||
|
||||
SafeQueue *ff_safe_queue_create(void);
|
||||
void ff_safe_queue_destroy(SafeQueue *sq);
|
||||
|
||||
size_t ff_safe_queue_size(SafeQueue *sq);
|
||||
|
||||
int ff_safe_queue_push_front(SafeQueue *sq, void *v);
|
||||
int ff_safe_queue_push_back(SafeQueue *sq, void *v);
|
||||
|
||||
void *ff_safe_queue_pop_front(SafeQueue *sq);
|
||||
|
||||
#endif
|
||||
#endif /* AVCODEC_AACSBR_TABLEGEN_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 */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user