[packages/firefox] upstream changes adding support for ffmpeg 4.0; rel 2
atler
atler at pld-linux.org
Mon May 28 23:51:26 CEST 2018
commit eafc73df01984964f2df2ff9c578f6843ecbd338
Author: Jan Palus <atler at pld-linux.org>
Date: Mon May 28 23:29:11 2018 +0200
upstream changes adding support for ffmpeg 4.0; rel 2
ffmpeg4.patch | 13698 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
firefox.spec | 4 +-
2 files changed, 13701 insertions(+), 1 deletion(-)
---
diff --git a/firefox.spec b/firefox.spec
index c9f04f7..f80a8cf 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -38,7 +38,7 @@ Summary(hu.UTF-8): Firefox web böngésző
Summary(pl.UTF-8): Firefox - przeglądarka WWW
Name: firefox
Version: 60.0.1
-Release: 1
+Release: 2
License: MPL v2.0
Group: X11/Applications/Networking
# http://archive.mozilla.org/pub/firefox/releases/%{version}/SOURCE
@@ -237,6 +237,7 @@ Source192: http://releases.mozilla.org/pub/firefox/releases/%{version}/linux-i68
Source193: http://releases.mozilla.org/pub/firefox/releases/%{version}/linux-i686/xpi/zh-TW.xpi
# Source193-md5: e39e38f56667178e17e4cdb85a5d1114
Patch0: idl-parser.patch
+Patch1: ffmpeg4.patch
Patch4: %{name}-prefs.patch
Patch5: %{name}-pld-bookmarks.patch
Patch6: %{name}-no-subshell.patch
@@ -2024,6 +2025,7 @@ unpack() {
echo 'LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS)' >> extensions/spellcheck/src/Makefile.in
%patch0 -p2
+%patch1 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p2
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
new file mode 100644
index 0000000..20b185c
--- /dev/null
+++ b/ffmpeg4.patch
@@ -0,0 +1,13698 @@
+
+# HG changeset patch
+# User Jean-Yves Avenard <jyavenard at mozilla.com>
+# Date 1524125955 -7200
+# Node ID 2f39b32593bd0d1d5ebd7623bdf324610027074f
+# Parent b2e2129293dd05a64e0d9ccaf3ff214307b2c8b7
+Bug 1435212 - Add support for FFmpeg 4.0. r=bryce, a=jcristau
+
+MozReview-Commit-ID: JlDFSUyGQu
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp
+@@ -72,25 +72,31 @@ FFmpegDataDecoder<LIBAV_VER>::InitDecode
+ mCodecContext->opaque = this;
+
+ InitCodecContext();
+
+ if (mExtraData) {
+ mCodecContext->extradata_size = mExtraData->Length();
+ // FFmpeg may use SIMD instructions to access the data which reads the
+ // data in 32 bytes block. Must ensure we have enough data to read.
++#if LIBAVCODEC_VERSION_MAJOR >= 58
++ mExtraData->AppendElements(AV_INPUT_BUFFER_PADDING_SIZE);
++#else
+ mExtraData->AppendElements(FF_INPUT_BUFFER_PADDING_SIZE);
++#endif
+ mCodecContext->extradata = mExtraData->Elements();
+ } else {
+ mCodecContext->extradata_size = 0;
+ }
+
++#if LIBAVCODEC_VERSION_MAJOR < 57
+ if (codec->capabilities & CODEC_CAP_DR1) {
+ mCodecContext->flags |= CODEC_FLAG_EMU_EDGE;
+ }
++#endif
+
+ if (mLib->avcodec_open2(mCodecContext, codec, nullptr) < 0) {
+ mLib->avcodec_close(mCodecContext);
+ mLib->av_freep(&mCodecContext);
+ return MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
+ RESULT_DETAIL("Couldn't initialise ffmpeg decoder"));
+ }
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegLibWrapper.cpp
+@@ -56,22 +56,24 @@ FFmpegLibWrapper::Link()
+
+ enum {
+ AV_FUNC_AVUTIL_MASK = 1 << 8,
+ AV_FUNC_53 = 1 << 0,
+ AV_FUNC_54 = 1 << 1,
+ AV_FUNC_55 = 1 << 2,
+ AV_FUNC_56 = 1 << 3,
+ AV_FUNC_57 = 1 << 4,
++ AV_FUNC_58 = 1 << 5,
+ AV_FUNC_AVUTIL_53 = AV_FUNC_53 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVUTIL_54 = AV_FUNC_54 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVUTIL_55 = AV_FUNC_55 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVUTIL_56 = AV_FUNC_56 | AV_FUNC_AVUTIL_MASK,
+ AV_FUNC_AVUTIL_57 = AV_FUNC_57 | AV_FUNC_AVUTIL_MASK,
+- AV_FUNC_AVCODEC_ALL = AV_FUNC_53 | AV_FUNC_54 | AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57,
++ AV_FUNC_AVUTIL_58 = AV_FUNC_58 | AV_FUNC_AVUTIL_MASK,
++ AV_FUNC_AVCODEC_ALL = AV_FUNC_53 | AV_FUNC_54 | AV_FUNC_55 | AV_FUNC_56 | AV_FUNC_57 | AV_FUNC_58,
+ AV_FUNC_AVUTIL_ALL = AV_FUNC_AVCODEC_ALL | AV_FUNC_AVUTIL_MASK
+ };
+
+ switch (macro) {
+ case 53:
+ version = AV_FUNC_53;
+ break;
+ case 54:
+@@ -81,16 +83,19 @@ FFmpegLibWrapper::Link()
+ version = AV_FUNC_55;
+ break;
+ case 56:
+ version = AV_FUNC_56;
+ break;
+ case 57:
+ version = AV_FUNC_57;
+ break;
++ case 58:
++ version = AV_FUNC_58;
++ break;
+ default:
+ FFMPEG_LOG("Unknown avcodec version");
+ Unlink();
+ return isFFMpeg
+ ? ((macro > 57)
+ ? LinkResult::UnknownFutureFFMpegVersion
+ : LinkResult::UnknownOlderFFMpegVersion)
+ // All LibAV versions<54.35.1 are blocked, therefore we must be
+@@ -129,19 +134,19 @@ FFmpegLibWrapper::Link()
+ AV_FUNC(av_parser_close, AV_FUNC_AVCODEC_ALL)
+ AV_FUNC(av_parser_parse2, AV_FUNC_AVCODEC_ALL)
+ AV_FUNC(avcodec_alloc_frame, (AV_FUNC_53 | AV_FUNC_54))
+ AV_FUNC(avcodec_get_frame_defaults, (AV_FUNC_53 | AV_FUNC_54))
+ AV_FUNC(avcodec_free_frame, AV_FUNC_54)
+ AV_FUNC(av_log_set_level, AV_FUNC_AVUTIL_ALL)
+ AV_FUNC(av_malloc, AV_FUNC_AVUTIL_ALL)
+ AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL)
+- AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
+- AV_FUNC(av_frame_free, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
+- AV_FUNC(av_frame_unref, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57))
++ AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
++ AV_FUNC(av_frame_free, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
++ AV_FUNC(av_frame_unref, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57 | AV_FUNC_AVUTIL_58))
+ AV_FUNC_OPTION(av_frame_get_colorspace, AV_FUNC_AVUTIL_ALL)
+ #undef AV_FUNC
+ #undef AV_FUNC_OPTION
+
+ avcodec_register_all();
+ if (MOZ_LOG_TEST(sPDMLog, LogLevel::Debug)) {
+ av_log_set_level(AV_LOG_DEBUG);
+ } else if (MOZ_LOG_TEST(sPDMLog, LogLevel::Info)) {
+diff --git a/dom/media/platforms/ffmpeg/FFmpegLibs.h b/dom/media/platforms/ffmpeg/FFmpegLibs.h
+--- a/dom/media/platforms/ffmpeg/FFmpegLibs.h
++++ b/dom/media/platforms/ffmpeg/FFmpegLibs.h
+@@ -22,18 +22,20 @@ extern "C" {
+ #if LIBAVCODEC_VERSION_MAJOR < 55
+ #define AV_CODEC_ID_VP6F CODEC_ID_VP6F
+ #define AV_CODEC_ID_H264 CODEC_ID_H264
+ #define AV_CODEC_ID_AAC CODEC_ID_AAC
+ #define AV_CODEC_ID_MP3 CODEC_ID_MP3
+ #define AV_CODEC_ID_VP8 CODEC_ID_VP8
+ #define AV_CODEC_ID_NONE CODEC_ID_NONE
+ #define AV_CODEC_ID_FLAC CODEC_ID_FLAC
++typedef CodecID AVCodecID;
++#endif
++#if LIBAVCODEC_VERSION_MAJOR <= 55
+ #define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY
+-typedef CodecID AVCodecID;
+ #endif
+
+ #ifdef FFVPX_VERSION
+ enum { LIBAV_VER = FFVPX_VERSION };
+ #else
+ enum { LIBAV_VER = LIBAVCODEC_VERSION_MAJOR };
+ #endif
+
+diff --git a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegRuntimeLinker.cpp
+@@ -21,22 +21,25 @@ template <int V> class FFmpegDecoderModu
+ public:
+ static already_AddRefed<PlatformDecoderModule> Create(FFmpegLibWrapper*);
+ };
+
+ static FFmpegLibWrapper sLibAV;
+
+ static const char* sLibs[] = {
+ #if defined(XP_DARWIN)
++ "libavcodec.58.dylib",
+ "libavcodec.57.dylib",
+ "libavcodec.56.dylib",
+ "libavcodec.55.dylib",
+ "libavcodec.54.dylib",
+ "libavcodec.53.dylib",
+ #else
++ "libavcodec.so.58",
++ "libavcodec-ffmpeg.so.58",
+ "libavcodec-ffmpeg.so.57",
+ "libavcodec-ffmpeg.so.56",
+ "libavcodec.so.57",
+ "libavcodec.so.56",
+ "libavcodec.so.55",
+ "libavcodec.so.54",
+ "libavcodec.so.53",
+ #endif
+@@ -129,16 +132,17 @@ FFmpegRuntimeLinker::CreateDecoderModule
+ }
+ RefPtr<PlatformDecoderModule> module;
+ switch (sLibAV.mVersion) {
+ case 53: module = FFmpegDecoderModule<53>::Create(&sLibAV); break;
+ case 54: module = FFmpegDecoderModule<54>::Create(&sLibAV); break;
+ case 55:
+ case 56: module = FFmpegDecoderModule<55>::Create(&sLibAV); break;
+ case 57: module = FFmpegDecoderModule<57>::Create(&sLibAV); break;
++ case 58: module = FFmpegDecoderModule<58>::Create(&sLibAV); break;
+ default: module = nullptr;
+ }
+ return module.forget();
+ }
+
+ /* static */ const char*
+ FFmpegRuntimeLinker::LinkStatusString()
+ {
+diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
++++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
+@@ -161,17 +161,17 @@ FFmpegVideoDecoder<LIBAV_VER>::InitCodec
+ decode_threads = 8;
+ } else if (mInfo.mDisplay.width >= 1024) {
+ decode_threads = 4;
+ } else if (mInfo.mDisplay.width >= 320) {
+ decode_threads = 2;
+ }
+
+ if (mLowLatency) {
+- mCodecContext->flags |= CODEC_FLAG_LOW_DELAY;
++ mCodecContext->flags |= AV_CODEC_FLAG_LOW_DELAY;
+ // ffvp9 and ffvp8 at this stage do not support slice threading, but it may
+ // help with the h264 decoder if there's ever one.
+ mCodecContext->thread_type = FF_THREAD_SLICE;
+ } else {
+ decode_threads = std::min(decode_threads, PR_GetNumberOfProcessors() - 1);
+ decode_threads = std::max(decode_threads, 1);
+ mCodecContext->thread_count = decode_threads;
+ if (decode_threads > 1) {
+diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/include/COPYING.LGPLv2.1 b/dom/media/platforms/ffmpeg/ffmpeg58/include/COPYING.LGPLv2.1
+new file mode 100644
+--- /dev/null
++++ b/dom/media/platforms/ffmpeg/ffmpeg58/include/COPYING.LGPLv2.1
+@@ -0,0 +1,504 @@
++ GNU LESSER GENERAL PUBLIC LICENSE
++ Version 2.1, February 1999
++
++ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ Everyone is permitted to copy and distribute verbatim copies
++ of this license document, but changing it is not allowed.
++
++[This is the first released version of the Lesser GPL. It also counts
++ as the successor of the GNU Library Public License, version 2, hence
++ the version number 2.1.]
++
++ Preamble
++
++ The licenses for most software are designed to take away your
++freedom to share and change it. By contrast, the GNU General Public
++Licenses are intended to guarantee your freedom to share and change
++free software--to make sure the software is free for all its users.
++
++ This license, the Lesser General Public License, applies to some
++specially designated software packages--typically libraries--of the
++Free Software Foundation and other authors who decide to use it. You
++can use it too, but we suggest you first think carefully about whether
++this license or the ordinary General Public License is the better
++strategy to use in any particular case, based on the explanations below.
++
++ When we speak of free software, we are referring to freedom of use,
++not price. Our General Public Licenses are designed to make sure that
++you have the freedom to distribute copies of free software (and charge
++for this service if you wish); that you receive source code or can get
++it if you want it; that you can change the software and use pieces of
++it in new free programs; and that you are informed that you can do
++these things.
++
++ To protect your rights, we need to make restrictions that forbid
++distributors to deny you these rights or to ask you to surrender these
++rights. These restrictions translate to certain responsibilities for
++you if you distribute copies of the library or if you modify it.
++
++ For example, if you distribute copies of the library, whether gratis
++or for a fee, you must give the recipients all the rights that we gave
++you. You must make sure that they, too, receive or can get the source
++code. If you link other code with the library, you must provide
++complete object files to the recipients, so that they can relink them
++with the library after making changes to the library and recompiling
++it. And you must show them these terms so they know their rights.
++
++ We protect your rights with a two-step method: (1) we copyright the
++library, and (2) we offer you this license, which gives you legal
++permission to copy, distribute and/or modify the library.
++
++ To protect each distributor, we want to make it very clear that
++there is no warranty for the free library. Also, if the library is
++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
++restrictive license from a patent holder. Therefore, we insist that
++any patent license obtained for a version of the library must be
++consistent with the full freedom of use specified in this license.
++
++ Most GNU software, including some libraries, is covered by the
++ordinary GNU General Public License. This license, the GNU Lesser
++General Public License, applies to certain designated libraries, and
++is quite different from the ordinary General Public License. We use
++this license for certain libraries in order to permit linking those
++libraries into non-free programs.
++
++ When a program is linked with a library, whether statically or using
++a shared library, the combination of the two is legally speaking a
++combined work, a derivative of the original library. The ordinary
++General Public License therefore permits such linking only if the
++entire combination fits its criteria of freedom. The Lesser General
++Public License permits more lax criteria for linking other code with
++the library.
++
++ We call this license the "Lesser" General Public License because it
++does Less to protect the user's freedom than the ordinary General
++Public License. It also provides other free software developers Less
++of an advantage over competing non-free programs. These disadvantages
++are the reason we use the ordinary General Public License for many
++libraries. However, the Lesser license provides advantages in certain
++special circumstances.
++
++ For example, on rare occasions, there may be a special need to
++encourage the widest possible use of a certain library, so that it becomes
++a de-facto standard. To achieve this, non-free programs must be
++allowed to use the library. A more frequent case is that a free
++library does the same job as widely used non-free libraries. In this
++case, there is little to gain by limiting the free library to free
++software only, so we use the Lesser General Public License.
++
++ In other cases, permission to use a particular library in non-free
++programs enables a greater number of people to use a large body of
++free software. For example, permission to use the GNU C Library in
++non-free programs enables many more people to use the whole GNU
++operating system, as well as its variant, the GNU/Linux operating
++system.
++
++ Although the Lesser General Public License is Less protective of the
++users' freedom, it does ensure that the user of a program that is
++linked with the Library has the freedom and the wherewithal to run
++that program using a modified version of the Library.
++
++ The precise terms and conditions for copying, distribution and
++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
++
++ 0. This License Agreement applies to any software library or other
++program which contains a notice placed by the copyright holder or
++other authorized party saying it may be distributed under the terms of
++this Lesser General Public License (also called "this License").
++Each licensee is addressed as "you".
++
++ A "library" means a collection of software functions and/or data
++prepared so as to be conveniently linked with application programs
++(which use some of those functions and data) to form executables.
++
++ The "Library", below, refers to any such software library or work
++which has been distributed under these terms. A "work based on the
++Library" means either the Library or any derivative work under
++copyright law: that is to say, a work containing the Library or a
++portion of it, either verbatim or with modifications and/or translated
++straightforwardly into another language. (Hereinafter, translation is
++included without limitation in the term "modification".)
++
++ "Source code" for a work means the preferred form of the work for
++making modifications to it. For a library, complete source code means
++all the source code for all modules it contains, plus any associated
++interface definition files, plus the scripts used to control compilation
++and installation of the library.
++
++ Activities other than copying, distribution and modification are not
++covered by this License; they are outside its scope. The act of
++running a program using the Library is not restricted, and output from
++such a program is covered only if its contents constitute a work based
++on the Library (independent of the use of the Library in a tool for
++writing it). Whether that is true depends on what the Library does
++and what the program that uses the Library does.
++
++ 1. You may copy and distribute verbatim copies of the Library's
++complete source code as you receive it, in any medium, provided that
++you conspicuously and appropriately publish on each copy an
++appropriate copyright notice and disclaimer of warranty; keep intact
++all the notices that refer to this License and to the absence of any
++warranty; and distribute a copy of this License along with the
++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
++above, provided that you also meet all of these conditions:
++
++ a) The modified work must itself be a software library.
++
++ b) You must cause the files modified to carry prominent notices
++ stating that you changed the files and the date of any change.
++
++ c) You must cause the whole of the work to be licensed at no
++ charge to all third parties under the terms of this License.
++
++ d) If a facility in the modified Library refers to a function or a
++ table of data to be supplied by an application program that uses
++ the facility, other than as an argument passed when the facility
++ is invoked, then you must make a good faith effort to ensure that,
++ in the event an application does not supply such function or
++ table, the facility still operates, and performs whatever part of
++ its purpose remains meaningful.
++
++ (For example, a function in a library to compute square roots has
++ a purpose that is entirely well-defined independent of the
++ application. Therefore, Subsection 2d requires that any
++ application-supplied function or table used by this function must
++ be optional: if the application does not supply it, the square
++ root function must still compute square roots.)
++
++These requirements apply to the modified work as a whole. If
++identifiable sections of that work are not derived from the Library,
++and can be reasonably considered independent and separate works in
++themselves, then this License, and its terms, do not apply to those
++sections when you distribute them as separate works. But when you
++distribute the same sections as part of a whole which is a work based
++on the Library, the distribution of the whole must be on the terms of
++this License, whose permissions for other licensees extend to the
++entire whole, and thus to each and every part regardless of who wrote
++it.
++
++Thus, it is not the intent of this section to claim rights or contest
++your rights to work written entirely by you; rather, the intent is to
++exercise the right to control the distribution of derivative or
++collective works based on the Library.
++
++In addition, mere aggregation of another work not based on the Library
++with the Library (or with a work based on the Library) on a volume of
++a storage or distribution medium does not bring the other work under
++the scope of this License.
++
++ 3. You may opt to apply the terms of the ordinary GNU General Public
++License instead of this License to a given copy of the Library. To do
++this, you must alter all the notices that refer to this License, so
++that they refer to the ordinary GNU General Public License, version 2,
++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.
++
++ This option is useful when you wish to copy part of the code of
++the Library into a program that is not a library.
++
++ 4. You may copy and distribute the Library (or a portion or
++derivative of it, under Section 2) in object code or executable form
++under the terms of Sections 1 and 2 above provided that you accompany
++it with the complete corresponding machine-readable source code, which
++must be distributed under the terms of Sections 1 and 2 above on a
++medium customarily used for software interchange.
++
++ If distribution of object code is made by offering access to copy
++from a designated place, then offering equivalent access to copy the
++source code from the same place satisfies the requirement to
++distribute the source code, even though third parties are not
++compelled to copy the source along with the object code.
++
++ 5. A program that contains no derivative of any portion of the
++Library, but is designed to work with the Library by being compiled or
++linked with it, is called a "work that uses the Library". Such a
++work, in isolation, is not a derivative work of the Library, and
++therefore falls outside the scope of this License.
++
++ However, linking a "work that uses the Library" with the Library
++creates an executable that is a derivative of the Library (because it
++contains portions of the Library), rather than a "work that uses the
++library". The executable is therefore covered by this License.
++Section 6 states terms for distribution of such executables.
++
++ When a "work that uses the Library" uses material from a header file
++that is part of the Library, the object code for the work may be a
++derivative work of the Library even though the source code is not.
++Whether this is true is especially significant if the work can be
++linked without the Library, or if the work is itself a library. The
++threshold for this to be true is not precisely defined by law.
++
++ If such an object file uses only numerical parameters, data
++structure layouts and accessors, and small macros and small inline
++functions (ten lines or less in length), then the use of the object
++file is unrestricted, regardless of whether it is legally a derivative
++work. (Executables containing this object code plus portions of the
++Library will still fall under Section 6.)
++
++ Otherwise, if the work is a derivative of the Library, you may
++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
++under terms of your choice, provided that the terms permit
++modification of the work for the customer's own use and reverse
++engineering for debugging such modifications.
++
++ You must give prominent notice with each copy of the work that the
++Library is used in it and that the Library and its use are covered by
++this License. You must supply a copy of this License. If the work
++during execution displays copyright notices, you must include the
++copyright notice for the Library among them, as well as a reference
++directing the user to the copy of this License. Also, you must do one
++of these things:
++
++ a) Accompany the work with the complete corresponding
++ machine-readable source code for the Library including whatever
++ changes were used in the work (which must be distributed under
++ Sections 1 and 2 above); and, if the work is an executable linked
++ with the Library, with the complete machine-readable "work that
++ uses the Library", as object code and/or source code, so that the
++ user can modify the Library and then relink to produce a modified
++ executable containing the modified Library. (It is understood
++ that the user who changes the contents of definitions files in the
++ Library will not necessarily be able to recompile the application
++ to use the modified definitions.)
++
++ b) Use a suitable shared library mechanism for linking with the
++ Library. A suitable mechanism is one that (1) uses at run time a
++ copy of the library already present on the user's computer system,
++ rather than copying library functions into the executable, and (2)
++ will operate properly with a modified version of the library, if
++ the user installs one, as long as the modified version is
++ interface-compatible with the version that the work was made with.
++
++ c) Accompany the work with a written offer, valid for at
++ least three years, to give the same user the materials
++ specified in Subsection 6a, above, for a charge no more
++ than the cost of performing this distribution.
++
++ d) If distribution of the work is made by offering access to copy
++ from a designated place, offer equivalent access to copy the above
++ specified materials from the same place.
++
++ e) Verify that the user has already received a copy of these
++ materials or that you have already sent this user a copy.
++
++ For an executable, the required form of the "work that uses the
++Library" must include any data and utility programs needed for
++reproducing the executable from it. However, as a special exception,
++the materials to be distributed need not include anything that is
++normally distributed (in either source or binary form) with the major
++components (compiler, kernel, and so on) of the operating system on
++which the executable runs, unless that component itself accompanies
++the executable.
++
++ It may happen that this requirement contradicts the license
++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
++library, provided that the separate distribution of the work based on
++the Library and of the other library facilities is otherwise
++permitted, and provided that you do these two things:
++
++ a) Accompany the combined library with a copy of the same work
++ based on the Library, uncombined with any other library
++ facilities. This must be distributed under the terms of the
++ Sections above.
++
++ b) Give prominent notice with the combined library of the fact
++ that part of it is a work based on the Library, and explaining
++ where to find the accompanying uncombined form of the same work.
++
++ 8. You may not copy, modify, sublicense, link with, or distribute
++the Library except as expressly provided under this License. Any
++attempt otherwise to copy, modify, sublicense, link with, or
++distribute the Library is void, and will automatically terminate your
++rights under this License. However, parties who have received copies,
++or rights, from you under this License will not have their licenses
++terminated so long as such parties remain in full compliance.
++
++ 9. You are not required to accept this License, since you have not
++signed it. However, nothing else grants you permission to modify or
++distribute the Library or its derivative works. These actions are
++prohibited by law if you do not accept this License. Therefore, by
++modifying or distributing the Library (or any work based on the
++Library), you indicate your acceptance of this License to do so, and
++all its terms and conditions for copying, distributing or modifying
++the Library or works based on it.
++
++ 10. Each time you redistribute the Library (or any work based on the
++Library), the recipient automatically receives a license from the
++original licensor to copy, distribute, link with or modify the Library
++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
++otherwise) that contradict the conditions of this License, they do not
++excuse you from the conditions of this License. If you cannot
++distribute so as to satisfy simultaneously your obligations under this
++License and any other pertinent obligations, then as a consequence you
++may not distribute the Library at all. For example, if a patent
++license would not permit royalty-free redistribution of the Library by
++all those who receive copies directly or indirectly through you, then
++the only way you could satisfy both it and this License would be to
++refrain entirely from distribution of the Library.
++
++If any portion of this section is held invalid or unenforceable under any
++particular circumstance, the balance of the section is intended to apply,
++and the section as a whole is intended to apply in other circumstances.
++
++It is not the purpose of this section to induce you to infringe any
++patents or other property right claims or to contest validity of any
++such claims; this section has the sole purpose of protecting the
++integrity of the free software distribution system which is
++implemented by public license practices. Many people have made
++generous contributions to the wide range of software distributed
++through that system in reliance on consistent application of that
++system; it is up to the author/donor to decide if he or she is willing
++to distribute software through any other system and a licensee cannot
++impose that choice.
++
++This section is intended to make thoroughly clear what is believed to
++be a consequence of the rest of this License.
++
++ 12. If the distribution and/or use of the Library is restricted in
++certain countries either by patents or by copyrighted interfaces, the
++original copyright holder who places the Library under this License may add
++an explicit geographical distribution limitation excluding those countries,
++so that distribution is permitted only in or among countries not thus
++excluded. In such case, this License incorporates the limitation as if
++written in the body of this License.
++
++ 13. The Free Software Foundation may publish revised and/or new
++versions of the Lesser General Public License from time to time.
++Such new versions will be similar in spirit to the present version,
++but may differ in detail to address new problems or concerns.
++
++Each version is given a distinguishing version number. If the Library
++specifies a version number of this License which applies to it and
++"any later version", you have the option of following the terms and
++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
++copyrighted by the Free Software Foundation, write to the Free
++Software Foundation; we sometimes make exceptions for this. Our
++decision will be guided by the two goals of preserving the free status
++of all derivatives of our free software and of promoting the sharing
++and reuse of software generally.
++
++ NO WARRANTY
++
++ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
++WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
++EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
++OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
++KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
++PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
++LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
++THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
++
++ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
++WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
++AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
++FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
++CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
++LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
++RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
++FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
++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
++possible use to the public, we recommend making it free software that
++everyone can redistribute and change. You can do so by permitting
++redistribution under these terms (or, alternatively, under the terms of the
++ordinary General Public License).
++
++ To apply these terms, attach the following notices to the library. It is
++safest to attach them to the start of each source file to most effectively
++convey the exclusion of warranty; and each file should have at least the
++"copyright" line and a pointer to where the full notice is found.
++
++ <one line to give the library's name and a brief idea of what it does.>
++ Copyright (C) <year> <name of author>
++
++ This library 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.
++
++ This library 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 this library; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++
++Also add information on how to contact you by electronic and paper mail.
++
++You should also get your employer (if you work as a programmer) or your
++school, if any, to sign a "copyright disclaimer" for the library, if
++necessary. Here is a sample; alter the names:
++
++ Yoyodyne, Inc., hereby disclaims all copyright interest in the
++ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
++
++ <signature of Ty Coon>, 1 April 1990
++ Ty Coon, President of Vice
++
++That's all there is to it!
++
++
+diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/include/libavcodec/avcodec.h b/dom/media/platforms/ffmpeg/ffmpeg58/include/libavcodec/avcodec.h
+new file mode 100644
+--- /dev/null
++++ b/dom/media/platforms/ffmpeg/ffmpeg58/include/libavcodec/avcodec.h
+@@ -0,0 +1,6146 @@
++/*
++ * copyright (c) 2001 Fabrice Bellard
++ *
++ * 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_AVCODEC_H
++#define AVCODEC_AVCODEC_H
++
++/**
++ * @file
++ * @ingroup libavc
++ * Libavcodec external API header
++ */
++
++#include <errno.h>
++#include "libavutil/samplefmt.h"
++#include "libavutil/attributes.h"
++#include "libavutil/avutil.h"
++#include "libavutil/buffer.h"
++#include "libavutil/cpu.h"
++#include "libavutil/channel_layout.h"
++#include "libavutil/dict.h"
++#include "libavutil/frame.h"
++#include "libavutil/hwcontext.h"
++#include "libavutil/log.h"
++#include "libavutil/pixfmt.h"
++#include "libavutil/rational.h"
++
++#include "version.h"
++
++/**
++ * @defgroup libavc libavcodec
++ * Encoding/Decoding Library
++ *
++ * @{
++ *
++ * @defgroup lavc_decoding Decoding
++ * @{
++ * @}
++ *
++ * @defgroup lavc_encoding Encoding
++ * @{
++ * @}
++ *
++ * @defgroup lavc_codec Codecs
++ * @{
++ * @defgroup lavc_codec_native Native Codecs
++ * @{
++ * @}
++ * @defgroup lavc_codec_wrappers External library wrappers
++ * @{
++ * @}
++ * @defgroup lavc_codec_hwaccel Hardware Accelerators bridge
++ * @{
++ * @}
++ * @}
++ * @defgroup lavc_internal Internal
++ * @{
++ * @}
++ * @}
++ */
++
++/**
++ * @ingroup libavc
++ * @defgroup lavc_encdec send/receive encoding and decoding API overview
++ * @{
++ *
++ * The avcodec_send_packet()/avcodec_receive_frame()/avcodec_send_frame()/
++ * avcodec_receive_packet() functions provide an encode/decode API, which
++ * decouples input and output.
++ *
++ * The API is very similar for encoding/decoding and audio/video, and works as
++ * follows:
++ * - Set up and open the AVCodecContext as usual.
++ * - Send valid input:
++ * - For decoding, call avcodec_send_packet() to give the decoder raw
++ * compressed data in an AVPacket.
++ * - For encoding, call avcodec_send_frame() to give the encoder an AVFrame
++ * containing uncompressed audio or video.
++ * In both cases, it is recommended that AVPackets and AVFrames are
++ * refcounted, or libavcodec might have to copy the input data. (libavformat
++ * always returns refcounted AVPackets, and av_frame_get_buffer() allocates
++ * refcounted AVFrames.)
++ * - Receive output in a loop. Periodically call one of the avcodec_receive_*()
++ * functions and process their output:
++ * - For decoding, call avcodec_receive_frame(). On success, it will return
++ * an AVFrame containing uncompressed audio or video data.
++ * - For encoding, call avcodec_receive_packet(). On success, it will return
++ * an AVPacket with a compressed frame.
++ * Repeat this call until it returns AVERROR(EAGAIN) or an error. The
++ * AVERROR(EAGAIN) return value means that new input data is required to
++ * return new output. In this case, continue with sending input. For each
++ * input frame/packet, the codec will typically return 1 output frame/packet,
++ * but it can also be 0 or more than 1.
++ *
++ * At the beginning of decoding or encoding, the codec might accept multiple
++ * input frames/packets without returning a frame, until its internal buffers
++ * are filled. This situation is handled transparently if you follow the steps
++ * outlined above.
++ *
++ * In theory, sending input can result in EAGAIN - this should happen only if
++ * not all output was received. You can use this to structure alternative decode
++ * or encode loops other than the one suggested above. For example, you could
++ * try sending new input on each iteration, and try to receive output if that
++ * returns EAGAIN.
++ *
++ * End of stream situations. These require "flushing" (aka draining) the codec,
++ * as the codec might buffer multiple frames or packets internally for
++ * performance or out of necessity (consider B-frames).
++ * This is handled as follows:
++ * - Instead of valid input, send NULL to the avcodec_send_packet() (decoding)
++ * or avcodec_send_frame() (encoding) functions. This will enter draining
++ * mode.
++ * - Call avcodec_receive_frame() (decoding) or avcodec_receive_packet()
++ * (encoding) in a loop until AVERROR_EOF is returned. The functions will
++ * not return AVERROR(EAGAIN), unless you forgot to enter draining mode.
++ * - Before decoding can be resumed again, the codec has to be reset with
++ * avcodec_flush_buffers().
++ *
++ * Using the API as outlined above is highly recommended. But it is also
++ * possible to call functions outside of this rigid schema. For example, you can
++ * call avcodec_send_packet() repeatedly without calling
++ * avcodec_receive_frame(). In this case, avcodec_send_packet() will succeed
++ * until the codec's internal buffer has been filled up (which is typically of
++ * size 1 per output frame, after initial input), and then reject input with
++ * AVERROR(EAGAIN). Once it starts rejecting input, you have no choice but to
++ * read at least some output.
++ *
++ * Not all codecs will follow a rigid and predictable dataflow; the only
++ * guarantee is that an AVERROR(EAGAIN) return value on a send/receive call on
++ * one end implies that a receive/send call on the other end will succeed, or
++ * at least will not fail with AVERROR(EAGAIN). In general, no codec will
++ * permit unlimited buffering of input or output.
++ *
++ * This API replaces the following legacy functions:
++ * - avcodec_decode_video2() and avcodec_decode_audio4():
++ * Use avcodec_send_packet() to feed input to the decoder, then use
++ * avcodec_receive_frame() to receive decoded frames after each packet.
++ * Unlike with the old video decoding API, multiple frames might result from
++ * a packet. For audio, splitting the input packet into frames by partially
++ * decoding packets becomes transparent to the API user. You never need to
++ * feed an AVPacket to the API twice (unless it is rejected with AVERROR(EAGAIN) - then
++ * no data was read from the packet).
++ * Additionally, sending a flush/draining packet is required only once.
++ * - avcodec_encode_video2()/avcodec_encode_audio2():
++ * Use avcodec_send_frame() to feed input to the encoder, then use
++ * avcodec_receive_packet() to receive encoded packets.
++ * Providing user-allocated buffers for avcodec_receive_packet() is not
++ * possible.
++ * - The new API does not handle subtitles yet.
++ *
++ * Mixing new and old function calls on the same AVCodecContext is not allowed,
++ * and will result in undefined behavior.
++ *
++ * Some codecs might require using the new API; using the old API will return
++ * an error when calling it. All codecs support the new API.
++ *
++ * A codec is not allowed to return AVERROR(EAGAIN) for both sending and receiving. This
++ * would be an invalid state, which could put the codec user into an endless
++ * loop. The API has no concept of time either: it cannot happen that trying to
++ * do avcodec_send_packet() results in AVERROR(EAGAIN), but a repeated call 1 second
++ * later accepts the packet (with no other receive/flush API calls involved).
++ * The API is a strict state machine, and the passage of time is not supposed
++ * to influence it. Some timing-dependent behavior might still be deemed
++ * acceptable in certain cases. But it must never result in both send/receive
++ * returning EAGAIN at the same time at any point. It must also absolutely be
++ * avoided that the current state is "unstable" and can "flip-flop" between
++ * the send/receive APIs allowing progress. For example, it's not allowed that
++ * the codec randomly decides that it actually wants to consume a packet now
++ * instead of returning a frame, after it just returned AVERROR(EAGAIN) on an
++ * avcodec_send_packet() call.
++ * @}
++ */
++
++/**
++ * @defgroup lavc_core Core functions/structures.
++ * @ingroup libavc
++ *
++ * Basic definitions, functions for querying libavcodec capabilities,
++ * allocating core structures, etc.
++ * @{
++ */
++
++
++/**
++ * Identify the syntax and semantics of the bitstream.
++ * The principle is roughly:
++ * Two decoders with the same ID can decode the same streams.
++ * Two encoders with the same ID can encode compatible streams.
++ * There may be slight deviations from the principle due to implementation
++ * details.
++ *
++ * If you add a codec ID to this list, add it so that
++ * 1. no value of an existing codec ID changes (that would break ABI),
++ * 2. it is as close as possible to similar codecs
++ *
++ * After adding new codec IDs, do not forget to add an entry to the codec
++ * descriptor list and bump libavcodec minor version.
++ */
++enum AVCodecID {
++ AV_CODEC_ID_NONE,
++
++ /* video codecs */
++ AV_CODEC_ID_MPEG1VIDEO,
++ AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
++ AV_CODEC_ID_H261,
++ AV_CODEC_ID_H263,
++ AV_CODEC_ID_RV10,
++ AV_CODEC_ID_RV20,
++ AV_CODEC_ID_MJPEG,
++ AV_CODEC_ID_MJPEGB,
++ AV_CODEC_ID_LJPEG,
++ AV_CODEC_ID_SP5X,
++ AV_CODEC_ID_JPEGLS,
++ AV_CODEC_ID_MPEG4,
++ AV_CODEC_ID_RAWVIDEO,
++ AV_CODEC_ID_MSMPEG4V1,
++ AV_CODEC_ID_MSMPEG4V2,
++ AV_CODEC_ID_MSMPEG4V3,
++ AV_CODEC_ID_WMV1,
++ AV_CODEC_ID_WMV2,
++ AV_CODEC_ID_H263P,
++ AV_CODEC_ID_H263I,
++ AV_CODEC_ID_FLV1,
++ AV_CODEC_ID_SVQ1,
++ AV_CODEC_ID_SVQ3,
++ AV_CODEC_ID_DVVIDEO,
++ AV_CODEC_ID_HUFFYUV,
++ AV_CODEC_ID_CYUV,
++ AV_CODEC_ID_H264,
++ AV_CODEC_ID_INDEO3,
++ AV_CODEC_ID_VP3,
++ AV_CODEC_ID_THEORA,
++ AV_CODEC_ID_ASV1,
++ AV_CODEC_ID_ASV2,
++ AV_CODEC_ID_FFV1,
++ AV_CODEC_ID_4XM,
++ AV_CODEC_ID_VCR1,
++ AV_CODEC_ID_CLJR,
++ AV_CODEC_ID_MDEC,
++ AV_CODEC_ID_ROQ,
++ AV_CODEC_ID_INTERPLAY_VIDEO,
++ AV_CODEC_ID_XAN_WC3,
++ AV_CODEC_ID_XAN_WC4,
++ AV_CODEC_ID_RPZA,
++ AV_CODEC_ID_CINEPAK,
++ AV_CODEC_ID_WS_VQA,
++ AV_CODEC_ID_MSRLE,
++ AV_CODEC_ID_MSVIDEO1,
++ AV_CODEC_ID_IDCIN,
++ AV_CODEC_ID_8BPS,
++ AV_CODEC_ID_SMC,
++ AV_CODEC_ID_FLIC,
++ AV_CODEC_ID_TRUEMOTION1,
++ AV_CODEC_ID_VMDVIDEO,
++ AV_CODEC_ID_MSZH,
++ AV_CODEC_ID_ZLIB,
++ AV_CODEC_ID_QTRLE,
++ AV_CODEC_ID_TSCC,
++ AV_CODEC_ID_ULTI,
++ AV_CODEC_ID_QDRAW,
++ AV_CODEC_ID_VIXL,
++ AV_CODEC_ID_QPEG,
++ AV_CODEC_ID_PNG,
++ AV_CODEC_ID_PPM,
++ AV_CODEC_ID_PBM,
++ AV_CODEC_ID_PGM,
++ AV_CODEC_ID_PGMYUV,
++ AV_CODEC_ID_PAM,
++ AV_CODEC_ID_FFVHUFF,
++ AV_CODEC_ID_RV30,
++ AV_CODEC_ID_RV40,
++ AV_CODEC_ID_VC1,
++ AV_CODEC_ID_WMV3,
++ AV_CODEC_ID_LOCO,
++ AV_CODEC_ID_WNV1,
++ AV_CODEC_ID_AASC,
++ AV_CODEC_ID_INDEO2,
++ AV_CODEC_ID_FRAPS,
++ AV_CODEC_ID_TRUEMOTION2,
++ AV_CODEC_ID_BMP,
++ AV_CODEC_ID_CSCD,
++ AV_CODEC_ID_MMVIDEO,
++ AV_CODEC_ID_ZMBV,
++ AV_CODEC_ID_AVS,
++ AV_CODEC_ID_SMACKVIDEO,
++ AV_CODEC_ID_NUV,
++ AV_CODEC_ID_KMVC,
++ AV_CODEC_ID_FLASHSV,
++ AV_CODEC_ID_CAVS,
++ AV_CODEC_ID_JPEG2000,
++ AV_CODEC_ID_VMNC,
++ AV_CODEC_ID_VP5,
++ AV_CODEC_ID_VP6,
++ AV_CODEC_ID_VP6F,
++ AV_CODEC_ID_TARGA,
++ AV_CODEC_ID_DSICINVIDEO,
++ AV_CODEC_ID_TIERTEXSEQVIDEO,
++ AV_CODEC_ID_TIFF,
++ AV_CODEC_ID_GIF,
++ AV_CODEC_ID_DXA,
++ AV_CODEC_ID_DNXHD,
++ AV_CODEC_ID_THP,
++ AV_CODEC_ID_SGI,
++ AV_CODEC_ID_C93,
++ AV_CODEC_ID_BETHSOFTVID,
++ AV_CODEC_ID_PTX,
++ AV_CODEC_ID_TXD,
++ AV_CODEC_ID_VP6A,
++ AV_CODEC_ID_AMV,
++ AV_CODEC_ID_VB,
++ AV_CODEC_ID_PCX,
++ AV_CODEC_ID_SUNRAST,
++ AV_CODEC_ID_INDEO4,
++ AV_CODEC_ID_INDEO5,
++ AV_CODEC_ID_MIMIC,
++ AV_CODEC_ID_RL2,
++ AV_CODEC_ID_ESCAPE124,
++ AV_CODEC_ID_DIRAC,
++ AV_CODEC_ID_BFI,
++ AV_CODEC_ID_CMV,
++ AV_CODEC_ID_MOTIONPIXELS,
++ AV_CODEC_ID_TGV,
++ AV_CODEC_ID_TGQ,
++ AV_CODEC_ID_TQI,
++ AV_CODEC_ID_AURA,
++ AV_CODEC_ID_AURA2,
++ AV_CODEC_ID_V210X,
++ AV_CODEC_ID_TMV,
++ AV_CODEC_ID_V210,
++ AV_CODEC_ID_DPX,
++ AV_CODEC_ID_MAD,
++ AV_CODEC_ID_FRWU,
++ AV_CODEC_ID_FLASHSV2,
++ AV_CODEC_ID_CDGRAPHICS,
++ AV_CODEC_ID_R210,
++ AV_CODEC_ID_ANM,
++ AV_CODEC_ID_BINKVIDEO,
++ AV_CODEC_ID_IFF_ILBM,
++#define AV_CODEC_ID_IFF_BYTERUN1 AV_CODEC_ID_IFF_ILBM
++ AV_CODEC_ID_KGV1,
++ AV_CODEC_ID_YOP,
++ AV_CODEC_ID_VP8,
++ AV_CODEC_ID_PICTOR,
++ AV_CODEC_ID_ANSI,
++ AV_CODEC_ID_A64_MULTI,
++ AV_CODEC_ID_A64_MULTI5,
++ AV_CODEC_ID_R10K,
++ AV_CODEC_ID_MXPEG,
++ AV_CODEC_ID_LAGARITH,
++ AV_CODEC_ID_PRORES,
++ AV_CODEC_ID_JV,
++ AV_CODEC_ID_DFA,
++ AV_CODEC_ID_WMV3IMAGE,
++ AV_CODEC_ID_VC1IMAGE,
++ AV_CODEC_ID_UTVIDEO,
++ AV_CODEC_ID_BMV_VIDEO,
++ AV_CODEC_ID_VBLE,
++ AV_CODEC_ID_DXTORY,
++ AV_CODEC_ID_V410,
++ AV_CODEC_ID_XWD,
++ AV_CODEC_ID_CDXL,
++ AV_CODEC_ID_XBM,
++ AV_CODEC_ID_ZEROCODEC,
++ AV_CODEC_ID_MSS1,
++ AV_CODEC_ID_MSA1,
++ AV_CODEC_ID_TSCC2,
++ AV_CODEC_ID_MTS2,
++ AV_CODEC_ID_CLLC,
++ AV_CODEC_ID_MSS2,
++ AV_CODEC_ID_VP9,
++ AV_CODEC_ID_AIC,
++ AV_CODEC_ID_ESCAPE130,
++ AV_CODEC_ID_G2M,
++ AV_CODEC_ID_WEBP,
++ AV_CODEC_ID_HNM4_VIDEO,
++ AV_CODEC_ID_HEVC,
++#define AV_CODEC_ID_H265 AV_CODEC_ID_HEVC
++ AV_CODEC_ID_FIC,
++ AV_CODEC_ID_ALIAS_PIX,
++ AV_CODEC_ID_BRENDER_PIX,
++ AV_CODEC_ID_PAF_VIDEO,
++ AV_CODEC_ID_EXR,
++ AV_CODEC_ID_VP7,
++ AV_CODEC_ID_SANM,
++ AV_CODEC_ID_SGIRLE,
++ AV_CODEC_ID_MVC1,
++ AV_CODEC_ID_MVC2,
++ AV_CODEC_ID_HQX,
++ AV_CODEC_ID_TDSC,
++ AV_CODEC_ID_HQ_HQA,
++ AV_CODEC_ID_HAP,
++ AV_CODEC_ID_DDS,
++ AV_CODEC_ID_DXV,
++ AV_CODEC_ID_SCREENPRESSO,
++ AV_CODEC_ID_RSCC,
++
++ AV_CODEC_ID_Y41P = 0x8000,
++ AV_CODEC_ID_AVRP,
++ AV_CODEC_ID_012V,
++ AV_CODEC_ID_AVUI,
++ AV_CODEC_ID_AYUV,
++ AV_CODEC_ID_TARGA_Y216,
++ AV_CODEC_ID_V308,
++ AV_CODEC_ID_V408,
++ AV_CODEC_ID_YUV4,
++ AV_CODEC_ID_AVRN,
++ AV_CODEC_ID_CPIA,
++ AV_CODEC_ID_XFACE,
++ AV_CODEC_ID_SNOW,
++ AV_CODEC_ID_SMVJPEG,
++ AV_CODEC_ID_APNG,
++ AV_CODEC_ID_DAALA,
++ AV_CODEC_ID_CFHD,
++ AV_CODEC_ID_TRUEMOTION2RT,
++ AV_CODEC_ID_M101,
++ AV_CODEC_ID_MAGICYUV,
++ AV_CODEC_ID_SHEERVIDEO,
++ AV_CODEC_ID_YLC,
++ AV_CODEC_ID_PSD,
++ AV_CODEC_ID_PIXLET,
++ AV_CODEC_ID_SPEEDHQ,
++ AV_CODEC_ID_FMVC,
++ AV_CODEC_ID_SCPR,
++ AV_CODEC_ID_CLEARVIDEO,
++ AV_CODEC_ID_XPM,
++ AV_CODEC_ID_AV1,
++ AV_CODEC_ID_BITPACKED,
++ AV_CODEC_ID_MSCC,
++ AV_CODEC_ID_SRGC,
++ AV_CODEC_ID_SVG,
++ AV_CODEC_ID_GDV,
++ AV_CODEC_ID_FITS,
++
++ /* various PCM "codecs" */
++ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
++ AV_CODEC_ID_PCM_S16LE = 0x10000,
++ AV_CODEC_ID_PCM_S16BE,
++ AV_CODEC_ID_PCM_U16LE,
++ AV_CODEC_ID_PCM_U16BE,
++ AV_CODEC_ID_PCM_S8,
++ AV_CODEC_ID_PCM_U8,
++ AV_CODEC_ID_PCM_MULAW,
++ AV_CODEC_ID_PCM_ALAW,
++ AV_CODEC_ID_PCM_S32LE,
++ AV_CODEC_ID_PCM_S32BE,
++ AV_CODEC_ID_PCM_U32LE,
++ AV_CODEC_ID_PCM_U32BE,
++ AV_CODEC_ID_PCM_S24LE,
++ AV_CODEC_ID_PCM_S24BE,
++ AV_CODEC_ID_PCM_U24LE,
++ AV_CODEC_ID_PCM_U24BE,
++ AV_CODEC_ID_PCM_S24DAUD,
++ AV_CODEC_ID_PCM_ZORK,
++ AV_CODEC_ID_PCM_S16LE_PLANAR,
++ AV_CODEC_ID_PCM_DVD,
++ AV_CODEC_ID_PCM_F32BE,
++ AV_CODEC_ID_PCM_F32LE,
++ AV_CODEC_ID_PCM_F64BE,
++ AV_CODEC_ID_PCM_F64LE,
++ AV_CODEC_ID_PCM_BLURAY,
++ AV_CODEC_ID_PCM_LXF,
++ AV_CODEC_ID_S302M,
++ AV_CODEC_ID_PCM_S8_PLANAR,
++ AV_CODEC_ID_PCM_S24LE_PLANAR,
++ AV_CODEC_ID_PCM_S32LE_PLANAR,
++ AV_CODEC_ID_PCM_S16BE_PLANAR,
++
++ AV_CODEC_ID_PCM_S64LE = 0x10800,
++ AV_CODEC_ID_PCM_S64BE,
++ AV_CODEC_ID_PCM_F16LE,
++ AV_CODEC_ID_PCM_F24LE,
++
++ /* various ADPCM codecs */
++ AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
++ AV_CODEC_ID_ADPCM_IMA_WAV,
++ AV_CODEC_ID_ADPCM_IMA_DK3,
++ AV_CODEC_ID_ADPCM_IMA_DK4,
++ AV_CODEC_ID_ADPCM_IMA_WS,
++ AV_CODEC_ID_ADPCM_IMA_SMJPEG,
++ AV_CODEC_ID_ADPCM_MS,
++ AV_CODEC_ID_ADPCM_4XM,
++ AV_CODEC_ID_ADPCM_XA,
++ AV_CODEC_ID_ADPCM_ADX,
++ AV_CODEC_ID_ADPCM_EA,
++ AV_CODEC_ID_ADPCM_G726,
++ AV_CODEC_ID_ADPCM_CT,
++ AV_CODEC_ID_ADPCM_SWF,
++ AV_CODEC_ID_ADPCM_YAMAHA,
++ AV_CODEC_ID_ADPCM_SBPRO_4,
++ AV_CODEC_ID_ADPCM_SBPRO_3,
++ AV_CODEC_ID_ADPCM_SBPRO_2,
++ AV_CODEC_ID_ADPCM_THP,
++ AV_CODEC_ID_ADPCM_IMA_AMV,
++ AV_CODEC_ID_ADPCM_EA_R1,
++ AV_CODEC_ID_ADPCM_EA_R3,
++ AV_CODEC_ID_ADPCM_EA_R2,
++ AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
++ AV_CODEC_ID_ADPCM_IMA_EA_EACS,
++ AV_CODEC_ID_ADPCM_EA_XAS,
++ AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
++ AV_CODEC_ID_ADPCM_IMA_ISS,
++ AV_CODEC_ID_ADPCM_G722,
++ AV_CODEC_ID_ADPCM_IMA_APC,
++ AV_CODEC_ID_ADPCM_VIMA,
++
++ AV_CODEC_ID_ADPCM_AFC = 0x11800,
++ AV_CODEC_ID_ADPCM_IMA_OKI,
++ AV_CODEC_ID_ADPCM_DTK,
++ AV_CODEC_ID_ADPCM_IMA_RAD,
++ AV_CODEC_ID_ADPCM_G726LE,
++ AV_CODEC_ID_ADPCM_THP_LE,
++ AV_CODEC_ID_ADPCM_PSX,
++ AV_CODEC_ID_ADPCM_AICA,
++ AV_CODEC_ID_ADPCM_IMA_DAT4,
++ AV_CODEC_ID_ADPCM_MTAF,
++
++ /* AMR */
++ AV_CODEC_ID_AMR_NB = 0x12000,
++ AV_CODEC_ID_AMR_WB,
++
++ /* RealAudio codecs*/
++ AV_CODEC_ID_RA_144 = 0x13000,
++ AV_CODEC_ID_RA_288,
++
++ /* various DPCM codecs */
++ AV_CODEC_ID_ROQ_DPCM = 0x14000,
++ AV_CODEC_ID_INTERPLAY_DPCM,
++ AV_CODEC_ID_XAN_DPCM,
++ AV_CODEC_ID_SOL_DPCM,
++
++ AV_CODEC_ID_SDX2_DPCM = 0x14800,
++ AV_CODEC_ID_GREMLIN_DPCM,
++
++ /* audio codecs */
++ AV_CODEC_ID_MP2 = 0x15000,
++ AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
++ AV_CODEC_ID_AAC,
++ AV_CODEC_ID_AC3,
++ AV_CODEC_ID_DTS,
++ AV_CODEC_ID_VORBIS,
++ AV_CODEC_ID_DVAUDIO,
++ AV_CODEC_ID_WMAV1,
++ AV_CODEC_ID_WMAV2,
++ AV_CODEC_ID_MACE3,
++ AV_CODEC_ID_MACE6,
++ AV_CODEC_ID_VMDAUDIO,
++ AV_CODEC_ID_FLAC,
++ AV_CODEC_ID_MP3ADU,
++ AV_CODEC_ID_MP3ON4,
++ AV_CODEC_ID_SHORTEN,
++ AV_CODEC_ID_ALAC,
++ AV_CODEC_ID_WESTWOOD_SND1,
++ AV_CODEC_ID_GSM, ///< as in Berlin toast format
++ AV_CODEC_ID_QDM2,
++ AV_CODEC_ID_COOK,
++ AV_CODEC_ID_TRUESPEECH,
++ AV_CODEC_ID_TTA,
++ AV_CODEC_ID_SMACKAUDIO,
++ AV_CODEC_ID_QCELP,
++ AV_CODEC_ID_WAVPACK,
++ AV_CODEC_ID_DSICINAUDIO,
++ AV_CODEC_ID_IMC,
++ AV_CODEC_ID_MUSEPACK7,
++ AV_CODEC_ID_MLP,
++ AV_CODEC_ID_GSM_MS, /* as found in WAV */
++ AV_CODEC_ID_ATRAC3,
++ AV_CODEC_ID_APE,
++ AV_CODEC_ID_NELLYMOSER,
++ AV_CODEC_ID_MUSEPACK8,
++ AV_CODEC_ID_SPEEX,
++ AV_CODEC_ID_WMAVOICE,
++ AV_CODEC_ID_WMAPRO,
++ AV_CODEC_ID_WMALOSSLESS,
++ AV_CODEC_ID_ATRAC3P,
++ AV_CODEC_ID_EAC3,
++ AV_CODEC_ID_SIPR,
++ AV_CODEC_ID_MP1,
++ AV_CODEC_ID_TWINVQ,
++ AV_CODEC_ID_TRUEHD,
++ AV_CODEC_ID_MP4ALS,
++ AV_CODEC_ID_ATRAC1,
++ AV_CODEC_ID_BINKAUDIO_RDFT,
++ AV_CODEC_ID_BINKAUDIO_DCT,
++ AV_CODEC_ID_AAC_LATM,
++ AV_CODEC_ID_QDMC,
++ AV_CODEC_ID_CELT,
++ AV_CODEC_ID_G723_1,
++ AV_CODEC_ID_G729,
++ AV_CODEC_ID_8SVX_EXP,
++ AV_CODEC_ID_8SVX_FIB,
++ AV_CODEC_ID_BMV_AUDIO,
++ AV_CODEC_ID_RALF,
++ AV_CODEC_ID_IAC,
++ AV_CODEC_ID_ILBC,
++ AV_CODEC_ID_OPUS,
++ AV_CODEC_ID_COMFORT_NOISE,
++ AV_CODEC_ID_TAK,
++ AV_CODEC_ID_METASOUND,
++ AV_CODEC_ID_PAF_AUDIO,
++ AV_CODEC_ID_ON2AVC,
++ AV_CODEC_ID_DSS_SP,
++ AV_CODEC_ID_CODEC2,
++
++ AV_CODEC_ID_FFWAVESYNTH = 0x15800,
++ AV_CODEC_ID_SONIC,
++ AV_CODEC_ID_SONIC_LS,
++ AV_CODEC_ID_EVRC,
++ AV_CODEC_ID_SMV,
++ AV_CODEC_ID_DSD_LSBF,
++ AV_CODEC_ID_DSD_MSBF,
++ AV_CODEC_ID_DSD_LSBF_PLANAR,
++ AV_CODEC_ID_DSD_MSBF_PLANAR,
++ AV_CODEC_ID_4GV,
++ AV_CODEC_ID_INTERPLAY_ACM,
++ AV_CODEC_ID_XMA1,
++ AV_CODEC_ID_XMA2,
++ AV_CODEC_ID_DST,
++ AV_CODEC_ID_ATRAC3AL,
++ AV_CODEC_ID_ATRAC3PAL,
++ AV_CODEC_ID_DOLBY_E,
++ AV_CODEC_ID_APTX,
++ AV_CODEC_ID_APTX_HD,
++ AV_CODEC_ID_SBC,
++
++ /* subtitle codecs */
++ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
++ AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
++ AV_CODEC_ID_DVB_SUBTITLE,
++ AV_CODEC_ID_TEXT, ///< raw UTF-8 text
++ AV_CODEC_ID_XSUB,
++ AV_CODEC_ID_SSA,
++ AV_CODEC_ID_MOV_TEXT,
++ AV_CODEC_ID_HDMV_PGS_SUBTITLE,
++ AV_CODEC_ID_DVB_TELETEXT,
++ AV_CODEC_ID_SRT,
++
++ AV_CODEC_ID_MICRODVD = 0x17800,
++ AV_CODEC_ID_EIA_608,
++ AV_CODEC_ID_JACOSUB,
++ AV_CODEC_ID_SAMI,
++ AV_CODEC_ID_REALTEXT,
++ AV_CODEC_ID_STL,
++ AV_CODEC_ID_SUBVIEWER1,
++ AV_CODEC_ID_SUBVIEWER,
++ AV_CODEC_ID_SUBRIP,
++ AV_CODEC_ID_WEBVTT,
++ AV_CODEC_ID_MPL2,
++ AV_CODEC_ID_VPLAYER,
++ AV_CODEC_ID_PJS,
++ AV_CODEC_ID_ASS,
++ AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
++
++ /* other specific kind of codecs (generally used for attachments) */
++ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
++ AV_CODEC_ID_TTF = 0x18000,
++
++ AV_CODEC_ID_SCTE_35, ///< Contain timestamp estimated through PCR of program stream.
++ AV_CODEC_ID_BINTEXT = 0x18800,
++ AV_CODEC_ID_XBIN,
++ AV_CODEC_ID_IDF,
++ AV_CODEC_ID_OTF,
++ AV_CODEC_ID_SMPTE_KLV,
++ AV_CODEC_ID_DVD_NAV,
++ AV_CODEC_ID_TIMED_ID3,
++ AV_CODEC_ID_BIN_DATA,
++
++
++ AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
++
++ AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
++ * stream (only used by libavformat) */
++ AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
++ * stream (only used by libavformat) */
++ AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
++ AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket
++};
++
++/**
++ * This struct describes the properties of a single codec described by an
++ * AVCodecID.
++ * @see avcodec_descriptor_get()
++ */
++typedef struct AVCodecDescriptor {
++ enum AVCodecID id;
++ enum AVMediaType type;
++ /**
++ * Name of the codec described by this descriptor. It is non-empty and
++ * unique for each codec descriptor. It should contain alphanumeric
++ * characters and '_' only.
++ */
++ const char *name;
++ /**
++ * A more descriptive name for this codec. May be NULL.
++ */
++ const char *long_name;
++ /**
++ * Codec properties, a combination of AV_CODEC_PROP_* flags.
++ */
++ int props;
++ /**
++ * MIME type(s) associated with the codec.
++ * May be NULL; if not, a NULL-terminated array of MIME types.
++ * The first item is always non-NULL and is the preferred MIME type.
++ */
++ const char *const *mime_types;
++ /**
++ * If non-NULL, an array of profiles recognized for this codec.
++ * Terminated with FF_PROFILE_UNKNOWN.
++ */
++ const struct AVProfile *profiles;
++} AVCodecDescriptor;
++
++/**
++ * Codec uses only intra compression.
++ * Video and audio codecs only.
++ */
++#define AV_CODEC_PROP_INTRA_ONLY (1 << 0)
++/**
++ * Codec supports lossy compression. Audio and video codecs only.
++ * @note a codec may support both lossy and lossless
++ * compression modes
++ */
++#define AV_CODEC_PROP_LOSSY (1 << 1)
++/**
++ * Codec supports lossless compression. Audio and video codecs only.
++ */
++#define AV_CODEC_PROP_LOSSLESS (1 << 2)
++/**
++ * Codec supports frame reordering. That is, the coded order (the order in which
++ * the encoded packets are output by the encoders / stored / input to the
++ * decoders) may be different from the presentation order of the corresponding
++ * frames.
++ *
++ * For codecs that do not have this property set, PTS and DTS should always be
++ * equal.
++ */
++#define AV_CODEC_PROP_REORDER (1 << 3)
++/**
++ * Subtitle codec is bitmap based
++ * Decoded AVSubtitle data can be read from the AVSubtitleRect->pict field.
++ */
++#define AV_CODEC_PROP_BITMAP_SUB (1 << 16)
++/**
++ * Subtitle codec is text based.
++ * Decoded AVSubtitle data can be read from the AVSubtitleRect->ass field.
++ */
++#define AV_CODEC_PROP_TEXT_SUB (1 << 17)
++
++/**
++ * @ingroup lavc_decoding
++ * Required number of additionally allocated bytes at the end of the input bitstream for decoding.
++ * This is mainly needed because some optimized bitstream readers read
++ * 32 or 64 bit at once and could read over the end.<br>
++ * Note: If the first 23 bits of the additional bytes are not 0, then damaged
++ * MPEG bitstreams could cause overread and segfault.
++ */
++#define AV_INPUT_BUFFER_PADDING_SIZE 64
++
++/**
++ * @ingroup lavc_encoding
++ * minimum encoding buffer size
++ * Used to avoid some checks during header writing.
++ */
++#define AV_INPUT_BUFFER_MIN_SIZE 16384
++
++/**
++ * @ingroup lavc_decoding
++ */
++enum AVDiscard{
++ /* We leave some space between them for extensions (drop some
++ * keyframes for intra-only or drop just some bidir frames). */
++ AVDISCARD_NONE =-16, ///< discard nothing
++ AVDISCARD_DEFAULT = 0, ///< discard useless packets like 0 size packets in avi
++ AVDISCARD_NONREF = 8, ///< discard all non reference
++ AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames
++ AVDISCARD_NONINTRA= 24, ///< discard all non intra frames
++ AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
++ AVDISCARD_ALL = 48, ///< discard all
++};
++
++enum AVAudioServiceType {
++ AV_AUDIO_SERVICE_TYPE_MAIN = 0,
++ AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
++ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
++ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
++ AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
++ AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
++ AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
++ AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
++ AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
++ AV_AUDIO_SERVICE_TYPE_NB , ///< Not part of ABI
++};
++
++/**
++ * @ingroup lavc_encoding
++ */
++typedef struct RcOverride{
++ int start_frame;
++ int end_frame;
++ int qscale; // If this is 0 then quality_factor will be used instead.
++ float quality_factor;
++} RcOverride;
++
++/* encoding support
++ These flags can be passed in AVCodecContext.flags before initialization.
++ Note: Not everything is supported yet.
++*/
++
++/**
++ * Allow decoders to produce frames with data planes that are not aligned
++ * to CPU requirements (e.g. due to cropping).
++ */
++#define AV_CODEC_FLAG_UNALIGNED (1 << 0)
++/**
++ * Use fixed qscale.
++ */
++#define AV_CODEC_FLAG_QSCALE (1 << 1)
++/**
++ * 4 MV per MB allowed / advanced prediction for H.263.
++ */
++#define AV_CODEC_FLAG_4MV (1 << 2)
++/**
++ * Output even those frames that might be corrupted.
++ */
++#define AV_CODEC_FLAG_OUTPUT_CORRUPT (1 << 3)
++/**
++ * Use qpel MC.
++ */
++#define AV_CODEC_FLAG_QPEL (1 << 4)
++/**
++ * Use internal 2pass ratecontrol in first pass mode.
++ */
++#define AV_CODEC_FLAG_PASS1 (1 << 9)
++/**
++ * Use internal 2pass ratecontrol in second pass mode.
++ */
++#define AV_CODEC_FLAG_PASS2 (1 << 10)
++/**
++ * loop filter.
++ */
++#define AV_CODEC_FLAG_LOOP_FILTER (1 << 11)
++/**
++ * Only decode/encode grayscale.
++ */
++#define AV_CODEC_FLAG_GRAY (1 << 13)
++/**
++ * error[?] variables will be set during encoding.
++ */
++#define AV_CODEC_FLAG_PSNR (1 << 15)
++/**
++ * Input bitstream might be truncated at a random location
++ * instead of only at frame boundaries.
++ */
++#define AV_CODEC_FLAG_TRUNCATED (1 << 16)
++/**
++ * Use interlaced DCT.
++ */
++#define AV_CODEC_FLAG_INTERLACED_DCT (1 << 18)
++/**
++ * Force low delay.
++ */
++#define AV_CODEC_FLAG_LOW_DELAY (1 << 19)
++/**
++ * Place global headers in extradata instead of every keyframe.
++ */
++#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
++/**
++ * Use only bitexact stuff (except (I)DCT).
++ */
++#define AV_CODEC_FLAG_BITEXACT (1 << 23)
++/* Fx : Flag for H.263+ extra options */
++/**
++ * H.263 advanced intra coding / MPEG-4 AC prediction
++ */
++#define AV_CODEC_FLAG_AC_PRED (1 << 24)
++/**
++ * interlaced motion estimation
++ */
++#define AV_CODEC_FLAG_INTERLACED_ME (1 << 29)
++#define AV_CODEC_FLAG_CLOSED_GOP (1U << 31)
++
++/**
++ * Allow non spec compliant speedup tricks.
++ */
++#define AV_CODEC_FLAG2_FAST (1 << 0)
++/**
++ * Skip bitstream encoding.
++ */
++#define AV_CODEC_FLAG2_NO_OUTPUT (1 << 2)
++/**
++ * Place global headers at every keyframe instead of in extradata.
++ */
++#define AV_CODEC_FLAG2_LOCAL_HEADER (1 << 3)
++
++/**
++ * timecode is in drop frame format. DEPRECATED!!!!
++ */
++#define AV_CODEC_FLAG2_DROP_FRAME_TIMECODE (1 << 13)
++
++/**
++ * Input bitstream might be truncated at a packet boundaries
++ * instead of only at frame boundaries.
++ */
++#define AV_CODEC_FLAG2_CHUNKS (1 << 15)
++/**
++ * Discard cropping information from SPS.
++ */
++#define AV_CODEC_FLAG2_IGNORE_CROP (1 << 16)
++
++/**
++ * Show all frames before the first keyframe
++ */
++#define AV_CODEC_FLAG2_SHOW_ALL (1 << 22)
++/**
++ * Export motion vectors through frame side data
++ */
++#define AV_CODEC_FLAG2_EXPORT_MVS (1 << 28)
++/**
++ * Do not skip samples and export skip information as frame side data
++ */
++#define AV_CODEC_FLAG2_SKIP_MANUAL (1 << 29)
++/**
++ * Do not reset ASS ReadOrder field on flush (subtitles decoding)
++ */
++#define AV_CODEC_FLAG2_RO_FLUSH_NOOP (1 << 30)
++
++/* Unsupported options :
++ * Syntax Arithmetic coding (SAC)
++ * Reference Picture Selection
++ * Independent Segment Decoding */
++/* /Fx */
++/* codec capabilities */
++
++/**
++ * Decoder can use draw_horiz_band callback.
++ */
++#define AV_CODEC_CAP_DRAW_HORIZ_BAND (1 << 0)
++/**
++ * Codec uses get_buffer() for allocating buffers and supports custom allocators.
++ * If not set, it might not use get_buffer() at all or use operations that
++ * assume the buffer was allocated by avcodec_default_get_buffer.
++ */
++#define AV_CODEC_CAP_DR1 (1 << 1)
++#define AV_CODEC_CAP_TRUNCATED (1 << 3)
++/**
++ * Encoder or decoder requires flushing with NULL input at the end in order to
++ * give the complete and correct output.
++ *
++ * NOTE: If this flag is not set, the codec is guaranteed to never be fed with
++ * with NULL data. The user can still send NULL data to the public encode
++ * or decode function, but libavcodec will not pass it along to the codec
++ * unless this flag is set.
++ *
++ * Decoders:
++ * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL,
++ * avpkt->size=0 at the end to get the delayed data until the decoder no longer
++ * returns frames.
++ *
++ * Encoders:
++ * The encoder needs to be fed with NULL data at the end of encoding until the
++ * encoder no longer returns data.
++ *
++ * NOTE: For encoders implementing the AVCodec.encode2() function, setting this
++ * flag also means that the encoder must set the pts and duration for
++ * each output packet. If this flag is not set, the pts and duration will
++ * be determined by libavcodec from the input frame.
++ */
++#define AV_CODEC_CAP_DELAY (1 << 5)
++/**
++ * Codec can be fed a final frame with a smaller size.
++ * This can be used to prevent truncation of the last audio samples.
++ */
++#define AV_CODEC_CAP_SMALL_LAST_FRAME (1 << 6)
++
++/**
++ * Codec can output multiple frames per AVPacket
++ * Normally demuxers return one frame at a time, demuxers which do not do
++ * are connected to a parser to split what they return into proper frames.
++ * This flag is reserved to the very rare category of codecs which have a
++ * bitstream that cannot be split into frames without timeconsuming
++ * operations like full decoding. Demuxers carrying such bitstreams thus
++ * may return multiple frames in a packet. This has many disadvantages like
++ * prohibiting stream copy in many cases thus it should only be considered
++ * as a last resort.
++ */
++#define AV_CODEC_CAP_SUBFRAMES (1 << 8)
++/**
++ * Codec is experimental and is thus avoided in favor of non experimental
++ * encoders
++ */
++#define AV_CODEC_CAP_EXPERIMENTAL (1 << 9)
++/**
++ * Codec should fill in channel configuration and samplerate instead of container
++ */
++#define AV_CODEC_CAP_CHANNEL_CONF (1 << 10)
++/**
++ * Codec supports frame-level multithreading.
++ */
++#define AV_CODEC_CAP_FRAME_THREADS (1 << 12)
++/**
++ * Codec supports slice-based (or partition-based) multithreading.
++ */
++#define AV_CODEC_CAP_SLICE_THREADS (1 << 13)
++/**
++ * Codec supports changed parameters at any point.
++ */
++#define AV_CODEC_CAP_PARAM_CHANGE (1 << 14)
++/**
++ * Codec supports avctx->thread_count == 0 (auto).
++ */
++#define AV_CODEC_CAP_AUTO_THREADS (1 << 15)
++/**
++ * Audio encoder supports receiving a different number of samples in each call.
++ */
++#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE (1 << 16)
++/**
++ * Decoder is not a preferred choice for probing.
++ * This indicates that the decoder is not a good choice for probing.
++ * It could for example be an expensive to spin up hardware decoder,
++ * or it could simply not provide a lot of useful information about
++ * the stream.
++ * A decoder marked with this flag should only be used as last resort
++ * choice for probing.
++ */
++#define AV_CODEC_CAP_AVOID_PROBING (1 << 17)
++/**
++ * Codec is intra only.
++ */
++#define AV_CODEC_CAP_INTRA_ONLY 0x40000000
++/**
++ * Codec is lossless.
++ */
++#define AV_CODEC_CAP_LOSSLESS 0x80000000
++
++/**
++ * Codec is backed by a hardware implementation. Typically used to
++ * identify a non-hwaccel hardware decoder. For information about hwaccels, use
++ * avcodec_get_hw_config() instead.
++ */
++#define AV_CODEC_CAP_HARDWARE (1 << 18)
++
++/**
++ * Codec is potentially backed by a hardware implementation, but not
++ * necessarily. This is used instead of AV_CODEC_CAP_HARDWARE, if the
++ * implementation provides some sort of internal fallback.
++ */
++#define AV_CODEC_CAP_HYBRID (1 << 19)
++
++/**
++ * Pan Scan area.
++ * This specifies the area which should be displayed.
++ * Note there may be multiple such areas for one frame.
++ */
++typedef struct AVPanScan {
++ /**
++ * id
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ int id;
++
++ /**
++ * width and height in 1/16 pel
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ int width;
++ int height;
++
++ /**
++ * position of the top left corner in 1/16 pel for up to 3 fields/frames
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ int16_t position[3][2];
++} AVPanScan;
++
++/**
++ * This structure describes the bitrate properties of an encoded bitstream. It
++ * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD
++ * parameters for H.264/HEVC.
++ */
++typedef struct AVCPBProperties {
++ /**
++ * Maximum bitrate of the stream, in bits per second.
++ * Zero if unknown or unspecified.
++ */
++ int max_bitrate;
++ /**
++ * Minimum bitrate of the stream, in bits per second.
++ * Zero if unknown or unspecified.
++ */
++ int min_bitrate;
++ /**
++ * Average bitrate of the stream, in bits per second.
++ * Zero if unknown or unspecified.
++ */
++ int avg_bitrate;
++
++ /**
++ * The size of the buffer to which the ratecontrol is applied, in bits.
++ * Zero if unknown or unspecified.
++ */
++ int buffer_size;
++
++ /**
++ * The delay between the time the packet this structure is associated with
++ * is received and the time when it should be decoded, in periods of a 27MHz
++ * clock.
++ *
++ * UINT64_MAX when unknown or unspecified.
++ */
++ uint64_t vbv_delay;
++} AVCPBProperties;
++
++/**
++ * The decoder will keep a reference to the frame and may reuse it later.
++ */
++#define AV_GET_BUFFER_FLAG_REF (1 << 0)
++
++/**
++ * @defgroup lavc_packet AVPacket
++ *
++ * Types and functions for working with AVPacket.
++ * @{
++ */
++enum AVPacketSideDataType {
++ /**
++ * An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE
++ * bytes worth of palette. This side data signals that a new palette is
++ * present.
++ */
++ AV_PKT_DATA_PALETTE,
++
++ /**
++ * The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format
++ * that the extradata buffer was changed and the receiving side should
++ * act upon it appropriately. The new extradata is embedded in the side
++ * data buffer and should be immediately used for processing the current
++ * frame or packet.
++ */
++ AV_PKT_DATA_NEW_EXTRADATA,
++
++ /**
++ * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
++ * @code
++ * u32le param_flags
++ * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT)
++ * s32le channel_count
++ * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT)
++ * u64le channel_layout
++ * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE)
++ * s32le sample_rate
++ * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS)
++ * s32le width
++ * s32le height
++ * @endcode
++ */
++ AV_PKT_DATA_PARAM_CHANGE,
++
++ /**
++ * An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of
++ * structures with info about macroblocks relevant to splitting the
++ * packet into smaller packets on macroblock edges (e.g. as for RFC 2190).
++ * That is, it does not necessarily contain info about all macroblocks,
++ * as long as the distance between macroblocks in the info is smaller
++ * than the target payload size.
++ * Each MB info structure is 12 bytes, and is laid out as follows:
++ * @code
++ * u32le bit offset from the start of the packet
++ * u8 current quantizer at the start of the macroblock
++ * u8 GOB number
++ * u16le macroblock address within the GOB
++ * u8 horizontal MV predictor
++ * u8 vertical MV predictor
++ * u8 horizontal MV predictor for block number 3
++ * u8 vertical MV predictor for block number 3
++ * @endcode
++ */
++ AV_PKT_DATA_H263_MB_INFO,
++
++ /**
++ * This side data should be associated with an audio stream and contains
++ * ReplayGain information in form of the AVReplayGain struct.
++ */
++ AV_PKT_DATA_REPLAYGAIN,
++
++ /**
++ * This side data contains a 3x3 transformation matrix describing an affine
++ * transformation that needs to be applied to the decoded video frames for
++ * correct presentation.
++ *
++ * See libavutil/display.h for a detailed description of the data.
++ */
++ AV_PKT_DATA_DISPLAYMATRIX,
++
++ /**
++ * This side data should be associated with a video stream and contains
++ * Stereoscopic 3D information in form of the AVStereo3D struct.
++ */
++ AV_PKT_DATA_STEREO3D,
++
++ /**
++ * This side data should be associated with an audio stream and corresponds
++ * to enum AVAudioServiceType.
++ */
++ AV_PKT_DATA_AUDIO_SERVICE_TYPE,
++
++ /**
++ * This side data contains quality related information from the encoder.
++ * @code
++ * u32le quality factor of the compressed frame. Allowed range is between 1 (good) and FF_LAMBDA_MAX (bad).
++ * u8 picture type
++ * u8 error count
++ * u16 reserved
++ * u64le[error count] sum of squared differences between encoder in and output
++ * @endcode
++ */
++ AV_PKT_DATA_QUALITY_STATS,
++
++ /**
++ * This side data contains an integer value representing the stream index
++ * of a "fallback" track. A fallback track indicates an alternate
++ * track to use when the current track can not be decoded for some reason.
++ * e.g. no decoder available for codec.
++ */
++ AV_PKT_DATA_FALLBACK_TRACK,
++
++ /**
++ * This side data corresponds to the AVCPBProperties struct.
++ */
++ AV_PKT_DATA_CPB_PROPERTIES,
++
++ /**
++ * Recommmends skipping the specified number of samples
++ * @code
++ * u32le number of samples to skip from start of this packet
++ * u32le number of samples to skip from end of this packet
++ * u8 reason for start skip
++ * u8 reason for end skip (0=padding silence, 1=convergence)
++ * @endcode
++ */
++ AV_PKT_DATA_SKIP_SAMPLES,
++
++ /**
++ * An AV_PKT_DATA_JP_DUALMONO side data packet indicates that
++ * the packet may contain "dual mono" audio specific to Japanese DTV
++ * and if it is true, recommends only the selected channel to be used.
++ * @code
++ * u8 selected channels (0=mail/left, 1=sub/right, 2=both)
++ * @endcode
++ */
++ AV_PKT_DATA_JP_DUALMONO,
++
++ /**
++ * A list of zero terminated key/value strings. There is no end marker for
++ * the list, so it is required to rely on the side data size to stop.
++ */
++ AV_PKT_DATA_STRINGS_METADATA,
++
++ /**
++ * Subtitle event position
++ * @code
++ * u32le x1
++ * u32le y1
++ * u32le x2
++ * u32le y2
++ * @endcode
++ */
++ AV_PKT_DATA_SUBTITLE_POSITION,
++
++ /**
++ * Data found in BlockAdditional element of matroska container. There is
++ * no end marker for the data, so it is required to rely on the side data
++ * size to recognize the end. 8 byte id (as found in BlockAddId) followed
++ * by data.
++ */
++ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
++
++ /**
++ * The optional first identifier line of a WebVTT cue.
++ */
++ AV_PKT_DATA_WEBVTT_IDENTIFIER,
++
++ /**
++ * The optional settings (rendering instructions) that immediately
++ * follow the timestamp specifier of a WebVTT cue.
++ */
++ AV_PKT_DATA_WEBVTT_SETTINGS,
++
++ /**
++ * A list of zero terminated key/value strings. There is no end marker for
++ * the list, so it is required to rely on the side data size to stop. This
++ * side data includes updated metadata which appeared in the stream.
++ */
++ AV_PKT_DATA_METADATA_UPDATE,
++
++ /**
++ * MPEGTS stream ID, this is required to pass the stream ID
++ * information from the demuxer to the corresponding muxer.
++ */
++ AV_PKT_DATA_MPEGTS_STREAM_ID,
++
++ /**
++ * Mastering display metadata (based on SMPTE-2086:2014). This metadata
++ * should be associated with a video stream and contains data in the form
++ * of the AVMasteringDisplayMetadata struct.
++ */
++ AV_PKT_DATA_MASTERING_DISPLAY_METADATA,
++
++ /**
++ * This side data should be associated with a video stream and corresponds
++ * to the AVSphericalMapping structure.
++ */
++ AV_PKT_DATA_SPHERICAL,
++
++ /**
++ * Content light level (based on CTA-861.3). This metadata should be
++ * associated with a video stream and contains data in the form of the
++ * AVContentLightMetadata struct.
++ */
++ AV_PKT_DATA_CONTENT_LIGHT_LEVEL,
++
++ /**
++ * ATSC A53 Part 4 Closed Captions. This metadata should be associated with
++ * a video stream. A53 CC bitstream is stored as uint8_t in AVPacketSideData.data.
++ * The number of bytes of CC data is AVPacketSideData.size.
++ */
++ AV_PKT_DATA_A53_CC,
++
++ /**
++ * This side data is encryption initialization data.
++ * The format is not part of ABI, use av_encryption_init_info_* methods to
++ * access.
++ */
++ AV_PKT_DATA_ENCRYPTION_INIT_INFO,
++
++ /**
++ * This side data contains encryption info for how to decrypt the packet.
++ * The format is not part of ABI, use av_encryption_info_* methods to access.
++ */
++ AV_PKT_DATA_ENCRYPTION_INFO,
++
++ /**
++ * The number of side data types.
++ * This is not part of the public API/ABI in the sense that it may
++ * change when new side data types are added.
++ * This must stay the last enum value.
++ * If its value becomes huge, some code using it
++ * needs to be updated as it assumes it to be smaller than other limits.
++ */
++ AV_PKT_DATA_NB
++};
++
++#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED
++
++typedef struct AVPacketSideData {
++ uint8_t *data;
++ int size;
++ enum AVPacketSideDataType type;
++} AVPacketSideData;
++
++/**
++ * This structure stores compressed data. It is typically exported by demuxers
++ * and then passed as input to decoders, or received as output from encoders and
++ * then passed to muxers.
++ *
++ * For video, it should typically contain one compressed frame. For audio it may
++ * contain several compressed frames. Encoders are allowed to output empty
++ * packets, with no compressed data, containing only side data
++ * (e.g. to update some stream parameters at the end of encoding).
++ *
++ * AVPacket is one of the few structs in FFmpeg, whose size is a part of public
++ * ABI. Thus it may be allocated on stack and no new fields can be added to it
++ * without libavcodec and libavformat major bump.
++ *
++ * The semantics of data ownership depends on the buf field.
++ * If it is set, the packet data is dynamically allocated and is
++ * valid indefinitely until a call to av_packet_unref() reduces the
++ * reference count to 0.
++ *
++ * If the buf field is not set av_packet_ref() would make a copy instead
++ * of increasing the reference count.
++ *
++ * The side data is always allocated with av_malloc(), copied by
++ * av_packet_ref() and freed by av_packet_unref().
++ *
++ * @see av_packet_ref
++ * @see av_packet_unref
++ */
++typedef struct AVPacket {
++ /**
++ * A reference to the reference-counted buffer where the packet data is
++ * stored.
++ * May be NULL, then the packet data is not reference-counted.
++ */
++ AVBufferRef *buf;
++ /**
++ * Presentation timestamp in AVStream->time_base units; the time at which
++ * the decompressed packet will be presented to the user.
++ * Can be AV_NOPTS_VALUE if it is not stored in the file.
++ * pts MUST be larger or equal to dts as presentation cannot happen before
++ * decompression, unless one wants to view hex dumps. Some formats misuse
++ * the terms dts and pts/cts to mean something different. Such timestamps
++ * must be converted to true pts/dts before they are stored in AVPacket.
++ */
++ int64_t pts;
++ /**
++ * Decompression timestamp in AVStream->time_base units; the time at which
++ * the packet is decompressed.
++ * Can be AV_NOPTS_VALUE if it is not stored in the file.
++ */
++ int64_t dts;
++ uint8_t *data;
++ int size;
++ int stream_index;
++ /**
++ * A combination of AV_PKT_FLAG values
++ */
++ int flags;
++ /**
++ * Additional packet data that can be provided by the container.
++ * Packet can contain several types of side information.
++ */
++ AVPacketSideData *side_data;
++ int side_data_elems;
++
++ /**
++ * Duration of this packet in AVStream->time_base units, 0 if unknown.
++ * Equals next_pts - this_pts in presentation order.
++ */
++ int64_t duration;
++
++ int64_t pos; ///< byte position in stream, -1 if unknown
++
++#if FF_API_CONVERGENCE_DURATION
++ /**
++ * @deprecated Same as the duration field, but as int64_t. This was required
++ * for Matroska subtitles, whose duration values could overflow when the
++ * duration field was still an int.
++ */
++ attribute_deprecated
++ int64_t convergence_duration;
++#endif
++} AVPacket;
++#define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe
++#define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted
++/**
++ * Flag is used to discard packets which are required to maintain valid
++ * decoder state but are not required for output and should be dropped
++ * after decoding.
++ **/
++#define AV_PKT_FLAG_DISCARD 0x0004
++/**
++ * The packet comes from a trusted source.
++ *
++ * Otherwise-unsafe constructs such as arbitrary pointers to data
++ * outside the packet may be followed.
++ */
++#define AV_PKT_FLAG_TRUSTED 0x0008
++/**
++ * Flag is used to indicate packets that contain frames that can
++ * be discarded by the decoder. I.e. Non-reference frames.
++ */
++#define AV_PKT_FLAG_DISPOSABLE 0x0010
++
++
++enum AVSideDataParamChangeFlags {
++ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
++ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
++ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
++ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
++};
++/**
++ * @}
++ */
++
++struct AVCodecInternal;
++
++enum AVFieldOrder {
++ AV_FIELD_UNKNOWN,
++ AV_FIELD_PROGRESSIVE,
++ AV_FIELD_TT, //< Top coded_first, top displayed first
++ AV_FIELD_BB, //< Bottom coded first, bottom displayed first
++ AV_FIELD_TB, //< Top coded first, bottom displayed first
++ AV_FIELD_BT, //< Bottom coded first, top displayed first
++};
++
++/**
++ * main external API structure.
++ * New fields can be added to the end with minor version bumps.
++ * Removal, reordering and changes to existing fields require a major
++ * version bump.
++ * You can use AVOptions (av_opt* / av_set/get*()) to access these fields from user
++ * applications.
++ * The name string for AVOptions options matches the associated command line
++ * parameter name and can be found in libavcodec/options_table.h
++ * The AVOption/command line parameter names differ in some cases from the C
++ * structure field names for historic reasons or brevity.
++ * sizeof(AVCodecContext) must not be used outside libav*.
++ */
++typedef struct AVCodecContext {
++ /**
++ * information on struct for av_log
++ * - set by avcodec_alloc_context3
++ */
++ const AVClass *av_class;
++ int log_level_offset;
++
++ enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
++ const struct AVCodec *codec;
++ enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
++
++ /**
++ * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
++ * This is used to work around some encoder bugs.
++ * A demuxer should set this to what is stored in the field used to identify the codec.
++ * If there are multiple such fields in a container then the demuxer should choose the one
++ * which maximizes the information about the used codec.
++ * If the codec tag field in a container is larger than 32 bits then the demuxer should
++ * remap the longer ID to 32 bits with a table or other structure. Alternatively a new
++ * extra_codec_tag + size could be added but for this a clear advantage must be demonstrated
++ * first.
++ * - encoding: Set by user, if not then the default based on codec_id will be used.
++ * - decoding: Set by user, will be converted to uppercase by libavcodec during init.
++ */
++ unsigned int codec_tag;
++
++ void *priv_data;
++
++ /**
++ * Private context used for internal data.
++ *
++ * Unlike priv_data, this is not codec-specific. It is used in general
++ * libavcodec functions.
++ */
++ struct AVCodecInternal *internal;
++
++ /**
++ * Private data of the user, can be used to carry app specific stuff.
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ void *opaque;
++
++ /**
++ * the average bitrate
++ * - encoding: Set by user; unused for constant quantizer encoding.
++ * - decoding: Set by user, may be overwritten by libavcodec
++ * if this info is available in the stream
++ */
++ int64_t bit_rate;
++
++ /**
++ * number of bits the bitstream is allowed to diverge from the reference.
++ * the reference can be CBR (for CBR pass1) or VBR (for pass2)
++ * - encoding: Set by user; unused for constant quantizer encoding.
++ * - decoding: unused
++ */
++ int bit_rate_tolerance;
++
++ /**
++ * Global quality for codecs which cannot change it per frame.
++ * This should be proportional to MPEG-1/2/4 qscale.
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int global_quality;
++
++ /**
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int compression_level;
++#define FF_COMPRESSION_DEFAULT -1
++
++ /**
++ * AV_CODEC_FLAG_*.
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int flags;
++
++ /**
++ * AV_CODEC_FLAG2_*
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int flags2;
++
++ /**
++ * some codecs need / can use extradata like Huffman tables.
++ * MJPEG: Huffman tables
++ * rv10: additional flags
++ * MPEG-4: global headers (they can be in the bitstream or here)
++ * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
++ * than extradata_size to avoid problems if it is read with the bitstream reader.
++ * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
++ * - encoding: Set/allocated/freed by libavcodec.
++ * - decoding: Set/allocated/freed by user.
++ */
++ uint8_t *extradata;
++ int extradata_size;
++
++ /**
++ * This is the fundamental unit of time (in seconds) in terms
++ * of which frame timestamps are represented. For fixed-fps content,
++ * timebase should be 1/framerate and timestamp increments should be
++ * identically 1.
++ * This often, but not always is the inverse of the frame rate or field rate
++ * for video. 1/time_base is not the average frame rate if the frame rate is not
++ * constant.
++ *
++ * Like containers, elementary streams also can store timestamps, 1/time_base
++ * is the unit in which these timestamps are specified.
++ * As example of such codec time base see ISO/IEC 14496-2:2001(E)
++ * vop_time_increment_resolution and fixed_vop_rate
++ * (fixed_vop_rate == 0 implies that it is different from the framerate)
++ *
++ * - encoding: MUST be set by user.
++ * - decoding: the use of this field for decoding is deprecated.
++ * Use framerate instead.
++ */
++ AVRational time_base;
++
++ /**
++ * For some codecs, the time base is closer to the field rate than the frame rate.
++ * Most notably, H.264 and MPEG-2 specify time_base as half of frame duration
++ * if no telecine is used ...
++ *
++ * Set to time_base ticks per frame. Default 1, e.g., H.264/MPEG-2 set it to 2.
++ */
++ int ticks_per_frame;
++
++ /**
++ * Codec delay.
++ *
++ * Encoding: Number of frames delay there will be from the encoder input to
++ * the decoder output. (we assume the decoder matches the spec)
++ * Decoding: Number of frames delay in addition to what a standard decoder
++ * as specified in the spec would produce.
++ *
++ * Video:
++ * Number of frames the decoded output will be delayed relative to the
++ * encoded input.
++ *
++ * Audio:
++ * For encoding, this field is unused (see initial_padding).
++ *
++ * For decoding, this is the number of samples the decoder needs to
++ * output before the decoder's output is valid. When seeking, you should
++ * start decoding this many samples prior to your desired seek point.
++ *
++ * - encoding: Set by libavcodec.
++ * - decoding: Set by libavcodec.
++ */
++ int delay;
++
++
++ /* video only */
++ /**
++ * picture width / height.
++ *
++ * @note Those fields may not match the values of the last
++ * AVFrame output by avcodec_decode_video2 due frame
++ * reordering.
++ *
++ * - encoding: MUST be set by user.
++ * - decoding: May be set by the user before opening the decoder if known e.g.
++ * from the container. Some decoders will require the dimensions
++ * to be set by the caller. During decoding, the decoder may
++ * overwrite those values as required while parsing the data.
++ */
++ int width, height;
++
++ /**
++ * Bitstream width / height, may be different from width/height e.g. when
++ * the decoded frame is cropped before being output or lowres is enabled.
++ *
++ * @note Those field may not match the value of the last
++ * AVFrame output by avcodec_receive_frame() due frame
++ * reordering.
++ *
++ * - encoding: unused
++ * - decoding: May be set by the user before opening the decoder if known
++ * e.g. from the container. During decoding, the decoder may
++ * overwrite those values as required while parsing the data.
++ */
++ int coded_width, coded_height;
++
++ /**
++ * the number of pictures in a group of pictures, or 0 for intra_only
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int gop_size;
++
++ /**
++ * Pixel format, see AV_PIX_FMT_xxx.
++ * May be set by the demuxer if known from headers.
++ * May be overridden by the decoder if it knows better.
++ *
++ * @note This field may not match the value of the last
++ * AVFrame output by avcodec_receive_frame() due frame
++ * reordering.
++ *
++ * - encoding: Set by user.
++ * - decoding: Set by user if known, overridden by libavcodec while
++ * parsing the data.
++ */
++ enum AVPixelFormat pix_fmt;
++
++ /**
++ * If non NULL, 'draw_horiz_band' is called by the libavcodec
++ * decoder to draw a horizontal band. It improves cache usage. Not
++ * all codecs can do that. You must check the codec capabilities
++ * beforehand.
++ * When multithreading is used, it may be called from multiple threads
++ * at the same time; threads might draw different parts of the same AVFrame,
++ * or multiple AVFrames, and there is no guarantee that slices will be drawn
++ * in order.
++ * The function is also used by hardware acceleration APIs.
++ * It is called at least once during frame decoding to pass
++ * the data needed for hardware render.
++ * In that mode instead of pixel data, AVFrame points to
++ * a structure specific to the acceleration API. The application
++ * reads the structure and can change some fields to indicate progress
++ * or mark state.
++ * - encoding: unused
++ * - decoding: Set by user.
++ * @param height the height of the slice
++ * @param y the y position of the slice
++ * @param type 1->top field, 2->bottom field, 3->frame
++ * @param offset offset into the AVFrame.data from which the slice should be read
++ */
++ void (*draw_horiz_band)(struct AVCodecContext *s,
++ const AVFrame *src, int offset[AV_NUM_DATA_POINTERS],
++ int y, int type, int height);
++
++ /**
++ * callback to negotiate the pixelFormat
++ * @param fmt is the list of formats which are supported by the codec,
++ * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality.
++ * The first is always the native one.
++ * @note The callback may be called again immediately if initialization for
++ * the selected (hardware-accelerated) pixel format failed.
++ * @warning Behavior is undefined if the callback returns a value not
++ * in the fmt list of formats.
++ * @return the chosen format
++ * - encoding: unused
++ * - decoding: Set by user, if not set the native format will be chosen.
++ */
++ enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
++
++ /**
++ * maximum number of B-frames between non-B-frames
++ * Note: The output will be delayed by max_b_frames+1 relative to the input.
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int max_b_frames;
++
++ /**
++ * qscale factor between IP and B-frames
++ * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset).
++ * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float b_quant_factor;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int b_frame_strategy;
++#endif
++
++ /**
++ * qscale offset between IP and B-frames
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float b_quant_offset;
++
++ /**
++ * Size of the frame reordering buffer in the decoder.
++ * For MPEG-2 it is 1 IPB or 0 low delay IP.
++ * - encoding: Set by libavcodec.
++ * - decoding: Set by libavcodec.
++ */
++ int has_b_frames;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int mpeg_quant;
++#endif
++
++ /**
++ * qscale factor between P- and I-frames
++ * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
++ * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float i_quant_factor;
++
++ /**
++ * qscale offset between P and I-frames
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float i_quant_offset;
++
++ /**
++ * luminance masking (0-> disabled)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float lumi_masking;
++
++ /**
++ * temporary complexity masking (0-> disabled)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float temporal_cplx_masking;
++
++ /**
++ * spatial complexity masking (0-> disabled)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float spatial_cplx_masking;
++
++ /**
++ * p block masking (0-> disabled)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float p_masking;
++
++ /**
++ * darkness masking (0-> disabled)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ float dark_masking;
++
++ /**
++ * slice count
++ * - encoding: Set by libavcodec.
++ * - decoding: Set by user (or 0).
++ */
++ int slice_count;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int prediction_method;
++#define FF_PRED_LEFT 0
++#define FF_PRED_PLANE 1
++#define FF_PRED_MEDIAN 2
++#endif
++
++ /**
++ * slice offsets in the frame in bytes
++ * - encoding: Set/allocated by libavcodec.
++ * - decoding: Set/allocated by user (or NULL).
++ */
++ int *slice_offset;
++
++ /**
++ * sample aspect ratio (0 if unknown)
++ * That is the width of a pixel divided by the height of the pixel.
++ * Numerator and denominator must be relatively prime and smaller than 256 for some video standards.
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ AVRational sample_aspect_ratio;
++
++ /**
++ * motion estimation comparison function
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int me_cmp;
++ /**
++ * subpixel motion estimation comparison function
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int me_sub_cmp;
++ /**
++ * macroblock comparison function (not supported yet)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int mb_cmp;
++ /**
++ * interlaced DCT comparison function
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int ildct_cmp;
++#define FF_CMP_SAD 0
++#define FF_CMP_SSE 1
++#define FF_CMP_SATD 2
++#define FF_CMP_DCT 3
++#define FF_CMP_PSNR 4
++#define FF_CMP_BIT 5
++#define FF_CMP_RD 6
++#define FF_CMP_ZERO 7
++#define FF_CMP_VSAD 8
++#define FF_CMP_VSSE 9
++#define FF_CMP_NSSE 10
++#define FF_CMP_W53 11
++#define FF_CMP_W97 12
++#define FF_CMP_DCTMAX 13
++#define FF_CMP_DCT264 14
++#define FF_CMP_MEDIAN_SAD 15
++#define FF_CMP_CHROMA 256
++
++ /**
++ * ME diamond size & shape
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int dia_size;
++
++ /**
++ * amount of previous MV predictors (2a+1 x 2a+1 square)
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int last_predictor_count;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int pre_me;
++#endif
++
++ /**
++ * motion estimation prepass comparison function
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int me_pre_cmp;
++
++ /**
++ * ME prepass diamond size & shape
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int pre_dia_size;
++
++ /**
++ * subpel ME quality
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int me_subpel_quality;
++
++ /**
++ * maximum motion estimation search range in subpel units
++ * If 0 then no limit.
++ *
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int me_range;
++
++ /**
++ * slice flags
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int slice_flags;
++#define SLICE_FLAG_CODED_ORDER 0x0001 ///< draw_horiz_band() is called in coded order instead of display
++#define SLICE_FLAG_ALLOW_FIELD 0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics)
++#define SLICE_FLAG_ALLOW_PLANE 0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
++
++ /**
++ * macroblock decision mode
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int mb_decision;
++#define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp
++#define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits
++#define FF_MB_DECISION_RD 2 ///< rate distortion
++
++ /**
++ * custom intra quantization matrix
++ * - encoding: Set by user, can be NULL.
++ * - decoding: Set by libavcodec.
++ */
++ uint16_t *intra_matrix;
++
++ /**
++ * custom inter quantization matrix
++ * - encoding: Set by user, can be NULL.
++ * - decoding: Set by libavcodec.
++ */
++ uint16_t *inter_matrix;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int scenechange_threshold;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int noise_reduction;
++#endif
++
++ /**
++ * precision of the intra DC coefficient - 8
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec
++ */
++ int intra_dc_precision;
++
++ /**
++ * Number of macroblock rows at the top which are skipped.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int skip_top;
++
++ /**
++ * Number of macroblock rows at the bottom which are skipped.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int skip_bottom;
++
++ /**
++ * minimum MB Lagrange multiplier
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int mb_lmin;
++
++ /**
++ * maximum MB Lagrange multiplier
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int mb_lmax;
++
++#if FF_API_PRIVATE_OPT
++ /**
++ * @deprecated use encoder private options instead
++ */
++ attribute_deprecated
++ int me_penalty_compensation;
++#endif
++
++ /**
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int bidir_refine;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int brd_scale;
++#endif
++
++ /**
++ * minimum GOP size
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int keyint_min;
++
++ /**
++ * number of reference frames
++ * - encoding: Set by user.
++ * - decoding: Set by lavc.
++ */
++ int refs;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int chromaoffset;
++#endif
++
++ /**
++ * Note: Value depends upon the compare function used for fullpel ME.
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int mv0_threshold;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int b_sensitivity;
++#endif
++
++ /**
++ * Chromaticity coordinates of the source primaries.
++ * - encoding: Set by user
++ * - decoding: Set by libavcodec
++ */
++ enum AVColorPrimaries color_primaries;
++
++ /**
++ * Color Transfer Characteristic.
++ * - encoding: Set by user
++ * - decoding: Set by libavcodec
++ */
++ enum AVColorTransferCharacteristic color_trc;
++
++ /**
++ * YUV colorspace type.
++ * - encoding: Set by user
++ * - decoding: Set by libavcodec
++ */
++ enum AVColorSpace colorspace;
++
++ /**
++ * MPEG vs JPEG YUV range.
++ * - encoding: Set by user
++ * - decoding: Set by libavcodec
++ */
++ enum AVColorRange color_range;
++
++ /**
++ * This defines the location of chroma samples.
++ * - encoding: Set by user
++ * - decoding: Set by libavcodec
++ */
++ enum AVChromaLocation chroma_sample_location;
++
++ /**
++ * Number of slices.
++ * Indicates number of picture subdivisions. Used for parallelized
++ * decoding.
++ * - encoding: Set by user
++ * - decoding: unused
++ */
++ int slices;
++
++ /** Field order
++ * - encoding: set by libavcodec
++ * - decoding: Set by user.
++ */
++ enum AVFieldOrder field_order;
++
++ /* audio only */
++ int sample_rate; ///< samples per second
++ int channels; ///< number of audio channels
++
++ /**
++ * audio sample format
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ enum AVSampleFormat sample_fmt; ///< sample format
++
++ /* The following data should not be initialized. */
++ /**
++ * Number of samples per channel in an audio frame.
++ *
++ * - encoding: set by libavcodec in avcodec_open2(). Each submitted frame
++ * except the last must contain exactly frame_size samples per channel.
++ * May be 0 when the codec has AV_CODEC_CAP_VARIABLE_FRAME_SIZE set, then the
++ * frame size is not restricted.
++ * - decoding: may be set by some decoders to indicate constant frame size
++ */
++ int frame_size;
++
++ /**
++ * Frame counter, set by libavcodec.
++ *
++ * - decoding: total number of frames returned from the decoder so far.
++ * - encoding: total number of frames passed to the encoder so far.
++ *
++ * @note the counter is not incremented if encoding/decoding resulted in
++ * an error.
++ */
++ int frame_number;
++
++ /**
++ * number of bytes per packet if constant and known or 0
++ * Used by some WAV based audio codecs.
++ */
++ int block_align;
++
++ /**
++ * Audio cutoff bandwidth (0 means "automatic")
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int cutoff;
++
++ /**
++ * Audio channel layout.
++ * - encoding: set by user.
++ * - decoding: set by user, may be overwritten by libavcodec.
++ */
++ uint64_t channel_layout;
++
++ /**
++ * Request decoder to use this channel layout if it can (0 for default)
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ uint64_t request_channel_layout;
++
++ /**
++ * Type of service that the audio stream conveys.
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ enum AVAudioServiceType audio_service_type;
++
++ /**
++ * desired sample format
++ * - encoding: Not used.
++ * - decoding: Set by user.
++ * Decoder will decode to this format if it can.
++ */
++ enum AVSampleFormat request_sample_fmt;
++
++ /**
++ * This callback is called at the beginning of each frame to get data
++ * buffer(s) for it. There may be one contiguous buffer for all the data or
++ * there may be a buffer per each data plane or anything in between. What
++ * this means is, you may set however many entries in buf[] you feel necessary.
++ * Each buffer must be reference-counted using the AVBuffer API (see description
++ * of buf[] below).
++ *
++ * The following fields will be set in the frame before this callback is
++ * called:
++ * - format
++ * - width, height (video only)
++ * - sample_rate, channel_layout, nb_samples (audio only)
++ * Their values may differ from the corresponding values in
++ * AVCodecContext. This callback must use the frame values, not the codec
++ * context values, to calculate the required buffer size.
++ *
++ * This callback must fill the following fields in the frame:
++ * - data[]
++ * - linesize[]
++ * - extended_data:
++ * * if the data is planar audio with more than 8 channels, then this
++ * callback must allocate and fill extended_data to contain all pointers
++ * to all data planes. data[] must hold as many pointers as it can.
++ * extended_data must be allocated with av_malloc() and will be freed in
++ * av_frame_unref().
++ * * otherwise extended_data must point to data
++ * - buf[] must contain one or more pointers to AVBufferRef structures. Each of
++ * the frame's data and extended_data pointers must be contained in these. That
++ * is, one AVBufferRef for each allocated chunk of memory, not necessarily one
++ * AVBufferRef per data[] entry. See: av_buffer_create(), av_buffer_alloc(),
++ * and av_buffer_ref().
++ * - extended_buf and nb_extended_buf must be allocated with av_malloc() by
++ * this callback and filled with the extra buffers if there are more
++ * buffers than buf[] can hold. extended_buf will be freed in
++ * av_frame_unref().
++ *
++ * If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call
++ * avcodec_default_get_buffer2() instead of providing buffers allocated by
++ * some other means.
++ *
++ * Each data plane must be aligned to the maximum required by the target
++ * CPU.
++ *
++ * @see avcodec_default_get_buffer2()
++ *
++ * Video:
++ *
++ * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused
++ * (read and/or written to if it is writable) later by libavcodec.
++ *
++ * avcodec_align_dimensions2() should be used to find the required width and
++ * height, as they normally need to be rounded up to the next multiple of 16.
++ *
++ * Some decoders do not support linesizes changing between frames.
++ *
++ * If frame multithreading is used and thread_safe_callbacks is set,
++ * this callback may be called from a different thread, but not from more
++ * than one at once. Does not need to be reentrant.
++ *
++ * @see avcodec_align_dimensions2()
++ *
++ * Audio:
++ *
++ * Decoders request a buffer of a particular size by setting
++ * AVFrame.nb_samples prior to calling get_buffer2(). The decoder may,
++ * however, utilize only part of the buffer by setting AVFrame.nb_samples
++ * to a smaller value in the output frame.
++ *
++ * As a convenience, av_samples_get_buffer_size() and
++ * av_samples_fill_arrays() in libavutil may be used by custom get_buffer2()
++ * functions to find the required data size and to fill data pointers and
++ * linesize. In AVFrame.linesize, only linesize[0] may be set for audio
++ * since all planes must be the same size.
++ *
++ * @see av_samples_get_buffer_size(), av_samples_fill_arrays()
++ *
++ * - encoding: unused
++ * - decoding: Set by libavcodec, user can override.
++ */
++ int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
++
++ /**
++ * If non-zero, the decoded audio and video frames returned from
++ * avcodec_decode_video2() and avcodec_decode_audio4() are reference-counted
++ * and are valid indefinitely. The caller must free them with
++ * av_frame_unref() when they are not needed anymore.
++ * Otherwise, the decoded frames must not be freed by the caller and are
++ * only valid until the next decode call.
++ *
++ * This is always automatically enabled if avcodec_receive_frame() is used.
++ *
++ * - encoding: unused
++ * - decoding: set by the caller before avcodec_open2().
++ */
++ attribute_deprecated
++ int refcounted_frames;
++
++ /* - encoding parameters */
++ float qcompress; ///< amount of qscale change between easy & hard scenes (0.0-1.0)
++ float qblur; ///< amount of qscale smoothing over time (0.0-1.0)
++
++ /**
++ * minimum quantizer
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int qmin;
++
++ /**
++ * maximum quantizer
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int qmax;
++
++ /**
++ * maximum quantizer difference between frames
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int max_qdiff;
++
++ /**
++ * decoder bitstream buffer size
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int rc_buffer_size;
++
++ /**
++ * ratecontrol override, see RcOverride
++ * - encoding: Allocated/set/freed by user.
++ * - decoding: unused
++ */
++ int rc_override_count;
++ RcOverride *rc_override;
++
++ /**
++ * maximum bitrate
++ * - encoding: Set by user.
++ * - decoding: Set by user, may be overwritten by libavcodec.
++ */
++ int64_t rc_max_rate;
++
++ /**
++ * minimum bitrate
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int64_t rc_min_rate;
++
++ /**
++ * Ratecontrol attempt to use, at maximum, <value> of what can be used without an underflow.
++ * - encoding: Set by user.
++ * - decoding: unused.
++ */
++ float rc_max_available_vbv_use;
++
++ /**
++ * Ratecontrol attempt to use, at least, <value> times the amount needed to prevent a vbv overflow.
++ * - encoding: Set by user.
++ * - decoding: unused.
++ */
++ float rc_min_vbv_overflow_use;
++
++ /**
++ * Number of bits which should be loaded into the rc buffer before decoding starts.
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int rc_initial_buffer_occupancy;
++
++#if FF_API_CODER_TYPE
++#define FF_CODER_TYPE_VLC 0
++#define FF_CODER_TYPE_AC 1
++#define FF_CODER_TYPE_RAW 2
++#define FF_CODER_TYPE_RLE 3
++ /**
++ * @deprecated use encoder private options instead
++ */
++ attribute_deprecated
++ int coder_type;
++#endif /* FF_API_CODER_TYPE */
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int context_model;
++#endif
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int frame_skip_threshold;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int frame_skip_factor;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int frame_skip_exp;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int frame_skip_cmp;
++#endif /* FF_API_PRIVATE_OPT */
++
++ /**
++ * trellis RD quantization
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int trellis;
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int min_prediction_order;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int max_prediction_order;
++
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int64_t timecode_frame_start;
++#endif
++
++#if FF_API_RTP_CALLBACK
++ /**
++ * @deprecated unused
++ */
++ /* The RTP callback: This function is called */
++ /* every time the encoder has a packet to send. */
++ /* It depends on the encoder if the data starts */
++ /* with a Start Code (it should). H.263 does. */
++ /* mb_nb contains the number of macroblocks */
++ /* encoded in the RTP payload. */
++ attribute_deprecated
++ void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
++#endif
++
++#if FF_API_PRIVATE_OPT
++ /** @deprecated use encoder private options instead */
++ attribute_deprecated
++ int rtp_payload_size; /* The size of the RTP payload: the coder will */
++ /* do its best to deliver a chunk with size */
++ /* below rtp_payload_size, the chunk will start */
++ /* with a start code on some codecs like H.263. */
++ /* This doesn't take account of any particular */
++ /* headers inside the transmitted RTP payload. */
++#endif
++
++#if FF_API_STAT_BITS
++ /* statistics, used for 2-pass encoding */
++ attribute_deprecated
++ int mv_bits;
++ attribute_deprecated
++ int header_bits;
++ attribute_deprecated
++ int i_tex_bits;
++ attribute_deprecated
++ int p_tex_bits;
++ attribute_deprecated
++ int i_count;
++ attribute_deprecated
++ int p_count;
++ attribute_deprecated
++ int skip_count;
++ attribute_deprecated
++ int misc_bits;
++
++ /** @deprecated this field is unused */
++ attribute_deprecated
++ int frame_bits;
++#endif
++
++ /**
++ * pass1 encoding statistics output buffer
++ * - encoding: Set by libavcodec.
++ * - decoding: unused
++ */
++ char *stats_out;
++
++ /**
++ * pass2 encoding statistics input buffer
++ * Concatenated stuff from stats_out of pass1 should be placed here.
++ * - encoding: Allocated/set/freed by user.
++ * - decoding: unused
++ */
++ char *stats_in;
++
++ /**
++ * Work around bugs in encoders which sometimes cannot be detected automatically.
++ * - encoding: Set by user
++ * - decoding: Set by user
++ */
++ int workaround_bugs;
++#define FF_BUG_AUTODETECT 1 ///< autodetection
++#define FF_BUG_XVID_ILACE 4
++#define FF_BUG_UMP4 8
++#define FF_BUG_NO_PADDING 16
++#define FF_BUG_AMV 32
++#define FF_BUG_QPEL_CHROMA 64
++#define FF_BUG_STD_QPEL 128
++#define FF_BUG_QPEL_CHROMA2 256
++#define FF_BUG_DIRECT_BLOCKSIZE 512
++#define FF_BUG_EDGE 1024
++#define FF_BUG_HPEL_CHROMA 2048
++#define FF_BUG_DC_CLIP 4096
++#define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
++#define FF_BUG_TRUNCATED 16384
++#define FF_BUG_IEDGE 32768
++
++ /**
++ * strictly follow the standard (MPEG-4, ...).
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ * Setting this to STRICT or higher means the encoder and decoder will
++ * generally do stupid things, whereas setting it to unofficial or lower
++ * will mean the encoder might produce output that is not supported by all
++ * spec-compliant decoders. Decoders don't differentiate between normal,
++ * unofficial and experimental (that is, they always try to decode things
++ * when they can) unless they are explicitly asked to behave stupidly
++ * (=strictly conform to the specs)
++ */
++ int strict_std_compliance;
++#define FF_COMPLIANCE_VERY_STRICT 2 ///< Strictly conform to an older more strict version of the spec or reference software.
++#define FF_COMPLIANCE_STRICT 1 ///< Strictly conform to all the things in the spec no matter what consequences.
++#define FF_COMPLIANCE_NORMAL 0
++#define FF_COMPLIANCE_UNOFFICIAL -1 ///< Allow unofficial extensions
++#define FF_COMPLIANCE_EXPERIMENTAL -2 ///< Allow nonstandardized experimental things.
++
++ /**
++ * error concealment flags
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int error_concealment;
++#define FF_EC_GUESS_MVS 1
++#define FF_EC_DEBLOCK 2
++#define FF_EC_FAVOR_INTER 256
++
++ /**
++ * debug
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int debug;
++#define FF_DEBUG_PICT_INFO 1
++#define FF_DEBUG_RC 2
++#define FF_DEBUG_BITSTREAM 4
++#define FF_DEBUG_MB_TYPE 8
++#define FF_DEBUG_QP 16
++#if FF_API_DEBUG_MV
++/**
++ * @deprecated this option does nothing
++ */
++#define FF_DEBUG_MV 32
++#endif
++#define FF_DEBUG_DCT_COEFF 0x00000040
++#define FF_DEBUG_SKIP 0x00000080
++#define FF_DEBUG_STARTCODE 0x00000100
++#define FF_DEBUG_ER 0x00000400
++#define FF_DEBUG_MMCO 0x00000800
++#define FF_DEBUG_BUGS 0x00001000
++#if FF_API_DEBUG_MV
++#define FF_DEBUG_VIS_QP 0x00002000
++#define FF_DEBUG_VIS_MB_TYPE 0x00004000
++#endif
++#define FF_DEBUG_BUFFERS 0x00008000
++#define FF_DEBUG_THREADS 0x00010000
++#define FF_DEBUG_GREEN_MD 0x00800000
++#define FF_DEBUG_NOMC 0x01000000
++
++#if FF_API_DEBUG_MV
++ /**
++ * debug
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int debug_mv;
++#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 // visualize forward predicted MVs of P-frames
++#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 // visualize forward predicted MVs of B-frames
++#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
++#endif
++
++ /**
++ * Error recognition; may misdetect some more or less valid parts as errors.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int err_recognition;
++
++/**
++ * Verify checksums embedded in the bitstream (could be of either encoded or
++ * decoded data, depending on the codec) and print an error message on mismatch.
++ * If AV_EF_EXPLODE is also set, a mismatching checksum will result in the
++ * decoder returning an error.
++ */
++#define AV_EF_CRCCHECK (1<<0)
++#define AV_EF_BITSTREAM (1<<1) ///< detect bitstream specification deviations
++#define AV_EF_BUFFER (1<<2) ///< detect improper bitstream length
++#define AV_EF_EXPLODE (1<<3) ///< abort decoding on minor error detection
++
++#define AV_EF_IGNORE_ERR (1<<15) ///< ignore errors and continue
++#define AV_EF_CAREFUL (1<<16) ///< consider things that violate the spec, are fast to calculate and have not been seen in the wild as errors
++#define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors
++#define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error
++
++
++ /**
++ * opaque 64-bit number (generally a PTS) that will be reordered and
++ * output in AVFrame.reordered_opaque
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int64_t reordered_opaque;
++
++ /**
++ * Hardware accelerator in use
++ * - encoding: unused.
++ * - decoding: Set by libavcodec
++ */
++ const struct AVHWAccel *hwaccel;
++
++ /**
++ * Hardware accelerator context.
++ * For some hardware accelerators, a global context needs to be
++ * provided by the user. In that case, this holds display-dependent
++ * data FFmpeg cannot instantiate itself. Please refer to the
++ * FFmpeg HW accelerator documentation to know how to fill this
++ * is. e.g. for VA API, this is a struct vaapi_context.
++ * - encoding: unused
++ * - decoding: Set by user
++ */
++ void *hwaccel_context;
++
++ /**
++ * error
++ * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR.
++ * - decoding: unused
++ */
++ uint64_t error[AV_NUM_DATA_POINTERS];
++
++ /**
++ * DCT algorithm, see FF_DCT_* below
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int dct_algo;
++#define FF_DCT_AUTO 0
++#define FF_DCT_FASTINT 1
++#define FF_DCT_INT 2
++#define FF_DCT_MMX 3
++#define FF_DCT_ALTIVEC 5
++#define FF_DCT_FAAN 6
++
++ /**
++ * IDCT algorithm, see FF_IDCT_* below.
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int idct_algo;
++#define FF_IDCT_AUTO 0
++#define FF_IDCT_INT 1
++#define FF_IDCT_SIMPLE 2
++#define FF_IDCT_SIMPLEMMX 3
++#define FF_IDCT_ARM 7
++#define FF_IDCT_ALTIVEC 8
++#define FF_IDCT_SIMPLEARM 10
++#define FF_IDCT_XVID 14
++#define FF_IDCT_SIMPLEARMV5TE 16
++#define FF_IDCT_SIMPLEARMV6 17
++#define FF_IDCT_FAAN 20
++#define FF_IDCT_SIMPLENEON 22
++#define FF_IDCT_NONE 24 /* Used by XvMC to extract IDCT coefficients with FF_IDCT_PERM_NONE */
++#define FF_IDCT_SIMPLEAUTO 128
++
++ /**
++ * bits per sample/pixel from the demuxer (needed for huffyuv).
++ * - encoding: Set by libavcodec.
++ * - decoding: Set by user.
++ */
++ int bits_per_coded_sample;
++
++ /**
++ * Bits per sample/pixel of internal libavcodec pixel/sample format.
++ * - encoding: set by user.
++ * - decoding: set by libavcodec.
++ */
++ int bits_per_raw_sample;
++
++#if FF_API_LOWRES
++ /**
++ * low resolution decoding, 1-> 1/2 size, 2->1/4 size
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int lowres;
++#endif
++
++#if FF_API_CODED_FRAME
++ /**
++ * the picture in the bitstream
++ * - encoding: Set by libavcodec.
++ * - decoding: unused
++ *
++ * @deprecated use the quality factor packet side data instead
++ */
++ attribute_deprecated AVFrame *coded_frame;
++#endif
++
++ /**
++ * thread count
++ * is used to decide how many independent tasks should be passed to execute()
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int thread_count;
++
++ /**
++ * Which multithreading methods to use.
++ * Use of FF_THREAD_FRAME will increase decoding delay by one frame per thread,
++ * so clients which cannot provide future frames should not use it.
++ *
++ * - encoding: Set by user, otherwise the default is used.
++ * - decoding: Set by user, otherwise the default is used.
++ */
++ int thread_type;
++#define FF_THREAD_FRAME 1 ///< Decode more than one frame at once
++#define FF_THREAD_SLICE 2 ///< Decode more than one part of a single frame at once
++
++ /**
++ * Which multithreading methods are in use by the codec.
++ * - encoding: Set by libavcodec.
++ * - decoding: Set by libavcodec.
++ */
++ int active_thread_type;
++
++ /**
++ * Set by the client if its custom get_buffer() callback can be called
++ * synchronously from another thread, which allows faster multithreaded decoding.
++ * draw_horiz_band() will be called from other threads regardless of this setting.
++ * Ignored if the default get_buffer() is used.
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int thread_safe_callbacks;
++
++ /**
++ * The codec may call this to execute several independent things.
++ * It will return only after finishing all tasks.
++ * The user may replace this with some multithreaded implementation,
++ * the default implementation will execute the parts serially.
++ * @param count the number of things to execute
++ * - encoding: Set by libavcodec, user can override.
++ * - decoding: Set by libavcodec, user can override.
++ */
++ int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
++
++ /**
++ * The codec may call this to execute several independent things.
++ * It will return only after finishing all tasks.
++ * The user may replace this with some multithreaded implementation,
++ * the default implementation will execute the parts serially.
++ * Also see avcodec_thread_init and e.g. the --enable-pthread configure option.
++ * @param c context passed also to func
++ * @param count the number of things to execute
++ * @param arg2 argument passed unchanged to func
++ * @param ret return values of executed functions, must have space for "count" values. May be NULL.
++ * @param func function that will be called count times, with jobnr from 0 to count-1.
++ * threadnr will be in the range 0 to c->thread_count-1 < MAX_THREADS and so that no
++ * two instances of func executing at the same time will have the same threadnr.
++ * @return always 0 currently, but code should handle a future improvement where when any call to func
++ * returns < 0 no further calls to func may be done and < 0 is returned.
++ * - encoding: Set by libavcodec, user can override.
++ * - decoding: Set by libavcodec, user can override.
++ */
++ int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
++
++ /**
++ * noise vs. sse weight for the nsse comparison function
++ * - encoding: Set by user.
++ * - decoding: unused
++ */
++ int nsse_weight;
++
++ /**
++ * profile
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ int profile;
++#define FF_PROFILE_UNKNOWN -99
++#define FF_PROFILE_RESERVED -100
++
++#define FF_PROFILE_AAC_MAIN 0
++#define FF_PROFILE_AAC_LOW 1
++#define FF_PROFILE_AAC_SSR 2
++#define FF_PROFILE_AAC_LTP 3
++#define FF_PROFILE_AAC_HE 4
++#define FF_PROFILE_AAC_HE_V2 28
++#define FF_PROFILE_AAC_LD 22
++#define FF_PROFILE_AAC_ELD 38
++#define FF_PROFILE_MPEG2_AAC_LOW 128
++#define FF_PROFILE_MPEG2_AAC_HE 131
++
++#define FF_PROFILE_DNXHD 0
++#define FF_PROFILE_DNXHR_LB 1
++#define FF_PROFILE_DNXHR_SQ 2
++#define FF_PROFILE_DNXHR_HQ 3
++#define FF_PROFILE_DNXHR_HQX 4
++#define FF_PROFILE_DNXHR_444 5
++
++#define FF_PROFILE_DTS 20
++#define FF_PROFILE_DTS_ES 30
++#define FF_PROFILE_DTS_96_24 40
++#define FF_PROFILE_DTS_HD_HRA 50
++#define FF_PROFILE_DTS_HD_MA 60
++#define FF_PROFILE_DTS_EXPRESS 70
++
++#define FF_PROFILE_MPEG2_422 0
++#define FF_PROFILE_MPEG2_HIGH 1
++#define FF_PROFILE_MPEG2_SS 2
++#define FF_PROFILE_MPEG2_SNR_SCALABLE 3
++#define FF_PROFILE_MPEG2_MAIN 4
++#define FF_PROFILE_MPEG2_SIMPLE 5
++
++#define FF_PROFILE_H264_CONSTRAINED (1<<9) // 8+1; constraint_set1_flag
++#define FF_PROFILE_H264_INTRA (1<<11) // 8+3; constraint_set3_flag
++
++#define FF_PROFILE_H264_BASELINE 66
++#define FF_PROFILE_H264_CONSTRAINED_BASELINE (66|FF_PROFILE_H264_CONSTRAINED)
++#define FF_PROFILE_H264_MAIN 77
++#define FF_PROFILE_H264_EXTENDED 88
++#define FF_PROFILE_H264_HIGH 100
++#define FF_PROFILE_H264_HIGH_10 110
++#define FF_PROFILE_H264_HIGH_10_INTRA (110|FF_PROFILE_H264_INTRA)
++#define FF_PROFILE_H264_MULTIVIEW_HIGH 118
++#define FF_PROFILE_H264_HIGH_422 122
++#define FF_PROFILE_H264_HIGH_422_INTRA (122|FF_PROFILE_H264_INTRA)
++#define FF_PROFILE_H264_STEREO_HIGH 128
++#define FF_PROFILE_H264_HIGH_444 144
++#define FF_PROFILE_H264_HIGH_444_PREDICTIVE 244
++#define FF_PROFILE_H264_HIGH_444_INTRA (244|FF_PROFILE_H264_INTRA)
++#define FF_PROFILE_H264_CAVLC_444 44
++
++#define FF_PROFILE_VC1_SIMPLE 0
++#define FF_PROFILE_VC1_MAIN 1
++#define FF_PROFILE_VC1_COMPLEX 2
++#define FF_PROFILE_VC1_ADVANCED 3
++
++#define FF_PROFILE_MPEG4_SIMPLE 0
++#define FF_PROFILE_MPEG4_SIMPLE_SCALABLE 1
++#define FF_PROFILE_MPEG4_CORE 2
++#define FF_PROFILE_MPEG4_MAIN 3
++#define FF_PROFILE_MPEG4_N_BIT 4
++#define FF_PROFILE_MPEG4_SCALABLE_TEXTURE 5
++#define FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION 6
++#define FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE 7
++#define FF_PROFILE_MPEG4_HYBRID 8
++#define FF_PROFILE_MPEG4_ADVANCED_REAL_TIME 9
++#define FF_PROFILE_MPEG4_CORE_SCALABLE 10
++#define FF_PROFILE_MPEG4_ADVANCED_CODING 11
++#define FF_PROFILE_MPEG4_ADVANCED_CORE 12
++#define FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE 13
++#define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14
++#define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15
++
++#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 1
++#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 2
++#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 32768
++#define FF_PROFILE_JPEG2000_DCINEMA_2K 3
++#define FF_PROFILE_JPEG2000_DCINEMA_4K 4
++
++#define FF_PROFILE_VP9_0 0
++#define FF_PROFILE_VP9_1 1
++#define FF_PROFILE_VP9_2 2
++#define FF_PROFILE_VP9_3 3
++
++#define FF_PROFILE_HEVC_MAIN 1
++#define FF_PROFILE_HEVC_MAIN_10 2
++#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3
++#define FF_PROFILE_HEVC_REXT 4
++
++#define FF_PROFILE_AV1_MAIN 0
++#define FF_PROFILE_AV1_HIGH 1
++#define FF_PROFILE_AV1_PROFESSIONAL 2
++
++#define FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT 0xc0
++#define FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT 0xc1
++#define FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT 0xc2
++#define FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS 0xc3
++#define FF_PROFILE_MJPEG_JPEG_LS 0xf7
++
++#define FF_PROFILE_SBC_MSBC 1
++
++ /**
++ * level
++ * - encoding: Set by user.
++ * - decoding: Set by libavcodec.
++ */
++ int level;
++#define FF_LEVEL_UNKNOWN -99
++
++ /**
++ * Skip loop filtering for selected frames.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ enum AVDiscard skip_loop_filter;
++
++ /**
++ * Skip IDCT/dequantization for selected frames.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ enum AVDiscard skip_idct;
++
++ /**
++ * Skip decoding for selected frames.
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ enum AVDiscard skip_frame;
++
++ /**
++ * Header containing style information for text subtitles.
++ * For SUBTITLE_ASS subtitle type, it should contain the whole ASS
++ * [Script Info] and [V4+ Styles] section, plus the [Events] line and
++ * the Format line following. It shouldn't include any Dialogue line.
++ * - encoding: Set/allocated/freed by user (before avcodec_open2())
++ * - decoding: Set/allocated/freed by libavcodec (by avcodec_open2())
++ */
++ uint8_t *subtitle_header;
++ int subtitle_header_size;
++
++#if FF_API_VBV_DELAY
++ /**
++ * VBV delay coded in the last frame (in periods of a 27 MHz clock).
++ * Used for compliant TS muxing.
++ * - encoding: Set by libavcodec.
++ * - decoding: unused.
++ * @deprecated this value is now exported as a part of
++ * AV_PKT_DATA_CPB_PROPERTIES packet side data
++ */
++ attribute_deprecated
++ uint64_t vbv_delay;
++#endif
++
++#if FF_API_SIDEDATA_ONLY_PKT
++ /**
++ * Encoding only and set by default. Allow encoders to output packets
++ * that do not contain any encoded data, only side data.
++ *
++ * Some encoders need to output such packets, e.g. to update some stream
++ * parameters at the end of encoding.
++ *
++ * @deprecated this field disables the default behaviour and
++ * it is kept only for compatibility.
++ */
++ attribute_deprecated
++ int side_data_only_packets;
++#endif
++
++ /**
++ * Audio only. The number of "priming" samples (padding) inserted by the
++ * encoder at the beginning of the audio. I.e. this number of leading
++ * decoded samples must be discarded by the caller to get the original audio
++ * without leading padding.
++ *
++ * - decoding: unused
++ * - encoding: Set by libavcodec. The timestamps on the output packets are
++ * adjusted by the encoder so that they always refer to the
++ * first sample of the data actually contained in the packet,
++ * including any added padding. E.g. if the timebase is
++ * 1/samplerate and the timestamp of the first input sample is
++ * 0, the timestamp of the first output packet will be
++ * -initial_padding.
++ */
++ int initial_padding;
++
++ /**
++ * - decoding: For codecs that store a framerate value in the compressed
++ * bitstream, the decoder may export it here. { 0, 1} when
++ * unknown.
++ * - encoding: May be used to signal the framerate of CFR content to an
++ * encoder.
++ */
++ AVRational framerate;
++
++ /**
++ * Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
++ * - encoding: unused.
++ * - decoding: Set by libavcodec before calling get_format()
++ */
++ enum AVPixelFormat sw_pix_fmt;
++
++ /**
++ * Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
++ * - encoding unused.
++ * - decoding set by user.
++ */
++ AVRational pkt_timebase;
++
++ /**
++ * AVCodecDescriptor
++ * - encoding: unused.
++ * - decoding: set by libavcodec.
++ */
++ const AVCodecDescriptor *codec_descriptor;
++
++#if !FF_API_LOWRES
++ /**
++ * low resolution decoding, 1-> 1/2 size, 2->1/4 size
++ * - encoding: unused
++ * - decoding: Set by user.
++ */
++ int lowres;
++#endif
++
++ /**
++ * Current statistics for PTS correction.
++ * - decoding: maintained and used by libavcodec, not intended to be used by user apps
++ * - encoding: unused
++ */
++ int64_t pts_correction_num_faulty_pts; /// Number of incorrect PTS values so far
++ int64_t pts_correction_num_faulty_dts; /// Number of incorrect DTS values so far
++ int64_t pts_correction_last_pts; /// PTS of the last frame
++ int64_t pts_correction_last_dts; /// DTS of the last frame
++
++ /**
++ * Character encoding of the input subtitles file.
++ * - decoding: set by user
++ * - encoding: unused
++ */
++ char *sub_charenc;
++
++ /**
++ * Subtitles character encoding mode. Formats or codecs might be adjusting
++ * this setting (if they are doing the conversion themselves for instance).
++ * - decoding: set by libavcodec
++ * - encoding: unused
++ */
++ int sub_charenc_mode;
++#define FF_SUB_CHARENC_MODE_DO_NOTHING -1 ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance)
++#define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself
++#define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv
++#define FF_SUB_CHARENC_MODE_IGNORE 2 ///< neither convert the subtitles, nor check them for valid UTF-8
++
++ /**
++ * Skip processing alpha if supported by codec.
++ * Note that if the format uses pre-multiplied alpha (common with VP6,
++ * and recommended due to better video quality/compression)
++ * the image will look as if alpha-blended onto a black background.
++ * However for formats that do not use pre-multiplied alpha
++ * there might be serious artefacts (though e.g. libswscale currently
++ * assumes pre-multiplied alpha anyway).
++ *
++ * - decoding: set by user
++ * - encoding: unused
++ */
++ int skip_alpha;
++
++ /**
++ * Number of samples to skip after a discontinuity
++ * - decoding: unused
++ * - encoding: set by libavcodec
++ */
++ int seek_preroll;
++
++#if !FF_API_DEBUG_MV
++ /**
++ * debug motion vectors
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ int debug_mv;
++#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames
++#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames
++#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
++#endif
++
++ /**
++ * custom intra quantization matrix
++ * - encoding: Set by user, can be NULL.
++ * - decoding: unused.
++ */
++ uint16_t *chroma_intra_matrix;
++
++ /**
++ * dump format separator.
++ * can be ", " or "\n " or anything else
++ * - encoding: Set by user.
++ * - decoding: Set by user.
++ */
++ uint8_t *dump_separator;
++
++ /**
++ * ',' separated list of allowed decoders.
++ * If NULL then all are allowed
++ * - encoding: unused
++ * - decoding: set by user
++ */
++ char *codec_whitelist;
++
++ /**
++ * Properties of the stream that gets decoded
++ * - encoding: unused
++ * - decoding: set by libavcodec
++ */
++ unsigned properties;
++#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
++#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
++
++ /**
++ * Additional data associated with the entire coded stream.
++ *
++ * - decoding: unused
++ * - encoding: may be set by libavcodec after avcodec_open2().
++ */
++ AVPacketSideData *coded_side_data;
++ int nb_coded_side_data;
++
++ /**
++ * A reference to the AVHWFramesContext describing the input (for encoding)
++ * or output (decoding) frames. The reference is set by the caller and
++ * afterwards owned (and freed) by libavcodec - it should never be read by
++ * the caller after being set.
++ *
++ * - decoding: This field should be set by the caller from the get_format()
++ * callback. The previous reference (if any) will always be
++ * unreffed by libavcodec before the get_format() call.
++ *
++ * If the default get_buffer2() is used with a hwaccel pixel
++ * format, then this AVHWFramesContext will be used for
++ * allocating the frame buffers.
++ *
++ * - encoding: For hardware encoders configured to use a hwaccel pixel
++ * format, this field should be set by the caller to a reference
++ * to the AVHWFramesContext describing input frames.
++ * AVHWFramesContext.format must be equal to
++ * AVCodecContext.pix_fmt.
++ *
++ * This field should be set before avcodec_open2() is called.
++ */
++ AVBufferRef *hw_frames_ctx;
++
++ /**
++ * Control the form of AVSubtitle.rects[N]->ass
++ * - decoding: set by user
++ * - encoding: unused
++ */
++ int sub_text_format;
++#define FF_SUB_TEXT_FMT_ASS 0
++#if FF_API_ASS_TIMING
++#define FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS 1
++#endif
++
++ /**
++ * Audio only. The amount of padding (in samples) appended by the encoder to
++ * the end of the audio. I.e. this number of decoded samples must be
++ * discarded by the caller from the end of the stream to get the original
++ * audio without any trailing padding.
<Skipped 9758 lines>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/firefox.git/commitdiff/eafc73df01984964f2df2ff9c578f6843ecbd338
More information about the pld-cvs-commit
mailing list