From a8a6f925dac227d9b92f04a2aeeeaba160e615d3 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 24 Jun 2024 11:42:57 -0400 Subject: [PATCH 01/59] libavformat/demux.c: remove errant doxygen comment It was originally for a different function av_destruct_packet_nofree: https://github.com/MythTV/mythtv/commit/bf432d9290144a03f3938faaacf8d9564c156fd2#diff-4b6a432208acd44651f07cdde943169aba8c5611b26a83764ad784d00c250f7fR899 --- mythtv/external/FFmpeg/libavformat/demux.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/demux.c b/mythtv/external/FFmpeg/libavformat/demux.c index e26638f32cd..078ce35b2b8 100644 --- a/mythtv/external/FFmpeg/libavformat/demux.c +++ b/mythtv/external/FFmpeg/libavformat/demux.c @@ -1240,11 +1240,6 @@ static int64_t ts_to_samples(AVStream *st, int64_t ts) return av_rescale(ts, st->time_base.num * st->codecpar->sample_rate, st->time_base.den); } -/** - * Simply sets data pointer to null. - * - * This will leak memory if no one else frees the memory used by the packet. - */ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) { FFFormatContext *const si = ffformatcontext(s); From 5fedd4b85e1ba4d068b10e22b233bbe7e96dec10 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 24 Jun 2024 12:15:40 -0400 Subject: [PATCH 02/59] Revert "fix non UTF-8 files (external)" This reverts commit 049fabc8d8f10684bf60a1f96e344564c478f7e9. Reduce changes to FFmpeg. --- mythtv/external/FFmpeg/tools/clean-diff | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mythtv/external/FFmpeg/tools/clean-diff b/mythtv/external/FFmpeg/tools/clean-diff index d40f22f34fd..4600702b10f 100755 --- a/mythtv/external/FFmpeg/tools/clean-diff +++ b/mythtv/external/FFmpeg/tools/clean-diff @@ -4,8 +4,8 @@ sed '/^+[^+]/!s/ /TaBBaT/g' |\ sed 's/TaBBaT/ /g' |\ sed '/^+[^+]/s/ * $//' |\ tr -d '\015' |\ - tr '\n' '°' |\ - sed 's/\(@@[^@]*@@°[^@]*\)/\n\1/g' |\ - egrep -v '@@[^@]*@@°(( [^°]*°)|([+-][[:space:]]*°)|(-[[:space:]]*([^°]*)°\+[[:space:]]*\5°))*$' |\ + tr '\n' '' |\ + sed 's/\(@@[^@]*@@[^@]*\)/\n\1/g' |\ + egrep -v '@@[^@]*@@(( [^]*)|([+-][[:space:]]*)|(-[[:space:]]*([^]*)\+[[:space:]]*\5))*$' |\ tr -d '\n' |\ - tr '°' '\n' + tr '' '\n' From d672b5be89ffa97b949a31bb0c29fa8eb8b79698 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 24 Jun 2024 20:44:04 -0400 Subject: [PATCH 03/59] libavcodec/v4l2_buffers.c: revert unnecessary change --- mythtv/external/FFmpeg/libavcodec/v4l2_buffers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythtv/external/FFmpeg/libavcodec/v4l2_buffers.c b/mythtv/external/FFmpeg/libavcodec/v4l2_buffers.c index 2af930597c8..4c40b437554 100644 --- a/mythtv/external/FFmpeg/libavcodec/v4l2_buffers.c +++ b/mythtv/external/FFmpeg/libavcodec/v4l2_buffers.c @@ -307,7 +307,7 @@ static uint8_t * v4l2_get_drm_frame(V4L2Buffer *avbuf) } #endif -static void v4l2_free_buffer(void *opaque, uint8_t *data) +static void v4l2_free_buffer(void *opaque, uint8_t *unused) { V4L2Buffer* avbuf = opaque; V4L2m2mContext *s = buf_to_m2mctx(avbuf); From c1a38bc585eaff0f5291aa12fe5d141cda39cb4b Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 12 Jul 2024 03:16:45 -0400 Subject: [PATCH 04/59] use ffnvcodec/dynlink_loader.h directly Instead of the internal FFmpeg header compat/cuda/dynlink_loader.h. This leaves only one internal FFmpeg header used by MythTV. Per the comment on win32_dlopen() in FFmpeg/compat/w32dlfcn.h, Windows will now additionally search the current directory for nvcuda.dll and nvcuvid.dll, which FFmpeg considers less secure. This is an atomic block and the order must be preserved: #include "libavutil/log.h" #define FFNV_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_ERROR, msg, __VA_ARGS__) #define FFNV_DEBUG_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_DEBUG, msg, __VA_ARGS__) #include #include "libavutil/hwcontext_cuda.h" must come after #include which is also transitively included by #include --- cmake/embeddedlibs/FindOrBuildFFmpeg.cmake | 8 -------- mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp | 8 ++++++++ mythtv/libs/libmythtv/decoders/mythnvdeccontext.h | 3 ++- mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp | 7 +++++++ mythtv/libs/libmythtv/opengl/mythnvdecinterop.h | 5 ++--- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake index 70ae2893f42..166182a850a 100644 --- a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake +++ b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake @@ -145,16 +145,8 @@ function(find_or_build_ffmpeg) FFmpeg expose_internal_headers_hack DEPENDEES install WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/mythtv/external/FFmpeg - COMMAND ${CMAKE_COMMAND} -E make_directory - ${FFMPEG_INSTALL_INCLUDEDIR}/compat/cuda COMMAND ${CMAKE_COMMAND} -E copy libavformat/url.h ${FFMPEG_INSTALL_INCLUDEDIR}/libavformat/ - COMMAND ${CMAKE_COMMAND} -E copy libavutil/wchar_filename.h - ${FFMPEG_INSTALL_INCLUDEDIR}/libavutil/ - COMMAND ${CMAKE_COMMAND} -E copy compat/w32dlfcn.h - ${FFMPEG_INSTALL_INCLUDEDIR}/compat/ - COMMAND ${CMAKE_COMMAND} -E copy compat/cuda/dynlink_loader.h - ${FFMPEG_INSTALL_INCLUDEDIR}/compat/cuda/) endfunction() diff --git a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp index 78170da2217..aee22feb0f9 100644 --- a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp @@ -9,6 +9,14 @@ #include "opengl/mythnvdecinterop.h" extern "C" { +#include "libavutil/log.h" +#define FFNV_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_ERROR, msg, __VA_ARGS__) +#define FFNV_DEBUG_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_DEBUG, msg, __VA_ARGS__) +#include +} + +extern "C" { +#include "libavutil/hwcontext_cuda.h" #include "libavutil/opt.h" } diff --git a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.h b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.h index 6c5162b1f60..a225b9c9a36 100644 --- a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.h +++ b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.h @@ -15,7 +15,8 @@ extern "C" { #include "libavutil/hwcontext.h" #include "libavcodec/avcodec.h" #include "libavutil/pixdesc.h" -#include "compat/cuda/dynlink_loader.h" +#include +#include } // Std diff --git a/mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp b/mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp index ab2e4fe02f2..aa382d3947e 100644 --- a/mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp +++ b/mythtv/libs/libmythtv/opengl/mythnvdecinterop.cpp @@ -8,6 +8,13 @@ #include #include +extern "C" { +#include "libavutil/log.h" +#define FFNV_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_ERROR, msg, __VA_ARGS__) +#define FFNV_DEBUG_LOG_FUNC(logctx, msg, ...) av_log(logctx, AV_LOG_DEBUG, msg, __VA_ARGS__) +#include +} + #define LOC QString("NVDECInterop: ") // NOLINTNEXTLINE(cppcoreguidelines-macro-usage) diff --git a/mythtv/libs/libmythtv/opengl/mythnvdecinterop.h b/mythtv/libs/libmythtv/opengl/mythnvdecinterop.h index 6dcd2da7169..46bb76f2fa7 100644 --- a/mythtv/libs/libmythtv/opengl/mythnvdecinterop.h +++ b/mythtv/libs/libmythtv/opengl/mythnvdecinterop.h @@ -4,10 +4,9 @@ // MythTV #include "opengl/mythopenglinterop.h" -// FFmpeg extern "C" { -#include "compat/cuda/dynlink_loader.h" -#include "libavutil/hwcontext_cuda.h" +#include +struct CudaFunctions; } class MythNVDECInterop : public MythOpenGLInterop From ecc68d876e444564da5a299630bfb301000c2586 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 12 Jul 2024 23:15:35 -0400 Subject: [PATCH 05/59] Revert "ffmpeg: Add required cast to w32dlfcn.h" This reverts commit 5f9b27cffdcd8169e5159db040d00e7094b689ec. MythTV no longer uses that file, so remove the modification. --- mythtv/external/FFmpeg/compat/w32dlfcn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythtv/external/FFmpeg/compat/w32dlfcn.h b/mythtv/external/FFmpeg/compat/w32dlfcn.h index a4515c78213..fb1aa1b72eb 100644 --- a/mythtv/external/FFmpeg/compat/w32dlfcn.h +++ b/mythtv/external/FFmpeg/compat/w32dlfcn.h @@ -35,7 +35,7 @@ static inline wchar_t *get_module_filename(HMODULE module) do { path_size = path_size ? FFMIN(2 * path_size, INT16_MAX + 1) : MAX_PATH; - new_path = (wchar_t *)av_realloc_array(path, path_size, sizeof *path); + new_path = av_realloc_array(path, path_size, sizeof *path); if (!new_path) { av_free(path); return NULL; From 6f1df71b747011b48d2825cfd993682d79ba59a7 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 13 Jul 2024 01:05:33 -0400 Subject: [PATCH 06/59] convert use of internal libavformat/url.h to public libavformat/avio.h (part 1) Since we don't need the full buffer, we could use avio_read_partial() instead. --- .../libs/libmythtv/HLS/httplivestreambuffer.cpp | 17 +++++++++-------- .../libs/libmythtv/HLS/httplivestreambuffer.h | 5 ----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp b/mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp index 2711f0bf287..201469b13d8 100644 --- a/mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp +++ b/mythtv/libs/libmythtv/HLS/httplivestreambuffer.cpp @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ - +#include "httplivestreambuffer.h" // QT @@ -43,8 +43,9 @@ #include "libmythbase/mythdownloadmanager.h" #include "libmythbase/mythlogging.h" -// libmythtv -#include "httplivestreambuffer.h" +extern "C" { +#include "libavformat/avio.h" +} #ifdef USING_LIBCRYPTO // encryption related stuff @@ -1713,22 +1714,22 @@ bool HLSRingBuffer::IsHTTPLiveStreaming(QByteArray *s) bool HLSRingBuffer::TestForHTTPLiveStreaming(const QString &filename) { bool isHLS = false; - URLContext *context = nullptr; // Do a peek on the URL to test the format MythMediaBuffer::AVFormatInitNetwork(); - int ret = ffurl_open_whitelist(&context, filename.toLatin1(), - AVIO_FLAG_READ, nullptr, nullptr, nullptr, nullptr, nullptr); + + AVIOContext* context = nullptr; + int ret = avio_open(&context, filename.toLatin1(), AVIO_FLAG_READ); if (ret >= 0) { std::array buffer {}; - ret = ffurl_read(context, buffer.data(), buffer.size()); + ret = avio_read(context, buffer.data(), buffer.size()); if (ret > 0) { QByteArray ba((const char*)buffer.data(), ret); isHLS = IsHTTPLiveStreaming(&ba); } - ffurl_close(context); + avio_closep(&context); } else { diff --git a/mythtv/libs/libmythtv/HLS/httplivestreambuffer.h b/mythtv/libs/libmythtv/HLS/httplivestreambuffer.h index a4b3518b79c..f1dec189deb 100644 --- a/mythtv/libs/libmythtv/HLS/httplivestreambuffer.h +++ b/mythtv/libs/libmythtv/HLS/httplivestreambuffer.h @@ -26,11 +26,6 @@ #include "libmythbase/mythcorecontext.h" #include "libmythtv/io/mythmediabuffer.h" -extern "C" { -#include "libavformat/avformat.h" -#include "libavformat/url.h" -} - class MythDownloadManager; class HLSStream; class HLSSegment; From 674876eb92f6877bb0a36f74a1b37e59c24fa1f7 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 13 Jul 2024 01:47:08 -0400 Subject: [PATCH 07/59] avformatdecoder.h: remove undefined functions Originally from 2003: https://github.com/MythTV/mythtv/commit/ec136a9e47123a551a9fe6299319a9c86e4b8c17 --- mythtv/libs/libmythtv/decoders/avformatdecoder.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index 11d5be589d0..bbffac23c70 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -195,11 +195,6 @@ class AvFormatDecoder : public DecoderBase friend int get_avf_buffer(struct AVCodecContext *c, AVFrame *pic, int flags); - friend int open_avf(URLContext *h, const char *filename, int flags); - friend int read_avf(URLContext *h, uint8_t *buf, int buf_size); - friend int write_avf(URLContext *h, uint8_t *buf, int buf_size); - friend int64_t seek_avf(URLContext *h, int64_t offset, int whence); - friend int close_avf(URLContext *h); void DecodeDTVCC(const uint8_t *buf, uint buf_size, bool scte); void DecodeCCx08(const uint8_t *buf, uint buf_size, bool scte); From 68f38dd757046b695a28c2a3b2da9dfde9bc0ed8 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 13 Jul 2024 21:37:54 -0400 Subject: [PATCH 08/59] convert use of internal libavformat/url.h to public libavformat/avio.h (part 2) --- .../libs/libmythtv/io/mythstreamingbuffer.cpp | 38 ++++++++++--------- .../libs/libmythtv/io/mythstreamingbuffer.h | 8 +--- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/mythtv/libs/libmythtv/io/mythstreamingbuffer.cpp b/mythtv/libs/libmythtv/io/mythstreamingbuffer.cpp index 0773f1d2ae6..12ae213f534 100644 --- a/mythtv/libs/libmythtv/io/mythstreamingbuffer.cpp +++ b/mythtv/libs/libmythtv/io/mythstreamingbuffer.cpp @@ -1,10 +1,16 @@ +#include "io/mythstreamingbuffer.h" + // Qt #include // MythTV #include "libmythbase/mythcorecontext.h" #include "libmythbase/mythlogging.h" -#include "io/mythstreamingbuffer.h" + +// FFmpeg +extern "C" { +#include "libavformat/avio.h" +} #define LOC QString("StreamRingBuf(%1): ").arg(m_filename) @@ -21,7 +27,7 @@ MythStreamingBuffer::~MythStreamingBuffer() m_rwLock.lockForWrite(); if (m_context) - ffurl_close(m_context); + avio_closep(&m_context); m_rwLock.unlock(); } @@ -61,24 +67,22 @@ bool MythStreamingBuffer::OpenFile(const QString &Filename, std::chrono::millise if (url.path().endsWith(QLatin1String("m3u8"), Qt::CaseInsensitive)) url.setScheme("hls+http"); - int res = ffurl_open_whitelist(&m_context, url.toString().toLatin1(), AVIO_FLAG_READ, nullptr, nullptr, nullptr, nullptr, nullptr); - if (res >= 0 && m_context && !m_context->is_streamed && ffurl_seek(m_context, 0, SEEK_SET) >= 0) - { - m_streamed = false; - m_allowSeeks = true; - } - - LOG(VB_GENERAL, LOG_INFO, LOC + QString("Trying %1 (allow seeks: %2") - .arg(m_filename).arg(m_allowSeeks)); - + int res = avio_open(&m_context, url.toString().toLatin1(), AVIO_FLAG_READ); if (res < 0 || !m_context) { - LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to open stream (error %1)") .arg(res)); + LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to open stream (%1) (error %2)") + .arg(m_filename, QString::number(res))); m_lastError = QObject::tr("Failed to open stream (%1)").arg(res); m_rwLock.unlock(); return false; } + m_streamed = (m_context->seekable & AVIO_SEEKABLE_NORMAL) == 0; + m_allowSeeks = !m_streamed && avio_seek(m_context, 0, SEEK_SET) >= 0; + + LOG(VB_GENERAL, LOG_INFO, LOC + QString("Opened %1 (allow seeks: %2") + .arg(m_filename, QVariant(m_allowSeeks).toString())); + m_rwLock.unlock(); return true; } @@ -89,7 +93,7 @@ long long MythStreamingBuffer::SeekInternal(long long Position, int Whence) return 0; m_posLock.lockForWrite(); - int seek = static_cast(ffurl_seek(m_context, Position, Whence)); + int64_t seek = avio_seek(m_context, Position, Whence); m_posLock.unlock(); if (seek < 0) @@ -97,7 +101,7 @@ long long MythStreamingBuffer::SeekInternal(long long Position, int Whence) m_ateof = true; return 0; } - return Position; + return seek; } int MythStreamingBuffer::SafeRead(void *Buffer, uint Size) @@ -108,7 +112,7 @@ int MythStreamingBuffer::SafeRead(void *Buffer, uint Size) { while (len < static_cast(Size)) { - int ret = ffurl_read(m_context, static_cast(Buffer) + len, + int ret = avio_read(m_context, static_cast(Buffer) + len, static_cast(Size) - len); if (ret < 0) { @@ -130,7 +134,7 @@ long long MythStreamingBuffer::GetRealFileSizeInternal(void) const long long result = -1; m_rwLock.lockForRead(); if (m_context) - result = ffurl_size(m_context); + result = avio_size(m_context); m_rwLock.unlock(); return result; } diff --git a/mythtv/libs/libmythtv/io/mythstreamingbuffer.h b/mythtv/libs/libmythtv/io/mythstreamingbuffer.h index f3376ba335b..bdfc3328da9 100644 --- a/mythtv/libs/libmythtv/io/mythstreamingbuffer.h +++ b/mythtv/libs/libmythtv/io/mythstreamingbuffer.h @@ -4,12 +4,6 @@ // MythTV #include "io/mythmediabuffer.h" -// FFmpeg -extern "C" { -#include "libavformat/avformat.h" -#include "libavformat/url.h" -} - class MythStreamingBuffer : public MythMediaBuffer { public: @@ -29,7 +23,7 @@ class MythStreamingBuffer : public MythMediaBuffer long long SeekInternal (long long Position, int Whence) override; private: - URLContext *m_context { nullptr }; + struct AVIOContext *m_context { nullptr }; bool m_streamed { true }; bool m_allowSeeks { false }; }; From 9909343194bfeefb606b9897b8149985851cd230 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 14 Jul 2024 00:46:42 -0400 Subject: [PATCH 09/59] MythAVFormatBuffer: remove unused functions --- .../libs/libmythtv/io/mythavformatbuffer.cpp | 22 +++++-------------- mythtv/libs/libmythtv/io/mythavformatbuffer.h | 2 -- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp index 372eb06853d..caf87a3e964 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp @@ -10,16 +10,6 @@ MythAVFormatBuffer::MythAVFormatBuffer(MythMediaBuffer *Buffer) { } -void MythAVFormatBuffer::SetBuffer(MythMediaBuffer *Buffer) -{ - m_buffer = Buffer; -} - -MythMediaBuffer* MythAVFormatBuffer::GetBuffer(void) -{ - return m_buffer; -} - int MythAVFormatBuffer::Open(URLContext *Context, const char* /*Filename*/, int /*Flags*/) { Context->priv_data = nullptr; @@ -32,7 +22,7 @@ int MythAVFormatBuffer::Read(URLContext *Context, uint8_t *Buffer, int Size) if (!avfr) return 0; - int ret = avfr->GetBuffer()->Read(Buffer, Size); + int ret = avfr->m_buffer->Read(Buffer, Size); if (ret == 0) ret = AVERROR_EOF; @@ -45,7 +35,7 @@ int MythAVFormatBuffer::Write(URLContext *Context, const uint8_t *Buffer, int Si if (!avfr) return 0; - return avfr->GetBuffer()->Write(Buffer, static_cast(Size)); + return avfr->m_buffer->Write(Buffer, static_cast(Size)); } int64_t MythAVFormatBuffer::Seek(URLContext *Context, int64_t Offset, int Whence) @@ -55,12 +45,12 @@ int64_t MythAVFormatBuffer::Seek(URLContext *Context, int64_t Offset, int Whence return 0; if (Whence == AVSEEK_SIZE) - return avfr->GetBuffer()->GetRealFileSize(); + return avfr->m_buffer->GetRealFileSize(); if (Whence == SEEK_END) - return avfr->GetBuffer()->GetRealFileSize() + Offset; + return avfr->m_buffer->GetRealFileSize() + Offset; - return avfr->GetBuffer()->Seek(Offset, Whence); + return avfr->m_buffer->Seek(Offset, Whence); } int MythAVFormatBuffer::Close(URLContext* /*Context*/) @@ -115,7 +105,7 @@ URLProtocol *MythAVFormatBuffer::GetURLProtocol(void) void MythAVFormatBuffer::SetInInit(bool State) { m_initState = State; - GetBuffer()->SetReadInternalMode(State); + m_buffer->SetReadInternalMode(State); } bool MythAVFormatBuffer::IsInInit(void) const diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.h b/mythtv/libs/libmythtv/io/mythavformatbuffer.h index fabc9c0cd11..01e2c3808ab 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.h +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.h @@ -14,8 +14,6 @@ class MythAVFormatBuffer { public: explicit MythAVFormatBuffer(MythMediaBuffer *Buffer = nullptr); - void SetBuffer (MythMediaBuffer *Buffer); - MythMediaBuffer* GetBuffer (void); static URLProtocol* GetURLProtocol (void); static int WritePacket (void* Context, uint8_t *Buffer, int Size); static int ReadPacket (void* Context, uint8_t *Buffer, int Size); From a4cb2e1264698b57e9025d61d6c368a2de6ab90f Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 15 Jul 2024 22:33:02 -0400 Subject: [PATCH 10/59] mythlogging.h: add pointerToQString() --- mythtv/libs/libmythbase/mythlogging.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mythtv/libs/libmythbase/mythlogging.h b/mythtv/libs/libmythbase/mythlogging.h index f16679314db..0d2700badf7 100644 --- a/mythtv/libs/libmythbase/mythlogging.h +++ b/mythtv/libs/libmythbase/mythlogging.h @@ -73,6 +73,12 @@ MBASE_PUBLIC QString logStrerror(int errnum); #define ENO (QString("\n\t\t\teno: ") + logStrerror(errno)) #define ENO_STR ENO.toLocal8Bit().constData() +inline QString pointerToQString(const void *p) +{ + return QStringLiteral("0x%1").arg(reinterpret_cast(p), + sizeof(void*) * 2, 16, QChar('0')); +} + #endif /* From ca9f8b99f2a03272396d8ea572cfc6b8cadadc0a Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 13 Jul 2024 23:08:30 -0400 Subject: [PATCH 11/59] convert use of internal libavformat/url.h to public libavformat/avio.h (part 3) I don't know if any of this is necessary since FFmpeg's avio API is already buffered. However, I did not investigate using avio directly with avio_open() nor did I investigate what our buffer actually does. I'm not sure why MythAVFormatBuffer::Seek() with Whence = SEEK_END did not ever actually seek. libavformat/avio.h says this about read_packet: " A function for refilling the buffer, may be NULL. For stream protocols, must never return 0 but rather a proper AVERROR code. " So I'm not sure the first return of 0 was correct. AVERROR(EINVAL) is a more useful return value for all of the functions, instead of 0. --- cmake/embeddedlibs/FindOrBuildFFmpeg.cmake | 12 -- .../libmythtv/decoders/avformatdecoder.cpp | 40 ++--- .../libs/libmythtv/decoders/avformatdecoder.h | 3 - .../libs/libmythtv/io/mythavformatbuffer.cpp | 145 +++++++++--------- mythtv/libs/libmythtv/io/mythavformatbuffer.h | 26 ++-- .../libs/libmythtv/io/mythavformatwriter.cpp | 48 +++--- mythtv/libs/libmythtv/io/mythavformatwriter.h | 1 + 7 files changed, 123 insertions(+), 152 deletions(-) diff --git a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake index 166182a850a..b60d8a13cda 100644 --- a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake +++ b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake @@ -136,18 +136,6 @@ function(find_or_build_ffmpeg) WORKING_DIRECTORY COMMAND ${MAKE_EXECUTABLE} install-pkgconfig) - # - # Install internal headers that are used by MythTV. This must go away if - # MythTV is ever want to use the distribution supplied FFmpeg. - # - set(FFMPEG_INSTALL_INCLUDEDIR ${FFMPEG_INSTALL_PREFIX}/include/mythtv/) - ExternalProject_Add_Step( - FFmpeg expose_internal_headers_hack - DEPENDEES install - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/mythtv/external/FFmpeg - COMMAND ${CMAKE_COMMAND} -E copy libavformat/url.h - ${FFMPEG_INSTALL_INCLUDEDIR}/libavformat/ - endfunction() find_or_build_ffmpeg() diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index f42abba7b70..23a082960ee 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -455,8 +455,9 @@ void AvFormatDecoder::CloseContext() { CloseCodecs(); - av_free(m_ic->pb->buffer); - av_free(m_ic->pb); + delete m_avfRingBuffer; + m_avfRingBuffer = nullptr; + m_ic->pb = nullptr; avformat_close_input(&m_ic); m_ic = nullptr; } @@ -861,28 +862,6 @@ bool AvFormatDecoder::CanHandle(TestBufferVec & testbuf, const QString &filename return av_probe_input_format2(&probe, static_cast(true), &score) != nullptr; } -void AvFormatDecoder::InitByteContext(bool forceseek) -{ - int buf_size = m_ringBuffer->BestBufferSize(); - bool streamed = m_ringBuffer->IsStreamed(); - m_readContext.prot = MythAVFormatBuffer::GetURLProtocol(); - m_readContext.flags = AVIO_FLAG_READ; - m_readContext.is_streamed = static_cast(streamed); - m_readContext.max_packet_size = 0; - m_readContext.priv_data = m_avfRingBuffer; - auto *buffer = (unsigned char *)av_malloc(buf_size); - m_ic->pb = avio_alloc_context(buffer, buf_size, 0, - &m_readContext, - MythAVFormatBuffer::ReadPacket, - MythAVFormatBuffer::WritePacket, - MythAVFormatBuffer::SeekPacket); - - // We can always seek during LiveTV - m_ic->pb->seekable = static_cast(!streamed || forceseek); - LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Buffer size: %1 Streamed %2 Seekable %3 Available %4") - .arg(buf_size).arg(streamed).arg(m_ic->pb->seekable).arg(m_ringBuffer->GetReadBufAvail())); -} - extern "C" void HandleStreamChange(void *data) { auto *decoder = reinterpret_cast(data); @@ -937,9 +916,6 @@ int AvFormatDecoder::OpenFile(MythMediaBuffer *Buffer, bool novideo, // anything whilst probing the data streams. m_processFrames = !m_ringBuffer->IsDVD(); - delete m_avfRingBuffer; - m_avfRingBuffer = new MythAVFormatBuffer(Buffer); - const AVInputFormat *fmt = nullptr; QString fnames = m_ringBuffer->GetFilename(); QByteArray fnamea = fnames.toLatin1(); @@ -1000,8 +976,16 @@ int AvFormatDecoder::OpenFile(MythMediaBuffer *Buffer, bool novideo, return -1; } + delete m_avfRingBuffer; + m_avfRingBuffer = new MythAVFormatBuffer(m_ringBuffer, false, m_livetv); + m_ic->pb = m_avfRingBuffer->getAVIOContext(); + LOG(VB_PLAYBACK, LOG_INFO, LOC + + QString("Buffer size: %1 Streamed %2 Seekable %3 Available %4") + .arg(m_ringBuffer->BestBufferSize()) + .arg(m_ringBuffer->IsStreamed()) + .arg(m_ic->pb->seekable) + .arg(m_ringBuffer->GetReadBufAvail())); m_avfRingBuffer->SetInInit(false); - InitByteContext(m_livetv); err = avformat_open_input(&m_ic, filename, fmt, nullptr); if (err < 0) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index bbffac23c70..777764019b4 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -198,7 +198,6 @@ class AvFormatDecoder : public DecoderBase void DecodeDTVCC(const uint8_t *buf, uint buf_size, bool scte); void DecodeCCx08(const uint8_t *buf, uint buf_size, bool scte); - void InitByteContext(bool forceseek = false); void InitVideoCodec(AVStream *stream, AVCodecContext *enc, bool selectedStream = false); @@ -260,8 +259,6 @@ class AvFormatDecoder : public DecoderBase // AVFormatParameters params; - URLContext m_readContext {}; - int m_frameDecoded {0}; MythVideoFrame *m_decodedVideoFrame {nullptr}; MythAVFormatBuffer *m_avfRingBuffer {nullptr}; diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp index caf87a3e964..52e9d05715f 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp @@ -1,105 +1,104 @@ #include "io/mythavformatbuffer.h" +// FFmpeg +extern "C" { +#include "libavformat/avio.h" +#include "libavutil/error.h" +} + #include #include -URLProtocol MythAVFormatBuffer::s_avfrURL; +#include "libmythbase/mythlogging.h" -MythAVFormatBuffer::MythAVFormatBuffer(MythMediaBuffer *Buffer) +MythAVFormatBuffer::MythAVFormatBuffer(MythMediaBuffer *Buffer, bool write_flag, bool force_seek) : m_buffer(Buffer) { + m_avioContext = alloc_context(write_flag, force_seek); + if (m_avioContext == nullptr) + { + LOG(VB_GENERAL, LOG_ERR, "MythAVFormatBuffer failed to allocate an AVIOContext."); + } } -int MythAVFormatBuffer::Open(URLContext *Context, const char* /*Filename*/, int /*Flags*/) -{ - Context->priv_data = nullptr; - return 0; -} - -int MythAVFormatBuffer::Read(URLContext *Context, uint8_t *Buffer, int Size) +MythAVFormatBuffer::~MythAVFormatBuffer() { - auto *avfr = reinterpret_cast(Context->priv_data); - if (!avfr) - return 0; - - int ret = avfr->m_buffer->Read(Buffer, Size); - - if (ret == 0) - ret = AVERROR_EOF; - return ret; + if (m_avioContext != nullptr) + { + avio_flush(m_avioContext); + av_freep(&(m_avioContext->buffer)); + if (m_avioContext->write_flag) + { + LOG(VB_LIBAV, LOG_DEBUG, QString("AVIOContext (%1): %2 bytes written") + .arg(pointerToQString(m_avioContext), QString::number(m_avioContext->bytes_written))); + } + else + { + LOG(VB_LIBAV, LOG_DEBUG, QString("AVIOContext (%1): %2 bytes read") + .arg(pointerToQString(m_avioContext), QString::number(m_avioContext->bytes_read))); + } + avio_context_free(&m_avioContext); + } } -int MythAVFormatBuffer::Write(URLContext *Context, const uint8_t *Buffer, int Size) +AVIOContext* MythAVFormatBuffer::alloc_context(bool write_flag, bool force_seek) { - auto *avfr = reinterpret_cast(Context->priv_data); - if (!avfr) - return 0; - - return avfr->m_buffer->Write(Buffer, static_cast(Size)); + AVIOContext* context = nullptr; + int buf_size = m_buffer->BestBufferSize(); + auto *avio_buffer = static_cast(av_malloc(buf_size)); + if (avio_buffer == nullptr) + { + LOG(VB_LIBAV, LOG_ERR, "av_malloc() failed to create a buffer for avio."); + return nullptr; + } + context = avio_alloc_context(avio_buffer, buf_size, write_flag, this, + read_packet, write_packet, seek); + if (context == nullptr) + { + return context; + } + if (m_buffer->IsStreamed() && !force_seek) + { + context->seekable &= ~AVIO_SEEKABLE_NORMAL; + } + return context; } -int64_t MythAVFormatBuffer::Seek(URLContext *Context, int64_t Offset, int Whence) +int MythAVFormatBuffer::read_packet(void *opaque, uint8_t *buf, int buf_size) { - auto *avfr = reinterpret_cast(Context->priv_data); - if (!avfr) - return 0; + auto *p = reinterpret_cast(opaque); + if (!p) + return AVERROR(EINVAL); - if (Whence == AVSEEK_SIZE) - return avfr->m_buffer->GetRealFileSize(); + int ret = p->m_buffer->Read(buf, buf_size); - if (Whence == SEEK_END) - return avfr->m_buffer->GetRealFileSize() + Offset; - - return avfr->m_buffer->Seek(Offset, Whence); + if (ret == 0) + ret = AVERROR_EOF; + return ret; } -int MythAVFormatBuffer::Close(URLContext* /*Context*/) +int MythAVFormatBuffer::write_packet(void *opaque, uint8_t *buf, int buf_size) { - return 0; -} + auto *p = reinterpret_cast(opaque); + if (!p) + return AVERROR(EINVAL); -int MythAVFormatBuffer::WritePacket(void *Context, uint8_t *Buffer, int Size) -{ - if (!Context) - return 0; - return ffurl_write(reinterpret_cast(Context), Buffer, Size); + return p->m_buffer->Write(buf, static_cast(buf_size)); } -int MythAVFormatBuffer::ReadPacket(void *Context, uint8_t *Buffer, int Size) +int64_t MythAVFormatBuffer::seek(void *opaque, int64_t offset, int whence) { - if (!Context) - return 0; - return ffurl_read(reinterpret_cast(Context), Buffer, Size); -} + auto *p = reinterpret_cast(opaque); + if (!p) + return AVERROR(EINVAL); -int64_t MythAVFormatBuffer::SeekPacket(void *Context, int64_t Offset, int Whence) -{ - if (!Context) - return 0; - return ffurl_seek(reinterpret_cast(Context), Offset, Whence); -} + if (whence == AVSEEK_SIZE) + return p->m_buffer->GetRealFileSize(); -URLProtocol *MythAVFormatBuffer::GetURLProtocol(void) -{ - static QRecursiveMutex s_avringbufferLock; - static bool s_avringbufferInitialised = false; + if (whence == SEEK_END) + return p->m_buffer->Seek(p->m_buffer->GetRealFileSize() + offset, SEEK_SET); - QMutexLocker lock(&s_avringbufferLock); - if (!s_avringbufferInitialised) - { - // just in case URLProtocol's members do not have default constructor - memset(static_cast(&s_avfrURL), 0, sizeof(s_avfrURL)); - s_avfrURL.name = "rbuffer"; - s_avfrURL.url_open = Open; - s_avfrURL.url_read = Read; - s_avfrURL.url_write = Write; - s_avfrURL.url_seek = Seek; - s_avfrURL.url_close = Close; - s_avfrURL.priv_data_size = 0; - s_avfrURL.flags = URL_PROTOCOL_FLAG_NETWORK; - s_avringbufferInitialised = true; - } - return &s_avfrURL; + return p->m_buffer->Seek(offset, whence); } void MythAVFormatBuffer::SetInInit(bool State) diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.h b/mythtv/libs/libmythtv/io/mythavformatbuffer.h index 01e2c3808ab..a03eba8e72c 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.h +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.h @@ -6,29 +6,29 @@ // FFmpeg extern "C" { -#include "libavformat/avformat.h" -#include "libavformat/url.h" +#include "libavformat/avio.h" } class MythAVFormatBuffer { public: - explicit MythAVFormatBuffer(MythMediaBuffer *Buffer = nullptr); - static URLProtocol* GetURLProtocol (void); - static int WritePacket (void* Context, uint8_t *Buffer, int Size); - static int ReadPacket (void* Context, uint8_t *Buffer, int Size); - static int64_t SeekPacket (void* Context, int64_t Offset, int Whence); - static int Open (URLContext* Context, const char *Filename, int Flags); - static int Read (URLContext* Context, uint8_t *Buffer, int Size); - static int Write (URLContext* Context, const uint8_t *Buffer, int Size); - static int64_t Seek (URLContext* Context, int64_t Offset, int Whence); - static int Close (URLContext* /*Context*/); + MythAVFormatBuffer(MythMediaBuffer *Buffer, bool write_flag, bool force_seek); + ~MythAVFormatBuffer(); + void SetInInit (bool State); bool IsInInit (void) const; + AVIOContext* getAVIOContext() { return m_avioContext; } + private: + static int read_packet(void *opaque, uint8_t *buf, int buf_size); + static int write_packet(void *opaque, uint8_t *buf, int buf_size); + static int64_t seek(void *opaque, int64_t offset, int whence); + + AVIOContext* alloc_context(bool write_flag, bool force_seek); + MythMediaBuffer *m_buffer { nullptr }; bool m_initState { true }; - static URLProtocol s_avfrURL; + AVIOContext *m_avioContext { nullptr }; }; #endif diff --git a/mythtv/libs/libmythtv/io/mythavformatwriter.cpp b/mythtv/libs/libmythtv/io/mythavformatwriter.cpp index 87f37d0e3b0..66ad334186b 100644 --- a/mythtv/libs/libmythtv/io/mythavformatwriter.cpp +++ b/mythtv/libs/libmythtv/io/mythavformatwriter.cpp @@ -44,14 +44,7 @@ extern "C" { MythAVFormatWriter::~MythAVFormatWriter() { - if (m_ctx) - { - av_write_trailer(m_ctx); - avio_closep(&m_ctx->pb); - for(uint i = 0; i < m_ctx->nb_streams; i++) - av_freep(reinterpret_cast(&m_ctx->streams[i])); - av_freep(reinterpret_cast(&m_ctx)); - } + CloseFile(); av_freep(reinterpret_cast(&m_audioInBuf)); av_freep(reinterpret_cast(&m_audioInPBuf)); @@ -138,33 +131,42 @@ bool MythAVFormatWriter::Init(void) bool MythAVFormatWriter::OpenFile(void) { - if (!(m_fmt.flags & AVFMT_NOFILE)) + bool success = openFileHelper(); + if (!success) { - if (avio_open(&m_ctx->pb, m_filename.toLatin1().constData(), AVIO_FLAG_WRITE) < 0) - { - LOG(VB_RECORD, LOG_ERR, LOC + "OpenFile(): avio_open() failed"); - return false; - } + Cleanup(); } + return success; +} +bool MythAVFormatWriter::openFileHelper() +{ + delete m_buffer; m_buffer = MythMediaBuffer::Create(m_filename, true); if (!m_buffer || !m_buffer->GetLastError().isEmpty()) { LOG(VB_RECORD, LOG_ERR, LOC + QString("OpenFile(): RingBuffer::Create() failed: '%1'") .arg(m_buffer ? m_buffer->GetLastError() : "")); - Cleanup(); return false; } - m_avfBuffer = new MythAVFormatBuffer(m_buffer); - auto *url = reinterpret_cast(m_ctx->pb->opaque); - url->prot = MythAVFormatBuffer::GetURLProtocol(); - url->priv_data = static_cast(m_avfBuffer); + delete m_avfBuffer; + m_avfBuffer = nullptr; + m_ctx->pb = nullptr; + if (!(m_fmt.flags & AVFMT_NOFILE)) + { + m_avfBuffer = new MythAVFormatBuffer(m_buffer, true, true); + m_ctx->pb = m_avfBuffer->getAVIOContext(); + if (m_ctx->pb == nullptr) + { + LOG(VB_RECORD, LOG_ERR, LOC + "OpenFile(): failed to allocate AVIOContext"); + return false; + } + } if (avformat_write_header(m_ctx, nullptr) < 0) { - Cleanup(); return false; } @@ -173,8 +175,6 @@ bool MythAVFormatWriter::OpenFile(void) void MythAVFormatWriter::Cleanup(void) { - if (m_ctx && m_ctx->pb) - avio_closep(&m_ctx->pb); delete m_avfBuffer; m_avfBuffer = nullptr; delete m_buffer; @@ -186,7 +186,9 @@ bool MythAVFormatWriter::CloseFile(void) if (m_ctx) { av_write_trailer(m_ctx); - avio_close(m_ctx->pb); + delete m_avfBuffer; + m_avfBuffer = nullptr; + m_ctx->pb = nullptr; for(uint i = 0; i < m_ctx->nb_streams; i++) av_freep(reinterpret_cast(&m_ctx->streams[i])); av_freep(reinterpret_cast(&m_ctx)); diff --git a/mythtv/libs/libmythtv/io/mythavformatwriter.h b/mythtv/libs/libmythtv/io/mythavformatwriter.h index 5208230d6b6..8c7329b770a 100644 --- a/mythtv/libs/libmythtv/io/mythavformatwriter.h +++ b/mythtv/libs/libmythtv/io/mythavformatwriter.h @@ -36,6 +36,7 @@ class MTV_PUBLIC MythAVFormatWriter : public MythMediaWriter bool ReOpen (const QString& Filename); private: + bool openFileHelper(); AVStream* AddVideoStream (void); bool OpenVideo (void); AVStream* AddAudioStream (void); From f7229b340762980bec9bafa3252d4f1fb84b4789 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Tue, 16 Jul 2024 20:09:14 -0400 Subject: [PATCH 12/59] libavformat.v: remove now unused added exports --- mythtv/external/FFmpeg/libavformat/libavformat.v | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/libavformat.v b/mythtv/external/FFmpeg/libavformat/libavformat.v index 9fd391df197..47d5ddcdb13 100644 --- a/mythtv/external/FFmpeg/libavformat/libavformat.v +++ b/mythtv/external/FFmpeg/libavformat/libavformat.v @@ -1,12 +1,6 @@ LIBAVFORMAT_MAJOR { global: av*; - ffurl_read; - ffurl_seek; - ffurl_size; - ffurl_open_whitelist; - ffurl_close; - ffurl_write; local: *; }; From 23da2271d0425058018e19b9688644b92d24468c Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 28 Jun 2024 00:42:23 -0400 Subject: [PATCH 13/59] libavformat/mpegts-mythtv.c: constify AVInputFormats They are const in mpegts.c. --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 19471549e52..6fbec21887d 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -331,7 +331,7 @@ typedef struct PESContext { int merged_st; } PESContext; -extern AVInputFormat ff_mythtv_mpegts_demuxer; +extern const AVInputFormat ff_mythtv_mpegts_demuxer; static struct Program * get_program(MpegTSContext *ts, unsigned int programid) { @@ -4065,7 +4065,7 @@ void avpriv_mythtv_mpegts_parse_close(MpegTSContext *ts) av_free(ts); } -AVInputFormat ff_mythtv_mpegts_demuxer = { +const AVInputFormat ff_mythtv_mpegts_demuxer = { .name = "mpegts", .long_name = NULL_IF_CONFIG_SMALL("MPEG-TS (MPEG-2 Transport Stream)"), .priv_data_size = sizeof(MpegTSContext), @@ -4078,7 +4078,7 @@ AVInputFormat ff_mythtv_mpegts_demuxer = { .priv_class = &mpegts_class, }; -AVInputFormat ff_mythtv_mpegtsraw_demuxer = { +const AVInputFormat ff_mythtv_mpegtsraw_demuxer = { .name = "mpegtsraw", .long_name = NULL_IF_CONFIG_SMALL("raw MPEG-TS (MPEG-2 Transport Stream)"), .priv_data_size = sizeof(MpegTSContext), From a8ef2f2c419c3d5b71aef7c4cc999d74e2b826a5 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 28 Jun 2024 00:50:42 -0400 Subject: [PATCH 14/59] libavformat/mpegts-mythtv.c: remove comment not in upstream --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 6fbec21887d..d421c227132 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -479,8 +479,6 @@ static void mpegts_push_section(MpegTSFilter *filter, const uint8_t *section, in /** * Assemble PES packets out of TS packets, and then call the "section_cb" * function when they are complete. - * - * NOTE: "DVB Section" is DVB terminology for an MPEG PES packet. */ static void write_section_data(MpegTSContext *ts, MpegTSFilter *tss1, const uint8_t *buf, int buf_size, int is_start) From b1bf592d7959da51073448d3b79d62b884623b3e Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 29 Jun 2024 15:23:41 -0400 Subject: [PATCH 15/59] mpegts-mythtv.h: remove unused added defines The only STREAM_TYPE_* define used is STREAM_TYPE_PRIVATE_DATA. STREAM_TYPE_AUDIO_DTS is already defined by FFmpeg to a different value. 0x8a is used in MISC_types[]. STREAM_TYPE_AUDIO_HDMV_* defines are from: https://github.com/MythTV/mythtv/commit/d15e482c99cc356966ed1e5b9aceafe2cc1402b9 They are now unused and FFmpeg has added the entries to HDMV_types[]. --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h index cfa2edc7881..c6d466cc5f9 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h @@ -139,10 +139,6 @@ #define STREAM_TYPE_AUDIO_DTS 0x82 #define STREAM_TYPE_AUDIO_TRUEHD 0x83 #define STREAM_TYPE_AUDIO_EAC3 0x87 -//#define STREAM_TYPE_AUDIO_DTS 0x8a -//#define STREAM_TYPE_AUDIO_HDMV_AC3_PLUS 0x84 -//#define STREAM_TYPE_AUDIO_HDMV_DTS_HD 0x85 -//#define STREAM_TYPE_AUDIO_HDMV_DTS_HD_MASTER 0x86 //#define STREAM_TYPE_SUBTITLE_DVB 0x100 //#define STREAM_TYPE_VBI_DVB 0x101 From 0a450b0396fab951f5af74e6b2f4d425f7002907 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 29 Jun 2024 16:53:55 -0400 Subject: [PATCH 16/59] mpegts-mythtv.h: remove unused added STREAM_TYPE_*_DVB defines STREAM_TYPE_SUBTITLE_DVB is from: https://github.com/MythTV/mythtv/commit/aaa93724f8c24f156aafffc9290e103006f07bff#diff-ae852538fd61b663231c8bdda1fdbade40c97e8305401fcc6f1ad9f395efdf18 STREAM_TYPE_VBI_DVB is from: https://github.com/MythTV/mythtv/commit/6da185411988db997655fc807bedc519700d8f7f However, the corresponding uses in MISC_types[] can never be used. in mpegts_set_stream_info() pes->stream_type = stream_type; ... mpegts_find_stream_type(st, pes->stream_type, MISC_types); mpegts_set_stream_info() is called either with stream_type = 0 or stream_type = get8(&p, p_end) 0x100 and 0x101 exceed UINT8_MAX and thus will never be found in the search. --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 2 -- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index d421c227132..b10397d5d04 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -937,8 +937,6 @@ static const StreamType MISC_types[] = { { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, { 0x87, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, { 0x8a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, - { 0x100, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, - { 0x101, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, { 0 }, }; diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h index c6d466cc5f9..03cbfc4d9ad 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h @@ -140,9 +140,6 @@ #define STREAM_TYPE_AUDIO_TRUEHD 0x83 #define STREAM_TYPE_AUDIO_EAC3 0x87 -//#define STREAM_TYPE_SUBTITLE_DVB 0x100 -//#define STREAM_TYPE_VBI_DVB 0x101 - #define DVB_CAROUSEL_ID 0x13 #define DVB_VBI_DATA_ID 0x45 #define DVB_VBI_TELETEXT_ID 0x46 From 92eaa467f11b23434b10c5673431ef5d375fde34 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 29 Jun 2024 22:44:07 -0400 Subject: [PATCH 17/59] mpegts-mythtv: update DVB defines Use the names given in ETSI 300 468 and list all of the values used, even if the defines aren't. --- .../FFmpeg/libavformat/mpegts-mythtv.c | 12 +++++------ .../FFmpeg/libavformat/mpegts-mythtv.h | 20 +++++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index b10397d5d04..79d7b6a0b94 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -977,8 +977,8 @@ static const StreamType DESC_types[] = { { 0x7a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, { 0x13, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DVB_CAROUSEL_ID */ - { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* DVB_VBI_DATA_ID */ - { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* DVB_VBI_TELETEXT_ID */ //FixMe type subtilte + { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* VBI_DATA_DESCRIPTOR */ + { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* VBI_TELETEXT_DESCRIPTOR */ { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT }, { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ { 0 }, @@ -2143,7 +2143,7 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre sti->request_probe = 50; } break; - case DVB_BROADCAST_ID: + case DATA_BROADCAST_ID_DESCRIPTOR: st->data_id = get16(pp, desc_end); break; case DVB_CAROUSEL_ID: @@ -2159,7 +2159,7 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre case 0x52: /* stream identifier descriptor */ sti->stream_identifier = 1 + get8(pp, desc_end); st->component_tag = sti->stream_identifier - 1; - // DVB_DATA_STREAM: + // STREAM_IDENTIFIER_DESCRIPTOR: /* Audio and video are sometimes encoded in private streams labelled with * a component tag. */ #if 0 @@ -2170,7 +2170,7 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre COMPONENT_TAG_types); #endif break; - case DVB_VBI_TELETEXT_ID: + case VBI_TELETEXT_DESCRIPTOR: language[0] = get8(pp, desc_end); language[1] = get8(pp, desc_end); language[2] = get8(pp, desc_end); @@ -2180,7 +2180,7 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre if (language[0]) av_dict_set(&st->metadata, "language", language, 0); break; - case DVB_VBI_DATA_ID: + case VBI_DATA_DESCRIPTOR: // dvbci->vbi_data = 1; //not parsing the data service descriptors break; case METADATA_DESCRIPTOR: diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h index 03cbfc4d9ad..e0f9e3f05a5 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h @@ -141,12 +141,6 @@ #define STREAM_TYPE_AUDIO_EAC3 0x87 #define DVB_CAROUSEL_ID 0x13 -#define DVB_VBI_DATA_ID 0x45 -#define DVB_VBI_TELETEXT_ID 0x46 -#define DVB_TELETEXT_ID 0x56 -#define DVB_SUBT_DESCID 0x59 -#define DVB_BROADCAST_ID 0x66 -#define DVB_DATA_STREAM 0x52 /* ISO/IEC 13818-1 Table 2-22 */ #define STREAM_ID_PROGRAM_STREAM_MAP 0xbc @@ -173,6 +167,20 @@ #define METADATA_DESCRIPTOR 0x26 #define METADATA_STD_DESCRIPTOR 0x27 +/* DVB descriptor tag values [0x40, 0x7F] from + ETSI EN 300 468 Table 12: Possible locations of descriptors */ +#define VBI_DATA_DESCRIPTOR 0x45 +#define VBI_TELETEXT_DESCRIPTOR 0x46 +#define SERVICE_DESCRIPTOR 0x48 +#define STREAM_IDENTIFIER_DESCRIPTOR 0x52 +#define TELETEXT_DESCRIPTOR 0x56 +#define SUBTITLING_DESCRIPTOR 0x59 +#define DATA_BROADCAST_ID_DESCRIPTOR 0x66 +#define AC3_DESCRIPTOR 0x6A // AC-3_descriptor +#define ENHANCED_AC3_DESCRIPTOR 0x7A // enhanced_AC-3_descriptor +#define DTS_DESCRIPTOR 0x7B +#define EXTENSION_DESCRIPTOR 0x7F + typedef struct MpegTSContext MpegTSContext; MpegTSContext *avpriv_mythtv_mpegts_parse_open(AVFormatContext *s); From d06016d9ba3513e6db3f1d4b1b8d69b5513f91dd Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 00:45:54 -0400 Subject: [PATCH 18/59] mpegts-mythtv.h: rename DVB_CAROUSEL_ID I'm not sure that the new name is correct since I don't have a copy of ISO/IEC 13818-6. However, it should be close. --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 6 +++--- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 79d7b6a0b94..930d6e74a64 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -890,7 +890,7 @@ static const StreamType ISO_types[] = { { 0x02, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO }, { 0x03, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, { 0x04, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, - { 0x0b, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DVB_CAROUSEL_ID */ + { 0x0b, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* STREAM_TYPE_DSMCC_B */ { 0x0f, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC }, { 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 }, /* Makito encoder sets stream type 0x11 for AAC, @@ -976,7 +976,7 @@ static const StreamType DESC_types[] = { { 0x6a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, /* AC-3 descriptor */ { 0x7a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC-3 descriptor */ { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, - { 0x13, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DVB_CAROUSEL_ID */ + { 0x13, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DSMCC_B }, /* DSMCC_CAROUSEL_IDENTIFIER_DESCRIPTOR */ { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* VBI_DATA_DESCRIPTOR */ { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_DVB_VBI }, /* VBI_TELETEXT_DESCRIPTOR */ { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT }, @@ -2146,7 +2146,7 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre case DATA_BROADCAST_ID_DESCRIPTOR: st->data_id = get16(pp, desc_end); break; - case DVB_CAROUSEL_ID: + case DSMCC_CAROUSEL_IDENTIFIER_DESCRIPTOR: { int carId = 0; carId = get8(pp, desc_end); diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h index e0f9e3f05a5..0aabfdd94e6 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h @@ -140,8 +140,6 @@ #define STREAM_TYPE_AUDIO_TRUEHD 0x83 #define STREAM_TYPE_AUDIO_EAC3 0x87 -#define DVB_CAROUSEL_ID 0x13 - /* ISO/IEC 13818-1 Table 2-22 */ #define STREAM_ID_PROGRAM_STREAM_MAP 0xbc #define STREAM_ID_PRIVATE_STREAM_1 0xbd @@ -161,6 +159,7 @@ #define VIDEO_STREAM_DESCRIPTOR 0x02 #define REGISTRATION_DESCRIPTOR 0x05 #define ISO_639_LANGUAGE_DESCRIPTOR 0x0a +#define DSMCC_CAROUSEL_IDENTIFIER_DESCRIPTOR 0x13 // Defined in ISO/IEC 13818-6 #define IOD_DESCRIPTOR 0x1d #define SL_DESCRIPTOR 0x1e #define FMC_DESCRIPTOR 0x1f From 13e8d8924fd3ac9227ed9956b6f91a2bc6521ded Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 01:23:00 -0400 Subject: [PATCH 19/59] mpegts-mythtv.c: MISC_types[]: match space with FFmpeg in addition From: https://github.com/MythTV/mythtv/commit/cc2f9dd7c3e4632d167b8a9fd90e41b5c16f1819 --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 930d6e74a64..d11a74bb971 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -935,7 +935,7 @@ static const StreamType SCTE_types[] = { /* ATSC ? */ static const StreamType MISC_types[] = { { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, - { 0x87, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, + { 0x87, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, { 0x8a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, { 0 }, }; From 620a2634060df3b62cb1255b36d60cd5964e7790 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 01:29:50 -0400 Subject: [PATCH 20/59] mpegts-mythtv: remove dead code for identifying private streams Appears to be from 2006: https://github.com/MythTV/mythtv/commit/156914d3ebcb1df9bc59611690767c6ec2e98b2b https://github.com/MythTV/mythtv/commit/53d9721c5be9fc3a13e6728b57545d40ce8f76c8 Disabled in 2010: https://github.com/MythTV/mythtv/commit/3cc5fc842ced8fbf9276042d1a948de4705dead9#diff-2fb8a33ba832f242d27f19c9f25755b57af9807343e99dac77263c1c5ebc383a --- .../external/FFmpeg/libavformat/mpegts-mythtv.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index d11a74bb971..79ce5cce124 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -984,12 +984,6 @@ static const StreamType DESC_types[] = { { 0 }, }; -/* component tags */ -static const StreamType COMPONENT_TAG_types[] = { - { 0x0a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 }, - { 0x52, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO }, -}; - static void mpegts_find_stream_type(AVStream *st, uint32_t stream_type, const StreamType *types) @@ -2159,16 +2153,6 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre case 0x52: /* stream identifier descriptor */ sti->stream_identifier = 1 + get8(pp, desc_end); st->component_tag = sti->stream_identifier - 1; - // STREAM_IDENTIFIER_DESCRIPTOR: - /* Audio and video are sometimes encoded in private streams labelled with - * a component tag. */ -#if 0 - if (st->codecpar->codec_id == AV_CODEC_ID_NONE && - desc_count == 1 && - stream_type == STREAM_TYPE_PRIVATE_DATA) - mpegts_find_stream_type(st, st->component_tag, - COMPONENT_TAG_types); -#endif break; case VBI_TELETEXT_DESCRIPTOR: language[0] = get8(pp, desc_end); From 761f1e33e7c2d54a2e193e3bae7c61c427a5fd46 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 02:09:41 -0400 Subject: [PATCH 21/59] mpegts-mythtv.h: remove unnecessary temporary variable --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 79ce5cce124..d11822948d0 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -2141,14 +2141,10 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre st->data_id = get16(pp, desc_end); break; case DSMCC_CAROUSEL_IDENTIFIER_DESCRIPTOR: - { - int carId = 0; - carId = get8(pp, desc_end); - carId = (carId << 8) | get8(pp, desc_end); - carId = (carId << 8) | get8(pp, desc_end); - carId = (carId << 8) | get8(pp, desc_end); - st->carousel_id = carId; - } + st->carousel_id = get8(pp, desc_end) << 24 | + get8(pp, desc_end) << 16 | + get8(pp, desc_end) << 8 | + get8(pp, desc_end); break; case 0x52: /* stream identifier descriptor */ sti->stream_identifier = 1 + get8(pp, desc_end); From a4146dcb4e41ce2c0ae0cab2bdbf50a3d5fb60bb Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 02:25:50 -0400 Subject: [PATCH 22/59] mpegts-mythtv.h: remove dead code from DVB VBI descriptor parsing Neither removed section has done anything since 2010: https://github.com/MythTV/mythtv/commit/3cc5fc842ced8fbf9276042d1a948de4705dead9#diff-2fb8a33ba832f242d27f19c9f25755b57af9807343e99dac77263c1c5ebc383a --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index d11822948d0..414c19b0f56 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -2156,13 +2156,9 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre language[2] = get8(pp, desc_end); language[3] = 0; - /* dvbci->txt_type = */ i = (get8(pp, desc_end)) >> 3; // not exported, defeat compiler -Wunused-value if (language[0]) av_dict_set(&st->metadata, "language", language, 0); break; - case VBI_DATA_DESCRIPTOR: - // dvbci->vbi_data = 1; //not parsing the data service descriptors - break; case METADATA_DESCRIPTOR: if (get16(pp, desc_end) == 0xFFFF) *pp += 4; From 67d1cf9954e864745ff1efeb7080cc60928e337b Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 30 Jun 2024 02:34:45 -0400 Subject: [PATCH 23/59] mpegts-mythtv.h: remove unused MAX_PES_PAYLOAD Appears to have been from an FFmpeg merge in 2009: https://github.com/MythTV/mythtv/commit/6d62e6693e0dce2e8c263070cc72003187398312 --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 414c19b0f56..1e9fba8b7b8 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -82,8 +82,6 @@ typedef struct SectionContext { * synchronization is lost */ #define MAX_RESYNC_SIZE 65536 -#define MAX_PES_PAYLOAD 200 * 1024 - #define MAX_MP4_DESCR_COUNT 16 #define MOD_UNLIKELY(modulus, dividend, divisor, prev_dividend) \ From 218b1f58e275aa46243d1a436971cd93f35fce80 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Tue, 2 Jul 2024 20:53:44 -0400 Subject: [PATCH 24/59] mpegts-mythtv.c: remove customization to parsing of subtitling_descriptor This has no functional change since MythTV only uses the MythTV addition AVStream::carousel_id if AVStream::codecpar::codec_id == AV_CODEC_ID_DSMCC_B. --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 1e9fba8b7b8..77142b15f45 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -2080,18 +2080,8 @@ int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stre extradata[4] = get8(pp, desc_end); /* subtitling_type */ memcpy(extradata, *pp, 4); /* composition_page_id and ancillary_page_id */ extradata += 5; -#ifdef UPSTREAM_TO_MYTHTV *pp += 4; -#else - { - int comp_page = get16(pp, desc_end); - int anc_page = get16(pp, desc_end); - int sub_id = (anc_page << 16) | comp_page; - if (sub_id && (st->codecpar->codec_id == AV_CODEC_ID_DVB_SUBTITLE)) - st->carousel_id = sub_id; - } -#endif } language[i * 4 - 1] = 0; From 3df4b4556c1445106b10dd45abfc5cd472ab502f Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 21 Jul 2024 20:22:53 -0400 Subject: [PATCH 25/59] mpegts-mythtv.c: pat_cb(): ensure all PIDs are valid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit originally from: https://github.com/MythTV/mythtv/commit/a1d4d112c3f962a85ddd6248592421171fc8331c referencing: https://code.mythtv.org/trac/ticket/1887 ISO/IEC 13818-1:2021 specifies a valid range of [0x0010, 0x1FFE] in § 2.4.4.6 Semantic definition of fields in program association section and Table 2-3 – PID table --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 77142b15f45..7ae453bb0b5 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -3070,7 +3070,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len // begin MythTV av_log(ts->stream, AV_LOG_TRACE, "req_sid=0x%x\n", ts->req_sid); - if (pmt_pid == 0x0) + if (pmt_pid <= 0x000F || pmt_pid >= 0x1FFF) { av_log(ts->stream, AV_LOG_ERROR, "Invalid PAT ignored " "MPEG Program Number=0x%x pid=0x%x req_sid=0x%x\n", From 4935a09b79d3884f0abe3253b982084c67a02c2a Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 22 Jul 2024 14:45:29 -0400 Subject: [PATCH 26/59] mpegts-mythtv.c: remove customizations MpegTSContext::req_sid, scanning, and pmt_scan_state req_sid is from an FFmpeg merge: https://github.com/MythTV/mythtv/commit/2a56a37b3c33b6ec7d9e5370c9da28e63516ebc7#diff-2fb8a33ba832f242d27f19c9f25755b57af9807343e99dac77263c1c5ebc383a removed from FFmpeg in https://github.com/FFmpeg/FFmpeg/commit/90d13e30d52733402adf410713c99e6563f80b50 scanning and pmt_scan_state are from https://github.com/MythTV/mythtv/commit/084e3f83557cdd4ba8f86d31173332a1129b1f42 MpegTSContext::req_sid is only set by mpegts_read_header(). First, in pmt_cb() always create PMT filters. Now we don't want to stop_parse early since that would prevent creating all the PMT filters, so remove those changes to pat_cb() and pmt_cb(). MpegTSContext::pmt_scan_state is only tested in mpegts_read_header() and its use is equivalent to `!ts->prg[i].pmt_found`. Now MpegTSContext::scanning and MpegTSContext::pmt_scan_state are unused, so remove them. MpegTSContext::req_sid is now set but otherwise unused, so remove it as well. Additionally, in mpegts_read_header() sid would cause an invalid index of -1 on the first iteration. The fallback code in mpegts_read_header() has been broken since https://github.com/MythTV/mythtv/commit/0b0068cb24b6d564cd4ec9ded9502c38f543600a sid != pmt_pid, so it was looking for the wrong filter in MpegTSContext::pids. --- .../FFmpeg/libavformat/mpegts-mythtv.c | 111 +++--------------- 1 file changed, 19 insertions(+), 92 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 7ae453bb0b5..37fb2565c42 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -57,10 +57,6 @@ typedef struct enum AVMediaType codec_type; } pmt_entry_t; -#define PMT_NOT_YET_FOUND 0 -#define PMT_NOT_IN_PAT 1 -#define PMT_FOUND 2 - typedef struct SectionContext { int pid; int stream_type; @@ -186,16 +182,6 @@ struct MpegTSContext { int64_t cur_pcr; /**< used to estimate the exact PCR */ int64_t pcr_incr; /**< used to estimate the exact PCR */ - // MythTV only - /** if set, stop_parse is set when PAT/PMT is found */ - int scanning; - /** set to PMT_NOT_IN_PAT in pat_cb when scanning is true - * and the MPEG program number "req_sid" is not found in PAT; - * set to PMT_FOUND when a PMT with a the "req_sid" program - * number is found. */ - int pmt_scan_state; - // end MythTV only - /* data needed to handle file based ts */ /** stop parsing loop */ int stop_parse; @@ -230,9 +216,6 @@ struct MpegTSContext { AVBufferPool* pools[32]; // MythTV only - /** MPEG program number of stream we want to decode */ - int req_sid; - /** number of streams in the last PMT seen */ int pid_cnt; /** list of streams in the last PMT seen */ @@ -2684,16 +2667,6 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d version=%d tid=%d\n", h->id, h->sec_num, h->last_sec_num, h->version, h->tid); - // begin MythTV - /* if we require a specific PMT, and this isn't it return silently */ - if (ts->req_sid >= 0 && h->id != ts->req_sid) - { - av_log(ts->stream, AV_LOG_TRACE, "We are looking for program 0x%x, not 0x%x", - ts->req_sid, h->id); - return; - } - // end MythTV - if (!ts->scan_all_pmts && ts->skip_changes) return; @@ -2958,13 +2931,6 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len avctx->streams_changed(avctx->stream_change_data); } } - - /* if we are scanning, tell scanner we found the PMT */ - if (ts->scanning) - { - ts->pmt_scan_state = PMT_FOUND; - ts->stop_parse = 1; - } // end MythTV if (!ts->pids[pcr_pid]) @@ -3034,8 +3000,6 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len int nb_prg = 0; AVProgram *program; - int found = 0; // MythTV added - av_log(ts->stream, AV_LOG_TRACE, "PAT:\n"); hex_dump_debug(ts->stream, section, section_len); @@ -3068,18 +3032,12 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x pid=0x%x\n", sid, pmt_pid); // begin MythTV - av_log(ts->stream, AV_LOG_TRACE, "req_sid=0x%x\n", ts->req_sid); - if (pmt_pid <= 0x000F || pmt_pid >= 0x1FFF) { av_log(ts->stream, AV_LOG_ERROR, "Invalid PAT ignored " - "MPEG Program Number=0x%x pid=0x%x req_sid=0x%x\n", - sid, pmt_pid, ts->req_sid); + "MPEG Program Number=0x%x pid=0x%x\n", sid, pmt_pid); return; } - - if (sid == ts->req_sid) - found = 1; // end MythTV if (sid == 0x0000) { @@ -3125,25 +3083,6 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len clear_avprogram(ts, ts->stream->programs[j]->id); } } - - /* if we are scanning for any PAT and not a particular PMT, - * tell parser it is safe to quit. */ - if (ts->req_sid < 0 && ts->scanning) - { - av_log(ts->stream, AV_LOG_TRACE, "Found PAT, ending scan\n"); - ts->stop_parse = 1; - } - - /* if we are looking for a particular MPEG program number, - * and it is not in this PAT indicate this in "pmt_scan_state" - * and tell parser it is safe to quit. */ - if (ts->req_sid >= 0 && !found) - { - av_log(ts->stream, AV_LOG_TRACE, "Program 0x%x is not in PAT, ending scan\n", - ts->req_sid); - ts->pmt_scan_state = PMT_NOT_IN_PAT; - ts->stop_parse = 1; - } } static void eit_cb(MpegTSFilter *filter, const uint8_t *section, int section_len) @@ -3654,13 +3593,6 @@ static int mpegts_read_header(AVFormatContext *s) /* first do a scan to get all the services */ seek_back(s, pb, pos); - // begin MythTV - /* we don't want any PMT pid filters created on first pass */ - ts->req_sid = -1; - - ts->scanning = 1; - // end MythTV - mpegts_open_section_filter(ts, SDT_PID, sdt_cb, ts, 1); mpegts_open_section_filter(ts, PAT_PID, pat_cb, ts, 1); mpegts_open_section_filter(ts, EIT_PID, eit_cb, ts, 1); @@ -3671,63 +3603,58 @@ static int mpegts_read_header(AVFormatContext *s) ts->auto_guess = 1; // begin MythTV - ts->scanning = 1; - ts->pmt_scan_state = PMT_NOT_YET_FOUND; + { + int i = 0; /* tune to first service found */ - for (int i = 0; ((i < ts->nb_prg) && - (ts->pmt_scan_state == PMT_NOT_YET_FOUND)); i++) + for (i = 0; (i < ts->nb_prg) && !ts->prg[i].pmt_found; i++) + ; + if (i == ts->nb_prg) + i = 0; + for (; (i < ts->nb_prg) && !ts->prg[i].pmt_found; i++) { - int sid = ts->req_sid; - av_log(ts->stream, AV_LOG_TRACE, "Tuning to pnum: 0x%x\n", - ts->prg[i].id); - - /* now find the info for the first service if we found any, - otherwise try to filter all PATs */ + MpegTSFilter *pmt_filter = NULL; + if (ts->prg[i].nb_pids > 0) + pmt_filter = ts->pids[ts->prg[i].pids[0]]; - avio_seek(pb, pos, SEEK_SET); - ts->req_sid = ts->prg[i].id; - handle_packets(ts, probesize / ts->raw_packet_size); + if (pmt_filter == NULL) + continue; /* fallback code to deal with broken streams from * DBOX2/Firewire cable boxes. */ - if (ts->pids[sid] && - (ts->pmt_scan_state == PMT_NOT_YET_FOUND)) + if (!ts->prg[i].pmt_found) { av_log(ts->stream, AV_LOG_ERROR, "Tuning to pnum: 0x%x without CRC check on PMT\n", ts->prg[i].id); /* turn off crc checking */ - ts->pids[sid]->u.section_filter.check_crc = 0; + pmt_filter->u.section_filter.check_crc = 0; /* try again */ avio_seek(pb, pos, SEEK_SET); - ts->req_sid = ts->prg[i].id; handle_packets(ts, probesize / ts->raw_packet_size); } /* fallback code to deal with streams that are not complete PMT * streams (BBC iPlayer IPTV as an example) */ - if (ts->pids[sid] && - (ts->pmt_scan_state == PMT_NOT_YET_FOUND)) + if (!ts->prg[i].pmt_found) { av_log(ts->stream, AV_LOG_ERROR, "Overriding PMT data length, using " "contents of first TS packet only!\n"); - ts->pids[sid]->pmt_chop_at_ts = 1; + pmt_filter->pmt_chop_at_ts = 1; /* try again */ avio_seek(pb, pos, SEEK_SET); - ts->req_sid = ts->prg[i].id; handle_packets(ts, probesize / ts->raw_packet_size); } } - ts->scanning = 0; /* if we could not find any PMTs, fail */ - if (ts->pmt_scan_state == PMT_NOT_YET_FOUND) + if (ts->nb_prg == 0 || (i == ts->nb_prg && !ts->prg[ts->nb_prg - 1].pmt_found)) { av_log(ts->stream, AV_LOG_ERROR, "mpegts_read_header: could not find any PMT's\n"); return -1; } + } // end MythTV av_log(ts->stream, AV_LOG_TRACE, "tuning done\n"); From 1f5183243a038153a6a60ea3562d7ef1491738b1 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 22 Jul 2024 15:13:15 -0400 Subject: [PATCH 27/59] mpegts-mythtv.c: remove fallback code from mpegts_read_header() Disabling CRC is from: https://github.com/MythTV/mythtv/commit/084e3f83557cdd4ba8f86d31173332a1129b1f42 referencing https://code.mythtv.org/trac/ticket/328 However, the sample does not trigger that fallback. Deal with incomplete PMT streams in BBC iPlayer IPTV https://github.com/MythTV/mythtv/commit/c11ee69c81198dc221c874e8132f1f30a385fa63 references https://code.mythtv.org/trac/ticket/9926 The sample is unavailable and the issue was not in FFmpeg's unmodified demuxer, so, following subsequent harmonization, I assume it is no longer an issue. If it still is, MythTV's other modifications should be looked at first. --- .../FFmpeg/libavformat/mpegts-mythtv.c | 82 ------------------- 1 file changed, 82 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 37fb2565c42..66d5c482fa6 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -130,12 +130,6 @@ struct MpegTSFilter { int64_t last_pcr; int discard; enum MpegTSFilterType type; - /** if set, chop off PMT at the end of the TS packet, regardless of the - * data length given in the packet. This is for use by BBC iPlayer IPTV - * recordings which seem to only want to send the first packet of the PMT - * but give a length that requires 3 packets. Without this, those - * recordings are unplayable */ - int pmt_chop_at_ts; // MythTV union { MpegTSPESFilter pes_filter; MpegTSSectionFilter section_filter; @@ -528,24 +522,9 @@ static void write_section_data(MpegTSContext *ts, MpegTSFilter *tss1, offset += tss->section_h_size; tss->section_h_size = -1; } else { - // MythTV if; originally from: Deal with incomplete PMT streams in BBC iPlayer IPTV - // https://github.com/MythTV/mythtv/commit/c11ee69c81198dc221c874e8132f1f30a385fa63 - // references https://code.mythtv.org/trac/ticket/9926 issue not in upstream! - if (tss1->pmt_chop_at_ts && tss->section_buf[0] == PMT_TID) - { - /* HACK! To allow BBC IPTV streams with incomplete PMTs (they - * advertise a length of 383, but only send 182 bytes!), we - * will not wait for the remainder of the PMT, but accept just - * what is in the first TS payload, as this is enough to get - * playback, although some PIDs may be filtered out as a result - */ - tss->section_h_size = tss->section_index; - } - else { // upstream follows: tss->section_h_size = -1; tss->end_of_section_reached = 0; break; - } // end MythTV if } } } @@ -590,12 +569,6 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, av_free(section_buf); return NULL; } - - // MythTV Deal with incomplete PMT streams in BBC iPlayer IPTV - // https://github.com/MythTV/mythtv/commit/c11ee69c81198dc221c874e8132f1f30a385fa63 - filter->pmt_chop_at_ts = 0; - // end MythTV - sec = &filter->u.section_filter; sec->section_cb = section_cb; sec->opaque = opaque; @@ -3602,61 +3575,6 @@ static int mpegts_read_header(AVFormatContext *s) ts->auto_guess = 1; - // begin MythTV - { - int i = 0; - /* tune to first service found */ - for (i = 0; (i < ts->nb_prg) && !ts->prg[i].pmt_found; i++) - ; - if (i == ts->nb_prg) - i = 0; - for (; (i < ts->nb_prg) && !ts->prg[i].pmt_found; i++) - { - MpegTSFilter *pmt_filter = NULL; - if (ts->prg[i].nb_pids > 0) - pmt_filter = ts->pids[ts->prg[i].pids[0]]; - - if (pmt_filter == NULL) - continue; - - /* fallback code to deal with broken streams from - * DBOX2/Firewire cable boxes. */ - if (!ts->prg[i].pmt_found) - { - av_log(ts->stream, AV_LOG_ERROR, - "Tuning to pnum: 0x%x without CRC check on PMT\n", - ts->prg[i].id); - /* turn off crc checking */ - pmt_filter->u.section_filter.check_crc = 0; - /* try again */ - avio_seek(pb, pos, SEEK_SET); - handle_packets(ts, probesize / ts->raw_packet_size); - } - - /* fallback code to deal with streams that are not complete PMT - * streams (BBC iPlayer IPTV as an example) */ - if (!ts->prg[i].pmt_found) - { - av_log(ts->stream, AV_LOG_ERROR, - "Overriding PMT data length, using " - "contents of first TS packet only!\n"); - pmt_filter->pmt_chop_at_ts = 1; - /* try again */ - avio_seek(pb, pos, SEEK_SET); - handle_packets(ts, probesize / ts->raw_packet_size); - } - } - - /* if we could not find any PMTs, fail */ - if (ts->nb_prg == 0 || (i == ts->nb_prg && !ts->prg[ts->nb_prg - 1].pmt_found)) - { - av_log(ts->stream, AV_LOG_ERROR, - "mpegts_read_header: could not find any PMT's\n"); - return -1; - } - } - // end MythTV - av_log(ts->stream, AV_LOG_TRACE, "tuning done\n"); s->ctx_flags |= AVFMTCTX_NOHEADER; From 5fd023b79c04cb79ae988bc483f6c7a26e33f997 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 22 Jul 2024 15:16:50 -0400 Subject: [PATCH 28/59] mpegts-mythtv.c: remove unused addition Program::pid --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 66d5c482fa6..5baa8df678b 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -145,7 +145,6 @@ struct Stream { #define MAX_PIDS_PER_PROGRAM (MAX_STREAMS_PER_PROGRAM + 2) struct Program { unsigned int id; // program id/service id - unsigned int pid; // PMT PID (not in upstream), only used in add_pat_entry() and is_pat_same() unsigned int nb_pids; unsigned int pids[MAX_PIDS_PER_PROGRAM]; unsigned int nb_streams; From 285de4a859be99851603c83a195518c33cfeadb4 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Mon, 22 Jul 2024 23:16:35 -0400 Subject: [PATCH 29/59] mpegts-mythtv.c: replace pmt_equal_streams() with is_pmt_equal() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is one PMT per program, so add the stream_type to the corresponding Program. This means we no longer need to look at an MpegTSFilter. The searching logic in is_pmt_equal() is equivalent to that in pmt_equal_streams(). However, we now look at the entire PMT not just is_desired_stream()s. Nothing now uses MpegTSContext::pid_cnt or MpegTSContext::pmt_pids, so remove them and a lot of other now unused code. See ISO/IEC 13818-1:2021 § 2.4.4.9 Program map table Perhaps we could use TS_program_map_section()'s version_number and possibly current_next_indicator instead of comparing the PMT ourselves? Maybe by modifying update_av_program_info()? export_pmt() would probably need if (old_version == -1 || old_version != version) also its buffer should probably be moved to AVProgram since each program has a different PMT. Similarly streams_changed() should have a program_number parameter, since we probably only care about one program at a time. --- .../FFmpeg/libavformat/mpegts-mythtv.c | 228 +++--------------- 1 file changed, 31 insertions(+), 197 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 5baa8df678b..3ae662bccfc 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -49,14 +49,6 @@ // MythTV only ----------------------------------------------------------------- -typedef struct -{ - int pid; - int type; - enum AVCodecID codec_id; - enum AVMediaType codec_type; -} pmt_entry_t; - typedef struct SectionContext { int pid; int stream_type; @@ -66,12 +58,6 @@ typedef struct SectionContext { AVStream *st; } SectionContext; -/** maximum number of PMT's we expect to be described in a PAT */ -#define PAT_MAX_PMT 128 - -/** maximum number of streams we expect to be described in a PMT */ -#define PMT_PIDS_MAX 256 - // end MythTV only ------------------------------------------------------------- /* maximum size in which we look for synchronization if @@ -147,6 +133,7 @@ struct Program { unsigned int id; // program id/service id unsigned int nb_pids; unsigned int pids[MAX_PIDS_PER_PROGRAM]; + uint8_t stream_types[MAX_PIDS_PER_PROGRAM]; // stream_type for pid at same index in pids unsigned int nb_streams; struct Stream streams[MAX_STREAMS_PER_PROGRAM]; @@ -207,13 +194,6 @@ struct MpegTSContext { AVStream *epg_stream; AVBufferPool* pools[32]; - - // MythTV only - /** number of streams in the last PMT seen */ - int pid_cnt; - /** list of streams in the last PMT seen */ - int pmt_pids[PMT_PIDS_MAX]; - // end MythTV only }; #define MPEGTS_OPTIONS \ @@ -364,7 +344,8 @@ static struct Program * add_program(MpegTSContext *ts, unsigned int programid) return p; } -static void add_pid_to_program(struct Program *p, unsigned int pid) +// MythTV function +static void add_pmt_entry_to_program(struct Program *p, unsigned int pid, uint8_t stream_type) { int i; if (!p) @@ -377,9 +358,15 @@ static void add_pid_to_program(struct Program *p, unsigned int pid) if (p->pids[i] == pid) return; + p->stream_types[p->nb_pids] = stream_type; p->pids[p->nb_pids++] = pid; } +static void add_pid_to_program(struct Program *p, unsigned int pid) +{ + add_pmt_entry_to_program(p, pid, 0); +} + static void update_av_program_info(AVFormatContext *s, unsigned int programid, unsigned int pid, int version) { @@ -2384,43 +2371,6 @@ static int is_pes_stream(int stream_type, uint32_t prog_reg_desc) } // begin MythTV only ------------------------------------------------------- -static int find_in_list(const int *pids, int pid) -{ - int i; - for (i=0; ipids[pid]; @@ -2449,118 +2399,40 @@ static SectionContext *add_section_stream(MpegTSContext *ts, int pid, int stream return sect; } -static void mpegts_remove_stream(MpegTSContext *ts, int pid) +static int is_pmt_equal(const struct Program *new, const struct Program *old) { - int indx = -1; - av_log(ts, AV_LOG_DEBUG, "mpegts_remove_stream 0x%x\n", pid); - if (ts->pids[pid]) - { - av_log(ts, AV_LOG_DEBUG, "closing filter for pid 0x%x\n", pid); - mpegts_close_filter(ts, ts->pids[pid]); - } - indx = find_in_list(ts->pmt_pids, pid); - if (indx >= 0) - { - memmove(ts->pmt_pids+indx, ts->pmt_pids+indx+1, PMT_PIDS_MAX-indx-1); - ts->pmt_pids[PMT_PIDS_MAX-1] = 0; - ts->pid_cnt--; - } - else - { - av_log(ts, AV_LOG_DEBUG, "ERROR: closing filter for pid 0x%x, indx = %i\n", pid, indx); - } -} + const int offset = 2; // Program::pids[0] is pmt_pid, [1] is pcr_pid + int i = offset; -static void mpegts_cleanup_streams(MpegTSContext *ts) -{ - int i; - int orig_pid_cnt = ts->pid_cnt; - for (i=0; ipid_cnt; i++) + if (new->nb_pids != old->nb_pids) { - if (!ts->pids[ts->pmt_pids[i]]) - { - mpegts_remove_stream(ts, ts->pmt_pids[i]); - i--; - } + return 0; } - if (orig_pid_cnt != ts->pid_cnt) + if (new->nb_pids <= offset) { - av_log(ts, AV_LOG_DEBUG, - "mpegts_cleanup_streams: pid_cnt bfr %d aft %d\n", - orig_pid_cnt, ts->pid_cnt); + return 1; } -} - -// Find number of equal streams in old and new pmt starting at 0 -// and stopping at the first different stream. -static int pmt_equal_streams(MpegTSContext *mpegts_ctx, - pmt_entry_t* items, int item_cnt) -{ - int limit = mpegts_ctx->pid_cnt < item_cnt ? mpegts_ctx->pid_cnt : item_cnt; - int idx; - - for (idx = 0; idx < limit; idx++) + for (; i < old->nb_pids; i++) { - MpegTSFilter *tss; - /* check for pid */ - int loc = find_in_list(mpegts_ctx->pmt_pids, items[idx].pid); - if (loc < 0) - { - av_log(mpegts_ctx, AV_LOG_TRACE, - "find_in_list(..,[%d].pid=%d) => -1\n", - idx, items[idx].pid); - break; - } - - /* check stream type */ - tss = mpegts_ctx->pids[items[idx].pid]; - if (!tss) + int j = offset; + for (; j < new->nb_pids; j++) { - av_log(mpegts_ctx, AV_LOG_TRACE, - "mpegts_ctx->pids[items[%d].pid=%d] => null\n", - idx, items[idx].pid); - break; - } - if (tss->type == MPEGTS_PES) - { - PESContext *pes = (PESContext*) tss->u.pes_filter.opaque; - if (!pes) - { - av_log(mpegts_ctx, AV_LOG_TRACE, "pes == null, where idx %d\n", idx); - break; - } - if (pes->stream_type != items[idx].type) + if (new->pids[j] == old->pids[i]) { - av_log(mpegts_ctx, AV_LOG_TRACE, - "pes->stream_type != items[%d].type\n", idx); break; } } - else if (tss->type == MPEGTS_SECTION) + if (j == new->nb_pids) { - SectionContext *sect = (SectionContext*) tss->u.section_filter.opaque; - if (!sect) - { - av_log(mpegts_ctx, AV_LOG_TRACE, "sect == null, where idx %d\n", idx); - break; - } - if (sect->stream_type != items[idx].type) - { - av_log(mpegts_ctx, AV_LOG_TRACE, - "sect->stream_type != items[%d].type\n", idx); - break; - } + break; } - else + + if (new->stream_types[j] != old->stream_types[i]) { - av_log(mpegts_ctx, AV_LOG_TRACE, - "tss->type != MPEGTS_PES, where idx %d\n", idx); break; } } - av_log(mpegts_ctx, AV_LOG_TRACE, "pmt_equal_streams:%d old:%d new:%d limit:%d\n", - idx, mpegts_ctx->pid_cnt, item_cnt, limit); - return idx; + return i == new->nb_pids; } /** @@ -2608,20 +2480,6 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { { 0 } }; int i; - // MythTV - int equal_streams = 0; - int last_item = 0; - - pmt_entry_t items[PMT_PIDS_MAX]; - memset(&items, 0, sizeof(pmt_entry_t) * PMT_PIDS_MAX); - - // initialize to codec_type_unknown - for (int i=0; i < PMT_PIDS_MAX; i++) - items[i].codec_type = AVMEDIA_TYPE_UNKNOWN; - - mpegts_cleanup_streams(ts); /* in case someone else removed streams.. */ - // end MythTV - av_log(ts->stream, AV_LOG_TRACE, "PMT: len %i\n", section_len); hex_dump_debug(ts->stream, section, section_len); @@ -2834,7 +2692,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len if (pes && !pes->stream_type) mpegts_set_stream_info(st, pes, stream_type, prog_reg_desc); - add_pid_to_program(prg, pid); + add_pmt_entry_to_program(prg, pid, stream_type); // MythTV if (prg) { prg->streams[i].idx = st->index; prg->streams[i].stream_identifier = stream_identifier; @@ -2864,16 +2722,6 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } } p = desc_list_end; - - // MythTV only - if (is_desired_stream(st->codecpar->codec_type, st->codecpar->codec_id)) { - items[last_item].pid = pid; - items[last_item].type = stream_type; - items[last_item].codec_id = st->codecpar->codec_id; - items[last_item].codec_type = st->codecpar->codec_type; - last_item++; - } - // end MythTV only } // begin MythTV @@ -2882,26 +2730,12 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len av_log(ts->stream, AV_LOG_TRACE, "exporting PMT\n"); export_pmt(ts->stream, section, section_len); - /* if the pmt has changed delete old streams, - * create new ones, and notify any listener. - */ - equal_streams = pmt_equal_streams(ts, items, last_item); - if (equal_streams != last_item || ts->pid_cnt != last_item) + /* if the pmt has changed, notify stream_changed listener */ + if (ts->stream->streams_changed != NULL && prg != NULL && + !is_pmt_equal(prg, &old_program)) { - AVFormatContext *avctx = ts->stream; - - for (int i = 0; i < last_item; i++) - { - ts->pmt_pids[i] = items[i].pid; - } - ts->pid_cnt = last_item; - - /* notify stream_changed listeners */ - if (avctx->streams_changed) - { - av_log(ts->stream, AV_LOG_DEBUG, "streams_changed()\n"); - avctx->streams_changed(avctx->stream_change_data); - } + av_log(ts->stream, AV_LOG_DEBUG, "streams_changed()\n"); + ts->stream->streams_changed(ts->stream->stream_change_data); } // end MythTV From 7632571002895a22336a397bc533902877f053bb Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 2 Aug 2024 16:35:59 -0400 Subject: [PATCH 30/59] AvFormatDecoder: ensure audio streams match the video stream This can be a problem when there is more than one program in one file, e.g. a full TS capture with multiple digital subchannels. The `#if`ed out log in AutoSelectAudioTrack was broken; I replaced it with something that should be similar. --- .../libmythtv/decoders/avformatdecoder.cpp | 77 ++++++++++++++----- .../libs/libmythtv/decoders/avformatdecoder.h | 2 + 2 files changed, 60 insertions(+), 19 deletions(-) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index 23a082960ee..3e6fd6e23e3 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -1877,6 +1877,35 @@ void AvFormatDecoder::ScanDSMCCStreams(void) } } +void AvFormatDecoder::remove_tracks_not_in_same_AVProgram(int stream_index) +{ + AVProgram* program = av_find_program_from_stream(m_ic, nullptr, stream_index); + if (program == nullptr) + { + return; + } + + LOG(VB_PLAYBACK, LOG_INFO, + QString("Removing streams not in Program %1 from track selection.") + .arg(QString::number(program->id))); + + const auto * const begin = program->stream_index; + const auto * const end = program->stream_index + program->nb_stream_indexes; + + for (auto & track_list : m_tracks) + { + LOG(VB_PLAYBACK, LOG_DEBUG, + QString("Size before: %1").arg(QString::number(track_list.size()))); + track_list.erase(std::remove_if(track_list.begin(), track_list.end(), + [&](StreamInfo i) + { + return std::find(begin, end, i.m_av_stream_index) == end; + }), track_list.end()); + LOG(VB_PLAYBACK, LOG_DEBUG, + QString("Size after: %1").arg(QString::number(track_list.size()))); + } +} + int AvFormatDecoder::ScanStreams(bool novideo) { QMutexLocker avlocker(&m_avCodecLock); @@ -1922,11 +1951,20 @@ int AvFormatDecoder::ScanStreams(bool novideo) QString codectype(AVMediaTypeToString(par->codec_type)); if (par->codec_type == AVMEDIA_TYPE_VIDEO) codectype += QString("(%1x%2)").arg(par->width).arg(par->height); + QString program_id = "null"; + if (av_find_program_from_stream(m_ic, nullptr, strm) != nullptr) + { + program_id = QString::number(av_find_program_from_stream(m_ic, nullptr, strm)->id); + } LOG(VB_PLAYBACK, LOG_INFO, LOC + - QString("Stream #%1: ID: 0x%2 Codec ID: %3 Type: %4 Bitrate: %5") - .arg(strm).arg(static_cast(m_ic->streams[strm]->id), 0, 16) - .arg(avcodec_get_name(par->codec_id), - codectype).arg(par->bit_rate)); + QString("Stream #%1: ID: 0x%2 Program ID: %3 Codec ID: %4 Type: %5 Bitrate: %6").arg( + QString::number(strm), + QString::number(static_cast(m_ic->streams[strm]->id), 16), + program_id, + avcodec_get_name(par->codec_id), + codectype, + QString::number(par->bit_rate)) + ); switch (par->codec_type) { @@ -2206,6 +2244,7 @@ int AvFormatDecoder::ScanStreams(bool novideo) m_resetHardwareDecoders = false; if (!novideo) { + int stream_index = -1; for(;;) { const AVCodec *codec = nullptr; @@ -2223,20 +2262,20 @@ int AvFormatDecoder::ScanStreams(bool novideo) * If av_find_best_stream returns successfully and decoder_ret is not nullptr, * then *decoder_ret is guaranteed to be set to a valid AVCodec. */ - int selTrack = av_find_best_stream(m_ic, AVMEDIA_TYPE_VIDEO, + stream_index = av_find_best_stream(m_ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0); - if (selTrack < 0) + if (stream_index < 0) { LOG(VB_PLAYBACK, LOG_INFO, LOC + "No video track found/selected."); break; } - AVStream *stream = m_ic->streams[selTrack]; + AVStream *stream = m_ic->streams[stream_index]; if (m_averrorCount > SEQ_PKT_ERR_MAX) m_codecMap.FreeCodecContext(stream); AVCodecContext *enc = m_codecMap.GetCodecContext(stream, codec); - StreamInfo si(selTrack, 0, 0, 0, 0); + StreamInfo si(stream_index, 0, 0, 0, 0); m_tracks[kTrackTypeVideo].push_back(si); m_selectedTrack[kTrackTypeVideo] = si; @@ -2246,7 +2285,7 @@ int AvFormatDecoder::ScanStreams(bool novideo) codectype += QString("(%1x%2)").arg(enc->width).arg(enc->height); LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Selected track #%1: ID: 0x%2 Codec ID: %3 Profile: %4 Type: %5 Bitrate: %6") - .arg(selTrack).arg(static_cast(stream->id), 0, 16) + .arg(stream_index).arg(static_cast(stream->id), 0, 16) .arg(avcodec_get_name(enc->codec_id), avcodec_profile_name(enc->codec_id, enc->profile), codectype, @@ -2385,7 +2424,7 @@ int AvFormatDecoder::ScanStreams(bool novideo) InitVideoCodec(stream, enc, true); - ScanATSCCaptionStreams(selTrack); + ScanATSCCaptionStreams(stream_index); UpdateATSCCaptionTracks(); LOG(VB_GENERAL, LOG_INFO, LOC + QString("Using %1 for video decoding").arg(GetCodecDecoderName())); @@ -2397,6 +2436,8 @@ int AvFormatDecoder::ScanStreams(bool novideo) } break; } + + remove_tracks_not_in_same_AVProgram(stream_index); } m_bitrate = std::max(static_cast(m_ic->bit_rate), m_bitrate); @@ -4316,18 +4357,16 @@ int AvFormatDecoder::AutoSelectAudioTrack(void) if ((ctrack >= 0) && (ctrack < (int)numStreams)) return ctrack; // audio already selected -#if 0 - // enable this to print streams + LOG(VB_AUDIO, LOG_DEBUG, QString("%1 available audio streams").arg(numStreams)); for (const auto & track : atracks) { - int idx = track.m_av_stream_index; - AVCodecContext *codec_ctx = m_ic->streams[idx]->codec; - AudioInfo item(codec_ctx->codec_id, codec_ctx->bps, - codec_ctx->sample_rate, codec_ctx->channels, - DoPassThrough(codec_ctx, true)); - LOG(VB_AUDIO, LOG_DEBUG, LOC + " * " + item.toString()); + AVCodecParameters *codecpar = m_ic->streams[track.m_av_stream_index]->codecpar; + LOG(VB_AUDIO, LOG_DEBUG, QString("%1: %2 bps, %3 Hz, %4 channels, passthrough(%5)") + .arg(avcodec_get_name(codecpar->codec_id), QString::number(codecpar->bit_rate), + QString::number(codecpar->sample_rate), QString::number(codecpar->ch_layout.nb_channels), + (DoPassThrough(codecpar, true)) ? "true" : "false") + ); } -#endif int selTrack = (1 == numStreams) ? 0 : -1; int wlang = wtrack.m_language; diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index 777764019b4..7f550ca24c2 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -250,6 +250,8 @@ class AvFormatDecoder : public DecoderBase bool FlagIsSet(PlayerFlags arg) { return m_playerFlags & arg; } + void remove_tracks_not_in_same_AVProgram(int stream_index); + bool m_isDbIgnored; AVCParser *m_avcParser {nullptr}; From 77aa9271cff31c20179a9d0f402e7ab18c98870e Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 2 Aug 2024 17:18:43 -0400 Subject: [PATCH 31/59] create AvFormatDecoder::autoSelectVideoTrack from ScanStreams() This is clearer than the infinite loop with breaks (effectively gotos). --- .../libmythtv/decoders/avformatdecoder.cpp | 384 +++++++++--------- .../libs/libmythtv/decoders/avformatdecoder.h | 1 + 2 files changed, 192 insertions(+), 193 deletions(-) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index 3e6fd6e23e3..08263861ced 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -1877,6 +1877,196 @@ void AvFormatDecoder::ScanDSMCCStreams(void) } } +int AvFormatDecoder::autoSelectVideoTrack(int& scanerror) +{ + const AVCodec *codec = nullptr; + LOG(VB_PLAYBACK, LOG_INFO, LOC + "Trying to select best video track"); + + /* + * Find the "best" stream in the file. + * + * The best stream is determined according to various heuristics as + * the most likely to be what the user expects. If the decoder parameter + * is not nullptr, av_find_best_stream will find the default decoder + * for the stream's codec; streams for which no decoder can be found + * are ignored. + * + * If av_find_best_stream returns successfully and decoder_ret is not nullptr, + * then *decoder_ret is guaranteed to be set to a valid AVCodec. + */ + int stream_index = av_find_best_stream(m_ic, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0); + + if (stream_index < 0) + { + LOG(VB_PLAYBACK, LOG_INFO, LOC + "No video track found/selected."); + return stream_index; + } + + AVStream *stream = m_ic->streams[stream_index]; + if (m_averrorCount > SEQ_PKT_ERR_MAX) + m_codecMap.FreeCodecContext(stream); + AVCodecContext *enc = m_codecMap.GetCodecContext(stream, codec); + StreamInfo si(stream_index, 0, 0, 0, 0); + + m_tracks[kTrackTypeVideo].push_back(si); + m_selectedTrack[kTrackTypeVideo] = si; + + QString codectype(AVMediaTypeToString(enc->codec_type)); + if (enc->codec_type == AVMEDIA_TYPE_VIDEO) + codectype += QString("(%1x%2)").arg(enc->width).arg(enc->height); + LOG(VB_PLAYBACK, LOG_INFO, LOC + + QString("Selected track #%1: ID: 0x%2 Codec ID: %3 Profile: %4 Type: %5 Bitrate: %6") + .arg(stream_index).arg(static_cast(stream->id), 0, 16) + .arg(avcodec_get_name(enc->codec_id), + avcodec_profile_name(enc->codec_id, enc->profile), + codectype, + QString::number(enc->bit_rate))); + + // If ScanStreams has been called on a stream change triggered by a + // decoder error - because the decoder does not handle resolution + // changes gracefully (NVDEC and maybe MediaCodec) - then the stream/codec + // will still contain the old resolution but the AVCodecContext will + // have been updated. This causes mayhem for a second or two. + if ((enc->width != stream->codecpar->width) || (enc->height != stream->codecpar->height)) + { + LOG(VB_GENERAL, LOG_INFO, LOC + QString( + "Video resolution mismatch: Context: %1x%2 Stream: %3x%4 Codec: %5 Stream change: %6") + .arg(enc->width).arg(enc->height) + .arg(stream->codecpar->width).arg(stream->codecpar->height) + .arg(get_decoder_name(m_videoCodecId)).arg(m_streamsChanged)); + } + + m_avcParser->Reset(); + + QSize dim = get_video_dim(*enc); + int width = std::max(dim.width(), 16); + int height = std::max(dim.height(), 16); + QString dec = "ffmpeg"; + uint thread_count = 1; + QString codecName; + if (enc->codec) + codecName = enc->codec->name; + // framerate appears to never be set - which is probably why + // GetVideoFrameRate never uses it:) + // So fallback to the GetVideoFrameRate call which should then ensure + // the video display profile gets an accurate frame rate - instead of 0 + if (enc->framerate.den && enc->framerate.num) + m_fps = float(enc->framerate.num) / float(enc->framerate.den); + else + m_fps = GetVideoFrameRate(stream, enc, true); + + bool foundgpudecoder = false; + QStringList unavailabledecoders; + bool allowgpu = FlagIsSet(kDecodeAllowGPU); + + if (m_averrorCount > SEQ_PKT_ERR_MAX) + { + // TODO this could be improved by appending the decoder that has + // failed to the unavailable list - but that could lead to circular + // failures if there are 2 or more hardware decoders that fail + if (FlagIsSet(kDecodeAllowGPU) && (dec != "ffmpeg")) + { + LOG(VB_GENERAL, LOG_WARNING, LOC + QString( + "GPU/hardware decoder '%1' failed - forcing software decode") + .arg(dec)); + } + m_averrorCount = 0; + allowgpu = false; + } + + while (unavailabledecoders.size() < 10) + { + if (!m_isDbIgnored) + { + if (!unavailabledecoders.isEmpty()) + { + LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Unavailable decoders: %1") + .arg(unavailabledecoders.join(","))); + } + m_videoDisplayProfile.SetInput(QSize(width, height), m_fps, codecName, unavailabledecoders); + dec = m_videoDisplayProfile.GetDecoder(); + thread_count = m_videoDisplayProfile.GetMaxCPUs(); + bool skip_loop_filter = m_videoDisplayProfile.IsSkipLoopEnabled(); + if (!skip_loop_filter) + enc->skip_loop_filter = AVDISCARD_NONKEY; + } + + m_videoCodecId = kCodec_NONE; + uint version = mpeg_version(enc->codec_id); + if (version) + m_videoCodecId = static_cast(kCodec_MPEG1 + version - 1); + + if (version && allowgpu && dec != "ffmpeg") + { + // We need to set this so that MythyCodecContext can callback + // to the player in use to check interop support. + enc->opaque = static_cast(this); + MythCodecID hwcodec = MythCodecContext::FindDecoder(dec, stream, &enc, &codec); + if (hwcodec != kCodec_NONE) + { + // the context may have changed + enc->opaque = static_cast(this); + m_videoCodecId = hwcodec; + foundgpudecoder = true; + } + else + { + // hardware decoder is not available - try the next best profile + unavailabledecoders.append(dec); + continue; + } + } + + // default to mpeg2 + if (m_videoCodecId == kCodec_NONE) + { + LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown video codec - defaulting to MPEG2"); + m_videoCodecId = kCodec_MPEG2; + } + + break; + } + + // N.B. MediaCodec and NVDEC require frame timing + m_useFrameTiming = false; + if ((m_ringBuffer && !m_ringBuffer->IsDVD() && (codec_sw_copy(m_videoCodecId) || codec_is_v4l2(m_videoCodecId))) || + (codec_is_nvdec(m_videoCodecId) || codec_is_mediacodec(m_videoCodecId) || codec_is_mediacodec_dec(m_videoCodecId))) + { + m_useFrameTiming = true; + } + + if (FlagIsSet(kDecodeSingleThreaded)) + thread_count = 1; + + if (HAVE_THREADS) + { + // Only use a single thread for hardware decoding. There is no + // performance improvement with multithreaded hardware decode + // and asynchronous callbacks create issues with decoders that + // use AVHWFrameContext where we need to release video resources + // before they are recreated + if (!foundgpudecoder) + { + LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Using %1 CPUs for decoding") + .arg(HAVE_THREADS ? thread_count : 1)); + enc->thread_count = static_cast(thread_count); + } + } + + InitVideoCodec(stream, enc, true); + + ScanATSCCaptionStreams(stream_index); + UpdateATSCCaptionTracks(); + + LOG(VB_GENERAL, LOG_INFO, LOC + QString("Using %1 for video decoding").arg(GetCodecDecoderName())); + m_mythCodecCtx->SetDecoderOptions(enc, codec); + if (!OpenAVCodec(enc, codec)) + { + scanerror = -1; + } + return stream_index; +} + void AvFormatDecoder::remove_tracks_not_in_same_AVProgram(int stream_index) { AVProgram* program = av_find_program_from_stream(m_ic, nullptr, stream_index); @@ -2244,199 +2434,7 @@ int AvFormatDecoder::ScanStreams(bool novideo) m_resetHardwareDecoders = false; if (!novideo) { - int stream_index = -1; - for(;;) - { - const AVCodec *codec = nullptr; - LOG(VB_PLAYBACK, LOG_INFO, LOC + "Trying to select best video track"); - - /* - * Find the "best" stream in the file. - * - * The best stream is determined according to various heuristics as - * the most likely to be what the user expects. If the decoder parameter - * is not nullptr, av_find_best_stream will find the default decoder - * for the stream's codec; streams for which no decoder can be found - * are ignored. - * - * If av_find_best_stream returns successfully and decoder_ret is not nullptr, - * then *decoder_ret is guaranteed to be set to a valid AVCodec. - */ - stream_index = av_find_best_stream(m_ic, AVMEDIA_TYPE_VIDEO, - -1, -1, &codec, 0); - - if (stream_index < 0) - { - LOG(VB_PLAYBACK, LOG_INFO, LOC + "No video track found/selected."); - break; - } - - AVStream *stream = m_ic->streams[stream_index]; - if (m_averrorCount > SEQ_PKT_ERR_MAX) - m_codecMap.FreeCodecContext(stream); - AVCodecContext *enc = m_codecMap.GetCodecContext(stream, codec); - StreamInfo si(stream_index, 0, 0, 0, 0); - - m_tracks[kTrackTypeVideo].push_back(si); - m_selectedTrack[kTrackTypeVideo] = si; - - QString codectype(AVMediaTypeToString(enc->codec_type)); - if (enc->codec_type == AVMEDIA_TYPE_VIDEO) - codectype += QString("(%1x%2)").arg(enc->width).arg(enc->height); - LOG(VB_PLAYBACK, LOG_INFO, LOC + - QString("Selected track #%1: ID: 0x%2 Codec ID: %3 Profile: %4 Type: %5 Bitrate: %6") - .arg(stream_index).arg(static_cast(stream->id), 0, 16) - .arg(avcodec_get_name(enc->codec_id), - avcodec_profile_name(enc->codec_id, enc->profile), - codectype, - QString::number(enc->bit_rate))); - - // If ScanStreams has been called on a stream change triggered by a - // decoder error - because the decoder does not handle resolution - // changes gracefully (NVDEC and maybe MediaCodec) - then the stream/codec - // will still contain the old resolution but the AVCodecContext will - // have been updated. This causes mayhem for a second or two. - if ((enc->width != stream->codecpar->width) || (enc->height != stream->codecpar->height)) - { - LOG(VB_GENERAL, LOG_INFO, LOC + QString( - "Video resolution mismatch: Context: %1x%2 Stream: %3x%4 Codec: %5 Stream change: %6") - .arg(enc->width).arg(enc->height) - .arg(stream->codecpar->width).arg(stream->codecpar->height) - .arg(get_decoder_name(m_videoCodecId)).arg(m_streamsChanged)); - } - - m_avcParser->Reset(); - - QSize dim = get_video_dim(*enc); - int width = std::max(dim.width(), 16); - int height = std::max(dim.height(), 16); - QString dec = "ffmpeg"; - uint thread_count = 1; - QString codecName; - if (enc->codec) - codecName = enc->codec->name; - // framerate appears to never be set - which is probably why - // GetVideoFrameRate never uses it:) - // So fallback to the GetVideoFrameRate call which should then ensure - // the video display profile gets an accurate frame rate - instead of 0 - if (enc->framerate.den && enc->framerate.num) - m_fps = float(enc->framerate.num) / float(enc->framerate.den); - else - m_fps = GetVideoFrameRate(stream, enc, true); - - bool foundgpudecoder = false; - QStringList unavailabledecoders; - bool allowgpu = FlagIsSet(kDecodeAllowGPU); - - if (m_averrorCount > SEQ_PKT_ERR_MAX) - { - // TODO this could be improved by appending the decoder that has - // failed to the unavailable list - but that could lead to circular - // failures if there are 2 or more hardware decoders that fail - if (FlagIsSet(kDecodeAllowGPU) && (dec != "ffmpeg")) - { - LOG(VB_GENERAL, LOG_WARNING, LOC + QString( - "GPU/hardware decoder '%1' failed - forcing software decode") - .arg(dec)); - } - m_averrorCount = 0; - allowgpu = false; - } - - while (unavailabledecoders.size() < 10) - { - if (!m_isDbIgnored) - { - if (!unavailabledecoders.isEmpty()) - { - LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Unavailable decoders: %1") - .arg(unavailabledecoders.join(","))); - } - m_videoDisplayProfile.SetInput(QSize(width, height), m_fps, codecName, unavailabledecoders); - dec = m_videoDisplayProfile.GetDecoder(); - thread_count = m_videoDisplayProfile.GetMaxCPUs(); - bool skip_loop_filter = m_videoDisplayProfile.IsSkipLoopEnabled(); - if (!skip_loop_filter) - enc->skip_loop_filter = AVDISCARD_NONKEY; - } - - m_videoCodecId = kCodec_NONE; - uint version = mpeg_version(enc->codec_id); - if (version) - m_videoCodecId = static_cast(kCodec_MPEG1 + version - 1); - - if (version && allowgpu && dec != "ffmpeg") - { - // We need to set this so that MythyCodecContext can callback - // to the player in use to check interop support. - enc->opaque = static_cast(this); - MythCodecID hwcodec = MythCodecContext::FindDecoder(dec, stream, &enc, &codec); - if (hwcodec != kCodec_NONE) - { - // the context may have changed - enc->opaque = static_cast(this); - m_videoCodecId = hwcodec; - foundgpudecoder = true; - } - else - { - // hardware decoder is not available - try the next best profile - unavailabledecoders.append(dec); - continue; - } - } - - // default to mpeg2 - if (m_videoCodecId == kCodec_NONE) - { - LOG(VB_GENERAL, LOG_ERR, LOC + "Unknown video codec - defaulting to MPEG2"); - m_videoCodecId = kCodec_MPEG2; - } - - break; - } - - // N.B. MediaCodec and NVDEC require frame timing - m_useFrameTiming = false; - if ((m_ringBuffer && !m_ringBuffer->IsDVD() && (codec_sw_copy(m_videoCodecId) || codec_is_v4l2(m_videoCodecId))) || - (codec_is_nvdec(m_videoCodecId) || codec_is_mediacodec(m_videoCodecId) || codec_is_mediacodec_dec(m_videoCodecId))) - { - m_useFrameTiming = true; - } - - if (FlagIsSet(kDecodeSingleThreaded)) - thread_count = 1; - - if (HAVE_THREADS) - { - // Only use a single thread for hardware decoding. There is no - // performance improvement with multithreaded hardware decode - // and asynchronous callbacks create issues with decoders that - // use AVHWFrameContext where we need to release video resources - // before they are recreated - if (!foundgpudecoder) - { - LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("Using %1 CPUs for decoding") - .arg(HAVE_THREADS ? thread_count : 1)); - enc->thread_count = static_cast(thread_count); - } - } - - InitVideoCodec(stream, enc, true); - - ScanATSCCaptionStreams(stream_index); - UpdateATSCCaptionTracks(); - - LOG(VB_GENERAL, LOG_INFO, LOC + QString("Using %1 for video decoding").arg(GetCodecDecoderName())); - m_mythCodecCtx->SetDecoderOptions(enc, codec); - if (!OpenAVCodec(enc, codec)) - { - scanerror = -1; - break; - } - break; - } - + int stream_index = autoSelectVideoTrack(scanerror); remove_tracks_not_in_same_AVProgram(stream_index); } diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index 7f550ca24c2..f66ccd815e5 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -250,6 +250,7 @@ class AvFormatDecoder : public DecoderBase bool FlagIsSet(PlayerFlags arg) { return m_playerFlags & arg; } + int autoSelectVideoTrack(int& scanerror); void remove_tracks_not_in_same_AVProgram(int stream_index); bool m_isDbIgnored; From fc482bb6b200bddbbb646cf0e0a7b8762bf1bc59 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 9 Aug 2024 15:57:13 -0400 Subject: [PATCH 32/59] move pmt_section to AVProgram This is a MythTV addition that exports the PMT from an MPEG-TS. However, each program has its own PMT so having a single pmt_section in AVFormatContext is not correct when there are multiple programs in the stream. Previously, each PMT overwrote the last one. Adapt AvFormatDecoder to look in AVProgram. In my limited testing, the PMT did not seem necessary for ATSC captions. MythAVBufferRef: Satisfy the rule of five; however, since nullptr is now allowed, the newly defined constructors and operators are unused. The compiler generated ones were causing use after free segmentation faults. --- mythtv/external/FFmpeg/libavformat/avformat.h | 12 +-- .../FFmpeg/libavformat/mpegts-mythtv.c | 28 ++++-- .../libmythtv/decoders/avformatdecoder.cpp | 88 ++++++++++++++----- .../libs/libmythtv/decoders/avformatdecoder.h | 7 +- mythtv/libs/libmythtv/mythavutil.h | 52 ++++++++--- 5 files changed, 138 insertions(+), 49 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/avformat.h b/mythtv/external/FFmpeg/libavformat/avformat.h index 647a5906c28..610d947816e 100644 --- a/mythtv/external/FFmpeg/libavformat/avformat.h +++ b/mythtv/external/FFmpeg/libavformat/avformat.h @@ -1155,6 +1155,12 @@ typedef struct AVProgram { int pcr_pid; int pmt_version; + /** + * A reference-counted buffer holding the last seen PMT in an MPEG-TS. + * Only set by mpegts-mythtv. + */ + AVBufferRef *pmt_section; + /***************************************************************** * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and @@ -1336,12 +1342,6 @@ typedef struct AVFormatContext { /* mpeg-ts support */ void (*streams_changed)(void*); void *stream_change_data; - - /** - * A reference-counted buffer holding the last seen PMT in an MPEG-TS. - * Only set by mpegts-mythtv. - */ - AVBufferRef *pmt_section; /* End Myth addons */ /** diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 3ae662bccfc..aafc0abb6c1 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -2439,13 +2439,28 @@ static int is_pmt_equal(const struct Program *new, const struct Program *old) @brief Copy PMT to AVFormatContext for use by MythTV. @param ctx MpegTSContext.stream, assumed to be non-NULL +@param program_number AVProgram.id of program to update @param section Buffer to be duplicated @param section_len Size in bytes of the buffer copied */ -static void export_pmt(AVFormatContext *ctx, const uint8_t *section, int section_len) +static void export_pmt(AVFormatContext *ctx, int program_number, const uint8_t *section, int section_len) { - AVBufferRef *buf; - uint8_t* tmp = av_memdup(section, section_len); + AVProgram* program = NULL; + uint8_t* tmp = NULL; + AVBufferRef *buf = NULL; + + for (unsigned i = 0; i < ctx->nb_programs; i++) + { + if (ctx->programs[i]->id == program_number) + { + program = ctx->programs[i]; + break; + } + } + if (program == NULL) + return; + + tmp = av_memdup(section, section_len); if (!tmp) return; // AVERROR(ENOMEM) @@ -2455,7 +2470,7 @@ static void export_pmt(AVFormatContext *ctx, const uint8_t *section, int section av_freep(&tmp); return; // AVERROR(ENOMEM) } - av_buffer_replace(&ctx->pmt_section, buf); + av_buffer_replace(&(program->pmt_section), buf); av_buffer_unref(&buf); } @@ -2728,7 +2743,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len /* cache pmt */ av_log(ts->stream, AV_LOG_TRACE, "exporting PMT\n"); - export_pmt(ts->stream, section, section_len); + export_pmt(ts->stream, h->id, section, section_len); /* if the pmt has changed, notify stream_changed listener */ if (ts->stream->streams_changed != NULL && prg != NULL && @@ -3565,7 +3580,8 @@ static void mpegts_free(MpegTSContext *ts) if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]); - av_buffer_unref(&ts->stream->pmt_section); // MythTV + for (i = 0; i < ts->stream->nb_programs; i++) + av_buffer_unref(&(ts->stream->programs[i]->pmt_section)); // MythTV } static int mpegts_read_close(AVFormatContext *s) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index 08263861ced..a79bee70c30 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -1573,6 +1573,21 @@ static bool cc608_good_parity(uint16_t data) return ret; } +static AVBufferRef* get_pmt_section_from_AVProgram(const AVProgram *program) +{ + if (program == nullptr) + { + return nullptr; + } + return program->pmt_section; +} + +static AVBufferRef* get_pmt_section_for_AVStream_index(AVFormatContext *context, int stream_index) +{ + AVProgram* program = av_find_program_from_stream(context, nullptr, stream_index); + return get_pmt_section_from_AVProgram(program); +} + void AvFormatDecoder::ScanATSCCaptionStreams(int av_index) { QMutexLocker locker(&m_trackLock); @@ -1582,18 +1597,13 @@ void AvFormatDecoder::ScanATSCCaptionStreams(int av_index) m_pmtTrackTypes.clear(); // Figure out languages of ATSC captions - if (!m_ic->pmt_section) + MythAVBufferRef pmt_buffer {get_pmt_section_for_AVStream_index(m_ic, av_index)}; + if (!pmt_buffer.has_buffer()) { LOG(VB_GENERAL, LOG_DEBUG, LOC + "ScanATSCCaptionStreams() called with no PMT"); return; } - - auto pmt_buffer = MythAVBufferRef(m_ic->pmt_section); - if (!pmt_buffer.has_buffer()) - { - return; - } const ProgramMapTable pmt(PSIPTable(pmt_buffer.data())); bool video_found = false; @@ -1729,10 +1739,10 @@ void AvFormatDecoder::ScanTeletextCaptions(int av_index) QMutexLocker locker(&m_trackLock); // ScanStreams() calls m_tracks[kTrackTypeTeletextCaptions].clear() - if (!m_ic->pmt_section || !m_tracks[kTrackTypeTeletextCaptions].empty()) + if (!m_tracks[kTrackTypeTeletextCaptions].empty()) return; - auto pmt_buffer = MythAVBufferRef(m_ic->pmt_section); + MythAVBufferRef pmt_buffer {get_pmt_section_for_AVStream_index(m_ic, av_index)}; if (!pmt_buffer.has_buffer()) { return; @@ -1805,21 +1815,18 @@ void AvFormatDecoder::ScanRawTextCaptions(int av_stream_index) m_tracks[kTrackTypeRawText].push_back(si); } -/** \fn AvFormatDecoder::ScanDSMCCStreams(void) +/** \fn AvFormatDecoder::ScanDSMCCStreams(AVBufferRef* pmt_section) * \brief Check to see whether there is a Network Boot Ifo sub-descriptor in the PMT which * requires the MHEG application to reboot. */ -void AvFormatDecoder::ScanDSMCCStreams(void) +void AvFormatDecoder::ScanDSMCCStreams(AVBufferRef* pmt_section) { - if (!m_ic || !m_ic->pmt_section) - return; - if (m_itv == nullptr) m_itv = m_parent->GetInteractiveTV(); if (m_itv == nullptr) return; - auto pmt_buffer = MythAVBufferRef(m_ic->pmt_section); + MythAVBufferRef pmt_buffer {pmt_section}; if (!pmt_buffer.has_buffer()) { return; @@ -2481,7 +2488,21 @@ int AvFormatDecoder::ScanStreams(bool novideo) if (m_parent->IsErrored()) scanerror = -1; - ScanDSMCCStreams(); + if (!novideo && m_selectedTrack[kTrackTypeVideo].m_av_stream_index != -1) + { + ScanDSMCCStreams( + get_pmt_section_for_AVStream_index(m_ic, m_selectedTrack[kTrackTypeVideo].m_av_stream_index)); + } + else + { + /* We don't yet know which AVProgram we want, so iterate through them + all. This should be no more incorrect than using the last PMT when + there are multiple programs. */ + for (unsigned i = 0; i < m_ic->nb_programs; i++) + { + ScanDSMCCStreams(m_ic->programs[i]->pmt_section); + } + } return scanerror; } @@ -4819,7 +4840,7 @@ bool AvFormatDecoder::GetFrame(DecodeType decodetype, bool &Retry) return false; } - m_hasVideo = HasVideo(m_ic); + m_hasVideo = HasVideo(); m_needDummyVideoFrames = false; if (!m_hasVideo && (decodetype & kDecodeVideo)) @@ -5109,15 +5130,11 @@ int AvFormatDecoder::ReadPacket(AVFormatContext *ctx, AVPacket *pkt, bool &/*sto return result; } -bool AvFormatDecoder::HasVideo(const AVFormatContext *ic) +bool AvFormatDecoder::HasVideo() { - if (ic && ic->pmt_section) + MythAVBufferRef pmt_buffer {get_pmt_section_from_AVProgram(get_current_AVProgram())}; + if (pmt_buffer.has_buffer()) { - auto pmt_buffer = MythAVBufferRef(m_ic->pmt_section); - if (!pmt_buffer.has_buffer()) - { - return GetTrackCount(kTrackTypeVideo) != 0U;; - } const ProgramMapTable pmt(PSIPTable(pmt_buffer.data())); for (uint i = 0; i < pmt.StreamCount(); i++) @@ -5453,4 +5470,27 @@ void AvFormatDecoder::av_update_stream_timings_video(AVFormatContext *ic) } } +int AvFormatDecoder::get_current_AVStream_index(TrackType type) +{ + if (m_currentTrack[type] < 0 || static_cast(m_currentTrack[type]) >= m_tracks[type].size()) + { + return -1; + } + return m_tracks[type][m_currentTrack[type]].m_av_stream_index; +} + +AVProgram* AvFormatDecoder::get_current_AVProgram() +{ + if (m_ic == nullptr) + { + return nullptr; + } + AVProgram* program = av_find_program_from_stream(m_ic, nullptr, get_current_AVStream_index(kTrackTypeAudio)); + if (program == nullptr) + { + program = av_find_program_from_stream(m_ic, nullptr, get_current_AVStream_index(kTrackTypeVideo)); + } + return program; +} + /* vim: set expandtab tabstop=4 shiftwidth=4: */ diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index f66ccd815e5..69092459b4e 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -185,7 +185,7 @@ class AvFormatDecoder : public DecoderBase void UpdateCaptionTracksFromStreams(bool check_608, bool check_708); void ScanTeletextCaptions(int av_index); void ScanRawTextCaptions(int av_stream_index); - void ScanDSMCCStreams(void); + void ScanDSMCCStreams(AVBufferRef* pmt_section); int AutoSelectAudioTrack(void); int filter_max_ch(const AVFormatContext *ic, const sinfo_vec_t &tracks, @@ -231,7 +231,7 @@ class AvFormatDecoder : public DecoderBase void HandleGopStart(AVPacket *pkt, bool can_reliably_parse_keyframes); bool GenerateDummyVideoFrames(void); - bool HasVideo(const AVFormatContext *ic); + bool HasVideo(); float GetVideoFrameRate(AVStream *Stream, AVCodecContext *Context, bool Sanitise = false); static void av_update_stream_timings_video(AVFormatContext *ic); bool OpenAVCodec(AVCodecContext *avctx, const AVCodec *codec); @@ -253,6 +253,9 @@ class AvFormatDecoder : public DecoderBase int autoSelectVideoTrack(int& scanerror); void remove_tracks_not_in_same_AVProgram(int stream_index); + int get_current_AVStream_index(TrackType type); + AVProgram* get_current_AVProgram(); + bool m_isDbIgnored; AVCParser *m_avcParser {nullptr}; diff --git a/mythtv/libs/libmythtv/mythavutil.h b/mythtv/libs/libmythtv/mythavutil.h index dec94459023..de26fb8ea8a 100644 --- a/mythtv/libs/libmythtv/mythavutil.h +++ b/mythtv/libs/libmythtv/mythavutil.h @@ -1,6 +1,8 @@ #ifndef MYTHAVUTIL_H #define MYTHAVUTIL_H +#include + // Qt #include #include @@ -113,21 +115,34 @@ You must verify that the instance has_buffer() before calling any other function class MTV_PUBLIC MythAVBufferRef { public: /** - @param buf The AVBufferRef* to reference, must be non-NULL. + @param buf The AVBufferRef* to reference, may be NULL. */ - explicit MythAVBufferRef(AVBufferRef* buf) : m_buffer(av_buffer_ref(buf)) + explicit MythAVBufferRef(const AVBufferRef* buf = nullptr) : m_buffer(ref(buf)) {} + ~MythAVBufferRef() { unref(); } + + // Copy constructor + MythAVBufferRef(const MythAVBufferRef& other) : MythAVBufferRef(other.m_buffer) {} + // Move constructor + MythAVBufferRef(MythAVBufferRef&& other) noexcept : MythAVBufferRef() { swap(*this, other); } + // Copy assignment operator + MythAVBufferRef& operator=(MythAVBufferRef other) { - if (!m_buffer) - { - LOG(VB_GENERAL, LOG_ERR, "av_buffer_ref() failed to allocate memory."); - } + swap(*this, other); + return *this; } - ~MythAVBufferRef() + // Move assignment operator + MythAVBufferRef& operator=(MythAVBufferRef&& other) noexcept { - if (has_buffer()) - { - av_buffer_unref(&m_buffer); - } + // release resources held by this, but prevent suicide on self-assignment + MythAVBufferRef tmp {std::move(other)}; + swap(*this, tmp); + return *this; + } + + friend void swap(MythAVBufferRef& a, MythAVBufferRef& b) noexcept + { + using std::swap; + swap(a.m_buffer, b.m_buffer); } bool has_buffer() { return m_buffer != nullptr; } @@ -135,6 +150,21 @@ class MTV_PUBLIC MythAVBufferRef { const uint8_t* data() { return m_buffer->data; } size_t size() { return m_buffer->size; } private: + static AVBufferRef* ref(const AVBufferRef* buf) + { + if (buf == nullptr) + { + return nullptr; + } + AVBufferRef* reference = av_buffer_ref(buf); + if (reference == nullptr) + { + LOG(VB_GENERAL, LOG_ERR, "av_buffer_ref() failed to allocate memory."); + } + return reference; + } + void unref() { av_buffer_unref(&m_buffer); } + AVBufferRef* m_buffer {nullptr}; }; From 25d5f20c2a5a721bee0e5129b72c001808b3645b Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Fri, 9 Aug 2024 22:32:49 -0400 Subject: [PATCH 33/59] add avprogram_id to streams_changed() callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an int to match type with AVProgram. In mpegts.c, SectionHeader::id is a uint16_t as ISO/IEC 13818-1:2021 specifies for program_number. This allows us to ignore stream changes in programs that are not being watched when there is more than one program. Regarding the changes to mpeg.c: Originally from: dvb/ac3 patches 1, 2, and 3 from Mark Anderson https://github.com/MythTV/mythtv/commit/87795f6fac140c7cb3177ff2e47319d270823c36 changed in: Refs #8134. internal dvd player. resolve problem where pcm_s16be audi… https://github.com/MythTV/mythtv/commit/e64371a560ec0de105ae0bc3804c98fec7083ebe change reverted in: Refs #8134. revert most of [24239]. Anduin withers reported it makes … https://github.com/MythTV/mythtv/commit/a3d6e14db858b9270347254e57991f01c5e49e46 referencing: #8134 (internal dvd player: pcm_s16be improperly detected as pcm_dvd audio codec.) – MythTV https://code.mythtv.org/trac/ticket/8134 An MPEG Program Stream can only have one program, so FFmpeg does not create an AVProgram for it. Thus av_find_program_from_stream() (and therefore get_current_AVProgram()) will always return nullptr, so avprogram_id will be ignored. The calling conventions of functions with "C" and "C++" language linkage are not necessarily the same; however, in practice they are, so AvFormatDecoder::streams_changed() could be used directly. Doing it correctly still eliminates the use of a friend function and its double declaration at only the cost of an extra function call, which doesn't matter since streams_changed() is only called very rarely. --- mythtv/external/FFmpeg/libavformat/avformat.h | 2 +- mythtv/external/FFmpeg/libavformat/mpeg.c | 2 +- .../FFmpeg/libavformat/mpegts-mythtv.c | 2 +- .../libmythtv/decoders/avformatdecoder.cpp | 19 ++++++++++++++++--- .../libs/libmythtv/decoders/avformatdecoder.h | 6 ++---- 5 files changed, 21 insertions(+), 10 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/avformat.h b/mythtv/external/FFmpeg/libavformat/avformat.h index 610d947816e..03eae2ab28b 100644 --- a/mythtv/external/FFmpeg/libavformat/avformat.h +++ b/mythtv/external/FFmpeg/libavformat/avformat.h @@ -1340,7 +1340,7 @@ typedef struct AVFormatContext { /* Myth addons */ /* mpeg-ts support */ - void (*streams_changed)(void*); + void (*streams_changed)(void* stream_change_data, int avprogram_id); void *stream_change_data; /* End Myth addons */ diff --git a/mythtv/external/FFmpeg/libavformat/mpeg.c b/mythtv/external/FFmpeg/libavformat/mpeg.c index 46b1343ed9f..47219c3447b 100644 --- a/mythtv/external/FFmpeg/libavformat/mpeg.c +++ b/mythtv/external/FFmpeg/libavformat/mpeg.c @@ -638,7 +638,7 @@ static int mpegps_read_packet(AVFormatContext *s, /* notify the callback of the change in streams */ if (s->streams_changed) { - s->streams_changed(s->stream_change_data); + s->streams_changed(s->stream_change_data, -1); } found: diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index aafc0abb6c1..e7f5ad6eff4 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -2750,7 +2750,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len !is_pmt_equal(prg, &old_program)) { av_log(ts->stream, AV_LOG_DEBUG, "streams_changed()\n"); - ts->stream->streams_changed(ts->stream->stream_change_data); + ts->stream->streams_changed(ts->stream->stream_change_data, h->id); } // end MythTV diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index a79bee70c30..eb03340f848 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -862,19 +862,32 @@ bool AvFormatDecoder::CanHandle(TestBufferVec & testbuf, const QString &filename return av_probe_input_format2(&probe, static_cast(true), &score) != nullptr; } -extern "C" void HandleStreamChange(void *data) +void AvFormatDecoder::streams_changed(void *data, int avprogram_id) { auto *decoder = reinterpret_cast(data); int cnt = decoder->m_ic->nb_streams; LOG(VB_PLAYBACK, LOG_INFO, LOC + - QString("streams_changed 0x%1 -- stream count %2") - .arg((uint64_t)data,0,16).arg(cnt)); + QString("streams_changed 0x%1 -- program_number %2 stream count %3") + .arg((uint64_t)data,0,16).arg(QString::number(avprogram_id), QString::number(cnt))); + auto* program = decoder->get_current_AVProgram(); + if (program != nullptr && program->id != avprogram_id) + { + return; + } decoder->m_streamsChanged = true; } +extern "C" +{ + static void HandleStreamChange(void *data, int avprogram_id) + { + AvFormatDecoder::streams_changed(data, avprogram_id); + } +} + int AvFormatDecoder::FindStreamInfo(void) { m_avCodecLock.lock(); diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index 69092459b4e..c6b7e7e6733 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -36,8 +36,6 @@ class MythSqlDatabase; struct SwsContext; -extern "C" void HandleStreamChange(void *data); - class AudioInfo { public: @@ -81,8 +79,6 @@ class AudioInfo /// A decoder for media files. class AvFormatDecoder : public DecoderBase { - friend void HandleStreamChange(void *data); - public: AvFormatDecoder(MythPlayer *parent, const ProgramInfo &pginfo, PlayerFlags flags); @@ -178,6 +174,8 @@ class AvFormatDecoder : public DecoderBase static int GetMaxReferenceFrames(AVCodecContext *Context); + static void streams_changed(void *data, int avprogram_id); + protected: int AutoSelectTrack(uint type) override; // DecoderBase void ScanATSCCaptionStreams(int av_index); From 403eb6e66f7771e4a78366b76bb4ba872b3f6d05 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 10 Aug 2024 16:52:24 -0400 Subject: [PATCH 34/59] mpegts-mythtv.c: remove is_pmt_equal() by using the PMT's version_number (and current_next_indicator) to determine when to call streams_changed(). (FFmpeg already checks the current_next_indicator in pmt_cb() before the call to update_av_program_info().) The only change is the first seen PMT for each program will now never call streams_changed(). is_pmt_equal() would return 0 for the first seen PMT for each program when opening the file, but streams_changed is null at that point. This may prevent a call to streams_changed() when a new PAT version adds a program. However, MythTV does not fully support multiple programs in a single transport stream, so this is acceptable. The new PAT may also remove the currently playing program, which the PMT code cannot detect. --- .../FFmpeg/libavformat/mpegts-mythtv.c | 59 +++---------------- 1 file changed, 9 insertions(+), 50 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index e7f5ad6eff4..63435f7396c 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -133,7 +133,6 @@ struct Program { unsigned int id; // program id/service id unsigned int nb_pids; unsigned int pids[MAX_PIDS_PER_PROGRAM]; - uint8_t stream_types[MAX_PIDS_PER_PROGRAM]; // stream_type for pid at same index in pids unsigned int nb_streams; struct Stream streams[MAX_STREAMS_PER_PROGRAM]; @@ -344,8 +343,7 @@ static struct Program * add_program(MpegTSContext *ts, unsigned int programid) return p; } -// MythTV function -static void add_pmt_entry_to_program(struct Program *p, unsigned int pid, uint8_t stream_type) +static void add_pid_to_program(struct Program *p, unsigned int pid) { int i; if (!p) @@ -358,19 +356,14 @@ static void add_pmt_entry_to_program(struct Program *p, unsigned int pid, uint8_ if (p->pids[i] == pid) return; - p->stream_types[p->nb_pids] = stream_type; p->pids[p->nb_pids++] = pid; } -static void add_pid_to_program(struct Program *p, unsigned int pid) -{ - add_pmt_entry_to_program(p, pid, 0); -} - -static void update_av_program_info(AVFormatContext *s, unsigned int programid, +static int update_av_program_info(AVFormatContext *s, unsigned int programid, unsigned int pid, int version) { int i; + int ret = 0; for (i = 0; i < s->nb_programs; i++) { AVProgram *program = s->programs[i]; if (program->id == programid) { @@ -380,6 +373,7 @@ static void update_av_program_info(AVFormatContext *s, unsigned int programid, program->pmt_version = version; if (old_version != -1 && old_version != version) { + ret = 1; av_log(s, AV_LOG_VERBOSE, "detected PMT change (program=%d, version=%d/%d, pcr_pid=0x%x/0x%x)\n", programid, old_version, version, old_pcr_pid, pid); @@ -387,6 +381,7 @@ static void update_av_program_info(AVFormatContext *s, unsigned int programid, break; } } + return ret; } /** @@ -2399,42 +2394,6 @@ static SectionContext *add_section_stream(MpegTSContext *ts, int pid, int stream return sect; } -static int is_pmt_equal(const struct Program *new, const struct Program *old) -{ - const int offset = 2; // Program::pids[0] is pmt_pid, [1] is pcr_pid - int i = offset; - - if (new->nb_pids != old->nb_pids) - { - return 0; - } - if (new->nb_pids <= offset) - { - return 1; - } - for (; i < old->nb_pids; i++) - { - int j = offset; - for (; j < new->nb_pids; j++) - { - if (new->pids[j] == old->pids[i]) - { - break; - } - } - if (j == new->nb_pids) - { - break; - } - - if (new->stream_types[j] != old->stream_types[i]) - { - break; - } - } - return i == new->nb_pids; -} - /** @brief Copy PMT to AVFormatContext for use by MythTV. @@ -2494,6 +2453,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len int mp4_descr_count = 0; Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { { 0 } }; int i; + int new_version = 0; av_log(ts->stream, AV_LOG_TRACE, "PMT: len %i\n", section_len); hex_dump_debug(ts->stream, section, section_len); @@ -2535,7 +2495,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len return; pcr_pid &= 0x1fff; add_pid_to_program(prg, pcr_pid); - update_av_program_info(ts->stream, h->id, pcr_pid, h->version); + new_version = update_av_program_info(ts->stream, h->id, pcr_pid, h->version); av_log(ts->stream, AV_LOG_TRACE, "pcr_pid=0x%x\n", pcr_pid); @@ -2707,7 +2667,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len if (pes && !pes->stream_type) mpegts_set_stream_info(st, pes, stream_type, prog_reg_desc); - add_pmt_entry_to_program(prg, pid, stream_type); // MythTV + add_pid_to_program(prg, pid); if (prg) { prg->streams[i].idx = st->index; prg->streams[i].stream_identifier = stream_identifier; @@ -2746,8 +2706,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len export_pmt(ts->stream, h->id, section, section_len); /* if the pmt has changed, notify stream_changed listener */ - if (ts->stream->streams_changed != NULL && prg != NULL && - !is_pmt_equal(prg, &old_program)) + if (new_version && ts->stream->streams_changed != NULL) { av_log(ts->stream, AV_LOG_DEBUG, "streams_changed()\n"); ts->stream->streams_changed(ts->stream->stream_change_data, h->id); From 83f917e9d836da4531bd8f2d68ed2d83b757a918 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 10 Aug 2024 19:24:41 -0400 Subject: [PATCH 35/59] mpegts-mythtv.c: remove customization to add_pes_stream() It does nothing since pmt_cb() already closes the already existing filter before calling and the call in handle_packet() will only occur when `ts->pids[pid] == NULL`, i.e. there is no filter to close. It was originally from: PMT tracking in ffmpeg patch from danielk. https://github.com/MythTV/mythtv/commit/236872aa4dc73c45f01d71f749eb50eaf7eb12e4 --- mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c index 63435f7396c..776a5eb6d3c 100644 --- a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c +++ b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c @@ -1461,13 +1461,6 @@ static PESContext *add_pes_stream(MpegTSContext *ts, int pid, int pcr_pid) MpegTSFilter *tss; PESContext *pes; - // MythTV - if (tss = ts->pids[pid]) { /* filter already exists */ - /* kill it, and start a new stream */ - mpegts_close_filter(ts, tss); - } - // end MythTV - /* if no pid found, then add a pid context */ pes = av_mallocz(sizeof(PESContext)); if (!pes) From 6716364c61fca5047152ef2e53990e130853b82a Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 12 Oct 2024 15:38:10 -0400 Subject: [PATCH 36/59] cmake/configure: remove references to unsupported crystalhd --- cmake/CheckExternalLibraries.cmake | 6 ------ cmake/embeddedlibs/FindOrBuildFFmpeg.cmake | 1 - mythtv/configure | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/cmake/CheckExternalLibraries.cmake b/cmake/CheckExternalLibraries.cmake index 03eb019cca8..a7de9699290 100644 --- a/cmake/CheckExternalLibraries.cmake +++ b/cmake/CheckExternalLibraries.cmake @@ -191,12 +191,6 @@ if(ENABLE_DRM) endif() endif() -# Needed to pass right config option to FFmpeg -# -# crystalhd: fedora:libcrystalhd-devel debian:libcrystalhd-dev -find_library(CRYSTALHD crystalhd) -add_build_config(CRYSTALHD "crystalhd") - # # See if there is a system libbluray for FFmpeg. # diff --git a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake index b60d8a13cda..82b50d3db6f 100644 --- a/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake +++ b/cmake/embeddedlibs/FindOrBuildFFmpeg.cmake @@ -99,7 +99,6 @@ function(find_or_build_ffmpeg) ${CMAKE_COMMAND} -E env ${_PROGS} PKG_CONFIG_PATH=${PKG_CONFIG_PATH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/mythtv/external/FFmpeg/configure ${FF_ARGS} "${FF_PLATFORM_ARGS}" - $,--enable-crystalhd,--disable-crystalhd> $,--enable-libbluray,--disable-libbluray> $,--enable-libfontconfig,--disable-libfontconfig> $,--enable-libx264,--disable-libx264> diff --git a/mythtv/configure b/mythtv/configure index 0125614ebde..2a08ba01cd1 100755 --- a/mythtv/configure +++ b/mythtv/configure @@ -6761,7 +6761,7 @@ ffmpeg_optset ar nm ranlib ffmpeg_optenable cross_compile libmp3lame libx264 libx265 libvpx libxvid ffmpeg_optenable vdpau libxml2 libass dxva2 ffmpeg_optenable libbluray libfontconfig libfreetype libiec61883 -ffmpeg_optenable crystalhd sdl2 ffplay +ffmpeg_optenable sdl2 ffplay if test $target_os = "android"; then enabled mediacodec && enable jni From d271e34a86fec21a7493e0a08aa2927af0ee0d6b Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 12 Oct 2024 15:48:36 -0400 Subject: [PATCH 37/59] constify AVIOContext::write_packet buf parameter --- mythtv/libs/libmyth/audio/spdifencoder.cpp | 4 ++++ mythtv/libs/libmyth/audio/spdifencoder.h | 4 ++++ mythtv/libs/libmythtv/io/mythavformatbuffer.cpp | 4 ++++ mythtv/libs/libmythtv/io/mythavformatbuffer.h | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/mythtv/libs/libmyth/audio/spdifencoder.cpp b/mythtv/libs/libmyth/audio/spdifencoder.cpp index 75bf0beba9a..aeac91dd7ce 100644 --- a/mythtv/libs/libmyth/audio/spdifencoder.cpp +++ b/mythtv/libs/libmyth/audio/spdifencoder.cpp @@ -183,7 +183,11 @@ bool SPDIFEncoder::SetMaxHDRate(int rate) /** * funcIO: Internal callback function that will receive encoded frames */ +#if (LIBAVFORMAT_VERSION_MAJOR < 61) int SPDIFEncoder::funcIO(void *opaque, unsigned char *buf, int size) +#else +int SPDIFEncoder::funcIO(void *opaque, const uint8_t *buf, int size) +#endif { auto *enc = static_cast(opaque); diff --git a/mythtv/libs/libmyth/audio/spdifencoder.h b/mythtv/libs/libmyth/audio/spdifencoder.h index 47b8769c8d3..b95d1770bba 100644 --- a/mythtv/libs/libmyth/audio/spdifencoder.h +++ b/mythtv/libs/libmyth/audio/spdifencoder.h @@ -25,7 +25,11 @@ class MPUBLIC SPDIFEncoder bool SetMaxHDRate(int rate); private: +#if (LIBAVFORMAT_VERSION_MAJOR < 61) static int funcIO(void *opaque, unsigned char *buf, int size); +#else + static int funcIO(void *opaque, const uint8_t *buf, int size); +#endif void Destroy(); private: diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp index 52e9d05715f..5445222f7b2 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.cpp @@ -77,7 +77,11 @@ int MythAVFormatBuffer::read_packet(void *opaque, uint8_t *buf, int buf_size) return ret; } +#if (LIBAVFORMAT_VERSION_MAJOR < 61) int MythAVFormatBuffer::write_packet(void *opaque, uint8_t *buf, int buf_size) +#else +int MythAVFormatBuffer::write_packet(void *opaque, const uint8_t *buf, int buf_size) +#endif { auto *p = reinterpret_cast(opaque); if (!p) diff --git a/mythtv/libs/libmythtv/io/mythavformatbuffer.h b/mythtv/libs/libmythtv/io/mythavformatbuffer.h index a03eba8e72c..2d1375eff0f 100644 --- a/mythtv/libs/libmythtv/io/mythavformatbuffer.h +++ b/mythtv/libs/libmythtv/io/mythavformatbuffer.h @@ -22,7 +22,11 @@ class MythAVFormatBuffer private: static int read_packet(void *opaque, uint8_t *buf, int buf_size); +#if (LIBAVFORMAT_VERSION_MAJOR < 61) static int write_packet(void *opaque, uint8_t *buf, int buf_size); +#else + static int write_packet(void *opaque, const uint8_t *buf, int buf_size); +#endif static int64_t seek(void *opaque, int64_t offset, int whence); AVIOContext* alloc_context(bool write_flag, bool force_seek); From 1304aee8210e32be5bcad16a4cd002075026a93e Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sun, 13 Oct 2024 01:17:04 -0400 Subject: [PATCH 38/59] constify AVIOContext::write_packet buf parameter (plugins) --- mythplugins/mytharchive/mytharchive/remoteavformatcontext.h | 4 ++++ mythplugins/mythmusic/mythmusic/remoteavformatcontext.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mythplugins/mytharchive/mytharchive/remoteavformatcontext.h b/mythplugins/mytharchive/mytharchive/remoteavformatcontext.h index d3729689c4c..4281b4786c8 100644 --- a/mythplugins/mytharchive/mytharchive/remoteavformatcontext.h +++ b/mythplugins/mytharchive/mytharchive/remoteavformatcontext.h @@ -118,7 +118,11 @@ class ArchiveRemoteAVFormatContext return rf->Read(buf, buf_size); } +#if (LIBAVFORMAT_VERSION_MAJOR < 61) static int WriteFunc(void */*opaque*/, uint8_t */*buf*/, int /*buf_size*/) +#else + static int WriteFunc(void */*opaque*/, const uint8_t */*buf*/, int /*buf_size*/) +#endif { return -1; } static int64_t SeekFunc(void *opaque, int64_t offset, int whence) diff --git a/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h b/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h index 0a1b713ff09..c10f9c4d7d1 100644 --- a/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h +++ b/mythplugins/mythmusic/mythmusic/remoteavformatcontext.h @@ -141,7 +141,11 @@ class RemoteAVFormatContext return ret; } +#if (LIBAVFORMAT_VERSION_MAJOR < 61) static int WriteFunc(void */*opaque*/, uint8_t */*buf*/, int/*buf_size*/) +#else + static int WriteFunc(void */*opaque*/, const uint8_t */*buf*/, int/*buf_size*/) +#endif { return -1; } static int64_t SeekFunc(void *opaque, int64_t offset, int whence) From 84c178159a71d8430d6780d3e9bc8f3399fcc9c0 Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 12 Oct 2024 17:40:27 -0400 Subject: [PATCH 39/59] Use AVFrame::best_effort_timestamp instead of AVCodecContext::reordered_opaque and AVFrame::reordered_opaque, which have been removed and as far as I can tell were just passed around and unused by FFmpeg. --- .../libmythtv/decoders/avformatdecoder.cpp | 132 +----------------- .../libs/libmythtv/decoders/avformatdecoder.h | 13 -- .../libmythtv/decoders/mythcodeccontext.cpp | 2 - .../decoders/mythdrmprimecontext.cpp | 1 - .../libmythtv/decoders/mythmmalcontext.cpp | 2 - .../libmythtv/decoders/mythnvdeccontext.cpp | 1 - .../libmythtv/decoders/mythv4l2m2mcontext.cpp | 1 - 7 files changed, 7 insertions(+), 145 deletions(-) diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp index eb03340f848..dfa8e7e90ef 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.cpp @@ -701,11 +701,6 @@ void AvFormatDecoder::SeekReset(long long newKey, uint skipFrames, m_lastAPts = 0ms; m_lastVPts = 0ms; m_lastCcPtsu = 0us; - m_faultyPts = m_faultyDts = 0; - m_lastPtsForFaultDetection = 0; - m_lastDtsForFaultDetection = 0; - m_ptsDetected = false; - m_reorderedPtsDetected = false; avformat_flush(m_ic); @@ -1222,9 +1217,6 @@ int AvFormatDecoder::OpenFile(MythMediaBuffer *Buffer, bool novideo, QString::number(framenum))); } - if (qEnvironmentVariableIsSet("FORCE_DTS_TIMESTAMPS")) - m_forceDtsTimestamps = true; - if (m_ringBuffer->IsDVD()) { // Reset DVD playback and clear any of @@ -2047,14 +2039,6 @@ int AvFormatDecoder::autoSelectVideoTrack(int& scanerror) break; } - // N.B. MediaCodec and NVDEC require frame timing - m_useFrameTiming = false; - if ((m_ringBuffer && !m_ringBuffer->IsDVD() && (codec_sw_copy(m_videoCodecId) || codec_is_v4l2(m_videoCodecId))) || - (codec_is_nvdec(m_videoCodecId) || codec_is_mediacodec(m_videoCodecId) || codec_is_mediacodec_dec(m_videoCodecId))) - { - m_useFrameTiming = true; - } - if (FlagIsSet(kDecodeSingleThreaded)) thread_count = 1; @@ -2778,7 +2762,6 @@ int get_avf_buffer(struct AVCodecContext *c, AVFrame *pic, int flags) } pic->opaque = frame; - pic->reordered_opaque = c->reordered_opaque; // Set release method AVBufferRef *buffer = av_buffer_create(reinterpret_cast(frame), 0, @@ -2808,7 +2791,6 @@ int get_avf_buffer_dxva2(struct AVCodecContext *c, AVFrame *pic, int /*flags*/) } pic->opaque = frame; frame->m_pixFmt = c->pix_fmt; - pic->reordered_opaque = c->reordered_opaque; pic->data[0] = (uint8_t*)frame->m_buffer; pic->data[3] = (uint8_t*)frame->m_buffer; @@ -3179,11 +3161,6 @@ void AvFormatDecoder::MpegPreProcessPkt(AVStream *stream, AVPacket *pkt) m_firstVPts = m_lastAPts = m_lastVPts = 0ms; m_lastCcPtsu = 0us; m_firstVPtsInuse = true; - m_faultyPts = m_faultyDts = 0; - m_lastPtsForFaultDetection = 0; - m_lastDtsForFaultDetection = 0; - m_ptsDetected = false; - m_reorderedPtsDetected = false; // fps debugging info float avFPS = GetVideoFrameRate(stream, context); @@ -3298,11 +3275,6 @@ int AvFormatDecoder::H264PreProcessPkt(AVStream *stream, AVPacket *pkt) m_firstVPts = m_lastAPts = m_lastVPts = 0ms; m_lastCcPtsu = 0us; m_firstVPtsInuse = true; - m_faultyPts = m_faultyDts = 0; - m_lastPtsForFaultDetection = 0; - m_lastDtsForFaultDetection = 0; - m_ptsDetected = false; - m_reorderedPtsDetected = false; // fps debugging info auto avFPS = static_cast(GetVideoFrameRate(stream, context)); @@ -3387,17 +3359,11 @@ bool AvFormatDecoder::ProcessVideoPacket(AVStream *curstream, AVPacket *pkt, boo MythAVFrame mpa_pic; if (!mpa_pic) return false; - mpa_pic->reordered_opaque = AV_NOPTS_VALUE; - - if (pkt->pts != AV_NOPTS_VALUE) - m_ptsDetected = true; bool sentPacket = false; int ret2 = 0; m_avCodecLock.lock(); - if (!m_useFrameTiming) - context->reordered_opaque = pkt->pts; // SUGGESTION // Now that avcodec_decode_video2 is deprecated and replaced @@ -3486,57 +3452,6 @@ bool AvFormatDecoder::ProcessVideoPacket(AVStream *curstream, AVPacket *pkt, boo .arg(pkt->pts).arg(mpa_pic->pts).arg(pkt->pts) .arg(mpa_pic->pkt_dts)); - if (!m_useFrameTiming) - { - int64_t pts = 0; - - // Detect faulty video timestamps using logic from ffplay. - if (pkt->dts != AV_NOPTS_VALUE) - { - if (pkt->dts <= m_lastDtsForFaultDetection) - m_faultyDts += 1; - m_lastDtsForFaultDetection = pkt->dts; - } - if (mpa_pic->reordered_opaque != AV_NOPTS_VALUE) - { - if (mpa_pic->reordered_opaque <= m_lastPtsForFaultDetection) - m_faultyPts += 1; - m_lastPtsForFaultDetection = mpa_pic->reordered_opaque; - m_reorderedPtsDetected = true; - } - - // Explicity use DTS for DVD since they should always be valid for every - // frame and fixups aren't enabled for DVD. - // Select reordered_opaque (PTS) timestamps if they are less faulty or the - // the DTS timestamp is missing. Also use fixups for missing PTS instead of - // DTS to avoid oscillating between PTS and DTS. Only select DTS if PTS is - // more faulty or never detected. - if (m_forceDtsTimestamps || m_ringBuffer->IsDVD()) - { - if (pkt->dts != AV_NOPTS_VALUE) - pts = pkt->dts; - m_ptsSelected = false; - } - else if (m_faultyPts <= m_faultyDts && m_reorderedPtsDetected) - { - if (mpa_pic->reordered_opaque != AV_NOPTS_VALUE) - pts = mpa_pic->reordered_opaque; - m_ptsSelected = true; - } - else if (pkt->dts != AV_NOPTS_VALUE) - { - pts = pkt->dts; - m_ptsSelected = false; - } - - LOG(VB_PLAYBACK | VB_TIMESTAMP, LOG_DEBUG, LOC + - QString("video packet timestamps reordered %1 pts %2 dts %3 (%4)") - .arg(mpa_pic->reordered_opaque).arg(pkt->pts).arg(pkt->dts) - .arg((m_forceDtsTimestamps) ? "dts forced" : - (m_ptsSelected) ? "reordered" : "dts")); - - mpa_pic->reordered_opaque = pts; - } ProcessVideoFrame(curstream, mpa_pic); } @@ -3678,26 +3593,14 @@ bool AvFormatDecoder::ProcessVideoFrame(AVStream *Stream, AVFrame *AvFrame) return false; } - std::chrono::milliseconds pts = 0ms; - if (m_useFrameTiming) - { - long long av_pts = AvFrame->pts; - if (av_pts == AV_NOPTS_VALUE) - av_pts = AvFrame->pkt_dts; - if (av_pts == AV_NOPTS_VALUE) - av_pts = AvFrame->reordered_opaque; - if (av_pts == AV_NOPTS_VALUE) - { - LOG(VB_GENERAL, LOG_ERR, LOC + "No PTS found - unable to process video."); - return false; - } - pts = millisecondsFromFloat(av_q2d(Stream->time_base) * av_pts * 1000); - } - else + + if (AvFrame->best_effort_timestamp == AV_NOPTS_VALUE) { - pts = millisecondsFromFloat(av_q2d(Stream->time_base) * AvFrame->reordered_opaque * 1000); + LOG(VB_GENERAL, LOG_ERR, LOC + "No PTS found - unable to process video."); + return false; } - + std::chrono::milliseconds pts = millisecondsFromFloat(av_q2d(Stream->time_base) * + AvFrame->best_effort_timestamp * 1000); std::chrono::milliseconds temppts = pts; // Validate the video pts against the last pts. If it's // a little bit smaller, equal or missing, compute @@ -3732,7 +3635,7 @@ bool AvFormatDecoder::ProcessVideoFrame(AVStream *Stream, AVFrame *AvFrame) LOG(VB_PLAYBACK | VB_TIMESTAMP, LOG_INFO, LOC + QString("video timecode %1 %2 %3 %4%5") - .arg(m_useFrameTiming ? AvFrame->pts : AvFrame->reordered_opaque) + .arg(AvFrame->best_effort_timestamp) .arg(pts.count()).arg(temppts.count()).arg(m_lastVPts.count()) .arg((pts != temppts) ? " fixup" : "")); @@ -4699,27 +4602,6 @@ bool AvFormatDecoder::ProcessAudioPacket(AVStream *curstream, AVPacket *pkt, if (firstloop && pkt->pts != AV_NOPTS_VALUE) m_lastAPts = millisecondsFromFloat(av_q2d(curstream->time_base) * pkt->pts * 1000); - if (!m_useFrameTiming) - { - // This code under certain conditions causes jump backwards to lose - // audio. - if (m_skipAudio && m_selectedTrack[kTrackTypeVideo].m_av_stream_index > -1) - { - if ((m_lastAPts < m_lastVPts - millisecondsFromFloat(10.0 / m_fps)) || - m_lastVPts == 0ms) - break; - m_skipAudio = false; - } - - // skip any audio frames preceding first video frame - if (m_firstVPtsInuse && (m_firstVPts != 0ms) && (m_lastAPts < m_firstVPts)) - { - LOG(VB_PLAYBACK | VB_TIMESTAMP, LOG_INFO, LOC + - QString("discarding early audio timecode %1 %2 %3") - .arg(pkt->pts).arg(pkt->dts).arg(m_lastAPts.count())); - break; - } - } m_firstVPtsInuse = false; m_avCodecLock.lock(); data_size = 0; diff --git a/mythtv/libs/libmythtv/decoders/avformatdecoder.h b/mythtv/libs/libmythtv/decoders/avformatdecoder.h index c6b7e7e6733..feeefdcbd6e 100644 --- a/mythtv/libs/libmythtv/decoders/avformatdecoder.h +++ b/mythtv/libs/libmythtv/decoders/avformatdecoder.h @@ -297,19 +297,6 @@ class AvFormatDecoder : public DecoderBase std::chrono::milliseconds m_firstVPts {0ms}; bool m_firstVPtsInuse {false}; - int64_t m_faultyPts {0}; - int64_t m_faultyDts {0}; - int64_t m_lastPtsForFaultDetection {0}; - int64_t m_lastDtsForFaultDetection {0}; - bool m_ptsDetected {false}; - bool m_reorderedPtsDetected {false}; - bool m_ptsSelected {true}; - // set use_frame_timing true to utilize the pts values in returned - // frames. Set fale to use deprecated method. - bool m_useFrameTiming {false}; - - bool m_forceDtsTimestamps {false}; - PlayerFlags m_playerFlags; MythCodecID m_videoCodecId {kCodec_NONE}; diff --git a/mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp b/mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp index 26651d4b804..6cf856e34cd 100644 --- a/mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythcodeccontext.cpp @@ -336,7 +336,6 @@ int MythCodecContext::GetBuffer(struct AVCodecContext *Context, AVFrame *Frame, } Frame->opaque = videoframe; videoframe->m_pixFmt = Context->pix_fmt; - Frame->reordered_opaque = Context->reordered_opaque; int ret = avcodec_default_get_buffer2(Context, Frame, Flags); if (ret < 0) @@ -386,7 +385,6 @@ bool MythCodecContext::GetBuffer2(struct AVCodecContext *Context, MythVideoFrame Frame->m_directRendering = true; Frame->m_colorshifted = true; - AvFrame->reordered_opaque = Context->reordered_opaque; AvFrame->opaque = Frame; // retrieve the software format diff --git a/mythtv/libs/libmythtv/decoders/mythdrmprimecontext.cpp b/mythtv/libs/libmythtv/decoders/mythdrmprimecontext.cpp index a8db15c0486..64f41ea79aa 100644 --- a/mythtv/libs/libmythtv/decoders/mythdrmprimecontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythdrmprimecontext.cpp @@ -171,7 +171,6 @@ bool MythDRMPRIMEContext::GetDRMBuffer(AVCodecContext *Context, MythVideoFrame * Frame->m_swPixFmt = Context->sw_pix_fmt; Frame->m_directRendering = true; AvFrame->opaque = Frame; - AvFrame->reordered_opaque = Context->reordered_opaque; // Frame->data[0] holds AVDRMFrameDescriptor Frame->m_buffer = AvFrame->data[0]; diff --git a/mythtv/libs/libmythtv/decoders/mythmmalcontext.cpp b/mythtv/libs/libmythtv/decoders/mythmmalcontext.cpp index 827ac74549d..74eaa35d747 100644 --- a/mythtv/libs/libmythtv/decoders/mythmmalcontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythmmalcontext.cpp @@ -190,7 +190,6 @@ bool MythMMALContext::GetBuffer(AVCodecContext *Context, MythVideoFrame *Frame, MythVideoFrame::GetHeightForPlane(Frame->m_type, AvFrame->height, plane)); } - AvFrame->reordered_opaque = Context->reordered_opaque; return true; } @@ -216,7 +215,6 @@ bool MythMMALContext::GetBuffer2(AVCodecContext *Context, MythVideoFrame *Frame, Frame->m_swPixFmt = Context->sw_pix_fmt; Frame->m_directRendering = 1; AvFrame->opaque = Frame; - AvFrame->reordered_opaque = Context->reordered_opaque; // Frame->data[3] holds MMAL_BUFFER_HEADER_T Frame->m_buffer = AvFrame->data[3]; diff --git a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp index aee22feb0f9..2f8122a0dd7 100644 --- a/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythnvdeccontext.cpp @@ -425,7 +425,6 @@ bool MythNVDECContext::GetBuffer(struct AVCodecContext *Context, MythVideoFrame Frame->m_directRendering = true; AvFrame->opaque = Frame; - AvFrame->reordered_opaque = Context->reordered_opaque; // set the pixel format - normally NV12 but P010 for 10bit etc. Set here rather than guessing later. if (AvFrame->hw_frames_ctx) diff --git a/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp b/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp index ce09f85362f..7bcb99f81b8 100644 --- a/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp +++ b/mythtv/libs/libmythtv/decoders/mythv4l2m2mcontext.cpp @@ -541,7 +541,6 @@ bool MythV4L2M2MContext::GetRequestBuffer(AVCodecContext* Context, MythVideoFram Frame->m_swPixFmt = Context->sw_pix_fmt; Frame->m_directRendering = true; AvFrame->opaque = Frame; - AvFrame->reordered_opaque = Context->reordered_opaque; // Frame->data[0] holds V4L2RequestDescriptor which holds AVDRMFrameDescriptor Frame->m_buffer = reinterpret_cast(&(reinterpret_cast(AvFrame->data[0])->drm)); From 976ab94b53ec1745cb7aced57eed3092f8848e8a Mon Sep 17 00:00:00 2001 From: Scott Theisen Date: Sat, 12 Oct 2024 15:11:42 -0400 Subject: [PATCH 40/59] update FFmpeg to version 7.1 --- mythtv/external/FFmpeg/.gitattributes | 1 - mythtv/external/FFmpeg/.mailmap | 13 +- mythtv/external/FFmpeg/.travis.yml | 30 - mythtv/external/FFmpeg/CREDITS | 4 +- mythtv/external/FFmpeg/Changelog | 164 +- mythtv/external/FFmpeg/MAINTAINERS | 204 +- mythtv/external/FFmpeg/Makefile | 23 +- mythtv/external/FFmpeg/RELEASE | 2 +- mythtv/external/FFmpeg/RELEASE_NOTES | 13 +- .../FFmpeg/compat/atomics/gcc/stdatomic.h | 173 - .../FFmpeg/compat/atomics/pthread/stdatomic.h | 197 - .../FFmpeg/compat/atomics/suncc/stdatomic.h | 186 - .../FFmpeg/compat/atomics/win32/stdatomic.h | 1 - .../FFmpeg/compat/cuda/cuda_runtime.h | 1 + mythtv/external/FFmpeg/compat/stdbit/stdbit.h | 599 + mythtv/external/FFmpeg/compat/w32dlfcn.h | 1 + mythtv/external/FFmpeg/compat/w32pthreads.h | 10 +- .../external/FFmpeg/compat/windows/mswindres | 32 + mythtv/external/FFmpeg/configure | 1287 +- mythtv/external/FFmpeg/doc/APIchanges | 601 +- mythtv/external/FFmpeg/doc/Doxyfile | 3 +- mythtv/external/FFmpeg/doc/Makefile | 3 +- mythtv/external/FFmpeg/doc/authors.texi | 4 +- .../FFmpeg/doc/bitstream_filters.texi | 65 +- mythtv/external/FFmpeg/doc/bootstrap.min.css | 2 +- mythtv/external/FFmpeg/doc/codecs.texi | 22 +- mythtv/external/FFmpeg/doc/community.texi | 182 + mythtv/external/FFmpeg/doc/decoders.texi | 240 +- mythtv/external/FFmpeg/doc/demuxers.texi | 256 +- .../FFmpeg/doc/dev_community/community.md | 79 - .../doc/dev_community/resolution_process.md | 91 - mythtv/external/FFmpeg/doc/developer.texi | 577 +- mythtv/external/FFmpeg/doc/encoders.texi | 647 +- .../external/FFmpeg/doc/examples/.gitignore | 1 + mythtv/external/FFmpeg/doc/examples/Makefile | 25 +- .../FFmpeg/doc/examples/Makefile.example | 35 +- mythtv/external/FFmpeg/doc/examples/README | 8 +- ..._multiclient.c => avio_http_serve_files.c} | 9 +- .../FFmpeg/doc/examples/avio_list_dir.c | 7 + .../{avio_reading.c => avio_read_callback.c} | 6 +- .../FFmpeg/doc/examples/decode_audio.c | 7 +- ...iltering_audio.c => decode_filter_audio.c} | 28 +- ...iltering_video.c => decode_filter_video.c} | 22 +- .../FFmpeg/doc/examples/decode_video.c | 11 +- .../{demuxing_decoding.c => demux_decode.c} | 24 +- .../FFmpeg/doc/examples/encode_audio.c | 6 +- .../FFmpeg/doc/examples/encode_video.c | 8 +- .../FFmpeg/doc/examples/extract_mvs.c | 15 +- .../FFmpeg/doc/examples/filter_audio.c | 26 +- .../external/FFmpeg/doc/examples/hw_decode.c | 10 +- .../FFmpeg/doc/examples/{muxing.c => mux.c} | 41 +- .../doc/examples/{qsvdec.c => qsv_decode.c} | 27 +- .../FFmpeg/doc/examples/qsv_transcode.c | 436 + .../doc/examples/{remuxing.c => remux.c} | 9 +- .../{resampling_audio.c => resample_audio.c} | 8 +- .../{scaling_video.c => scale_video.c} | 7 +- .../examples/{metadata.c => show_metadata.c} | 9 +- .../examples/{transcoding.c => transcode.c} | 59 +- .../FFmpeg/doc/examples/transcode_aac.c | 50 +- .../FFmpeg/doc/examples/vaapi_encode.c | 15 +- .../FFmpeg/doc/examples/vaapi_transcode.c | 13 +- mythtv/external/FFmpeg/doc/faq.texi | 4 +- mythtv/external/FFmpeg/doc/fate.texi | 16 + .../FFmpeg/doc/fate_config.sh.template | 22 + mythtv/external/FFmpeg/doc/ffmpeg.texi | 1044 +- mythtv/external/FFmpeg/doc/ffplay.texi | 12 + mythtv/external/FFmpeg/doc/ffprobe.texi | 22 +- mythtv/external/FFmpeg/doc/ffprobe.xsd | 906 +- .../FFmpeg/doc/fftools-common-opts.texi | 30 +- mythtv/external/FFmpeg/doc/filters.texi | 4677 ++++- mythtv/external/FFmpeg/doc/formats.texi | 22 +- .../external/FFmpeg/doc/general_contents.texi | 88 +- mythtv/external/FFmpeg/doc/git-howto.texi | 26 +- mythtv/external/FFmpeg/doc/indevs.texi | 36 +- mythtv/external/FFmpeg/doc/infra.txt | 94 + .../external/FFmpeg/doc/mailing-list-faq.texi | 5 +- mythtv/external/FFmpeg/doc/metadata.texi | 1 + mythtv/external/FFmpeg/doc/mips.txt | 14 - mythtv/external/FFmpeg/doc/multithreading.txt | 16 +- mythtv/external/FFmpeg/doc/muxers.texi | 2659 ++- mythtv/external/FFmpeg/doc/optimization.txt | 5 + mythtv/external/FFmpeg/doc/outdevs.texi | 45 +- mythtv/external/FFmpeg/doc/platform.texi | 3 - mythtv/external/FFmpeg/doc/protocols.texi | 256 +- mythtv/external/FFmpeg/doc/resampler.texi | 18 +- mythtv/external/FFmpeg/doc/t2h.pm | 106 +- mythtv/external/FFmpeg/doc/texidep.pl | 2 +- mythtv/external/FFmpeg/doc/transforms.md | 323 + mythtv/external/FFmpeg/doc/utils.texi | 100 +- mythtv/external/FFmpeg/ffbuild/arch.mak | 4 + mythtv/external/FFmpeg/ffbuild/common.mak | 4 +- mythtv/external/FFmpeg/ffbuild/libversion.sh | 1 + mythtv/external/FFmpeg/fftools/Makefile | 13 + mythtv/external/FFmpeg/fftools/cmdutils.c | 858 +- mythtv/external/FFmpeg/fftools/cmdutils.h | 261 +- mythtv/external/FFmpeg/fftools/ffmpeg.c | 4455 +---- mythtv/external/FFmpeg/fftools/ffmpeg.h | 1051 +- mythtv/external/FFmpeg/fftools/ffmpeg_dec.c | 1760 ++ mythtv/external/FFmpeg/fftools/ffmpeg_demux.c | 1917 ++ mythtv/external/FFmpeg/fftools/ffmpeg_enc.c | 926 + .../external/FFmpeg/fftools/ffmpeg_filter.c | 3713 +++- mythtv/external/FFmpeg/fftools/ffmpeg_hw.c | 286 +- mythtv/external/FFmpeg/fftools/ffmpeg_mux.c | 890 +- mythtv/external/FFmpeg/fftools/ffmpeg_mux.h | 121 + .../external/FFmpeg/fftools/ffmpeg_mux_init.c | 3395 ++++ mythtv/external/FFmpeg/fftools/ffmpeg_opt.c | 4066 ++--- mythtv/external/FFmpeg/fftools/ffmpeg_sched.c | 2607 +++ mythtv/external/FFmpeg/fftools/ffmpeg_sched.h | 504 + mythtv/external/FFmpeg/fftools/ffmpeg_utils.h | 57 + mythtv/external/FFmpeg/fftools/ffplay.c | 549 +- .../external/FFmpeg/fftools/ffplay_renderer.c | 836 + .../sh4/bswap.h => fftools/ffplay_renderer.h} | 51 +- mythtv/external/FFmpeg/fftools/ffprobe.c | 1402 +- mythtv/external/FFmpeg/fftools/fftoolsres.rc | 2 + mythtv/external/FFmpeg/fftools/fopen_utf8.h | 1 + mythtv/external/FFmpeg/fftools/objpool.c | 131 + mythtv/external/FFmpeg/fftools/objpool.h | 37 + mythtv/external/FFmpeg/fftools/opt_common.c | 194 +- mythtv/external/FFmpeg/fftools/opt_common.h | 62 +- mythtv/external/FFmpeg/fftools/sync_queue.c | 719 + mythtv/external/FFmpeg/fftools/sync_queue.h | 118 + mythtv/external/FFmpeg/fftools/thread_queue.c | 254 + mythtv/external/FFmpeg/fftools/thread_queue.h | 81 + mythtv/external/FFmpeg/libavcodec/012v.c | 12 +- mythtv/external/FFmpeg/libavcodec/4xm.c | 50 +- mythtv/external/FFmpeg/libavcodec/8bps.c | 94 +- mythtv/external/FFmpeg/libavcodec/8svx.c | 11 +- mythtv/external/FFmpeg/libavcodec/Makefile | 325 +- .../external/FFmpeg/libavcodec/a64multienc.c | 12 +- mythtv/external/FFmpeg/libavcodec/aac.h | 295 +- .../external/FFmpeg/libavcodec/aac/Makefile | 8 + .../{aacdec_template.c => aac/aacdec.c} | 2151 +-- .../external/FFmpeg/libavcodec/aac/aacdec.h | 562 + .../FFmpeg/libavcodec/aac/aacdec_ac.c | 208 + .../FFmpeg/libavcodec/aac/aacdec_ac.h | 54 + .../libavcodec/aac/aacdec_dsp_template.c | 688 + .../FFmpeg/libavcodec/aac/aacdec_fixed.c | 105 + .../libavcodec/aac/aacdec_fixed_coupling.h | 137 + .../libavcodec/aac/aacdec_fixed_dequant.h | 174 + .../libavcodec/aac/aacdec_fixed_prediction.h | 151 + .../FFmpeg/libavcodec/aac/aacdec_float.c | 182 + .../libavcodec/aac/aacdec_float_coupling.h | 90 + .../libavcodec/aac/aacdec_float_prediction.h | 100 + .../{aacdec.c => aac/aacdec_latm.h} | 297 +- .../FFmpeg/libavcodec/aac/aacdec_lpd.c | 198 + .../FFmpeg/libavcodec/aac/aacdec_lpd.h | 33 + .../libavcodec/aac/aacdec_proc_template.c | 448 + .../FFmpeg/libavcodec/aac/aacdec_tab.c | 308 + .../aac/aacdec_tab.h} | 42 +- .../FFmpeg/libavcodec/aac/aacdec_usac.c | 1790 ++ .../FFmpeg/libavcodec/aac/aacdec_usac.h | 37 + .../FFmpeg/libavcodec/aac_ac3_parser.c | 137 +- .../FFmpeg/libavcodec/aac_ac3_parser.h | 24 +- .../external/FFmpeg/libavcodec/aac_defines.h | 47 +- .../external/FFmpeg/libavcodec/aac_parser.c | 23 +- mythtv/external/FFmpeg/libavcodec/aaccoder.c | 259 +- .../FFmpeg/libavcodec/aaccoder_trellis.h | 4 +- .../FFmpeg/libavcodec/aaccoder_twoloop.h | 8 +- .../external/FFmpeg/libavcodec/aacdec_fixed.c | 473 - mythtv/external/FFmpeg/libavcodec/aacdectab.h | 113 - mythtv/external/FFmpeg/libavcodec/aacenc.c | 364 +- mythtv/external/FFmpeg/libavcodec/aacenc.h | 392 +- mythtv/external/FFmpeg/libavcodec/aacenc_is.c | 12 +- .../external/FFmpeg/libavcodec/aacenc_ltp.c | 16 +- .../external/FFmpeg/libavcodec/aacenc_pred.c | 26 +- .../FFmpeg/libavcodec/aacenc_quantization.h | 243 +- .../libavcodec/aacenc_quantization_misc.h | 2 +- .../external/FFmpeg/libavcodec/aacenc_tns.c | 13 +- .../external/FFmpeg/libavcodec/aacenc_utils.h | 26 +- mythtv/external/FFmpeg/libavcodec/aacencdsp.h | 72 + mythtv/external/FFmpeg/libavcodec/aacenctab.h | 9 +- mythtv/external/FFmpeg/libavcodec/aacps.c | 9 +- mythtv/external/FFmpeg/libavcodec/aacps.h | 12 +- .../external/FFmpeg/libavcodec/aacps_common.c | 98 +- .../FFmpeg/libavcodec/aacps_tablegen.h | 2 +- .../libavcodec/aacps_tablegen_template.c | 2 + mythtv/external/FFmpeg/libavcodec/aacpsdata.c | 185 +- mythtv/external/FFmpeg/libavcodec/aacpsdsp.h | 2 +- .../FFmpeg/libavcodec/aacpsdsp_template.c | 61 +- mythtv/external/FFmpeg/libavcodec/aacpsy.c | 9 +- mythtv/external/FFmpeg/libavcodec/aacsbr.c | 45 +- mythtv/external/FFmpeg/libavcodec/aacsbr.h | 60 +- .../external/FFmpeg/libavcodec/aacsbr_fixed.c | 4 +- .../FFmpeg/libavcodec/aacsbr_template.c | 449 +- .../external/FFmpeg/libavcodec/aacsbrdata.h | 653 +- mythtv/external/FFmpeg/libavcodec/aactab.c | 718 +- mythtv/external/FFmpeg/libavcodec/aactab.h | 63 +- .../FFmpeg/libavcodec/aarch64/Makefile | 16 +- .../FFmpeg/libavcodec/aarch64/aacpsdsp_neon.S | 218 +- .../libavcodec/aarch64/ac3dsp_init_aarch64.c | 50 + .../FFmpeg/libavcodec/aarch64/ac3dsp_neon.S | 111 + .../external/FFmpeg/libavcodec/aarch64/fdct.h | 26 + .../libavcodec/aarch64/fdctdsp_init_aarch64.c | 39 + .../FFmpeg/libavcodec/aarch64/fdctdsp_neon.S | 368 + .../FFmpeg/libavcodec/aarch64/fft_neon.S | 448 - .../libavcodec/aarch64/fmtconvert_init.c | 4 +- .../aarch64/h264chroma_init_aarch64.c | 12 +- .../FFmpeg/libavcodec/aarch64/h264cmc_neon.S | 414 +- .../FFmpeg/libavcodec/aarch64/h264dsp_neon.S | 602 +- .../FFmpeg/libavcodec/aarch64/h264idct_neon.S | 398 +- .../aarch64/h264qpel_init_aarch64.c | 91 +- .../FFmpeg/libavcodec/aarch64/h264qpel_neon.S | 1100 +- .../FFmpeg/libavcodec/aarch64/h26x/dsp.h | 308 + .../libavcodec/aarch64/h26x/epel_neon.S | 4916 ++++++ .../libavcodec/aarch64/h26x/qpel_neon.S | 5411 ++++++ .../{hevcdsp_sao_neon.S => h26x/sao_neon.S} | 49 +- .../libavcodec/aarch64/hevcdsp_deblock_neon.S | 600 + .../libavcodec/aarch64/hevcdsp_idct_neon.S | 810 +- .../libavcodec/aarch64/hevcdsp_init_aarch64.c | 206 +- .../FFmpeg/libavcodec/aarch64/hpeldsp_neon.S | 362 +- .../libavcodec/aarch64/idctdsp_init_aarch64.c | 2 +- .../FFmpeg/libavcodec/aarch64/mdct_neon.S | 332 - .../libavcodec/aarch64/me_cmp_init_aarch64.c | 111 +- .../FFmpeg/libavcodec/aarch64/me_cmp_neon.S | 1582 +- .../libavcodec/aarch64/mpegaudiodsp_neon.S | 8 +- ..._init_aarch64.c => mpegvideoencdsp_init.c} | 39 +- .../libavcodec/aarch64/mpegvideoencdsp_neon.S | 93 + .../external/FFmpeg/libavcodec/aarch64/neon.S | 257 +- .../FFmpeg/libavcodec/aarch64/opusdsp_init.c | 4 +- .../FFmpeg/libavcodec/aarch64/opusdsp_neon.S | 112 +- .../libavcodec/aarch64/rv40dsp_init_aarch64.c | 8 +- .../FFmpeg/libavcodec/aarch64/sbrdsp_neon.S | 294 +- .../libavcodec/aarch64/simple_idct_neon.S | 386 +- .../libavcodec/aarch64/synth_filter_init.c | 13 +- .../libavcodec/aarch64/synth_filter_neon.S | 8 +- .../libavcodec/aarch64/vc1dsp_init_aarch64.c | 8 +- .../FFmpeg/libavcodec/aarch64/videodsp_init.c | 2 +- .../libavcodec/aarch64/vorbisdsp_init.c | 2 +- .../FFmpeg/libavcodec/aarch64/vp8dsp.h | 2 +- .../FFmpeg/libavcodec/aarch64/vp8dsp_neon.S | 310 +- .../FFmpeg/libavcodec/aarch64/vp9itxfm_neon.S | 28 +- .../libavcodec/aarch64/vp9lpf_16bpp_neon.S | 32 +- .../FFmpeg/libavcodec/aarch64/vp9lpf_neon.S | 80 +- .../FFmpeg/libavcodec/aarch64/vvc/Makefile | 10 + .../FFmpeg/libavcodec/aarch64/vvc/alf.S | 293 + .../libavcodec/aarch64/vvc/alf_template.c | 157 + .../FFmpeg/libavcodec/aarch64/vvc/dsp_init.c | 177 + .../FFmpeg/libavcodec/aarch64/vvc/inter.S | 163 + .../FFmpeg/libavcodec/aarch64/vvc/sad.S | 75 + mythtv/external/FFmpeg/libavcodec/aasc.c | 7 +- mythtv/external/FFmpeg/libavcodec/ac3.h | 4 +- .../external/FFmpeg/libavcodec/ac3_parser.c | 56 +- .../FFmpeg/libavcodec/ac3_parser_internal.h | 15 +- mythtv/external/FFmpeg/libavcodec/ac3dec.c | 115 +- mythtv/external/FFmpeg/libavcodec/ac3dec.h | 10 +- .../external/FFmpeg/libavcodec/ac3dec_fixed.c | 7 +- .../external/FFmpeg/libavcodec/ac3dec_float.c | 13 +- mythtv/external/FFmpeg/libavcodec/ac3dsp.c | 16 +- mythtv/external/FFmpeg/libavcodec/ac3dsp.h | 17 +- mythtv/external/FFmpeg/libavcodec/ac3enc.c | 996 +- mythtv/external/FFmpeg/libavcodec/ac3enc.h | 78 +- .../external/FFmpeg/libavcodec/ac3enc_fixed.c | 51 +- .../external/FFmpeg/libavcodec/ac3enc_float.c | 49 +- .../FFmpeg/libavcodec/ac3enc_template.c | 114 +- mythtv/external/FFmpeg/libavcodec/ac3tab.h | 16 - .../FFmpeg/libavcodec/acelp_filters.c | 2 +- .../FFmpeg/libavcodec/acelp_pitch_delay.c | 2 - .../FFmpeg/libavcodec/acelp_vectors.c | 4 +- mythtv/external/FFmpeg/libavcodec/adpcm.c | 114 +- mythtv/external/FFmpeg/libavcodec/adpcmenc.c | 14 +- .../external/FFmpeg/libavcodec/adts_header.c | 19 +- .../external/FFmpeg/libavcodec/adts_header.h | 30 +- .../external/FFmpeg/libavcodec/adts_parser.c | 32 +- mythtv/external/FFmpeg/libavcodec/adx.c | 53 - mythtv/external/FFmpeg/libavcodec/adx.h | 22 +- .../external/FFmpeg/libavcodec/adx_parser.c | 10 + mythtv/external/FFmpeg/libavcodec/adxdec.c | 84 +- mythtv/external/FFmpeg/libavcodec/adxenc.c | 9 +- mythtv/external/FFmpeg/libavcodec/agm.c | 68 +- mythtv/external/FFmpeg/libavcodec/aic.c | 20 +- mythtv/external/FFmpeg/libavcodec/alac.c | 59 +- mythtv/external/FFmpeg/libavcodec/alacdsp.c | 4 +- mythtv/external/FFmpeg/libavcodec/alacdsp.h | 1 + mythtv/external/FFmpeg/libavcodec/alacenc.c | 27 +- .../external/FFmpeg/libavcodec/aliaspixdec.c | 7 +- .../external/FFmpeg/libavcodec/aliaspixenc.c | 3 +- mythtv/external/FFmpeg/libavcodec/allcodecs.c | 116 +- .../external/FFmpeg/libavcodec/alpha/Makefile | 10 - mythtv/external/FFmpeg/libavcodec/alpha/asm.h | 153 - .../FFmpeg/libavcodec/alpha/hpeldsp_alpha.c | 213 - .../libavcodec/alpha/hpeldsp_alpha_asm.S | 125 - .../FFmpeg/libavcodec/alpha/idctdsp_alpha.c | 126 - .../FFmpeg/libavcodec/alpha/idctdsp_alpha.h | 34 - .../libavcodec/alpha/idctdsp_alpha_asm.S | 167 - .../FFmpeg/libavcodec/alpha/me_cmp_alpha.c | 317 - .../FFmpeg/libavcodec/alpha/me_cmp_mvi_asm.S | 179 - .../FFmpeg/libavcodec/alpha/mpegvideo_alpha.c | 110 - .../libavcodec/alpha/pixblockdsp_alpha.c | 79 - .../external/FFmpeg/libavcodec/alpha/regdef.h | 77 - .../libavcodec/alpha/simple_idct_alpha.c | 303 - mythtv/external/FFmpeg/libavcodec/alsdec.c | 24 +- mythtv/external/FFmpeg/libavcodec/amfenc.c | 244 +- mythtv/external/FFmpeg/libavcodec/amfenc.h | 38 +- .../external/FFmpeg/libavcodec/amfenc_av1.c | 635 + .../external/FFmpeg/libavcodec/amfenc_h264.c | 436 +- .../external/FFmpeg/libavcodec/amfenc_hevc.c | 386 +- mythtv/external/FFmpeg/libavcodec/amrnbdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/amrwbdec.c | 19 +- mythtv/external/FFmpeg/libavcodec/anm.c | 5 +- mythtv/external/FFmpeg/libavcodec/ansi.c | 18 +- .../FFmpeg/libavcodec/aom_film_grain.c | 548 + .../FFmpeg/libavcodec/aom_film_grain.h | 51 + .../libavcodec/aom_film_grain_template.c | 577 + mythtv/external/FFmpeg/libavcodec/apac.c | 280 + mythtv/external/FFmpeg/libavcodec/apedec.c | 180 +- mythtv/external/FFmpeg/libavcodec/aptx.c | 10 - mythtv/external/FFmpeg/libavcodec/aptx.h | 2 - mythtv/external/FFmpeg/libavcodec/aptxdec.c | 16 +- mythtv/external/FFmpeg/libavcodec/aptxenc.c | 53 +- mythtv/external/FFmpeg/libavcodec/arbc.c | 19 +- mythtv/external/FFmpeg/libavcodec/argo.c | 14 +- .../external/FFmpeg/libavcodec/arm/Makefile | 11 +- .../FFmpeg/libavcodec/arm/ac3dsp_init_arm.c | 4 +- .../FFmpeg/libavcodec/arm/ac3dsp_neon.S | 63 - .../FFmpeg/libavcodec/arm/fft_init_arm.c | 61 - .../external/FFmpeg/libavcodec/arm/fft_neon.S | 375 - .../external/FFmpeg/libavcodec/arm/fft_vfp.S | 530 - .../FFmpeg/libavcodec/arm/flacdsp_init_arm.c | 8 +- .../libavcodec/arm/fmtconvert_init_arm.c | 3 +- .../libavcodec/arm/h264chroma_init_arm.c | 12 +- .../FFmpeg/libavcodec/arm/h264cmc_neon.S | 4 +- .../FFmpeg/libavcodec/arm/hevcdsp_arm.h | 2 +- .../FFmpeg/libavcodec/arm/hevcdsp_idct_neon.S | 28 +- .../FFmpeg/libavcodec/arm/hevcdsp_init_arm.c | 2 +- .../FFmpeg/libavcodec/arm/hevcdsp_init_neon.c | 82 +- .../FFmpeg/libavcodec/arm/mdct_neon.S | 301 - .../external/FFmpeg/libavcodec/arm/mdct_vfp.S | 347 - .../FFmpeg/libavcodec/arm/me_cmp_init_arm.c | 10 +- .../FFmpeg/libavcodec/arm/mlpdsp_armv5te.S | 6 +- .../FFmpeg/libavcodec/arm/mpegvideo_arm.c | 20 +- .../libavcodec/arm/mpegvideoencdsp_init_arm.c | 4 +- .../FFmpeg/libavcodec/arm/rdft_neon.S | 155 - .../FFmpeg/libavcodec/arm/rv40dsp_init_arm.c | 8 +- .../FFmpeg/libavcodec/arm/sbcdsp_neon.S | 220 +- .../libavcodec/arm/synth_filter_init_arm.c | 13 +- .../FFmpeg/libavcodec/arm/synth_filter_neon.S | 5 +- .../FFmpeg/libavcodec/arm/synth_filter_vfp.S | 5 +- .../FFmpeg/libavcodec/arm/vc1dsp_init_neon.c | 20 +- .../FFmpeg/libavcodec/arm/vc1dsp_neon.S | 40 +- .../libavcodec/arm/videodsp_init_armv5te.c | 2 +- .../libavcodec/arm/vorbisdsp_init_arm.c | 2 +- mythtv/external/FFmpeg/libavcodec/arm/vp8.h | 7 +- .../FFmpeg/libavcodec/arm/vp8_armv6.S | 2 +- .../external/FFmpeg/libavcodec/arm/vp8dsp.h | 2 +- .../FFmpeg/libavcodec/arm/vp8dsp_armv6.S | 6 +- .../arm/{vp56_arith.h => vpx_arith.h} | 18 +- mythtv/external/FFmpeg/libavcodec/ass.c | 53 +- mythtv/external/FFmpeg/libavcodec/assdec.c | 6 +- mythtv/external/FFmpeg/libavcodec/assenc.c | 35 +- mythtv/external/FFmpeg/libavcodec/asv.c | 4 +- mythtv/external/FFmpeg/libavcodec/asv.h | 25 +- mythtv/external/FFmpeg/libavcodec/asvdec.c | 162 +- mythtv/external/FFmpeg/libavcodec/asvenc.c | 89 +- mythtv/external/FFmpeg/libavcodec/atrac1.c | 39 +- mythtv/external/FFmpeg/libavcodec/atrac3.c | 41 +- .../external/FFmpeg/libavcodec/atrac3plus.c | 10 +- .../external/FFmpeg/libavcodec/atrac3plus.h | 19 +- .../FFmpeg/libavcodec/atrac3plusdec.c | 57 +- .../FFmpeg/libavcodec/atrac3plusdsp.c | 21 +- mythtv/external/FFmpeg/libavcodec/atrac9dec.c | 94 +- mythtv/external/FFmpeg/libavcodec/atsc_a53.c | 1 + .../FFmpeg/libavcodec/audio_frame_queue.c | 4 +- mythtv/external/FFmpeg/libavcodec/audiodsp.c | 55 +- mythtv/external/FFmpeg/libavcodec/audiodsp.h | 1 + .../FFmpeg/libavcodec/audiotoolboxdec.c | 9 +- .../FFmpeg/libavcodec/audiotoolboxenc.c | 95 +- mythtv/external/FFmpeg/libavcodec/aura.c | 5 +- mythtv/external/FFmpeg/libavcodec/av1.h | 8 + .../external/FFmpeg/libavcodec/av1_levels.c | 92 + .../external/FFmpeg/libavcodec/av1_levels.h | 58 + mythtv/external/FFmpeg/libavcodec/av1_parse.c | 24 +- mythtv/external/FFmpeg/libavcodec/av1_parse.h | 22 +- .../external/FFmpeg/libavcodec/av1_parser.c | 8 +- mythtv/external/FFmpeg/libavcodec/av1dec.c | 746 +- mythtv/external/FFmpeg/libavcodec/av1dec.h | 46 +- mythtv/external/FFmpeg/libavcodec/avcodec.c | 306 +- mythtv/external/FFmpeg/libavcodec/avcodec.h | 1347 +- .../FFmpeg/libavcodec/avcodec_internal.h | 110 + mythtv/external/FFmpeg/libavcodec/avdct.c | 47 +- mythtv/external/FFmpeg/libavcodec/avfft.c | 215 +- mythtv/external/FFmpeg/libavcodec/avfft.h | 31 + .../FFmpeg/libavcodec/avr32/mathops.h | 101 - mythtv/external/FFmpeg/libavcodec/avrndec.c | 8 +- mythtv/external/FFmpeg/libavcodec/avs.c | 9 +- .../external/FFmpeg/libavcodec/avs2_parser.c | 8 +- .../external/FFmpeg/libavcodec/avs3_parser.c | 7 +- mythtv/external/FFmpeg/libavcodec/avuidec.c | 8 +- mythtv/external/FFmpeg/libavcodec/avuienc.c | 10 +- .../FFmpeg/libavcodec/bethsoftvideo.c | 30 +- mythtv/external/FFmpeg/libavcodec/bfi.c | 22 +- mythtv/external/FFmpeg/libavcodec/bgmc.c | 5 +- mythtv/external/FFmpeg/libavcodec/bgmc.h | 3 +- mythtv/external/FFmpeg/libavcodec/bink.c | 33 +- mythtv/external/FFmpeg/libavcodec/binkaudio.c | 61 +- mythtv/external/FFmpeg/libavcodec/binkdsp.c | 3 +- mythtv/external/FFmpeg/libavcodec/binkdsp.h | 4 +- mythtv/external/FFmpeg/libavcodec/bintext.c | 15 +- .../FFmpeg/libavcodec/bitpacked_dec.c | 23 +- .../FFmpeg/libavcodec/bitpacked_enc.c | 6 +- mythtv/external/FFmpeg/libavcodec/bitstream.h | 198 + .../FFmpeg/libavcodec/bitstream_filters.c | 12 +- .../FFmpeg/libavcodec/bitstream_template.h | 574 + mythtv/external/FFmpeg/libavcodec/blockdsp.c | 11 +- mythtv/external/FFmpeg/libavcodec/blockdsp.h | 7 +- mythtv/external/FFmpeg/libavcodec/bmp.c | 6 +- mythtv/external/FFmpeg/libavcodec/bmpenc.c | 10 +- mythtv/external/FFmpeg/libavcodec/bmvaudio.c | 5 +- mythtv/external/FFmpeg/libavcodec/bmvvideo.c | 9 +- mythtv/external/FFmpeg/libavcodec/bonk.c | 437 + .../external/FFmpeg/libavcodec/brenderpix.c | 14 +- mythtv/external/FFmpeg/libavcodec/bsf.c | 11 +- mythtv/external/FFmpeg/libavcodec/bsf.h | 4 + .../external/FFmpeg/libavcodec/bsf/Makefile | 50 + .../aac_adtstoasc.c} | 7 +- .../av1_frame_merge.c} | 0 .../av1_frame_split.c} | 0 .../av1_metadata.c} | 4 +- .../libavcodec/{chomp_bsf.c => bsf/chomp.c} | 0 .../{dca_core_bsf.c => bsf/dca_core.c} | 0 .../external/FFmpeg/libavcodec/bsf/dovi_rpu.c | 285 + .../external/FFmpeg/libavcodec/bsf/dts2pts.c | 550 + .../dump_extradata.c} | 2 +- .../dv_error_marker.c} | 38 +- .../{eac3_core_bsf.c => bsf/eac3_core.c} | 0 .../FFmpeg/libavcodec/bsf/evc_frame_merge.c | 290 + .../extract_extradata.c} | 72 +- .../filter_units.c} | 67 +- .../h264_metadata.c} | 38 +- .../h264_mp4toannexb.c} | 201 +- .../h264_redundant_pps.c} | 11 - .../h265_metadata.c} | 123 +- .../FFmpeg/libavcodec/bsf/h266_metadata.c | 150 + .../hapqa_extract.c} | 8 +- .../hevc_mp4toannexb.c} | 12 +- .../imx_dump_header.c} | 0 .../libavcodec/bsf/media100_to_mjpegb.c | 169 + .../{mjpeg2jpeg_bsf.c => bsf/mjpeg2jpeg.c} | 0 .../mjpega_dump_header.c} | 0 .../libavcodec/{movsub_bsf.c => bsf/movsub.c} | 0 .../mpeg2_metadata.c} | 0 .../mpeg4_unpack_bframes.c} | 2 +- .../libavcodec/{noise_bsf.c => bsf/noise.c} | 31 +- .../libavcodec/{null_bsf.c => bsf/null.c} | 0 .../opus_metadata.c} | 0 .../{pcm_rechunk_bsf.c => bsf/pcm_rechunk.c} | 44 +- .../pgs_frame_merge.c} | 0 .../prores_metadata.c} | 46 +- .../remove_extradata.c} | 5 +- .../libavcodec/{setts_bsf.c => bsf/setts.c} | 0 .../external/FFmpeg/libavcodec/bsf/showinfo.c | 67 + .../trace_headers.c} | 2 + .../{truehd_core_bsf.c => bsf/truehd_core.c} | 0 .../vp9_metadata.c} | 4 +- .../vp9_raw_reorder.c} | 0 .../vp9_superframe.c} | 0 .../vp9_superframe_split.c} | 0 .../FFmpeg/libavcodec/bsf/vvc_mp4toannexb.c | 328 + mythtv/external/FFmpeg/libavcodec/bswapdsp.c | 4 +- mythtv/external/FFmpeg/libavcodec/bswapdsp.h | 1 + .../external/FFmpeg/libavcodec/bytestream.h | 10 +- mythtv/external/FFmpeg/libavcodec/c93.c | 29 +- mythtv/external/FFmpeg/libavcodec/cavs.c | 12 +- mythtv/external/FFmpeg/libavcodec/cavs.h | 9 +- .../external/FFmpeg/libavcodec/cavs_parser.c | 11 +- mythtv/external/FFmpeg/libavcodec/cavsdec.c | 13 +- mythtv/external/FFmpeg/libavcodec/cavsdsp.c | 26 +- mythtv/external/FFmpeg/libavcodec/cavsdsp.h | 6 +- mythtv/external/FFmpeg/libavcodec/cbs.c | 427 +- mythtv/external/FFmpeg/libavcodec/cbs.h | 130 +- mythtv/external/FFmpeg/libavcodec/cbs_av1.c | 372 +- mythtv/external/FFmpeg/libavcodec/cbs_av1.h | 26 +- .../libavcodec/cbs_av1_syntax_template.c | 144 +- mythtv/external/FFmpeg/libavcodec/cbs_bsf.c | 5 + mythtv/external/FFmpeg/libavcodec/cbs_bsf.h | 6 +- mythtv/external/FFmpeg/libavcodec/cbs_h264.h | 26 +- mythtv/external/FFmpeg/libavcodec/cbs_h2645.c | 1034 +- .../libavcodec/cbs_h264_syntax_template.c | 69 +- mythtv/external/FFmpeg/libavcodec/cbs_h265.h | 83 +- .../libavcodec/cbs_h265_syntax_template.c | 472 +- mythtv/external/FFmpeg/libavcodec/cbs_h266.h | 869 + .../libavcodec/cbs_h266_syntax_template.c | 3493 ++++ .../external/FFmpeg/libavcodec/cbs_internal.h | 217 +- mythtv/external/FFmpeg/libavcodec/cbs_jpeg.c | 81 +- mythtv/external/FFmpeg/libavcodec/cbs_mpeg2.c | 27 +- mythtv/external/FFmpeg/libavcodec/cbs_sei.c | 91 +- mythtv/external/FFmpeg/libavcodec/cbs_sei.h | 63 +- .../libavcodec/cbs_sei_syntax_template.c | 123 +- mythtv/external/FFmpeg/libavcodec/cbs_vp8.c | 386 + mythtv/external/FFmpeg/libavcodec/cbs_vp8.h | 133 + .../libavcodec/cbs_vp8_syntax_template.c | 248 + mythtv/external/FFmpeg/libavcodec/cbs_vp9.c | 124 +- .../external/FFmpeg/libavcodec/ccaption_dec.c | 242 +- .../external/FFmpeg/libavcodec/cdgraphics.c | 48 +- mythtv/external/FFmpeg/libavcodec/cdtoons.c | 10 +- mythtv/external/FFmpeg/libavcodec/cdxl.c | 14 +- mythtv/external/FFmpeg/libavcodec/celp_math.h | 2 +- mythtv/external/FFmpeg/libavcodec/cfhd.c | 25 +- mythtv/external/FFmpeg/libavcodec/cfhd.h | 4 - mythtv/external/FFmpeg/libavcodec/cfhddata.c | 452 +- mythtv/external/FFmpeg/libavcodec/cfhdenc.c | 89 +- .../external/FFmpeg/libavcodec/cfhdencdsp.c | 6 +- .../external/FFmpeg/libavcodec/cfhdencdsp.h | 4 +- mythtv/external/FFmpeg/libavcodec/cinepak.c | 18 +- .../external/FFmpeg/libavcodec/cinepakenc.c | 14 +- .../external/FFmpeg/libavcodec/clearvideo.c | 250 +- mythtv/external/FFmpeg/libavcodec/cljrdec.c | 7 +- mythtv/external/FFmpeg/libavcodec/cljrenc.c | 13 +- mythtv/external/FFmpeg/libavcodec/cllc.c | 21 +- mythtv/external/FFmpeg/libavcodec/cngdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/cngenc.c | 10 +- mythtv/external/FFmpeg/libavcodec/codec.h | 59 +- .../external/FFmpeg/libavcodec/codec_desc.c | 214 +- .../external/FFmpeg/libavcodec/codec_desc.h | 8 +- mythtv/external/FFmpeg/libavcodec/codec_id.h | 37 +- .../FFmpeg/libavcodec/codec_internal.h | 89 +- mythtv/external/FFmpeg/libavcodec/codec_par.c | 104 +- mythtv/external/FFmpeg/libavcodec/codec_par.h | 58 +- .../FFmpeg/libavcodec/container_fifo.c | 195 + .../FFmpeg/libavcodec/container_fifo.h | 89 + mythtv/external/FFmpeg/libavcodec/cook.c | 30 +- .../external/FFmpeg/libavcodec/cos_tablegen.c | 80 - mythtv/external/FFmpeg/libavcodec/cpia.c | 19 +- mythtv/external/FFmpeg/libavcodec/cri.c | 22 +- mythtv/external/FFmpeg/libavcodec/crystalhd.c | 817 - mythtv/external/FFmpeg/libavcodec/cscd.c | 21 +- mythtv/external/FFmpeg/libavcodec/cuviddec.c | 101 +- mythtv/external/FFmpeg/libavcodec/cyuv.c | 46 +- mythtv/external/FFmpeg/libavcodec/d3d11va.h | 3 - .../external/FFmpeg/libavcodec/d3d12va_av1.c | 207 + .../FFmpeg/libavcodec/d3d12va_decode.c | 537 + .../FFmpeg/libavcodec/d3d12va_decode.h | 179 + .../FFmpeg/libavcodec/d3d12va_encode.c | 1557 ++ .../FFmpeg/libavcodec/d3d12va_encode.h | 335 + .../FFmpeg/libavcodec/d3d12va_encode_hevc.c | 1007 ++ .../external/FFmpeg/libavcodec/d3d12va_h264.c | 203 + .../external/FFmpeg/libavcodec/d3d12va_hevc.c | 208 + .../FFmpeg/libavcodec/d3d12va_mpeg2.c | 179 + .../external/FFmpeg/libavcodec/d3d12va_vc1.c | 214 + .../external/FFmpeg/libavcodec/d3d12va_vp9.c | 167 + mythtv/external/FFmpeg/libavcodec/dca_core.c | 61 +- mythtv/external/FFmpeg/libavcodec/dca_core.h | 5 +- mythtv/external/FFmpeg/libavcodec/dca_lbr.c | 65 +- mythtv/external/FFmpeg/libavcodec/dca_lbr.h | 5 +- .../external/FFmpeg/libavcodec/dca_parser.c | 16 +- .../FFmpeg/libavcodec/dca_syncwords.h | 3 + mythtv/external/FFmpeg/libavcodec/dca_xll.c | 29 +- mythtv/external/FFmpeg/libavcodec/dca_xll.h | 3 + mythtv/external/FFmpeg/libavcodec/dcaadpcm.c | 1 + mythtv/external/FFmpeg/libavcodec/dcadec.c | 45 +- mythtv/external/FFmpeg/libavcodec/dcadsp.c | 10 +- mythtv/external/FFmpeg/libavcodec/dcadsp.h | 5 +- mythtv/external/FFmpeg/libavcodec/dcaenc.c | 153 +- mythtv/external/FFmpeg/libavcodec/dcahuff.c | 2058 +-- mythtv/external/FFmpeg/libavcodec/dcahuff.h | 39 +- mythtv/external/FFmpeg/libavcodec/dct.c | 228 - mythtv/external/FFmpeg/libavcodec/dct.h | 34 +- mythtv/external/FFmpeg/libavcodec/dds.c | 20 +- mythtv/external/FFmpeg/libavcodec/decode.c | 1511 +- mythtv/external/FFmpeg/libavcodec/decode.h | 134 +- mythtv/external/FFmpeg/libavcodec/defs.h | 167 + mythtv/external/FFmpeg/libavcodec/dfa.c | 9 +- mythtv/external/FFmpeg/libavcodec/dfpwmdec.c | 10 +- mythtv/external/FFmpeg/libavcodec/dfpwmenc.c | 8 +- mythtv/external/FFmpeg/libavcodec/dirac.c | 4 + mythtv/external/FFmpeg/libavcodec/dirac.h | 6 +- .../external/FFmpeg/libavcodec/dirac_arith.h | 4 + mythtv/external/FFmpeg/libavcodec/dirac_dwt.c | 7 +- mythtv/external/FFmpeg/libavcodec/dirac_dwt.h | 13 +- .../FFmpeg/libavcodec/dirac_dwt_template.c | 54 +- mythtv/external/FFmpeg/libavcodec/diracdec.c | 83 +- mythtv/external/FFmpeg/libavcodec/diracdsp.c | 4 +- mythtv/external/FFmpeg/libavcodec/dnxhddata.c | 14 +- mythtv/external/FFmpeg/libavcodec/dnxhddec.c | 79 +- mythtv/external/FFmpeg/libavcodec/dnxhdenc.c | 126 +- mythtv/external/FFmpeg/libavcodec/dnxhdenc.h | 8 +- mythtv/external/FFmpeg/libavcodec/dolby_e.c | 59 +- .../FFmpeg/libavcodec/dolby_e_parser.c | 2 - mythtv/external/FFmpeg/libavcodec/dovi_rpu.c | 447 +- mythtv/external/FFmpeg/libavcodec/dovi_rpu.h | 151 +- .../external/FFmpeg/libavcodec/dovi_rpudec.c | 742 + .../external/FFmpeg/libavcodec/dovi_rpuenc.c | 937 + mythtv/external/FFmpeg/libavcodec/dpcm.c | 69 +- mythtv/external/FFmpeg/libavcodec/dpx.c | 68 +- mythtv/external/FFmpeg/libavcodec/dpxenc.c | 3 +- mythtv/external/FFmpeg/libavcodec/dsd.c | 12 +- mythtv/external/FFmpeg/libavcodec/dsddec.c | 10 +- .../external/FFmpeg/libavcodec/dsicinaudio.c | 7 +- .../external/FFmpeg/libavcodec/dsicinvideo.c | 11 +- mythtv/external/FFmpeg/libavcodec/dss_sp.c | 6 +- mythtv/external/FFmpeg/libavcodec/dstdec.c | 17 +- mythtv/external/FFmpeg/libavcodec/dv.c | 26 +- mythtv/external/FFmpeg/libavcodec/dv.h | 102 +- .../external/FFmpeg/libavcodec/dv_internal.h | 62 + .../external/FFmpeg/libavcodec/dv_tablegen.h | 7 +- .../external/FFmpeg/libavcodec/dvaudiodec.c | 5 +- mythtv/external/FFmpeg/libavcodec/dvbsubdec.c | 6 +- mythtv/external/FFmpeg/libavcodec/dvbsubenc.c | 2 +- mythtv/external/FFmpeg/libavcodec/dvdata.c | 64 +- mythtv/external/FFmpeg/libavcodec/dvdata.h | 3 +- mythtv/external/FFmpeg/libavcodec/dvdec.c | 109 +- mythtv/external/FFmpeg/libavcodec/dvdsub.c | 3 +- mythtv/external/FFmpeg/libavcodec/dvdsub.h | 26 + .../FFmpeg/libavcodec/dvdsub_parser.c | 2 +- mythtv/external/FFmpeg/libavcodec/dvdsubdec.c | 9 +- mythtv/external/FFmpeg/libavcodec/dvdsubenc.c | 11 +- mythtv/external/FFmpeg/libavcodec/dvenc.c | 133 +- mythtv/external/FFmpeg/libavcodec/dxa.c | 32 +- mythtv/external/FFmpeg/libavcodec/dxtory.c | 4 +- mythtv/external/FFmpeg/libavcodec/dxv.c | 372 +- mythtv/external/FFmpeg/libavcodec/dxv.h | 34 + mythtv/external/FFmpeg/libavcodec/dxva2.c | 84 +- mythtv/external/FFmpeg/libavcodec/dxva2.h | 3 - mythtv/external/FFmpeg/libavcodec/dxva2_av1.c | 56 +- .../external/FFmpeg/libavcodec/dxva2_h264.c | 73 +- .../external/FFmpeg/libavcodec/dxva2_hevc.c | 109 +- .../FFmpeg/libavcodec/dxva2_internal.h | 94 +- .../external/FFmpeg/libavcodec/dxva2_mpeg2.c | 74 +- mythtv/external/FFmpeg/libavcodec/dxva2_vc1.c | 105 +- mythtv/external/FFmpeg/libavcodec/dxva2_vp9.c | 54 +- mythtv/external/FFmpeg/libavcodec/dxvenc.c | 358 + .../FFmpeg/libavcodec/dynamic_hdr10_plus.c | 198 - .../FFmpeg/libavcodec/dynamic_hdr_vivid.c | 61 +- mythtv/external/FFmpeg/libavcodec/eac3dec.c | 21 +- mythtv/external/FFmpeg/libavcodec/eac3enc.c | 165 +- mythtv/external/FFmpeg/libavcodec/eac3enc.h | 10 - mythtv/external/FFmpeg/libavcodec/eacmv.c | 20 +- mythtv/external/FFmpeg/libavcodec/eamad.c | 22 +- mythtv/external/FFmpeg/libavcodec/eatgq.c | 81 +- mythtv/external/FFmpeg/libavcodec/eatgv.c | 13 +- mythtv/external/FFmpeg/libavcodec/eatqi.c | 16 +- mythtv/external/FFmpeg/libavcodec/elbg.c | 63 +- mythtv/external/FFmpeg/libavcodec/encode.c | 584 +- mythtv/external/FFmpeg/libavcodec/encode.h | 36 +- .../FFmpeg/libavcodec/error_resilience.c | 73 +- .../FFmpeg/libavcodec/error_resilience.h | 20 +- mythtv/external/FFmpeg/libavcodec/escape124.c | 50 +- mythtv/external/FFmpeg/libavcodec/escape130.c | 6 +- mythtv/external/FFmpeg/libavcodec/evc.h | 146 + mythtv/external/FFmpeg/libavcodec/evc_parse.c | 214 + mythtv/external/FFmpeg/libavcodec/evc_parse.h | 105 + .../external/FFmpeg/libavcodec/evc_parser.c | 377 + mythtv/external/FFmpeg/libavcodec/evc_ps.c | 443 + mythtv/external/FFmpeg/libavcodec/evc_ps.h | 224 + mythtv/external/FFmpeg/libavcodec/evrcdec.c | 19 +- mythtv/external/FFmpeg/libavcodec/exr.c | 176 +- mythtv/external/FFmpeg/libavcodec/exrdsp.c | 20 +- mythtv/external/FFmpeg/libavcodec/exrdsp.h | 1 + mythtv/external/FFmpeg/libavcodec/exrenc.c | 44 +- mythtv/external/FFmpeg/libavcodec/faandct.c | 1 + mythtv/external/FFmpeg/libavcodec/faanidct.c | 1 + mythtv/external/FFmpeg/libavcodec/fastaudio.c | 9 +- mythtv/external/FFmpeg/libavcodec/faxcompr.c | 33 +- mythtv/external/FFmpeg/libavcodec/fdctdsp.c | 5 +- mythtv/external/FFmpeg/libavcodec/fdctdsp.h | 21 +- mythtv/external/FFmpeg/libavcodec/ffjni.c | 15 +- mythtv/external/FFmpeg/libavcodec/ffjni.h | 3 +- mythtv/external/FFmpeg/libavcodec/fflcms2.c | 361 + mythtv/external/FFmpeg/libavcodec/fflcms2.h | 94 + .../external/FFmpeg/libavcodec/fft-internal.h | 62 - mythtv/external/FFmpeg/libavcodec/fft.h | 159 - .../external/FFmpeg/libavcodec/fft_fixed_32.c | 51 - .../FFmpeg/libavcodec/fft_init_table.c | 344 - mythtv/external/FFmpeg/libavcodec/fft_table.h | 66 - .../external/FFmpeg/libavcodec/fft_template.c | 628 - mythtv/external/FFmpeg/libavcodec/ffv1.c | 137 +- mythtv/external/FFmpeg/libavcodec/ffv1.h | 99 +- .../FFmpeg/libavcodec/ffv1_template.c | 22 +- mythtv/external/FFmpeg/libavcodec/ffv1dec.c | 608 +- .../FFmpeg/libavcodec/ffv1dec_template.c | 73 +- mythtv/external/FFmpeg/libavcodec/ffv1enc.c | 335 +- .../FFmpeg/libavcodec/ffv1enc_template.c | 85 +- .../external/FFmpeg/libavcodec/ffwavesynth.c | 7 +- mythtv/external/FFmpeg/libavcodec/fic.c | 10 +- mythtv/external/FFmpeg/libavcodec/fitsdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/fitsenc.c | 12 +- mythtv/external/FFmpeg/libavcodec/flac.c | 47 +- mythtv/external/FFmpeg/libavcodec/flac.h | 92 +- .../external/FFmpeg/libavcodec/flac_parse.h | 89 + .../external/FFmpeg/libavcodec/flac_parser.c | 36 +- mythtv/external/FFmpeg/libavcodec/flacdec.c | 299 +- mythtv/external/FFmpeg/libavcodec/flacdsp.c | 44 +- mythtv/external/FFmpeg/libavcodec/flacdsp.h | 12 +- mythtv/external/FFmpeg/libavcodec/flacenc.c | 591 +- .../external/FFmpeg/libavcodec/flacencdsp.c | 40 + .../external/FFmpeg/libavcodec/flacencdsp.h | 34 + mythtv/external/FFmpeg/libavcodec/flashsv.c | 16 +- .../external/FFmpeg/libavcodec/flashsv2enc.c | 25 +- .../external/FFmpeg/libavcodec/flashsvenc.c | 91 +- mythtv/external/FFmpeg/libavcodec/flicvideo.c | 291 +- .../libavcodec/{fft_float.c => float2half.c} | 3 +- .../external/FFmpeg/libavcodec/float2half.h | 67 - mythtv/external/FFmpeg/libavcodec/flvdec.c | 12 +- mythtv/external/FFmpeg/libavcodec/flvenc.c | 8 +- mythtv/external/FFmpeg/libavcodec/flvenc.h | 2 +- .../external/FFmpeg/libavcodec/fmtconvert.c | 22 +- .../external/FFmpeg/libavcodec/fmtconvert.h | 23 +- mythtv/external/FFmpeg/libavcodec/fmvc.c | 31 +- .../FFmpeg/libavcodec/frame_thread_encoder.c | 85 +- mythtv/external/FFmpeg/libavcodec/fraps.c | 27 +- mythtv/external/FFmpeg/libavcodec/frwu.c | 8 +- mythtv/external/FFmpeg/libavcodec/ftr.c | 212 + .../external/FFmpeg/libavcodec/ftr_parser.c | 104 + mythtv/external/FFmpeg/libavcodec/g2meet.c | 90 +- mythtv/external/FFmpeg/libavcodec/g722dec.c | 5 +- mythtv/external/FFmpeg/libavcodec/g722dsp.c | 2 + mythtv/external/FFmpeg/libavcodec/g722dsp.h | 1 + mythtv/external/FFmpeg/libavcodec/g722enc.c | 12 +- mythtv/external/FFmpeg/libavcodec/g723_1dec.c | 12 +- mythtv/external/FFmpeg/libavcodec/g723_1enc.c | 79 +- mythtv/external/FFmpeg/libavcodec/g726.c | 22 +- mythtv/external/FFmpeg/libavcodec/g729dec.c | 24 +- .../FFmpeg/libavcodec/g729postfilter.c | 14 +- .../FFmpeg/libavcodec/g729postfilter.h | 14 +- mythtv/external/FFmpeg/libavcodec/gdv.c | 5 +- mythtv/external/FFmpeg/libavcodec/gemdec.c | 11 +- mythtv/external/FFmpeg/libavcodec/get_bits.h | 372 +- .../external/FFmpeg/libavcodec/get_buffer.c | 94 +- mythtv/external/FFmpeg/libavcodec/gif.c | 26 +- .../external/FFmpeg/libavcodec/gif_parser.c | 45 +- mythtv/external/FFmpeg/libavcodec/gifdec.c | 134 +- mythtv/external/FFmpeg/libavcodec/golomb.h | 5 + mythtv/external/FFmpeg/libavcodec/gsmdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/h261.c | 16 +- mythtv/external/FFmpeg/libavcodec/h261.h | 9 +- mythtv/external/FFmpeg/libavcodec/h261data.c | 14 +- mythtv/external/FFmpeg/libavcodec/h261dec.c | 200 +- mythtv/external/FFmpeg/libavcodec/h261enc.c | 178 +- mythtv/external/FFmpeg/libavcodec/h261enc.h | 5 +- mythtv/external/FFmpeg/libavcodec/h263.c | 51 +- .../external/FFmpeg/libavcodec/h263_parser.c | 11 - mythtv/external/FFmpeg/libavcodec/h263dec.c | 267 +- mythtv/external/FFmpeg/libavcodec/h263dec.h | 16 +- mythtv/external/FFmpeg/libavcodec/h263dsp.c | 4 +- mythtv/external/FFmpeg/libavcodec/h263dsp.h | 1 + mythtv/external/FFmpeg/libavcodec/h263enc.h | 34 +- .../external/FFmpeg/libavcodec/h2645_parse.c | 94 +- .../external/FFmpeg/libavcodec/h2645_parse.h | 19 +- mythtv/external/FFmpeg/libavcodec/h2645_sei.c | 917 + mythtv/external/FFmpeg/libavcodec/h2645_sei.h | 178 + mythtv/external/FFmpeg/libavcodec/h2645_vui.c | 89 + mythtv/external/FFmpeg/libavcodec/h2645_vui.h | 51 + mythtv/external/FFmpeg/libavcodec/h2645data.c | 39 + mythtv/external/FFmpeg/libavcodec/h2645data.h | 26 + .../external/FFmpeg/libavcodec/h264_cavlc.c | 210 +- .../external/FFmpeg/libavcodec/h264_direct.c | 6 +- .../FFmpeg/libavcodec/h264_loopfilter.c | 4 +- mythtv/external/FFmpeg/libavcodec/h264_mb.c | 5 +- .../external/FFmpeg/libavcodec/h264_mvpred.h | 132 + .../external/FFmpeg/libavcodec/h264_parse.c | 20 +- .../external/FFmpeg/libavcodec/h264_parse.h | 2 +- .../external/FFmpeg/libavcodec/h264_parser.c | 28 +- .../external/FFmpeg/libavcodec/h264_picture.c | 112 +- mythtv/external/FFmpeg/libavcodec/h264_ps.c | 177 +- mythtv/external/FFmpeg/libavcodec/h264_ps.h | 34 +- mythtv/external/FFmpeg/libavcodec/h264_refs.c | 171 +- mythtv/external/FFmpeg/libavcodec/h264_sei.c | 356 +- mythtv/external/FFmpeg/libavcodec/h264_sei.h | 90 +- .../external/FFmpeg/libavcodec/h264_slice.c | 611 +- .../external/FFmpeg/libavcodec/h264chroma.c | 2 + .../external/FFmpeg/libavcodec/h264chroma.h | 3 +- .../FFmpeg/libavcodec/h264chroma_template.c | 16 +- mythtv/external/FFmpeg/libavcodec/h264data.h | 20 - mythtv/external/FFmpeg/libavcodec/h264dec.c | 221 +- mythtv/external/FFmpeg/libavcodec/h264dec.h | 200 +- mythtv/external/FFmpeg/libavcodec/h264dsp.c | 2 + mythtv/external/FFmpeg/libavcodec/h264dsp.h | 2 + .../FFmpeg/libavcodec/h264idct_template.c | 2 +- .../FFmpeg/libavcodec/h264qpel_template.c | 93 +- .../libavcodec/h26x/h2656_deblock_template.c | 99 + .../libavcodec/h26x/h2656_inter_template.c | 577 + .../libavcodec/h26x/h2656_sao_template.c | 217 + mythtv/external/FFmpeg/libavcodec/h274.c | 32 +- mythtv/external/FFmpeg/libavcodec/h274.h | 17 +- .../libavcodec/{mdct_float.c => half2float.c} | 3 +- mythtv/external/FFmpeg/libavcodec/hap.c | 1 + mythtv/external/FFmpeg/libavcodec/hap.h | 6 +- mythtv/external/FFmpeg/libavcodec/hapdec.c | 27 +- mythtv/external/FFmpeg/libavcodec/hapenc.c | 37 +- mythtv/external/FFmpeg/libavcodec/hcadec.c | 243 +- mythtv/external/FFmpeg/libavcodec/hcom.c | 7 +- .../external/FFmpeg/libavcodec/hdr_parser.c | 79 + mythtv/external/FFmpeg/libavcodec/hdrdec.c | 228 + mythtv/external/FFmpeg/libavcodec/hdrenc.c | 190 + .../external/FFmpeg/libavcodec/hevc/Makefile | 28 + .../libavcodec/{hevc_cabac.c => hevc/cabac.c} | 679 +- .../libavcodec/{hevc_data.c => hevc/data.c} | 2 +- .../libavcodec/{hevc_data.h => hevc/data.h} | 0 .../libavcodec/{hevcdsp.c => hevc/dsp.c} | 16 +- .../libavcodec/{hevcdsp.h => hevc/dsp.h} | 85 +- .../FFmpeg/libavcodec/hevc/dsp_template.c | 934 + .../{hevc_filter.c => hevc/filter.c} | 521 +- .../FFmpeg/libavcodec/{ => hevc}/hevc.h | 18 +- .../FFmpeg/libavcodec/{ => hevc}/hevcdec.c | 3288 ++-- .../FFmpeg/libavcodec/{ => hevc}/hevcdec.h | 424 +- .../libavcodec/{hevc_mvs.c => hevc/mvs.c} | 176 +- .../libavcodec/{hevc_parse.c => hevc/parse.c} | 25 +- .../libavcodec/{hevc_parse.h => hevc/parse.h} | 4 +- .../{hevc_parser.c => hevc/parser.c} | 92 +- .../libavcodec/{hevcpred.c => hevc/pred.c} | 10 +- .../libavcodec/{hevcpred.h => hevc/pred.h} | 12 +- .../pred_template.c} | 95 +- .../libavcodec/{hevc_ps.c => hevc/ps.c} | 1456 +- .../libavcodec/{hevc_ps.h => hevc/ps.h} | 294 +- .../{hevc_ps_enc.c => hevc/ps_enc.c} | 2 +- mythtv/external/FFmpeg/libavcodec/hevc/refs.c | 588 + mythtv/external/FFmpeg/libavcodec/hevc/sei.c | 298 + .../libavcodec/{hevc_sei.h => hevc/sei.h} | 102 +- mythtv/external/FFmpeg/libavcodec/hevc_refs.c | 530 - mythtv/external/FFmpeg/libavcodec/hevc_sei.c | 580 - .../FFmpeg/libavcodec/hevcdsp_template.c | 1692 -- mythtv/external/FFmpeg/libavcodec/hnm4video.c | 10 +- mythtv/external/FFmpeg/libavcodec/hpeldsp.c | 2 - mythtv/external/FFmpeg/libavcodec/hq_hqa.c | 111 +- mythtv/external/FFmpeg/libavcodec/hq_hqa.h | 62 - .../libavcodec/{hq_hqadata.c => hq_hqadata.h} | 37 +- mythtv/external/FFmpeg/libavcodec/hqx.c | 12 +- mythtv/external/FFmpeg/libavcodec/hqxvlc.c | 4 +- mythtv/external/FFmpeg/libavcodec/huffman.c | 2 +- mythtv/external/FFmpeg/libavcodec/huffyuv.c | 69 +- mythtv/external/FFmpeg/libavcodec/huffyuv.h | 68 +- .../external/FFmpeg/libavcodec/huffyuvdec.c | 223 +- .../external/FFmpeg/libavcodec/huffyuvdsp.c | 5 +- .../external/FFmpeg/libavcodec/huffyuvdsp.h | 15 +- .../external/FFmpeg/libavcodec/huffyuvenc.c | 400 +- .../FFmpeg/libavcodec/huffyuvencdsp.c | 36 +- .../FFmpeg/libavcodec/huffyuvencdsp.h | 6 +- .../FFmpeg/libavcodec/hw_base_encode.c | 817 + .../FFmpeg/libavcodec/hw_base_encode.h | 253 + .../FFmpeg/libavcodec/hw_base_encode_h264.c | 265 + .../FFmpeg/libavcodec/hw_base_encode_h264.h | 52 + .../FFmpeg/libavcodec/hw_base_encode_h265.c | 351 + .../FFmpeg/libavcodec/hw_base_encode_h265.h | 56 + .../FFmpeg/libavcodec/hwaccel_internal.h | 180 + mythtv/external/FFmpeg/libavcodec/hwaccels.h | 132 +- mythtv/external/FFmpeg/libavcodec/hwconfig.h | 11 +- .../external/FFmpeg/libavcodec/idcinvideo.c | 16 +- mythtv/external/FFmpeg/libavcodec/idctdsp.c | 40 +- mythtv/external/FFmpeg/libavcodec/idctdsp.h | 46 +- mythtv/external/FFmpeg/libavcodec/iff.c | 348 +- mythtv/external/FFmpeg/libavcodec/iirfilter.c | 18 +- mythtv/external/FFmpeg/libavcodec/iirfilter.h | 15 - mythtv/external/FFmpeg/libavcodec/ilbcdec.c | 97 +- mythtv/external/FFmpeg/libavcodec/imc.c | 142 +- mythtv/external/FFmpeg/libavcodec/imm4.c | 101 +- mythtv/external/FFmpeg/libavcodec/imm5.c | 5 +- mythtv/external/FFmpeg/libavcodec/imx.c | 24 +- mythtv/external/FFmpeg/libavcodec/indeo2.c | 16 +- mythtv/external/FFmpeg/libavcodec/indeo3.c | 10 +- mythtv/external/FFmpeg/libavcodec/indeo4.c | 3 +- mythtv/external/FFmpeg/libavcodec/indeo5.c | 4 +- .../external/FFmpeg/libavcodec/intelh263dec.c | 15 +- mythtv/external/FFmpeg/libavcodec/internal.h | 177 +- .../external/FFmpeg/libavcodec/interplayacm.c | 15 +- .../FFmpeg/libavcodec/interplayvideo.c | 26 +- mythtv/external/FFmpeg/libavcodec/intrax8.c | 90 +- mythtv/external/FFmpeg/libavcodec/intrax8.h | 15 +- .../external/FFmpeg/libavcodec/ituh263dec.c | 149 +- .../external/FFmpeg/libavcodec/ituh263enc.c | 57 +- mythtv/external/FFmpeg/libavcodec/itut35.h | 32 + mythtv/external/FFmpeg/libavcodec/ivi.c | 15 +- mythtv/external/FFmpeg/libavcodec/ivi.h | 15 +- mythtv/external/FFmpeg/libavcodec/j2kenc.c | 135 +- .../external/FFmpeg/libavcodec/jacosubdec.c | 3 +- mythtv/external/FFmpeg/libavcodec/jfdctfst.c | 2 +- .../FFmpeg/libavcodec/jfdctint_template.c | 10 +- mythtv/external/FFmpeg/libavcodec/jni.c | 49 +- mythtv/external/FFmpeg/libavcodec/jni.h | 21 + mythtv/external/FFmpeg/libavcodec/jpeg2000.c | 18 +- mythtv/external/FFmpeg/libavcodec/jpeg2000.h | 15 + .../external/FFmpeg/libavcodec/jpeg2000dec.c | 706 +- .../external/FFmpeg/libavcodec/jpeg2000dec.h | 126 + .../external/FFmpeg/libavcodec/jpeg2000dsp.c | 16 +- .../external/FFmpeg/libavcodec/jpeg2000dsp.h | 3 + .../external/FFmpeg/libavcodec/jpeg2000dwt.c | 2 +- .../FFmpeg/libavcodec/jpeg2000htdec.c | 1509 ++ .../FFmpeg/libavcodec/jpeg2000htdec.h | 34 + mythtv/external/FFmpeg/libavcodec/jpegls.c | 1 + mythtv/external/FFmpeg/libavcodec/jpeglsdec.c | 21 +- mythtv/external/FFmpeg/libavcodec/jpeglsenc.c | 21 +- .../FFmpeg/libavcodec/jpegquanttables.c | 54 + .../jpegquanttables.h} | 27 +- .../external/FFmpeg/libavcodec/jpegtables.c | 27 - .../external/FFmpeg/libavcodec/jpegtables.h | 4 + mythtv/external/FFmpeg/libavcodec/jpegxl.h | 94 + .../external/FFmpeg/libavcodec/jpegxl_parse.c | 520 + .../external/FFmpeg/libavcodec/jpegxl_parse.h | 72 + .../FFmpeg/libavcodec/jpegxl_parser.c | 1538 ++ mythtv/external/FFmpeg/libavcodec/jrevdct.c | 38 +- mythtv/external/FFmpeg/libavcodec/jvdec.c | 17 +- mythtv/external/FFmpeg/libavcodec/kbdwin.c | 49 +- mythtv/external/FFmpeg/libavcodec/kgv1dec.c | 6 +- mythtv/external/FFmpeg/libavcodec/kmvc.c | 26 +- mythtv/external/FFmpeg/libavcodec/lagarith.c | 76 +- .../external/FFmpeg/libavcodec/lagarithrac.h | 3 +- mythtv/external/FFmpeg/libavcodec/lcevcdec.c | 319 + mythtv/external/FFmpeg/libavcodec/lcevcdec.h | 42 + mythtv/external/FFmpeg/libavcodec/lcldec.c | 59 +- mythtv/external/FFmpeg/libavcodec/lclenc.c | 8 +- mythtv/external/FFmpeg/libavcodec/leaddata.h | 62 + mythtv/external/FFmpeg/libavcodec/leaddec.c | 314 + mythtv/external/FFmpeg/libavcodec/leb.h | 70 + .../libaom.c} | 41 +- .../thread.h => libavcodec/libaom.h} | 17 +- mythtv/external/FFmpeg/libavcodec/libaomdec.c | 67 +- mythtv/external/FFmpeg/libavcodec/libaomenc.c | 308 +- .../external/FFmpeg/libavcodec/libaribb24.c | 79 +- .../FFmpeg/libavcodec/libaribcaption.c | 1182 ++ .../external/FFmpeg/libavcodec/libcelt_dec.c | 5 +- mythtv/external/FFmpeg/libavcodec/libcodec2.c | 19 +- mythtv/external/FFmpeg/libavcodec/libdav1d.c | 298 +- mythtv/external/FFmpeg/libavcodec/libdavs2.c | 7 +- .../FFmpeg/libavcodec/libfdk-aacdec.c | 36 +- .../FFmpeg/libavcodec/libfdk-aacenc.c | 219 +- mythtv/external/FFmpeg/libavcodec/libgsmdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/libgsmenc.c | 16 +- mythtv/external/FFmpeg/libavcodec/libilbc.c | 9 +- mythtv/external/FFmpeg/libavcodec/libjxl.h | 1 + mythtv/external/FFmpeg/libavcodec/libjxldec.c | 203 +- mythtv/external/FFmpeg/libavcodec/libjxlenc.c | 70 +- .../external/FFmpeg/libavcodec/libkvazaar.c | 35 +- mythtv/external/FFmpeg/libavcodec/liblc3dec.c | 146 + mythtv/external/FFmpeg/libavcodec/liblc3enc.c | 214 + .../external/FFmpeg/libavcodec/libmp3lame.c | 30 +- .../FFmpeg/libavcodec/libopencore-amr.c | 19 +- .../external/FFmpeg/libavcodec/libopenh264.c | 15 - .../external/FFmpeg/libavcodec/libopenh264.h | 2 - .../FFmpeg/libavcodec/libopenh264dec.c | 13 +- .../FFmpeg/libavcodec/libopenh264enc.c | 127 +- .../FFmpeg/libavcodec/libopenjpegdec.c | 515 - .../FFmpeg/libavcodec/libopenjpegenc.c | 43 +- .../external/FFmpeg/libavcodec/libopusdec.c | 8 +- .../external/FFmpeg/libavcodec/libopusenc.c | 47 +- mythtv/external/FFmpeg/libavcodec/librav1e.c | 163 +- .../external/FFmpeg/libavcodec/librsvgdec.c | 87 +- mythtv/external/FFmpeg/libavcodec/libshine.c | 13 +- .../external/FFmpeg/libavcodec/libspeexdec.c | 11 +- .../external/FFmpeg/libavcodec/libspeexenc.c | 18 +- mythtv/external/FFmpeg/libavcodec/libsvtav1.c | 252 +- .../external/FFmpeg/libavcodec/libtheoraenc.c | 21 +- .../external/FFmpeg/libavcodec/libtwolame.c | 24 +- mythtv/external/FFmpeg/libavcodec/libuavs3d.c | 25 +- .../FFmpeg/libavcodec/libvo-amrwbenc.c | 7 +- .../external/FFmpeg/libavcodec/libvorbisdec.c | 5 +- .../external/FFmpeg/libavcodec/libvorbisenc.c | 6 +- mythtv/external/FFmpeg/libavcodec/libvpx.c | 81 - mythtv/external/FFmpeg/libavcodec/libvpx.h | 10 +- mythtv/external/FFmpeg/libavcodec/libvpxdec.c | 40 +- mythtv/external/FFmpeg/libavcodec/libvpxenc.c | 464 +- mythtv/external/FFmpeg/libavcodec/libvvenc.c | 491 + .../external/FFmpeg/libavcodec/libwebpenc.c | 7 +- .../libavcodec/libwebpenc_animencoder.c | 44 +- .../FFmpeg/libavcodec/libwebpenc_common.c | 17 +- mythtv/external/FFmpeg/libavcodec/libx264.c | 1025 +- mythtv/external/FFmpeg/libavcodec/libx265.c | 374 +- mythtv/external/FFmpeg/libavcodec/libxavs.c | 30 +- mythtv/external/FFmpeg/libavcodec/libxavs2.c | 10 +- mythtv/external/FFmpeg/libavcodec/libxevd.c | 486 + mythtv/external/FFmpeg/libavcodec/libxeve.c | 619 + mythtv/external/FFmpeg/libavcodec/libxvid.c | 23 +- .../FFmpeg/libavcodec/libzvbi-teletextdec.c | 13 +- mythtv/external/FFmpeg/libavcodec/ljpegenc.c | 39 +- mythtv/external/FFmpeg/libavcodec/loco.c | 15 +- .../FFmpeg/libavcodec/loongarch/Makefile | 17 +- .../FFmpeg/libavcodec/loongarch/cabac.h | 1 + .../libavcodec/loongarch/h264_deblock_lasx.c | 2 +- .../loongarch/h264_intrapred_init_loongarch.c | 18 +- .../loongarch/h264_intrapred_lasx.c | 121 - ...pred_lasx.h => h264_intrapred_loongarch.h} | 12 +- .../FFmpeg/libavcodec/loongarch/h264chroma.S | 966 + .../loongarch/h264chroma_init_loongarch.c | 10 +- .../libavcodec/loongarch/h264chroma_lasx.c | 1280 -- .../libavcodec/loongarch/h264chroma_lasx.h | 36 - .../loongarch/h264chroma_loongarch.h | 41 + .../FFmpeg/libavcodec/loongarch/h264dsp.S | 1977 +++ .../loongarch/h264dsp_init_loongarch.c | 72 +- .../libavcodec/loongarch/h264dsp_lasx.c | 1356 +- .../libavcodec/loongarch/h264dsp_lasx.h | 97 - .../libavcodec/loongarch/h264dsp_loongarch.h | 132 + .../FFmpeg/libavcodec/loongarch/h264idct.S | 658 + .../libavcodec/loongarch/h264idct_lasx.c | 498 - .../libavcodec/loongarch/h264idct_loongarch.c | 184 + .../libavcodec/loongarch/h264intrapred.S | 299 + .../FFmpeg/libavcodec/loongarch/h264qpel.S | 1686 ++ .../loongarch/h264qpel_init_loongarch.c | 74 +- .../libavcodec/loongarch/h264qpel_lasx.c | 401 +- .../libavcodec/loongarch/h264qpel_lasx.h | 158 - .../libavcodec/loongarch/h264qpel_loongarch.h | 312 + .../libavcodec/loongarch/h264qpel_lsx.c | 487 + .../libavcodec/loongarch/hevc_add_res.S | 162 + .../FFmpeg/libavcodec/loongarch/hevc_idct.S | 857 + .../libavcodec/loongarch/hevc_idct_lsx.c | 10 +- .../libavcodec/loongarch/hevc_lpf_sao_lsx.c | 86 +- .../FFmpeg/libavcodec/loongarch/hevc_mc.S | 4445 +++++ .../libavcodec/loongarch/hevc_mc_bi_lsx.c | 204 +- .../libavcodec/loongarch/hevc_mc_uni_lsx.c | 73 +- .../libavcodec/loongarch/hevc_mc_uniw_lsx.c | 22 +- .../loongarch/hevcdsp_init_loongarch.c | 177 + .../libavcodec/loongarch/hevcdsp_lasx.h | 136 + .../FFmpeg/libavcodec/loongarch/hevcdsp_lsx.c | 128 +- .../FFmpeg/libavcodec/loongarch/hevcdsp_lsx.h | 130 +- .../libavcodec/loongarch/idctdsp_lasx.c | 6 +- .../libavcodec/loongarch/idctdsp_loongarch.h | 6 +- .../libavcodec/loongarch/loongson_asm.S | 945 + .../FFmpeg/libavcodec/loongarch/vc1dsp_lasx.c | 2 +- .../libavcodec/loongarch/vc1dsp_loongarch.h | 2 +- .../libavcodec/loongarch/videodsp_init.c | 2 +- .../FFmpeg/libavcodec/loongarch/vp8_mc_lsx.c | 31 +- .../libavcodec/loongarch/vp8dsp_loongarch.h | 28 +- .../libavcodec/loongarch/vp9dsp_loongarch.h | 3 + .../FFmpeg/libavcodec/lossless_audiodsp.c | 2 + .../FFmpeg/libavcodec/lossless_audiodsp.h | 1 + .../FFmpeg/libavcodec/lossless_videodsp.c | 2 + .../FFmpeg/libavcodec/lossless_videodsp.h | 1 + .../FFmpeg/libavcodec/lossless_videoencdsp.c | 31 +- .../FFmpeg/libavcodec/lossless_videoencdsp.h | 7 +- mythtv/external/FFmpeg/libavcodec/lpc.c | 57 +- mythtv/external/FFmpeg/libavcodec/lpc.h | 103 +- .../FFmpeg/libavcodec/lpc_functions.h | 100 + mythtv/external/FFmpeg/libavcodec/lscrdec.c | 20 +- mythtv/external/FFmpeg/libavcodec/lsp.c | 57 +- mythtv/external/FFmpeg/libavcodec/lsp.h | 12 - mythtv/external/FFmpeg/libavcodec/m101.c | 24 +- mythtv/external/FFmpeg/libavcodec/mace.c | 8 +- mythtv/external/FFmpeg/libavcodec/magicyuv.c | 106 +- .../external/FFmpeg/libavcodec/magicyuvenc.c | 348 +- mythtv/external/FFmpeg/libavcodec/mathops.h | 14 +- mythtv/external/FFmpeg/libavcodec/mdct15.c | 331 - mythtv/external/FFmpeg/libavcodec/mdct15.h | 64 - .../FFmpeg/libavcodec/mdct_fixed_32.c | 51 - .../FFmpeg/libavcodec/mdct_template.c | 209 - mythtv/external/FFmpeg/libavcodec/mdec.c | 21 +- mythtv/external/FFmpeg/libavcodec/me_cmp.c | 227 +- mythtv/external/FFmpeg/libavcodec/me_cmp.h | 27 +- .../external/FFmpeg/libavcodec/mediacodec.h | 8 +- .../FFmpeg/libavcodec/mediacodec_surface.c | 46 +- .../FFmpeg/libavcodec/mediacodec_surface.h | 8 +- .../FFmpeg/libavcodec/mediacodec_wrapper.c | 1552 +- .../FFmpeg/libavcodec/mediacodec_wrapper.h | 372 +- .../FFmpeg/libavcodec/mediacodecdec.c | 164 +- .../FFmpeg/libavcodec/mediacodecdec_common.c | 454 +- .../FFmpeg/libavcodec/mediacodecdec_common.h | 1 + .../FFmpeg/libavcodec/mediacodecenc.c | 1184 ++ mythtv/external/FFmpeg/libavcodec/metasound.c | 39 +- .../FFmpeg/libavcodec/metasound_data.c | 14730 ---------------- .../FFmpeg/libavcodec/metasound_data.h | 13938 ++++++++++++++- .../FFmpeg/libavcodec/metasound_twinvq_data.h | 814 + mythtv/external/FFmpeg/libavcodec/mf_utils.h | 5 + mythtv/external/FFmpeg/libavcodec/mfenc.c | 88 +- .../external/FFmpeg/libavcodec/microdvddec.c | 3 +- mythtv/external/FFmpeg/libavcodec/midivid.c | 29 +- mythtv/external/FFmpeg/libavcodec/mimic.c | 92 +- .../external/FFmpeg/libavcodec/mips/Makefile | 13 +- .../FFmpeg/libavcodec/mips/aaccoder_mips.c | 2502 --- .../FFmpeg/libavcodec/mips/aacdec_mips.c | 443 - .../FFmpeg/libavcodec/mips/aacdec_mips.h | 253 - .../FFmpeg/libavcodec/mips/aacpsdsp_mips.c | 465 - .../FFmpeg/libavcodec/mips/aacpsy_mips.h | 238 - .../FFmpeg/libavcodec/mips/aacsbr_mips.c | 624 - .../FFmpeg/libavcodec/mips/aacsbr_mips.h | 496 - .../FFmpeg/libavcodec/mips/ac3dsp_mips.c | 9 +- .../external/FFmpeg/libavcodec/mips/cabac.h | 2 + .../libavcodec/mips/compute_antialias_fixed.h | 2 + .../FFmpeg/libavcodec/mips/fft_mips.c | 516 - .../FFmpeg/libavcodec/mips/fmtconvert_mips.c | 1 - .../FFmpeg/libavcodec/mips/h263dsp_mips.h | 2 +- .../FFmpeg/libavcodec/mips/h264chroma_mips.h | 20 +- .../FFmpeg/libavcodec/mips/h264chroma_mmi.c | 8 +- .../FFmpeg/libavcodec/mips/h264chroma_msa.c | 142 +- .../libavcodec/mips/h264dsp_init_mips.c | 7 - .../FFmpeg/libavcodec/mips/h264dsp_mips.h | 2 - .../FFmpeg/libavcodec/mips/h264dsp_mmi.c | 47 - .../FFmpeg/libavcodec/mips/hevc_idct_msa.c | 16 +- .../FFmpeg/libavcodec/mips/hevc_lpf_sao_msa.c | 118 +- .../FFmpeg/libavcodec/mips/hevc_macros_msa.h | 9 + .../FFmpeg/libavcodec/mips/hevc_mc_bi_msa.c | 491 +- .../FFmpeg/libavcodec/mips/hevc_mc_biw_msa.c | 484 +- .../FFmpeg/libavcodec/mips/hevc_mc_uni_msa.c | 263 +- .../FFmpeg/libavcodec/mips/hevc_mc_uniw_msa.c | 4356 +++-- .../FFmpeg/libavcodec/mips/hevcdsp_mips.h | 56 +- .../FFmpeg/libavcodec/mips/hevcdsp_mmi.c | 66 +- .../FFmpeg/libavcodec/mips/hevcdsp_msa.c | 258 +- .../FFmpeg/libavcodec/mips/hevcpred_mips.h | 6 +- .../FFmpeg/libavcodec/mips/hevcpred_msa.c | 367 +- .../FFmpeg/libavcodec/mips/idctdsp_mips.h | 12 +- .../FFmpeg/libavcodec/mips/idctdsp_mmi.c | 6 +- .../FFmpeg/libavcodec/mips/idctdsp_msa.c | 6 +- .../FFmpeg/libavcodec/mips/lsp_mips.h | 12 +- .../FFmpeg/libavcodec/mips/me_cmp_mips.h | 32 +- .../FFmpeg/libavcodec/mips/me_cmp_msa.c | 277 +- .../libavcodec/mips/mpegvideo_init_mips.c | 2 - .../FFmpeg/libavcodec/mips/mpegvideo_mmi.c | 72 - .../mpegvideoenc_init_mips.c} | 18 +- .../FFmpeg/libavcodec/mips/mpegvideoenc_mmi.c | 98 + .../libavcodec/mips/mpegvideoencdsp_msa.c | 4 +- .../FFmpeg/libavcodec/mips/pixblockdsp_mips.h | 6 +- .../FFmpeg/libavcodec/mips/pixblockdsp_mmi.c | 4 +- .../FFmpeg/libavcodec/mips/pixblockdsp_msa.c | 6 +- .../FFmpeg/libavcodec/mips/sbrdsp_mips.c | 912 - .../FFmpeg/libavcodec/mips/vc1dsp_mips.h | 8 +- .../FFmpeg/libavcodec/mips/vc1dsp_mmi.c | 8 +- .../FFmpeg/libavcodec/mips/videodsp_init.c | 2 +- .../FFmpeg/libavcodec/mips/vp8_mc_msa.c | 110 +- .../FFmpeg/libavcodec/mips/vp8dsp_mips.h | 144 +- mythtv/external/FFmpeg/libavcodec/misc4.c | 189 + .../external/FFmpeg/libavcodec/misc4_parser.c | 81 + mythtv/external/FFmpeg/libavcodec/mjpegbdec.c | 32 +- mythtv/external/FFmpeg/libavcodec/mjpegdec.c | 439 +- mythtv/external/FFmpeg/libavcodec/mjpegdec.h | 13 +- .../FFmpeg/libavcodec/mjpegdec_common.c | 2 +- mythtv/external/FFmpeg/libavcodec/mjpegenc.c | 52 +- .../FFmpeg/libavcodec/mjpegenc_common.c | 39 +- .../FFmpeg/libavcodec/mjpegenc_common.h | 4 +- mythtv/external/FFmpeg/libavcodec/mlp.c | 9 - mythtv/external/FFmpeg/libavcodec/mlp.h | 12 +- mythtv/external/FFmpeg/libavcodec/mlp_parse.c | 6 +- mythtv/external/FFmpeg/libavcodec/mlp_parse.h | 15 + mythtv/external/FFmpeg/libavcodec/mlpdec.c | 176 +- mythtv/external/FFmpeg/libavcodec/mlpdsp.c | 1 - mythtv/external/FFmpeg/libavcodec/mlpdsp.h | 8 - mythtv/external/FFmpeg/libavcodec/mlpenc.c | 1687 +- mythtv/external/FFmpeg/libavcodec/mlz.c | 1 + mythtv/external/FFmpeg/libavcodec/mmaldec.c | 24 +- mythtv/external/FFmpeg/libavcodec/mmvideo.c | 5 +- mythtv/external/FFmpeg/libavcodec/mobiclip.c | 61 +- .../external/FFmpeg/libavcodec/motion_est.c | 288 +- .../external/FFmpeg/libavcodec/motion_est.h | 24 +- .../FFmpeg/libavcodec/motion_est_template.c | 62 +- .../external/FFmpeg/libavcodec/motionpixels.c | 13 +- .../external/FFmpeg/libavcodec/movtextdec.c | 3 +- .../external/FFmpeg/libavcodec/movtextenc.c | 37 +- .../libavcodec/mp3_header_decompress_bsf.c | 130 - mythtv/external/FFmpeg/libavcodec/mpc.c | 2 +- mythtv/external/FFmpeg/libavcodec/mpc7.c | 58 +- mythtv/external/FFmpeg/libavcodec/mpc8.c | 9 +- mythtv/external/FFmpeg/libavcodec/mpeg12.c | 203 +- mythtv/external/FFmpeg/libavcodec/mpeg12.h | 9 +- .../{aarch64/asm-offsets.h => mpeg12codecs.h} | 14 +- .../external/FFmpeg/libavcodec/mpeg12data.c | 25 +- .../external/FFmpeg/libavcodec/mpeg12data.h | 4 - mythtv/external/FFmpeg/libavcodec/mpeg12dec.c | 890 +- mythtv/external/FFmpeg/libavcodec/mpeg12dec.h | 14 +- mythtv/external/FFmpeg/libavcodec/mpeg12enc.c | 159 +- mythtv/external/FFmpeg/libavcodec/mpeg12enc.h | 5 +- mythtv/external/FFmpeg/libavcodec/mpeg12vlc.h | 32 +- .../external/FFmpeg/libavcodec/mpeg4audio.c | 6 +- .../external/FFmpeg/libavcodec/mpeg4audio.h | 128 +- .../FFmpeg/libavcodec/mpeg4audio_copy_pce.h | 69 + mythtv/external/FFmpeg/libavcodec/mpeg4data.h | 4 - .../external/FFmpeg/libavcodec/mpeg4video.c | 14 +- .../external/FFmpeg/libavcodec/mpeg4video.h | 42 - .../FFmpeg/libavcodec/mpeg4video_parser.c | 23 +- .../FFmpeg/libavcodec/mpeg4videodata.h | 1 - .../FFmpeg/libavcodec/mpeg4videodec.c | 616 +- .../FFmpeg/libavcodec/mpeg4videodec.h | 15 +- .../FFmpeg/libavcodec/mpeg4videodefs.h | 68 + .../{mpegvideodsp.c => mpeg4videodsp.c} | 12 +- .../{mpegvideodsp.h => mpeg4videodsp.h} | 22 +- .../FFmpeg/libavcodec/mpeg4videoenc.c | 116 +- .../FFmpeg/libavcodec/mpeg4videoenc.h | 2 +- mythtv/external/FFmpeg/libavcodec/mpeg_er.c | 30 +- .../FFmpeg/libavcodec/mpegaudiodata.h | 5 +- .../FFmpeg/libavcodec/mpegaudiodec_common.c | 22 +- .../FFmpeg/libavcodec/mpegaudiodec_fixed.c | 16 +- .../FFmpeg/libavcodec/mpegaudiodec_float.c | 16 +- .../FFmpeg/libavcodec/mpegaudiodec_template.c | 12 +- .../external/FFmpeg/libavcodec/mpegaudiodsp.c | 6 +- .../external/FFmpeg/libavcodec/mpegaudiodsp.h | 3 + .../FFmpeg/libavcodec/mpegaudioenc_fixed.c | 9 +- .../FFmpeg/libavcodec/mpegaudioenc_float.c | 9 +- .../FFmpeg/libavcodec/mpegaudioenc_template.c | 5 - .../external/FFmpeg/libavcodec/mpegpicture.c | 535 +- .../external/FFmpeg/libavcodec/mpegpicture.h | 136 +- mythtv/external/FFmpeg/libavcodec/mpegutils.c | 222 +- mythtv/external/FFmpeg/libavcodec/mpegutils.h | 72 +- mythtv/external/FFmpeg/libavcodec/mpegvideo.c | 1204 +- mythtv/external/FFmpeg/libavcodec/mpegvideo.h | 120 +- .../FFmpeg/libavcodec/mpegvideo_dec.c | 1008 +- .../FFmpeg/libavcodec/mpegvideo_enc.c | 1223 +- .../FFmpeg/libavcodec/mpegvideo_motion.c | 280 +- .../FFmpeg/libavcodec/mpegvideo_parser.c | 84 +- .../FFmpeg/libavcodec/mpegvideodata.c | 50 +- .../FFmpeg/libavcodec/mpegvideodata.h | 8 +- .../external/FFmpeg/libavcodec/mpegvideodec.h | 15 +- .../external/FFmpeg/libavcodec/mpegvideoenc.h | 79 +- .../FFmpeg/libavcodec/mpegvideoencdsp.c | 63 +- .../FFmpeg/libavcodec/mpegvideoencdsp.h | 20 +- mythtv/external/FFmpeg/libavcodec/mpl2dec.c | 3 +- .../libavcodec/mpv_reconstruct_mb_template.c | 285 + mythtv/external/FFmpeg/libavcodec/mscc.c | 60 +- mythtv/external/FFmpeg/libavcodec/msmpeg4.c | 48 +- .../FFmpeg/libavcodec/msmpeg4_vc1_data.c | 253 + .../FFmpeg/libavcodec/msmpeg4_vc1_data.h | 51 + .../external/FFmpeg/libavcodec/msmpeg4data.c | 195 +- .../external/FFmpeg/libavcodec/msmpeg4data.h | 22 +- .../external/FFmpeg/libavcodec/msmpeg4dec.c | 282 +- .../external/FFmpeg/libavcodec/msmpeg4dec.h | 13 +- .../external/FFmpeg/libavcodec/msmpeg4enc.c | 129 +- .../external/FFmpeg/libavcodec/msmpeg4enc.h | 8 +- mythtv/external/FFmpeg/libavcodec/msp2dec.c | 7 +- mythtv/external/FFmpeg/libavcodec/msrle.c | 15 +- mythtv/external/FFmpeg/libavcodec/msrleenc.c | 300 + mythtv/external/FFmpeg/libavcodec/mss1.c | 16 +- mythtv/external/FFmpeg/libavcodec/mss12.c | 1 + mythtv/external/FFmpeg/libavcodec/mss2.c | 115 +- mythtv/external/FFmpeg/libavcodec/mss3.c | 12 +- mythtv/external/FFmpeg/libavcodec/mss34dsp.c | 25 +- mythtv/external/FFmpeg/libavcodec/mss4.c | 25 +- mythtv/external/FFmpeg/libavcodec/msvideo1.c | 15 +- .../external/FFmpeg/libavcodec/msvideo1enc.c | 13 +- mythtv/external/FFmpeg/libavcodec/mv30.c | 31 +- mythtv/external/FFmpeg/libavcodec/mvcdec.c | 11 +- mythtv/external/FFmpeg/libavcodec/mvha.c | 34 +- mythtv/external/FFmpeg/libavcodec/mwsc.c | 33 +- mythtv/external/FFmpeg/libavcodec/mxpegdec.c | 11 +- .../FFmpeg/libavcodec/nellymoserdec.c | 25 +- .../FFmpeg/libavcodec/nellymoserenc.c | 19 +- .../external/FFmpeg/libavcodec/neon/Makefile | 3 + mythtv/external/FFmpeg/libavcodec/notchlc.c | 23 +- mythtv/external/FFmpeg/libavcodec/null.c | 97 + mythtv/external/FFmpeg/libavcodec/nuv.c | 50 +- mythtv/external/FFmpeg/libavcodec/nvdec.c | 121 +- mythtv/external/FFmpeg/libavcodec/nvdec.h | 12 +- mythtv/external/FFmpeg/libavcodec/nvdec_av1.c | 24 +- .../external/FFmpeg/libavcodec/nvdec_h264.c | 20 +- .../external/FFmpeg/libavcodec/nvdec_hevc.c | 104 +- .../external/FFmpeg/libavcodec/nvdec_mjpeg.c | 15 +- .../external/FFmpeg/libavcodec/nvdec_mpeg12.c | 33 +- .../external/FFmpeg/libavcodec/nvdec_mpeg4.c | 24 +- mythtv/external/FFmpeg/libavcodec/nvdec_vc1.c | 27 +- mythtv/external/FFmpeg/libavcodec/nvdec_vp8.c | 19 +- mythtv/external/FFmpeg/libavcodec/nvdec_vp9.c | 11 +- mythtv/external/FFmpeg/libavcodec/nvenc.c | 642 +- mythtv/external/FFmpeg/libavcodec/nvenc.h | 49 + mythtv/external/FFmpeg/libavcodec/nvenc_av1.c | 213 + .../external/FFmpeg/libavcodec/nvenc_h264.c | 225 +- .../external/FFmpeg/libavcodec/nvenc_hevc.c | 222 +- mythtv/external/FFmpeg/libavcodec/omx.c | 30 +- mythtv/external/FFmpeg/libavcodec/on2avc.c | 158 +- mythtv/external/FFmpeg/libavcodec/options.c | 40 +- .../FFmpeg/libavcodec/options_table.h | 559 +- mythtv/external/FFmpeg/libavcodec/opus.h | 201 - .../external/FFmpeg/libavcodec/opus/Makefile | 30 + .../FFmpeg/libavcodec/{opus.c => opus/celt.c} | 447 +- .../libavcodec/{opus_celt.h => opus/celt.h} | 36 +- .../libavcodec/{opusdec.c => opus/dec.c} | 130 +- .../{opus_celt.c => opus/dec_celt.c} | 35 +- .../libavcodec/{opusdsp.c => opus/dsp.c} | 10 +- .../libavcodec/{opusdsp.h => opus/dsp.h} | 11 +- .../libavcodec/{opusenc.c => opus/enc.c} | 54 +- .../libavcodec/{opusenc.h => opus/enc.h} | 9 +- .../{opusenc_psy.c => opus/enc_psy.c} | 34 +- .../{opusenc_psy.h => opus/enc_psy.h} | 29 +- .../{opusenc_utils.h => opus/enc_utils.h} | 9 +- mythtv/external/FFmpeg/libavcodec/opus/opus.h | 59 + .../external/FFmpeg/libavcodec/opus/parse.c | 469 + .../external/FFmpeg/libavcodec/opus/parse.h | 77 + .../{opus_parser.c => opus/parser.c} | 14 +- .../libavcodec/{opus_pvq.c => opus/pvq.c} | 24 +- .../libavcodec/{opus_pvq.h => opus/pvq.h} | 6 +- .../libavcodec/{opus_rc.c => opus/rc.c} | 12 +- .../libavcodec/{opus_rc.h => opus/rc.h} | 7 +- .../libavcodec/{opus_silk.c => opus/silk.c} | 20 +- mythtv/external/FFmpeg/libavcodec/opus/silk.h | 47 + .../libavcodec/{opustab.c => opus/tab.c} | 34 +- .../libavcodec/{opustab.h => opus/tab.h} | 16 +- mythtv/external/FFmpeg/libavcodec/osq.c | 497 + .../libavcodec/{avpacket.c => packet.c} | 109 +- mythtv/external/FFmpeg/libavcodec/packet.h | 188 +- .../FFmpeg/libavcodec/packet_internal.h | 2 + mythtv/external/FFmpeg/libavcodec/pafaudio.c | 5 +- mythtv/external/FFmpeg/libavcodec/pafvideo.c | 15 +- mythtv/external/FFmpeg/libavcodec/pamenc.c | 8 +- mythtv/external/FFmpeg/libavcodec/parser.c | 6 + mythtv/external/FFmpeg/libavcodec/parser.h | 2 - mythtv/external/FFmpeg/libavcodec/parsers.c | 10 +- .../external/FFmpeg/libavcodec/pcm-bluray.c | 9 +- .../FFmpeg/libavcodec/pcm-blurayenc.c | 24 +- mythtv/external/FFmpeg/libavcodec/pcm-dvd.c | 7 +- .../external/FFmpeg/libavcodec/pcm-dvdenc.c | 18 +- mythtv/external/FFmpeg/libavcodec/pcm.c | 25 +- mythtv/external/FFmpeg/libavcodec/pcx.c | 9 +- mythtv/external/FFmpeg/libavcodec/pcxenc.c | 6 +- mythtv/external/FFmpeg/libavcodec/pdvdec.c | 140 + mythtv/external/FFmpeg/libavcodec/pgssubdec.c | 7 +- mythtv/external/FFmpeg/libavcodec/pgxdec.c | 7 +- mythtv/external/FFmpeg/libavcodec/photocd.c | 18 +- mythtv/external/FFmpeg/libavcodec/pictordec.c | 30 +- .../external/FFmpeg/libavcodec/pixblockdsp.c | 19 +- .../external/FFmpeg/libavcodec/pixblockdsp.h | 12 +- mythtv/external/FFmpeg/libavcodec/pixlet.c | 20 +- mythtv/external/FFmpeg/libavcodec/pngdec.c | 523 +- mythtv/external/FFmpeg/libavcodec/pngdsp.c | 25 +- mythtv/external/FFmpeg/libavcodec/pngenc.c | 183 +- mythtv/external/FFmpeg/libavcodec/pnm.c | 10 +- mythtv/external/FFmpeg/libavcodec/pnm.h | 11 +- .../external/FFmpeg/libavcodec/pnm_parser.c | 8 +- mythtv/external/FFmpeg/libavcodec/pnmdec.c | 228 +- mythtv/external/FFmpeg/libavcodec/pnmenc.c | 80 +- .../external/FFmpeg/libavcodec/ppc/Makefile | 7 +- .../external/FFmpeg/libavcodec/ppc/fdctdsp.c | 1 + .../FFmpeg/libavcodec/ppc/fft_altivec.S | 458 - .../external/FFmpeg/libavcodec/ppc/fft_init.c | 168 - .../external/FFmpeg/libavcodec/ppc/fft_vsx.c | 226 - .../external/FFmpeg/libavcodec/ppc/fft_vsx.h | 829 - .../libavcodec/ppc/fmtconvert_altivec.c | 3 +- .../libavcodec/ppc/h264chroma_template.c | 4 +- .../external/FFmpeg/libavcodec/ppc/h264dsp.c | 39 +- .../external/FFmpeg/libavcodec/ppc/hevcdsp.c | 2 +- .../FFmpeg/libavcodec/ppc/hpeldsp_altivec.c | 4 +- .../external/FFmpeg/libavcodec/ppc/idctdsp.c | 1 + .../external/FFmpeg/libavcodec/ppc/me_cmp.c | 30 +- .../ppc/{mpegvideodsp.c => mpeg4videodsp.c} | 6 +- .../libavcodec/ppc/mpegaudiodsp_altivec.c | 2 + .../FFmpeg/libavcodec/ppc/mpegvideoencdsp.c | 8 +- .../FFmpeg/libavcodec/ppc/svq1enc_altivec.c | 4 +- .../external/FFmpeg/libavcodec/ppc/videodsp.c | 2 +- .../FFmpeg/libavcodec/ppc/vorbisdsp_altivec.c | 6 +- .../FFmpeg/libavcodec/ppc/vp8dsp_altivec.c | 15 +- mythtv/external/FFmpeg/libavcodec/profiles.c | 244 +- mythtv/external/FFmpeg/libavcodec/profiles.h | 55 +- .../FFmpeg/libavcodec/progressframe.h | 157 + .../external/FFmpeg/libavcodec/proresdata.c | 29 +- .../external/FFmpeg/libavcodec/proresdata.h | 7 +- .../libavcodec/{proresdec2.c => proresdec.c} | 79 +- mythtv/external/FFmpeg/libavcodec/proresdec.h | 5 + mythtv/external/FFmpeg/libavcodec/proresdsp.c | 8 +- mythtv/external/FFmpeg/libavcodec/proresdsp.h | 5 +- .../FFmpeg/libavcodec/proresenc_anatoliy.c | 294 +- .../FFmpeg/libavcodec/proresenc_kostya.c | 155 +- mythtv/external/FFmpeg/libavcodec/prosumer.c | 10 +- mythtv/external/FFmpeg/libavcodec/psd.c | 9 +- mythtv/external/FFmpeg/libavcodec/pthread.c | 4 +- .../FFmpeg/libavcodec/pthread_frame.c | 822 +- .../FFmpeg/libavcodec/pthread_slice.c | 14 +- mythtv/external/FFmpeg/libavcodec/ptx.c | 5 +- mythtv/external/FFmpeg/libavcodec/put_bits.h | 9 +- .../external/FFmpeg/libavcodec/put_golomb.h | 16 +- mythtv/external/FFmpeg/libavcodec/qcelpdec.c | 11 +- mythtv/external/FFmpeg/libavcodec/qdm2.c | 52 +- .../FFmpeg/libavcodec/qdm2_tablegen.h | 4 +- mythtv/external/FFmpeg/libavcodec/qdmc.c | 11 +- mythtv/external/FFmpeg/libavcodec/qdrw.c | 11 +- mythtv/external/FFmpeg/libavcodec/qoadec.c | 170 + mythtv/external/FFmpeg/libavcodec/qoidec.c | 23 +- mythtv/external/FFmpeg/libavcodec/qoienc.c | 9 +- mythtv/external/FFmpeg/libavcodec/qpeg.c | 23 +- mythtv/external/FFmpeg/libavcodec/qsv.c | 458 +- mythtv/external/FFmpeg/libavcodec/qsv.h | 4 +- .../external/FFmpeg/libavcodec/qsv_internal.h | 32 +- mythtv/external/FFmpeg/libavcodec/qsvdec.c | 314 +- mythtv/external/FFmpeg/libavcodec/qsvenc.c | 1239 +- mythtv/external/FFmpeg/libavcodec/qsvenc.h | 127 +- .../external/FFmpeg/libavcodec/qsvenc_av1.c | 230 + .../external/FFmpeg/libavcodec/qsvenc_h264.c | 62 +- .../external/FFmpeg/libavcodec/qsvenc_hevc.c | 152 +- .../external/FFmpeg/libavcodec/qsvenc_jpeg.c | 9 +- .../external/FFmpeg/libavcodec/qsvenc_mpeg2.c | 21 +- .../external/FFmpeg/libavcodec/qsvenc_vp9.c | 25 +- mythtv/external/FFmpeg/libavcodec/qtrle.c | 15 +- mythtv/external/FFmpeg/libavcodec/qtrleenc.c | 11 +- mythtv/external/FFmpeg/libavcodec/r210dec.c | 13 +- mythtv/external/FFmpeg/libavcodec/r210enc.c | 25 +- mythtv/external/FFmpeg/libavcodec/ra144dec.c | 5 +- mythtv/external/FFmpeg/libavcodec/ra144enc.c | 6 +- mythtv/external/FFmpeg/libavcodec/ra288.c | 8 +- mythtv/external/FFmpeg/libavcodec/ralf.c | 48 +- mythtv/external/FFmpeg/libavcodec/rasc.c | 25 +- .../external/FFmpeg/libavcodec/ratecontrol.c | 131 +- .../external/FFmpeg/libavcodec/ratecontrol.h | 16 +- mythtv/external/FFmpeg/libavcodec/raw.c | 3 + mythtv/external/FFmpeg/libavcodec/rawdec.c | 29 +- mythtv/external/FFmpeg/libavcodec/rawenc.c | 6 +- mythtv/external/FFmpeg/libavcodec/rdft.c | 120 - mythtv/external/FFmpeg/libavcodec/rdft.h | 52 - .../external/FFmpeg/libavcodec/realtextdec.c | 3 +- mythtv/external/FFmpeg/libavcodec/refstruct.c | 386 + mythtv/external/FFmpeg/libavcodec/refstruct.h | 297 + .../external/FFmpeg/libavcodec/riscv/Makefile | 86 + .../FFmpeg/libavcodec/riscv/aacencdsp_init.c | 44 + .../FFmpeg/libavcodec/riscv/aacencdsp_rvv.S | 71 + .../FFmpeg/libavcodec/riscv/aacpsdsp_init.c | 66 + .../FFmpeg/libavcodec/riscv/aacpsdsp_rvv.S | 266 + .../FFmpeg/libavcodec/riscv/ac3dsp_init.c | 72 + .../FFmpeg/libavcodec/riscv/ac3dsp_rvb.S | 61 + .../FFmpeg/libavcodec/riscv/ac3dsp_rvv.S | 145 + .../FFmpeg/libavcodec/riscv/ac3dsp_rvvb.S | 44 + .../FFmpeg/libavcodec/riscv/alacdsp_init.c | 50 + .../FFmpeg/libavcodec/riscv/alacdsp_rvv.S | 93 + .../FFmpeg/libavcodec/riscv/audiodsp_init.c | 45 + .../FFmpeg/libavcodec/riscv/audiodsp_rvv.S | 75 + .../FFmpeg/libavcodec/riscv/blockdsp_init.c | 47 + .../FFmpeg/libavcodec/riscv/blockdsp_rvv.S | 67 + .../FFmpeg/libavcodec/riscv/bswapdsp_init.c | 54 + .../{h263_parser.h => riscv/bswapdsp_rvb.S} | 20 +- .../FFmpeg/libavcodec/riscv/bswapdsp_rvv.S | 39 + .../FFmpeg/libavcodec/riscv/bswapdsp_rvvb.S | 52 + .../FFmpeg/libavcodec/riscv/cpu_common.c | 1 + .../FFmpeg/libavcodec/riscv/exrdsp_init.c | 37 + .../exrdsp_rvv.S} | 31 +- .../FFmpeg/libavcodec/riscv/fixed_vtype.S | 48 + .../FFmpeg/libavcodec/riscv/flacdsp_init.c | 139 + .../FFmpeg/libavcodec/riscv/flacdsp_rvv.S | 625 + .../FFmpeg/libavcodec/riscv/fmtconvert_init.c | 44 + .../FFmpeg/libavcodec/riscv/fmtconvert_rvv.S | 68 + .../riscv/g722dsp_init.c} | 32 +- .../FFmpeg/libavcodec/riscv/g722dsp_rvv.S | 69 + .../FFmpeg/libavcodec/riscv/h263dsp_init.c | 41 + .../FFmpeg/libavcodec/riscv/h263dsp_rvv.S | 101 + .../libavcodec/riscv/h264_chroma_init_riscv.c | 50 + .../FFmpeg/libavcodec/riscv/h264_mc_chroma.S | 382 + .../FFmpeg/libavcodec/riscv/h264addpx_rvv.S | 115 + .../FFmpeg/libavcodec/riscv/h264dsp_init.c | 182 + .../FFmpeg/libavcodec/riscv/h264dsp_rvv.S | 393 + .../FFmpeg/libavcodec/riscv/h264idct_rvv.S | 805 + .../FFmpeg/libavcodec/riscv/huffyuvdsp_init.c | 41 + .../FFmpeg/libavcodec/riscv/huffyuvdsp_rvv.S | 57 + .../FFmpeg/libavcodec/riscv/idctdsp_init.c | 48 + .../FFmpeg/libavcodec/riscv/idctdsp_rvv.S | 66 + .../libavcodec/riscv/jpeg2000dsp_init.c | 40 + .../FFmpeg/libavcodec/riscv/jpeg2000dsp_rvv.S | 74 + .../FFmpeg/libavcodec/riscv/llauddsp_init.c | 44 + .../FFmpeg/libavcodec/riscv/llauddsp_rvv.S | 73 + .../FFmpeg/libavcodec/riscv/llviddsp_init.c | 38 + .../riscv/llviddsp_rvv.S} | 27 +- .../libavcodec/riscv/llvidencdsp_init.c | 39 + .../FFmpeg/libavcodec/riscv/llvidencdsp_rvv.S | 38 + .../{x86/fft_init.c => riscv/lpc_init.c} | 32 +- .../FFmpeg/libavcodec/riscv/lpc_rvv.S | 121 + .../FFmpeg/libavcodec/riscv/me_cmp_init.c | 112 + .../FFmpeg/libavcodec/riscv/me_cmp_rvv.S | 544 + .../libavcodec/riscv/mpegvideoencdsp_init.c | 51 + .../libavcodec/riscv/mpegvideoencdsp_rvv.S | 127 + .../FFmpeg/libavcodec/riscv/opusdsp_init.c | 38 + .../FFmpeg/libavcodec/riscv/opusdsp_rvv.S | 61 + .../libavcodec/riscv/pixblockdsp_init.c | 81 + .../FFmpeg/libavcodec/riscv/pixblockdsp_rvi.S | 60 + .../FFmpeg/libavcodec/riscv/pixblockdsp_rvv.S | 83 + .../FFmpeg/libavcodec/riscv/rv34dsp_init.c | 41 + .../FFmpeg/libavcodec/riscv/rv34dsp_rvv.S | 57 + .../FFmpeg/libavcodec/riscv/rv40dsp_init.c | 51 + .../FFmpeg/libavcodec/riscv/rv40dsp_rvv.S | 375 + .../FFmpeg/libavcodec/riscv/sbrdsp_init.c | 65 + .../FFmpeg/libavcodec/riscv/sbrdsp_rvv.S | 303 + .../FFmpeg/libavcodec/riscv/startcode_rvb.S | 84 + .../FFmpeg/libavcodec/riscv/startcode_rvv.S | 47 + .../FFmpeg/libavcodec/riscv/svqenc_init.c | 41 + .../svqenc_rvv.S} | 39 +- .../FFmpeg/libavcodec/riscv/takdsp_init.c | 45 + .../FFmpeg/libavcodec/riscv/takdsp_rvv.S | 92 + .../FFmpeg/libavcodec/riscv/utvideodsp_init.c | 45 + .../FFmpeg/libavcodec/riscv/utvideodsp_rvv.S | 90 + .../FFmpeg/libavcodec/riscv/vc1dsp_init.c | 78 + .../FFmpeg/libavcodec/riscv/vc1dsp_rvi.S | 49 + .../FFmpeg/libavcodec/riscv/vc1dsp_rvv.S | 455 + .../hpeldsp_alpha.h => riscv/videodsp.S} | 22 +- .../FFmpeg/libavcodec/riscv/videodsp_init.c | 36 + .../FFmpeg/libavcodec/riscv/vorbisdsp_init.c | 37 + .../vorbisdsp_rvv.S} | 51 +- .../FFmpeg/libavcodec/riscv/vp7dsp_init.c | 59 + .../FFmpeg/libavcodec/riscv/vp7dsp_rvv.S | 150 + .../external/FFmpeg/libavcodec/riscv/vp8dsp.h | 75 + .../FFmpeg/libavcodec/riscv/vp8dsp_init.c | 140 + .../FFmpeg/libavcodec/riscv/vp8dsp_rvi.S | 64 + .../FFmpeg/libavcodec/riscv/vp8dsp_rvv.S | 551 + .../FFmpeg/libavcodec/riscv/vp9_intra_rvv.S | 300 + .../FFmpeg/libavcodec/riscv/vp9_mc_rvi.S | 110 + .../FFmpeg/libavcodec/riscv/vp9_mc_rvv.S | 208 + .../external/FFmpeg/libavcodec/riscv/vp9dsp.h | 188 + .../FFmpeg/libavcodec/riscv/vp9dsp_init.c | 147 + mythtv/external/FFmpeg/libavcodec/rka.c | 998 ++ mythtv/external/FFmpeg/libavcodec/rkmppdec.c | 97 +- mythtv/external/FFmpeg/libavcodec/rl.c | 21 +- mythtv/external/FFmpeg/libavcodec/rl.h | 12 +- mythtv/external/FFmpeg/libavcodec/rl2.c | 72 +- .../external/FFmpeg/libavcodec/roqaudioenc.c | 6 +- mythtv/external/FFmpeg/libavcodec/roqvideo.c | 4 +- mythtv/external/FFmpeg/libavcodec/roqvideo.h | 4 +- .../external/FFmpeg/libavcodec/roqvideodec.c | 15 +- .../external/FFmpeg/libavcodec/roqvideoenc.c | 16 +- mythtv/external/FFmpeg/libavcodec/rpza.c | 8 +- mythtv/external/FFmpeg/libavcodec/rpzaenc.c | 148 +- mythtv/external/FFmpeg/libavcodec/rscc.c | 18 +- mythtv/external/FFmpeg/libavcodec/rtjpeg.c | 2 +- mythtv/external/FFmpeg/libavcodec/rtjpeg.h | 4 +- mythtv/external/FFmpeg/libavcodec/rtv1.c | 149 + mythtv/external/FFmpeg/libavcodec/rv10.c | 155 +- mythtv/external/FFmpeg/libavcodec/rv10enc.c | 8 +- mythtv/external/FFmpeg/libavcodec/rv10enc.h | 4 +- mythtv/external/FFmpeg/libavcodec/rv20enc.c | 10 +- mythtv/external/FFmpeg/libavcodec/rv30.c | 29 +- mythtv/external/FFmpeg/libavcodec/rv34.c | 314 +- mythtv/external/FFmpeg/libavcodec/rv34.h | 14 +- .../external/FFmpeg/libavcodec/rv34_parser.c | 19 +- mythtv/external/FFmpeg/libavcodec/rv34dsp.c | 2 + mythtv/external/FFmpeg/libavcodec/rv34dsp.h | 2 + mythtv/external/FFmpeg/libavcodec/rv40.c | 90 +- mythtv/external/FFmpeg/libavcodec/rv40dsp.c | 6 +- mythtv/external/FFmpeg/libavcodec/s302m.c | 15 +- mythtv/external/FFmpeg/libavcodec/s302menc.c | 11 +- mythtv/external/FFmpeg/libavcodec/samidec.c | 4 +- mythtv/external/FFmpeg/libavcodec/sanm.c | 12 +- mythtv/external/FFmpeg/libavcodec/sbcdec.c | 12 +- mythtv/external/FFmpeg/libavcodec/sbcenc.c | 15 +- mythtv/external/FFmpeg/libavcodec/sbr.h | 44 +- mythtv/external/FFmpeg/libavcodec/sbrdsp.c | 1 - mythtv/external/FFmpeg/libavcodec/sbrdsp.h | 3 +- .../external/FFmpeg/libavcodec/sbrdsp_fixed.c | 1 - .../FFmpeg/libavcodec/sbrdsp_template.c | 287 +- mythtv/external/FFmpeg/libavcodec/scpr.c | 25 +- mythtv/external/FFmpeg/libavcodec/scpr3.c | 14 +- .../external/FFmpeg/libavcodec/screenpresso.c | 10 +- mythtv/external/FFmpeg/libavcodec/sei.h | 19 +- mythtv/external/FFmpeg/libavcodec/sga.c | 29 +- mythtv/external/FFmpeg/libavcodec/sgidec.c | 232 +- mythtv/external/FFmpeg/libavcodec/sgienc.c | 11 +- mythtv/external/FFmpeg/libavcodec/sgirledec.c | 11 +- mythtv/external/FFmpeg/libavcodec/sh4/README | 6 - .../external/FFmpeg/libavcodec/sheervideo.c | 13 +- mythtv/external/FFmpeg/libavcodec/shorten.c | 22 +- .../libavcodec/sinewin_fixed_tablegen.c | 5 + .../libavcodec/sinewin_fixed_tablegen.h | 10 + mythtv/external/FFmpeg/libavcodec/sipr.c | 6 +- mythtv/external/FFmpeg/libavcodec/sipr.h | 3 - mythtv/external/FFmpeg/libavcodec/siren.c | 18 +- mythtv/external/FFmpeg/libavcodec/smacker.c | 60 +- mythtv/external/FFmpeg/libavcodec/smc.c | 29 +- mythtv/external/FFmpeg/libavcodec/smcenc.c | 131 +- mythtv/external/FFmpeg/libavcodec/snow.c | 171 +- mythtv/external/FFmpeg/libavcodec/snow.h | 288 +- mythtv/external/FFmpeg/libavcodec/snow_dwt.c | 23 +- mythtv/external/FFmpeg/libavcodec/snow_dwt.h | 44 +- mythtv/external/FFmpeg/libavcodec/snowdec.c | 177 +- mythtv/external/FFmpeg/libavcodec/snowenc.c | 686 +- mythtv/external/FFmpeg/libavcodec/sonic.c | 25 +- mythtv/external/FFmpeg/libavcodec/sp5xdec.c | 38 +- mythtv/external/FFmpeg/libavcodec/speedhq.c | 652 +- .../bfin/timer.h => libavcodec/speedhq.h} | 28 +- .../external/FFmpeg/libavcodec/speedhqdec.c | 674 + .../external/FFmpeg/libavcodec/speedhqenc.c | 54 +- .../external/FFmpeg/libavcodec/speedhqenc.h | 3 - mythtv/external/FFmpeg/libavcodec/speexdec.c | 34 +- mythtv/external/FFmpeg/libavcodec/srtdec.c | 6 +- mythtv/external/FFmpeg/libavcodec/srtenc.c | 24 +- mythtv/external/FFmpeg/libavcodec/startcode.c | 9 +- .../external/FFmpeg/libavcodec/subviewerdec.c | 3 +- mythtv/external/FFmpeg/libavcodec/sunrast.c | 30 +- .../external/FFmpeg/libavcodec/sunrastenc.c | 4 +- mythtv/external/FFmpeg/libavcodec/svq1.h | 11 + mythtv/external/FFmpeg/libavcodec/svq1_vlc.h | 4 +- mythtv/external/FFmpeg/libavcodec/svq1dec.c | 129 +- mythtv/external/FFmpeg/libavcodec/svq1enc.c | 235 +- mythtv/external/FFmpeg/libavcodec/svq1enc.h | 86 - .../external/FFmpeg/libavcodec/svq1encdsp.h | 60 + mythtv/external/FFmpeg/libavcodec/svq3.c | 30 +- .../external/FFmpeg/libavcodec/synth_filter.c | 15 +- .../external/FFmpeg/libavcodec/synth_filter.h | 13 +- mythtv/external/FFmpeg/libavcodec/tak.c | 28 +- mythtv/external/FFmpeg/libavcodec/tak.h | 7 +- .../external/FFmpeg/libavcodec/tak_parser.c | 1 + mythtv/external/FFmpeg/libavcodec/takdec.c | 11 +- mythtv/external/FFmpeg/libavcodec/takdsp.c | 22 +- mythtv/external/FFmpeg/libavcodec/takdsp.h | 7 +- mythtv/external/FFmpeg/libavcodec/targa.c | 85 +- .../FFmpeg/libavcodec/targa_y216dec.c | 8 +- mythtv/external/FFmpeg/libavcodec/targaenc.c | 11 +- mythtv/external/FFmpeg/libavcodec/tdsc.c | 11 +- .../FFmpeg/libavcodec/tests/.gitignore | 6 +- .../FFmpeg/libavcodec/tests/aarch64/dct.c | 2 + .../FFmpeg/libavcodec/tests/av1_levels.c | 126 + .../FFmpeg/libavcodec/tests/avcodec.c | 21 +- .../FFmpeg/libavcodec/tests/avpacket.c | 1 + .../tests/{fft-fixed32.c => bitstream_be.c} | 4 +- .../FFmpeg/libavcodec/tests/bitstream_le.c | 20 + .../libavcodec/tests/bitstream_template.c | 202 + .../FFmpeg/libavcodec/tests/codec_desc.c | 2 +- mythtv/external/FFmpeg/libavcodec/tests/dct.c | 6 +- mythtv/external/FFmpeg/libavcodec/tests/fft.c | 673 - .../FFmpeg/libavcodec/tests/h264_levels.c | 6 +- .../FFmpeg/libavcodec/tests/iirfilter.c | 17 +- .../FFmpeg/libavcodec/tests/jpeg2000dwt.c | 4 +- .../external/FFmpeg/libavcodec/tests/motion.c | 3 +- .../FFmpeg/libavcodec/tests/mpeg12framerate.c | 3 + .../FFmpeg/libavcodec/tests/snowenc.c | 37 +- .../FFmpeg/libavcodec/tests/x86/dct.c | 4 +- mythtv/external/FFmpeg/libavcodec/textdec.c | 15 +- .../external/FFmpeg/libavcodec/texturedsp.c | 11 +- .../external/FFmpeg/libavcodec/texturedsp.h | 18 +- .../FFmpeg/libavcodec/texturedsp_template.c | 17 +- .../FFmpeg/libavcodec/texturedspenc.c | 21 +- mythtv/external/FFmpeg/libavcodec/thread.h | 85 +- .../external/FFmpeg/libavcodec/threadframe.h | 10 +- .../FFmpeg/libavcodec/threadprogress.c | 79 + .../FFmpeg/libavcodec/threadprogress.h | 92 + .../external/FFmpeg/libavcodec/tiertexseqv.c | 9 +- mythtv/external/FFmpeg/libavcodec/tiff.c | 529 +- mythtv/external/FFmpeg/libavcodec/tiff.h | 16 +- .../external/FFmpeg/libavcodec/tiff_common.c | 1 + mythtv/external/FFmpeg/libavcodec/tiff_data.h | 133 +- mythtv/external/FFmpeg/libavcodec/tiffenc.c | 27 +- mythtv/external/FFmpeg/libavcodec/tmv.c | 11 +- .../external/FFmpeg/libavcodec/truemotion1.c | 11 +- .../external/FFmpeg/libavcodec/truemotion2.c | 20 +- .../FFmpeg/libavcodec/truemotion2rt.c | 12 +- .../external/FFmpeg/libavcodec/truespeech.c | 6 +- mythtv/external/FFmpeg/libavcodec/tscc.c | 13 +- mythtv/external/FFmpeg/libavcodec/tscc2.c | 11 +- mythtv/external/FFmpeg/libavcodec/tta.c | 32 +- mythtv/external/FFmpeg/libavcodec/ttadata.c | 3 +- mythtv/external/FFmpeg/libavcodec/ttadsp.c | 3 +- mythtv/external/FFmpeg/libavcodec/ttaenc.c | 10 +- mythtv/external/FFmpeg/libavcodec/ttmlenc.c | 50 +- mythtv/external/FFmpeg/libavcodec/ttmlenc.h | 10 +- mythtv/external/FFmpeg/libavcodec/twinvq.c | 17 +- mythtv/external/FFmpeg/libavcodec/twinvq.h | 14 +- mythtv/external/FFmpeg/libavcodec/twinvqdec.c | 5 +- mythtv/external/FFmpeg/libavcodec/txd.c | 6 +- mythtv/external/FFmpeg/libavcodec/ulti.c | 9 +- mythtv/external/FFmpeg/libavcodec/utils.c | 206 +- mythtv/external/FFmpeg/libavcodec/utvideo.h | 34 +- .../external/FFmpeg/libavcodec/utvideodec.c | 136 +- .../external/FFmpeg/libavcodec/utvideodsp.c | 4 +- .../external/FFmpeg/libavcodec/utvideodsp.h | 1 + .../external/FFmpeg/libavcodec/utvideoenc.c | 44 +- mythtv/external/FFmpeg/libavcodec/v210dec.c | 20 +- mythtv/external/FFmpeg/libavcodec/v210enc.c | 6 +- mythtv/external/FFmpeg/libavcodec/v210x.c | 7 +- mythtv/external/FFmpeg/libavcodec/v308dec.c | 8 +- mythtv/external/FFmpeg/libavcodec/v308enc.c | 7 +- mythtv/external/FFmpeg/libavcodec/v408dec.c | 39 +- mythtv/external/FFmpeg/libavcodec/v408enc.c | 40 +- mythtv/external/FFmpeg/libavcodec/v410dec.c | 6 +- mythtv/external/FFmpeg/libavcodec/v410enc.c | 7 +- .../external/FFmpeg/libavcodec/v4l2_buffers.c | 29 +- .../external/FFmpeg/libavcodec/v4l2_buffers.h | 6 +- .../external/FFmpeg/libavcodec/v4l2_context.c | 11 +- mythtv/external/FFmpeg/libavcodec/v4l2_m2m.c | 33 +- mythtv/external/FFmpeg/libavcodec/v4l2_m2m.h | 7 +- .../external/FFmpeg/libavcodec/v4l2_m2m_dec.c | 19 +- .../external/FFmpeg/libavcodec/v4l2_m2m_enc.c | 42 +- mythtv/external/FFmpeg/libavcodec/vaapi_av1.c | 92 +- .../external/FFmpeg/libavcodec/vaapi_decode.c | 92 +- .../external/FFmpeg/libavcodec/vaapi_decode.h | 1 + .../external/FFmpeg/libavcodec/vaapi_encode.c | 1142 +- .../external/FFmpeg/libavcodec/vaapi_encode.h | 222 +- .../FFmpeg/libavcodec/vaapi_encode_av1.c | 1059 ++ .../FFmpeg/libavcodec/vaapi_encode_h264.c | 612 +- .../FFmpeg/libavcodec/vaapi_encode_h265.c | 666 +- .../FFmpeg/libavcodec/vaapi_encode_mjpeg.c | 52 +- .../FFmpeg/libavcodec/vaapi_encode_mpeg2.c | 93 +- .../FFmpeg/libavcodec/vaapi_encode_vp8.c | 41 +- .../FFmpeg/libavcodec/vaapi_encode_vp9.c | 85 +- .../external/FFmpeg/libavcodec/vaapi_h264.c | 28 +- .../external/FFmpeg/libavcodec/vaapi_hevc.c | 212 +- .../external/FFmpeg/libavcodec/vaapi_hevc.h | 2 +- .../external/FFmpeg/libavcodec/vaapi_mjpeg.c | 14 +- .../external/FFmpeg/libavcodec/vaapi_mpeg2.c | 26 +- .../external/FFmpeg/libavcodec/vaapi_mpeg4.c | 42 +- mythtv/external/FFmpeg/libavcodec/vaapi_vc1.c | 42 +- mythtv/external/FFmpeg/libavcodec/vaapi_vp8.c | 32 +- mythtv/external/FFmpeg/libavcodec/vaapi_vp9.c | 16 +- mythtv/external/FFmpeg/libavcodec/vb.c | 14 +- mythtv/external/FFmpeg/libavcodec/vble.c | 20 +- mythtv/external/FFmpeg/libavcodec/vbndec.c | 13 +- mythtv/external/FFmpeg/libavcodec/vbnenc.c | 24 +- mythtv/external/FFmpeg/libavcodec/vc1.c | 479 +- mythtv/external/FFmpeg/libavcodec/vc1.h | 13 +- mythtv/external/FFmpeg/libavcodec/vc1_block.c | 411 +- .../FFmpeg/libavcodec/vc1_loopfilter.c | 61 +- mythtv/external/FFmpeg/libavcodec/vc1_mc.c | 130 +- .../external/FFmpeg/libavcodec/vc1_parser.c | 15 +- mythtv/external/FFmpeg/libavcodec/vc1_pred.c | 260 +- .../external/FFmpeg/libavcodec/vc1_vlc_data.h | 1063 ++ mythtv/external/FFmpeg/libavcodec/vc1data.c | 884 +- mythtv/external/FFmpeg/libavcodec/vc1data.h | 120 +- mythtv/external/FFmpeg/libavcodec/vc1dec.c | 498 +- mythtv/external/FFmpeg/libavcodec/vc1dsp.c | 10 +- mythtv/external/FFmpeg/libavcodec/vc1dsp.h | 1 + mythtv/external/FFmpeg/libavcodec/vc2enc.c | 116 +- .../external/FFmpeg/libavcodec/vc2enc_dwt.c | 7 +- mythtv/external/FFmpeg/libavcodec/vcr1.c | 7 +- mythtv/external/FFmpeg/libavcodec/vdpau.c | 20 +- mythtv/external/FFmpeg/libavcodec/vdpau.h | 26 +- mythtv/external/FFmpeg/libavcodec/vdpau_av1.c | 29 +- .../external/FFmpeg/libavcodec/vdpau_h264.c | 34 +- .../external/FFmpeg/libavcodec/vdpau_hevc.c | 91 +- .../external/FFmpeg/libavcodec/vdpau_mpeg12.c | 39 +- .../external/FFmpeg/libavcodec/vdpau_mpeg4.c | 29 +- mythtv/external/FFmpeg/libavcodec/vdpau_vc1.c | 48 +- mythtv/external/FFmpeg/libavcodec/vdpau_vp9.c | 21 +- mythtv/external/FFmpeg/libavcodec/version.c | 16 +- mythtv/external/FFmpeg/libavcodec/version.h | 2 +- .../FFmpeg/libavcodec/version_major.h | 26 +- mythtv/external/FFmpeg/libavcodec/videodsp.c | 4 +- mythtv/external/FFmpeg/libavcodec/videodsp.h | 3 +- .../FFmpeg/libavcodec/videodsp_template.c | 4 +- .../external/FFmpeg/libavcodec/videotoolbox.c | 203 +- .../external/FFmpeg/libavcodec/videotoolbox.h | 64 +- .../FFmpeg/libavcodec/videotoolbox_vp9.c | 13 +- .../FFmpeg/libavcodec/videotoolboxenc.c | 833 +- mythtv/external/FFmpeg/libavcodec/vima.c | 5 +- mythtv/external/FFmpeg/libavcodec/vlc.c | 279 +- mythtv/external/FFmpeg/libavcodec/vlc.h | 252 +- mythtv/external/FFmpeg/libavcodec/vmdaudio.c | 5 +- mythtv/external/FFmpeg/libavcodec/vmdvideo.c | 10 +- mythtv/external/FFmpeg/libavcodec/vmixdec.c | 315 + mythtv/external/FFmpeg/libavcodec/vmnc.c | 14 +- mythtv/external/FFmpeg/libavcodec/vorbis.c | 9 +- mythtv/external/FFmpeg/libavcodec/vorbis.h | 13 +- .../external/FFmpeg/libavcodec/vorbis_data.c | 16 +- .../external/FFmpeg/libavcodec/vorbis_data.h | 34 + .../FFmpeg/libavcodec/vorbis_parser.c | 5 +- mythtv/external/FFmpeg/libavcodec/vorbisdec.c | 89 +- mythtv/external/FFmpeg/libavcodec/vorbisdsp.c | 28 +- mythtv/external/FFmpeg/libavcodec/vorbisdsp.h | 5 +- mythtv/external/FFmpeg/libavcodec/vorbisenc.c | 29 +- mythtv/external/FFmpeg/libavcodec/vp3.c | 765 +- mythtv/external/FFmpeg/libavcodec/vp3data.h | 15 +- mythtv/external/FFmpeg/libavcodec/vp5.c | 79 +- mythtv/external/FFmpeg/libavcodec/vp56.c | 35 +- mythtv/external/FFmpeg/libavcodec/vp56.h | 184 +- mythtv/external/FFmpeg/libavcodec/vp6.c | 110 +- mythtv/external/FFmpeg/libavcodec/vp8.c | 800 +- mythtv/external/FFmpeg/libavcodec/vp8.h | 58 +- mythtv/external/FFmpeg/libavcodec/vp89_rac.h | 66 + mythtv/external/FFmpeg/libavcodec/vp8data.c | 212 + mythtv/external/FFmpeg/libavcodec/vp8data.h | 191 +- mythtv/external/FFmpeg/libavcodec/vp8dsp.c | 22 +- mythtv/external/FFmpeg/libavcodec/vp8dsp.h | 13 +- mythtv/external/FFmpeg/libavcodec/vp9.c | 404 +- .../FFmpeg/libavcodec/vp9_mc_template.c | 12 +- mythtv/external/FFmpeg/libavcodec/vp9block.c | 237 +- mythtv/external/FFmpeg/libavcodec/vp9dec.h | 30 +- mythtv/external/FFmpeg/libavcodec/vp9dsp.c | 2 + mythtv/external/FFmpeg/libavcodec/vp9dsp.h | 4 +- .../FFmpeg/libavcodec/vp9dsp_template.c | 52 +- mythtv/external/FFmpeg/libavcodec/vp9lpf.c | 1 + mythtv/external/FFmpeg/libavcodec/vp9mvs.c | 57 +- mythtv/external/FFmpeg/libavcodec/vp9prob.c | 2 - mythtv/external/FFmpeg/libavcodec/vp9recon.c | 53 +- mythtv/external/FFmpeg/libavcodec/vp9shared.h | 24 +- .../libavcodec/{vp56rac.c => vpx_rac.c} | 6 +- mythtv/external/FFmpeg/libavcodec/vpx_rac.h | 135 + mythtv/external/FFmpeg/libavcodec/vqavideo.c | 13 +- mythtv/external/FFmpeg/libavcodec/vqcdec.c | 444 + .../external/FFmpeg/libavcodec/vt_internal.h | 2 + mythtv/external/FFmpeg/libavcodec/vulkan.c | 19 + .../libavcodec/{tests/avfft.c => vulkan.h} | 11 +- .../external/FFmpeg/libavcodec/vulkan_av1.c | 650 + .../FFmpeg/libavcodec/vulkan_decode.c | 1248 ++ .../FFmpeg/libavcodec/vulkan_decode.h | 184 + .../FFmpeg/libavcodec/vulkan_encode.c | 1059 ++ .../FFmpeg/libavcodec/vulkan_encode.h | 259 + .../FFmpeg/libavcodec/vulkan_encode_h264.c | 1666 ++ .../FFmpeg/libavcodec/vulkan_encode_h265.c | 1793 ++ .../external/FFmpeg/libavcodec/vulkan_h264.c | 571 + .../external/FFmpeg/libavcodec/vulkan_hevc.c | 927 + .../external/FFmpeg/libavcodec/vulkan_video.c | 472 + .../external/FFmpeg/libavcodec/vulkan_video.h | 108 + mythtv/external/FFmpeg/libavcodec/vvc.h | 159 + .../external/FFmpeg/libavcodec/vvc/Makefile | 17 + mythtv/external/FFmpeg/libavcodec/vvc/cabac.c | 2478 +++ mythtv/external/FFmpeg/libavcodec/vvc/cabac.h | 126 + mythtv/external/FFmpeg/libavcodec/vvc/ctu.c | 2568 +++ mythtv/external/FFmpeg/libavcodec/vvc/ctu.h | 490 + mythtv/external/FFmpeg/libavcodec/vvc/data.c | 3565 ++++ mythtv/external/FFmpeg/libavcodec/vvc/data.h | 84 + mythtv/external/FFmpeg/libavcodec/vvc/dec.c | 1115 ++ mythtv/external/FFmpeg/libavcodec/vvc/dec.h | 248 + mythtv/external/FFmpeg/libavcodec/vvc/dsp.c | 108 + mythtv/external/FFmpeg/libavcodec/vvc/dsp.h | 184 + .../FFmpeg/libavcodec/vvc/dsp_template.c | 120 + .../external/FFmpeg/libavcodec/vvc/filter.c | 1253 ++ .../external/FFmpeg/libavcodec/vvc/filter.h | 73 + .../FFmpeg/libavcodec/vvc/filter_template.c | 862 + mythtv/external/FFmpeg/libavcodec/vvc/inter.c | 1026 ++ mythtv/external/FFmpeg/libavcodec/vvc/inter.h | 42 + .../FFmpeg/libavcodec/vvc/inter_template.c | 631 + mythtv/external/FFmpeg/libavcodec/vvc/intra.c | 696 + mythtv/external/FFmpeg/libavcodec/vvc/intra.h | 49 + .../FFmpeg/libavcodec/vvc/intra_template.c | 1015 ++ .../FFmpeg/libavcodec/vvc/intra_utils.c | 218 + .../external/FFmpeg/libavcodec/vvc/itx_1d.c | 708 + .../external/FFmpeg/libavcodec/vvc/itx_1d.h | 52 + mythtv/external/FFmpeg/libavcodec/vvc/mvs.c | 1949 ++ mythtv/external/FFmpeg/libavcodec/vvc/mvs.h | 48 + mythtv/external/FFmpeg/libavcodec/vvc/ps.c | 1348 ++ mythtv/external/FFmpeg/libavcodec/vvc/ps.h | 275 + mythtv/external/FFmpeg/libavcodec/vvc/refs.c | 619 + mythtv/external/FFmpeg/libavcodec/vvc/refs.h | 58 + .../external/FFmpeg/libavcodec/vvc/thread.c | 846 + .../external/FFmpeg/libavcodec/vvc/thread.h | 37 + .../external/FFmpeg/libavcodec/vvc_parser.c | 514 + mythtv/external/FFmpeg/libavcodec/wavarc.c | 891 + mythtv/external/FFmpeg/libavcodec/wavpack.c | 361 +- mythtv/external/FFmpeg/libavcodec/wavpack.h | 1 + .../external/FFmpeg/libavcodec/wavpackenc.c | 27 +- mythtv/external/FFmpeg/libavcodec/wbmpdec.c | 89 + mythtv/external/FFmpeg/libavcodec/wbmpenc.c | 90 + mythtv/external/FFmpeg/libavcodec/wcmv.c | 16 +- mythtv/external/FFmpeg/libavcodec/webp.c | 31 +- mythtv/external/FFmpeg/libavcodec/webvttdec.c | 7 +- mythtv/external/FFmpeg/libavcodec/webvttenc.c | 18 +- mythtv/external/FFmpeg/libavcodec/wma.c | 15 +- mythtv/external/FFmpeg/libavcodec/wma.h | 9 +- mythtv/external/FFmpeg/libavcodec/wmadec.c | 29 +- mythtv/external/FFmpeg/libavcodec/wmaenc.c | 23 +- .../FFmpeg/libavcodec/wmalosslessdec.c | 24 +- .../external/FFmpeg/libavcodec/wmaprodata.h | 584 +- mythtv/external/FFmpeg/libavcodec/wmaprodec.c | 160 +- mythtv/external/FFmpeg/libavcodec/wmavoice.c | 147 +- mythtv/external/FFmpeg/libavcodec/wmv2.c | 17 +- mythtv/external/FFmpeg/libavcodec/wmv2.h | 3 +- mythtv/external/FFmpeg/libavcodec/wmv2dec.c | 69 +- mythtv/external/FFmpeg/libavcodec/wmv2dec.h | 1 - mythtv/external/FFmpeg/libavcodec/wmv2enc.c | 16 +- mythtv/external/FFmpeg/libavcodec/wmv2enc.h | 2 +- mythtv/external/FFmpeg/libavcodec/wnv1.c | 18 +- .../FFmpeg/libavcodec/wrapped_avframe.c | 16 +- mythtv/external/FFmpeg/libavcodec/ws-snd1.c | 5 +- .../external/FFmpeg/libavcodec/x86/Makefile | 33 +- .../FFmpeg/libavcodec/x86/aacencdsp.asm | 42 +- .../FFmpeg/libavcodec/x86/aacencdsp_init.c | 11 +- .../FFmpeg/libavcodec/x86/aacpsdsp.asm | 86 +- .../FFmpeg/libavcodec/x86/aacpsdsp_init.c | 6 +- .../external/FFmpeg/libavcodec/x86/ac3dsp.asm | 83 +- .../FFmpeg/libavcodec/x86/ac3dsp_init.c | 8 +- .../FFmpeg/libavcodec/x86/alacdsp.asm | 4 +- .../FFmpeg/libavcodec/x86/audiodsp.asm | 20 +- .../FFmpeg/libavcodec/x86/audiodsp_init.c | 6 + .../FFmpeg/libavcodec/x86/blockdsp.asm | 33 + .../FFmpeg/libavcodec/x86/blockdsp_init.c | 16 +- mythtv/external/FFmpeg/libavcodec/x86/cabac.h | 2 +- .../external/FFmpeg/libavcodec/x86/cavsdsp.c | 11 +- .../FFmpeg/libavcodec/x86/celt_pvq_init.c | 2 +- .../FFmpeg/libavcodec/x86/celt_pvq_search.asm | 5 +- .../FFmpeg/libavcodec/x86/cfhdencdsp_init.c | 4 +- .../FFmpeg/libavcodec/x86/dirac_dwt.asm | 14 +- .../FFmpeg/libavcodec/x86/dirac_dwt_init.c | 16 +- mythtv/external/FFmpeg/libavcodec/x86/fft.asm | 838 - mythtv/external/FFmpeg/libavcodec/x86/fft.h | 32 - .../FFmpeg/libavcodec/x86/flacdsp.asm | 104 +- .../FFmpeg/libavcodec/x86/flacdsp_init.c | 62 +- .../x86/{dct_init.c => flacencdsp_init.c} | 20 +- .../FFmpeg/libavcodec/x86/fmtconvert_init.c | 2 +- .../external/FFmpeg/libavcodec/x86/fpel.asm | 25 - mythtv/external/FFmpeg/libavcodec/x86/fpel.h | 8 - .../FFmpeg/libavcodec/x86/h264_chromamc.asm | 30 +- .../libavcodec/x86/h264_chromamc_10bit.asm | 14 +- .../libavcodec/x86/h264_deblock_10bit.asm | 6 +- .../FFmpeg/libavcodec/x86/h264_idct.asm | 28 +- .../FFmpeg/libavcodec/x86/h264_idct_10bit.asm | 8 +- .../FFmpeg/libavcodec/x86/h264_intrapred.asm | 55 +- .../libavcodec/x86/h264_intrapred_10bit.asm | 16 +- .../libavcodec/x86/h264_intrapred_init.c | 14 +- .../FFmpeg/libavcodec/x86/h264_qpel.c | 33 +- .../FFmpeg/libavcodec/x86/h264_qpel_10bit.asm | 2 +- .../FFmpeg/libavcodec/x86/h264_qpel_8bit.asm | 26 +- .../FFmpeg/libavcodec/x86/h264_weight.asm | 16 +- .../libavcodec/x86/h264_weight_10bit.asm | 12 +- .../FFmpeg/libavcodec/x86/h264chroma_init.c | 24 +- .../libavcodec/x86/h26x/h2656_inter.asm | 1143 ++ .../FFmpeg/libavcodec/x86/h26x/h2656dsp.c | 101 + .../FFmpeg/libavcodec/x86/h26x/h2656dsp.h | 103 + .../FFmpeg/libavcodec/x86/hevc_add_res.asm | 12 +- .../FFmpeg/libavcodec/x86/hevc_deblock.asm | 40 +- .../FFmpeg/libavcodec/x86/hevc_mc.asm | 492 +- .../FFmpeg/libavcodec/x86/hevc_sao.asm | 4 +- .../FFmpeg/libavcodec/x86/hevc_sao_10bit.asm | 4 +- .../external/FFmpeg/libavcodec/x86/hevcdsp.h | 104 +- .../FFmpeg/libavcodec/x86/hevcdsp_init.c | 221 +- .../FFmpeg/libavcodec/x86/hpeldsp.asm | 97 +- .../external/FFmpeg/libavcodec/x86/hpeldsp.h | 4 - .../FFmpeg/libavcodec/x86/hpeldsp_init.c | 29 +- .../FFmpeg/libavcodec/x86/hpeldsp_vp3.asm | 99 - .../FFmpeg/libavcodec/x86/hpeldsp_vp3_init.c | 43 - .../FFmpeg/libavcodec/x86/huffyuvdsp.asm | 2 +- .../libavcodec/x86/huffyuvencdsp_init.c | 4 +- .../FFmpeg/libavcodec/x86/idctdsp_init.c | 2 + .../FFmpeg/libavcodec/x86/jpeg2000dsp.asm | 4 +- .../libavcodec/x86/lossless_audiodsp.asm | 6 +- .../libavcodec/x86/lossless_videodsp.asm | 2 +- .../libavcodec/x86/lossless_videoencdsp.asm | 4 +- .../x86/lossless_videoencdsp_init.c | 2 +- mythtv/external/FFmpeg/libavcodec/x86/lpc.asm | 263 + .../libavcodec/x86/{lpc.c => lpc_init.c} | 74 +- .../external/FFmpeg/libavcodec/x86/mdct15.asm | 221 - .../FFmpeg/libavcodec/x86/mdct15_init.c | 104 - .../external/FFmpeg/libavcodec/x86/me_cmp.asm | 26 +- .../FFmpeg/libavcodec/x86/me_cmp_init.c | 77 +- .../x86/{mpegvideodsp.c => mpeg4videodsp.c} | 6 +- .../FFmpeg/libavcodec/x86/mpegaudiodsp.c | 6 + .../FFmpeg/libavcodec/x86/mpegvideo.c | 6 +- .../x86/mpegvideoenc_qns_template.c | 4 +- .../libavcodec/x86/mpegvideoenc_template.c | 5 +- .../FFmpeg/libavcodec/x86/mpegvideoencdsp.asm | 6 +- .../libavcodec/x86/mpegvideoencdsp_init.c | 69 +- .../FFmpeg/libavcodec/x86/opusdsp.asm | 9 +- .../FFmpeg/libavcodec/x86/opusdsp_init.c | 4 +- .../external/FFmpeg/libavcodec/x86/pngdsp.asm | 18 +- .../FFmpeg/libavcodec/x86/pngdsp_init.c | 7 - .../FFmpeg/libavcodec/x86/proresdsp_init.c | 4 +- .../external/FFmpeg/libavcodec/x86/qpel.asm | 6 +- .../FFmpeg/libavcodec/x86/qpeldsp.asm | 12 +- .../FFmpeg/libavcodec/x86/rv34dsp.asm | 20 +- .../FFmpeg/libavcodec/x86/rv40dsp.asm | 32 +- .../FFmpeg/libavcodec/x86/rv40dsp_init.c | 8 +- .../external/FFmpeg/libavcodec/x86/sbrdsp.asm | 18 +- .../FFmpeg/libavcodec/x86/simple_idct.asm | 39 +- .../external/FFmpeg/libavcodec/x86/snowdsp.c | 1 - .../FFmpeg/libavcodec/x86/svq1enc_init.c | 4 +- .../FFmpeg/libavcodec/x86/synth_filter_init.c | 7 +- .../external/FFmpeg/libavcodec/x86/takdsp.asm | 53 +- .../FFmpeg/libavcodec/x86/takdsp_init.c | 17 +- .../FFmpeg/libavcodec/x86/utvideodsp.asm | 4 +- .../FFmpeg/libavcodec/x86/v210-init.c | 10 +- .../external/FFmpeg/libavcodec/x86/v210.asm | 74 +- .../FFmpeg/libavcodec/x86/v210enc.asm | 180 +- .../FFmpeg/libavcodec/x86/v210enc_init.c | 26 + .../FFmpeg/libavcodec/x86/vc1dsp_init.c | 8 +- .../FFmpeg/libavcodec/x86/vc1dsp_mc.asm | 2 +- .../FFmpeg/libavcodec/x86/videodsp.asm | 2 +- .../FFmpeg/libavcodec/x86/videodsp_init.c | 2 +- .../FFmpeg/libavcodec/x86/vorbisdsp_init.c | 2 +- .../FFmpeg/libavcodec/x86/vp3dsp_init.c | 2 +- .../external/FFmpeg/libavcodec/x86/vp6dsp.asm | 55 - .../external/FFmpeg/libavcodec/x86/vp8dsp.asm | 60 +- .../FFmpeg/libavcodec/x86/vp8dsp_init.c | 58 +- .../FFmpeg/libavcodec/x86/vp9itxfm.asm | 2 + .../FFmpeg/libavcodec/x86/vp9itxfm_16bpp.asm | 12 +- .../x86/{vp56_arith.h => vpx_arith.h} | 14 +- .../FFmpeg/libavcodec/x86/vvc/Makefile | 11 + .../FFmpeg/libavcodec/x86/vvc/vvc_alf.asm | 876 + .../FFmpeg/libavcodec/x86/vvc/vvc_dmvr.asm | 373 + .../FFmpeg/libavcodec/x86/vvc/vvc_mc.asm | 302 + .../FFmpeg/libavcodec/x86/vvc/vvc_of.asm | 385 + .../FFmpeg/libavcodec/x86/vvc/vvc_sad.asm | 134 + .../FFmpeg/libavcodec/x86/vvc/vvcdsp_init.c | 410 + mythtv/external/FFmpeg/libavcodec/xan.c | 14 +- mythtv/external/FFmpeg/libavcodec/xbmdec.c | 40 +- mythtv/external/FFmpeg/libavcodec/xbmenc.c | 27 +- mythtv/external/FFmpeg/libavcodec/xfacedec.c | 8 +- mythtv/external/FFmpeg/libavcodec/xfaceenc.c | 4 +- mythtv/external/FFmpeg/libavcodec/xl.c | 7 +- mythtv/external/FFmpeg/libavcodec/xpmdec.c | 48 +- mythtv/external/FFmpeg/libavcodec/xsubdec.c | 15 +- mythtv/external/FFmpeg/libavcodec/xsubenc.c | 3 +- mythtv/external/FFmpeg/libavcodec/xvididct.c | 44 +- mythtv/external/FFmpeg/libavcodec/xvmc.h | 171 - .../external/FFmpeg/libavcodec/xwd_parser.c | 103 + mythtv/external/FFmpeg/libavcodec/xwddec.c | 27 +- mythtv/external/FFmpeg/libavcodec/xwdenc.c | 14 +- mythtv/external/FFmpeg/libavcodec/xxan.c | 6 +- mythtv/external/FFmpeg/libavcodec/y41pdec.c | 8 +- mythtv/external/FFmpeg/libavcodec/y41penc.c | 7 +- mythtv/external/FFmpeg/libavcodec/ylc.c | 17 +- mythtv/external/FFmpeg/libavcodec/yop.c | 13 +- mythtv/external/FFmpeg/libavcodec/yuv4dec.c | 8 +- mythtv/external/FFmpeg/libavcodec/yuv4enc.c | 27 +- mythtv/external/FFmpeg/libavcodec/zerocodec.c | 19 +- mythtv/external/FFmpeg/libavcodec/zmbv.c | 14 +- mythtv/external/FFmpeg/libavcodec/zmbvenc.c | 22 +- mythtv/external/FFmpeg/libavdevice/Makefile | 3 +- .../external/FFmpeg/libavdevice/alldevices.c | 98 +- mythtv/external/FFmpeg/libavdevice/alsa.c | 1 + mythtv/external/FFmpeg/libavdevice/alsa_dec.c | 11 +- mythtv/external/FFmpeg/libavdevice/alsa_enc.c | 17 +- .../FFmpeg/libavdevice/android_camera.c | 23 +- .../FFmpeg/libavdevice/audiotoolbox.m | 26 +- mythtv/external/FFmpeg/libavdevice/avdevice.c | 34 +- mythtv/external/FFmpeg/libavdevice/avdevice.h | 132 +- .../FFmpeg/libavdevice/avfoundation.m | 83 +- mythtv/external/FFmpeg/libavdevice/bktr.c | 30 +- mythtv/external/FFmpeg/libavdevice/caca.c | 50 +- mythtv/external/FFmpeg/libavdevice/ccfifo.c | 24 + .../FFmpeg/libavdevice/decklink_common.cpp | 110 + .../FFmpeg/libavdevice/decklink_common.h | 23 +- .../FFmpeg/libavdevice/decklink_common_c.h | 8 + .../FFmpeg/libavdevice/decklink_dec.cpp | 177 +- .../FFmpeg/libavdevice/decklink_dec_c.c | 121 +- .../FFmpeg/libavdevice/decklink_enc.cpp | 362 +- .../FFmpeg/libavdevice/decklink_enc_c.c | 66 +- mythtv/external/FFmpeg/libavdevice/dshow.c | 35 +- .../FFmpeg/libavdevice/dshow_capture.h | 10 +- .../FFmpeg/libavdevice/dshow_enummediatypes.c | 1 + .../FFmpeg/libavdevice/dshow_filter.c | 2 +- .../external/FFmpeg/libavdevice/dshow_pin.c | 1 + .../FFmpeg/libavdevice/fbdev_common.c | 4 +- .../external/FFmpeg/libavdevice/fbdev_dec.c | 12 +- .../external/FFmpeg/libavdevice/fbdev_enc.c | 16 +- mythtv/external/FFmpeg/libavdevice/gdigrab.c | 27 +- mythtv/external/FFmpeg/libavdevice/iec61883.c | 20 +- mythtv/external/FFmpeg/libavdevice/jack.c | 17 +- mythtv/external/FFmpeg/libavdevice/kmsgrab.c | 12 +- mythtv/external/FFmpeg/libavdevice/lavfi.c | 121 +- mythtv/external/FFmpeg/libavdevice/libcdio.c | 20 +- .../external/FFmpeg/libavdevice/libdc1394.c | 11 +- .../external/FFmpeg/libavdevice/openal-dec.c | 17 +- .../external/FFmpeg/libavdevice/opengl_enc.c | 37 +- mythtv/external/FFmpeg/libavdevice/oss.c | 1 + mythtv/external/FFmpeg/libavdevice/oss_dec.c | 11 +- mythtv/external/FFmpeg/libavdevice/oss_enc.c | 15 +- .../FFmpeg/libavdevice/pulse_audio_common.h | 2 +- .../FFmpeg/libavdevice/pulse_audio_dec.c | 11 +- .../FFmpeg/libavdevice/pulse_audio_enc.c | 33 +- .../FFmpeg/libavdevice/riscv/Makefile | 1 + .../FFmpeg/libavdevice/riscv/cpu_common.c | 1 + mythtv/external/FFmpeg/libavdevice/sdl2.c | 30 +- mythtv/external/FFmpeg/libavdevice/sndio.c | 2 +- .../external/FFmpeg/libavdevice/sndio_dec.c | 11 +- .../external/FFmpeg/libavdevice/sndio_enc.c | 15 +- mythtv/external/FFmpeg/libavdevice/utils.c | 6 +- .../external/FFmpeg/libavdevice/v4l2-common.c | 6 + mythtv/external/FFmpeg/libavdevice/v4l2.c | 132 +- mythtv/external/FFmpeg/libavdevice/v4l2enc.c | 15 +- mythtv/external/FFmpeg/libavdevice/version.c | 5 +- mythtv/external/FFmpeg/libavdevice/version.h | 2 +- .../FFmpeg/libavdevice/version_major.h | 10 +- mythtv/external/FFmpeg/libavdevice/vfwcap.c | 12 +- mythtv/external/FFmpeg/libavdevice/xcbgrab.c | 21 +- mythtv/external/FFmpeg/libavdevice/xv.c | 20 +- mythtv/external/FFmpeg/libavfilter/Makefile | 102 +- .../FFmpeg/libavfilter/aap_template.c | 215 + .../FFmpeg/libavfilter/aarch64/Makefile | 2 + .../aarch64/vf_bwdif_init_aarch64.c | 125 + .../libavfilter/aarch64/vf_bwdif_neon.S | 788 + .../libavfilter/aarch64/vf_nlmeans_neon.S | 78 +- .../libavfilter/adynamicequalizer_template.c | 438 + mythtv/external/FFmpeg/libavfilter/aeval.c | 41 +- mythtv/external/FFmpeg/libavfilter/af_aap.c | 332 + .../FFmpeg/libavfilter/af_acontrast.c | 11 +- mythtv/external/FFmpeg/libavfilter/af_acopy.c | 11 +- .../FFmpeg/libavfilter/af_acrossover.c | 49 +- .../external/FFmpeg/libavfilter/af_acrusher.c | 18 +- .../external/FFmpeg/libavfilter/af_adeclick.c | 117 +- .../FFmpeg/libavfilter/af_adecorrelate.c | 12 +- .../external/FFmpeg/libavfilter/af_adelay.c | 70 +- .../external/FFmpeg/libavfilter/af_adenorm.c | 12 +- .../FFmpeg/libavfilter/af_aderivative.c | 14 +- mythtv/external/FFmpeg/libavfilter/af_adrc.c | 502 + .../FFmpeg/libavfilter/af_adynamicequalizer.c | 375 +- .../FFmpeg/libavfilter/af_adynamicsmooth.c | 11 +- mythtv/external/FFmpeg/libavfilter/af_aecho.c | 11 +- .../FFmpeg/libavfilter/af_aemphasis.c | 37 +- .../external/FFmpeg/libavfilter/af_aexciter.c | 12 +- mythtv/external/FFmpeg/libavfilter/af_afade.c | 308 +- .../external/FFmpeg/libavfilter/af_afftdn.c | 305 +- .../external/FFmpeg/libavfilter/af_afftfilt.c | 17 +- mythtv/external/FFmpeg/libavfilter/af_afir.c | 675 +- mythtv/external/FFmpeg/libavfilter/af_afir.h | 99 - .../external/FFmpeg/libavfilter/af_afirdsp.h | 5 +- .../external/FFmpeg/libavfilter/af_aformat.c | 201 +- .../FFmpeg/libavfilter/af_afreqshift.c | 27 +- .../external/FFmpeg/libavfilter/af_afwtdn.c | 62 +- mythtv/external/FFmpeg/libavfilter/af_agate.c | 51 +- mythtv/external/FFmpeg/libavfilter/af_aiir.c | 83 +- .../external/FFmpeg/libavfilter/af_alimiter.c | 28 +- .../external/FFmpeg/libavfilter/af_amerge.c | 31 +- mythtv/external/FFmpeg/libavfilter/af_amix.c | 27 +- .../FFmpeg/libavfilter/af_amultiply.c | 8 +- .../FFmpeg/libavfilter/af_anequalizer.c | 43 +- .../external/FFmpeg/libavfilter/af_anlmdn.c | 21 +- .../FFmpeg/libavfilter/af_anlmdndsp.h | 1 - mythtv/external/FFmpeg/libavfilter/af_anlms.c | 151 +- mythtv/external/FFmpeg/libavfilter/af_anull.c | 20 +- mythtv/external/FFmpeg/libavfilter/af_apad.c | 115 +- .../external/FFmpeg/libavfilter/af_aphaser.c | 13 +- .../external/FFmpeg/libavfilter/af_apsyclip.c | 20 +- .../FFmpeg/libavfilter/af_apulsator.c | 61 +- .../FFmpeg/libavfilter/af_aresample.c | 99 +- mythtv/external/FFmpeg/libavfilter/af_arls.c | 298 + .../external/FFmpeg/libavfilter/af_arnndn.c | 39 +- mythtv/external/FFmpeg/libavfilter/af_asdr.c | 235 +- .../FFmpeg/libavfilter/af_asetnsamples.c | 31 +- .../external/FFmpeg/libavfilter/af_asetrate.c | 19 +- .../FFmpeg/libavfilter/af_ashowinfo.c | 30 +- .../FFmpeg/libavfilter/af_asoftclip.c | 31 +- .../FFmpeg/libavfilter/af_aspectralstats.c | 126 +- mythtv/external/FFmpeg/libavfilter/af_asr.c | 46 +- .../external/FFmpeg/libavfilter/af_astats.c | 297 +- .../FFmpeg/libavfilter/af_asubboost.c | 12 +- .../FFmpeg/libavfilter/af_asupercut.c | 17 +- .../external/FFmpeg/libavfilter/af_atempo.c | 127 +- mythtv/external/FFmpeg/libavfilter/af_atilt.c | 11 +- .../FFmpeg/libavfilter/af_axcorrelate.c | 149 +- .../external/FFmpeg/libavfilter/af_biquads.c | 793 +- mythtv/external/FFmpeg/libavfilter/af_bs2b.c | 29 +- .../FFmpeg/libavfilter/af_channelmap.c | 257 +- .../FFmpeg/libavfilter/af_channelsplit.c | 94 +- .../external/FFmpeg/libavfilter/af_chorus.c | 3 +- .../external/FFmpeg/libavfilter/af_compand.c | 25 +- .../FFmpeg/libavfilter/af_compensationdelay.c | 29 +- .../FFmpeg/libavfilter/af_crossfeed.c | 38 +- .../FFmpeg/libavfilter/af_crystalizer.c | 11 +- .../external/FFmpeg/libavfilter/af_dcshift.c | 11 +- .../external/FFmpeg/libavfilter/af_deesser.c | 20 +- .../FFmpeg/libavfilter/af_dialoguenhance.c | 281 +- .../external/FFmpeg/libavfilter/af_drmeter.c | 57 +- .../FFmpeg/libavfilter/af_dynaudnorm.c | 180 +- .../external/FFmpeg/libavfilter/af_earwax.c | 41 +- .../FFmpeg/libavfilter/af_extrastereo.c | 39 +- .../FFmpeg/libavfilter/af_firequalizer.c | 305 +- .../external/FFmpeg/libavfilter/af_flanger.c | 29 +- mythtv/external/FFmpeg/libavfilter/af_haas.c | 49 +- mythtv/external/FFmpeg/libavfilter/af_hdcd.c | 64 +- .../FFmpeg/libavfilter/af_headphone.c | 91 +- mythtv/external/FFmpeg/libavfilter/af_join.c | 66 +- .../external/FFmpeg/libavfilter/af_ladspa.c | 40 +- .../external/FFmpeg/libavfilter/af_loudnorm.c | 135 +- mythtv/external/FFmpeg/libavfilter/af_lv2.c | 39 +- .../external/FFmpeg/libavfilter/af_mcompand.c | 7 +- mythtv/external/FFmpeg/libavfilter/af_pan.c | 104 +- .../FFmpeg/libavfilter/af_replaygain.c | 80 +- .../FFmpeg/libavfilter/af_rubberband.c | 87 +- .../FFmpeg/libavfilter/af_sidechaincompress.c | 40 +- .../FFmpeg/libavfilter/af_silencedetect.c | 13 +- .../FFmpeg/libavfilter/af_silenceremove.c | 1067 +- .../FFmpeg/libavfilter/af_sofalizer.c | 45 +- .../FFmpeg/libavfilter/af_speechnorm.c | 50 +- .../FFmpeg/libavfilter/af_stereotools.c | 77 +- .../FFmpeg/libavfilter/af_stereowiden.c | 44 +- .../FFmpeg/libavfilter/af_superequalizer.c | 4 +- .../external/FFmpeg/libavfilter/af_surround.c | 1764 +- .../external/FFmpeg/libavfilter/af_tremolo.c | 12 +- .../external/FFmpeg/libavfilter/af_vibrato.c | 61 +- .../FFmpeg/libavfilter/af_virtualbass.c | 39 +- .../external/FFmpeg/libavfilter/af_volume.c | 62 +- .../external/FFmpeg/libavfilter/af_volume.h | 2 + .../FFmpeg/libavfilter/af_volumedetect.c | 11 +- .../FFmpeg/libavfilter/afir_template.c | 451 +- .../external/FFmpeg/libavfilter/allfilters.c | 43 +- .../FFmpeg/libavfilter/anlms_template.c | 129 + .../FFmpeg/libavfilter/arls_template.c | 152 + .../FFmpeg/libavfilter/asink_anullsink.c | 2 +- .../FFmpeg/libavfilter/asrc_afdelaysrc.c | 150 + .../FFmpeg/libavfilter/asrc_afirsrc.c | 300 +- .../FFmpeg/libavfilter/asrc_anoisesrc.c | 45 +- .../FFmpeg/libavfilter/asrc_anullsrc.c | 36 +- .../external/FFmpeg/libavfilter/asrc_flite.c | 102 +- .../FFmpeg/libavfilter/asrc_hilbert.c | 3 +- .../external/FFmpeg/libavfilter/asrc_sinc.c | 43 +- .../external/FFmpeg/libavfilter/asrc_sine.c | 6 +- mythtv/external/FFmpeg/libavfilter/audio.c | 79 +- mythtv/external/FFmpeg/libavfilter/audio.h | 33 +- .../FFmpeg/libavfilter/avf_a3dscope.c | 358 + .../FFmpeg/libavfilter/avf_abitscope.c | 60 +- .../FFmpeg/libavfilter/avf_ahistogram.c | 107 +- .../FFmpeg/libavfilter/avf_aphasemeter.c | 93 +- .../FFmpeg/libavfilter/avf_avectorscope.c | 145 +- .../external/FFmpeg/libavfilter/avf_concat.c | 15 +- .../external/FFmpeg/libavfilter/avf_showcqt.c | 128 +- .../external/FFmpeg/libavfilter/avf_showcqt.h | 1 - .../external/FFmpeg/libavfilter/avf_showcwt.c | 1341 ++ .../FFmpeg/libavfilter/avf_showfreqs.c | 67 +- .../FFmpeg/libavfilter/avf_showspatial.c | 96 +- .../FFmpeg/libavfilter/avf_showspectrum.c | 208 +- .../FFmpeg/libavfilter/avf_showvolume.c | 101 +- .../FFmpeg/libavfilter/avf_showwaves.c | 270 +- mythtv/external/FFmpeg/libavfilter/avfilter.c | 568 +- mythtv/external/FFmpeg/libavfilter/avfilter.h | 653 +- .../FFmpeg/libavfilter/avfilter_internal.h | 220 + .../FFmpeg/libavfilter/avfiltergraph.c | 372 +- mythtv/external/FFmpeg/libavfilter/blend.h | 10 +- .../external/FFmpeg/libavfilter/blend_modes.c | 8 +- mythtv/external/FFmpeg/libavfilter/boxblur.c | 1 + .../external/FFmpeg/libavfilter/buffersink.c | 182 +- .../external/FFmpeg/libavfilter/buffersink.h | 44 +- .../external/FFmpeg/libavfilter/buffersrc.c | 267 +- .../external/FFmpeg/libavfilter/buffersrc.h | 11 +- mythtv/external/FFmpeg/libavfilter/bwdif.h | 42 - mythtv/external/FFmpeg/libavfilter/bwdifdsp.c | 226 + mythtv/external/FFmpeg/libavfilter/bwdifdsp.h | 85 + mythtv/external/FFmpeg/libavfilter/ccfifo.c | 195 + mythtv/external/FFmpeg/libavfilter/ccfifo.h | 129 + .../external/FFmpeg/libavfilter/convolution.h | 77 +- .../FFmpeg/libavfilter/cuda/load_helper.c | 1 + .../FFmpeg/libavfilter/cuda/load_helper.h | 2 +- mythtv/external/FFmpeg/libavfilter/deshake.h | 83 - .../libavfilter/dialoguenhance_template.c | 274 + .../external/FFmpeg/libavfilter/dnn/Makefile | 11 +- .../libavfilter/dnn/dnn_backend_common.c | 8 +- .../libavfilter/dnn/dnn_backend_common.h | 13 +- .../libavfilter/dnn/dnn_backend_native.c | 561 - .../libavfilter/dnn/dnn_backend_native.h | 149 - .../dnn/dnn_backend_native_layer_avgpool.c | 147 - .../dnn/dnn_backend_native_layer_avgpool.h | 69 - .../dnn/dnn_backend_native_layer_conv2d.c | 265 - .../dnn/dnn_backend_native_layer_conv2d.h | 68 - .../dnn/dnn_backend_native_layer_dense.c | 151 - .../dnn/dnn_backend_native_layer_dense.h | 65 - .../dnn_backend_native_layer_depth2space.c | 102 - .../dnn_backend_native_layer_depth2space.h | 72 - .../dnn/dnn_backend_native_layer_mathbinary.c | 193 - .../dnn/dnn_backend_native_layer_mathbinary.h | 54 - .../dnn/dnn_backend_native_layer_mathunary.c | 156 - .../dnn/dnn_backend_native_layer_mathunary.h | 92 - .../dnn/dnn_backend_native_layer_maximum.c | 83 - .../dnn/dnn_backend_native_layer_pad.c | 268 - .../dnn/dnn_backend_native_layers.c | 42 - .../libavfilter/dnn/dnn_backend_openvino.c | 1072 +- .../libavfilter/dnn/dnn_backend_openvino.h | 40 - .../FFmpeg/libavfilter/dnn/dnn_backend_tf.c | 640 +- .../FFmpeg/libavfilter/dnn/dnn_backend_tf.h | 40 - .../libavfilter/dnn/dnn_backend_torch.cpp | 583 + .../FFmpeg/libavfilter/dnn/dnn_interface.c | 150 +- .../FFmpeg/libavfilter/dnn/dnn_io_proc.c | 264 +- .../FFmpeg/libavfilter/dnn_filter_common.c | 84 +- .../FFmpeg/libavfilter/dnn_filter_common.h | 40 +- .../FFmpeg/libavfilter/dnn_interface.h | 108 +- .../external/FFmpeg/libavfilter/drawutils.c | 4 +- .../external/FFmpeg/libavfilter/edge_common.c | 74 +- .../external/FFmpeg/libavfilter/edge_common.h | 22 +- .../FFmpeg/libavfilter/edge_template.c | 125 + mythtv/external/FFmpeg/libavfilter/f_bench.c | 29 +- mythtv/external/FFmpeg/libavfilter/f_cue.c | 39 +- .../external/FFmpeg/libavfilter/f_drawgraph.c | 59 +- .../external/FFmpeg/libavfilter/f_ebur128.c | 116 +- .../FFmpeg/libavfilter/f_graphmonitor.c | 427 +- .../FFmpeg/libavfilter/f_interleave.c | 13 +- .../external/FFmpeg/libavfilter/f_latency.c | 47 +- mythtv/external/FFmpeg/libavfilter/f_loop.c | 142 +- .../external/FFmpeg/libavfilter/f_metadata.c | 62 +- mythtv/external/FFmpeg/libavfilter/f_perms.c | 34 +- .../external/FFmpeg/libavfilter/f_realtime.c | 22 +- .../external/FFmpeg/libavfilter/f_reverse.c | 31 +- .../external/FFmpeg/libavfilter/f_segment.c | 16 +- mythtv/external/FFmpeg/libavfilter/f_select.c | 48 +- .../external/FFmpeg/libavfilter/f_sendcmd.c | 34 +- .../external/FFmpeg/libavfilter/f_sidedata.c | 81 +- .../FFmpeg/libavfilter/f_streamselect.c | 16 +- mythtv/external/FFmpeg/libavfilter/f_zmq.c | 24 +- mythtv/external/FFmpeg/libavfilter/fflcms2.c | 294 +- mythtv/external/FFmpeg/libavfilter/fflcms2.h | 65 +- mythtv/external/FFmpeg/libavfilter/fifo.c | 165 - mythtv/external/FFmpeg/libavfilter/filters.h | 377 +- mythtv/external/FFmpeg/libavfilter/formats.c | 389 +- mythtv/external/FFmpeg/libavfilter/formats.h | 142 + .../external/FFmpeg/libavfilter/framepool.c | 6 +- .../external/FFmpeg/libavfilter/framequeue.c | 6 +- .../external/FFmpeg/libavfilter/framesync.c | 48 +- .../external/FFmpeg/libavfilter/framesync.h | 24 + .../external/FFmpeg/libavfilter/graphdump.c | 7 +- .../external/FFmpeg/libavfilter/graphparser.c | 1194 +- mythtv/external/FFmpeg/libavfilter/hflip.h | 3 +- mythtv/external/FFmpeg/libavfilter/internal.h | 408 - .../external/FFmpeg/libavfilter/lavfutils.c | 3 +- .../FFmpeg/libavfilter/median_template.c | 2 - mythtv/external/FFmpeg/libavfilter/opencl.c | 13 +- .../FFmpeg/libavfilter/opencl/deshake.cl | 2 +- .../FFmpeg/libavfilter/opencl_source.h | 28 +- mythtv/external/FFmpeg/libavfilter/palette.c | 219 + mythtv/external/FFmpeg/libavfilter/palette.h | 63 + mythtv/external/FFmpeg/libavfilter/perlin.c | 224 + mythtv/external/FFmpeg/libavfilter/perlin.h | 101 + .../FFmpeg/libavfilter/phase_template.c | 8 +- mythtv/external/FFmpeg/libavfilter/pthread.c | 26 +- mythtv/external/FFmpeg/libavfilter/qrencode.c | 825 + mythtv/external/FFmpeg/libavfilter/qsvvpp.c | 446 +- mythtv/external/FFmpeg/libavfilter/qsvvpp.h | 41 +- .../FFmpeg/libavfilter/riscv/Makefile | 4 + .../riscv/af_afir_init.c} | 37 +- .../FFmpeg/libavfilter/riscv/af_afir_rvv.S | 56 + .../FFmpeg/libavfilter/riscv/cpu_common.c | 1 + .../external/FFmpeg/libavfilter/scale_eval.c | 16 +- .../external/FFmpeg/libavfilter/scale_eval.h | 5 +- mythtv/external/FFmpeg/libavfilter/setpts.c | 203 +- mythtv/external/FFmpeg/libavfilter/settb.c | 20 +- .../external/FFmpeg/libavfilter/signature.h | 1 - .../FFmpeg/libavfilter/signature_lookup.c | 68 +- .../libavfilter/silenceremove_template.c | 446 + mythtv/external/FFmpeg/libavfilter/split.c | 31 +- .../FFmpeg/libavfilter/src_avsynctest.c | 31 +- .../external/FFmpeg/libavfilter/src_movie.c | 330 +- .../FFmpeg/libavfilter/stack_internal.c | 357 + .../FFmpeg/libavfilter/stack_internal.h | 60 + .../libavfilter/tests/dnn-layer-avgpool.c | 197 - .../libavfilter/tests/dnn-layer-conv2d.c | 248 - .../libavfilter/tests/dnn-layer-dense.c | 131 - .../libavfilter/tests/dnn-layer-depth2space.c | 102 - .../libavfilter/tests/dnn-layer-mathbinary.c | 214 - .../libavfilter/tests/dnn-layer-mathunary.c | 148 - .../libavfilter/tests/dnn-layer-maximum.c | 71 - .../FFmpeg/libavfilter/tests/dnn-layer-pad.c | 239 - .../FFmpeg/libavfilter/tests/filtfmts.c | 29 +- .../FFmpeg/libavfilter/tests/formats.c | 4 +- .../FFmpeg/libavfilter/tests/integral.c | 1 + .../external/FFmpeg/libavfilter/textutils.c | 383 + .../external/FFmpeg/libavfilter/textutils.h | 229 + .../external/FFmpeg/libavfilter/tinterlace.h | 4 +- mythtv/external/FFmpeg/libavfilter/trim.c | 219 +- mythtv/external/FFmpeg/libavfilter/unsharp.h | 62 - mythtv/external/FFmpeg/libavfilter/v360.h | 14 +- .../external/FFmpeg/libavfilter/vaapi_vpp.c | 149 +- .../external/FFmpeg/libavfilter/vaapi_vpp.h | 12 + .../FFmpeg/libavfilter/vaf_spectrumsynth.c | 39 +- mythtv/external/FFmpeg/libavfilter/version.c | 5 +- mythtv/external/FFmpeg/libavfilter/version.h | 2 +- .../FFmpeg/libavfilter/version_major.h | 6 +- .../external/FFmpeg/libavfilter/vf_addroi.c | 12 +- .../FFmpeg/libavfilter/vf_alphamerge.c | 11 +- .../external/FFmpeg/libavfilter/vf_amplify.c | 5 +- .../external/FFmpeg/libavfilter/vf_aspect.c | 40 +- .../FFmpeg/libavfilter/vf_atadenoise.c | 9 +- .../external/FFmpeg/libavfilter/vf_avgblur.c | 15 +- .../FFmpeg/libavfilter/vf_avgblur_opencl.c | 15 +- .../FFmpeg/libavfilter/vf_avgblur_vulkan.c | 368 +- .../FFmpeg/libavfilter/vf_backgroundkey.c | 255 + mythtv/external/FFmpeg/libavfilter/vf_bbox.c | 5 +- .../FFmpeg/libavfilter/vf_bilateral.c | 13 +- .../FFmpeg/libavfilter/vf_bilateral_cuda.c | 481 + .../FFmpeg/libavfilter/vf_bilateral_cuda.cu | 190 + .../FFmpeg/libavfilter/vf_bitplanenoise.c | 14 +- .../FFmpeg/libavfilter/vf_blackdetect.c | 36 +- .../FFmpeg/libavfilter/vf_blackframe.c | 14 +- mythtv/external/FFmpeg/libavfilter/vf_blend.c | 174 +- .../FFmpeg/libavfilter/vf_blend_init.h | 8 +- .../FFmpeg/libavfilter/vf_blend_vulkan.c | 342 +- .../FFmpeg/libavfilter/vf_blockdetect.c | 19 +- .../FFmpeg/libavfilter/vf_blurdetect.c | 27 +- mythtv/external/FFmpeg/libavfilter/vf_bm3d.c | 347 +- .../external/FFmpeg/libavfilter/vf_boxblur.c | 13 +- mythtv/external/FFmpeg/libavfilter/vf_bwdif.c | 247 +- .../FFmpeg/libavfilter/vf_bwdif_cuda.c | 371 + .../FFmpeg/libavfilter/vf_bwdif_cuda.cu | 309 + .../FFmpeg/libavfilter/vf_bwdif_vulkan.c | 415 + mythtv/external/FFmpeg/libavfilter/vf_cas.c | 12 +- .../external/FFmpeg/libavfilter/vf_ccrepack.c | 98 + .../FFmpeg/libavfilter/vf_chromaber_vulkan.c | 292 +- .../FFmpeg/libavfilter/vf_chromakey.c | 40 +- .../FFmpeg/libavfilter/vf_chromakey_cuda.c | 31 +- .../external/FFmpeg/libavfilter/vf_chromanr.c | 67 +- .../FFmpeg/libavfilter/vf_chromashift.c | 29 +- .../external/FFmpeg/libavfilter/vf_ciescope.c | 148 +- .../FFmpeg/libavfilter/vf_codecview.c | 42 +- .../FFmpeg/libavfilter/vf_colorbalance.c | 3 +- .../FFmpeg/libavfilter/vf_colorchannelmixer.c | 20 +- .../FFmpeg/libavfilter/vf_colorconstancy.c | 20 +- .../FFmpeg/libavfilter/vf_colorcontrast.c | 30 +- .../FFmpeg/libavfilter/vf_colorcorrect.c | 63 +- .../external/FFmpeg/libavfilter/vf_colorize.c | 26 +- .../external/FFmpeg/libavfilter/vf_colorkey.c | 10 +- .../FFmpeg/libavfilter/vf_colorkey_opencl.c | 9 +- .../FFmpeg/libavfilter/vf_colorlevels.c | 147 +- .../external/FFmpeg/libavfilter/vf_colormap.c | 18 +- .../FFmpeg/libavfilter/vf_colormatrix.c | 13 +- .../FFmpeg/libavfilter/vf_colorspace.c | 102 +- .../FFmpeg/libavfilter/vf_colorspace_cuda.c | 437 + .../FFmpeg/libavfilter/vf_colorspace_cuda.cu | 94 + .../FFmpeg/libavfilter/vf_colortemperature.c | 74 +- .../FFmpeg/libavfilter/vf_convolution.c | 140 +- .../libavfilter/vf_convolution_opencl.c | 11 +- .../external/FFmpeg/libavfilter/vf_convolve.c | 46 +- mythtv/external/FFmpeg/libavfilter/vf_copy.c | 12 +- .../FFmpeg/libavfilter/vf_coreimage.m | 29 +- mythtv/external/FFmpeg/libavfilter/vf_corr.c | 435 + .../FFmpeg/libavfilter/vf_cover_rect.c | 28 +- mythtv/external/FFmpeg/libavfilter/vf_crop.c | 21 +- .../FFmpeg/libavfilter/vf_cropdetect.c | 275 +- .../external/FFmpeg/libavfilter/vf_curves.c | 308 +- .../FFmpeg/libavfilter/vf_datascope.c | 43 +- mythtv/external/FFmpeg/libavfilter/vf_dblur.c | 19 +- .../external/FFmpeg/libavfilter/vf_dctdnoiz.c | 14 +- .../external/FFmpeg/libavfilter/vf_deband.c | 13 +- .../external/FFmpeg/libavfilter/vf_deblock.c | 9 +- .../external/FFmpeg/libavfilter/vf_decimate.c | 50 +- mythtv/external/FFmpeg/libavfilter/vf_dedot.c | 24 +- .../FFmpeg/libavfilter/vf_deflicker.c | 22 +- .../FFmpeg/libavfilter/vf_deinterlace_qsv.c | 601 - .../FFmpeg/libavfilter/vf_deinterlace_vaapi.c | 36 +- .../external/FFmpeg/libavfilter/vf_dejudder.c | 9 +- .../external/FFmpeg/libavfilter/vf_delogo.c | 15 +- .../external/FFmpeg/libavfilter/vf_derain.c | 31 +- .../external/FFmpeg/libavfilter/vf_deshake.c | 91 +- .../FFmpeg/libavfilter/vf_deshake_opencl.c | 31 +- .../external/FFmpeg/libavfilter/vf_despill.c | 12 +- .../FFmpeg/libavfilter/vf_detelecine.c | 23 +- .../external/FFmpeg/libavfilter/vf_displace.c | 130 +- .../FFmpeg/libavfilter/vf_dnn_classify.c | 41 +- .../FFmpeg/libavfilter/vf_dnn_detect.c | 482 +- .../FFmpeg/libavfilter/vf_dnn_processing.c | 40 +- .../external/FFmpeg/libavfilter/vf_drawbox.c | 23 +- .../FFmpeg/libavfilter/vf_drawbox_vaapi.c | 369 + .../external/FFmpeg/libavfilter/vf_drawtext.c | 1656 +- .../FFmpeg/libavfilter/vf_edgedetect.c | 48 +- mythtv/external/FFmpeg/libavfilter/vf_elbg.c | 17 +- .../external/FFmpeg/libavfilter/vf_entropy.c | 20 +- mythtv/external/FFmpeg/libavfilter/vf_epx.c | 4 +- mythtv/external/FFmpeg/libavfilter/vf_eq.c | 33 +- mythtv/external/FFmpeg/libavfilter/vf_eq.h | 4 + .../external/FFmpeg/libavfilter/vf_estdif.c | 95 +- .../external/FFmpeg/libavfilter/vf_exposure.c | 77 +- .../FFmpeg/libavfilter/vf_extractplanes.c | 32 +- mythtv/external/FFmpeg/libavfilter/vf_fade.c | 24 +- .../external/FFmpeg/libavfilter/vf_feedback.c | 21 +- .../external/FFmpeg/libavfilter/vf_fftdnoiz.c | 50 +- .../external/FFmpeg/libavfilter/vf_fftfilt.c | 59 +- mythtv/external/FFmpeg/libavfilter/vf_field.c | 13 +- .../FFmpeg/libavfilter/vf_fieldhint.c | 38 +- .../FFmpeg/libavfilter/vf_fieldmatch.c | 94 +- .../FFmpeg/libavfilter/vf_fieldorder.c | 27 +- .../FFmpeg/libavfilter/vf_fillborders.c | 56 +- .../FFmpeg/libavfilter/vf_find_rect.c | 18 +- .../FFmpeg/libavfilter/vf_flip_vulkan.c | 233 +- .../FFmpeg/libavfilter/vf_floodfill.c | 19 +- .../external/FFmpeg/libavfilter/vf_format.c | 189 +- mythtv/external/FFmpeg/libavfilter/vf_fps.c | 52 +- .../FFmpeg/libavfilter/vf_framepack.c | 64 +- .../FFmpeg/libavfilter/vf_framerate.c | 13 +- .../FFmpeg/libavfilter/vf_framestep.c | 15 +- .../FFmpeg/libavfilter/vf_freezedetect.c | 14 +- .../FFmpeg/libavfilter/vf_freezeframes.c | 13 +- .../external/FFmpeg/libavfilter/vf_frei0r.c | 24 +- mythtv/external/FFmpeg/libavfilter/vf_fspp.c | 15 +- mythtv/external/FFmpeg/libavfilter/vf_fsync.c | 303 + mythtv/external/FFmpeg/libavfilter/vf_gblur.c | 24 +- .../FFmpeg/libavfilter/vf_gblur_vulkan.c | 336 +- mythtv/external/FFmpeg/libavfilter/vf_geq.c | 50 +- .../external/FFmpeg/libavfilter/vf_gradfun.c | 16 +- .../FFmpeg/libavfilter/vf_grayworld.c | 25 +- .../external/FFmpeg/libavfilter/vf_guided.c | 19 +- mythtv/external/FFmpeg/libavfilter/vf_hflip.c | 19 +- .../FFmpeg/libavfilter/vf_hflip_init.h | 1 + .../external/FFmpeg/libavfilter/vf_histeq.c | 16 +- .../FFmpeg/libavfilter/vf_histogram.c | 58 +- .../external/FFmpeg/libavfilter/vf_hqdn3d.c | 16 +- mythtv/external/FFmpeg/libavfilter/vf_hqx.c | 3 +- .../external/FFmpeg/libavfilter/vf_hsvkey.c | 36 +- mythtv/external/FFmpeg/libavfilter/vf_hue.c | 21 +- .../FFmpeg/libavfilter/vf_huesaturation.c | 32 +- .../FFmpeg/libavfilter/vf_hwdownload.c | 7 +- mythtv/external/FFmpeg/libavfilter/vf_hwmap.c | 34 +- .../external/FFmpeg/libavfilter/vf_hwupload.c | 19 +- .../FFmpeg/libavfilter/vf_hwupload_cuda.c | 12 +- .../FFmpeg/libavfilter/vf_hysteresis.c | 8 +- .../FFmpeg/libavfilter/vf_iccdetect.c | 16 +- .../external/FFmpeg/libavfilter/vf_iccgen.c | 70 +- .../external/FFmpeg/libavfilter/vf_identity.c | 9 +- mythtv/external/FFmpeg/libavfilter/vf_idet.c | 43 +- mythtv/external/FFmpeg/libavfilter/vf_il.c | 55 +- .../FFmpeg/libavfilter/vf_kerndeint.c | 19 +- .../external/FFmpeg/libavfilter/vf_lagfun.c | 7 +- mythtv/external/FFmpeg/libavfilter/vf_lcevc.c | 430 + .../FFmpeg/libavfilter/vf_lenscorrection.c | 10 +- .../external/FFmpeg/libavfilter/vf_lensfun.c | 64 +- .../FFmpeg/libavfilter/vf_libopencv.c | 3 +- .../FFmpeg/libavfilter/vf_libplacebo.c | 1440 +- .../external/FFmpeg/libavfilter/vf_libvmaf.c | 375 +- .../FFmpeg/libavfilter/vf_limitdiff.c | 7 +- .../external/FFmpeg/libavfilter/vf_limiter.c | 12 +- .../external/FFmpeg/libavfilter/vf_lumakey.c | 14 +- mythtv/external/FFmpeg/libavfilter/vf_lut.c | 10 +- mythtv/external/FFmpeg/libavfilter/vf_lut2.c | 8 +- mythtv/external/FFmpeg/libavfilter/vf_lut3d.c | 86 +- .../FFmpeg/libavfilter/vf_maskedclamp.c | 7 +- .../FFmpeg/libavfilter/vf_maskedmerge.c | 7 +- .../FFmpeg/libavfilter/vf_maskedminmax.c | 7 +- .../FFmpeg/libavfilter/vf_maskedthreshold.c | 42 +- .../external/FFmpeg/libavfilter/vf_maskfun.c | 12 +- .../external/FFmpeg/libavfilter/vf_mcdeint.c | 48 +- .../external/FFmpeg/libavfilter/vf_median.c | 13 +- .../FFmpeg/libavfilter/vf_mergeplanes.c | 29 +- .../FFmpeg/libavfilter/vf_mestimate.c | 19 +- .../FFmpeg/libavfilter/vf_midequalizer.c | 8 +- .../FFmpeg/libavfilter/vf_minterpolate.c | 31 +- .../FFmpeg/libavfilter/vf_misc_vaapi.c | 13 +- mythtv/external/FFmpeg/libavfilter/vf_mix.c | 105 +- .../FFmpeg/libavfilter/vf_monochrome.c | 34 +- .../external/FFmpeg/libavfilter/vf_morpho.c | 284 +- .../FFmpeg/libavfilter/vf_mpdecimate.c | 36 +- .../external/FFmpeg/libavfilter/vf_multiply.c | 7 +- .../external/FFmpeg/libavfilter/vf_negate.c | 33 +- .../external/FFmpeg/libavfilter/vf_neighbor.c | 12 +- .../FFmpeg/libavfilter/vf_neighbor_opencl.c | 9 +- .../external/FFmpeg/libavfilter/vf_nlmeans.c | 13 +- .../FFmpeg/libavfilter/vf_nlmeans_opencl.c | 5 +- .../FFmpeg/libavfilter/vf_nlmeans_vulkan.c | 1119 ++ mythtv/external/FFmpeg/libavfilter/vf_nnedi.c | 103 +- mythtv/external/FFmpeg/libavfilter/vf_noise.c | 26 +- .../FFmpeg/libavfilter/vf_normalize.c | 14 +- mythtv/external/FFmpeg/libavfilter/vf_null.c | 20 +- mythtv/external/FFmpeg/libavfilter/vf_ocr.c | 12 +- .../external/FFmpeg/libavfilter/vf_overlay.c | 301 +- .../external/FFmpeg/libavfilter/vf_overlay.h | 3 + .../FFmpeg/libavfilter/vf_overlay_cuda.c | 52 +- .../FFmpeg/libavfilter/vf_overlay_opencl.c | 5 +- .../FFmpeg/libavfilter/vf_overlay_qsv.c | 51 +- .../FFmpeg/libavfilter/vf_overlay_vaapi.c | 405 +- .../FFmpeg/libavfilter/vf_overlay_vulkan.c | 403 +- .../FFmpeg/libavfilter/vf_owdenoise.c | 13 +- mythtv/external/FFmpeg/libavfilter/vf_pad.c | 6 +- .../FFmpeg/libavfilter/vf_pad_opencl.c | 10 +- .../FFmpeg/libavfilter/vf_pad_vaapi.c | 283 + .../FFmpeg/libavfilter/vf_palettegen.c | 340 +- .../FFmpeg/libavfilter/vf_paletteuse.c | 645 +- .../FFmpeg/libavfilter/vf_perspective.c | 33 +- mythtv/external/FFmpeg/libavfilter/vf_phase.c | 16 +- .../FFmpeg/libavfilter/vf_photosensitivity.c | 16 +- .../FFmpeg/libavfilter/vf_pixdesctest.c | 12 +- .../external/FFmpeg/libavfilter/vf_pixelize.c | 12 +- mythtv/external/FFmpeg/libavfilter/vf_pp.c | 13 +- mythtv/external/FFmpeg/libavfilter/vf_pp7.c | 23 +- .../FFmpeg/libavfilter/vf_premultiply.c | 11 +- .../FFmpeg/libavfilter/vf_procamp_vaapi.c | 14 +- .../FFmpeg/libavfilter/vf_program_opencl.c | 6 +- .../FFmpeg/libavfilter/vf_pseudocolor.c | 214 +- mythtv/external/FFmpeg/libavfilter/vf_psnr.c | 21 +- .../external/FFmpeg/libavfilter/vf_pullup.c | 37 +- mythtv/external/FFmpeg/libavfilter/vf_qp.c | 16 +- mythtv/external/FFmpeg/libavfilter/vf_quirc.c | 185 + .../external/FFmpeg/libavfilter/vf_random.c | 10 +- .../FFmpeg/libavfilter/vf_readeia608.c | 14 +- .../external/FFmpeg/libavfilter/vf_readvitc.c | 14 +- mythtv/external/FFmpeg/libavfilter/vf_remap.c | 8 +- .../FFmpeg/libavfilter/vf_remap_opencl.c | 17 +- .../FFmpeg/libavfilter/vf_removegrain.c | 12 +- .../FFmpeg/libavfilter/vf_removelogo.c | 13 +- .../FFmpeg/libavfilter/vf_repeatfields.c | 71 +- .../external/FFmpeg/libavfilter/vf_rotate.c | 19 +- mythtv/external/FFmpeg/libavfilter/vf_sab.c | 14 +- mythtv/external/FFmpeg/libavfilter/vf_scale.c | 778 +- .../FFmpeg/libavfilter/vf_scale_cuda.c | 51 +- .../FFmpeg/libavfilter/vf_scale_cuda.cu | 151 +- .../FFmpeg/libavfilter/vf_scale_npp.c | 117 +- .../FFmpeg/libavfilter/vf_scale_qsv.c | 664 - .../FFmpeg/libavfilter/vf_scale_vaapi.c | 48 +- .../external/FFmpeg/libavfilter/vf_scale_vt.c | 274 + .../FFmpeg/libavfilter/vf_scale_vulkan.c | 392 +- mythtv/external/FFmpeg/libavfilter/vf_scdet.c | 19 +- .../external/FFmpeg/libavfilter/vf_scroll.c | 13 +- .../FFmpeg/libavfilter/vf_selectivecolor.c | 18 +- .../FFmpeg/libavfilter/vf_separatefields.c | 28 +- .../FFmpeg/libavfilter/vf_setparams.c | 245 +- .../FFmpeg/libavfilter/vf_sharpen_npp.c | 24 +- mythtv/external/FFmpeg/libavfilter/vf_shear.c | 10 +- .../external/FFmpeg/libavfilter/vf_showinfo.c | 241 +- .../FFmpeg/libavfilter/vf_showpalette.c | 2 +- .../FFmpeg/libavfilter/vf_shuffleframes.c | 12 +- .../FFmpeg/libavfilter/vf_shufflepixels.c | 22 +- .../FFmpeg/libavfilter/vf_shuffleplanes.c | 12 +- .../FFmpeg/libavfilter/vf_signalstats.c | 439 +- .../FFmpeg/libavfilter/vf_signature.c | 45 +- mythtv/external/FFmpeg/libavfilter/vf_siti.c | 13 +- .../FFmpeg/libavfilter/vf_smartblur.c | 58 +- mythtv/external/FFmpeg/libavfilter/vf_spp.c | 25 +- mythtv/external/FFmpeg/libavfilter/vf_sr.c | 21 +- mythtv/external/FFmpeg/libavfilter/vf_ssim.c | 36 +- .../external/FFmpeg/libavfilter/vf_ssim360.c | 1760 ++ mythtv/external/FFmpeg/libavfilter/vf_stack.c | 20 +- .../FFmpeg/libavfilter/vf_stack_qsv.c | 259 + .../FFmpeg/libavfilter/vf_stack_vaapi.c | 254 + .../external/FFmpeg/libavfilter/vf_stereo3d.c | 122 +- .../FFmpeg/libavfilter/vf_subtitles.c | 48 +- .../FFmpeg/libavfilter/vf_super2xsai.c | 3 +- .../external/FFmpeg/libavfilter/vf_swaprect.c | 49 +- .../external/FFmpeg/libavfilter/vf_swapuv.c | 24 +- .../external/FFmpeg/libavfilter/vf_telecine.c | 67 +- .../FFmpeg/libavfilter/vf_threshold.c | 6 +- .../FFmpeg/libavfilter/vf_threshold_init.h | 4 +- .../FFmpeg/libavfilter/vf_thumbnail.c | 101 +- .../FFmpeg/libavfilter/vf_thumbnail_cuda.c | 15 +- mythtv/external/FFmpeg/libavfilter/vf_tile.c | 9 +- .../FFmpeg/libavfilter/vf_tiltandshift.c | 368 + .../FFmpeg/libavfilter/vf_tinterlace.c | 140 +- .../FFmpeg/libavfilter/vf_tmidequalizer.c | 4 +- .../external/FFmpeg/libavfilter/vf_tonemap.c | 29 +- .../FFmpeg/libavfilter/vf_tonemap_opencl.c | 65 +- .../FFmpeg/libavfilter/vf_tonemap_vaapi.c | 213 +- mythtv/external/FFmpeg/libavfilter/vf_tpad.c | 74 +- .../FFmpeg/libavfilter/vf_transpose.c | 12 +- .../FFmpeg/libavfilter/vf_transpose_npp.c | 45 +- .../FFmpeg/libavfilter/vf_transpose_opencl.c | 23 +- .../FFmpeg/libavfilter/vf_transpose_vaapi.c | 20 +- .../FFmpeg/libavfilter/vf_transpose_vt.c | 291 + .../FFmpeg/libavfilter/vf_transpose_vulkan.c | 247 +- .../external/FFmpeg/libavfilter/vf_unsharp.c | 81 +- .../FFmpeg/libavfilter/vf_unsharp_opencl.c | 7 +- .../external/FFmpeg/libavfilter/vf_untile.c | 22 +- mythtv/external/FFmpeg/libavfilter/vf_uspp.c | 226 +- mythtv/external/FFmpeg/libavfilter/vf_v360.c | 232 +- .../FFmpeg/libavfilter/vf_vaguedenoiser.c | 28 +- .../external/FFmpeg/libavfilter/vf_varblur.c | 57 +- .../FFmpeg/libavfilter/vf_vectorscope.c | 66 +- mythtv/external/FFmpeg/libavfilter/vf_vflip.c | 20 +- .../external/FFmpeg/libavfilter/vf_vfrdet.c | 13 +- .../external/FFmpeg/libavfilter/vf_vibrance.c | 147 +- .../FFmpeg/libavfilter/vf_vidstabdetect.c | 43 +- .../FFmpeg/libavfilter/vf_vidstabtransform.c | 41 +- mythtv/external/FFmpeg/libavfilter/vf_vif.c | 18 +- .../external/FFmpeg/libavfilter/vf_vignette.c | 33 +- .../FFmpeg/libavfilter/vf_vmafmotion.c | 23 +- .../external/FFmpeg/libavfilter/vf_vpp_qsv.c | 776 +- .../external/FFmpeg/libavfilter/vf_w3fdif.c | 29 +- .../external/FFmpeg/libavfilter/vf_waveform.c | 102 +- mythtv/external/FFmpeg/libavfilter/vf_weave.c | 41 +- mythtv/external/FFmpeg/libavfilter/vf_xbr.c | 4 +- mythtv/external/FFmpeg/libavfilter/vf_xfade.c | 703 +- .../FFmpeg/libavfilter/vf_xfade_opencl.c | 44 +- .../FFmpeg/libavfilter/vf_xfade_vulkan.c | 721 + .../external/FFmpeg/libavfilter/vf_xmedian.c | 47 +- mythtv/external/FFmpeg/libavfilter/vf_xpsnr.c | 759 + mythtv/external/FFmpeg/libavfilter/vf_yadif.c | 34 +- .../FFmpeg/libavfilter/vf_yadif_cuda.c | 48 +- .../libavfilter/vf_yadif_videotoolbox.m | 47 +- .../external/FFmpeg/libavfilter/vf_yaepblur.c | 13 +- .../external/FFmpeg/libavfilter/vf_zoompan.c | 23 +- .../external/FFmpeg/libavfilter/vf_zscale.c | 303 +- mythtv/external/FFmpeg/libavfilter/video.c | 47 +- mythtv/external/FFmpeg/libavfilter/video.h | 18 + .../FFmpeg/libavfilter/vidstabutils.c | 1 + .../FFmpeg/libavfilter/vsink_nullsink.c | 2 +- .../FFmpeg/libavfilter/vsrc_cellauto.c | 9 +- .../FFmpeg/libavfilter/vsrc_ddagrab.c | 1258 ++ .../FFmpeg/libavfilter/vsrc_ddagrab_shaders.h | 122 + .../FFmpeg/libavfilter/vsrc_gradients.c | 96 +- .../external/FFmpeg/libavfilter/vsrc_life.c | 8 +- .../FFmpeg/libavfilter/vsrc_mandelbrot.c | 29 +- .../FFmpeg/libavfilter/vsrc_mptestsrc.c | 40 +- .../external/FFmpeg/libavfilter/vsrc_perlin.c | 170 + .../FFmpeg/libavfilter/vsrc_sierpinski.c | 14 +- .../FFmpeg/libavfilter/vsrc_testsrc.c | 399 +- .../FFmpeg/libavfilter/vsrc_testsrc_vulkan.c | 376 + .../FFmpeg/libavfilter/vulkan/.gitignore | 1 + .../FFmpeg/libavfilter/vulkan_filter.c | 507 +- .../FFmpeg/libavfilter/vulkan_filter.h | 39 +- .../vulkan_glslang.c | 19 +- .../vulkan_shaderc.c | 12 +- .../FFmpeg/libavfilter/vulkan_spirv.h | 45 + .../external/FFmpeg/libavfilter/window_func.h | 58 +- .../external/FFmpeg/libavfilter/x86/Makefile | 5 + .../FFmpeg/libavfilter/x86/af_afir.asm | 27 + .../FFmpeg/libavfilter/x86/af_afir_init.c | 5 + .../FFmpeg/libavfilter/x86/af_volume.asm | 6 +- .../FFmpeg/libavfilter/x86/avf_showcqt.asm | 4 +- .../FFmpeg/libavfilter/x86/scene_sad.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_blend.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_blend_init.c | 2 +- .../FFmpeg/libavfilter/x86/vf_bwdif.asm | 29 +- .../FFmpeg/libavfilter/x86/vf_bwdif_init.c | 26 +- .../FFmpeg/libavfilter/x86/vf_convolution.asm | 148 + .../libavfilter/x86/vf_convolution_init.c | 18 + .../FFmpeg/libavfilter/x86/vf_framerate.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_gblur_init.c | 1 + .../FFmpeg/libavfilter/x86/vf_gradfun.asm | 6 +- .../FFmpeg/libavfilter/x86/vf_hqdn3d.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_interlace.asm | 6 +- .../FFmpeg/libavfilter/x86/vf_maskedmerge.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_overlay.asm | 18 +- .../FFmpeg/libavfilter/x86/vf_ssim.asm | 25 +- .../FFmpeg/libavfilter/x86/vf_stereo3d.asm | 2 +- .../FFmpeg/libavfilter/x86/vf_threshold.asm | 23 +- .../FFmpeg/libavfilter/x86/vf_w3fdif.asm | 10 +- .../FFmpeg/libavfilter/x86/vf_xpsnr_init.c | 43 + mythtv/external/FFmpeg/libavfilter/xpsnr.h | 48 + mythtv/external/FFmpeg/libavfilter/yadif.h | 8 + .../FFmpeg/libavfilter/yadif_common.c | 105 +- mythtv/external/FFmpeg/libavformat/3dostr.c | 11 +- mythtv/external/FFmpeg/libavformat/4xm.c | 10 +- mythtv/external/FFmpeg/libavformat/Makefile | 72 +- mythtv/external/FFmpeg/libavformat/a64.c | 14 +- mythtv/external/FFmpeg/libavformat/aacdec.c | 31 +- mythtv/external/FFmpeg/libavformat/aadec.c | 15 +- mythtv/external/FFmpeg/libavformat/aaxdec.c | 13 +- mythtv/external/FFmpeg/libavformat/ac3dec.c | 25 +- mythtv/external/FFmpeg/libavformat/ac4dec.c | 107 + mythtv/external/FFmpeg/libavformat/ac4enc.c | 91 + mythtv/external/FFmpeg/libavformat/acedec.c | 9 +- mythtv/external/FFmpeg/libavformat/acm.c | 12 +- mythtv/external/FFmpeg/libavformat/act.c | 7 +- mythtv/external/FFmpeg/libavformat/adp.c | 9 +- mythtv/external/FFmpeg/libavformat/ads.c | 9 +- mythtv/external/FFmpeg/libavformat/adtsenc.c | 33 +- mythtv/external/FFmpeg/libavformat/adxdec.c | 17 +- .../FFmpeg/libavformat/{aea.c => aeadec.c} | 58 +- mythtv/external/FFmpeg/libavformat/aeaenc.c | 108 + mythtv/external/FFmpeg/libavformat/afc.c | 11 +- mythtv/external/FFmpeg/libavformat/aiff.c | 1 + mythtv/external/FFmpeg/libavformat/aiffdec.c | 20 +- mythtv/external/FFmpeg/libavformat/aiffenc.c | 41 +- mythtv/external/FFmpeg/libavformat/aixdec.c | 10 +- .../external/FFmpeg/libavformat/allformats.c | 1094 +- mythtv/external/FFmpeg/libavformat/alp.c | 36 +- mythtv/external/FFmpeg/libavformat/amr.c | 82 +- mythtv/external/FFmpeg/libavformat/amvenc.c | 24 +- mythtv/external/FFmpeg/libavformat/anm.c | 8 +- mythtv/external/FFmpeg/libavformat/apac.c | 86 + mythtv/external/FFmpeg/libavformat/apc.c | 6 +- mythtv/external/FFmpeg/libavformat/ape.c | 21 +- mythtv/external/FFmpeg/libavformat/apetag.c | 8 +- mythtv/external/FFmpeg/libavformat/apm.c | 40 +- mythtv/external/FFmpeg/libavformat/apngdec.c | 14 +- mythtv/external/FFmpeg/libavformat/apngenc.c | 31 +- mythtv/external/FFmpeg/libavformat/aptxdec.c | 37 +- .../external/FFmpeg/libavformat/aqtitledec.c | 13 +- mythtv/external/FFmpeg/libavformat/argo_asf.c | 42 +- mythtv/external/FFmpeg/libavformat/argo_brp.c | 11 +- mythtv/external/FFmpeg/libavformat/argo_cvg.c | 150 +- mythtv/external/FFmpeg/libavformat/asf.c | 5 +- mythtv/external/FFmpeg/libavformat/asfcrypt.c | 4 +- mythtv/external/FFmpeg/libavformat/asfdec_f.c | 19 +- mythtv/external/FFmpeg/libavformat/asfdec_o.c | 28 +- mythtv/external/FFmpeg/libavformat/asfenc.c | 52 +- mythtv/external/FFmpeg/libavformat/assdec.c | 13 +- mythtv/external/FFmpeg/libavformat/assenc.c | 51 +- mythtv/external/FFmpeg/libavformat/astdec.c | 13 +- mythtv/external/FFmpeg/libavformat/astenc.c | 44 +- mythtv/external/FFmpeg/libavformat/async.c | 32 +- mythtv/external/FFmpeg/libavformat/au.c | 49 +- mythtv/external/FFmpeg/libavformat/av1.c | 13 +- mythtv/external/FFmpeg/libavformat/av1dec.c | 78 +- mythtv/external/FFmpeg/libavformat/avc.c | 166 +- mythtv/external/FFmpeg/libavformat/avc.h | 37 - mythtv/external/FFmpeg/libavformat/avformat.c | 326 +- mythtv/external/FFmpeg/libavformat/avformat.h | 1082 +- mythtv/external/FFmpeg/libavformat/avidec.c | 64 +- mythtv/external/FFmpeg/libavformat/avienc.c | 21 +- mythtv/external/FFmpeg/libavformat/avio.c | 240 +- mythtv/external/FFmpeg/libavformat/avio.h | 23 +- .../FFmpeg/libavformat/avio_internal.h | 51 +- mythtv/external/FFmpeg/libavformat/aviobuf.c | 273 +- mythtv/external/FFmpeg/libavformat/avisynth.c | 581 +- .../external/FFmpeg/libavformat/avlanguage.c | 10 +- mythtv/external/FFmpeg/libavformat/avr.c | 26 +- mythtv/external/FFmpeg/libavformat/avs.c | 11 +- .../external/FFmpeg/libavformat/bethsoftvid.c | 8 +- mythtv/external/FFmpeg/libavformat/bfi.c | 6 +- mythtv/external/FFmpeg/libavformat/bink.c | 8 +- mythtv/external/FFmpeg/libavformat/binka.c | 11 +- mythtv/external/FFmpeg/libavformat/bintext.c | 63 +- mythtv/external/FFmpeg/libavformat/bit.c | 33 +- mythtv/external/FFmpeg/libavformat/bluray.c | 1 - mythtv/external/FFmpeg/libavformat/bmv.c | 10 +- mythtv/external/FFmpeg/libavformat/boadec.c | 9 +- mythtv/external/FFmpeg/libavformat/bonk.c | 117 + mythtv/external/FFmpeg/libavformat/brstm.c | 21 +- mythtv/external/FFmpeg/libavformat/c93.c | 7 +- mythtv/external/FFmpeg/libavformat/cache.c | 23 +- mythtv/external/FFmpeg/libavformat/cafdec.c | 28 +- mythtv/external/FFmpeg/libavformat/cafenc.c | 49 +- mythtv/external/FFmpeg/libavformat/cdg.c | 30 +- mythtv/external/FFmpeg/libavformat/cdxl.c | 13 +- .../external/FFmpeg/libavformat/chromaprint.c | 46 +- mythtv/external/FFmpeg/libavformat/cinedec.c | 8 +- mythtv/external/FFmpeg/libavformat/codec2.c | 51 +- mythtv/external/FFmpeg/libavformat/concat.c | 6 +- .../external/FFmpeg/libavformat/concatdec.c | 37 +- mythtv/external/FFmpeg/libavformat/crcenc.c | 13 +- mythtv/external/FFmpeg/libavformat/crypto.c | 9 +- mythtv/external/FFmpeg/libavformat/dashdec.c | 47 +- mythtv/external/FFmpeg/libavformat/dashenc.c | 157 +- mythtv/external/FFmpeg/libavformat/data_uri.c | 1 + mythtv/external/FFmpeg/libavformat/dauddec.c | 15 +- mythtv/external/FFmpeg/libavformat/daudenc.c | 43 +- mythtv/external/FFmpeg/libavformat/dcstr.c | 11 +- mythtv/external/FFmpeg/libavformat/demux.c | 446 +- mythtv/external/FFmpeg/libavformat/demux.h | 117 +- .../external/FFmpeg/libavformat/demux_utils.c | 30 +- mythtv/external/FFmpeg/libavformat/derf.c | 9 +- mythtv/external/FFmpeg/libavformat/dfa.c | 9 +- mythtv/external/FFmpeg/libavformat/dfpwmdec.c | 32 +- mythtv/external/FFmpeg/libavformat/dhav.c | 25 +- .../external/FFmpeg/libavformat/dovi_isom.c | 40 +- .../external/FFmpeg/libavformat/dovi_isom.h | 7 +- mythtv/external/FFmpeg/libavformat/dsfdec.c | 9 +- mythtv/external/FFmpeg/libavformat/dsicin.c | 7 +- mythtv/external/FFmpeg/libavformat/dss.c | 10 +- mythtv/external/FFmpeg/libavformat/dtsdec.c | 13 +- mythtv/external/FFmpeg/libavformat/dtshddec.c | 19 +- mythtv/external/FFmpeg/libavformat/dump.c | 597 +- mythtv/external/FFmpeg/libavformat/dv.c | 202 +- mythtv/external/FFmpeg/libavformat/dv.h | 6 +- mythtv/external/FFmpeg/libavformat/dvdclut.c | 75 + .../dvdclut.h} | 27 +- .../external/FFmpeg/libavformat/dvdvideodec.c | 1793 ++ mythtv/external/FFmpeg/libavformat/dvenc.c | 166 +- mythtv/external/FFmpeg/libavformat/dxa.c | 16 +- mythtv/external/FFmpeg/libavformat/eacdata.c | 9 +- .../FFmpeg/libavformat/electronicarts.c | 68 +- mythtv/external/FFmpeg/libavformat/epafdec.c | 11 +- mythtv/external/FFmpeg/libavformat/evc.c | 385 + mythtv/external/FFmpeg/libavformat/evc.h | 69 + mythtv/external/FFmpeg/libavformat/evcdec.c | 218 + mythtv/external/FFmpeg/libavformat/ffjni.c | 23 + .../external/FFmpeg/libavformat/ffmetadec.c | 7 +- .../external/FFmpeg/libavformat/ffmetaenc.c | 15 +- mythtv/external/FFmpeg/libavformat/fifo.c | 65 +- .../external/FFmpeg/libavformat/fifo_test.c | 151 - mythtv/external/FFmpeg/libavformat/file.c | 331 +- .../FFmpeg/libavformat/filmstripdec.c | 11 +- .../FFmpeg/libavformat/filmstripenc.c | 20 +- mythtv/external/FFmpeg/libavformat/fitsdec.c | 98 +- mythtv/external/FFmpeg/libavformat/fitsenc.c | 107 +- .../FFmpeg/libavformat/flac_picture.c | 4 +- mythtv/external/FFmpeg/libavformat/flacdec.c | 56 +- mythtv/external/FFmpeg/libavformat/flacenc.c | 19 +- mythtv/external/FFmpeg/libavformat/flic.c | 7 +- mythtv/external/FFmpeg/libavformat/flv.h | 17 +- mythtv/external/FFmpeg/libavformat/flvdec.c | 309 +- mythtv/external/FFmpeg/libavformat/flvenc.c | 325 +- mythtv/external/FFmpeg/libavformat/format.c | 40 +- .../external/FFmpeg/libavformat/framecrcenc.c | 13 +- mythtv/external/FFmpeg/libavformat/frmdec.c | 7 +- mythtv/external/FFmpeg/libavformat/fsb.c | 12 +- mythtv/external/FFmpeg/libavformat/ftp.c | 2 + mythtv/external/FFmpeg/libavformat/fwse.c | 11 +- mythtv/external/FFmpeg/libavformat/g722.c | 19 +- mythtv/external/FFmpeg/libavformat/g723_1.c | 11 +- mythtv/external/FFmpeg/libavformat/g726.c | 19 +- mythtv/external/FFmpeg/libavformat/g729dec.c | 13 +- mythtv/external/FFmpeg/libavformat/gdv.c | 7 +- mythtv/external/FFmpeg/libavformat/genh.c | 11 +- mythtv/external/FFmpeg/libavformat/gif.c | 36 +- mythtv/external/FFmpeg/libavformat/gifdec.c | 259 +- mythtv/external/FFmpeg/libavformat/gopher.c | 3 + mythtv/external/FFmpeg/libavformat/gsmdec.c | 15 +- mythtv/external/FFmpeg/libavformat/gxf.c | 6 +- mythtv/external/FFmpeg/libavformat/gxfenc.c | 45 +- mythtv/external/FFmpeg/libavformat/hashenc.c | 72 +- mythtv/external/FFmpeg/libavformat/hca.c | 62 +- mythtv/external/FFmpeg/libavformat/hcom.c | 7 +- mythtv/external/FFmpeg/libavformat/hdsenc.c | 17 +- mythtv/external/FFmpeg/libavformat/hevc.c | 643 +- mythtv/external/FFmpeg/libavformat/hevc.h | 20 +- mythtv/external/FFmpeg/libavformat/hevcdec.c | 2 +- mythtv/external/FFmpeg/libavformat/hls.c | 104 +- .../libavformat/hls_sample_encryption.c | 8 +- mythtv/external/FFmpeg/libavformat/hlsenc.c | 313 +- .../external/FFmpeg/libavformat/hlsplaylist.c | 9 +- .../external/FFmpeg/libavformat/hlsplaylist.h | 3 +- mythtv/external/FFmpeg/libavformat/hlsproto.c | 2 +- mythtv/external/FFmpeg/libavformat/hnm.c | 13 +- mythtv/external/FFmpeg/libavformat/http.c | 156 +- mythtv/external/FFmpeg/libavformat/httpauth.c | 2 +- mythtv/external/FFmpeg/libavformat/iamf.c | 125 + mythtv/external/FFmpeg/libavformat/iamf.h | 202 + .../external/FFmpeg/libavformat/iamf_parse.c | 1118 ++ .../external/FFmpeg/libavformat/iamf_parse.h | 37 + .../external/FFmpeg/libavformat/iamf_reader.c | 340 + .../external/FFmpeg/libavformat/iamf_reader.h | 49 + .../external/FFmpeg/libavformat/iamf_writer.c | 1151 ++ .../external/FFmpeg/libavformat/iamf_writer.h | 42 + mythtv/external/FFmpeg/libavformat/iamfdec.c | 195 + mythtv/external/FFmpeg/libavformat/iamfenc.c | 201 + mythtv/external/FFmpeg/libavformat/icecast.c | 2 +- mythtv/external/FFmpeg/libavformat/icodec.c | 15 +- mythtv/external/FFmpeg/libavformat/icoenc.c | 19 +- mythtv/external/FFmpeg/libavformat/id3v2.c | 20 +- mythtv/external/FFmpeg/libavformat/id3v2enc.c | 10 +- mythtv/external/FFmpeg/libavformat/idcin.c | 8 +- mythtv/external/FFmpeg/libavformat/idroqdec.c | 9 +- mythtv/external/FFmpeg/libavformat/idroqenc.c | 16 +- mythtv/external/FFmpeg/libavformat/iff.c | 17 +- mythtv/external/FFmpeg/libavformat/ifv.c | 10 +- mythtv/external/FFmpeg/libavformat/ilbc.c | 41 +- mythtv/external/FFmpeg/libavformat/imf.h | 8 +- mythtv/external/FFmpeg/libavformat/imf_cpl.c | 296 +- mythtv/external/FFmpeg/libavformat/imfdec.c | 61 +- mythtv/external/FFmpeg/libavformat/img2.c | 146 +- mythtv/external/FFmpeg/libavformat/img2.h | 2 +- .../FFmpeg/libavformat/img2_alias_pix.c | 9 +- .../FFmpeg/libavformat/img2_brender_pix.c | 9 +- mythtv/external/FFmpeg/libavformat/img2dec.c | 101 +- mythtv/external/FFmpeg/libavformat/img2enc.c | 37 +- mythtv/external/FFmpeg/libavformat/imx.c | 11 +- .../FFmpeg/libavformat/ingenientdec.c | 13 +- mythtv/external/FFmpeg/libavformat/internal.h | 118 +- .../external/FFmpeg/libavformat/ipfsgateway.c | 14 +- mythtv/external/FFmpeg/libavformat/ipmovie.c | 6 +- mythtv/external/FFmpeg/libavformat/ipudec.c | 13 +- mythtv/external/FFmpeg/libavformat/ircamdec.c | 11 +- mythtv/external/FFmpeg/libavformat/ircamenc.c | 22 +- mythtv/external/FFmpeg/libavformat/isom.c | 27 +- mythtv/external/FFmpeg/libavformat/isom.h | 57 +- .../external/FFmpeg/libavformat/isom_tags.c | 23 +- mythtv/external/FFmpeg/libavformat/iss.c | 7 +- mythtv/external/FFmpeg/libavformat/iv8.c | 9 +- mythtv/external/FFmpeg/libavformat/ivfdec.c | 24 +- mythtv/external/FFmpeg/libavformat/ivfenc.c | 43 +- .../external/FFmpeg/libavformat/jacosubdec.c | 50 +- .../external/FFmpeg/libavformat/jacosubenc.c | 19 +- .../FFmpeg/libavformat/jpegxl_anim_dec.c | 208 + .../FFmpeg/libavformat/jpegxl_parse.c | 22 + .../FFmpeg/libavformat/jpegxl_probe.c | 396 - mythtv/external/FFmpeg/libavformat/jvdec.c | 10 +- mythtv/external/FFmpeg/libavformat/kvag.c | 43 +- mythtv/external/FFmpeg/libavformat/lafdec.c | 294 + mythtv/external/FFmpeg/libavformat/latmenc.c | 21 +- mythtv/external/FFmpeg/libavformat/lc3.c | 244 + mythtv/external/FFmpeg/libavformat/libamqp.c | 9 +- mythtv/external/FFmpeg/libavformat/libgme.c | 14 +- .../external/FFmpeg/libavformat/libmodplug.c | 12 +- .../external/FFmpeg/libavformat/libopenmpt.c | 29 +- mythtv/external/FFmpeg/libavformat/librist.c | 8 +- mythtv/external/FFmpeg/libavformat/librtmp.c | 14 +- .../FFmpeg/libavformat/libsmbclient.c | 3 +- mythtv/external/FFmpeg/libavformat/libsrt.c | 53 +- mythtv/external/FFmpeg/libavformat/libssh.c | 12 +- mythtv/external/FFmpeg/libavformat/libzmq.c | 5 +- mythtv/external/FFmpeg/libavformat/lmlm4.c | 15 +- mythtv/external/FFmpeg/libavformat/loasdec.c | 13 +- mythtv/external/FFmpeg/libavformat/lrc.c | 2 +- mythtv/external/FFmpeg/libavformat/lrcdec.c | 23 +- mythtv/external/FFmpeg/libavformat/lrcenc.c | 30 +- .../external/FFmpeg/libavformat/luodatdec.c | 11 +- mythtv/external/FFmpeg/libavformat/lvfdec.c | 11 +- mythtv/external/FFmpeg/libavformat/lxfdec.c | 8 +- mythtv/external/FFmpeg/libavformat/matroska.c | 66 +- mythtv/external/FFmpeg/libavformat/matroska.h | 52 +- .../external/FFmpeg/libavformat/matroskadec.c | 1473 +- .../external/FFmpeg/libavformat/matroskaenc.c | 707 +- mythtv/external/FFmpeg/libavformat/mca.c | 8 +- mythtv/external/FFmpeg/libavformat/mccdec.c | 11 +- mythtv/external/FFmpeg/libavformat/md5proto.c | 1 - mythtv/external/FFmpeg/libavformat/metadata.c | 4 +- mythtv/external/FFmpeg/libavformat/mgsts.c | 9 +- .../external/FFmpeg/libavformat/microdvddec.c | 11 +- .../external/FFmpeg/libavformat/microdvdenc.c | 24 +- mythtv/external/FFmpeg/libavformat/mj2kdec.c | 4 - .../FFmpeg/libavformat/mkvtimestamp_v2.c | 11 +- mythtv/external/FFmpeg/libavformat/mlpdec.c | 25 +- mythtv/external/FFmpeg/libavformat/mlvdec.c | 11 +- mythtv/external/FFmpeg/libavformat/mm.c | 9 +- mythtv/external/FFmpeg/libavformat/mmf.c | 27 +- mythtv/external/FFmpeg/libavformat/mms.c | 1 + mythtv/external/FFmpeg/libavformat/mmsh.c | 6 +- mythtv/external/FFmpeg/libavformat/mmst.c | 6 +- mythtv/external/FFmpeg/libavformat/mods.c | 11 +- mythtv/external/FFmpeg/libavformat/moflex.c | 13 +- mythtv/external/FFmpeg/libavformat/mov.c | 3029 +++- mythtv/external/FFmpeg/libavformat/mov_chan.c | 819 +- mythtv/external/FFmpeg/libavformat/mov_chan.h | 31 + mythtv/external/FFmpeg/libavformat/movenc.c | 1747 +- mythtv/external/FFmpeg/libavformat/movenc.h | 11 +- .../external/FFmpeg/libavformat/movenc_ttml.c | 1 + .../external/FFmpeg/libavformat/movenccenc.c | 6 +- .../external/FFmpeg/libavformat/movenchint.c | 1 + mythtv/external/FFmpeg/libavformat/mp3dec.c | 56 +- mythtv/external/FFmpeg/libavformat/mp3enc.c | 36 +- mythtv/external/FFmpeg/libavformat/mpc.c | 11 +- mythtv/external/FFmpeg/libavformat/mpc8.c | 47 +- mythtv/external/FFmpeg/libavformat/mpeg.c | 36 +- mythtv/external/FFmpeg/libavformat/mpeg.h | 1 + mythtv/external/FFmpeg/libavformat/mpegenc.c | 126 +- .../FFmpeg/libavformat/mpegts-mythtv.c | 121 +- .../FFmpeg/libavformat/mpegts-mythtv.h | 1 + mythtv/external/FFmpeg/libavformat/mpegts.c | 121 +- mythtv/external/FFmpeg/libavformat/mpegts.h | 1 + .../external/FFmpeg/libavformat/mpegtsenc.c | 284 +- mythtv/external/FFmpeg/libavformat/mpjpeg.c | 21 +- .../external/FFmpeg/libavformat/mpjpegdec.c | 32 +- mythtv/external/FFmpeg/libavformat/mpl2dec.c | 11 +- mythtv/external/FFmpeg/libavformat/mpsubdec.c | 16 +- mythtv/external/FFmpeg/libavformat/msf.c | 9 +- .../external/FFmpeg/libavformat/msnwc_tcp.c | 7 +- mythtv/external/FFmpeg/libavformat/mspdec.c | 9 +- mythtv/external/FFmpeg/libavformat/mtaf.c | 9 +- mythtv/external/FFmpeg/libavformat/mtv.c | 9 +- mythtv/external/FFmpeg/libavformat/musx.c | 9 +- mythtv/external/FFmpeg/libavformat/mux.c | 205 +- mythtv/external/FFmpeg/libavformat/mux.h | 153 +- .../external/FFmpeg/libavformat/mux_utils.c | 70 +- mythtv/external/FFmpeg/libavformat/mvdec.c | 11 +- mythtv/external/FFmpeg/libavformat/mvi.c | 9 +- mythtv/external/FFmpeg/libavformat/mxf.c | 5 + mythtv/external/FFmpeg/libavformat/mxf.h | 6 +- mythtv/external/FFmpeg/libavformat/mxfdec.c | 646 +- mythtv/external/FFmpeg/libavformat/mxfenc.c | 598 +- mythtv/external/FFmpeg/libavformat/mxg.c | 10 +- mythtv/external/FFmpeg/libavformat/nal.c | 190 + mythtv/external/FFmpeg/libavformat/nal.h | 67 + mythtv/external/FFmpeg/libavformat/ncdec.c | 9 +- mythtv/external/FFmpeg/libavformat/network.c | 44 +- mythtv/external/FFmpeg/libavformat/network.h | 2 +- .../FFmpeg/libavformat/nistspheredec.c | 11 +- mythtv/external/FFmpeg/libavformat/nspdec.c | 11 +- mythtv/external/FFmpeg/libavformat/nsvdec.c | 30 +- mythtv/external/FFmpeg/libavformat/nullenc.c | 12 +- mythtv/external/FFmpeg/libavformat/nut.c | 3 + mythtv/external/FFmpeg/libavformat/nutdec.c | 39 +- mythtv/external/FFmpeg/libavformat/nutenc.c | 86 +- mythtv/external/FFmpeg/libavformat/nuv.c | 12 +- mythtv/external/FFmpeg/libavformat/oggdec.c | 17 +- mythtv/external/FFmpeg/libavformat/oggenc.c | 117 +- .../FFmpeg/libavformat/oggparsecelt.c | 1 + .../FFmpeg/libavformat/oggparsedirac.c | 1 + .../FFmpeg/libavformat/oggparseflac.c | 25 +- .../FFmpeg/libavformat/oggparseopus.c | 1 + .../FFmpeg/libavformat/oggparsespeex.c | 1 + .../FFmpeg/libavformat/oggparsetheora.c | 4 +- .../FFmpeg/libavformat/oggparsevorbis.c | 8 +- mythtv/external/FFmpeg/libavformat/omadec.c | 16 +- mythtv/external/FFmpeg/libavformat/omaenc.c | 20 +- mythtv/external/FFmpeg/libavformat/options.c | 284 +- .../FFmpeg/libavformat/options_table.h | 83 +- .../external/FFmpeg/libavformat/os_support.c | 7 +- .../external/FFmpeg/libavformat/os_support.h | 2 + mythtv/external/FFmpeg/libavformat/osq.c | 118 + mythtv/external/FFmpeg/libavformat/paf.c | 10 +- mythtv/external/FFmpeg/libavformat/pcm.c | 41 +- mythtv/external/FFmpeg/libavformat/pcm.h | 1 + mythtv/external/FFmpeg/libavformat/pcmdec.c | 50 +- mythtv/external/FFmpeg/libavformat/pcmenc.c | 18 +- mythtv/external/FFmpeg/libavformat/pdvdec.c | 175 + mythtv/external/FFmpeg/libavformat/pjsdec.c | 11 +- mythtv/external/FFmpeg/libavformat/pmpdec.c | 8 +- mythtv/external/FFmpeg/libavformat/pp_bnk.c | 10 +- mythtv/external/FFmpeg/libavformat/prompeg.c | 3 +- .../external/FFmpeg/libavformat/protocols.c | 9 +- mythtv/external/FFmpeg/libavformat/psxstr.c | 20 +- mythtv/external/FFmpeg/libavformat/pva.c | 7 +- mythtv/external/FFmpeg/libavformat/pvfdec.c | 11 +- mythtv/external/FFmpeg/libavformat/qcp.c | 7 +- mythtv/external/FFmpeg/libavformat/qoadec.c | 114 + mythtv/external/FFmpeg/libavformat/r3d.c | 7 +- .../FFmpeg/libavformat/rangecoder_dec.c | 1 + mythtv/external/FFmpeg/libavformat/rawdec.c | 25 +- mythtv/external/FFmpeg/libavformat/rawdec.h | 25 +- mythtv/external/FFmpeg/libavformat/rawenc.c | 689 +- .../external/FFmpeg/libavformat/rawvideodec.c | 63 +- mythtv/external/FFmpeg/libavformat/rcwtdec.c | 122 + mythtv/external/FFmpeg/libavformat/rcwtenc.c | 167 + mythtv/external/FFmpeg/libavformat/rdt.c | 11 +- .../external/FFmpeg/libavformat/realtextdec.c | 19 +- mythtv/external/FFmpeg/libavformat/redspark.c | 9 +- .../external/FFmpeg/libavformat/replaygain.c | 12 +- mythtv/external/FFmpeg/libavformat/riff.c | 17 +- mythtv/external/FFmpeg/libavformat/riff.h | 3 +- mythtv/external/FFmpeg/libavformat/riffdec.c | 38 +- mythtv/external/FFmpeg/libavformat/riffenc.c | 11 +- .../FFmpeg/libavformat/riscv/Makefile | 1 + .../FFmpeg/libavformat/riscv/cpu_common.c | 1 + mythtv/external/FFmpeg/libavformat/rka.c | 173 + mythtv/external/FFmpeg/libavformat/rl2.c | 7 +- mythtv/external/FFmpeg/libavformat/rm.h | 2 +- mythtv/external/FFmpeg/libavformat/rmdec.c | 37 +- mythtv/external/FFmpeg/libavformat/rmenc.c | 17 +- mythtv/external/FFmpeg/libavformat/rpl.c | 18 +- mythtv/external/FFmpeg/libavformat/rsd.c | 12 +- mythtv/external/FFmpeg/libavformat/rsodec.c | 11 +- mythtv/external/FFmpeg/libavformat/rsoenc.c | 19 +- mythtv/external/FFmpeg/libavformat/rtmpdh.c | 21 +- mythtv/external/FFmpeg/libavformat/rtmphttp.c | 3 +- mythtv/external/FFmpeg/libavformat/rtmppkt.c | 15 +- mythtv/external/FFmpeg/libavformat/rtmppkt.h | 8 + .../external/FFmpeg/libavformat/rtmpproto.c | 57 +- mythtv/external/FFmpeg/libavformat/rtpdec.c | 1 + .../external/FFmpeg/libavformat/rtpdec_asf.c | 3 +- .../external/FFmpeg/libavformat/rtpdec_h264.c | 1 + .../external/FFmpeg/libavformat/rtpdec_hevc.c | 1 + .../external/FFmpeg/libavformat/rtpdec_latm.c | 1 + .../FFmpeg/libavformat/rtpdec_mpa_robust.c | 1 + .../FFmpeg/libavformat/rtpdec_mpeg4.c | 1 + .../external/FFmpeg/libavformat/rtpdec_qt.c | 3 +- .../FFmpeg/libavformat/rtpdec_rfc4175.c | 1 + .../external/FFmpeg/libavformat/rtpdec_xiph.c | 1 + mythtv/external/FFmpeg/libavformat/rtpenc.c | 16 +- mythtv/external/FFmpeg/libavformat/rtpenc.h | 16 +- .../FFmpeg/libavformat/rtpenc_chain.c | 1 + .../external/FFmpeg/libavformat/rtpenc_h261.c | 4 +- .../external/FFmpeg/libavformat/rtpenc_h263.c | 4 +- .../FFmpeg/libavformat/rtpenc_h264_hevc.c | 9 +- .../external/FFmpeg/libavformat/rtpenc_jpeg.c | 41 +- .../FFmpeg/libavformat/rtpenc_mpegts.c | 14 +- .../FFmpeg/libavformat/rtpenc_rfc4175.c | 4 +- .../FFmpeg/libavformat/rtpenc_vc2hq.c | 15 +- mythtv/external/FFmpeg/libavformat/rtpproto.c | 4 +- mythtv/external/FFmpeg/libavformat/rtsp.c | 78 +- mythtv/external/FFmpeg/libavformat/rtsp.h | 1 + mythtv/external/FFmpeg/libavformat/rtspdec.c | 16 +- mythtv/external/FFmpeg/libavformat/rtspenc.c | 15 +- mythtv/external/FFmpeg/libavformat/s337m.c | 9 +- mythtv/external/FFmpeg/libavformat/samidec.c | 17 +- mythtv/external/FFmpeg/libavformat/sapdec.c | 16 +- mythtv/external/FFmpeg/libavformat/sapenc.c | 13 +- mythtv/external/FFmpeg/libavformat/sauce.c | 9 +- mythtv/external/FFmpeg/libavformat/sbcdec.c | 13 +- mythtv/external/FFmpeg/libavformat/sbgdec.c | 93 +- mythtv/external/FFmpeg/libavformat/sccdec.c | 12 +- mythtv/external/FFmpeg/libavformat/sccenc.c | 29 +- mythtv/external/FFmpeg/libavformat/scd.c | 17 +- mythtv/external/FFmpeg/libavformat/sdns.c | 96 + mythtv/external/FFmpeg/libavformat/sdp.c | 10 +- mythtv/external/FFmpeg/libavformat/sdr2.c | 11 +- mythtv/external/FFmpeg/libavformat/sdsdec.c | 13 +- mythtv/external/FFmpeg/libavformat/sdxdec.c | 11 +- mythtv/external/FFmpeg/libavformat/seek.c | 42 +- mythtv/external/FFmpeg/libavformat/segafilm.c | 12 +- .../external/FFmpeg/libavformat/segafilmenc.c | 22 +- mythtv/external/FFmpeg/libavformat/segment.c | 87 +- mythtv/external/FFmpeg/libavformat/serdec.c | 29 +- mythtv/external/FFmpeg/libavformat/sga.c | 11 +- .../external/FFmpeg/libavformat/shortendec.c | 13 +- .../external/FFmpeg/libavformat/sierravmd.c | 10 +- mythtv/external/FFmpeg/libavformat/siff.c | 14 +- mythtv/external/FFmpeg/libavformat/smacker.c | 12 +- .../external/FFmpeg/libavformat/smjpegdec.c | 13 +- .../external/FFmpeg/libavformat/smjpegenc.c | 24 +- .../FFmpeg/libavformat/smoothstreamingenc.c | 19 +- mythtv/external/FFmpeg/libavformat/smush.c | 7 +- mythtv/external/FFmpeg/libavformat/sol.c | 10 +- mythtv/external/FFmpeg/libavformat/soxdec.c | 18 +- mythtv/external/FFmpeg/libavformat/soxenc.c | 17 +- mythtv/external/FFmpeg/libavformat/spdifdec.c | 30 +- mythtv/external/FFmpeg/libavformat/spdifenc.c | 26 +- mythtv/external/FFmpeg/libavformat/srtdec.c | 13 +- mythtv/external/FFmpeg/libavformat/srtenc.c | 24 +- mythtv/external/FFmpeg/libavformat/srtp.c | 1 + .../external/FFmpeg/libavformat/srtpproto.c | 8 +- mythtv/external/FFmpeg/libavformat/stldec.c | 11 +- mythtv/external/FFmpeg/libavformat/subfile.c | 8 +- .../external/FFmpeg/libavformat/subtitles.c | 47 +- .../external/FFmpeg/libavformat/subtitles.h | 20 +- .../FFmpeg/libavformat/subviewer1dec.c | 11 +- .../FFmpeg/libavformat/subviewerdec.c | 47 +- mythtv/external/FFmpeg/libavformat/supdec.c | 13 +- mythtv/external/FFmpeg/libavformat/supenc.c | 28 +- mythtv/external/FFmpeg/libavformat/svag.c | 9 +- mythtv/external/FFmpeg/libavformat/svs.c | 9 +- mythtv/external/FFmpeg/libavformat/swfdec.c | 7 +- mythtv/external/FFmpeg/libavformat/swfenc.c | 43 +- mythtv/external/FFmpeg/libavformat/takdec.c | 14 +- mythtv/external/FFmpeg/libavformat/tcp.c | 55 +- .../FFmpeg/libavformat/tedcaptionsdec.c | 13 +- mythtv/external/FFmpeg/libavformat/tee.c | 106 +- mythtv/external/FFmpeg/libavformat/teeproto.c | 37 +- .../FFmpeg/libavformat/tests/fifo_muxer.c | 127 +- .../external/FFmpeg/libavformat/tests/imf.c | 79 +- .../FFmpeg/libavformat/tests/movenc.c | 124 +- mythtv/external/FFmpeg/libavformat/thp.c | 7 +- .../external/FFmpeg/libavformat/tiertexseq.c | 10 +- mythtv/external/FFmpeg/libavformat/tls.c | 29 +- .../external/FFmpeg/libavformat/tls_gnutls.c | 16 +- .../external/FFmpeg/libavformat/tls_mbedtls.c | 55 +- .../external/FFmpeg/libavformat/tls_openssl.c | 50 +- .../FFmpeg/libavformat/tls_schannel.c | 18 +- .../FFmpeg/libavformat/tls_securetransport.c | 1 + mythtv/external/FFmpeg/libavformat/tmv.c | 13 +- mythtv/external/FFmpeg/libavformat/tta.c | 11 +- mythtv/external/FFmpeg/libavformat/ttaenc.c | 26 +- mythtv/external/FFmpeg/libavformat/ttmlenc.c | 80 +- mythtv/external/FFmpeg/libavformat/tty.c | 26 +- mythtv/external/FFmpeg/libavformat/txd.c | 7 +- mythtv/external/FFmpeg/libavformat/ty.c | 14 +- mythtv/external/FFmpeg/libavformat/udp.c | 12 +- .../FFmpeg/libavformat/uncodedframecrcenc.c | 15 +- mythtv/external/FFmpeg/libavformat/unix.c | 8 +- mythtv/external/FFmpeg/libavformat/url.c | 6 +- mythtv/external/FFmpeg/libavformat/url.h | 26 +- mythtv/external/FFmpeg/libavformat/usmdec.c | 428 + mythtv/external/FFmpeg/libavformat/utils.c | 26 +- mythtv/external/FFmpeg/libavformat/vag.c | 9 +- .../external/FFmpeg/libavformat/vapoursynth.c | 157 +- mythtv/external/FFmpeg/libavformat/vc1test.c | 12 +- .../external/FFmpeg/libavformat/vc1testenc.c | 20 +- mythtv/external/FFmpeg/libavformat/version.c | 5 +- mythtv/external/FFmpeg/libavformat/version.h | 2 +- .../FFmpeg/libavformat/version_major.h | 13 +- mythtv/external/FFmpeg/libavformat/vividas.c | 27 +- mythtv/external/FFmpeg/libavformat/vivo.c | 9 +- mythtv/external/FFmpeg/libavformat/vocdec.c | 9 +- mythtv/external/FFmpeg/libavformat/vocenc.c | 19 +- .../FFmpeg/libavformat/vorbiscomment.c | 14 +- mythtv/external/FFmpeg/libavformat/vpcc.c | 65 +- mythtv/external/FFmpeg/libavformat/vpcc.h | 5 + mythtv/external/FFmpeg/libavformat/vpk.c | 8 +- .../external/FFmpeg/libavformat/vplayerdec.c | 11 +- mythtv/external/FFmpeg/libavformat/vqf.c | 14 +- mythtv/external/FFmpeg/libavformat/vvc.c | 936 + mythtv/external/FFmpeg/libavformat/vvc.h | 99 + mythtv/external/FFmpeg/libavformat/vvcdec.c | 77 + mythtv/external/FFmpeg/libavformat/wady.c | 87 + mythtv/external/FFmpeg/libavformat/wavarc.c | 146 + mythtv/external/FFmpeg/libavformat/wavdec.c | 71 +- mythtv/external/FFmpeg/libavformat/wavenc.c | 66 +- mythtv/external/FFmpeg/libavformat/wc3movie.c | 10 +- .../external/FFmpeg/libavformat/webm_chunk.c | 25 +- .../external/FFmpeg/libavformat/webmdashenc.c | 15 +- mythtv/external/FFmpeg/libavformat/webpenc.c | 161 +- .../external/FFmpeg/libavformat/webvttdec.c | 29 +- .../external/FFmpeg/libavformat/webvttenc.c | 25 +- .../FFmpeg/libavformat/westwood_aud.c | 7 +- .../FFmpeg/libavformat/westwood_audenc.c | 30 +- .../FFmpeg/libavformat/westwood_vqa.c | 22 +- mythtv/external/FFmpeg/libavformat/wsddec.c | 17 +- mythtv/external/FFmpeg/libavformat/wtvdec.c | 66 +- mythtv/external/FFmpeg/libavformat/wtvenc.c | 23 +- mythtv/external/FFmpeg/libavformat/wvdec.c | 11 +- mythtv/external/FFmpeg/libavformat/wvedec.c | 9 +- mythtv/external/FFmpeg/libavformat/wvenc.c | 32 +- mythtv/external/FFmpeg/libavformat/xa.c | 7 +- mythtv/external/FFmpeg/libavformat/xmd.c | 80 + mythtv/external/FFmpeg/libavformat/xmv.c | 14 +- mythtv/external/FFmpeg/libavformat/xvag.c | 9 +- mythtv/external/FFmpeg/libavformat/xwma.c | 12 +- mythtv/external/FFmpeg/libavformat/yop.c | 10 +- .../external/FFmpeg/libavformat/yuv4mpegdec.c | 11 +- .../external/FFmpeg/libavformat/yuv4mpegenc.c | 30 +- mythtv/external/FFmpeg/libavutil/Makefile | 18 +- .../FFmpeg/libavutil/aarch64/Makefile | 4 +- .../external/FFmpeg/libavutil/aarch64/asm.S | 23 + .../external/FFmpeg/libavutil/aarch64/cpu.c | 120 +- .../external/FFmpeg/libavutil/aarch64/cpu.h | 2 + .../FFmpeg/libavutil/aarch64/float_dsp_neon.S | 200 +- .../FFmpeg/libavutil/aarch64/intreadwrite.h | 42 + .../external/FFmpeg/libavutil/aarch64/timer.h | 17 +- .../FFmpeg/libavutil/aarch64/tx_float_init.c | 64 + .../FFmpeg/libavutil/aarch64/tx_float_neon.S | 1294 ++ mythtv/external/FFmpeg/libavutil/aes.c | 24 +- mythtv/external/FFmpeg/libavutil/aes.h | 7 +- mythtv/external/FFmpeg/libavutil/aes_ctr.h | 12 + .../libavutil/ambient_viewing_environment.c | 59 + .../libavutil/ambient_viewing_environment.h | 72 + mythtv/external/FFmpeg/libavutil/arm/bswap.h | 25 +- mythtv/external/FFmpeg/libavutil/arm/cpu.c | 2 +- .../FFmpeg/libavutil/arm/float_dsp_init_vfp.c | 2 +- .../external/FFmpeg/libavutil/arm/intmath.h | 24 +- .../FFmpeg/libavutil/arm/intreadwrite.h | 91 - .../FFmpeg/libavutil/attributes_internal.h | 34 + mythtv/external/FFmpeg/libavutil/audio_fifo.c | 9 +- mythtv/external/FFmpeg/libavutil/audio_fifo.h | 9 +- mythtv/external/FFmpeg/libavutil/avassert.h | 3 + .../FFmpeg/libavutil/avr32/intreadwrite.h | 182 - mythtv/external/FFmpeg/libavutil/avsscanf.c | 1 - mythtv/external/FFmpeg/libavutil/avstring.c | 13 +- mythtv/external/FFmpeg/libavutil/avstring.h | 13 +- mythtv/external/FFmpeg/libavutil/avutil.h | 19 +- mythtv/external/FFmpeg/libavutil/base64.c | 6 +- mythtv/external/FFmpeg/libavutil/bprint.c | 7 +- mythtv/external/FFmpeg/libavutil/bprint.h | 93 +- mythtv/external/FFmpeg/libavutil/bswap.h | 10 +- mythtv/external/FFmpeg/libavutil/buffer.c | 13 +- mythtv/external/FFmpeg/libavutil/camellia.h | 2 +- mythtv/external/FFmpeg/libavutil/cast5.c | 2 +- .../FFmpeg/libavutil/channel_layout.c | 580 +- .../FFmpeg/libavutil/channel_layout.h | 308 +- .../external/FFmpeg/libavutil/color_utils.c | 234 - .../external/FFmpeg/libavutil/color_utils.h | 56 - mythtv/external/FFmpeg/libavutil/common.h | 57 +- mythtv/external/FFmpeg/libavutil/cpu.c | 43 +- mythtv/external/FFmpeg/libavutil/cpu.h | 21 + .../external/FFmpeg/libavutil/cpu_internal.h | 3 + mythtv/external/FFmpeg/libavutil/crc.h | 3 + mythtv/external/FFmpeg/libavutil/csp.c | 172 + mythtv/external/FFmpeg/libavutil/csp.h | 46 +- mythtv/external/FFmpeg/libavutil/des.h | 8 +- .../FFmpeg/libavutil/detection_bbox.c | 1 + .../FFmpeg/libavutil/detection_bbox.h | 1 + mythtv/external/FFmpeg/libavutil/dict.c | 104 +- mythtv/external/FFmpeg/libavutil/dict.h | 125 +- .../external/FFmpeg/libavutil/dict_internal.h | 37 + mythtv/external/FFmpeg/libavutil/display.h | 20 +- mythtv/external/FFmpeg/libavutil/dovi_meta.c | 22 +- mythtv/external/FFmpeg/libavutil/dovi_meta.h | 160 + .../FFmpeg/libavutil/{x86 => }/emms.h | 14 +- .../FFmpeg/libavutil/encryption_info.c | 2 + mythtv/external/FFmpeg/libavutil/error.c | 1 + mythtv/external/FFmpeg/libavutil/error.h | 1 + mythtv/external/FFmpeg/libavutil/eval.c | 49 +- mythtv/external/FFmpeg/libavutil/eval.h | 7 +- mythtv/external/FFmpeg/libavutil/executor.c | 221 + mythtv/external/FFmpeg/libavutil/executor.h | 67 + mythtv/external/FFmpeg/libavutil/fifo.c | 222 +- mythtv/external/FFmpeg/libavutil/fifo.h | 230 +- mythtv/external/FFmpeg/libavutil/file.c | 16 +- mythtv/external/FFmpeg/libavutil/file.h | 18 +- mythtv/external/FFmpeg/libavutil/file_open.c | 18 +- mythtv/external/FFmpeg/libavutil/file_open.h | 57 + .../FFmpeg/libavutil/film_grain_params.c | 68 +- .../FFmpeg/libavutil/film_grain_params.h | 68 +- mythtv/external/FFmpeg/libavutil/fixed_dsp.c | 7 +- mythtv/external/FFmpeg/libavutil/fixed_dsp.h | 4 +- mythtv/external/FFmpeg/libavutil/float2half.c | 55 + mythtv/external/FFmpeg/libavutil/float2half.h | 56 + mythtv/external/FFmpeg/libavutil/float_dsp.c | 16 +- mythtv/external/FFmpeg/libavutil/float_dsp.h | 34 +- mythtv/external/FFmpeg/libavutil/frame.c | 676 +- mythtv/external/FFmpeg/libavutil/frame.h | 366 +- .../half2float.h => libavutil/half2float.c} | 53 +- mythtv/external/FFmpeg/libavutil/half2float.h | 57 + mythtv/external/FFmpeg/libavutil/hash.c | 74 +- .../FFmpeg/libavutil/hdr_dynamic_metadata.c | 350 + .../FFmpeg/libavutil/hdr_dynamic_metadata.h | 33 + .../libavutil/hdr_dynamic_vivid_metadata.h | 63 +- mythtv/external/FFmpeg/libavutil/hmac.c | 1 + mythtv/external/FFmpeg/libavutil/hwcontext.c | 306 +- mythtv/external/FFmpeg/libavutil/hwcontext.h | 29 +- .../FFmpeg/libavutil/hwcontext_cuda.c | 91 +- .../FFmpeg/libavutil/hwcontext_cuda.h | 5 + .../FFmpeg/libavutil/hwcontext_d3d11va.c | 153 +- .../FFmpeg/libavutil/hwcontext_d3d12va.c | 698 + .../FFmpeg/libavutil/hwcontext_d3d12va.h | 142 + .../libavutil/hwcontext_d3d12va_internal.h | 59 + .../external/FFmpeg/libavutil/hwcontext_drm.c | 1 + .../FFmpeg/libavutil/hwcontext_dxva2.c | 45 +- .../FFmpeg/libavutil/hwcontext_internal.h | 31 +- .../FFmpeg/libavutil/hwcontext_mediacodec.c | 73 +- .../FFmpeg/libavutil/hwcontext_mediacodec.h | 25 + .../FFmpeg/libavutil/hwcontext_opencl.c | 192 +- .../external/FFmpeg/libavutil/hwcontext_qsv.c | 1181 +- .../external/FFmpeg/libavutil/hwcontext_qsv.h | 40 +- .../FFmpeg/libavutil/hwcontext_vaapi.c | 268 +- .../FFmpeg/libavutil/hwcontext_vdpau.c | 47 +- .../FFmpeg/libavutil/hwcontext_videotoolbox.c | 178 +- .../FFmpeg/libavutil/hwcontext_videotoolbox.h | 19 +- .../FFmpeg/libavutil/hwcontext_vulkan.c | 3642 ++-- .../FFmpeg/libavutil/hwcontext_vulkan.h | 171 +- mythtv/external/FFmpeg/libavutil/iamf.c | 563 + mythtv/external/FFmpeg/libavutil/iamf.h | 690 + mythtv/external/FFmpeg/libavutil/imgutils.c | 131 +- mythtv/external/FFmpeg/libavutil/imgutils.h | 76 +- .../FFmpeg/libavutil/imgutils_internal.h | 4 + mythtv/external/FFmpeg/libavutil/integer.c | 12 +- mythtv/external/FFmpeg/libavutil/internal.h | 145 +- mythtv/external/FFmpeg/libavutil/intmath.h | 9 +- .../external/FFmpeg/libavutil/intreadwrite.h | 53 +- mythtv/external/FFmpeg/libavutil/lfg.h | 5 +- mythtv/external/FFmpeg/libavutil/lls.c | 13 +- mythtv/external/FFmpeg/libavutil/lls.h | 1 + mythtv/external/FFmpeg/libavutil/log.c | 11 +- .../external/FFmpeg/libavutil/loongarch/cpu.c | 24 +- .../{aarch64/bswap.h => loongarch/timer.h} | 38 +- .../external/FFmpeg/libavutil/macos_kperf.c | 18 +- .../libavutil/mastering_display_metadata.c | 29 +- .../libavutil/mastering_display_metadata.h | 9 + .../external/FFmpeg/libavutil/mathematics.c | 104 + .../external/FFmpeg/libavutil/mathematics.h | 61 +- mythtv/external/FFmpeg/libavutil/md5.c | 2 + mythtv/external/FFmpeg/libavutil/mem.c | 16 +- mythtv/external/FFmpeg/libavutil/mem.h | 95 +- .../external/FFmpeg/libavutil/mem_internal.h | 38 +- mythtv/external/FFmpeg/libavutil/mips/cpu.c | 2 +- .../FFmpeg/libavutil/mips/float_dsp_mips.c | 2 +- .../libavutil/mips/generic_macros_msa.h | 6 +- mythtv/external/FFmpeg/libavutil/murmur3.c | 1 + mythtv/external/FFmpeg/libavutil/opt.c | 1505 +- mythtv/external/FFmpeg/libavutil/opt.h | 840 +- mythtv/external/FFmpeg/libavutil/parseutils.h | 24 +- mythtv/external/FFmpeg/libavutil/pca.c | 1 + mythtv/external/FFmpeg/libavutil/pixdesc.c | 474 +- mythtv/external/FFmpeg/libavutil/pixdesc.h | 42 +- mythtv/external/FFmpeg/libavutil/pixfmt.h | 101 +- mythtv/external/FFmpeg/libavutil/ppc/cpu.c | 36 +- .../external/FFmpeg/libavutil/random_seed.c | 70 +- .../external/FFmpeg/libavutil/random_seed.h | 14 + mythtv/external/FFmpeg/libavutil/rational.c | 2 +- mythtv/external/FFmpeg/libavutil/rational.h | 7 +- mythtv/external/FFmpeg/libavutil/rc4.h | 3 + .../external/FFmpeg/libavutil/riscv/Makefile | 8 + mythtv/external/FFmpeg/libavutil/riscv/asm.S | 239 + .../external/FFmpeg/libavutil/riscv/bswap.h | 72 + .../FFmpeg/libavutil/riscv/bswap_rvb.S | 65 + mythtv/external/FFmpeg/libavutil/riscv/cpu.c | 133 + mythtv/external/FFmpeg/libavutil/riscv/cpu.h | 80 + .../FFmpeg/libavutil/riscv/cpu_common.c | 33 + .../FFmpeg/libavutil/riscv/fixed_dsp_init.c | 64 + .../FFmpeg/libavutil/riscv/fixed_dsp_rvv.S | 222 + .../FFmpeg/libavutil/riscv/float_dsp_init.c | 77 + .../FFmpeg/libavutil/riscv/float_dsp_rvv.S | 284 + .../external/FFmpeg/libavutil/riscv/intmath.h | 266 + .../FFmpeg/libavutil/riscv/lls_init.c | 56 + .../external/FFmpeg/libavutil/riscv/lls_rvv.S | 39 + mythtv/external/FFmpeg/libavutil/samplefmt.c | 4 +- mythtv/external/FFmpeg/libavutil/samplefmt.h | 5 +- mythtv/external/FFmpeg/libavutil/sfc64.h | 84 + .../external/FFmpeg/libavutil/slicethread.c | 34 +- mythtv/external/FFmpeg/libavutil/softfloat.h | 6 +- mythtv/external/FFmpeg/libavutil/spherical.c | 6 + mythtv/external/FFmpeg/libavutil/spherical.h | 29 +- mythtv/external/FFmpeg/libavutil/stereo3d.c | 77 +- mythtv/external/FFmpeg/libavutil/stereo3d.h | 112 +- .../FFmpeg/libavutil/tests/.gitignore | 2 + .../FFmpeg/libavutil/tests/avstring.c | 16 - .../external/FFmpeg/libavutil/tests/base64.c | 10 + .../FFmpeg/libavutil/tests/channel_layout.c | 498 +- .../FFmpeg/libavutil/tests/color_utils.c | 4 +- mythtv/external/FFmpeg/libavutil/tests/cpu.c | 23 +- mythtv/external/FFmpeg/libavutil/tests/dict.c | 55 +- .../FFmpeg/libavutil/tests/hwdevice.c | 4 +- .../FFmpeg/libavutil/tests/imgutils.c | 122 +- mythtv/external/FFmpeg/libavutil/tests/lfg.c | 1 + mythtv/external/FFmpeg/libavutil/tests/lzo.c | 2 + .../external/FFmpeg/libavutil/tests/murmur3.c | 3 + mythtv/external/FFmpeg/libavutil/tests/opt.c | 245 +- .../external/FFmpeg/libavutil/tests/pixdesc.c | 1 + .../FFmpeg/libavutil/tests/pixelutils.c | 62 +- .../FFmpeg/libavutil/tests/pixfmt_best.c | 131 +- .../FFmpeg/libavutil/tests/side_data_array.c | 111 + .../FFmpeg/libavutil/tests/softfloat.c | 2 +- mythtv/external/FFmpeg/libavutil/tests/tea.c | 1 + mythtv/external/FFmpeg/libavutil/tests/tree.c | 1 + mythtv/external/FFmpeg/libavutil/thread.h | 51 +- .../external/FFmpeg/libavutil/threadmessage.c | 3 + mythtv/external/FFmpeg/libavutil/timecode.c | 5 +- mythtv/external/FFmpeg/libavutil/timecode.h | 14 +- mythtv/external/FFmpeg/libavutil/timer.h | 21 +- mythtv/external/FFmpeg/libavutil/timestamp.c | 36 + mythtv/external/FFmpeg/libavutil/timestamp.h | 17 +- .../FFmpeg/libavutil/tomi/intreadwrite.h | 150 - mythtv/external/FFmpeg/libavutil/twofish.h | 2 +- mythtv/external/FFmpeg/libavutil/tx.c | 552 +- mythtv/external/FFmpeg/libavutil/tx.h | 57 +- mythtv/external/FFmpeg/libavutil/tx_priv.h | 115 +- .../external/FFmpeg/libavutil/tx_template.c | 1431 +- mythtv/external/FFmpeg/libavutil/uuid.h | 1 - mythtv/external/FFmpeg/libavutil/version.c | 27 +- mythtv/external/FFmpeg/libavutil/version.h | 23 +- .../FFmpeg/libavutil/video_enc_params.c | 10 +- .../FFmpeg/libavutil/video_enc_params.h | 4 +- mythtv/external/FFmpeg/libavutil/video_hint.c | 81 + mythtv/external/FFmpeg/libavutil/video_hint.h | 107 + mythtv/external/FFmpeg/libavutil/vulkan.c | 2376 ++- mythtv/external/FFmpeg/libavutil/vulkan.h | 562 +- .../FFmpeg/libavutil/vulkan_functions.h | 82 +- .../external/FFmpeg/libavutil/vulkan_loader.h | 57 +- .../FFmpeg/libavutil/wchar_filename.h | 11 +- mythtv/external/FFmpeg/libavutil/x86/bswap.h | 13 +- .../FFmpeg/libavutil/x86/fixed_dsp_init.c | 4 +- .../FFmpeg/libavutil/x86/float_dsp.asm | 197 +- .../FFmpeg/libavutil/x86/float_dsp_init.c | 12 +- .../external/FFmpeg/libavutil/x86/intmath.h | 20 +- .../FFmpeg/libavutil/x86/intreadwrite.h | 71 +- mythtv/external/FFmpeg/libavutil/x86/lls.asm | 4 +- .../FFmpeg/libavutil/x86/pixelutils.asm | 1 + .../FFmpeg/libavutil/x86/tx_float.asm | 774 +- .../FFmpeg/libavutil/x86/tx_float_init.c | 222 +- .../external/FFmpeg/libavutil/x86/x86inc.asm | 682 +- .../external/FFmpeg/libavutil/x86/x86util.asm | 4 - mythtv/external/FFmpeg/libpostproc/Makefile | 2 +- .../external/FFmpeg/libpostproc/postprocess.c | 84 +- .../FFmpeg/libpostproc/postprocess_template.c | 680 +- mythtv/external/FFmpeg/libpostproc/version.c | 5 +- mythtv/external/FFmpeg/libpostproc/version.h | 2 +- .../FFmpeg/libpostproc/version_major.h | 2 +- mythtv/external/FFmpeg/libswresample/Makefile | 2 +- .../FFmpeg/libswresample/aarch64/resample.S | 80 +- .../FFmpeg/libswresample/arm/resample.S | 8 +- .../FFmpeg/libswresample/audioconvert.c | 2 +- mythtv/external/FFmpeg/libswresample/dither.c | 1 + .../external/FFmpeg/libswresample/options.c | 84 +- .../external/FFmpeg/libswresample/rematrix.c | 75 +- .../external/FFmpeg/libswresample/resample.c | 112 +- .../FFmpeg/libswresample/swresample.c | 197 +- .../FFmpeg/libswresample/swresample.h | 85 +- .../FFmpeg/libswresample/swresample_frame.c | 57 +- .../libswresample/swresample_internal.h | 10 +- .../external/FFmpeg/libswresample/version.c | 5 +- .../external/FFmpeg/libswresample/version.h | 2 +- .../FFmpeg/libswresample/version_major.h | 2 +- .../libswresample/x86/audio_convert.asm | 12 +- .../FFmpeg/libswresample/x86/rematrix.asm | 8 +- .../FFmpeg/libswresample/x86/rematrix_init.c | 3 +- mythtv/external/FFmpeg/libswscale/Makefile | 3 +- .../FFmpeg/libswscale/aarch64/Makefile | 3 + .../FFmpeg/libswscale/aarch64/hscale.S | 1493 +- .../FFmpeg/libswscale/aarch64/input.S | 315 + .../FFmpeg/libswscale/aarch64/output.S | 242 +- .../libswscale/aarch64/range_convert_neon.S | 99 + .../FFmpeg/libswscale/aarch64/rgb2rgb.c | 29 + .../FFmpeg/libswscale/aarch64/rgb2rgb_neon.S | 219 + .../FFmpeg/libswscale/aarch64/swscale.c | 256 +- .../libswscale/aarch64/swscale_unscaled.c | 88 + .../aarch64/swscale_unscaled_neon.S | 70 + .../FFmpeg/libswscale/aarch64/yuv2rgb_neon.S | 291 +- .../external/FFmpeg/libswscale/arm/hscale.S | 3 +- .../external/FFmpeg/libswscale/arm/output.S | 3 +- .../FFmpeg/libswscale/arm/yuv2rgb_neon.S | 7 +- mythtv/external/FFmpeg/libswscale/gamma.c | 1 + .../external/FFmpeg/libswscale/half2float.c | 19 + mythtv/external/FFmpeg/libswscale/hscale.c | 13 +- mythtv/external/FFmpeg/libswscale/input.c | 662 +- .../FFmpeg/libswscale/loongarch/Makefile | 13 + .../FFmpeg/libswscale/loongarch/input.S | 780 + .../FFmpeg/libswscale/loongarch/input_lasx.c | 245 + .../FFmpeg/libswscale/loongarch/input_lsx.c | 65 + .../FFmpeg/libswscale/loongarch/output.S | 388 + .../FFmpeg/libswscale/loongarch/output_lasx.c | 1999 +++ .../FFmpeg/libswscale/loongarch/output_lsx.c | 1848 ++ .../libswscale/loongarch/rgb2rgb_lasx.c | 52 + .../FFmpeg/libswscale/loongarch/swscale.S | 2236 +++ .../loongarch/swscale_init_loongarch.c | 176 + .../libswscale/loongarch/swscale_lasx.c | 972 + .../libswscale/loongarch/swscale_loongarch.h | 211 + .../FFmpeg/libswscale/loongarch/swscale_lsx.c | 57 + .../libswscale/loongarch/yuv2rgb_lasx.c | 321 + .../FFmpeg/libswscale/loongarch/yuv2rgb_lsx.c | 361 + mythtv/external/FFmpeg/libswscale/options.c | 68 +- mythtv/external/FFmpeg/libswscale/output.c | 595 +- .../FFmpeg/libswscale/ppc/swscale_altivec.c | 26 +- .../libswscale/ppc/swscale_ppc_template.c | 163 +- .../FFmpeg/libswscale/ppc/swscale_vsx.c | 60 - mythtv/external/FFmpeg/libswscale/rgb2rgb.c | 16 +- mythtv/external/FFmpeg/libswscale/rgb2rgb.h | 4 +- .../FFmpeg/libswscale/rgb2rgb_template.c | 88 +- .../external/FFmpeg/libswscale/riscv/Makefile | 8 + .../FFmpeg/libswscale/riscv/cpu_common.c | 1 + .../FFmpeg/libswscale/riscv/input_rvv.S | 321 + .../FFmpeg/libswscale/riscv/range_rvv.S | 118 + .../FFmpeg/libswscale/riscv/rgb2rgb.c | 68 + .../FFmpeg/libswscale/riscv/rgb2rgb_rvb.S | 30 + .../FFmpeg/libswscale/riscv/rgb2rgb_rvv.S | 181 + .../FFmpeg/libswscale/riscv/swscale.c | 126 + mythtv/external/FFmpeg/libswscale/slice.c | 10 +- mythtv/external/FFmpeg/libswscale/swscale.c | 15 +- mythtv/external/FFmpeg/libswscale/swscale.h | 53 +- .../FFmpeg/libswscale/swscale_internal.h | 86 +- .../FFmpeg/libswscale/swscale_unscaled.c | 87 +- .../FFmpeg/libswscale/tests/swscale.c | 107 +- mythtv/external/FFmpeg/libswscale/utils.c | 703 +- mythtv/external/FFmpeg/libswscale/version.c | 5 +- mythtv/external/FFmpeg/libswscale/version.h | 2 +- .../FFmpeg/libswscale/version_major.h | 2 +- mythtv/external/FFmpeg/libswscale/vscale.c | 1 + .../external/FFmpeg/libswscale/x86/Makefile | 1 + .../external/FFmpeg/libswscale/x86/input.asm | 228 +- .../external/FFmpeg/libswscale/x86/output.asm | 26 +- .../FFmpeg/libswscale/x86/range_convert.asm | 136 + .../external/FFmpeg/libswscale/x86/rgb2rgb.c | 2321 ++- .../FFmpeg/libswscale/x86/rgb2rgb_template.c | 2452 --- .../FFmpeg/libswscale/x86/rgb_2_rgb.asm | 97 +- .../external/FFmpeg/libswscale/x86/scale.asm | 7 +- .../FFmpeg/libswscale/x86/scale_avx2.asm | 46 +- .../external/FFmpeg/libswscale/x86/swscale.c | 100 +- .../FFmpeg/libswscale/x86/swscale_template.c | 20 - .../external/FFmpeg/libswscale/x86/yuv2rgb.c | 257 +- .../FFmpeg/libswscale/x86/yuv2rgb_template.c | 196 - .../FFmpeg/libswscale/x86/yuv2yuvX.asm | 4 +- .../FFmpeg/libswscale/x86/yuv_2_rgb.asm | 125 +- mythtv/external/FFmpeg/libswscale/yuv2rgb.c | 1055 +- mythtv/external/FFmpeg/tests/Makefile | 34 +- .../external/FFmpeg/tests/api/api-band-test.c | 15 +- .../external/FFmpeg/tests/api/api-flac-test.c | 1 + .../FFmpeg/tests/api/api-h264-slice-test.c | 1 + .../external/FFmpeg/tests/api/api-h264-test.c | 3 +- .../external/FFmpeg/tests/api/api-seek-test.c | 3 +- .../FFmpeg/tests/api/api-threadmessage-test.c | 1 + mythtv/external/FFmpeg/tests/audiogen.c | 2 +- .../external/FFmpeg/tests/checkasm/Makefile | 28 +- .../FFmpeg/tests/checkasm/aacencdsp.c | 107 + .../external/FFmpeg/tests/checkasm/ac3dsp.c | 203 + .../external/FFmpeg/tests/checkasm/af_afir.c | 141 +- .../external/FFmpeg/tests/checkasm/audiodsp.c | 10 +- mythtv/external/FFmpeg/tests/checkasm/av_tx.c | 32 +- .../external/FFmpeg/tests/checkasm/blockdsp.c | 30 +- .../external/FFmpeg/tests/checkasm/checkasm.c | 343 +- .../external/FFmpeg/tests/checkasm/checkasm.h | 131 +- .../external/FFmpeg/tests/checkasm/exrdsp.c | 2 +- .../external/FFmpeg/tests/checkasm/fdctdsp.c | 71 + .../FFmpeg/tests/checkasm/fixed_dsp.c | 2 +- .../external/FFmpeg/tests/checkasm/flacdsp.c | 124 +- .../FFmpeg/tests/checkasm/float_dsp.c | 24 +- .../FFmpeg/tests/checkasm/fmtconvert.c | 2 +- .../external/FFmpeg/tests/checkasm/h263dsp.c | 62 + .../FFmpeg/tests/checkasm/h264chroma.c | 85 + .../external/FFmpeg/tests/checkasm/h264dsp.c | 59 +- .../external/FFmpeg/tests/checkasm/h264pred.c | 2 +- .../FFmpeg/tests/checkasm/hevc_add_res.c | 25 +- .../FFmpeg/tests/checkasm/hevc_deblock.c | 288 + .../FFmpeg/tests/checkasm/hevc_idct.c | 43 +- .../external/FFmpeg/tests/checkasm/hevc_pel.c | 247 +- .../external/FFmpeg/tests/checkasm/hevc_sao.c | 26 +- .../FFmpeg/tests/checkasm/huffyuvdsp.c | 40 +- .../external/FFmpeg/tests/checkasm/idctdsp.c | 3 +- .../external/FFmpeg/tests/checkasm/llauddsp.c | 115 + mythtv/external/FFmpeg/tests/checkasm/lls.c | 105 + .../external/FFmpeg/tests/checkasm/llviddsp.c | 66 +- .../FFmpeg/tests/checkasm/llviddspenc.c | 8 +- mythtv/external/FFmpeg/tests/checkasm/lpc.c | 126 + .../external/FFmpeg/tests/checkasm/motion.c | 36 +- .../FFmpeg/tests/checkasm/mpegvideoencdsp.c | 147 + .../external/FFmpeg/tests/checkasm/opusdsp.c | 11 +- .../FFmpeg/tests/checkasm/pixblockdsp.c | 4 +- .../FFmpeg/tests/checkasm/riscv/checkasm.S | 185 + .../external/FFmpeg/tests/checkasm/rv34dsp.c | 89 + .../external/FFmpeg/tests/checkasm/rv40dsp.c | 75 + .../external/FFmpeg/tests/checkasm/sbrdsp.c | 9 +- .../external/FFmpeg/tests/checkasm/svq1enc.c | 69 + .../external/FFmpeg/tests/checkasm/sw_gbrp.c | 40 +- .../FFmpeg/tests/checkasm/sw_range_convert.c | 134 + .../external/FFmpeg/tests/checkasm/sw_rgb.c | 303 +- .../external/FFmpeg/tests/checkasm/sw_scale.c | 216 +- .../FFmpeg/tests/checkasm/sw_yuv2rgb.c | 239 + .../FFmpeg/tests/checkasm/sw_yuv2yuv.c | 133 + .../FFmpeg/tests/checkasm/synth_filter.c | 25 +- .../external/FFmpeg/tests/checkasm/takdsp.c | 154 + .../FFmpeg/tests/checkasm/utvideodsp.c | 1 - .../external/FFmpeg/tests/checkasm/v210dec.c | 12 +- .../external/FFmpeg/tests/checkasm/v210enc.c | 6 +- .../external/FFmpeg/tests/checkasm/vc1dsp.c | 42 +- .../external/FFmpeg/tests/checkasm/vf_blend.c | 3 +- .../external/FFmpeg/tests/checkasm/vf_bwdif.c | 255 + .../FFmpeg/tests/checkasm/vf_colorspace.c | 8 +- .../FFmpeg/tests/checkasm/vf_convolution.c | 104 + .../external/FFmpeg/tests/checkasm/vf_gblur.c | 1 + .../FFmpeg/tests/checkasm/vf_nlmeans.c | 1 + .../FFmpeg/tests/checkasm/vorbisdsp.c | 85 + .../external/FFmpeg/tests/checkasm/vp8dsp.c | 123 +- .../external/FFmpeg/tests/checkasm/vp9dsp.c | 1 + .../external/FFmpeg/tests/checkasm/vvc_alf.c | 199 + .../external/FFmpeg/tests/checkasm/vvc_mc.c | 481 + .../FFmpeg/tests/checkasm/x86/checkasm.asm | 2 +- mythtv/external/FFmpeg/tests/fate-run.sh | 112 +- mythtv/external/FFmpeg/tests/fate.sh | 21 +- mythtv/external/FFmpeg/tests/fate/aac.mak | 20 +- mythtv/external/FFmpeg/tests/fate/ac3.mak | 12 +- mythtv/external/FFmpeg/tests/fate/acodec.mak | 10 +- mythtv/external/FFmpeg/tests/fate/adpcm.mak | 44 +- mythtv/external/FFmpeg/tests/fate/alac.mak | 6 +- mythtv/external/FFmpeg/tests/fate/amrnb.mak | 4 +- mythtv/external/FFmpeg/tests/fate/amrwb.mak | 2 +- mythtv/external/FFmpeg/tests/fate/api.mak | 2 +- mythtv/external/FFmpeg/tests/fate/atrac.mak | 18 +- mythtv/external/FFmpeg/tests/fate/audio.mak | 44 +- mythtv/external/FFmpeg/tests/fate/cbs.mak | 111 +- .../external/FFmpeg/tests/fate/checkasm.mak | 24 +- mythtv/external/FFmpeg/tests/fate/dca.mak | 12 +- mythtv/external/FFmpeg/tests/fate/demux.mak | 12 +- mythtv/external/FFmpeg/tests/fate/dnn.mak | 45 - mythtv/external/FFmpeg/tests/fate/dvvideo.mak | 2 +- .../FFmpeg/tests/fate/enc_external.mak | 16 + mythtv/external/FFmpeg/tests/fate/ffmpeg.mak | 160 +- mythtv/external/FFmpeg/tests/fate/ffprobe.mak | 49 +- mythtv/external/FFmpeg/tests/fate/fft.mak | 83 - .../FFmpeg/tests/fate/filter-audio.mak | 97 +- .../FFmpeg/tests/fate/filter-video.mak | 110 +- mythtv/external/FFmpeg/tests/fate/fits.mak | 8 +- mythtv/external/FFmpeg/tests/fate/flac.mak | 4 + mythtv/external/FFmpeg/tests/fate/flvenc.mak | 15 +- mythtv/external/FFmpeg/tests/fate/gapless.mak | 78 +- mythtv/external/FFmpeg/tests/fate/gif.mak | 2 +- mythtv/external/FFmpeg/tests/fate/h264.mak | 31 +- mythtv/external/FFmpeg/tests/fate/hevc.mak | 51 +- mythtv/external/FFmpeg/tests/fate/hlsenc.mak | 18 +- mythtv/external/FFmpeg/tests/fate/iamf.mak | 61 + mythtv/external/FFmpeg/tests/fate/id3v2.mak | 5 + mythtv/external/FFmpeg/tests/fate/image.mak | 206 +- mythtv/external/FFmpeg/tests/fate/imf.mak | 5 +- .../external/FFmpeg/tests/fate/jpeg2000.mak | 69 + mythtv/external/FFmpeg/tests/fate/jxl.mak | 27 + .../external/FFmpeg/tests/fate/lavf-audio.mak | 5 +- .../FFmpeg/tests/fate/lavf-container.mak | 53 +- .../external/FFmpeg/tests/fate/lavf-image.mak | 3 +- .../FFmpeg/tests/fate/lavf-image2pipe.mak | 6 +- .../external/FFmpeg/tests/fate/lavf-video.mak | 4 +- .../external/FFmpeg/tests/fate/libavcodec.mak | 17 +- .../external/FFmpeg/tests/fate/libavutil.mak | 4 + .../FFmpeg/tests/fate/libswresample.mak | 229 +- .../external/FFmpeg/tests/fate/libswscale.mak | 9 +- .../FFmpeg/tests/fate/lossless-audio.mak | 16 +- .../FFmpeg/tests/fate/lossless-video.mak | 6 +- .../external/FFmpeg/tests/fate/matroska.mak | 80 +- .../external/FFmpeg/tests/fate/microsoft.mak | 3 +- .../FFmpeg/tests/fate/monkeysaudio.mak | 5 +- mythtv/external/FFmpeg/tests/fate/mov.mak | 166 +- mythtv/external/FFmpeg/tests/fate/mp3.mak | 2 +- mythtv/external/FFmpeg/tests/fate/mpc.mak | 2 +- mythtv/external/FFmpeg/tests/fate/mpeg4.mak | 2 +- mythtv/external/FFmpeg/tests/fate/mpegps.mak | 2 +- mythtv/external/FFmpeg/tests/fate/mxf.mak | 46 +- mythtv/external/FFmpeg/tests/fate/opus.mak | 3 +- mythtv/external/FFmpeg/tests/fate/pcm.mak | 10 +- mythtv/external/FFmpeg/tests/fate/qoa.mak | 12 + mythtv/external/FFmpeg/tests/fate/real.mak | 6 +- mythtv/external/FFmpeg/tests/fate/screen.mak | 3 +- mythtv/external/FFmpeg/tests/fate/seek.mak | 8 +- .../external/FFmpeg/tests/fate/segafilm.mak | 15 + .../FFmpeg/tests/fate/source-check.sh | 3 +- mythtv/external/FFmpeg/tests/fate/spdif.mak | 47 + .../external/FFmpeg/tests/fate/subtitles.mak | 13 +- mythtv/external/FFmpeg/tests/fate/truehd.mak | 7 +- mythtv/external/FFmpeg/tests/fate/vcodec.mak | 39 +- mythtv/external/FFmpeg/tests/fate/video.mak | 23 +- mythtv/external/FFmpeg/tests/fate/voice.mak | 4 +- mythtv/external/FFmpeg/tests/fate/vorbis.mak | 8 +- mythtv/external/FFmpeg/tests/fate/vpx.mak | 6 +- mythtv/external/FFmpeg/tests/fate/vqf.mak | 2 +- mythtv/external/FFmpeg/tests/fate/vvc.mak | 53 + mythtv/external/FFmpeg/tests/fate/wavpack.mak | 3 + mythtv/external/FFmpeg/tests/fate/wma.mak | 25 +- .../FFmpeg/tests/filtergraphs/crazychannels | 79 + .../FFmpeg/tests/filtergraphs/iamf_5_1_4 | 6 + .../FFmpeg/tests/filtergraphs/iamf_7_1_4 | 7 + .../tests/filtergraphs/iamf_ambisonic_1 | 4 + .../FFmpeg/tests/filtergraphs/mov-mp4-pcm | 5 + .../tests/filtergraphs/overlay_yuv444p10 | 5 + .../tests/filtergraphs/scale2ref_keep_aspect | 3 +- mythtv/external/FFmpeg/tests/maps/fsync-down | 7 + mythtv/external/FFmpeg/tests/maps/fsync-up | 57 + .../FFmpeg/tests/ref/acodec/adpcm-ima_wav | 2 +- .../tests/ref/acodec/adpcm-ima_wav-trellis | 2 +- .../external/FFmpeg/tests/ref/acodec/adpcm-ms | 2 +- .../FFmpeg/tests/ref/acodec/adpcm-ms-trellis | 2 +- .../FFmpeg/tests/ref/acodec/adpcm-swf | 2 +- .../FFmpeg/tests/ref/acodec/adpcm-swf-trellis | 2 +- .../FFmpeg/tests/ref/acodec/adpcm-swf-wav | 2 +- .../FFmpeg/tests/ref/acodec/adpcm-yamaha | 2 +- .../tests/ref/acodec/adpcm-yamaha-trellis | 2 +- .../FFmpeg/tests/ref/acodec/pcm-f32le | 4 +- .../FFmpeg/tests/ref/acodec/pcm-f64le | 4 +- .../FFmpeg/tests/ref/acodec/pcm-s16be | 2 +- .../FFmpeg/tests/ref/acodec/pcm-s16be_planar | 4 +- .../FFmpeg/tests/ref/acodec/pcm-s16le_planar | 4 +- .../FFmpeg/tests/ref/acodec/pcm-s24be | 2 +- .../FFmpeg/tests/ref/acodec/pcm-s24le_planar | 4 +- .../FFmpeg/tests/ref/acodec/pcm-s32be | 2 +- .../FFmpeg/tests/ref/acodec/pcm-s32le_planar | 4 +- .../FFmpeg/tests/ref/acodec/pcm-s8_planar | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u16be | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u16le | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u24be | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u24le | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u32be | 4 +- .../FFmpeg/tests/ref/acodec/pcm-u32le | 4 +- mythtv/external/FFmpeg/tests/ref/acodec/s302m | 8 +- .../tests/ref/fate/aac-autobsf-adtstoasc | 4 +- .../FFmpeg/tests/ref/fate/adpcm-ima-smjpeg | 658 +- mythtv/external/FFmpeg/tests/ref/fate/aic | 32 +- .../FFmpeg/tests/ref/fate/apng-osample | 12 +- mythtv/external/FFmpeg/tests/ref/fate/aptx | 18 + mythtv/external/FFmpeg/tests/ref/fate/aptx-hd | 18 + .../FFmpeg/tests/ref/fate/atrac-aea-remux | 94 + .../tests/ref/fate/atrac-matroska-remux | 94 + .../audiomatch-afconvert-16000-mono-he-m4a | 2 +- .../audiomatch-afconvert-16000-stereo-he-m4a | 2 +- .../audiomatch-afconvert-16000-stereo-he2-m4a | 2 +- .../audiomatch-afconvert-44100-mono-he-m4a | 2 +- .../audiomatch-afconvert-44100-stereo-he-m4a | 2 +- .../audiomatch-afconvert-44100-stereo-he2-m4a | 2 +- .../fate/audiomatch-nero-16000-mono-he-m4a | 2 +- .../fate/audiomatch-nero-16000-stereo-he-m4a | 2 +- .../fate/audiomatch-nero-16000-stereo-he2-m4a | 2 +- .../fate/audiomatch-nero-44100-mono-he-m4a | 2 +- .../fate/audiomatch-nero-44100-stereo-he-m4a | 2 +- .../fate/audiomatch-nero-44100-stereo-he2-m4a | 2 +- .../external/FFmpeg/tests/ref/fate/autorotate | 36 +- .../FFmpeg/tests/ref/fate/av1-annexb-demux | 2 +- .../external/FFmpeg/tests/ref/fate/cavs-demux | 62 + .../tests/ref/fate/cbs-h264-discard-bidir | 1 + .../tests/ref/fate/cbs-h264-discard-nonintra | 1 + .../tests/ref/fate/cbs-h264-discard-nonkey | 1 + .../tests/ref/fate/cbs-h264-discard-nonref | 1 + .../tests/ref/fate/cbs-hevc-discard-bidir | 1 + .../tests/ref/fate/cbs-hevc-discard-nonintra | 1 + .../tests/ref/fate/cbs-hevc-discard-nonkey | 1 + .../tests/ref/fate/cbs-hevc-discard-nonref | 1 + .../tests/ref/fate/cbs-vp9-vp90-2-03-deltaq | 2 +- .../tests/ref/fate/cbs-vp9-vp90-2-06-bilinear | 2 +- .../ref/fate/cbs-vp9-vp90-2-09-lf_deltas | 2 +- .../cbs-vp9-vp90-2-10-show-existing-frame | 2 +- .../cbs-vp9-vp90-2-10-show-existing-frame2 | 2 +- .../fate/cbs-vp9-vp90-2-segmentation-aq-akiyo | 2 +- .../fate/cbs-vp9-vp90-2-segmentation-sf-akiyo | 2 +- .../ref/fate/cbs-vp9-vp90-2-tiling-pedestrian | 2 +- .../tests/ref/fate/cbs-vp9-vp91-2-04-yuv440 | 2 +- .../tests/ref/fate/cbs-vp9-vp91-2-04-yuv444 | 2 +- .../ref/fate/cbs-vp9-vp92-2-20-10bit-yuv420 | 2 +- .../ref/fate/cbs-vp9-vp93-2-20-10bit-yuv422 | 2 +- .../ref/fate/cbs-vp9-vp93-2-20-12bit-yuv444 | 2 +- .../FFmpeg/tests/ref/fate/cbs-vvc-APSALF_A_2 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-APSLMCS_D_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-APSMULT_A_4 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-AUD_A_3 | 1 + .../tests/ref/fate/cbs-vvc-BOUNDARY_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-BUMP_A_2 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-CROP_B_4 | 1 + .../ref/fate/cbs-vvc-CodingToolsSets_A_2 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-DCI_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-HRD_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-OPI_B_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-PHSH_B_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-POC_A_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-PPS_B_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-RAP_A_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-SAO_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-SCALING_A_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-SLICES_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-SPS_B_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-STILL_B_1 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-SUBPIC_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-TILE_A_2 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-VPS_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-WPP_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-WP_A_3 | 1 + .../FFmpeg/tests/ref/fate/cbs-vvc-WRAP_A_4 | 1 + .../FFmpeg/tests/ref/fate/channel_layout | 239 +- .../ref/fate/concat-demuxer-extended-lavf-mxf | 2 +- .../fate/concat-demuxer-extended-lavf-mxf_d10 | 2 +- .../ref/fate/concat-demuxer-simple1-lavf-mxf | 206 +- .../fate/concat-demuxer-simple1-lavf-mxf_d10 | 144 +- .../ref/fate/concat-demuxer-simple2-lavf-ts | 366 +- .../FFmpeg/tests/ref/fate/copy-shortest1 | 31 +- .../FFmpeg/tests/ref/fate/copy-shortest2 | 31 +- .../FFmpeg/tests/ref/fate/copy-trac236 | 16 +- .../FFmpeg/tests/ref/fate/copy-trac3074 | 2 +- .../FFmpeg/tests/ref/fate/copy-trac4914-avi | 4 +- .../tests/ref/fate/cover-art-aiff-id3v2-remux | 34 +- .../tests/ref/fate/cover-art-mp3-id3v2-remux | 22 +- .../FFmpeg/tests/ref/fate/d-cinema-demux | 10 +- .../FFmpeg/tests/ref/fate/dcinema-encode | 102 +- .../external/FFmpeg/tests/ref/fate/dds-dxt2 | 2 +- .../external/FFmpeg/tests/ref/fate/dds-dxt4 | 2 +- mythtv/external/FFmpeg/tests/ref/fate/dirac | 28 + .../FFmpeg/tests/ref/fate/dirac-low-delay | 28 + .../external/FFmpeg/tests/ref/fate/dxv3-ycg6 | 6 + .../external/FFmpeg/tests/ref/fate/dxv3-yg10 | 6 + .../FFmpeg/tests/ref/fate/dxv3enc-dxt1 | 6 + .../FFmpeg/tests/ref/fate/enhanced-flv-av1 | 70 + .../FFmpeg/tests/ref/fate/enhanced-flv-hevc | 258 + .../FFmpeg/tests/ref/fate/enhanced-flv-vp9 | 18 + mythtv/external/FFmpeg/tests/ref/fate/eval | 2 +- .../FFmpeg/tests/ref/fate/exif-image-embedded | 94 +- .../FFmpeg/tests/ref/fate/exif-image-jpg | 38 +- .../FFmpeg/tests/ref/fate/exif-image-tiff | 12 +- .../FFmpeg/tests/ref/fate/exif-image-webp | 38 +- .../fate/exr-rgb-scanline-zip-half-0x0-0xFFFF | 2 +- .../FFmpeg/tests/ref/fate/ffmpeg-bsf-input | 18 + .../tests/ref/fate/ffmpeg-error-rate-fail | 0 .../tests/ref/fate/ffmpeg-error-rate-pass | 0 .../tests/ref/fate/ffmpeg-filter-in-eof | 55 + .../ref/fate/ffmpeg-filter_complex_audio | 2 +- .../fate/ffmpeg-fix_sub_duration_heartbeat | 35 + .../FFmpeg/tests/ref/fate/ffmpeg-input-r | 12 + .../tests/ref/fate/ffmpeg-loopback-decoding | 57 + .../tests/ref/fate/ffmpeg-spec-disposition | 7 + ...mpeg-streamloop => ffmpeg-streamloop-copy} | 0 .../ref/fate/ffmpeg-streamloop-transcode-av | 151 + .../FFmpeg/tests/ref/fate/ffprobe_compact | 64 +- .../FFmpeg/tests/ref/fate/ffprobe_csv | 52 +- .../FFmpeg/tests/ref/fate/ffprobe_default | 140 +- .../FFmpeg/tests/ref/fate/ffprobe_flat | 140 +- .../FFmpeg/tests/ref/fate/ffprobe_ini | 140 +- .../FFmpeg/tests/ref/fate/ffprobe_json | 146 +- .../FFmpeg/tests/ref/fate/ffprobe_xml | 92 +- .../FFmpeg/tests/ref/fate/ffprobe_xsd | 92 +- .../external/FFmpeg/tests/ref/fate/film-cvid | 218 +- .../FFmpeg/tests/ref/fate/filter-acrossfade | 623 +- .../FFmpeg/tests/ref/fate/filter-adelay | 324 +- .../FFmpeg/tests/ref/fate/filter-aecho | 324 +- .../tests/ref/fate/filter-aemphasis-50fm | 324 +- .../tests/ref/fate/filter-aemphasis-75kf | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-esin | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-exp | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-hsin | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-iqsin | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-log | 324 +- .../FFmpeg/tests/ref/fate/filter-afade-qsin | 324 +- .../FFmpeg/tests/ref/fate/filter-agate | 324 +- .../FFmpeg/tests/ref/fate/filter-alimiter | 324 +- .../FFmpeg/tests/ref/fate/filter-amerge | 195 +- .../FFmpeg/tests/ref/fate/filter-anequalizer | 324 +- .../FFmpeg/tests/ref/fate/filter-apad | 324 +- .../ref/fate/filter-asegment-samples-absolute | 80 + .../ref/fate/filter-asegment-samples-relative | 80 + .../fate/filter-asegment-timestamps-absolute | 81 + .../fate/filter-asegment-timestamps-relative | 81 + .../FFmpeg/tests/ref/fate/filter-asetrate | 40 +- .../FFmpeg/tests/ref/fate/filter-atempo | 70 + .../FFmpeg/tests/ref/fate/filter-atrim-mixed | 4 +- .../FFmpeg/tests/ref/fate/filter-atrim-time | 5 +- .../FFmpeg/tests/ref/fate/filter-bwdif-mode0 | 35 + .../FFmpeg/tests/ref/fate/filter-bwdif-mode1 | 64 + .../FFmpeg/tests/ref/fate/filter-bwdif10 | 35 + .../FFmpeg/tests/ref/fate/filter-channelsplit | 2 + .../FFmpeg/tests/ref/fate/filter-compand | 40 +- .../FFmpeg/tests/ref/fate/filter-concat-vfr | 66 +- .../tests/ref/fate/filter-crazychannels | 396 + .../FFmpeg/tests/ref/fate/filter-crystalizer | 324 +- .../FFmpeg/tests/ref/fate/filter-dcshift | 40 +- .../FFmpeg/tests/ref/fate/filter-earwax | 40 +- .../FFmpeg/tests/ref/fate/filter-extrastereo | 40 +- .../FFmpeg/tests/ref/fate/filter-formats | 3 - .../FFmpeg/tests/ref/fate/filter-fps-r | 78 - .../FFmpeg/tests/ref/fate/filter-fsync-down | 12 + .../FFmpeg/tests/ref/fate/filter-fsync-up | 62 + .../FFmpeg/tests/ref/fate/filter-median | 1 + .../tests/ref/fate/filter-meta-4560-rotate0 | 284 +- .../tests/ref/fate/filter-metadata-cropdetect | 62 +- .../ref/fate/filter-metadata-cropdetect1 | 9 + .../ref/fate/filter-metadata-cropdetect2 | 9 + .../ref/fate/filter-metadata-freezedetect | 4 +- .../tests/ref/fate/filter-metadata-scdet | 22 +- .../fate/filter-metadata-signalstats-yuv420p | 2 +- .../filter-metadata-signalstats-yuv420p10 | 2 +- .../ref/fate/filter-metadata-silencedetect | 2 +- .../tests/ref/fate/filter-overlay-dvdsub-2397 | 4 +- .../tests/ref/fate/filter-overlay_yuv444p10 | 8 + .../FFmpeg/tests/ref/fate/filter-palettegen-1 | 2 +- .../FFmpeg/tests/ref/fate/filter-palettegen-2 | 2 +- .../tests/ref/fate/filter-paletteuse-bayer | 142 +- .../tests/ref/fate/filter-paletteuse-bayer0 | 142 +- .../tests/ref/fate/filter-paletteuse-nodither | 142 +- .../ref/fate/filter-paletteuse-sierra2_4a | 142 +- .../FFmpeg/tests/ref/fate/filter-pan-downmix1 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-downmix2 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-mono1 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-mono2 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-stereo1 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-stereo2 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-stereo3 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-stereo4 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-upmix1 | 40 +- .../FFmpeg/tests/ref/fate/filter-pan-upmix2 | 40 +- .../tests/ref/fate/filter-pixdesc-gbrap14be | 1 + .../tests/ref/fate/filter-pixdesc-gbrap14le | 1 + .../FFmpeg/tests/ref/fate/filter-pixdesc-nv16 | 1 + .../tests/ref/fate/filter-pixdesc-p012be | 1 + .../tests/ref/fate/filter-pixdesc-p012le | 1 + .../tests/ref/fate/filter-pixdesc-p212be | 1 + .../tests/ref/fate/filter-pixdesc-p212le | 1 + .../tests/ref/fate/filter-pixdesc-p412be | 1 + .../tests/ref/fate/filter-pixdesc-p412le | 1 + .../FFmpeg/tests/ref/fate/filter-pixdesc-vuya | 1 + .../FFmpeg/tests/ref/fate/filter-pixdesc-vuyx | 1 + .../tests/ref/fate/filter-pixdesc-xv30le | 1 + .../tests/ref/fate/filter-pixdesc-xv36le | 1 + .../tests/ref/fate/filter-pixdesc-y210le | 1 + .../tests/ref/fate/filter-pixdesc-y212le | 1 + .../FFmpeg/tests/ref/fate/filter-pixelize-avg | 1 + .../FFmpeg/tests/ref/fate/filter-pixelize-max | 1 + .../FFmpeg/tests/ref/fate/filter-pixelize-min | 1 + .../FFmpeg/tests/ref/fate/filter-pixfmts-copy | 15 + .../FFmpeg/tests/ref/fate/filter-pixfmts-crop | 13 + .../tests/ref/fate/filter-pixfmts-field | 15 + .../tests/ref/fate/filter-pixfmts-fieldorder | 13 + .../tests/ref/fate/filter-pixfmts-hflip | 13 + .../FFmpeg/tests/ref/fate/filter-pixfmts-il | 15 + .../FFmpeg/tests/ref/fate/filter-pixfmts-null | 15 + .../FFmpeg/tests/ref/fate/filter-pixfmts-pad | 26 +- .../tests/ref/fate/filter-pixfmts-scale | 15 + .../ref/fate/filter-pixfmts-tinterlace_pad | 2 +- .../tests/ref/fate/filter-pixfmts-transpose | 10 + .../tests/ref/fate/filter-pixfmts-vflip | 15 + .../tests/ref/fate/filter-refcmp-xpsnr-rgb | 20 + .../tests/ref/fate/filter-refcmp-xpsnr-yuv | 20 + .../FFmpeg/tests/ref/fate/filter-scalechroma | 50 +- .../FFmpeg/tests/ref/fate/filter-setpts | 89 +- .../FFmpeg/tests/ref/fate/filter-stereotools | 40 +- .../FFmpeg/tests/ref/fate/filter-tiltandshift | 55 + .../tests/ref/fate/filter-tiltandshift-410 | 55 + .../tests/ref/fate/filter-tiltandshift-422 | 55 + .../tests/ref/fate/filter-tiltandshift-444 | 55 + .../tests/ref/fate/filter-tpad-add-duration | 11 + .../tests/ref/fate/filter-untile-yuv422p | 13 + .../FFmpeg/tests/ref/fate/filter-yadif10 | 60 +- .../FFmpeg/tests/ref/fate/filter-yadif16 | 60 +- .../{fitsdec-gbrap16le => fitsdec-gbrap16be} | 6 +- .../fate/{fitsdec-gbrp16 => fitsdec-gbrp16be} | 4 +- .../external/FFmpeg/tests/ref/fate/flcl1905 | 456 +- .../tests/ref/fate/flv-add_keyframe_index | 2 +- .../external/FFmpeg/tests/ref/fate/flv-demux | 1214 +- .../FFmpeg/tests/ref/fate/force_key_frames | 8 +- .../tests/ref/fate/force_key_frames-source | 397 + .../ref/fate/force_key_frames-source-drop | 22 + .../ref/fate/force_key_frames-source-dup | 617 + .../FFmpeg/tests/ref/fate/g722-encode | 106 +- .../FFmpeg/tests/ref/fate/g726-encode-2bit | 97 +- .../FFmpeg/tests/ref/fate/g726-encode-3bit | 99 +- .../FFmpeg/tests/ref/fate/g726-encode-4bit | 100 +- .../FFmpeg/tests/ref/fate/g726-encode-5bit | 102 +- .../tests/ref/fate/gapless-mp3-side-data | 1197 +- .../ref/fate/gaplessenc-itunes-to-ipod-aac | 66 +- .../tests/ref/fate/gaplessenc-pcm-to-mov-aac | 64 +- .../FFmpeg/tests/ref/fate/gaplessinfo-itunes1 | 64 +- .../FFmpeg/tests/ref/fate/gaplessinfo-itunes2 | 64 +- .../external/FFmpeg/tests/ref/fate/gif-demux | 2 +- .../tests/ref/fate/gif-disposal-restore | 2 +- .../external/FFmpeg/tests/ref/fate/gif-gray | 72 +- .../external/FFmpeg/tests/ref/fate/h264-3386 | 94 +- .../external/FFmpeg/tests/ref/fate/h264-afd | 288 + .../FFmpeg/tests/ref/fate/h264-bsf-dts2pts | 58 + .../tests/ref/fate/h264-bsf-mp4toannexb | 2 +- .../fate/h264-bsf-mp4toannexb-new-extradata | 9 + .../fate/h264-conformance-cabac_mot_fld0_full | 60 +- .../h264-conformance-cabac_mot_picaff0_full | 60 +- .../ref/fate/h264-conformance-cabref3_sand_d | 100 +- .../ref/fate/h264-conformance-cafi1_sva_c | 66 +- .../ref/fate/h264-conformance-capa1_toshiba_b | 180 +- .../ref/fate/h264-conformance-capama3_sand_f | 100 +- .../h264-conformance-cavlc_mot_fld0_full_b | 60 +- .../h264-conformance-cavlc_mot_picaff0_full_b | 60 +- .../ref/fate/h264-conformance-cvfi1_sony_d | 34 +- .../ref/fate/h264-conformance-cvfi1_sva_c | 14 +- .../ref/fate/h264-conformance-cvfi2_sony_h | 34 +- .../ref/fate/h264-conformance-cvfi2_sva_c | 26 +- .../fate/h264-conformance-cvmapaqp3_sony_e | 14 +- .../fate/h264-conformance-cvmp_mot_fld_l30_b | 60 +- .../fate/h264-conformance-cvmp_mot_frm_l31_b | 60 +- .../ref/fate/h264-conformance-cvnlfi1_sony_c | 34 +- .../ref/fate/h264-conformance-cvnlfi2_sony_h | 34 +- .../ref/fate/h264-conformance-cvpa1_toshiba_b | 180 +- .../ref/fate/h264-conformance-fi1_sony_e | 34 +- .../fate/h264-conformance-frext-bcrm_freh10 | 200 +- .../fate/h264-conformance-frext-brcm_freh11 | 200 +- .../fate/h264-conformance-frext-brcm_freh4 | 200 +- .../ref/fate/h264-conformance-frext-freh6 | 200 +- .../ref/fate/h264-conformance-frext-freh7_b | 200 +- .../fate/h264-conformance-frext-hcaff1_hhi_b | 20 +- .../fate/h264-conformance-frext-hpcafl_bcrm_c | 600 +- .../h264-conformance-frext-hpcaflnl_bcrm_c | 600 +- .../h264-conformance-frext-hpcamapalq_bcrm_b | 316 +- .../fate/h264-conformance-frext-hpcvfl_bcrm_a | 600 +- .../h264-conformance-frext-hpcvflnl_bcrm_a | 600 +- .../ref/fate/h264-conformance-mr3_tandberg_b | 582 +- .../tests/ref/fate/h264-conformance-mr6_bt_b | 120 +- .../tests/ref/fate/h264-conformance-mr7_bt_b | 100 +- .../tests/ref/fate/h264-conformance-mr8_bt_b | 116 +- .../tests/ref/fate/h264-conformance-mr9_bt_b | 96 +- .../fate/h264-conformance-sharp_mp_field_1_b | 30 +- .../fate/h264-conformance-sharp_mp_field_2_b | 30 +- .../fate/h264-conformance-sharp_mp_field_3_b | 30 +- .../fate/h264-conformance-sharp_mp_paff_1r2 | 26 +- .../fate/h264-conformance-sharp_mp_paff_2r | 26 +- .../FFmpeg/tests/ref/fate/h264-dts_5frames | 50 +- .../ref/fate/h264-intra-refresh-recovery | 20 +- .../ref/fate/h264_mp4toannexb_ticket2991 | 18 +- .../ref/fate/h264_mp4toannexb_ticket5927 | 8 +- .../ref/fate/h264_mp4toannexb_ticket5927_2 | 8 +- .../tests/ref/fate/h264_redundant_pps-annexb | 307 + .../tests/ref/fate/h264_redundant_pps-mov | 115 + .../ref/fate/h264_redundant_pps-side_data | 21 + .../ref/fate/h264_redundant_pps-side_data2 | 11 + ...hapqa-extract-nosnappy-to-hapalphaonly-mov | 4 +- .../fate/hapqa-extract-nosnappy-to-hapq-mov | 4 +- .../FFmpeg/tests/ref/fate/hevc-afd-tc-sei | 240 + .../hevc-conformance-BUMPING_A_ericsson_1 | 90 +- .../fate/hevc-conformance-CIP_A_Panasonic_3 | 4 +- .../fate/hevc-conformance-CIP_C_Panasonic_2 | 4 +- .../fate/hevc-conformance-DELTAQP_A_BRCM_4 | 2 +- .../tests/ref/fate/hevc-conformance-MVHEVCS_A | 106 + .../tests/ref/fate/hevc-conformance-MVHEVCS_B | 138 + .../tests/ref/fate/hevc-conformance-MVHEVCS_E | 106 + .../tests/ref/fate/hevc-conformance-MVHEVCS_F | 106 + .../fate/hevc-conformance-NUT_A_ericsson_5 | 24 +- .../hevc-conformance-NoOutPrior_A_Qualcomm_1 | 36 +- .../hevc-conformance-NoOutPrior_B_Qualcomm_1 | 50 +- .../fate/hevc-conformance-OPFLAG_B_Qualcomm_1 | 118 +- .../fate/hevc-conformance-OPFLAG_C_Qualcomm_1 | 162 +- .../ref/fate/hevc-conformance-RAP_A_docomo_4 | 172 +- .../ref/fate/hevc-conformance-RAP_B_Bossen_1 | 26 +- .../ref/fate/hevc-conformance-SDH_A_Orange_3 | 4 +- ...formance-WPP_HIGH_TP_444_8BIT_RExt_Apple_2 | 8 + .../FFmpeg/tests/ref/fate/hevc-dv-rpu | 110 +- .../tests/ref/fate/hevc-hdr-vivid-metadata | 6 +- .../tests/ref/fate/hevc-mv-nuh-layer-id | 15 + .../FFmpeg/tests/ref/fate/hevc-mv-position | 32 + .../FFmpeg/tests/ref/fate/hevc-mv-switch | 172 + .../external/FFmpeg/tests/ref/fate/hevc-pir | 15 + .../FFmpeg/tests/ref/fate/hevc-small422chroma | 2 +- .../FFmpeg/tests/ref/fate/iamf-5_1-copy | 313 + .../FFmpeg/tests/ref/fate/iamf-5_1-demux | 313 + .../external/FFmpeg/tests/ref/fate/iamf-5_1_4 | 493 + .../external/FFmpeg/tests/ref/fate/iamf-7_1_4 | 555 + .../FFmpeg/tests/ref/fate/iamf-ambisonic_1 | 316 + .../FFmpeg/tests/ref/fate/iamf-stereo | 170 + .../FFmpeg/tests/ref/fate/iamf-stereo-demux | 119 + .../FFmpeg/tests/ref/fate/id3v2-utf16-bom | 42 + .../FFmpeg/tests/ref/fate/idroq-video-encode | 2 +- mythtv/external/FFmpeg/tests/ref/fate/imf | 3 + .../FFmpeg/tests/ref/fate/imf-cpl-with-audio | 207 + .../external/FFmpeg/tests/ref/fate/imgutils | 239 + .../tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_01 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_02 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_03 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_04 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_05 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_07 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_08 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_09 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_10 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_11 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_12 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_14 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_15 | 6 + .../FFmpeg/tests/ref/fate/jpeg2000dec-p0_16 | 6 + .../external/FFmpeg/tests/ref/fate/jpg-12bpp | 2 +- mythtv/external/FFmpeg/tests/ref/fate/jpg-icc | 10 +- .../external/FFmpeg/tests/ref/fate/jpg-rgb-1 | 6 + .../external/FFmpeg/tests/ref/fate/jpg-rgb-2 | 6 + .../FFmpeg/tests/ref/fate/jpg-rgb-221 | 6 + .../external/FFmpeg/tests/ref/fate/jpg-rgb-3 | 6 + .../external/FFmpeg/tests/ref/fate/jpg-rgb-4 | 6 + .../external/FFmpeg/tests/ref/fate/jpg-rgb-5 | 6 + .../FFmpeg/tests/ref/fate/jpg-rgb-baseline | 6 + .../FFmpeg/tests/ref/fate/jpg-rgb-progressive | 6 + .../external/FFmpeg/tests/ref/fate/jv-demux | 14 +- .../tests/ref/fate/jxl-anim-demux-belgium | 6 + .../tests/ref/fate/jxl-anim-demux-icos4d | 6 + .../tests/ref/fate/jxl-anim-demux-lenna256 | 6 + .../tests/ref/fate/jxl-anim-demux-newton | 6 + .../ref/fate/jxl-multiframe-permuted-toc | 11 + .../FFmpeg/tests/ref/fate/jxl-small-ext-box | 9 + .../FFmpeg/tests/ref/fate/libsvtav1-hdr10 | 14 + .../FFmpeg/tests/ref/fate/libx264-hdr10 | 15 + .../FFmpeg/tests/ref/fate/libx264-simple | 85 + .../ref/fate/lossless-monkeysaudio-legacy | 1 + .../FFmpeg/tests/ref/fate/lossless-osq | 1 + .../FFmpeg/tests/ref/fate/lossless-rka | 1 + mythtv/external/FFmpeg/tests/ref/fate/m4v | 84 +- mythtv/external/FFmpeg/tests/ref/fate/m4v-cfr | 1 + .../FFmpeg/tests/ref/fate/matroska-alac-remux | 175 + .../tests/ref/fate/matroska-avoid-negative-ts | 6 +- .../ref/fate/matroska-dovi-write-config7 | 7 +- .../ref/fate/matroska-dovi-write-config8 | 18 +- .../tests/ref/fate/matroska-dvbsub-remux | 4 +- .../tests/ref/fate/matroska-encoding-delay | 98 + .../ref/fate/matroska-flac-extradata-update | 16 +- .../FFmpeg/tests/ref/fate/matroska-h264-remux | 4 +- .../tests/ref/fate/matroska-hdr10-plus-remux | 63 + .../fate/matroska-mastering-display-metadata | 8 +- .../ref/fate/matroska-move-cues-to-front | 66 +- .../tests/ref/fate/matroska-mpegts-remux | 8 +- .../FFmpeg/tests/ref/fate/matroska-ms-mode | 4 +- .../fate/matroska-non-rotation-displaymatrix | 15 + .../tests/ref/fate/matroska-ogg-opus-remux | 92 + .../FFmpeg/tests/ref/fate/matroska-opus-remux | 103 + .../FFmpeg/tests/ref/fate/matroska-pgs-remux | 4 +- .../ref/fate/matroska-pgs-remux-durations | 4 +- .../FFmpeg/tests/ref/fate/matroska-qt-mode | 4 +- .../ref/fate/matroska-side-data-pref-codec | 349 + .../ref/fate/matroska-side-data-pref-packet | 349 + .../tests/ref/fate/matroska-spherical-mono | 5 + .../ref/fate/matroska-spherical-mono-remux | 18 +- .../tests/ref/fate/matroska-stereo_mode | 215 + .../tests/ref/fate/matroska-vp8-alpha-remux | 13 +- .../tests/ref/fate/matroska-zero-length-block | 4 +- .../external/FFmpeg/tests/ref/fate/mkv-1242 | 3 - .../tests/ref/fate/mov-aac-2048-priming | 435 +- .../fate/mov-avif-demux-still-image-1-item | 10 +- .../mov-avif-demux-still-image-multiple-items | 10 +- .../tests/ref/fate/mov-channel-description | 4 +- .../fate/mov-heic-demux-still-image-1-item | 7 + .../ref/fate/mov-heic-demux-still-image-grid | 175 + .../ref/fate/mov-heic-demux-still-image-iovl | 105 + .../fate/mov-heic-demux-still-image-iovl-2 | 75 + .../mov-heic-demux-still-image-multiple-items | 14 + .../tests/ref/fate/mov-init-nonkeyframe | 240 +- .../FFmpeg/tests/ref/fate/mov-mp4-chapters | 2 +- .../ref/fate/mov-mp4-disposition-mpegts-remux | 15 +- .../tests/ref/fate/mov-mp4-extended-atom | 2 +- .../FFmpeg/tests/ref/fate/mov-mp4-iamf-5_1_4 | 537 + .../ref/fate/mov-mp4-iamf-7_1_4-video-first | 662 + .../ref/fate/mov-mp4-iamf-7_1_4-video-last | 662 + .../tests/ref/fate/mov-mp4-iamf-ambisonic_1 | 360 + .../FFmpeg/tests/ref/fate/mov-mp4-iamf-stereo | 214 + .../FFmpeg/tests/ref/fate/mov-mp4-pcm | 27 + .../FFmpeg/tests/ref/fate/mov-mp4-pcm-float | 7 + .../FFmpeg/tests/ref/fate/mov-mp4-ttml-dfxp | 14 +- .../FFmpeg/tests/ref/fate/mov-mp4-ttml-stpp | 15 +- .../FFmpeg/tests/ref/fate/mov-read-amve | 8 + .../FFmpeg/tests/ref/fate/mov-spherical-mono | 5 + .../FFmpeg/tests/ref/fate/mov-write-amve | 33 + .../external/FFmpeg/tests/ref/fate/mov-zombie | 329 +- mythtv/external/FFmpeg/tests/ref/fate/movenc | 10 +- .../FFmpeg/tests/ref/fate/mpeg2-ticket6677 | 14 +- .../FFmpeg/tests/ref/fate/mss2-region | 7 + .../tests/ref/fate/mxf-d10-user-comments | 2 +- .../tests/ref/fate/mxf-probe-applehdr10 | 8 + .../FFmpeg/tests/ref/fate/mxf-probe-d10 | 5 + .../FFmpeg/tests/ref/fate/mxf-probe-dnxhd | 8 + .../FFmpeg/tests/ref/fate/mxf-probe-dv25 | 10 +- .../FFmpeg/tests/ref/fate/mxf-probe-j2k | 80 + .../tests/ref/fate/mxf-remux-applehdr10 | 67 + .../external/FFmpeg/tests/ref/fate/nuv-rtjpeg | 16 +- .../FFmpeg/tests/ref/fate/oggopus-demux | 88 +- mythtv/external/FFmpeg/tests/ref/fate/opt | 127 +- .../tests/ref/fate/pcm_dvd-16-5.1-96000 | 8 +- .../FFmpeg/tests/ref/fate/pixfmt_best | 2 +- mythtv/external/FFmpeg/tests/ref/fate/png-icc | 20 +- .../FFmpeg/tests/ref/fate/png-icc-parse | 37 + .../external/FFmpeg/tests/ref/fate/png-mdcv | 22 + .../FFmpeg/tests/ref/fate/png-side-data | 25 +- .../FFmpeg/tests/ref/fate/prores-gray | 6 +- .../FFmpeg/tests/ref/fate/prores-transparency | 4 +- .../tests/ref/fate/prores-transparency_skip | 4 +- mythtv/external/FFmpeg/tests/ref/fate/qoa-152 | 13 + mythtv/external/FFmpeg/tests/ref/fate/qoa-278 | 135 + mythtv/external/FFmpeg/tests/ref/fate/qoa-303 | 35 + .../external/FFmpeg/tests/ref/fate/quickdraw | 2 +- .../external/FFmpeg/tests/ref/fate/rgb24-mkv | 4 +- mythtv/external/FFmpeg/tests/ref/fate/rl2 | 216 +- .../FFmpeg/tests/ref/fate/segafilm-adx-remux | 1055 ++ .../tests/ref/fate/segafilm-cinepak-mux | 159 + .../tests/ref/fate/segafilm-rawvideo-mux | 98 + .../FFmpeg/tests/ref/fate/segafilm-s8-remux | 151 + .../FFmpeg/tests/ref/fate/segment-mp4-to-ts | 16 +- .../external/FFmpeg/tests/ref/fate/sgi-rgb24 | 2 +- .../FFmpeg/tests/ref/fate/sgi-rgb24-rle | 2 +- .../external/FFmpeg/tests/ref/fate/sgi-rgb48 | 2 +- .../FFmpeg/tests/ref/fate/sgi-rgb48-rle | 2 +- .../external/FFmpeg/tests/ref/fate/sgi-rgba | 2 +- .../FFmpeg/tests/ref/fate/sgi-rgba-rle | 2 +- .../external/FFmpeg/tests/ref/fate/sgi-rgba64 | 2 +- .../FFmpeg/tests/ref/fate/sgi-rgba64-rle | 2 +- .../external/FFmpeg/tests/ref/fate/shortest | 131 +- .../FFmpeg/tests/ref/fate/shortest-sub | 417 + .../FFmpeg/tests/ref/fate/side_data_array | 14 + .../FFmpeg/tests/ref/fate/smacker-video | 2 +- mythtv/external/FFmpeg/tests/ref/fate/source | 11 +- .../FFmpeg/tests/ref/fate/spdif-aac-remux | 93 + .../FFmpeg/tests/ref/fate/spdif-ac3-remux | 63 + .../tests/ref/fate/spdif-dca-core-bswap | 1 + .../tests/ref/fate/spdif-dca-core-remux | 14 + .../FFmpeg/tests/ref/fate/spdif-dca-master | 1 + .../tests/ref/fate/spdif-dca-master-core | 1 + .../ref/fate/spdif-dca-master-core-remux | 1179 ++ .../external/FFmpeg/tests/ref/fate/spdif-eac3 | 1 + .../FFmpeg/tests/ref/fate/spdif-eac3-remux | 659 + .../external/FFmpeg/tests/ref/fate/spdif-mlp | 1 + .../FFmpeg/tests/ref/fate/spdif-mp2-remux | 49 + .../FFmpeg/tests/ref/fate/spdif-mp3-remux | 47 + .../FFmpeg/tests/ref/fate/spdif-truehd | 1 + .../FFmpeg/tests/ref/fate/sub-aqtitle | 93 +- .../tests/ref/fate/sub-ass-to-ass-transcode | 124 +- mythtv/external/FFmpeg/tests/ref/fate/sub-cc | 31 +- .../FFmpeg/tests/ref/fate/sub-cc-realtime | 43 +- .../FFmpeg/tests/ref/fate/sub-cc-scte20 | 33 +- .../FFmpeg/tests/ref/fate/sub-charenc | 127 +- .../FFmpeg/tests/ref/fate/sub-jacosub | 49 +- .../FFmpeg/tests/ref/fate/sub-microdvd | 47 +- .../FFmpeg/tests/ref/fate/sub-movtext | 33 +- .../external/FFmpeg/tests/ref/fate/sub-mpl2 | 35 +- .../external/FFmpeg/tests/ref/fate/sub-mpsub | 69 +- .../FFmpeg/tests/ref/fate/sub-mpsub-frames | 31 +- .../FFmpeg/tests/ref/fate/sub-pgs-remux | 15 + mythtv/external/FFmpeg/tests/ref/fate/sub-pjs | 33 +- .../FFmpeg/tests/ref/fate/sub-realtext | 37 +- .../external/FFmpeg/tests/ref/fate/sub-sami | 45 +- .../external/FFmpeg/tests/ref/fate/sub-sami2 | 185 +- mythtv/external/FFmpeg/tests/ref/fate/sub-scc | 3 +- mythtv/external/FFmpeg/tests/ref/fate/sub-srt | 101 +- .../FFmpeg/tests/ref/fate/sub-srt-badsyntax | 47 +- .../tests/ref/fate/sub-ssa-to-ass-remux | 168 +- mythtv/external/FFmpeg/tests/ref/fate/sub-stl | 61 +- .../FFmpeg/tests/ref/fate/sub-subviewer | 33 +- .../FFmpeg/tests/ref/fate/sub-subviewer1 | 47 +- .../FFmpeg/tests/ref/fate/sub-vplayer | 33 +- .../external/FFmpeg/tests/ref/fate/sub-webvtt | 57 +- .../FFmpeg/tests/ref/fate/sub-webvtt2 | 51 +- .../external/FFmpeg/tests/ref/fate/sub2video | 8 +- .../FFmpeg/tests/ref/fate/sub2video_basic | 182 +- .../tests/ref/fate/sub2video_time_limited | 8 +- mythtv/external/FFmpeg/tests/ref/fate/svq1 | 22 +- .../FFmpeg/tests/ref/fate/swr-async-firstpts | 24 + .../FFmpeg/tests/ref/fate/sws-pixdesc-query | 117 + .../FFmpeg/tests/ref/fate/tiff-lzw-rgbaf32le | 6 + .../FFmpeg/tests/ref/fate/tiff-lzw-rgbf32le | 6 + .../ref/fate/tiff-uncompressed-rgbaf32le | 6 + .../tests/ref/fate/tiff-uncompressed-rgbf32le | 6 + .../FFmpeg/tests/ref/fate/tiff-zip-rgbaf32le | 6 + .../FFmpeg/tests/ref/fate/tiff-zip-rgbf32le | 6 + .../external/FFmpeg/tests/ref/fate/time_base | 2 +- .../external/FFmpeg/tests/ref/fate/ts-demux | 76 +- .../FFmpeg/tests/ref/fate/ts-opus-demux | 1540 +- .../FFmpeg/tests/ref/fate/ts-small-demux | 225 +- .../FFmpeg/tests/ref/fate/ts-timed-id3-demux | 4 + .../external/FFmpeg/tests/ref/fate/tscc2-mov | 2 +- .../FFmpeg/tests/ref/fate/unknown_layout-ac3 | 2 +- .../FFmpeg/tests/ref/fate/vc1_ilaced_twomv | 24 +- .../FFmpeg/tests/ref/fate/vc1_sa00040 | 12 +- .../FFmpeg/tests/ref/fate/vc1_sa00050 | 28 +- .../FFmpeg/tests/ref/fate/vc1_sa10091 | 26 +- .../FFmpeg/tests/ref/fate/vc1_sa10143 | 58 +- .../FFmpeg/tests/ref/fate/vc1_sa20021 | 62 +- .../FFmpeg/tests/ref/fate/vp9-superframe-bsf | 30 + mythtv/external/FFmpeg/tests/ref/fate/vqc | 6 + .../tests/ref/fate/vvc-conformance-APSALF_A_2 | 13 + .../ref/fate/vvc-conformance-APSLMCS_D_1 | 37 + .../ref/fate/vvc-conformance-APSMULT_A_4 | 53 + .../tests/ref/fate/vvc-conformance-AUD_A_3 | 35 + .../tests/ref/fate/vvc-conformance-BUMP_A_2 | 45 + .../tests/ref/fate/vvc-conformance-CROP_B_4 | 105 + .../fate/vvc-conformance-CodingToolsSets_A_2 | 7 + .../tests/ref/fate/vvc-conformance-DCI_A_3 | 7 + .../tests/ref/fate/vvc-conformance-HRD_A_3 | 65 + .../ref/fate/vvc-conformance-IBC_B_Tencent_2 | 22 + .../tests/ref/fate/vvc-conformance-PHSH_B_1 | 11 + .../tests/ref/fate/vvc-conformance-POC_A_1 | 25 + .../tests/ref/fate/vvc-conformance-PPS_B_1 | 69 + .../tests/ref/fate/vvc-conformance-RAP_A_1 | 6 + .../tests/ref/fate/vvc-conformance-RPR_A_4 | 9 + .../tests/ref/fate/vvc-conformance-SAO_A_3 | 65 + .../ref/fate/vvc-conformance-SCALING_A_1 | 69 + .../tests/ref/fate/vvc-conformance-SLICES_A_3 | 30 + .../tests/ref/fate/vvc-conformance-SPS_B_1 | 133 + .../tests/ref/fate/vvc-conformance-STILL_B_1 | 10 + .../tests/ref/fate/vvc-conformance-SUBPIC_A_3 | 9 + .../fate/vvc-conformance-SUBPIC_C_ERICSSON_1 | 37 + .../tests/ref/fate/vvc-conformance-TILE_A_2 | 14 + .../tests/ref/fate/vvc-conformance-WPP_A_3 | 54 + .../tests/ref/fate/vvc-conformance-WP_A_3 | 22 + .../tests/ref/fate/vvc-conformance-WRAP_A_4 | 14 + .../tests/ref/fate/wavpack-lossless-dsd | 1 + .../tests/ref/fate/webm-av1-extradata-update | 32 + .../FFmpeg/tests/ref/fate/webm-dash-chapters | 4 +- .../tests/ref/fate/webm-hdr10-plus-remux | 63 + .../FFmpeg/tests/ref/fate/webm-webvtt-remux | 12 +- .../FFmpeg/tests/ref/fate/wmv8-x8intra | 644 +- .../FFmpeg/tests/ref/fate/xvid-custom-matrix | 2 +- .../external/FFmpeg/tests/ref/fate/xvid-idct | 2 +- .../external/FFmpeg/tests/ref/fate/zmbv-8bit | 1 - .../FFmpeg/tests/ref/lavf-fate/av1.mkv | 4 +- .../FFmpeg/tests/ref/lavf-fate/av1.mp4 | 4 +- .../FFmpeg/tests/ref/lavf-fate/evc.mp4 | 3 + .../FFmpeg/tests/ref/lavf-fate/hevc.flv | 3 + .../FFmpeg/tests/ref/lavf-fate/hevc.mp4 | 3 + .../FFmpeg/tests/ref/lavf-fate/mv_hevc.mov | 3 + .../FFmpeg/tests/ref/lavf-fate/vvc.mp4 | 3 + mythtv/external/FFmpeg/tests/ref/lavf/aiff | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/asf | 2 +- mythtv/external/FFmpeg/tests/ref/lavf/ast | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/dfpwm | 3 + mythtv/external/FFmpeg/tests/ref/lavf/dv_ntsc | 4 +- .../FFmpeg/tests/ref/lavf/gbrpf32be.pfm | 2 +- .../FFmpeg/tests/ref/lavf/gbrpf32le.pfm | 2 +- mythtv/external/FFmpeg/tests/ref/lavf/gif | 2 +- .../FFmpeg/tests/ref/lavf/grayf32be.pfm | 2 +- .../FFmpeg/tests/ref/lavf/grayf32le.pfm | 2 +- .../external/FFmpeg/tests/ref/lavf/gxf_ntsc | 6 +- mythtv/external/FFmpeg/tests/ref/lavf/ismv | 6 +- mythtv/external/FFmpeg/tests/ref/lavf/mka | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/mkv | 4 +- .../FFmpeg/tests/ref/lavf/mkv_attachment | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/mov | 14 +- .../FFmpeg/tests/ref/lavf/mov_hybrid_frag | 3 + .../FFmpeg/tests/ref/lavf/mov_rtphint | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/mp4 | 6 +- mythtv/external/FFmpeg/tests/ref/lavf/mpg | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/mxf | 10 +- mythtv/external/FFmpeg/tests/ref/lavf/mxf_d10 | 2 +- .../external/FFmpeg/tests/ref/lavf/mxf_dv25 | 2 +- .../FFmpeg/tests/ref/lavf/mxf_dvcpro100 | 3 + .../external/FFmpeg/tests/ref/lavf/mxf_ffv1 | 3 + .../external/FFmpeg/tests/ref/lavf/mxf_opatom | 2 +- mythtv/external/FFmpeg/tests/ref/lavf/qoipipe | 3 + mythtv/external/FFmpeg/tests/ref/lavf/rm | 2 +- mythtv/external/FFmpeg/tests/ref/lavf/s16.voc | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/sgi | 2 +- mythtv/external/FFmpeg/tests/ref/lavf/smjpeg | 6 +- mythtv/external/FFmpeg/tests/ref/lavf/voc | 4 +- mythtv/external/FFmpeg/tests/ref/lavf/wbmp | 3 + mythtv/external/FFmpeg/tests/ref/lavf/xbmpipe | 3 + mythtv/external/FFmpeg/tests/ref/lavf/xwdpipe | 3 + mythtv/external/FFmpeg/tests/ref/lavf/y4m | 4 +- .../FFmpeg/tests/ref/seek/acodec-pcm-alaw | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-f32be | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-f32le | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-f64be | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-f64le | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-mulaw | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-s16le | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-s24le | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-s32le | 54 +- .../FFmpeg/tests/ref/seek/acodec-pcm-u8 | 54 +- .../external/FFmpeg/tests/ref/seek/lavf-aiff | 30 +- mythtv/external/FFmpeg/tests/ref/seek/lavf-al | 46 +- mythtv/external/FFmpeg/tests/ref/seek/lavf-au | 30 +- mythtv/external/FFmpeg/tests/ref/seek/lavf-dv | 32 +- .../external/FFmpeg/tests/ref/seek/lavf-mkv | 44 +- .../external/FFmpeg/tests/ref/seek/lavf-mov | 44 +- mythtv/external/FFmpeg/tests/ref/seek/lavf-ul | 46 +- .../external/FFmpeg/tests/ref/seek/lavf-voc | 22 +- .../external/FFmpeg/tests/ref/seek/lavf-wav | 30 +- .../external/FFmpeg/tests/ref/seek/lavf-y4m | 22 +- .../FFmpeg/tests/ref/seek/vsynth_lena-dv | 24 +- .../FFmpeg/tests/ref/seek/vsynth_lena-dv-411 | 24 +- .../FFmpeg/tests/ref/seek/vsynth_lena-dv-50 | 24 +- .../tests/ref/seek/vsynth_lena-mpeg4-adap | 28 +- .../FFmpeg/tests/ref/seek/vsynth_lena-snow | 28 +- .../FFmpeg/tests/ref/seek/vsynth_lena-svq1 | 28 +- .../FFmpeg/tests/ref/vsynth/vsynth1-ffv1-v2 | 4 + .../tests/ref/vsynth/vsynth1-h261-trellis | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth1-h263-obmc | 4 +- .../tests/ref/vsynth/vsynth1-jpeg2000-97 | 4 +- .../tests/ref/vsynth/vsynth1-jpeg2000-gbrp12 | 4 + .../ref/vsynth/vsynth1-jpeg2000-yuva444p16 | 4 + .../tests/ref/vsynth/vsynth1-mpeg4-adap | 8 +- .../tests/ref/vsynth/vsynth1-mpeg4-thread | 6 +- .../FFmpeg/tests/ref/vsynth/vsynth1-msrle | 4 + .../FFmpeg/tests/ref/vsynth/vsynth1-prores | 2 +- .../tests/ref/vsynth/vsynth1-prores_444 | 2 +- .../tests/ref/vsynth/vsynth1-prores_444_int | 2 +- .../tests/ref/vsynth/vsynth1-prores_int | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth1-prores_ks | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth1-rpza | 4 + .../FFmpeg/tests/ref/vsynth/vsynth1-smc | 4 + .../FFmpeg/tests/ref/vsynth/vsynth1-snow | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth1-snow-hpel | 8 +- .../tests/ref/vsynth/vsynth1-speedhq-420p | 4 + .../tests/ref/vsynth/vsynth1-speedhq-422p | 4 + .../tests/ref/vsynth/vsynth1-speedhq-444p | 4 + .../FFmpeg/tests/ref/vsynth/vsynth1-svq1 | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth2-ffv1-v2 | 4 + .../tests/ref/vsynth/vsynth2-h261-trellis | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth2-h263-obmc | 4 +- .../FFmpeg/tests/ref/vsynth/vsynth2-jpeg2000 | 4 +- .../tests/ref/vsynth/vsynth2-jpeg2000-97 | 4 +- .../tests/ref/vsynth/vsynth2-jpeg2000-gbrp12 | 4 + .../ref/vsynth/vsynth2-jpeg2000-yuva444p16 | 4 + .../tests/ref/vsynth/vsynth2-mpeg2-ivlc-qprd | 6 +- .../tests/ref/vsynth/vsynth2-mpeg4-adap | 8 +- .../tests/ref/vsynth/vsynth2-mpeg4-qprd | 6 +- .../tests/ref/vsynth/vsynth2-mpeg4-thread | 6 +- .../FFmpeg/tests/ref/vsynth/vsynth2-msrle | 4 + .../FFmpeg/tests/ref/vsynth/vsynth2-prores | 2 +- .../tests/ref/vsynth/vsynth2-prores_444 | 2 +- .../tests/ref/vsynth/vsynth2-prores_444_int | 2 +- .../tests/ref/vsynth/vsynth2-prores_int | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth2-prores_ks | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth2-rpza | 4 + .../FFmpeg/tests/ref/vsynth/vsynth2-smc | 4 + .../FFmpeg/tests/ref/vsynth/vsynth2-snow | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth2-snow-hpel | 8 +- .../tests/ref/vsynth/vsynth2-speedhq-420p | 4 + .../tests/ref/vsynth/vsynth2-speedhq-422p | 4 + .../tests/ref/vsynth/vsynth2-speedhq-444p | 4 + .../FFmpeg/tests/ref/vsynth/vsynth2-svq1 | 6 +- .../FFmpeg/tests/ref/vsynth/vsynth3-ffv1-v2 | 4 + .../FFmpeg/tests/ref/vsynth/vsynth3-jpeg2000 | 4 +- .../tests/ref/vsynth/vsynth3-jpeg2000-97 | 4 +- .../tests/ref/vsynth/vsynth3-jpeg2000-gbrp12 | 4 + .../ref/vsynth/vsynth3-jpeg2000-yuva444p16 | 4 + .../tests/ref/vsynth/vsynth3-mpeg4-adap | 8 +- .../FFmpeg/tests/ref/vsynth/vsynth3-msrle | 4 + .../FFmpeg/tests/ref/vsynth/vsynth3-prores | 2 +- .../tests/ref/vsynth/vsynth3-prores_444 | 2 +- .../tests/ref/vsynth/vsynth3-prores_444_int | 2 +- .../tests/ref/vsynth/vsynth3-prores_int | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth3-prores_ks | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth3-rpza | 4 + .../FFmpeg/tests/ref/vsynth/vsynth3-smc | 4 + .../FFmpeg/tests/ref/vsynth/vsynth3-svq1 | 6 +- .../tests/ref/vsynth/vsynth_lena-ffv1-v2 | 4 + .../tests/ref/vsynth/vsynth_lena-h261-trellis | 8 +- .../tests/ref/vsynth/vsynth_lena-h263-obmc | 4 +- .../tests/ref/vsynth/vsynth_lena-jpeg2000 | 4 +- .../tests/ref/vsynth/vsynth_lena-jpeg2000-97 | 4 +- .../ref/vsynth/vsynth_lena-jpeg2000-gbrp12 | 4 + .../vsynth/vsynth_lena-jpeg2000-yuva444p16 | 4 + .../tests/ref/vsynth/vsynth_lena-mpeg4-adap | 8 +- .../tests/ref/vsynth/vsynth_lena-mpeg4-rc | 4 +- .../FFmpeg/tests/ref/vsynth/vsynth_lena-msrle | 4 + .../tests/ref/vsynth/vsynth_lena-prores | 2 +- .../tests/ref/vsynth/vsynth_lena-prores_444 | 2 +- .../ref/vsynth/vsynth_lena-prores_444_int | 2 +- .../tests/ref/vsynth/vsynth_lena-prores_int | 2 +- .../tests/ref/vsynth/vsynth_lena-prores_ks | 2 +- .../FFmpeg/tests/ref/vsynth/vsynth_lena-rpza | 4 + .../FFmpeg/tests/ref/vsynth/vsynth_lena-smc | 4 + .../FFmpeg/tests/ref/vsynth/vsynth_lena-snow | 8 +- .../tests/ref/vsynth/vsynth_lena-snow-hpel | 8 +- .../tests/ref/vsynth/vsynth_lena-speedhq-420p | 4 + .../tests/ref/vsynth/vsynth_lena-speedhq-422p | 4 + .../tests/ref/vsynth/vsynth_lena-speedhq-444p | 4 + .../FFmpeg/tests/ref/vsynth/vsynth_lena-svq1 | 6 +- .../tests/streamgroups/audio_element-5_1_4 | 7 + .../tests/streamgroups/audio_element-7_1_4 | 6 + .../tests/streamgroups/audio_element-7_1_4-2 | 6 + .../streamgroups/audio_element-ambisonic_1 | 2 + .../tests/streamgroups/audio_element-stereo | 3 + .../tests/streamgroups/mix_presentation-5_1_4 | 2 + .../tests/streamgroups/mix_presentation-7_1_4 | 2 + .../streamgroups/mix_presentation-ambisonic_1 | 2 + .../streamgroups/mix_presentation-stereo | 3 + mythtv/external/FFmpeg/tools/.gitignore | 3 + mythtv/external/FFmpeg/tools/Makefile | 14 +- mythtv/external/FFmpeg/tools/coverity.c | 18 + mythtv/external/FFmpeg/tools/crypto_bench.c | 1 + mythtv/external/FFmpeg/tools/decode_simple.c | 23 +- .../FFmpeg/tools/enc_recon_frame_test.c | 397 + mythtv/external/FFmpeg/tools/ffeval.c | 4 + .../external/FFmpeg/tools/general_assembly.pl | 151 + mythtv/external/FFmpeg/tools/ismindex.c | 1 + mythtv/external/FFmpeg/tools/normalize.py | 106 +- mythtv/external/FFmpeg/tools/patcheck | 3 +- mythtv/external/FFmpeg/tools/probetest.c | 6 +- .../external/FFmpeg/tools/python/convert.py | 56 - .../tools/python/convert_from_tensorflow.py | 607 - .../FFmpeg/tools/python/convert_header.py | 26 - .../external/FFmpeg/tools/scale_slice_test.c | 4 +- mythtv/external/FFmpeg/tools/sidxindex.c | 1 + .../external/FFmpeg/tools/{cl2c => source2c} | 10 +- .../external/FFmpeg/tools/target_bsf_fuzzer.c | 4 +- .../external/FFmpeg/tools/target_dec_fuzzer.c | 61 +- .../external/FFmpeg/tools/target_dem_fuzzer.c | 9 +- .../external/FFmpeg/tools/target_enc_fuzzer.c | 215 + .../external/FFmpeg/tools/target_swr_fuzzer.c | 154 + .../external/FFmpeg/tools/target_sws_fuzzer.c | 203 + mythtv/external/FFmpeg/tools/uncoded_frame.c | 1 + mythtv/external/FFmpeg/tools/venc_data_dump.c | 2 +- mythtv/external/FFmpeg/tools/zmqsend.c | 3 + mythtv/external/FFmpeg/tools/zmqshell.py | 63 +- 4489 files changed, 402635 insertions(+), 182020 deletions(-) delete mode 100644 mythtv/external/FFmpeg/.travis.yml delete mode 100644 mythtv/external/FFmpeg/compat/atomics/gcc/stdatomic.h delete mode 100644 mythtv/external/FFmpeg/compat/atomics/pthread/stdatomic.h delete mode 100644 mythtv/external/FFmpeg/compat/atomics/suncc/stdatomic.h create mode 100644 mythtv/external/FFmpeg/compat/stdbit/stdbit.h create mode 100755 mythtv/external/FFmpeg/compat/windows/mswindres create mode 100644 mythtv/external/FFmpeg/doc/community.texi delete mode 100644 mythtv/external/FFmpeg/doc/dev_community/community.md delete mode 100644 mythtv/external/FFmpeg/doc/dev_community/resolution_process.md rename mythtv/external/FFmpeg/doc/examples/{http_multiclient.c => avio_http_serve_files.c} (95%) rename mythtv/external/FFmpeg/doc/examples/{avio_reading.c => avio_read_callback.c} (96%) rename mythtv/external/FFmpeg/doc/examples/{filtering_audio.c => decode_filter_audio.c} (92%) rename mythtv/external/FFmpeg/doc/examples/{filtering_video.c => decode_filter_video.c} (92%) rename mythtv/external/FFmpeg/doc/examples/{demuxing_decoding.c => demux_decode.c} (96%) rename mythtv/external/FFmpeg/doc/examples/{muxing.c => mux.c} (95%) rename mythtv/external/FFmpeg/doc/examples/{qsvdec.c => qsv_decode.c} (93%) create mode 100644 mythtv/external/FFmpeg/doc/examples/qsv_transcode.c rename mythtv/external/FFmpeg/doc/examples/{remuxing.c => remux.c} (96%) rename mythtv/external/FFmpeg/doc/examples/{resampling_audio.c => resample_audio.c} (97%) rename mythtv/external/FFmpeg/doc/examples/{scaling_video.c => scale_video.c} (97%) rename mythtv/external/FFmpeg/doc/examples/{metadata.c => show_metadata.c} (91%) rename mythtv/external/FFmpeg/doc/examples/{transcoding.c => transcode.c} (92%) create mode 100644 mythtv/external/FFmpeg/doc/infra.txt create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_dec.c create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_demux.c create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_enc.c create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_mux.h create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_mux_init.c create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_sched.c create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_sched.h create mode 100644 mythtv/external/FFmpeg/fftools/ffmpeg_utils.h create mode 100644 mythtv/external/FFmpeg/fftools/ffplay_renderer.c rename mythtv/external/FFmpeg/{libavutil/sh4/bswap.h => fftools/ffplay_renderer.h} (56%) create mode 100644 mythtv/external/FFmpeg/fftools/fftoolsres.rc create mode 100644 mythtv/external/FFmpeg/fftools/objpool.c create mode 100644 mythtv/external/FFmpeg/fftools/objpool.h create mode 100644 mythtv/external/FFmpeg/fftools/sync_queue.c create mode 100644 mythtv/external/FFmpeg/fftools/sync_queue.h create mode 100644 mythtv/external/FFmpeg/fftools/thread_queue.c create mode 100644 mythtv/external/FFmpeg/fftools/thread_queue.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/Makefile rename mythtv/external/FFmpeg/libavcodec/{aacdec_template.c => aac/aacdec.c} (51%) create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_ac.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_ac.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_dsp_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_fixed.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_fixed_coupling.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_fixed_dequant.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_fixed_prediction.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_float.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_float_coupling.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_float_prediction.h rename mythtv/external/FFmpeg/libavcodec/{aacdec.c => aac/aacdec_latm.h} (58%) create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_lpd.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_lpd.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_proc_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_tab.c rename mythtv/external/FFmpeg/{libavfilter/dnn/dnn_backend_native_layer_pad.h => libavcodec/aac/aacdec_tab.h} (50%) create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_usac.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aac/aacdec_usac.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/aacdec_fixed.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/aacdectab.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aacencdsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/ac3dsp_init_aarch64.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/ac3dsp_neon.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/fdct.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/fdctdsp_init_aarch64.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/fdctdsp_neon.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/fft_neon.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/h26x/dsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/h26x/epel_neon.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/h26x/qpel_neon.S rename mythtv/external/FFmpeg/libavcodec/aarch64/{hevcdsp_sao_neon.S => h26x/sao_neon.S} (88%) create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/hevcdsp_deblock_neon.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/mdct_neon.S rename mythtv/external/FFmpeg/libavcodec/aarch64/{fft_init_aarch64.c => mpegvideoencdsp_init.c} (53%) create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/mpegvideoencdsp_neon.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/Makefile create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/alf.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/alf_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/inter.S create mode 100644 mythtv/external/FFmpeg/libavcodec/aarch64/vvc/sad.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/Makefile delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/asm.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/hpeldsp_alpha.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/hpeldsp_alpha_asm.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/idctdsp_alpha.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/idctdsp_alpha.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/idctdsp_alpha_asm.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/me_cmp_alpha.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/me_cmp_mvi_asm.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/mpegvideo_alpha.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/pixblockdsp_alpha.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/regdef.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/alpha/simple_idct_alpha.c create mode 100644 mythtv/external/FFmpeg/libavcodec/amfenc_av1.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aom_film_grain.c create mode 100644 mythtv/external/FFmpeg/libavcodec/aom_film_grain.h create mode 100644 mythtv/external/FFmpeg/libavcodec/aom_film_grain_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/apac.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/fft_init_arm.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/fft_neon.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/fft_vfp.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/mdct_neon.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/mdct_vfp.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/arm/rdft_neon.S rename mythtv/external/FFmpeg/libavcodec/arm/{vp56_arith.h => vpx_arith.h} (88%) create mode 100644 mythtv/external/FFmpeg/libavcodec/av1_levels.c create mode 100644 mythtv/external/FFmpeg/libavcodec/av1_levels.h create mode 100644 mythtv/external/FFmpeg/libavcodec/avcodec_internal.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/avr32/mathops.h create mode 100644 mythtv/external/FFmpeg/libavcodec/bitstream.h create mode 100644 mythtv/external/FFmpeg/libavcodec/bitstream_template.h create mode 100644 mythtv/external/FFmpeg/libavcodec/bonk.c create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/Makefile rename mythtv/external/FFmpeg/libavcodec/{aac_adtstoasc_bsf.c => bsf/aac_adtstoasc.c} (97%) rename mythtv/external/FFmpeg/libavcodec/{av1_frame_merge_bsf.c => bsf/av1_frame_merge.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{av1_frame_split_bsf.c => bsf/av1_frame_split.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{av1_metadata_bsf.c => bsf/av1_metadata.c} (98%) rename mythtv/external/FFmpeg/libavcodec/{chomp_bsf.c => bsf/chomp.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{dca_core_bsf.c => bsf/dca_core.c} (100%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/dovi_rpu.c create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/dts2pts.c rename mythtv/external/FFmpeg/libavcodec/{dump_extradata_bsf.c => bsf/dump_extradata.c} (99%) rename mythtv/external/FFmpeg/libavcodec/{dv_error_marker_bsf.c => bsf/dv_error_marker.c} (77%) rename mythtv/external/FFmpeg/libavcodec/{eac3_core_bsf.c => bsf/eac3_core.c} (100%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/evc_frame_merge.c rename mythtv/external/FFmpeg/libavcodec/{extract_extradata_bsf.c => bsf/extract_extradata.c} (87%) rename mythtv/external/FFmpeg/libavcodec/{filter_units_bsf.c => bsf/filter_units.c} (70%) rename mythtv/external/FFmpeg/libavcodec/{h264_metadata_bsf.c => bsf/h264_metadata.c} (96%) rename mythtv/external/FFmpeg/libavcodec/{h264_mp4toannexb_bsf.c => bsf/h264_mp4toannexb.c} (62%) rename mythtv/external/FFmpeg/libavcodec/{h264_redundant_pps_bsf.c => bsf/h264_redundant_pps.c} (91%) rename mythtv/external/FFmpeg/libavcodec/{h265_metadata_bsf.c => bsf/h265_metadata.c} (81%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/h266_metadata.c rename mythtv/external/FFmpeg/libavcodec/{hapqa_extract_bsf.c => bsf/hapqa_extract.c} (95%) rename mythtv/external/FFmpeg/libavcodec/{hevc_mp4toannexb_bsf.c => bsf/hevc_mp4toannexb.c} (94%) rename mythtv/external/FFmpeg/libavcodec/{imx_dump_header_bsf.c => bsf/imx_dump_header.c} (100%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/media100_to_mjpegb.c rename mythtv/external/FFmpeg/libavcodec/{mjpeg2jpeg_bsf.c => bsf/mjpeg2jpeg.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{mjpega_dump_header_bsf.c => bsf/mjpega_dump_header.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{movsub_bsf.c => bsf/movsub.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{mpeg2_metadata_bsf.c => bsf/mpeg2_metadata.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{mpeg4_unpack_bframes_bsf.c => bsf/mpeg4_unpack_bframes.c} (99%) rename mythtv/external/FFmpeg/libavcodec/{noise_bsf.c => bsf/noise.c} (85%) rename mythtv/external/FFmpeg/libavcodec/{null_bsf.c => bsf/null.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{opus_metadata_bsf.c => bsf/opus_metadata.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{pcm_rechunk_bsf.c => bsf/pcm_rechunk.c} (91%) rename mythtv/external/FFmpeg/libavcodec/{pgs_frame_merge_bsf.c => bsf/pgs_frame_merge.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{prores_metadata_bsf.c => bsf/prores_metadata.c} (81%) rename mythtv/external/FFmpeg/libavcodec/{remove_extradata_bsf.c => bsf/remove_extradata.c} (99%) rename mythtv/external/FFmpeg/libavcodec/{setts_bsf.c => bsf/setts.c} (100%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/showinfo.c rename mythtv/external/FFmpeg/libavcodec/{trace_headers_bsf.c => bsf/trace_headers.c} (97%) rename mythtv/external/FFmpeg/libavcodec/{truehd_core_bsf.c => bsf/truehd_core.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{vp9_metadata_bsf.c => bsf/vp9_metadata.c} (97%) rename mythtv/external/FFmpeg/libavcodec/{vp9_raw_reorder_bsf.c => bsf/vp9_raw_reorder.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{vp9_superframe_bsf.c => bsf/vp9_superframe.c} (100%) rename mythtv/external/FFmpeg/libavcodec/{vp9_superframe_split_bsf.c => bsf/vp9_superframe_split.c} (100%) create mode 100644 mythtv/external/FFmpeg/libavcodec/bsf/vvc_mp4toannexb.c create mode 100644 mythtv/external/FFmpeg/libavcodec/cbs_h266.h create mode 100644 mythtv/external/FFmpeg/libavcodec/cbs_h266_syntax_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/cbs_vp8.c create mode 100644 mythtv/external/FFmpeg/libavcodec/cbs_vp8.h create mode 100644 mythtv/external/FFmpeg/libavcodec/cbs_vp8_syntax_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/container_fifo.c create mode 100644 mythtv/external/FFmpeg/libavcodec/container_fifo.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/cos_tablegen.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/crystalhd.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_av1.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_decode.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_decode.h create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_encode.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_encode.h create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_encode_hevc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_h264.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_hevc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_mpeg2.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_vc1.c create mode 100644 mythtv/external/FFmpeg/libavcodec/d3d12va_vp9.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/dct.c create mode 100644 mythtv/external/FFmpeg/libavcodec/dovi_rpudec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/dovi_rpuenc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/dv_internal.h create mode 100644 mythtv/external/FFmpeg/libavcodec/dvdsub.h create mode 100644 mythtv/external/FFmpeg/libavcodec/dxv.h create mode 100644 mythtv/external/FFmpeg/libavcodec/dxvenc.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/dynamic_hdr10_plus.c create mode 100644 mythtv/external/FFmpeg/libavcodec/evc.h create mode 100644 mythtv/external/FFmpeg/libavcodec/evc_parse.c create mode 100644 mythtv/external/FFmpeg/libavcodec/evc_parse.h create mode 100644 mythtv/external/FFmpeg/libavcodec/evc_parser.c create mode 100644 mythtv/external/FFmpeg/libavcodec/evc_ps.c create mode 100644 mythtv/external/FFmpeg/libavcodec/evc_ps.h create mode 100644 mythtv/external/FFmpeg/libavcodec/fflcms2.c create mode 100644 mythtv/external/FFmpeg/libavcodec/fflcms2.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft-internal.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft_fixed_32.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft_init_table.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft_table.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/fft_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/flac_parse.h create mode 100644 mythtv/external/FFmpeg/libavcodec/flacencdsp.c create mode 100644 mythtv/external/FFmpeg/libavcodec/flacencdsp.h rename mythtv/external/FFmpeg/libavcodec/{fft_float.c => float2half.c} (94%) delete mode 100644 mythtv/external/FFmpeg/libavcodec/float2half.h create mode 100644 mythtv/external/FFmpeg/libavcodec/ftr.c create mode 100644 mythtv/external/FFmpeg/libavcodec/ftr_parser.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645_sei.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645_sei.h create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645_vui.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645_vui.h create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645data.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h2645data.h create mode 100644 mythtv/external/FFmpeg/libavcodec/h26x/h2656_deblock_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h26x/h2656_inter_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/h26x/h2656_sao_template.c rename mythtv/external/FFmpeg/libavcodec/{mdct_float.c => half2float.c} (94%) create mode 100644 mythtv/external/FFmpeg/libavcodec/hdr_parser.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hdrdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hdrenc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hevc/Makefile rename mythtv/external/FFmpeg/libavcodec/{hevc_cabac.c => hevc/cabac.c} (64%) rename mythtv/external/FFmpeg/libavcodec/{hevc_data.c => hevc/data.c} (98%) rename mythtv/external/FFmpeg/libavcodec/{hevc_data.h => hevc/data.h} (100%) rename mythtv/external/FFmpeg/libavcodec/{hevcdsp.c => hevc/dsp.c} (98%) rename mythtv/external/FFmpeg/libavcodec/{hevcdsp.h => hevc/dsp.h} (59%) create mode 100644 mythtv/external/FFmpeg/libavcodec/hevc/dsp_template.c rename mythtv/external/FFmpeg/libavcodec/{hevc_filter.c => hevc/filter.c} (55%) rename mythtv/external/FFmpeg/libavcodec/{ => hevc}/hevc.h (93%) rename mythtv/external/FFmpeg/libavcodec/{ => hevc}/hevcdec.c (50%) rename mythtv/external/FFmpeg/libavcodec/{ => hevc}/hevcdec.h (55%) rename mythtv/external/FFmpeg/libavcodec/{hevc_mvs.c => hevc/mvs.c} (80%) rename mythtv/external/FFmpeg/libavcodec/{hevc_parse.c => hevc/parse.c} (87%) rename mythtv/external/FFmpeg/libavcodec/{hevc_parse.h => hevc/parse.h} (96%) rename mythtv/external/FFmpeg/libavcodec/{hevc_parser.c => hevc/parser.c} (83%) rename mythtv/external/FFmpeg/libavcodec/{hevcpred.c => hevc/pred.c} (93%) rename mythtv/external/FFmpeg/libavcodec/{hevcpred.h => hevc/pred.h} (85%) rename mythtv/external/FFmpeg/libavcodec/{hevcpred_template.c => hevc/pred_template.c} (86%) rename mythtv/external/FFmpeg/libavcodec/{hevc_ps.c => hevc/ps.c} (53%) rename mythtv/external/FFmpeg/libavcodec/{hevc_ps.h => hevc/ps.h} (53%) rename mythtv/external/FFmpeg/libavcodec/{hevc_ps_enc.c => hevc/ps_enc.c} (99%) create mode 100644 mythtv/external/FFmpeg/libavcodec/hevc/refs.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hevc/sei.c rename mythtv/external/FFmpeg/libavcodec/{hevc_sei.h => hevc/sei.h} (56%) delete mode 100644 mythtv/external/FFmpeg/libavcodec/hevc_refs.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/hevc_sei.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/hevcdsp_template.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/hq_hqa.h rename mythtv/external/FFmpeg/libavcodec/{hq_hqadata.c => hq_hqadata.h} (99%) create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode.h create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode_h264.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode_h264.h create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode_h265.c create mode 100644 mythtv/external/FFmpeg/libavcodec/hw_base_encode_h265.h create mode 100644 mythtv/external/FFmpeg/libavcodec/hwaccel_internal.h create mode 100644 mythtv/external/FFmpeg/libavcodec/itut35.h create mode 100644 mythtv/external/FFmpeg/libavcodec/jpeg2000dec.h create mode 100644 mythtv/external/FFmpeg/libavcodec/jpeg2000htdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/jpeg2000htdec.h create mode 100644 mythtv/external/FFmpeg/libavcodec/jpegquanttables.c rename mythtv/external/FFmpeg/{compat/atomics/pthread/stdatomic.c => libavcodec/jpegquanttables.h} (69%) create mode 100644 mythtv/external/FFmpeg/libavcodec/jpegxl.h create mode 100644 mythtv/external/FFmpeg/libavcodec/jpegxl_parse.c create mode 100644 mythtv/external/FFmpeg/libavcodec/jpegxl_parse.h create mode 100644 mythtv/external/FFmpeg/libavcodec/jpegxl_parser.c create mode 100644 mythtv/external/FFmpeg/libavcodec/lcevcdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/lcevcdec.h create mode 100644 mythtv/external/FFmpeg/libavcodec/leaddata.h create mode 100644 mythtv/external/FFmpeg/libavcodec/leaddec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/leb.h rename mythtv/external/FFmpeg/{libavfilter/dnn/dnn_backend_native_layer_maximum.h => libavcodec/libaom.c} (50%) rename mythtv/external/FFmpeg/{libavfilter/thread.h => libavcodec/libaom.h} (75%) create mode 100644 mythtv/external/FFmpeg/libavcodec/libaribcaption.c create mode 100644 mythtv/external/FFmpeg/libavcodec/liblc3dec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/liblc3enc.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/libopenjpegdec.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/libvpx.c create mode 100644 mythtv/external/FFmpeg/libavcodec/libvvenc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/libxevd.c create mode 100644 mythtv/external/FFmpeg/libavcodec/libxeve.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264_intrapred_lasx.c rename mythtv/external/FFmpeg/libavcodec/loongarch/{h264_intrapred_lasx.h => h264_intrapred_loongarch.h} (70%) create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264chroma.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264chroma_lasx.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264chroma_lasx.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264chroma_loongarch.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264dsp.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264dsp_lasx.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264dsp_loongarch.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264idct.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264idct_lasx.c create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264idct_loongarch.c create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264intrapred.S create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264qpel.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264qpel_lasx.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264qpel_loongarch.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/h264qpel_lsx.c create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/hevc_add_res.S create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/hevc_idct.S create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/hevc_mc.S create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/hevcdsp_lasx.h create mode 100644 mythtv/external/FFmpeg/libavcodec/loongarch/loongson_asm.S create mode 100644 mythtv/external/FFmpeg/libavcodec/lpc_functions.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mdct15.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mdct15.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mdct_fixed_32.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mdct_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/mediacodecenc.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/metasound_data.c create mode 100644 mythtv/external/FFmpeg/libavcodec/metasound_twinvq_data.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aaccoder_mips.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacdec_mips.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacdec_mips.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacpsdsp_mips.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacpsy_mips.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacsbr_mips.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/aacsbr_mips.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/fft_mips.c rename mythtv/external/FFmpeg/libavcodec/{arm/rdft_init_arm.c => mips/mpegvideoenc_init_mips.c} (73%) create mode 100644 mythtv/external/FFmpeg/libavcodec/mips/mpegvideoenc_mmi.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mips/sbrdsp_mips.c create mode 100644 mythtv/external/FFmpeg/libavcodec/misc4.c create mode 100644 mythtv/external/FFmpeg/libavcodec/misc4_parser.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/mp3_header_decompress_bsf.c rename mythtv/external/FFmpeg/libavcodec/{aarch64/asm-offsets.h => mpeg12codecs.h} (74%) create mode 100644 mythtv/external/FFmpeg/libavcodec/mpeg4audio_copy_pce.h create mode 100644 mythtv/external/FFmpeg/libavcodec/mpeg4videodefs.h rename mythtv/external/FFmpeg/libavcodec/{mpegvideodsp.c => mpeg4videodsp.c} (93%) rename mythtv/external/FFmpeg/libavcodec/{mpegvideodsp.h => mpeg4videodsp.h} (68%) create mode 100644 mythtv/external/FFmpeg/libavcodec/mpv_reconstruct_mb_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/msmpeg4_vc1_data.c create mode 100644 mythtv/external/FFmpeg/libavcodec/msmpeg4_vc1_data.h create mode 100644 mythtv/external/FFmpeg/libavcodec/msrleenc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/null.c create mode 100644 mythtv/external/FFmpeg/libavcodec/nvenc_av1.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/opus.h create mode 100644 mythtv/external/FFmpeg/libavcodec/opus/Makefile rename mythtv/external/FFmpeg/libavcodec/{opus.c => opus/celt.c} (56%) rename mythtv/external/FFmpeg/libavcodec/{opus_celt.h => opus/celt.h} (85%) rename mythtv/external/FFmpeg/libavcodec/{opusdec.c => opus/dec.c} (88%) rename mythtv/external/FFmpeg/libavcodec/{opus_celt.c => opus/dec_celt.c} (95%) rename mythtv/external/FFmpeg/libavcodec/{opusdsp.c => opus/dsp.c} (86%) rename mythtv/external/FFmpeg/libavcodec/{opusdsp.h => opus/dsp.h} (81%) rename mythtv/external/FFmpeg/libavcodec/{opusenc.c => opus/enc.c} (95%) rename mythtv/external/FFmpeg/libavcodec/{opusenc.h => opus/enc.h} (92%) rename mythtv/external/FFmpeg/libavcodec/{opusenc_psy.c => opus/enc_psy.c} (96%) rename mythtv/external/FFmpeg/libavcodec/{opusenc_psy.h => opus/enc_psy.h} (87%) rename mythtv/external/FFmpeg/libavcodec/{opusenc_utils.h => opus/enc_utils.h} (94%) create mode 100644 mythtv/external/FFmpeg/libavcodec/opus/opus.h create mode 100644 mythtv/external/FFmpeg/libavcodec/opus/parse.c create mode 100644 mythtv/external/FFmpeg/libavcodec/opus/parse.h rename mythtv/external/FFmpeg/libavcodec/{opus_parser.c => opus/parser.c} (95%) rename mythtv/external/FFmpeg/libavcodec/{opus_pvq.c => opus/pvq.c} (98%) rename mythtv/external/FFmpeg/libavcodec/{opus_pvq.h => opus/pvq.h} (97%) rename mythtv/external/FFmpeg/libavcodec/{opus_rc.c => opus/rc.c} (97%) rename mythtv/external/FFmpeg/libavcodec/{opus_rc.h => opus/rc.h} (96%) rename mythtv/external/FFmpeg/libavcodec/{opus_silk.c => opus/silk.c} (98%) create mode 100644 mythtv/external/FFmpeg/libavcodec/opus/silk.h rename mythtv/external/FFmpeg/libavcodec/{opustab.c => opus/tab.c} (98%) rename mythtv/external/FFmpeg/libavcodec/{opustab.h => opus/tab.h} (94%) create mode 100644 mythtv/external/FFmpeg/libavcodec/osq.c rename mythtv/external/FFmpeg/libavcodec/{avpacket.c => packet.c} (84%) create mode 100644 mythtv/external/FFmpeg/libavcodec/pdvdec.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/ppc/fft_altivec.S delete mode 100644 mythtv/external/FFmpeg/libavcodec/ppc/fft_init.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/ppc/fft_vsx.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/ppc/fft_vsx.h rename mythtv/external/FFmpeg/libavcodec/ppc/{mpegvideodsp.c => mpeg4videodsp.c} (96%) create mode 100644 mythtv/external/FFmpeg/libavcodec/progressframe.h rename mythtv/external/FFmpeg/libavcodec/{proresdec2.c => proresdec.c} (93%) create mode 100644 mythtv/external/FFmpeg/libavcodec/qoadec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/qsvenc_av1.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/rdft.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/rdft.h create mode 100644 mythtv/external/FFmpeg/libavcodec/refstruct.c create mode 100644 mythtv/external/FFmpeg/libavcodec/refstruct.h create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/Makefile create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/aacencdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/aacencdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/aacpsdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/aacpsdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/ac3dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/ac3dsp_rvb.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/ac3dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/ac3dsp_rvvb.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/alacdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/alacdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/audiodsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/audiodsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/blockdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/blockdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/bswapdsp_init.c rename mythtv/external/FFmpeg/libavcodec/{h263_parser.h => riscv/bswapdsp_rvb.S} (73%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/bswapdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/bswapdsp_rvvb.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/exrdsp_init.c rename mythtv/external/FFmpeg/libavcodec/{mpeg4video_parser.h => riscv/exrdsp_rvv.S} (62%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/fixed_vtype.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/flacdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/flacdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/fmtconvert_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/fmtconvert_rvv.S rename mythtv/external/FFmpeg/{libavutil/avr32/bswap.h => libavcodec/riscv/g722dsp_init.c} (65%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/g722dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h263dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h263dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264_chroma_init_riscv.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264_mc_chroma.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264addpx_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/h264idct_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/huffyuvdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/huffyuvdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/idctdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/idctdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/jpeg2000dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/jpeg2000dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/llauddsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/llauddsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/llviddsp_init.c rename mythtv/external/FFmpeg/{libavformat/jpegxl_probe.h => libavcodec/riscv/llviddsp_rvv.S} (65%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/llvidencdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/llvidencdsp_rvv.S rename mythtv/external/FFmpeg/libavcodec/{x86/fft_init.c => riscv/lpc_init.c} (57%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/lpc_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/me_cmp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/me_cmp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/mpegvideoencdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/mpegvideoencdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/opusdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/opusdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/pixblockdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/pixblockdsp_rvi.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/pixblockdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/rv34dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/rv34dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/rv40dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/rv40dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/sbrdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/sbrdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/startcode_rvb.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/startcode_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/svqenc_init.c rename mythtv/external/FFmpeg/libavcodec/{dynamic_hdr10_plus.h => riscv/svqenc_rvv.S} (50%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/takdsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/takdsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/utvideodsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/utvideodsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vc1dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vc1dsp_rvi.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vc1dsp_rvv.S rename mythtv/external/FFmpeg/libavcodec/{alpha/hpeldsp_alpha.h => riscv/videodsp.S} (72%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/videodsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vorbisdsp_init.c rename mythtv/external/FFmpeg/libavcodec/{alpha/blockdsp_alpha.c => riscv/vorbisdsp_rvv.S} (54%) create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp7dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp7dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp8dsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp8dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp8dsp_rvi.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp8dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp9_intra_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp9_mc_rvi.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp9_mc_rvv.S create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp9dsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/riscv/vp9dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/rka.c create mode 100644 mythtv/external/FFmpeg/libavcodec/rtv1.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/sh4/README rename mythtv/external/FFmpeg/{libavutil/bfin/timer.h => libavcodec/speedhq.h} (64%) create mode 100644 mythtv/external/FFmpeg/libavcodec/speedhqdec.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/svq1enc.h create mode 100644 mythtv/external/FFmpeg/libavcodec/svq1encdsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/tests/av1_levels.c rename mythtv/external/FFmpeg/libavcodec/tests/{fft-fixed32.c => bitstream_be.c} (93%) create mode 100644 mythtv/external/FFmpeg/libavcodec/tests/bitstream_le.c create mode 100644 mythtv/external/FFmpeg/libavcodec/tests/bitstream_template.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/tests/fft.c create mode 100644 mythtv/external/FFmpeg/libavcodec/threadprogress.c create mode 100644 mythtv/external/FFmpeg/libavcodec/threadprogress.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vaapi_encode_av1.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vc1_vlc_data.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vmixdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vorbis_data.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vp89_rac.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vp8data.c rename mythtv/external/FFmpeg/libavcodec/{vp56rac.c => vpx_rac.c} (92%) create mode 100644 mythtv/external/FFmpeg/libavcodec/vpx_rac.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vqcdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan.c rename mythtv/external/FFmpeg/libavcodec/{tests/avfft.c => vulkan.h} (86%) create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_av1.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_decode.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_decode.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_encode.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_encode.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_encode_h264.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_encode_h265.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_h264.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_hevc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_video.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vulkan_video.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/Makefile create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/cabac.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/cabac.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/ctu.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/ctu.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/data.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/data.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/dec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/dec.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/dsp.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/dsp.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/dsp_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/filter.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/filter.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/filter_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/inter.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/inter.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/inter_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/intra.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/intra.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/intra_template.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/intra_utils.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/itx_1d.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/itx_1d.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/mvs.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/mvs.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/ps.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/ps.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/refs.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/refs.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/thread.c create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc/thread.h create mode 100644 mythtv/external/FFmpeg/libavcodec/vvc_parser.c create mode 100644 mythtv/external/FFmpeg/libavcodec/wavarc.c create mode 100644 mythtv/external/FFmpeg/libavcodec/wbmpdec.c create mode 100644 mythtv/external/FFmpeg/libavcodec/wbmpenc.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/fft.asm delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/fft.h rename mythtv/external/FFmpeg/libavcodec/x86/{dct_init.c => flacencdsp_init.c} (69%) create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/h26x/h2656_inter.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/h26x/h2656dsp.c create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/h26x/h2656dsp.h delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/hpeldsp_vp3.asm delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/hpeldsp_vp3_init.c create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/lpc.asm rename mythtv/external/FFmpeg/libavcodec/x86/{lpc.c => lpc_init.c} (62%) delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/mdct15.asm delete mode 100644 mythtv/external/FFmpeg/libavcodec/x86/mdct15_init.c rename mythtv/external/FFmpeg/libavcodec/x86/{mpegvideodsp.c => mpeg4videodsp.c} (97%) rename mythtv/external/FFmpeg/libavcodec/x86/{vp56_arith.h => vpx_arith.h} (83%) create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/Makefile create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvc_alf.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvc_dmvr.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvc_mc.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvc_of.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvc_sad.asm create mode 100644 mythtv/external/FFmpeg/libavcodec/x86/vvc/vvcdsp_init.c delete mode 100644 mythtv/external/FFmpeg/libavcodec/xvmc.h create mode 100644 mythtv/external/FFmpeg/libavcodec/xwd_parser.c create mode 100644 mythtv/external/FFmpeg/libavdevice/ccfifo.c create mode 100644 mythtv/external/FFmpeg/libavdevice/riscv/Makefile create mode 100644 mythtv/external/FFmpeg/libavdevice/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libavfilter/aap_template.c create mode 100644 mythtv/external/FFmpeg/libavfilter/aarch64/vf_bwdif_init_aarch64.c create mode 100644 mythtv/external/FFmpeg/libavfilter/aarch64/vf_bwdif_neon.S create mode 100644 mythtv/external/FFmpeg/libavfilter/adynamicequalizer_template.c create mode 100644 mythtv/external/FFmpeg/libavfilter/af_aap.c create mode 100644 mythtv/external/FFmpeg/libavfilter/af_adrc.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/af_afir.h create mode 100644 mythtv/external/FFmpeg/libavfilter/af_arls.c create mode 100644 mythtv/external/FFmpeg/libavfilter/anlms_template.c create mode 100644 mythtv/external/FFmpeg/libavfilter/arls_template.c create mode 100644 mythtv/external/FFmpeg/libavfilter/asrc_afdelaysrc.c create mode 100644 mythtv/external/FFmpeg/libavfilter/avf_a3dscope.c create mode 100644 mythtv/external/FFmpeg/libavfilter/avf_showcwt.c create mode 100644 mythtv/external/FFmpeg/libavfilter/avfilter_internal.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/bwdif.h create mode 100644 mythtv/external/FFmpeg/libavfilter/bwdifdsp.c create mode 100644 mythtv/external/FFmpeg/libavfilter/bwdifdsp.h create mode 100644 mythtv/external/FFmpeg/libavfilter/ccfifo.c create mode 100644 mythtv/external/FFmpeg/libavfilter/ccfifo.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/deshake.h create mode 100644 mythtv/external/FFmpeg/libavfilter/dialoguenhance_template.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_avgpool.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_avgpool.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_conv2d.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_conv2d.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_dense.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_dense.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_depth2space.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_depth2space.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_mathbinary.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_mathbinary.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_mathunary.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_mathunary.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_maximum.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layer_pad.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_native_layers.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_openvino.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_tf.h create mode 100644 mythtv/external/FFmpeg/libavfilter/dnn/dnn_backend_torch.cpp create mode 100644 mythtv/external/FFmpeg/libavfilter/edge_template.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/fifo.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/internal.h create mode 100644 mythtv/external/FFmpeg/libavfilter/palette.c create mode 100644 mythtv/external/FFmpeg/libavfilter/palette.h create mode 100644 mythtv/external/FFmpeg/libavfilter/perlin.c create mode 100644 mythtv/external/FFmpeg/libavfilter/perlin.h create mode 100644 mythtv/external/FFmpeg/libavfilter/qrencode.c create mode 100644 mythtv/external/FFmpeg/libavfilter/riscv/Makefile rename mythtv/external/FFmpeg/{libavutil/bfin/bswap.h => libavfilter/riscv/af_afir_init.c} (63%) create mode 100644 mythtv/external/FFmpeg/libavfilter/riscv/af_afir_rvv.S create mode 100644 mythtv/external/FFmpeg/libavfilter/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libavfilter/silenceremove_template.c create mode 100644 mythtv/external/FFmpeg/libavfilter/stack_internal.c create mode 100644 mythtv/external/FFmpeg/libavfilter/stack_internal.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-avgpool.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-conv2d.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-dense.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-depth2space.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-mathbinary.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-mathunary.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-maximum.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/tests/dnn-layer-pad.c create mode 100644 mythtv/external/FFmpeg/libavfilter/textutils.c create mode 100644 mythtv/external/FFmpeg/libavfilter/textutils.h delete mode 100644 mythtv/external/FFmpeg/libavfilter/unsharp.h create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_backgroundkey.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_bilateral_cuda.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_bilateral_cuda.cu create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_bwdif_cuda.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_bwdif_cuda.cu create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_bwdif_vulkan.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_ccrepack.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_colorspace_cuda.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_colorspace_cuda.cu create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_corr.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/vf_deinterlace_qsv.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_drawbox_vaapi.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_fsync.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_lcevc.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_nlmeans_vulkan.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_pad_vaapi.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_quirc.c delete mode 100644 mythtv/external/FFmpeg/libavfilter/vf_scale_qsv.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_scale_vt.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_ssim360.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_stack_qsv.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_stack_vaapi.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_tiltandshift.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_transpose_vt.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_xfade_vulkan.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vf_xpsnr.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vsrc_ddagrab.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vsrc_ddagrab_shaders.h create mode 100644 mythtv/external/FFmpeg/libavfilter/vsrc_perlin.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vsrc_testsrc_vulkan.c create mode 100644 mythtv/external/FFmpeg/libavfilter/vulkan/.gitignore rename mythtv/external/FFmpeg/{libavutil => libavfilter}/vulkan_glslang.c (95%) rename mythtv/external/FFmpeg/{libavutil => libavfilter}/vulkan_shaderc.c (93%) create mode 100644 mythtv/external/FFmpeg/libavfilter/vulkan_spirv.h create mode 100644 mythtv/external/FFmpeg/libavfilter/x86/vf_xpsnr_init.c create mode 100644 mythtv/external/FFmpeg/libavfilter/xpsnr.h create mode 100644 mythtv/external/FFmpeg/libavformat/ac4dec.c create mode 100644 mythtv/external/FFmpeg/libavformat/ac4enc.c rename mythtv/external/FFmpeg/libavformat/{aea.c => aeadec.c} (65%) create mode 100644 mythtv/external/FFmpeg/libavformat/aeaenc.c create mode 100644 mythtv/external/FFmpeg/libavformat/apac.c create mode 100644 mythtv/external/FFmpeg/libavformat/bonk.c create mode 100644 mythtv/external/FFmpeg/libavformat/dvdclut.c rename mythtv/external/FFmpeg/{libavfilter/dnn/dnn_backend_native_layers.h => libavformat/dvdclut.h} (53%) create mode 100644 mythtv/external/FFmpeg/libavformat/dvdvideodec.c create mode 100644 mythtv/external/FFmpeg/libavformat/evc.c create mode 100644 mythtv/external/FFmpeg/libavformat/evc.h create mode 100644 mythtv/external/FFmpeg/libavformat/evcdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/ffjni.c delete mode 100644 mythtv/external/FFmpeg/libavformat/fifo_test.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamf.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamf.h create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_parse.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_parse.h create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_reader.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_reader.h create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_writer.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamf_writer.h create mode 100644 mythtv/external/FFmpeg/libavformat/iamfdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/iamfenc.c create mode 100644 mythtv/external/FFmpeg/libavformat/jpegxl_anim_dec.c create mode 100644 mythtv/external/FFmpeg/libavformat/jpegxl_parse.c delete mode 100644 mythtv/external/FFmpeg/libavformat/jpegxl_probe.c create mode 100644 mythtv/external/FFmpeg/libavformat/lafdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/lc3.c create mode 100644 mythtv/external/FFmpeg/libavformat/nal.c create mode 100644 mythtv/external/FFmpeg/libavformat/nal.h create mode 100644 mythtv/external/FFmpeg/libavformat/osq.c create mode 100644 mythtv/external/FFmpeg/libavformat/pdvdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/qoadec.c create mode 100644 mythtv/external/FFmpeg/libavformat/rangecoder_dec.c create mode 100644 mythtv/external/FFmpeg/libavformat/rcwtdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/rcwtenc.c create mode 100644 mythtv/external/FFmpeg/libavformat/riscv/Makefile create mode 100644 mythtv/external/FFmpeg/libavformat/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libavformat/rka.c create mode 100644 mythtv/external/FFmpeg/libavformat/sdns.c create mode 100644 mythtv/external/FFmpeg/libavformat/usmdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/vvc.c create mode 100644 mythtv/external/FFmpeg/libavformat/vvc.h create mode 100644 mythtv/external/FFmpeg/libavformat/vvcdec.c create mode 100644 mythtv/external/FFmpeg/libavformat/wady.c create mode 100644 mythtv/external/FFmpeg/libavformat/wavarc.c create mode 100644 mythtv/external/FFmpeg/libavformat/xmd.c create mode 100644 mythtv/external/FFmpeg/libavutil/aarch64/intreadwrite.h create mode 100644 mythtv/external/FFmpeg/libavutil/aarch64/tx_float_init.c create mode 100644 mythtv/external/FFmpeg/libavutil/aarch64/tx_float_neon.S create mode 100644 mythtv/external/FFmpeg/libavutil/ambient_viewing_environment.c create mode 100644 mythtv/external/FFmpeg/libavutil/ambient_viewing_environment.h delete mode 100644 mythtv/external/FFmpeg/libavutil/arm/intreadwrite.h create mode 100644 mythtv/external/FFmpeg/libavutil/attributes_internal.h delete mode 100644 mythtv/external/FFmpeg/libavutil/avr32/intreadwrite.h delete mode 100644 mythtv/external/FFmpeg/libavutil/color_utils.c delete mode 100644 mythtv/external/FFmpeg/libavutil/color_utils.h create mode 100644 mythtv/external/FFmpeg/libavutil/dict_internal.h rename mythtv/external/FFmpeg/libavutil/{x86 => }/emms.h (91%) create mode 100644 mythtv/external/FFmpeg/libavutil/executor.c create mode 100644 mythtv/external/FFmpeg/libavutil/executor.h create mode 100644 mythtv/external/FFmpeg/libavutil/file_open.h create mode 100644 mythtv/external/FFmpeg/libavutil/float2half.c create mode 100644 mythtv/external/FFmpeg/libavutil/float2half.h rename mythtv/external/FFmpeg/{libavcodec/half2float.h => libavutil/half2float.c} (59%) create mode 100644 mythtv/external/FFmpeg/libavutil/half2float.h create mode 100644 mythtv/external/FFmpeg/libavutil/hwcontext_d3d12va.c create mode 100644 mythtv/external/FFmpeg/libavutil/hwcontext_d3d12va.h create mode 100644 mythtv/external/FFmpeg/libavutil/hwcontext_d3d12va_internal.h create mode 100644 mythtv/external/FFmpeg/libavutil/iamf.c create mode 100644 mythtv/external/FFmpeg/libavutil/iamf.h rename mythtv/external/FFmpeg/libavutil/{aarch64/bswap.h => loongarch/timer.h} (59%) create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/Makefile create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/asm.S create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/bswap.h create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/bswap_rvb.S create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/cpu.c create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/cpu.h create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/fixed_dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/fixed_dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/float_dsp_init.c create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/float_dsp_rvv.S create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/intmath.h create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/lls_init.c create mode 100644 mythtv/external/FFmpeg/libavutil/riscv/lls_rvv.S create mode 100644 mythtv/external/FFmpeg/libavutil/sfc64.h create mode 100644 mythtv/external/FFmpeg/libavutil/tests/side_data_array.c create mode 100644 mythtv/external/FFmpeg/libavutil/timestamp.c delete mode 100644 mythtv/external/FFmpeg/libavutil/tomi/intreadwrite.h create mode 100644 mythtv/external/FFmpeg/libavutil/video_hint.c create mode 100644 mythtv/external/FFmpeg/libavutil/video_hint.h create mode 100644 mythtv/external/FFmpeg/libswscale/aarch64/input.S create mode 100644 mythtv/external/FFmpeg/libswscale/aarch64/range_convert_neon.S create mode 100644 mythtv/external/FFmpeg/libswscale/aarch64/swscale_unscaled_neon.S create mode 100644 mythtv/external/FFmpeg/libswscale/half2float.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/Makefile create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/input.S create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/input_lasx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/input_lsx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/output.S create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/output_lasx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/output_lsx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/rgb2rgb_lasx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/swscale.S create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/swscale_init_loongarch.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/swscale_lasx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/swscale_loongarch.h create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/swscale_lsx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/yuv2rgb_lasx.c create mode 100644 mythtv/external/FFmpeg/libswscale/loongarch/yuv2rgb_lsx.c create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/Makefile create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/cpu_common.c create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/input_rvv.S create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/range_rvv.S create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/rgb2rgb.c create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/rgb2rgb_rvb.S create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/rgb2rgb_rvv.S create mode 100644 mythtv/external/FFmpeg/libswscale/riscv/swscale.c create mode 100644 mythtv/external/FFmpeg/libswscale/x86/range_convert.asm delete mode 100644 mythtv/external/FFmpeg/libswscale/x86/rgb2rgb_template.c delete mode 100644 mythtv/external/FFmpeg/libswscale/x86/yuv2rgb_template.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/aacencdsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/ac3dsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/fdctdsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/h263dsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/h264chroma.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/hevc_deblock.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/llauddsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/lls.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/lpc.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/mpegvideoencdsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/riscv/checkasm.S create mode 100644 mythtv/external/FFmpeg/tests/checkasm/rv34dsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/rv40dsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/svq1enc.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/sw_range_convert.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/sw_yuv2rgb.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/sw_yuv2yuv.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/takdsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/vf_bwdif.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/vf_convolution.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/vorbisdsp.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/vvc_alf.c create mode 100644 mythtv/external/FFmpeg/tests/checkasm/vvc_mc.c delete mode 100644 mythtv/external/FFmpeg/tests/fate/dnn.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/enc_external.mak delete mode 100644 mythtv/external/FFmpeg/tests/fate/fft.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/iamf.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/jpeg2000.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/jxl.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/qoa.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/segafilm.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/spdif.mak create mode 100644 mythtv/external/FFmpeg/tests/fate/vvc.mak create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/crazychannels create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/iamf_5_1_4 create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/iamf_7_1_4 create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/iamf_ambisonic_1 create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/mov-mp4-pcm create mode 100644 mythtv/external/FFmpeg/tests/filtergraphs/overlay_yuv444p10 create mode 100644 mythtv/external/FFmpeg/tests/maps/fsync-down create mode 100644 mythtv/external/FFmpeg/tests/maps/fsync-up create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/aptx create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/aptx-hd create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/atrac-aea-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/atrac-matroska-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cavs-demux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-h264-discard-bidir create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-h264-discard-nonintra create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-h264-discard-nonkey create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-h264-discard-nonref create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-hevc-discard-bidir create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-hevc-discard-nonintra create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-hevc-discard-nonkey create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-hevc-discard-nonref create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-APSALF_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-APSLMCS_D_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-APSMULT_A_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-AUD_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-BOUNDARY_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-BUMP_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-CROP_B_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-CodingToolsSets_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-DCI_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-HRD_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-OPI_B_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-PHSH_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-POC_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-PPS_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-RAP_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-SAO_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-SCALING_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-SLICES_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-SPS_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-STILL_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-SUBPIC_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-TILE_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-VPS_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-WPP_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-WP_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/cbs-vvc-WRAP_A_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/dxv3-ycg6 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/dxv3-yg10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/dxv3enc-dxt1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/enhanced-flv-av1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/enhanced-flv-hevc create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/enhanced-flv-vp9 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-bsf-input create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-error-rate-fail create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-error-rate-pass create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-filter-in-eof create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-fix_sub_duration_heartbeat create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-input-r create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-loopback-decoding create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-spec-disposition rename mythtv/external/FFmpeg/tests/ref/fate/{ffmpeg-streamloop => ffmpeg-streamloop-copy} (100%) create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ffmpeg-streamloop-transcode-av create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-asegment-samples-absolute create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-asegment-samples-relative create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-asegment-timestamps-absolute create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-asegment-timestamps-relative create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-atempo create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-bwdif-mode0 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-bwdif-mode1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-bwdif10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-channelsplit create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-crazychannels delete mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-fps-r create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-fsync-down create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-fsync-up create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-median create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-metadata-cropdetect1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-metadata-cropdetect2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-overlay_yuv444p10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-gbrap14be create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-gbrap14le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-nv16 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p012be create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p012le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p212be create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p212le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p412be create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-p412le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-vuya create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-vuyx create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-xv30le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-xv36le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-y210le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixdesc-y212le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixelize-avg create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixelize-max create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-pixelize-min create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-refcmp-xpsnr-rgb create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-refcmp-xpsnr-yuv create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-tiltandshift create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-tiltandshift-410 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-tiltandshift-422 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-tiltandshift-444 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-tpad-add-duration create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/filter-untile-yuv422p rename mythtv/external/FFmpeg/tests/ref/fate/{fitsdec-gbrap16le => fitsdec-gbrap16be} (57%) rename mythtv/external/FFmpeg/tests/ref/fate/{fitsdec-gbrp16 => fitsdec-gbrp16be} (79%) create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/force_key_frames-source create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/force_key_frames-source-drop create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/force_key_frames-source-dup create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264-bsf-dts2pts create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264-bsf-mp4toannexb-new-extradata create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264_redundant_pps-annexb create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264_redundant_pps-mov create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264_redundant_pps-side_data create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/h264_redundant_pps-side_data2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-afd-tc-sei create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-conformance-MVHEVCS_A create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-conformance-MVHEVCS_B create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-conformance-MVHEVCS_E create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-conformance-MVHEVCS_F create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-conformance-WPP_HIGH_TP_444_8BIT_RExt_Apple_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-mv-nuh-layer-id create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-mv-position create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-mv-switch create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/hevc-pir create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-5_1-copy create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-5_1-demux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-5_1_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-7_1_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-ambisonic_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-stereo create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/iamf-stereo-demux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/id3v2-utf16-bom create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/imf-cpl-with-audio create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-ds0_ht_01_b11 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_01 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_02 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_03 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_04 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_05 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_07 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_08 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_09 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_11 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_12 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_14 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_15 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpeg2000dec-p0_16 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-221 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-5 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-baseline create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jpg-rgb-progressive create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-anim-demux-belgium create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-anim-demux-icos4d create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-anim-demux-lenna256 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-anim-demux-newton create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-multiframe-permuted-toc create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/jxl-small-ext-box create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/libsvtav1-hdr10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/libx264-hdr10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/libx264-simple create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/lossless-monkeysaudio-legacy create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/lossless-osq create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/lossless-rka create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-alac-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-encoding-delay create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-hdr10-plus-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-non-rotation-displaymatrix create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-ogg-opus-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-opus-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-side-data-pref-codec create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-side-data-pref-packet create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/matroska-stereo_mode create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-heic-demux-still-image-1-item create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-heic-demux-still-image-grid create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-heic-demux-still-image-iovl create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-heic-demux-still-image-iovl-2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-heic-demux-still-image-multiple-items create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-iamf-5_1_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-iamf-7_1_4-video-first create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-iamf-7_1_4-video-last create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-iamf-ambisonic_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-iamf-stereo create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-pcm create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-mp4-pcm-float create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-read-amve create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mov-write-amve create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mss2-region create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mxf-probe-j2k create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/mxf-remux-applehdr10 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/png-icc-parse create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/png-mdcv create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/qoa-152 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/qoa-278 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/qoa-303 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/segafilm-adx-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/segafilm-cinepak-mux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/segafilm-rawvideo-mux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/segafilm-s8-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/shortest-sub create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/side_data_array create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-aac-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-ac3-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-dca-core-bswap create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-dca-core-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-dca-master create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-dca-master-core create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-dca-master-core-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-eac3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-eac3-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-mlp create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-mp2-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-mp3-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/spdif-truehd create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/sub-pgs-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/swr-async-firstpts create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-lzw-rgbaf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-lzw-rgbf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-uncompressed-rgbaf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-uncompressed-rgbf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-zip-rgbaf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/tiff-zip-rgbf32le create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/ts-timed-id3-demux create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vp9-superframe-bsf create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vqc create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-APSALF_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-APSLMCS_D_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-APSMULT_A_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-AUD_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-BUMP_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-CROP_B_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-CodingToolsSets_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-DCI_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-HRD_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-IBC_B_Tencent_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-PHSH_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-POC_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-PPS_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-RAP_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-RPR_A_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SAO_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SCALING_A_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SLICES_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SPS_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-STILL_B_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SUBPIC_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-SUBPIC_C_ERICSSON_1 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-TILE_A_2 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-WPP_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-WP_A_3 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/vvc-conformance-WRAP_A_4 create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/wavpack-lossless-dsd create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/webm-av1-extradata-update create mode 100644 mythtv/external/FFmpeg/tests/ref/fate/webm-hdr10-plus-remux create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf-fate/evc.mp4 create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf-fate/hevc.flv create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf-fate/hevc.mp4 create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf-fate/mv_hevc.mov create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf-fate/vvc.mp4 create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/dfpwm create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/mov_hybrid_frag create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/mxf_dvcpro100 create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/mxf_ffv1 create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/qoipipe create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/wbmp create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/xbmpipe create mode 100644 mythtv/external/FFmpeg/tests/ref/lavf/xwdpipe create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-ffv1-v2 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-jpeg2000-gbrp12 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-jpeg2000-yuva444p16 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-msrle create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-rpza create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-smc create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-speedhq-420p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-speedhq-422p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth1-speedhq-444p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-ffv1-v2 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-jpeg2000-gbrp12 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-jpeg2000-yuva444p16 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-msrle create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-rpza create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-smc create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-speedhq-420p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-speedhq-422p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth2-speedhq-444p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-ffv1-v2 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-jpeg2000-gbrp12 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-jpeg2000-yuva444p16 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-msrle create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-rpza create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth3-smc create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-ffv1-v2 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-jpeg2000-gbrp12 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-jpeg2000-yuva444p16 create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-msrle create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-rpza create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-smc create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-speedhq-420p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-speedhq-422p create mode 100644 mythtv/external/FFmpeg/tests/ref/vsynth/vsynth_lena-speedhq-444p create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/audio_element-5_1_4 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/audio_element-7_1_4 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/audio_element-7_1_4-2 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/audio_element-ambisonic_1 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/audio_element-stereo create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/mix_presentation-5_1_4 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/mix_presentation-7_1_4 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/mix_presentation-ambisonic_1 create mode 100644 mythtv/external/FFmpeg/tests/streamgroups/mix_presentation-stereo create mode 100644 mythtv/external/FFmpeg/tools/enc_recon_frame_test.c create mode 100755 mythtv/external/FFmpeg/tools/general_assembly.pl delete mode 100644 mythtv/external/FFmpeg/tools/python/convert.py delete mode 100644 mythtv/external/FFmpeg/tools/python/convert_from_tensorflow.py delete mode 100644 mythtv/external/FFmpeg/tools/python/convert_header.py rename mythtv/external/FFmpeg/tools/{cl2c => source2c} (78%) create mode 100644 mythtv/external/FFmpeg/tools/target_enc_fuzzer.c create mode 100644 mythtv/external/FFmpeg/tools/target_swr_fuzzer.c create mode 100644 mythtv/external/FFmpeg/tools/target_sws_fuzzer.c diff --git a/mythtv/external/FFmpeg/.gitattributes b/mythtv/external/FFmpeg/.gitattributes index 5a19b963b66..a900528e474 100644 --- a/mythtv/external/FFmpeg/.gitattributes +++ b/mythtv/external/FFmpeg/.gitattributes @@ -1,2 +1 @@ *.pnm -diff -text -tests/ref/fate/sub-scc eol=crlf diff --git a/mythtv/external/FFmpeg/.mailmap b/mythtv/external/FFmpeg/.mailmap index ba072f38c8d..fe019b88c7d 100644 --- a/mythtv/external/FFmpeg/.mailmap +++ b/mythtv/external/FFmpeg/.mailmap @@ -1,9 +1,8 @@ - - - + + @@ -18,8 +17,12 @@ - + + rcombs - + +Cosmin Stejerean Cosmin Stejerean via ffmpeg-devel + + diff --git a/mythtv/external/FFmpeg/.travis.yml b/mythtv/external/FFmpeg/.travis.yml deleted file mode 100644 index 784b7bdf73d..00000000000 --- a/mythtv/external/FFmpeg/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: c -sudo: false -os: - - linux - - osx -addons: - apt: - packages: - - nasm - - diffutils -compiler: - - clang - - gcc -matrix: - exclude: - - os: osx - compiler: gcc -cache: - directories: - - ffmpeg-samples -before_install: - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi -install: - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install nasm; fi -script: - - mkdir -p ffmpeg-samples - - ./configure --samples=ffmpeg-samples --cc=$CC - - make -j 8 - - make fate-rsync - - make check -j 8 diff --git a/mythtv/external/FFmpeg/CREDITS b/mythtv/external/FFmpeg/CREDITS index e29f0b853c9..f1aea93d6b1 100644 --- a/mythtv/external/FFmpeg/CREDITS +++ b/mythtv/external/FFmpeg/CREDITS @@ -1,6 +1,6 @@ -See the Git history of the project (git://source.ffmpeg.org/ffmpeg) to +See the Git history of the project (https://git.ffmpeg.org/ffmpeg) to get the names of people who have contributed to FFmpeg. To check the log, you can type the command "git log" in the FFmpeg source directory, or browse the online repository at -http://source.ffmpeg.org. +https://git.ffmpeg.org/ffmpeg diff --git a/mythtv/external/FFmpeg/Changelog b/mythtv/external/FFmpeg/Changelog index d77bba51f63..0c05ad29468 100644 --- a/mythtv/external/FFmpeg/Changelog +++ b/mythtv/external/FFmpeg/Changelog @@ -1,8 +1,169 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. +version 7.1: +- Raw Captions with Time (RCWT) closed caption demuxer +- LC3/LC3plus decoding/encoding using external library liblc3 +- ffmpeg CLI filtergraph chaining +- LC3/LC3plus demuxer and muxer +- pad_vaapi, drawbox_vaapi filters +- vf_scale supports secondary ref input and framesync options +- vf_scale2ref deprecated +- qsv_params option added for QSV encoders +- VVC decoder compatible with DVB test content +- xHE-AAC decoder +- removed DEC Alpha DSP and support code +- VVC encoding support via libvvenc +- perlin video source +- D3D12VA HEVC encoder +- Cropping metadata parsing and writing in Matroska and MP4/MOV de/muxers +- Intel QSV-accelerated VVC decoding +- MediaCodec AAC/AMR-NB/AMR-WB/MP3 decoding +- YUV colorspace negotiation for codecs and filters, obsoleting the + YUVJ pixel format +- Vulkan H.264 encoder +- Vulkan H.265 encoder +- stream specifiers in fftools can now match by stream disposition +- LCEVC enhancement data exporting in H.26x and MP4/ISOBMFF +- LCEVC filter +- MV-HEVC decoding + + +version 7.0: +- DXV DXT1 encoder +- LEAD MCMP decoder +- EVC decoding using external library libxevd +- EVC encoding using external library libxeve +- QOA decoder and demuxer +- aap filter +- demuxing, decoding, filtering, encoding, and muxing in the + ffmpeg CLI now all run in parallel +- enable gdigrab device to grab a window using the hwnd=HANDLER syntax +- IAMF raw demuxer and muxer +- D3D12VA hardware accelerated H264, HEVC, VP9, AV1, MPEG-2 and VC1 decoding +- tiltandshift filter +- qrencode filter and qrencodesrc source +- quirc filter +- lavu/eval: introduce randomi() function in expressions +- VVC decoder (experimental) +- fsync filter +- Raw Captions with Time (RCWT) closed caption muxer +- ffmpeg CLI -bsf option may now be used for input as well as output +- ffmpeg CLI options may now be used as -/opt , which is equivalent + to -opt > +- showinfo bitstream filter +- a C11-compliant compiler is now required; note that this requirement + will be bumped to C17 in the near future, so consider updating your + build environment if it lacks C17 support +- Change the default bitrate control method from VBR to CQP for QSV encoders. +- removed deprecated ffmpeg CLI options -psnr and -map_channel +- DVD-Video demuxer, powered by libdvdnav and libdvdread +- ffprobe -show_stream_groups option +- ffprobe (with -export_side_data film_grain) now prints film grain metadata +- AEA muxer +- ffmpeg CLI loopback decoders +- Support PacketTypeMetadata of PacketType in enhanced flv format +- ffplay with hwaccel decoding support (depends on vulkan renderer via libplacebo) +- dnn filter libtorch backend +- Android content URIs protocol +- AOMedia Film Grain Synthesis 1 (AFGS1) +- RISC-V optimizations for AAC, FLAC, JPEG-2000, LPC, RV4.0, SVQ, VC1, VP8, and more +- Loongarch optimizations for HEVC decoding +- Important AArch64 optimizations for HEVC +- IAMF support inside MP4/ISOBMFF +- Support for HEIF/AVIF still images and tiled still images +- Dolby Vision profile 10 support in AV1 +- Support for Ambient Viewing Environment metadata in MP4/ISOBMFF +- HDR10 metadata passthrough when encoding with libx264, libx265, and libsvtav1 + + +version 6.1: +- libaribcaption decoder +- Playdate video decoder and demuxer +- Extend VAAPI support for libva-win32 on Windows +- afireqsrc audio source filter +- arls filter +- ffmpeg CLI new option: -readrate_initial_burst +- zoneplate video source filter +- command support in the setpts and asetpts filters +- Vulkan decode hwaccel, supporting H264, HEVC and AV1 +- color_vulkan filter +- bwdif_vulkan filter +- nlmeans_vulkan filter +- RivaTuner video decoder +- xfade_vulkan filter +- vMix video decoder +- Essential Video Coding parser, muxer and demuxer +- Essential Video Coding frame merge bsf +- bwdif_cuda filter +- Microsoft RLE video encoder +- Raw AC-4 muxer and demuxer +- Raw VVC bitstream parser, muxer and demuxer +- Bitstream filter for editing metadata in VVC streams +- Bitstream filter for converting VVC from MP4 to Annex B +- scale_vt filter for videotoolbox +- transpose_vt filter for videotoolbox +- support for the P_SKIP hinting to speed up libx264 encoding +- Support HEVC,VP9,AV1 codec in enhanced flv format +- apsnr and asisdr audio filters +- OSQ demuxer and decoder +- Support HEVC,VP9,AV1 codec fourcclist in enhanced rtmp protocol +- CRI USM demuxer +- ffmpeg CLI '-top' option deprecated in favor of the setfield filter +- VAAPI AV1 encoder +- ffprobe XML output schema changed to account for multiple + variable-fields elements within the same parent element +- ffprobe -output_format option added as an alias of -of + + +version 6.0: +- Radiance HDR image support +- ddagrab (Desktop Duplication) video capture filter +- ffmpeg -shortest_buf_duration option +- ffmpeg now requires threading to be built +- ffmpeg now runs every muxer in a separate thread +- Add new mode to cropdetect filter to detect crop-area based on motion vectors and edges +- VAAPI decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9 +- WBMP (Wireless Application Protocol Bitmap) image format +- a3dscope filter +- bonk decoder and demuxer +- Micronas SC-4 audio decoder +- LAF demuxer +- APAC decoder and demuxer +- Media 100i decoders +- DTS to PTS reorder bsf +- ViewQuest VQC decoder +- backgroundkey filter +- nvenc AV1 encoding support +- MediaCodec decoder via NDKMediaCodec +- MediaCodec encoder +- oneVPL support for QSV +- QSV AV1 encoder +- QSV decoding and encoding for 10/12bit 422, 10/12bit 444 HEVC and VP9 +- showcwt multimedia filter +- corr video filter +- adrc audio filter +- afdelaysrc audio filter +- WADY DPCM decoder and demuxer +- CBD2 DPCM decoder +- ssim360 video filter +- ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt], + -stats_mux_pre[_fmt] +- hstack_vaapi, vstack_vaapi and xstack_vaapi filters +- XMD ADPCM decoder and demuxer +- media100 to mjpegb bsf +- ffmpeg CLI new option: -fix_sub_duration_heartbeat +- WavArc decoder and demuxer +- CrystalHD decoders deprecated +- SDNS demuxer +- RKA decoder and demuxer +- filtergraph syntax in ffmpeg CLI now supports passing file contents + as option values, by prefixing option name with '/' +- hstack_qsv, vstack_qsv and xstack_qsv filters + + version 5.1: -- add ipfs/ipns protocol support +- add ipfs/ipns gateway support - dialogue enhance audio filter - dropped obsolete XvMC hwaccel - pcm-bluray encoder @@ -25,6 +186,7 @@ version 5.1: - PHM image format support - remap_opencl filter - added chromakey_cuda filter +- added bilateral_cuda filter version 5.0: diff --git a/mythtv/external/FFmpeg/MAINTAINERS b/mythtv/external/FFmpeg/MAINTAINERS index 274fc892037..76651d5ff84 100644 --- a/mythtv/external/FFmpeg/MAINTAINERS +++ b/mythtv/external/FFmpeg/MAINTAINERS @@ -6,28 +6,38 @@ FFmpeg code. Please try to keep entries where you are the maintainer up to date! -Names in () mean that the maintainer currently has no time to maintain the code. +*Status*, one of the following: +[X] Old code. Something tagged obsolete generally means it has been replaced by a better system and you should be using that. +[0] No current maintainer [but maybe you could take the role as you write your new code]. +[1] It has a maintainer but they don't have time to do much other than throw the odd patch in. +[2] Someone actually looks after it. + A (CC
) after the name means that the maintainer prefers to be CC-ed on patches and related discussions. - -Project Leader -============== - - final design decisions +(L
) *Mailing list* that is relevant to this area +(W
) *Web-page* with status/info +(B
) URI for where to file *bugs*. A web-page with detailed bug + filing info, a direct bug tracker link, or a mailto: URI. +(P
) *Subsystem Profile* document for more details submitting + patches to the given subsystem. This is either an in-tree file, + or a URI. See Documentation/maintainer/maintainer-entry-profile.rst + for details. +(T
) *SCM* tree type and location. + Type is one of: git, hg, quilt, stgit, topgit Applications ============ ffmpeg: - ffmpeg.c Michael Niedermayer + ffmpeg.c Michael Niedermayer, Anton Khirnov ffplay: - ffplay.c Marton Balint + ffplay.c [2] Marton Balint ffprobe: - ffprobe.c Stefano Sabatini + ffprobe.c [2] Stefano Sabatini Commandline utility code: cmdutils.c, cmdutils.h Michael Niedermayer @@ -40,24 +50,24 @@ Miscellaneous Areas =================== documentation Stefano Sabatini, Mike Melanson, Timothy Gu, Gyan Doshi -project server Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov -presets Robert Swain +project server day to day operations (L: root@ffmpeg.org) Árpád Gereöffy, Michael Niedermayer, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler +project server emergencies (L: root@ffmpeg.org) Árpád Gereöffy, Reimar Doeffinger, Alexander Strasser, Nikolay Aleksandrov, Timo Rothenpieler +presets [0] metadata subsystem Aurelien Jacobs release management Michael Niedermayer -API tests Ludmila Glinskih +API tests [0] Communication ============= - -website Deby Barbara Lepage -fate.ffmpeg.org Timothy Gu -Trac bug tracker Alexander Strasser, Michael Niedermayer, Carl Eugen Hoyos -Patchwork Andriy Gelman -mailing lists Baptiste Coudurier +website (T: https://git.ffmpeg.org/ffmpeg-web) Deby Barbara Lepage +fate.ffmpeg.org (L: fate-admin@ffmpeg.org) (W: https://fate.ffmpeg.org) (P: https://ffmpeg.org/fate.html) (S: https://git.ffmpeg.org/fateserver) Timo Rothenpieler +Trac bug tracker (W: https://trac.ffmpeg.org) Alexander Strasser, Michael Niedermayer, Carl Eugen Hoyos +Patchwork [2] (W: https://patchwork.ffmpeg.org) Andriy Gelman +mailing lists (W: https://ffmpeg.org/contact.html#MailingLists) Baptiste Coudurier Twitter Reynaldo H. Verdejo Pinochet Launchpad Timothy Gu -ffmpeg-security Andreas Cadhalpun, Carl Eugen Hoyos, Clément Bœsch, Michael Niedermayer, Reimar Doeffinger, rcombs, wm4 +ffmpeg-security [2] (L: ffmpeg-security@ffmpeg.org) (W: https://ffmpeg.org/security.html) Michael Niedermayer, Reimar Doeffinger libavutil @@ -74,22 +84,22 @@ Other: bswap.h des Reimar Doeffinger dynarray.h Nicolas George - eval.c, eval.h Michael Niedermayer + eval.c, eval.h [2] Michael Niedermayer float_dsp Loren Merritt hash Reimar Doeffinger hwcontext_cuda* Timo Rothenpieler - hwcontext_vulkan* Lynne + hwcontext_vulkan* [2] Lynne intfloat* Michael Niedermayer integer.c, integer.h Michael Niedermayer lzo Reimar Doeffinger - mathematics.c, mathematics.h Michael Niedermayer - mem.c, mem.h Michael Niedermayer + mathematics.c, mathematics.h [2] Michael Niedermayer + mem.c, mem.h [2] Michael Niedermayer opencl.c, opencl.h Wei Gao opt.c, opt.h Michael Niedermayer - rational.c, rational.h Michael Niedermayer + rational.c, rational.h [2] Michael Niedermayer rc4 Reimar Doeffinger ripemd.c, ripemd.h James Almer - tx* Lynne + tx* [2] Lynne libavcodec @@ -111,22 +121,20 @@ Generic Parts: DSP utilities: dsputils.c, dsputils.h Michael Niedermayer entropy coding: - rangecoder.c, rangecoder.h Michael Niedermayer + rangecoder.c, rangecoder.h [2] Michael Niedermayer lzw.* Michael Niedermayer floating point AAN DCT: - faandct.c, faandct.h Michael Niedermayer - Non-power-of-two MDCT: - mdct15.c, mdct15.h Rostislav Pehlivanov + faandct.c, faandct.h [2] Michael Niedermayer Golomb coding: - golomb.c, golomb.h Michael Niedermayer + golomb.c, golomb.h [2] Michael Niedermayer motion estimation: motion* Michael Niedermayer rate control: - ratecontrol.c Michael Niedermayer + ratecontrol.c [2] Michael Niedermayer simple IDCT: - simple_idct.c, simple_idct.h Michael Niedermayer + simple_idct.c, simple_idct.h [2] Michael Niedermayer postprocessing: - libpostproc/* Michael Niedermayer + libpostproc/* [2] Michael Niedermayer table generation: tableprint.c, tableprint.h Reimar Doeffinger fixed point FFT: @@ -134,13 +142,14 @@ Generic Parts: Text Subtitles Clément Bœsch Codecs: - 4xm.c Michael Niedermayer + 4xm.c [2] Michael Niedermayer 8bps.c Roberto Togni 8svx.c Jaikrishnan Menon aacenc*, aaccoder.c Rostislav Pehlivanov adpcm.c Zane van Iperen alacenc.c Jaikrishnan Menon alsdec.c Thilo Borgmann, Umair Khan + amfenc* Dmitrii Ovchinnikov aptx.c Aurelien Jacobs ass* Aurelien Jacobs asv* Michael Niedermayer @@ -150,14 +159,12 @@ Codecs: bgmc.c, bgmc.h Thilo Borgmann binkaudio.c Peter Ross cavs* Stefan Gehrer - cdxl.c Paul B Mahol celp_filters.* Vitor Sessak cinepak.c Roberto Togni cinepakenc.c Rl / Aetey G.T. AB ccaption_dec.c Anshul Maheshwari, Aman Gupta cljr Alex Beregszaszi cpia.c Stephan Hilb - crystalhd.c Philip Langdale cscd.c Reimar Doeffinger cuviddec.c Timo Rothenpieler dca* foo86 @@ -170,9 +177,8 @@ Codecs: dv.c Roman Shaposhnik dvbsubdec.c Anshul Maheshwari eacmv*, eaidct*, eat* Peter Ross - evrc* Paul B Mahol exif.c, exif.h Thilo Borgmann - ffv1* Michael Niedermayer + ffv1* [2] Michael Niedermayer ffwavesynth.c Nicolas George fifo.c Jan Sebechlebsky flicvideo.c Mike Melanson @@ -183,11 +189,13 @@ Codecs: h263* Michael Niedermayer h264* Loren Merritt, Michael Niedermayer hap* Tom Butterworth + hevc/* Anton Khirnov huffyuv* Michael Niedermayer idcinvideo.c Mike Melanson interplayvideo.c Mike Melanson jni*, ffjni* Matthieu Bouron jpeg2000* Nicolas Bertrand + jpegxl* Leo Izen jvdec.c Peter Ross lcl*.c Roberto Togni, Reimar Doeffinger libcelt_dec.c Nicolas George @@ -217,12 +225,12 @@ Codecs: mqc* Nicolas Bertrand msmpeg4.c, msmpeg4data.h Michael Niedermayer msrle.c Mike Melanson + msrleenc.c Tomas Härdin msvideo1.c Mike Melanson nuv.c Reimar Doeffinger nvdec*, nvenc* Timo Rothenpieler omx.c Martin Storsjo, Aman Gupta opus* Rostislav Pehlivanov - paf.* Paul B Mahol pcx.c Ivo van Poorten pgssubdec.c Reimar Doeffinger ptx.c Ivo van Poorten @@ -236,7 +244,6 @@ Codecs: rpza.c Roberto Togni rtjpeg.c, rtjpeg.h Reimar Doeffinger rv10.c Michael Niedermayer - s3tc* Ivo van Poorten smc.c Mike Melanson snow* Michael Niedermayer, Loren Merritt sonic.c Alex Beregszaszi @@ -244,16 +251,13 @@ Codecs: srt* Aurelien Jacobs sunrast.c Ivo van Poorten svq3.c Michael Niedermayer - tak* Paul B Mahol truemotion1* Mike Melanson tta.c Alex Beregszaszi, Jaikrishnan Menon - ttaenc.c Paul B Mahol txd.c Ivo van Poorten v4l2_* Jorge Ramirez-Ortiz vc2* Rostislav Pehlivanov vcr1.c Michael Niedermayer videotoolboxenc.c Rick Kern, Aman Gupta - vima.c Paul B Mahol vorbisdec.c Denes Balatoni, David Conrad vorbisenc.c Oded Shimon vp3* Mike Melanson @@ -262,23 +266,22 @@ Codecs: vp8 David Conrad, Ronald Bultje vp9 Ronald Bultje vqavideo.c Mike Melanson + vvc [2] Nuo Mi wmaprodec.c Sascha Sommer wmavoice.c Ronald S. Bultje wmv2.c Michael Niedermayer xan.c Mike Melanson - xbm* Paul B Mahol xface Stefano Sabatini - xwd* Paul B Mahol Hardware acceleration: - crystalhd.c Philip Langdale dxva2* Hendrik Leppkes, Laurent Aimar, Steve Lhomme d3d11va* Steve Lhomme - mediacodec* Matthieu Bouron, Aman Gupta + d3d12va_encode* Tong Wu + mediacodec* Matthieu Bouron, Aman Gupta, Zhao Zhili vaapi* Haihao Xiang vaapi_encode* Mark Thompson, Haihao Xiang vdpau* Philip Langdale, Carl Eugen Hoyos - videotoolbox* Rick Kern, Aman Gupta + videotoolbox* Rick Kern, Aman Gupta, Zhao Zhili libavdevice @@ -313,67 +316,38 @@ Generic parts: motion_estimation.c Davinder Singh Filters: - f_drawgraph.c Paul B Mahol - af_adelay.c Paul B Mahol - af_aecho.c Paul B Mahol - af_afade.c Paul B Mahol af_amerge.c Nicolas George - af_aphaser.c Paul B Mahol af_aresample.c Michael Niedermayer - af_astats.c Paul B Mahol af_atempo.c Pavel Koshevoy - af_biquads.c Paul B Mahol - af_chorus.c Paul B Mahol - af_compand.c Paul B Mahol af_firequalizer.c Muhammad Faiz af_hdcd.c Burt P. - af_ladspa.c Paul B Mahol af_loudnorm.c Kyle Swanson af_pan.c Nicolas George - af_sidechaincompress.c Paul B Mahol - af_silenceremove.c Paul B Mahol - avf_aphasemeter.c Paul B Mahol - avf_avectorscope.c Paul B Mahol avf_showcqt.c Muhammad Faiz - vf_blend.c Paul B Mahol vf_bwdif Thomas Mundt (CC ) vf_chromakey.c Timo Rothenpieler - vf_colorchannelmixer.c Paul B Mahol vf_colorconstancy.c Mina Sami (CC ) - vf_colorbalance.c Paul B Mahol vf_colorkey.c Timo Rothenpieler - vf_colorlevels.c Paul B Mahol vf_coreimage.m Thilo Borgmann - vf_deband.c Paul B Mahol vf_dejudder.c Nicholas Robbins vf_delogo.c Jean Delvare (CC ) vf_drawbox.c/drawgrid Andrey Utkin - vf_extractplanes.c Paul B Mahol - vf_histogram.c Paul B Mahol + vf_fsync.c Thilo Borgmann vf_hqx.c Clément Bœsch vf_idet.c Pascal Massimino - vf_il.c Paul B Mahol vf_(t)interlace Thomas Mundt (CC ) vf_lenscorrection.c Daniel Oberhoff vf_libplacebo.c Niklas Haas - vf_mergeplanes.c Paul B Mahol vf_mestimate.c Davinder Singh vf_minterpolate.c Davinder Singh - vf_neighbor.c Paul B Mahol - vf_psnr.c Paul B Mahol - vf_random.c Paul B Mahol vf_readvitc.c Tobias Rapp (CC t.rapp at noa-archive dot com) - vf_scale.c Michael Niedermayer - vf_separatefields.c Paul B Mahol - vf_ssim.c Paul B Mahol - vf_stereo3d.c Paul B Mahol - vf_telecine.c Paul B Mahol + vf_scale.c [2] Michael Niedermayer vf_tonemap_opencl.c Ruiling Song - vf_yadif.c Michael Niedermayer - vf_zoompan.c Paul B Mahol + vf_yadif.c [2] Michael Niedermayer + vf_xfade_vulkan.c [2] Marvin Scholz (CC ) Sources: - vsrc_mandelbrot.c Michael Niedermayer + vsrc_mandelbrot.c [2] Michael Niedermayer dnn Yejun Guo @@ -391,8 +365,7 @@ Generic parts: Muxers/Demuxers: 4xm.c Mike Melanson aadec.c Vesselin Bontchev (vesselin.bontchev at yandex dot com) - adtsenc.c Robert Swain - afc.c Paul B Mahol + adtsenc.c [0] aiffdec.c Baptiste Coudurier, Matthieu Bouron aiffenc.c Baptiste Coudurier, Matthieu Bouron alp.c Zane van Iperen @@ -403,16 +376,12 @@ Muxers/Demuxers: argo_brp.c Zane van Iperen argo_cvg.c Zane van Iperen ass* Aurelien Jacobs - astdec.c Paul B Mahol astenc.c James Almer avi* Michael Niedermayer avisynth.c Stephen Hutchinson - avr.c Paul B Mahol bink.c Peter Ross boadec.c Michael Niedermayer - brstm.c Paul B Mahol caf* Peter Ross - cdxl.c Paul B Mahol codec2.c Tomas Härdin crc.c Michael Niedermayer dashdec.c Steven Liu @@ -421,10 +390,10 @@ Muxers/Demuxers: dfpwmdec.c Jack Bruienne dss.c Oleksij Rempel dtsdec.c foo86 - dtshddec.c Paul B Mahol dv.c Roman Shaposhnik + dvdvideodec.c Marth64 electronicarts.c Peter Ross - epafdec.c Paul B Mahol + evc* Samsung (Dawid Kozinski) ffm* Baptiste Coudurier flic.c Mike Melanson flvdec.c Michael Niedermayer @@ -432,27 +401,26 @@ Muxers/Demuxers: gxf.c Reimar Doeffinger gxfenc.c Baptiste Coudurier hlsenc.c Christian Suloway, Steven Liu + iamf* [2] James Almer idcin.c Mike Melanson idroqdec.c Mike Melanson iff.c Jaikrishnan Menon + imf* Pierre-Anthony Lemieux img2*.c Michael Niedermayer ipmovie.c Mike Melanson - ircam* Paul B Mahol iss.c Stefan Gehrer - jpegxl_probe.* Leo Izen + jpegxl* Leo Izen jvdec.c Peter Ross kvag.c Zane van Iperen libmodplug.c Clément Bœsch libopenmpt.c Josh de Kock lmlm4.c Ivo van Poorten - lvfdec.c Paul B Mahol lxfdec.c Tomas Härdin - matroska.c Aurelien Jacobs, Andreas Rheinhardt - matroskadec.c Aurelien Jacobs, Andreas Rheinhardt - matroskaenc.c David Conrad, Andreas Rheinhardt + matroska.c Andreas Rheinhardt + matroskadec.c Andreas Rheinhardt + matroskaenc.c Andreas Rheinhardt matroska subtitles (matroskaenc.c) John Peebles metadata* Aurelien Jacobs - mgsts.c Paul B Mahol microdvd* Aurelien Jacobs mm.c Peter Ross mov.c Baptiste Coudurier @@ -465,7 +433,6 @@ Muxers/Demuxers: msnwc_tcp.c Ramiro Polla mtv.c Reynaldo H. Verdejo Pinochet mxf* Baptiste Coudurier, Tomas Härdin - nistspheredec.c Paul B Mahol nsvdec.c Francois Revol nut* Michael Niedermayer nuv.c Reimar Doeffinger @@ -473,13 +440,12 @@ Muxers/Demuxers: oggenc.c Baptiste Coudurier oggparse*.c David Conrad oma.c Maxim Poliakovski - paf.c Paul B Mahol pp_bnk.c Zane van Iperen psxstr.c Mike Melanson pva.c Ivo van Poorten - pvfdec.c Paul B Mahol r3d.c Baptiste Coudurier raw.c Michael Niedermayer + rcwtenc.c Marth64 rdt.c Ronald S. Bultje rl2.c Sascha Sommer rmdec.c, rmenc.c Ronald S. Bultje @@ -498,11 +464,9 @@ Muxers/Demuxers: sdp.c Martin Storsjo segafilm.c Mike Melanson segment.c Stefano Sabatini - smjpeg* Paul B Mahol spdif* Anssi Hannula srtdec.c Aurelien Jacobs swf.c Baptiste Coudurier - takdec.c Paul B Mahol tta.c Alex Beregszaszi txd.c Ivo van Poorten voc.c Aurelien Jacobs @@ -512,7 +476,6 @@ Muxers/Demuxers: webvtt* Matthew J Heaney westwood.c Mike Melanson wtv.c Peter Ross - wvenc.c Paul B Mahol Protocols: async.c Zhang Rui @@ -524,36 +487,37 @@ Protocols: libzmq.c Andriy Gelman mms*.c Ronald S. Bultje udp.c Luca Abeni - icecast.c Marvin Scholz + icecast.c [2] Marvin Scholz (CC ) libswresample ============= Generic parts: - audioconvert.c Michael Niedermayer - dither.c Michael Niedermayer - rematrix*.c Michael Niedermayer - swresample*.c Michael Niedermayer + audioconvert.c [2] Michael Niedermayer + dither.c [2] Michael Niedermayer + rematrix*.c [2] Michael Niedermayer + swresample*.c [2] Michael Niedermayer Resamplers: - resample*.c Michael Niedermayer + resample*.c [2] Michael Niedermayer soxr_resample.c Rob Sykes Operating systems / CPU architectures ===================================== -Alpha Falk Hueffner +*BSD [2] Brad Smith +Alpha [0] MIPS Manojkumar Bhosale, Shiyou Yin -LoongArch Shiyou Yin +LoongArch [2] Shiyou Yin Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier Amiga / PowerPC Colin Ward Linux / PowerPC Lauri Kasanen +RISC-V [2] Rémi Denis-Courmont Windows MinGW Alex Beregszaszi, Ramiro Polla Windows Cygwin Victor Paesa -Windows MSVC Matthew Oliver, Hendrik Leppkes -Windows ICL Matthew Oliver +Windows MSVC Hendrik Leppkes ADI/Blackfin DSP Marc Hoffman Sparc Roman Shaposhnik OS/2 KO Myung-Hun @@ -569,6 +533,7 @@ Benjamin Larsson Bobby Bingham Daniel Verkamp Derek Buitenhuis +Fei Wang Ganesh Ajjanagadde Henrik Gramner Ivan Uskov @@ -591,10 +556,12 @@ wm4 Releases ======== +7.0 Michael Niedermayer +6.1 Michael Niedermayer +5.1 Michael Niedermayer +4.4 Michael Niedermayer +3.4 Michael Niedermayer 2.8 Michael Niedermayer -2.7 Michael Niedermayer -2.6 Michael Niedermayer -2.5 Michael Niedermayer If you want to maintain an older release, please contact us @@ -621,16 +588,19 @@ Haihao Xiang (haihao) 1F0C 31E8 B4FE F7A4 4DC1 DC99 E0F5 76D4 76FC 437F Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368 James Almer 7751 2E8C FD94 A169 57E6 9A7A 1463 01AD 7376 59E0 Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A -Leo Izen (thebombzen) B6FD 3CFC 7ACF 83FC 9137 6945 5A71 C331 FD2F A19A +Leo Izen (Traneptora) B6FD 3CFC 7ACF 83FC 9137 6945 5A71 C331 FD2F A19A +Leo Izen (Traneptora) 1D83 0A0B CE46 709E 203B 26FC 764E 48EA 4822 1833 Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE Lynne FE50 139C 6805 72CA FD52 1F8D A2FE A5F0 3F03 4464 Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB + DD1E C9E8 DE08 5C62 9B3E 1846 B18E 8928 B394 8D64 Nicolas George 24CE 01CE 9ACC 5CEB 74D8 8D9D B063 D997 36E5 4C93 Niklas Haas (haasn) 1DDB 8076 B14D 5B48 32FC 99D9 EB52 DA9C 02BA 6FB4 Nikolay Aleksandrov 8978 1D8C FB71 588E 4B27 EAA8 C4F0 B5FC E011 13B1 Panagiotis Issaris 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029 Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B Philip Langdale 5DC5 8D66 5FBA 3A43 18EC 045E F8D6 B194 6A75 682E +Pierre-Anthony Lemieux (pal) F4B3 9492 E6F2 E4AF AEC8 46CB 698F A1F0 F8D4 EED4 Ramiro Polla 7859 C65B 751B 1179 792E DAE8 8E95 8B2F 9B6C 5700 Reimar Doeffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7 Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4 diff --git a/mythtv/external/FFmpeg/Makefile b/mythtv/external/FFmpeg/Makefile index 4c068753775..f60183ea55e 100644 --- a/mythtv/external/FFmpeg/Makefile +++ b/mythtv/external/FFmpeg/Makefile @@ -47,11 +47,14 @@ FF_DEP_LIBS := $(DEP_LIBS) FF_STATIC_DEP_LIBS := $(STATIC_DEP_LIBS) $(TOOLS): %$(EXESUF): %.o - $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(EXTRALIBS-$(*F)) $(EXTRALIBS) $(ELIBS) + $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(filter-out $(FF_DEP_LIBS), $^) $(EXTRALIBS-$(*F)) $(EXTRALIBS) $(ELIBS) target_dec_%_fuzzer$(EXESUF): target_dec_%_fuzzer.o $(FF_DEP_LIBS) $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) +target_enc_%_fuzzer$(EXESUF): target_enc_%_fuzzer.o $(FF_DEP_LIBS) + $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) + tools/target_bsf_%_fuzzer$(EXESUF): tools/target_bsf_%_fuzzer.o $(FF_DEP_LIBS) $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) @@ -64,9 +67,16 @@ tools/target_dem_fuzzer$(EXESUF): tools/target_dem_fuzzer.o $(FF_DEP_LIBS) tools/target_io_dem_fuzzer$(EXESUF): tools/target_io_dem_fuzzer.o $(FF_DEP_LIBS) $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) +tools/target_sws_fuzzer$(EXESUF): tools/target_sws_fuzzer.o $(FF_DEP_LIBS) + $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) + +tools/target_swr_fuzzer$(EXESUF): tools/target_swr_fuzzer.o $(FF_DEP_LIBS) + $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS) $(FF_EXTRALIBS) $(LIBFUZZER_PATH) tools/enum_options$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/enum_options$(EXESUF): $(FF_DEP_LIBS) +tools/enc_recon_frame_test$(EXESUF): $(FF_DEP_LIBS) +tools/enc_recon_frame_test$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/scale_slice_test$(EXESUF): $(FF_DEP_LIBS) tools/scale_slice_test$(EXESUF): ELIBS = $(FF_EXTRALIBS) tools/sofa2wavs$(EXESUF): ELIBS = $(FF_EXTRALIBS) @@ -93,8 +103,8 @@ SUBDIR_VARS := CLEANFILES FFLIBS HOSTPROGS TESTPROGS TOOLS \ ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \ ALTIVEC-OBJS VSX-OBJS MMX-OBJS X86ASM-OBJS \ MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS \ - MMI-OBJS LSX-OBJS LASX-OBJS OBJS SLIBOBJS SHLIBOBJS \ - STLIBOBJS HOSTOBJS TESTOBJS + MMI-OBJS LSX-OBJS LASX-OBJS RV-OBJS RVV-OBJS RVVB-OBJS \ + OBJS SLIBOBJS SHLIBOBJS STLIBOBJS HOSTOBJS TESTOBJS define RESET $(1) := @@ -131,13 +141,18 @@ endif $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS) VERSION_SH = $(SRC_PATH)/ffbuild/version.sh +ifeq ($(VERSION_TRACKING),yes) GIT_LOG = $(SRC_PATH)/.git/logs/HEAD +endif .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) ffbuild/config.mak .version: M=@ +ifneq ($(VERSION_TRACKING),yes) +libavutil/ffversion.h .version: REVISION=unknown +endif libavutil/ffversion.h .version: - $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION) + $(M)revision=$(REVISION) $(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION) $(Q)touch .version # force version.sh to run whenever version might have changed diff --git a/mythtv/external/FFmpeg/RELEASE b/mythtv/external/FFmpeg/RELEASE index a75b92f1ed7..0f0fefae5ac 100644 --- a/mythtv/external/FFmpeg/RELEASE +++ b/mythtv/external/FFmpeg/RELEASE @@ -1 +1 @@ -5.1 +7.1 diff --git a/mythtv/external/FFmpeg/RELEASE_NOTES b/mythtv/external/FFmpeg/RELEASE_NOTES index afc063161f1..851701a7358 100644 --- a/mythtv/external/FFmpeg/RELEASE_NOTES +++ b/mythtv/external/FFmpeg/RELEASE_NOTES @@ -1,13 +1,10 @@ - ┌────────────────────────────────────────────┐ - │ RELEASE NOTES for FFmpeg 5.1 "Riemann" LTS │ - └────────────────────────────────────────────┘ + ┌──────────────────────────────────────┐ + │ RELEASE NOTES for FFmpeg 7.1 "Péter" │ + └──────────────────────────────────────┘ - The FFmpeg Project proudly presents FFmpeg 5.1 "Riemann" LTS, about 6 - months after the release of FFmpeg 5.0, our first Long Term Support - release. While several past FFmpeg releases have enjoyed long term - support, this is the first release where such an intention is made - clear at release. + The FFmpeg Project proudly presents FFmpeg 7.1 "Péter", about 6 + months after the release of FFmpeg 7.0. A complete Changelog is available at the root of the project, and the complete Git history on https://git.ffmpeg.org/gitweb/ffmpeg.git diff --git a/mythtv/external/FFmpeg/compat/atomics/gcc/stdatomic.h b/mythtv/external/FFmpeg/compat/atomics/gcc/stdatomic.h deleted file mode 100644 index e13ed0e068b..00000000000 --- a/mythtv/external/FFmpeg/compat/atomics/gcc/stdatomic.h +++ /dev/null @@ -1,173 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * based on vlc_atomic.h from VLC - * Copyright (C) 2010 Rémi Denis-Courmont - */ - -#ifndef COMPAT_ATOMICS_GCC_STDATOMIC_H -#define COMPAT_ATOMICS_GCC_STDATOMIC_H - -#include -#include - -#define ATOMIC_FLAG_INIT 0 - -#define ATOMIC_VAR_INIT(value) (value) - -#define atomic_init(obj, value) \ -do { \ - *(obj) = (value); \ -} while(0) - -#define kill_dependency(y) ((void)0) - -#define atomic_thread_fence(order) \ - __sync_synchronize() - -#define atomic_signal_fence(order) \ - ((void)0) - -#define atomic_is_lock_free(obj) 0 - -typedef _Bool atomic_flag; -typedef _Bool atomic_bool; -typedef char atomic_char; -typedef signed char atomic_schar; -typedef unsigned char atomic_uchar; -typedef short atomic_short; -typedef unsigned short atomic_ushort; -typedef int atomic_int; -typedef unsigned int atomic_uint; -typedef long atomic_long; -typedef unsigned long atomic_ulong; -typedef long long atomic_llong; -typedef unsigned long long atomic_ullong; -typedef wchar_t atomic_wchar_t; -typedef int_least8_t atomic_int_least8_t; -typedef uint_least8_t atomic_uint_least8_t; -typedef int_least16_t atomic_int_least16_t; -typedef uint_least16_t atomic_uint_least16_t; -typedef int_least32_t atomic_int_least32_t; -typedef uint_least32_t atomic_uint_least32_t; -typedef int_least64_t atomic_int_least64_t; -typedef uint_least64_t atomic_uint_least64_t; -typedef int_fast8_t atomic_int_fast8_t; -typedef uint_fast8_t atomic_uint_fast8_t; -typedef int_fast16_t atomic_int_fast16_t; -typedef uint_fast16_t atomic_uint_fast16_t; -typedef int_fast32_t atomic_int_fast32_t; -typedef uint_fast32_t atomic_uint_fast32_t; -typedef int_fast64_t atomic_int_fast64_t; -typedef uint_fast64_t atomic_uint_fast64_t; -typedef intptr_t atomic_intptr_t; -typedef uintptr_t atomic_uintptr_t; -typedef size_t atomic_size_t; -typedef ptrdiff_t atomic_ptrdiff_t; -typedef intmax_t atomic_intmax_t; -typedef uintmax_t atomic_uintmax_t; - -#define atomic_store(object, desired) \ -do { \ - *(object) = (desired); \ - __sync_synchronize(); \ -} while (0) - -#define atomic_store_explicit(object, desired, order) \ - atomic_store(object, desired) - -#define atomic_load(object) \ - (__sync_synchronize(), *(object)) - -#define atomic_load_explicit(object, order) \ - atomic_load(object) - -#define atomic_exchange(object, desired) \ -({ \ - __typeof__(object) _obj = (object); \ - __typeof__(*object) _old; \ - do \ - _old = atomic_load(_obj); \ - while (!__sync_bool_compare_and_swap(_obj, _old, (desired))); \ - _old; \ -}) - -#define atomic_exchange_explicit(object, desired, order) \ - atomic_exchange(object, desired) - -#define atomic_compare_exchange_strong(object, expected, desired) \ -({ \ - __typeof__(object) _exp = (expected); \ - __typeof__(*object) _old = *_exp; \ - *_exp = __sync_val_compare_and_swap((object), _old, (desired)); \ - *_exp == _old; \ -}) - -#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak(object, expected, desired) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_weak(object, expected, desired) - -#define atomic_fetch_add(object, operand) \ - __sync_fetch_and_add(object, operand) - -#define atomic_fetch_add_explicit(object, operand, order) \ - atomic_fetch_add(object, operand) - -#define atomic_fetch_sub(object, operand) \ - __sync_fetch_and_sub(object, operand) - -#define atomic_fetch_sub_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) - -#define atomic_fetch_or(object, operand) \ - __sync_fetch_and_or(object, operand) - -#define atomic_fetch_or_explicit(object, operand, order) \ - atomic_fetch_or(object, operand) - -#define atomic_fetch_xor(object, operand) \ - __sync_fetch_and_xor(object, operand) - -#define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_xor(object, operand) - -#define atomic_fetch_and(object, operand) \ - __sync_fetch_and_and(object, operand) - -#define atomic_fetch_and_explicit(object, operand, order) \ - atomic_fetch_and(object, operand) - -#define atomic_flag_test_and_set(object) \ - atomic_exchange(object, 1) - -#define atomic_flag_test_and_set_explicit(object, order) \ - atomic_flag_test_and_set(object) - -#define atomic_flag_clear(object) \ - atomic_store(object, 0) - -#define atomic_flag_clear_explicit(object, order) \ - atomic_flag_clear(object) - -#endif /* COMPAT_ATOMICS_GCC_STDATOMIC_H */ diff --git a/mythtv/external/FFmpeg/compat/atomics/pthread/stdatomic.h b/mythtv/external/FFmpeg/compat/atomics/pthread/stdatomic.h deleted file mode 100644 index 81a60f102bb..00000000000 --- a/mythtv/external/FFmpeg/compat/atomics/pthread/stdatomic.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * based on vlc_atomic.h from VLC - * Copyright (C) 2010 Rémi Denis-Courmont - */ - -#ifndef COMPAT_ATOMICS_PTHREAD_STDATOMIC_H -#define COMPAT_ATOMICS_PTHREAD_STDATOMIC_H - -#include - -#define ATOMIC_FLAG_INIT 0 - -#define ATOMIC_VAR_INIT(value) (value) - -#define atomic_init(obj, value) \ -do { \ - *(obj) = (value); \ -} while(0) - -#define kill_dependency(y) ((void)0) - -#define atomic_signal_fence(order) \ - ((void)0) - -#define atomic_is_lock_free(obj) 0 - -typedef intptr_t atomic_flag; -typedef intptr_t atomic_bool; -typedef intptr_t atomic_char; -typedef intptr_t atomic_schar; -typedef intptr_t atomic_uchar; -typedef intptr_t atomic_short; -typedef intptr_t atomic_ushort; -typedef intptr_t atomic_int; -typedef intptr_t atomic_uint; -typedef intptr_t atomic_long; -typedef intptr_t atomic_ulong; -typedef intptr_t atomic_llong; -typedef intptr_t atomic_ullong; -typedef intptr_t atomic_wchar_t; -typedef intptr_t atomic_int_least8_t; -typedef intptr_t atomic_uint_least8_t; -typedef intptr_t atomic_int_least16_t; -typedef intptr_t atomic_uint_least16_t; -typedef intptr_t atomic_int_least32_t; -typedef intptr_t atomic_uint_least32_t; -typedef intptr_t atomic_int_least64_t; -typedef intptr_t atomic_uint_least64_t; -typedef intptr_t atomic_int_fast8_t; -typedef intptr_t atomic_uint_fast8_t; -typedef intptr_t atomic_int_fast16_t; -typedef intptr_t atomic_uint_fast16_t; -typedef intptr_t atomic_int_fast32_t; -typedef intptr_t atomic_uint_fast32_t; -typedef intptr_t atomic_int_fast64_t; -typedef intptr_t atomic_uint_fast64_t; -typedef intptr_t atomic_intptr_t; -typedef intptr_t atomic_uintptr_t; -typedef intptr_t atomic_size_t; -typedef intptr_t atomic_ptrdiff_t; -typedef intptr_t atomic_intmax_t; -typedef intptr_t atomic_uintmax_t; - -void avpriv_atomic_lock(void); -void avpriv_atomic_unlock(void); - -static inline void atomic_thread_fence(int order) -{ - avpriv_atomic_lock(); - avpriv_atomic_unlock(); -} - -static inline void atomic_store(intptr_t *object, intptr_t desired) -{ - avpriv_atomic_lock(); - *object = desired; - avpriv_atomic_unlock(); -} - -#define atomic_store_explicit(object, desired, order) \ - atomic_store(object, desired) - -static inline intptr_t atomic_load(intptr_t *object) -{ - intptr_t ret; - avpriv_atomic_lock(); - ret = *object; - avpriv_atomic_unlock(); - return ret; -} - -#define atomic_load_explicit(object, order) \ - atomic_load(object) - -static inline intptr_t atomic_exchange(intptr_t *object, intptr_t desired) -{ - intptr_t ret; - avpriv_atomic_lock(); - ret = *object; - *object = desired; - avpriv_atomic_unlock(); - return ret; -} - -#define atomic_exchange_explicit(object, desired, order) \ - atomic_exchange(object, desired) - -static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, - intptr_t desired) -{ - int ret; - avpriv_atomic_lock(); - if (*object == *expected) { - ret = 1; - *object = desired; - } else { - ret = 0; - *expected = *object; - } - avpriv_atomic_unlock(); - return ret; -} - -#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak(object, expected, desired) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_weak(object, expected, desired) - -#define FETCH_MODIFY(opname, op) \ -static inline intptr_t atomic_fetch_ ## opname(intptr_t *object, intptr_t operand) \ -{ \ - intptr_t ret; \ - avpriv_atomic_lock(); \ - ret = *object; \ - *object = *object op operand; \ - avpriv_atomic_unlock(); \ - return ret; \ -} - -FETCH_MODIFY(add, +) -FETCH_MODIFY(sub, -) -FETCH_MODIFY(or, |) -FETCH_MODIFY(xor, ^) -FETCH_MODIFY(and, &) - -#undef FETCH_MODIFY - -#define atomic_fetch_add_explicit(object, operand, order) \ - atomic_fetch_add(object, operand) - -#define atomic_fetch_sub_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) - -#define atomic_fetch_or_explicit(object, operand, order) \ - atomic_fetch_or(object, operand) - -#define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_xor(object, operand) - -#define atomic_fetch_and_explicit(object, operand, order) \ - atomic_fetch_and(object, operand) - -#define atomic_flag_test_and_set(object) \ - atomic_exchange(object, 1) - -#define atomic_flag_test_and_set_explicit(object, order) \ - atomic_flag_test_and_set(object) - -#define atomic_flag_clear(object) \ - atomic_store(object, 0) - -#define atomic_flag_clear_explicit(object, order) \ - atomic_flag_clear(object) - -#endif /* COMPAT_ATOMICS_PTHREAD_STDATOMIC_H */ diff --git a/mythtv/external/FFmpeg/compat/atomics/suncc/stdatomic.h b/mythtv/external/FFmpeg/compat/atomics/suncc/stdatomic.h deleted file mode 100644 index 0cf89e0f78d..00000000000 --- a/mythtv/external/FFmpeg/compat/atomics/suncc/stdatomic.h +++ /dev/null @@ -1,186 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef COMPAT_ATOMICS_SUNCC_STDATOMIC_H -#define COMPAT_ATOMICS_SUNCC_STDATOMIC_H - -#include -#include -#include -#include - -#define ATOMIC_FLAG_INIT 0 - -#define ATOMIC_VAR_INIT(value) (value) - -#define atomic_init(obj, value) \ -do { \ - *(obj) = (value); \ -} while(0) - -#define kill_dependency(y) ((void)0) - -#define atomic_thread_fence(order) \ - __machine_rw_barrier(); - -#define atomic_signal_fence(order) \ - ((void)0) - -#define atomic_is_lock_free(obj) 0 - -typedef intptr_t atomic_flag; -typedef intptr_t atomic_bool; -typedef intptr_t atomic_char; -typedef intptr_t atomic_schar; -typedef intptr_t atomic_uchar; -typedef intptr_t atomic_short; -typedef intptr_t atomic_ushort; -typedef intptr_t atomic_int; -typedef intptr_t atomic_uint; -typedef intptr_t atomic_long; -typedef intptr_t atomic_ulong; -typedef intptr_t atomic_llong; -typedef intptr_t atomic_ullong; -typedef intptr_t atomic_wchar_t; -typedef intptr_t atomic_int_least8_t; -typedef intptr_t atomic_uint_least8_t; -typedef intptr_t atomic_int_least16_t; -typedef intptr_t atomic_uint_least16_t; -typedef intptr_t atomic_int_least32_t; -typedef intptr_t atomic_uint_least32_t; -typedef intptr_t atomic_int_least64_t; -typedef intptr_t atomic_uint_least64_t; -typedef intptr_t atomic_int_fast8_t; -typedef intptr_t atomic_uint_fast8_t; -typedef intptr_t atomic_int_fast16_t; -typedef intptr_t atomic_uint_fast16_t; -typedef intptr_t atomic_int_fast32_t; -typedef intptr_t atomic_uint_fast32_t; -typedef intptr_t atomic_int_fast64_t; -typedef intptr_t atomic_uint_fast64_t; -typedef intptr_t atomic_intptr_t; -typedef intptr_t atomic_uintptr_t; -typedef intptr_t atomic_size_t; -typedef intptr_t atomic_ptrdiff_t; -typedef intptr_t atomic_intmax_t; -typedef intptr_t atomic_uintmax_t; - -static inline void atomic_store(intptr_t *object, intptr_t desired) -{ - *object = desired; - __machine_rw_barrier(); -} - -#define atomic_store_explicit(object, desired, order) \ - atomic_store(object, desired) - -static inline intptr_t atomic_load(intptr_t *object) -{ - __machine_rw_barrier(); - return *object; -} - -#define atomic_load_explicit(object, order) \ - atomic_load(object) - -#define atomic_exchange(object, desired) \ - atomic_swap_ptr(object, desired) - -#define atomic_exchange_explicit(object, desired, order) \ - atomic_exchange(object, desired) - -static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *expected, - intptr_t desired) -{ - intptr_t old = *expected; - *expected = (intptr_t)atomic_cas_ptr(object, (void *)old, (void *)desired); - return *expected == old; -} - -#define atomic_compare_exchange_strong_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak(object, expected, desired) \ - atomic_compare_exchange_strong(object, expected, desired) - -#define atomic_compare_exchange_weak_explicit(object, expected, desired, success, failure) \ - atomic_compare_exchange_weak(object, expected, desired) - -static inline intptr_t atomic_fetch_add(intptr_t *object, intptr_t operand) -{ - return atomic_add_ptr_nv(object, operand) - operand; -} - -#define atomic_fetch_sub(object, operand) \ - atomic_fetch_add(object, -(operand)) - -static inline intptr_t atomic_fetch_or(intptr_t *object, intptr_t operand) -{ - intptr_t old; - do { - old = atomic_load(object); - } while (!atomic_compare_exchange_strong(object, old, old | operand)); - return old; -} - -static inline intptr_t atomic_fetch_xor(intptr_t *object, intptr_t operand) -{ - intptr_t old; - do { - old = atomic_load(object); - } while (!atomic_compare_exchange_strong(object, old, old ^ operand)); - return old; -} - -static inline intptr_t atomic_fetch_and(intptr_t *object, intptr_t operand) -{ - intptr_t old; - do { - old = atomic_load(object); - } while (!atomic_compare_exchange_strong(object, old, old & operand)); - return old; -} - -#define atomic_fetch_add_explicit(object, operand, order) \ - atomic_fetch_add(object, operand) - -#define atomic_fetch_sub_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) - -#define atomic_fetch_or_explicit(object, operand, order) \ - atomic_fetch_or(object, operand) - -#define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_xor(object, operand) - -#define atomic_fetch_and_explicit(object, operand, order) \ - atomic_fetch_and(object, operand) - -#define atomic_flag_test_and_set(object) \ - atomic_exchange(object, 1) - -#define atomic_flag_test_and_set_explicit(object, order) \ - atomic_flag_test_and_set(object) - -#define atomic_flag_clear(object) \ - atomic_store(object, 0) - -#define atomic_flag_clear_explicit(object, order) \ - atomic_flag_clear(object) - -#endif /* COMPAT_ATOMICS_SUNCC_STDATOMIC_H */ diff --git a/mythtv/external/FFmpeg/compat/atomics/win32/stdatomic.h b/mythtv/external/FFmpeg/compat/atomics/win32/stdatomic.h index 28a627bfd3d..4f8ac2bb600 100644 --- a/mythtv/external/FFmpeg/compat/atomics/win32/stdatomic.h +++ b/mythtv/external/FFmpeg/compat/atomics/win32/stdatomic.h @@ -19,7 +19,6 @@ #ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H #define COMPAT_ATOMICS_WIN32_STDATOMIC_H -#define WIN32_LEAN_AND_MEAN #include #include #include diff --git a/mythtv/external/FFmpeg/compat/cuda/cuda_runtime.h b/mythtv/external/FFmpeg/compat/cuda/cuda_runtime.h index 5837c1ad377..699c4b6c75b 100644 --- a/mythtv/external/FFmpeg/compat/cuda/cuda_runtime.h +++ b/mythtv/external/FFmpeg/compat/cuda/cuda_runtime.h @@ -187,5 +187,6 @@ static inline __device__ float __saturatef(float a) { return __nvvm_saturate_f(a static inline __device__ float __sinf(float a) { return __nvvm_sin_approx_f(a); } static inline __device__ float __cosf(float a) { return __nvvm_cos_approx_f(a); } static inline __device__ float __expf(float a) { return __nvvm_ex2_approx_f(a * (float)__builtin_log2(__builtin_exp(1))); } +static inline __device__ float __powf(float a, float b) { return __nvvm_ex2_approx_f(__nvvm_lg2_approx_f(a) * b); } #endif /* COMPAT_CUDA_CUDA_RUNTIME_H */ diff --git a/mythtv/external/FFmpeg/compat/stdbit/stdbit.h b/mythtv/external/FFmpeg/compat/stdbit/stdbit.h new file mode 100644 index 00000000000..53419cf9f93 --- /dev/null +++ b/mythtv/external/FFmpeg/compat/stdbit/stdbit.h @@ -0,0 +1,599 @@ +/* + * Copyright (C) 2023 Rémi Denis-Courmont + * + * This program 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 program 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 program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + */ + +#ifndef __STDC_VERSION_STDBIT_H__ +#define __STDC_VERSION_STDBIT_H__ 202311L + +#include +#include /* CHAR_BIT */ + +#define __STDC_ENDIAN_LITTLE__ 1234 +#define __STDC_ENDIAN_BIG__ 4321 + +#ifdef __BYTE_ORDER__ +# if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) +# define __STDC_ENDIAN_NATIVE__ __STDC_ENDIAN_LITTLE__ +# elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define __STDC_ENDIAN_NATIVE__ __STDC_ENDIAN_BIG__ +# else +# define __STDC_ENDIAN_NATIVE__ 3412 +# endif +#elif defined(_MSC_VER) +# define __STDC_ENDIAN_NATIVE__ __STDC_ENDIAN_LITTLE__ +#else +# error Not implemented. +#endif + +#define __stdbit_generic_type_func(func, value) \ + _Generic (value, \ + unsigned long long: stdc_##func##_ull((unsigned long long)(value)), \ + unsigned long: stdc_##func##_ul((unsigned long)(value)), \ + unsigned int: stdc_##func##_ui((unsigned int)(value)), \ + unsigned short: stdc_##func##_us((unsigned short)(value)), \ + unsigned char: stdc_##func##_uc((unsigned char)(value))) + +#if defined (__GNUC__) || defined (__clang__) +static inline unsigned int stdc_leading_zeros_ull(unsigned long long value) +{ + return value ? __builtin_clzll(value) : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_ul(unsigned long value) +{ + return value ? __builtin_clzl(value) : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_ui(unsigned int value) +{ + return value ? __builtin_clz(value) : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_us(unsigned short value) +{ + return stdc_leading_zeros_ui(value) + - CHAR_BIT * (sizeof (int) - sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_uc(unsigned char value) +{ + return stdc_leading_zeros_ui(value) - (CHAR_BIT * (sizeof (int) - 1)); +} +#else +static inline unsigned int __stdc_leading_zeros(unsigned long long value, + unsigned int size) +{ + unsigned int zeros = size * CHAR_BIT; + + while (value != 0) { + value >>= 1; + zeros--; + } + + return zeros; +} + +static inline unsigned int stdc_leading_zeros_ull(unsigned long long value) +{ + return __stdc_leading_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_ul(unsigned long value) +{ + return __stdc_leading_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_ui(unsigned int value) +{ + return __stdc_leading_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_us(unsigned short value) +{ + return __stdc_leading_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_leading_zeros_uc(unsigned char value) +{ + return __stdc_leading_zeros(value, sizeof (value)); +} +#endif + +#define stdc_leading_zeros(value) \ + __stdbit_generic_type_func(leading_zeros, value) + +static inline unsigned int stdc_leading_ones_ull(unsigned long long value) +{ + return stdc_leading_zeros_ull(~value); +} + +static inline unsigned int stdc_leading_ones_ul(unsigned long value) +{ + return stdc_leading_zeros_ul(~value); +} + +static inline unsigned int stdc_leading_ones_ui(unsigned int value) +{ + return stdc_leading_zeros_ui(~value); +} + +static inline unsigned int stdc_leading_ones_us(unsigned short value) +{ + return stdc_leading_zeros_us(~value); +} + +static inline unsigned int stdc_leading_ones_uc(unsigned char value) +{ + return stdc_leading_zeros_uc(~value); +} + +#define stdc_leading_ones(value) \ + __stdbit_generic_type_func(leading_ones, value) + +#if defined (__GNUC__) || defined (__clang__) +static inline unsigned int stdc_trailing_zeros_ull(unsigned long long value) +{ + return value ? (unsigned int)__builtin_ctzll(value) + : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_ul(unsigned long value) +{ + return value ? (unsigned int)__builtin_ctzl(value) + : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_ui(unsigned int value) +{ + return value ? (unsigned int)__builtin_ctz(value) + : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_us(unsigned short value) +{ + return value ? (unsigned int)__builtin_ctz(value) + : (CHAR_BIT * sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_uc(unsigned char value) +{ + return value ? (unsigned int)__builtin_ctz(value) + : (CHAR_BIT * sizeof (value)); +} +#else +static inline unsigned int __stdc_trailing_zeros(unsigned long long value, + unsigned int size) +{ + unsigned int zeros = 0; + + if (!value) + return size * CHAR_BIT; + + while ((value & 1) == 0) { + value >>= 1; + zeros++; + } + + return zeros; +} + +static inline unsigned int stdc_trailing_zeros_ull(unsigned long long value) +{ + return __stdc_trailing_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_ul(unsigned long value) +{ + return __stdc_trailing_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_ui(unsigned int value) +{ + return __stdc_trailing_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_us(unsigned short value) +{ + return __stdc_trailing_zeros(value, sizeof (value)); +} + +static inline unsigned int stdc_trailing_zeros_uc(unsigned char value) +{ + return __stdc_trailing_zeros(value, sizeof (value)); +} +#endif + +#define stdc_trailing_zeros(value) \ + __stdbit_generic_type_func(trailing_zeros, value) + +static inline unsigned int stdc_trailing_ones_ull(unsigned long long value) +{ + return stdc_trailing_zeros_ull(~value); +} + +static inline unsigned int stdc_trailing_ones_ul(unsigned long value) +{ + return stdc_trailing_zeros_ul(~value); +} + +static inline unsigned int stdc_trailing_ones_ui(unsigned int value) +{ + return stdc_trailing_zeros_ui(~value); +} + +static inline unsigned int stdc_trailing_ones_us(unsigned short value) +{ + return stdc_trailing_zeros_us(~value); +} + +static inline unsigned int stdc_trailing_ones_uc(unsigned char value) +{ + return stdc_trailing_zeros_uc(~value); +} + +#define stdc_trailing_ones(value) \ + __stdbit_generic_type_func(trailing_ones, value) + +static inline unsigned int stdc_first_leading_one_ull(unsigned long long value) +{ + return value ? (stdc_leading_zeros_ull(value) + 1) : 0; +} + +static inline unsigned int stdc_first_leading_one_ul(unsigned long value) +{ + return value ? (stdc_leading_zeros_ul(value) + 1) : 0; +} + +static inline unsigned int stdc_first_leading_one_ui(unsigned int value) +{ + return value ? (stdc_leading_zeros_ui(value) + 1) : 0; +} + +static inline unsigned int stdc_first_leading_one_us(unsigned short value) +{ + return value ? (stdc_leading_zeros_us(value) + 1) : 0; +} + +static inline unsigned int stdc_first_leading_one_uc(unsigned char value) +{ + return value ? (stdc_leading_zeros_uc(value) + 1) : 0; +} + +#define stdc_first_leading_one(value) \ + __stdbit_generic_type_func(first_leading_one, value) + +static inline unsigned int stdc_first_leading_zero_ull(unsigned long long value) +{ + return stdc_leading_ones_ull(~value); +} + +static inline unsigned int stdc_first_leading_zero_ul(unsigned long value) +{ + return stdc_leading_ones_ul(~value); +} + +static inline unsigned int stdc_first_leading_zero_ui(unsigned int value) +{ + return stdc_leading_ones_ui(~value); +} + +static inline unsigned int stdc_first_leading_zero_us(unsigned short value) +{ + return stdc_leading_ones_us(~value); +} + +static inline unsigned int stdc_first_leading_zero_uc(unsigned char value) +{ + return stdc_leading_ones_uc(~value); +} + +#define stdc_first_leading_zero(value) \ + __stdbit_generic_type_func(first_leading_zero, value) + +#if defined (__GNUC__) || defined (__clang__) +static inline unsigned int stdc_first_trailing_one_ull(unsigned long long value) +{ + return __builtin_ffsll(value); +} + +static inline unsigned int stdc_first_trailing_one_ul(unsigned long value) +{ + return __builtin_ffsl(value); +} + +static inline unsigned int stdc_first_trailing_one_ui(unsigned int value) +{ + return __builtin_ffs(value); +} + +static inline unsigned int stdc_first_trailing_one_us(unsigned short value) +{ + return __builtin_ffs(value); +} + +static inline unsigned int stdc_first_trailing_one_uc(unsigned char value) +{ + return __builtin_ffs(value); +} +#else +static inline unsigned int stdc_first_trailing_one_ull(unsigned long long value) +{ + return value ? (1 + stdc_trailing_zeros_ull(value)) : 0; +} + +static inline unsigned int stdc_first_trailing_one_ul(unsigned long value) +{ + return value ? (1 + stdc_trailing_zeros_ul(value)) : 0; +} + +static inline unsigned int stdc_first_trailing_one_ui(unsigned int value) +{ + return value ? (1 + stdc_trailing_zeros_ui(value)) : 0; +} + +static inline unsigned int stdc_first_trailing_one_us(unsigned short value) +{ + return value ? (1 + stdc_trailing_zeros_us(value)) : 0; +} + +static inline unsigned int stdc_first_trailing_one_uc(unsigned char value) +{ + return value ? (1 + stdc_trailing_zeros_uc(value)) : 0; +} +#endif + +#define stdc_first_trailing_one(value) \ + __stdbit_generic_type_func(first_trailing_one, value) + +static inline unsigned int stdc_first_trailing_zero_ull(unsigned long long value) +{ + return stdc_first_trailing_one_ull(~value); +} + +static inline unsigned int stdc_first_trailing_zero_ul(unsigned long value) +{ + return stdc_first_trailing_one_ul(~value); +} + +static inline unsigned int stdc_first_trailing_zero_ui(unsigned int value) +{ + return stdc_first_trailing_one_ui(~value); +} + +static inline unsigned int stdc_first_trailing_zero_us(unsigned short value) +{ + return stdc_first_trailing_one_us(~value); +} + +static inline unsigned int stdc_first_trailing_zero_uc(unsigned char value) +{ + return stdc_first_trailing_one_uc(~value); +} + +#define stdc_first_trailing_zero(value) \ + __stdbit_generic_type_func(first_trailing_zero, value) + +#if defined (__GNUC__) || defined (__clang__) +static inline unsigned int stdc_count_ones_ull(unsigned long long value) +{ + return __builtin_popcountll(value); +} + +static inline unsigned int stdc_count_ones_ul(unsigned long value) +{ + return __builtin_popcountl(value); +} + +static inline unsigned int stdc_count_ones_ui(unsigned int value) +{ + return __builtin_popcount(value); +} + +static inline unsigned int stdc_count_ones_us(unsigned short value) +{ + return __builtin_popcount(value); +} + +static inline unsigned int stdc_count_ones_uc(unsigned char value) +{ + return __builtin_popcount(value); +} +#else +static inline unsigned int __stdc_count_ones(unsigned long long value, + unsigned int size) +{ + unsigned int ones = 0; + + for (unsigned int c = 0; c < (size * CHAR_BIT); c++) { + ones += value & 1; + value >>= 1; + } + + return ones; +} + +static inline unsigned int stdc_count_ones_ull(unsigned long long value) +{ + return __stdc_count_ones(value, sizeof (value)); +} + +static inline unsigned int stdc_count_ones_ul(unsigned long value) +{ + return __stdc_count_ones(value, sizeof (value)); +} + +static inline unsigned int stdc_count_ones_ui(unsigned int value) +{ + return __stdc_count_ones(value, sizeof (value)); +} + +static inline unsigned int stdc_count_ones_us(unsigned short value) +{ + return __stdc_count_ones(value, sizeof (value)); +} + +static inline unsigned int stdc_count_ones_uc(unsigned char value) +{ + return __stdc_count_ones(value, sizeof (value)); +} +#endif + +#define stdc_count_ones(value) \ + __stdbit_generic_type_func(count_ones, value) + +static inline unsigned int stdc_count_zeros_ull(unsigned long long value) +{ + return stdc_count_ones_ull(~value); +} + +static inline unsigned int stdc_count_zeros_ul(unsigned long value) +{ + return stdc_count_ones_ul(~value); +} + +static inline unsigned int stdc_count_zeros_ui(unsigned int value) +{ + return stdc_count_ones_ui(~value); +} + +static inline unsigned int stdc_count_zeros_us(unsigned short value) +{ + return stdc_count_ones_us(~value); +} + +static inline unsigned int stdc_count_zeros_uc(unsigned char value) +{ + return stdc_count_ones_uc(~value); +} + +#define stdc_count_zeros(value) \ + __stdbit_generic_type_func(count_zeros, value) + +static inline bool stdc_has_single_bit_ull(unsigned long long value) +{ + return value && (value & (value - 1)) == 0; +} + +static inline bool stdc_has_single_bit_ul(unsigned long value) +{ + return value && (value & (value - 1)) == 0; +} + +static inline bool stdc_has_single_bit_ui(unsigned int value) +{ + return value && (value & (value - 1)) == 0; +} + +static inline bool stdc_has_single_bit_us(unsigned short value) +{ + return value && (value & (value - 1)) == 0; +} + +static inline bool stdc_has_single_bit_uc(unsigned char value) +{ + return value && (value & (value - 1)) == 0; +} + +#define stdc_has_single_bit(value) \ + __stdbit_generic_type_func(has_single_bit, value) + +static inline unsigned int stdc_bit_width_ull(unsigned long long value) +{ + return (CHAR_BIT * sizeof (value)) - stdc_leading_zeros_ull(value); +} + +static inline unsigned int stdc_bit_width_ul(unsigned long value) +{ + return (CHAR_BIT * sizeof (value)) - stdc_leading_zeros_ul(value); +} + +static inline unsigned int stdc_bit_width_ui(unsigned int value) +{ + return (CHAR_BIT * sizeof (value)) - stdc_leading_zeros_ui(value); +} + +static inline unsigned int stdc_bit_width_us(unsigned short value) +{ + return (CHAR_BIT * sizeof (value)) - stdc_leading_zeros_us(value); +} + +static inline unsigned int stdc_bit_width_uc(unsigned char value) +{ + return (CHAR_BIT * sizeof (value)) - stdc_leading_zeros_uc(value); +} + +#define stdc_bit_width(value) \ + __stdbit_generic_type_func(bit_width, value) + +static inline unsigned long long stdc_bit_floor_ull(unsigned long long value) +{ + return value ? (1ULL << (stdc_bit_width_ull(value) - 1)) : 0ULL; +} + +static inline unsigned long stdc_bit_floor_ul(unsigned long value) +{ + return value ? (1UL << (stdc_bit_width_ul(value) - 1)) : 0UL; +} + +static inline unsigned int stdc_bit_floor_ui(unsigned int value) +{ + return value ? (1U << (stdc_bit_width_ui(value) - 1)) : 0U; +} + +static inline unsigned short stdc_bit_floor_us(unsigned short value) +{ + return value ? (1U << (stdc_bit_width_us(value) - 1)) : 0U; +} + +static inline unsigned int stdc_bit_floor_uc(unsigned char value) +{ + return value ? (1U << (stdc_bit_width_uc(value) - 1)) : 0U; +} + +#define stdc_bit_floor(value) \ + __stdbit_generic_type_func(bit_floor, value) + +/* NOTE: Bit ceiling undefines overflow. */ +static inline unsigned long long stdc_bit_ceil_ull(unsigned long long value) +{ + return 1ULL << (value ? stdc_bit_width_ull(value - 1) : 0); +} + +static inline unsigned long stdc_bit_ceil_ul(unsigned long value) +{ + return 1UL << (value ? stdc_bit_width_ul(value - 1) : 0); +} + +static inline unsigned int stdc_bit_ceil_ui(unsigned int value) +{ + return 1U << (value ? stdc_bit_width_ui(value - 1) : 0); +} + +static inline unsigned short stdc_bit_ceil_us(unsigned short value) +{ + return 1U << (value ? stdc_bit_width_us(value - 1) : 0); +} + +static inline unsigned int stdc_bit_ceil_uc(unsigned char value) +{ + return 1U << (value ? stdc_bit_width_uc(value - 1) : 0); +} + +#define stdc_bit_ceil(value) \ + __stdbit_generic_type_func(bit_ceil, value) + +#endif /* __STDC_VERSION_STDBIT_H__ */ diff --git a/mythtv/external/FFmpeg/compat/w32dlfcn.h b/mythtv/external/FFmpeg/compat/w32dlfcn.h index fb1aa1b72eb..ac20e83a7a8 100644 --- a/mythtv/external/FFmpeg/compat/w32dlfcn.h +++ b/mythtv/external/FFmpeg/compat/w32dlfcn.h @@ -26,6 +26,7 @@ #include "config.h" #include "libavutil/macros.h" +#include "libavutil/mem.h" #include "libavutil/wchar_filename.h" static inline wchar_t *get_module_filename(HMODULE module) diff --git a/mythtv/external/FFmpeg/compat/w32pthreads.h b/mythtv/external/FFmpeg/compat/w32pthreads.h index 6405e72b64f..2ff97352277 100644 --- a/mythtv/external/FFmpeg/compat/w32pthreads.h +++ b/mythtv/external/FFmpeg/compat/w32pthreads.h @@ -35,7 +35,6 @@ * As most functions here are used without checking return values, * only implement return values as necessary. */ -#define WIN32_LEAN_AND_MEAN #include #include #include @@ -66,7 +65,14 @@ typedef CONDITION_VARIABLE pthread_cond_t; #define PTHREAD_CANCEL_ENABLE 1 #define PTHREAD_CANCEL_DISABLE 0 -static av_unused unsigned __stdcall attribute_align_arg win32thread_worker(void *arg) +#if HAVE_WINRT +#define THREADFUNC_RETTYPE DWORD +#else +#define THREADFUNC_RETTYPE unsigned +#endif + +static av_unused THREADFUNC_RETTYPE +__stdcall attribute_align_arg win32thread_worker(void *arg) { pthread_t *h = (pthread_t*)arg; h->ret = h->func(h->arg); diff --git a/mythtv/external/FFmpeg/compat/windows/mswindres b/mythtv/external/FFmpeg/compat/windows/mswindres new file mode 100755 index 00000000000..8c14c96bae4 --- /dev/null +++ b/mythtv/external/FFmpeg/compat/windows/mswindres @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$1" = "--version" ]; then + rc.exe -? + exit $? +fi + +if [ $# -lt 2 ]; then + echo "Usage: mswindres [-I/include/path ...] [-DSOME_DEFINE ...] [-o output.o] input.rc [output.o]" >&2 + exit 0 +fi + +EXTRA_OPTS="-nologo" + +while [ $# -gt 2 ]; do + case $1 in + -D*) EXTRA_OPTS="$EXTRA_OPTS -d$(echo $1 | sed -e "s/^..//" -e "s/ /\\\\ /g")" ;; + -I*) EXTRA_OPTS="$EXTRA_OPTS -i$(echo $1 | sed -e "s/^..//" -e "s/ /\\\\ /g")" ;; + -o) OPT_OUT="$2"; shift ;; + esac + shift +done + +IN="$1" +if [ -z "$OPT_OUT" ]; then + OUT="$2" +else + OUT="$OPT_OUT" +fi + +eval set -- $EXTRA_OPTS +rc.exe "$@" -fo "$OUT" "$IN" diff --git a/mythtv/external/FFmpeg/configure b/mythtv/external/FFmpeg/configure index 6ca909c49c3..2bc1a73e8a6 100755 --- a/mythtv/external/FFmpeg/configure +++ b/mythtv/external/FFmpeg/configure @@ -136,14 +136,11 @@ Component options: --disable-w32threads disable Win32 threads [autodetect] --disable-os2threads disable OS/2 threads [autodetect] --disable-network disable network support [no] - --disable-dct disable DCT code --disable-dwt disable DWT code --disable-error-resilience disable error resilience code --disable-lsp disable LSP code - --disable-mdct disable MDCT code - --disable-rdft disable RDFT code - --disable-fft disable FFT code --disable-faan disable floating point AAN (I)DCT code + --disable-iamf disable support for Immersive Audio Model --disable-pixelutils disable pixel utils in libavutil Individual component options: @@ -218,6 +215,7 @@ External library support: --enable-lcms2 enable ICC profile support via LittleCMS 2 [no] --enable-libaom enable AV1 video encoding/decoding via libaom [no] --enable-libaribb24 enable ARIB text and caption decoding via libaribb24 [no] + --enable-libaribcaption enable ARIB text and caption decoding via libaribcaption [no] --enable-libass enable libass subtitles rendering, needed for subtitles and ass filter [no] --enable-libbluray enable BluRay reading using libbluray [no] @@ -230,11 +228,14 @@ External library support: --enable-libdavs2 enable AVS2 decoding via libdavs2 [no] --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [no] + --enable-libdvdnav enable libdvdnav, needed for DVD demuxing [no] + --enable-libdvdread enable libdvdread, needed for DVD demuxing [no] --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] --enable-libflite enable flite (voice synthesis) support via libflite [no] --enable-libfontconfig enable libfontconfig, useful for drawtext filter [no] --enable-libfreetype enable libfreetype, needed for drawtext filter [no] --enable-libfribidi enable libfribidi, improves drawtext filter [no] + --enable-libharfbuzz enable libharfbuzz, needed for drawtext filter [no] --enable-libglslang enable GLSL->SPIRV compilation via libglslang [no] --enable-libgme enable Game Music Emu via libgme [no] --enable-libgsm enable GSM de/encoding via libgsm [no] @@ -244,6 +245,8 @@ External library support: --enable-libjxl enable JPEG XL de/encoding via libjxl [no] --enable-libklvanc enable Kernel Labs VANC processing [no] --enable-libkvazaar enable HEVC encoding via libkvazaar [no] + --enable-liblc3 enable LC3 de/encoding via liblc3 [no] + --enable-liblcevc-dec enable LCEVC decoding via liblcevc-dec [no] --enable-liblensfun enable lensfun lens correction [no] --enable-libmodplug enable ModPlug via libmodplug [no] --enable-libmp3lame enable MP3 encoding via libmp3lame [no] @@ -251,13 +254,15 @@ External library support: --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] --enable-libopencv enable video filtering via libopencv [no] --enable-libopenh264 enable H.264 encoding via OpenH264 [no] - --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] + --enable-libopenjpeg enable JPEG 2000 encoding via OpenJPEG [no] --enable-libopenmpt enable decoding tracked files via libopenmpt [no] --enable-libopenvino enable OpenVINO as a DNN module backend for DNN based filters like dnn_processing [no] --enable-libopus enable Opus de/encoding via libopus [no] --enable-libplacebo enable libplacebo library [no] --enable-libpulse enable Pulseaudio input via libpulse [no] + --enable-libqrencode enable QR encode generation via libqrencode [no] + --enable-libquirc enable QR decoding via libquirc [no] --enable-librabbitmq enable RabbitMQ library [no] --enable-librav1e enable AV1 encoding via rav1e [no] --enable-librist enable RIST via librist [no] @@ -279,6 +284,7 @@ External library support: --enable-libtheora enable Theora encoding via libtheora [no] --enable-libtls enable LibreSSL (via libtls), needed for https support if openssl, gnutls or mbedtls is not used [no] + --enable-libtorch enable Torch as one DNN backend [no] --enable-libtwolame enable MP2 encoding via libtwolame [no] --enable-libuavs3d enable AVS3 decoding via libuavs3d [no] --enable-libv4l2 enable libv4l2/v4l-utils [no] @@ -288,9 +294,12 @@ External library support: --enable-libvorbis enable Vorbis en/decoding via libvorbis, native implementation exists [no] --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no] + --enable-libvvenc enable H.266/VVC encoding via vvenc [no] --enable-libwebp enable WebP encoding via libwebp [no] --enable-libx264 enable H.264 encoding via x264 [no] --enable-libx265 enable HEVC encoding via x265 [no] + --enable-libxeve enable EVC encoding via libxeve [no] + --enable-libxevd enable EVC decoding via libxevd [no] --enable-libxavs enable AVS encoding via xavs [no] --enable-libxavs2 enable AVS2 encoding via xavs2 [no] --enable-libxcb enable X11 grabbing using XCB [autodetect] @@ -326,7 +335,6 @@ External library support: --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] --enable-vapoursynth enable VapourSynth demuxer [no] - --disable-vulkan disable Vulkan code [autodetect] --disable-xlib disable xlib [autodetect] --disable-zlib disable zlib [autodetect] @@ -337,10 +345,12 @@ External library support: --disable-cuda-llvm disable CUDA compilation using clang [autodetect] --disable-cuvid disable Nvidia CUVID support [autodetect] --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect] + --disable-d3d12va disable Microsoft Direct3D 12 video acceleration code [autodetect] --disable-dxva2 disable Microsoft DirectX 9 video acceleration code [autodetect] --disable-ffnvcodec disable dynamically linked Nvidia code [autodetect] - --enable-libdrm enable DRM code (Linux) [no] + --disable-libdrm disable DRM code (Linux) [autodetect] --enable-libmfx enable Intel MediaSDK (AKA Quick Sync Video) code via libmfx [no] + --enable-libvpl enable Intel oneVPL code via libvpl if libmfx is not used [no] --enable-libnpp enable Nvidia Performance Primitives-based code [no] --enable-mmal enable Broadcom Multi-Media Abstraction Layer (Raspberry Pi) via MMAL [no] --disable-nvdec disable Nvidia video decoding acceleration (via hwaccel) [autodetect] @@ -352,6 +362,7 @@ External library support: --disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect] --disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect] --disable-videotoolbox disable VideoToolbox code [autodetect] + --disable-vulkan disable Vulkan code [autodetect] Toolchain options: --arch=ARCH select architecture [$arch] @@ -380,7 +391,9 @@ Toolchain options: --windres=WINDRES use windows resource compiler WINDRES [$windres_default] --x86asmexe=EXE use nasm-compatible assembler EXE [$x86asmexe_default] --cc=CC use C compiler CC [$cc_default] + --stdc=STDC use C standard STDC [$stdc_default] --cxx=CXX use C compiler CXX [$cxx_default] + --stdcxx=STDCXX use C standard STDCXX [$stdcxx_default] --objcc=OCC use ObjC compiler OCC [$cc_default] --dep-cc=DEPCC use dependency generator DEPCC [$cc_default] --nvcc=NVCC use Nvidia CUDA compiler NVCC or clang [$nvcc_default] @@ -411,7 +424,7 @@ Toolchain options: --build-suffix=SUFFIX library name suffix [] --enable-pic build position-independent code --enable-thumb compile for Thumb instruction set - --enable-lto use link-time optimization + --enable-lto[=arg] use link-time optimization --env="ENV=override" override the environment variables Advanced options (experts only): @@ -452,6 +465,8 @@ Optimization options (experts only): --disable-armv6t2 disable armv6t2 optimizations --disable-vfp disable VFP optimizations --disable-neon disable NEON optimizations + --disable-dotprod disable DOTPROD optimizations + --disable-i8mm disable I8MM optimizations --disable-inline-asm disable use of inline assembly --disable-x86asm disable use of standalone x86 assembly --disable-mipsdsp disable MIPS DSP ASE R1 optimizations @@ -461,6 +476,7 @@ Optimization options (experts only): --disable-mmi disable Loongson MMI optimizations --disable-lsx disable Loongson LSX optimizations --disable-lasx disable Loongson LASX optimizations + --disable-rvv disable RISC-V Vector optimizations --disable-fast-unaligned consider unaligned accesses slow Developer options (useful when working on FFmpeg itself): @@ -500,6 +516,7 @@ Developer options (useful when working on FFmpeg itself): --enable-macos-kperf enable macOS kperf (private) API --disable-large-tests disable tests that use a large amount of memory --disable-ptx-compression don't compress CUDA PTX code even when possible + --disable-version-tracking don't include the git/release version in the build NOTE: Object files are built at the place where configure is launched. EOF @@ -1151,6 +1168,43 @@ check_insn(){ check_as ${1}_external "$2" } +check_arch_level(){ + log check_arch_level "$@" + level="$1" + check_as tested_arch_level ".arch $level" + enabled tested_arch_level && as_arch_level="$level" +} + +check_archext_insn(){ + log check_archext_insn "$@" + feature="$1" + instr="$2" + # Check if the assembly is accepted in inline assembly. + check_inline_asm ${feature}_inline "\"$instr\"" + # We don't check if the instruction is supported out of the box by the + # external assembler (we don't try to set ${feature}_external) as we don't + # need to use these instructions in non-runtime detected codepaths. + + disable $feature + + enabled as_arch_directive && arch_directive=".arch $as_arch_level" || arch_directive="" + + # Test if the assembler supports the .arch_extension $feature directive. + arch_extension_directive=".arch_extension $feature" + test_as < -#include -float foo(complex float f, complex float g) { return $func($args); } -int main(void){ return (int) foo; } -EOF -} - check_mathfunc(){ log check_mathfunc "$@" func=$1 @@ -1421,6 +1460,33 @@ test_cflags_cc(){ EOF } +check_cflags_cc(){ + log check_cflags_cc "$@" + flags=$1 + test_cflags_cc "$@" && add_cflags $flags +} + +test_cxxflags_cc(){ + log test_cxxflags_cc "$@" + flags=$1 + header=$2 + condition=$3 + shift 3 + set -- $($cflags_filter "$flags") + test_cxx "$@" < +#if !($condition) +#error "unsatisfied condition: $condition" +#endif +EOF +} + +check_cxxflags_cc(){ + log check_cxxflags_cc "$@" + flags=$1 + test_cxxflags_cc "$@" && add_cxxflags $flags +} + check_lib(){ log check_lib "$@" name="$1" @@ -1662,6 +1728,27 @@ int x; EOF } +test_host_cflags_cc(){ + log test_host_cflags_cc "$@" + flags=$1 + header=$2 + condition=$3 + shift 3 + set -- $($host_cflags_filter "$flags") + test_host_cc "$@" < +#if !($condition) +#error "unsatisfied condition: $condition" +#endif +EOF +} + +check_host_cflags_cc(){ + log check_host_cflags_cc "$@" + flags=$1 + test_host_cflags_cc "$@" && add_host_cflags $flags +} + test_host_cpp_condition(){ log test_host_cpp_condition "$@" header=$1 @@ -1723,29 +1810,30 @@ COMPONENT_LIST=" " EXAMPLE_LIST=" + avio_http_serve_files_example avio_list_dir_example - avio_reading_example + avio_read_callback_example decode_audio_example + decode_filter_audio_example + decode_filter_video_example decode_video_example - demuxing_decoding_example + demux_decode_example encode_audio_example encode_video_example extract_mvs_example filter_audio_example - filtering_audio_example - filtering_video_example - http_multiclient_example hw_decode_example - metadata_example - muxing_example - qsvdec_example - remuxing_example - resampling_audio_example - scaling_video_example + mux_example + qsv_decode_example + remux_example + resample_audio_example + scale_video_example + show_metadata_example transcode_aac_example - transcoding_example + transcode_example vaapi_encode_example vaapi_transcode_example + qsv_transcode_example " EXTERNAL_AUTODETECT_LIBRARY_LIST=" @@ -1775,6 +1863,8 @@ EXTERNAL_LIBRARY_GPL_LIST=" frei0r libcdio libdavs2 + libdvdnav + libdvdread librubberband libvidstab libx264 @@ -1817,6 +1907,7 @@ EXTERNAL_LIBRARY_LIST=" ladspa lcms2 libaom + libaribcaption libass libbluray libbs2b @@ -1825,11 +1916,11 @@ EXTERNAL_LIBRARY_LIST=" libcodec2 libdav1d libdc1394 - libdrm libflite libfontconfig libfreetype libfribidi + libharfbuzz libglslang libgme libgsm @@ -1839,6 +1930,8 @@ EXTERNAL_LIBRARY_LIST=" libjxl libklvanc libkvazaar + liblc3 + liblcevc_dec libmodplug libmp3lame libmysofa @@ -1850,6 +1943,8 @@ EXTERNAL_LIBRARY_LIST=" libopus libplacebo libpulse + libqrencode + libquirc librabbitmq librav1e librist @@ -1867,13 +1962,17 @@ EXTERNAL_LIBRARY_LIST=" libtensorflow libtesseract libtheora + libtorch libtwolame libuavs3d libv4l2 libvmaf libvorbis libvpx + libvvenc libwebp + libxevd + libxeve libxml2 libzimg libzmq @@ -1890,13 +1989,14 @@ EXTERNAL_LIBRARY_LIST=" HWACCEL_AUTODETECT_LIBRARY_LIST=" amf audiotoolbox - crystalhd cuda cuda_llvm cuvid d3d11va + d3d12va dxva2 ffnvcodec + libdrm nvdec nvenc vaapi @@ -1921,6 +2021,7 @@ HWACCEL_LIBRARY_NONFREE_LIST=" HWACCEL_LIBRARY_LIST=" $HWACCEL_LIBRARY_NONFREE_LIST libmfx + libvpl mmal omx opencl @@ -1972,17 +2073,14 @@ PROGRAM_LIST=" " SUBSYSTEM_LIST=" - dct dwt error_resilience faan fast_unaligned - fft + iamf lsp - mdct pixelutils network - rdft " # COMPONENT_LIST needs to come last to ensure correct dependency checking @@ -2021,8 +2119,6 @@ THREADS_LIST=" " ATOMICS_LIST=" - atomics_gcc - atomics_suncc atomics_win32 " @@ -2034,12 +2130,7 @@ AUTODETECT_LIBS=" ARCH_LIST=" aarch64 - alpha arm - avr32 - avr32_ap - avr32_uc - bfin ia64 loongarch loongarch32 @@ -2052,12 +2143,10 @@ ARCH_LIST=" ppc64 riscv s390 - sh4 sparc sparc64 tilegx tilepro - tomi x86 x86_32 x86_64 @@ -2068,6 +2157,8 @@ ARCH_EXT_LIST_ARM=" armv6 armv6t2 armv8 + dotprod + i8mm neon vfp vfpv3 @@ -2124,15 +2215,22 @@ ARCH_EXT_LIST_PPC=" vsx " +ARCH_EXT_LIST_RISCV=" + rv + rvv + rv_zicbop + rv_zvbb +" + ARCH_EXT_LIST_X86=" $ARCH_EXT_LIST_X86_SIMD - cpunop i686 " ARCH_EXT_LIST=" $ARCH_EXT_LIST_ARM $ARCH_EXT_LIST_PPC + $ARCH_EXT_LIST_RISCV $ARCH_EXT_LIST_X86 $ARCH_EXT_LIST_MIPS $ARCH_EXT_LIST_LOONGSON @@ -2143,6 +2241,7 @@ ARCH_FEATURES=" fast_64bit fast_clz fast_cmov + fast_float16 local_aligned simd_align_16 simd_align_32 @@ -2150,13 +2249,10 @@ ARCH_FEATURES=" " BUILTIN_LIST=" - atomic_cas_ptr - machine_rw_barrier MemoryBarrier mm_empty rdtsc sem_timedwait - sync_val_compare_and_swap " HAVE_LIST_CMDLINE=" inline_asm @@ -2171,6 +2267,7 @@ HAVE_LIST_PUB=" HEADERS_LIST=" arpa_inet_h + asm_hwprobe_h asm_types_h cdio_paranoia_h cdio_paranoia_paranoia_h @@ -2196,6 +2293,8 @@ HEADERS_LIST=" opencv2_core_core_c_h OpenGL_gl3_h poll_h + pthread_np_h + sys_hwprobe_h sys_param_h sys_resource_h sys_select_h @@ -2213,11 +2312,7 @@ HEADERS_LIST=" INTRINSICS_LIST=" intrinsics_neon -" - -COMPLEX_FUNCS=" - cabs - cexp + intrinsics_sse2 " MATH_FUNCS=" @@ -2265,10 +2360,11 @@ SYSTEM_FEATURES=" SYSTEM_FUNCS=" access aligned_malloc - arc4random + arc4random_buf clock_gettime closesocket CommandLineToArgvW + elf_aux_info fcntl getaddrinfo getauxval @@ -2301,7 +2397,10 @@ SYSTEM_FUNCS=" nanosleep PeekNamedPipe posix_memalign + prctl pthread_cancel + pthread_set_name_np + pthread_setname_np sched_getaffinity SecItemImport SetConsoleTextAttribute @@ -2313,6 +2412,8 @@ SYSTEM_FUNCS=" strerror_r sysconf sysctl + sysctlbyname + tempnam usleep UTGetOSTypeFromString VirtualAlloc @@ -2323,11 +2424,14 @@ SYSTEM_LIBRARIES=" bcrypt vaapi_drm vaapi_x11 + vaapi_win32 vdpau_x11 " TOOLCHAIN_FEATURES=" as_arch_directive + as_archext_dotprod_directive + as_archext_i8mm_directive as_dn_directive as_fpu_directive as_func @@ -2352,6 +2456,8 @@ TOOLCHAIN_FEATURES=" " TYPES_LIST=" + DPI_AWARENESS_CONTEXT + IDXGIOutput5 kCMVideoCodecType_HEVC kCMVideoCodecType_HEVCWithAlpha kCMVideoCodecType_VP9 @@ -2383,6 +2489,7 @@ TYPES_LIST=" struct_sockaddr_storage struct_stat_st_mtim_tv_nsec struct_v4l2_frmivalenum_discrete + struct_mfxConfigInterface " HAVE_LIST=" @@ -2391,7 +2498,6 @@ HAVE_LIST=" $(add_suffix _inline $ARCH_EXT_LIST) $ARCH_FEATURES $BUILTIN_LIST - $COMPLEX_FUNCS $HAVE_LIST_CMDLINE $HAVE_LIST_PUB $HEADERS_LIST @@ -2413,11 +2519,14 @@ HAVE_LIST=" opencl_dxva2 opencl_vaapi_beignet opencl_vaapi_intel_media + opencl_videotoolbox perl pod2man + posix_ioctl texi2html xmllint zlib_gzip + openvino2 " # options emitted with CONFIG_ prefix but not available on the command line @@ -2435,19 +2544,23 @@ CONFIG_EXTRA=" cbs_av1 cbs_h264 cbs_h265 + cbs_h266 cbs_jpeg cbs_mpeg2 + cbs_vp8 cbs_vp9 + d3d12va_encode deflate_wrapper dirac_parse dnn - dovi_rpu + dovi_rpudec + dovi_rpuenc dvprofile + evcparse exif faandct faanidct fdctdsp - flacdsp fmtconvert frame_thread_encoder g722dsp @@ -2459,21 +2572,26 @@ CONFIG_EXTRA=" h264parse h264pred h264qpel + h264_sei hevcparse + hevc_sei hpeldsp huffman huffyuvdsp huffyuvencdsp + iamfdec + iamfenc idctdsp iirfilter - mdct15 inflate_wrapper intrax8 iso_media + iso_writer ividsp jpegtables lgplv3 libx262 + libx264_hdr10 llauddsp llviddsp llvidencdsp @@ -2488,6 +2606,8 @@ CONFIG_EXTRA=" mpegvideo mpegvideodec mpegvideoenc + msmpeg4dec + msmpeg4enc mss34dsp pixblockdsp qpeldsp @@ -2516,6 +2636,7 @@ CONFIG_EXTRA=" vp3dsp vp56dsp vp8dsp + vulkan_encode wma_freqs wmv2dsp " @@ -2530,10 +2651,10 @@ CMDLINE_SELECT=" debug extra_warnings logging - lto optimizations rpath stripping + version_tracking " PATHS_LIST=" @@ -2591,6 +2712,8 @@ CMDLINE_SET=" random_seed ranlib samples + stdc + stdcxx strip sws_max_filter_size sysinclude @@ -2623,9 +2746,12 @@ armv6t2_deps="arm" armv8_deps="aarch64" neon_deps_any="aarch64 arm" intrinsics_neon_deps="neon" -vfp_deps_any="aarch64 arm" +intrinsics_sse2_deps="sse2" +vfp_deps="arm" vfpv3_deps="vfp" setend_deps="arm" +dotprod_deps="aarch64 neon" +i8mm_deps="aarch64 neon" map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM @@ -2636,6 +2762,11 @@ ppc4xx_deps="ppc" vsx_deps="altivec" power8_deps="vsx" +rv_deps="riscv" +rvv_deps="rv" +rv_zicbop="riscv" +rv_zvbb_deps="rvv" + loongson2_deps="mips" loongson3_deps="mips" mmi_deps_any="loongson2 loongson3" @@ -2652,7 +2783,6 @@ mipsdsp_deps="mips" mipsdspr2_deps="mips" msa_deps="mipsfpu" -cpunop_deps="i686" x86_64_select="i686" x86_64_suggest="fast_cmov" @@ -2688,8 +2818,8 @@ for ext in $(filter_out mmx $ARCH_EXT_LIST_X86_SIMD); do done aligned_stack_if_any="aarch64 ppc x86" -fast_64bit_if_any="aarch64 alpha ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64" -fast_clz_if_any="aarch64 alpha avr32 mips ppc x86" +fast_64bit_if_any="aarch64 ia64 mips64 parisc64 ppc64 riscv64 sparc64 x86_64" +fast_clz_if_any="aarch64 mips ppc x86" fast_unaligned_if_any="aarch64 ppc x86" simd_align_16_if_any="altivec neon sse" simd_align_32_if_any="avx" @@ -2702,8 +2832,6 @@ valgrind_backtrace_conflict="optimizations" valgrind_backtrace_deps="valgrind_valgrind_h" # threading support -atomics_gcc_if="sync_val_compare_and_swap" -atomics_suncc_if="atomic_cas_ptr machine_rw_barrier" atomics_win32_if="MemoryBarrier" atomics_native_if_any="$ATOMICS_LIST" w32threads_deps="atomics_native" @@ -2713,50 +2841,59 @@ threads_if_any="$THREADS_LIST" cbs_av1_select="cbs" cbs_h264_select="cbs" cbs_h265_select="cbs" +cbs_h266_select="cbs" cbs_jpeg_select="cbs" cbs_mpeg2_select="cbs" +cbs_vp8_select="cbs" cbs_vp9_select="cbs" -dct_select="rdft" deflate_wrapper_deps="zlib" dirac_parse_select="golomb" -dovi_rpu_select="golomb" -dnn_suggest="libtensorflow libopenvino" +dovi_rpudec_select="golomb" +dovi_rpuenc_select="golomb" dnn_deps="avformat swscale" +dnn_deps_any="libtensorflow libopenvino libtorch" error_resilience_select="me_cmp" +evcparse_select="golomb" faandct_deps="faan" faandct_select="fdctdsp" faanidct_deps="faan" faanidct_select="idctdsp" h264dsp_select="startcode" -hevcparse_select="atsc_a53 golomb" +h264parse_select="golomb" +h264_sei_select="atsc_a53 golomb" +hevcparse_select="golomb" +hevc_sei_select="atsc_a53 golomb" frame_thread_encoder_deps="encoders threads" +iamfdec_deps="iamf" +iamfdec_select="iso_media mpeg4audio" +iamfenc_deps="iamf" inflate_wrapper_deps="zlib" -intrax8_select="blockdsp idctdsp" +intrax8_select="blockdsp wmv2dsp" iso_media_select="mpeg4audio" -mdct_select="fft" -mdct15_select="fft" -me_cmp_select="fdctdsp idctdsp pixblockdsp" +me_cmp_select="idctdsp" mpeg_er_select="error_resilience" mpegaudio_select="mpegaudiodsp mpegaudioheader" -mpegaudiodsp_select="dct" -mpegvideo_select="blockdsp h264chroma hpeldsp idctdsp videodsp" -mpegvideodec_select="mpegvideo mpeg_er" -mpegvideoenc_select="aandcttables me_cmp mpegvideo pixblockdsp qpeldsp" +mpegvideo_select="blockdsp hpeldsp idctdsp videodsp" +mpegvideodec_select="h264chroma mpegvideo mpeg_er" +mpegvideoenc_select="aandcttables fdctdsp me_cmp mpegvideo pixblockdsp" +msmpeg4dec_select="h263_decoder" +msmpeg4enc_select="h263_encoder" vc1dsp_select="h264chroma qpeldsp startcode" -rdft_select="fft" +wmv2dsp_select="qpeldsp" # decoders / encoders -aac_decoder_select="adts_header mdct15 mdct mpeg4audio sinewin" -aac_fixed_decoder_select="adts_header mdct mpeg4audio" -aac_encoder_select="audio_frame_queue iirfilter lpc mdct sinewin" +aac_decoder_select="adts_header mpeg4audio sinewin" +aac_fixed_decoder_select="adts_header mpeg4audio" +aac_encoder_select="audio_frame_queue iirfilter lpc sinewin" aac_latm_decoder_select="aac_decoder aac_latm_parser" -ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert mdct" -ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp mdct" -ac3_encoder_select="ac3dsp audiodsp mdct me_cmp" -ac3_fixed_encoder_select="ac3dsp audiodsp mdct me_cmp" +ac3_decoder_select="ac3_parser ac3dsp bswapdsp fmtconvert" +ac3_fixed_decoder_select="ac3_parser ac3dsp bswapdsp" +ac3_encoder_select="ac3dsp audiodsp me_cmp" +ac3_fixed_encoder_select="ac3dsp audiodsp me_cmp" acelp_kelvin_decoder_select="audiodsp" adpcm_g722_decoder_select="g722dsp" adpcm_g722_encoder_select="g722dsp" +agm_decoder_select="idctdsp" aic_decoder_select="golomb idctdsp" alac_encoder_select="lpc" als_decoder_select="bswapdsp mpeg4audio" @@ -2767,47 +2904,40 @@ amv_encoder_select="jpegtables mpegvideoenc" ape_decoder_select="bswapdsp llauddsp" apng_decoder_select="inflate_wrapper" apng_encoder_select="deflate_wrapper llvidencdsp" -aptx_decoder_select="audio_frame_queue" aptx_encoder_select="audio_frame_queue" -aptx_hd_decoder_select="audio_frame_queue" aptx_hd_encoder_select="audio_frame_queue" asv1_decoder_select="blockdsp bswapdsp idctdsp" asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp" asv2_decoder_select="blockdsp bswapdsp idctdsp" asv2_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp" -atrac1_decoder_select="mdct sinewin" -atrac3_decoder_select="mdct" -atrac3al_decoder_select="mdct" -atrac3p_decoder_select="mdct sinewin" -atrac3pal_decoder_select="mdct sinewin" -atrac9_decoder_select="mdct" -av1_decoder_select="cbs_av1" +atrac1_decoder_select="sinewin" +atrac3p_decoder_select="sinewin" +atrac3pal_decoder_select="sinewin" +av1_decoder_select="atsc_a53 cbs_av1 dovi_rpudec" bink_decoder_select="blockdsp hpeldsp" -binkaudio_dct_decoder_select="mdct rdft dct sinewin wma_freqs" -binkaudio_rdft_decoder_select="mdct rdft sinewin wma_freqs" +binkaudio_dct_decoder_select="wma_freqs" +binkaudio_rdft_decoder_select="wma_freqs" cavs_decoder_select="blockdsp golomb h264chroma idctdsp qpeldsp videodsp" clearvideo_decoder_select="idctdsp" cllc_decoder_select="bswapdsp" comfortnoise_encoder_select="lpc" -cook_decoder_select="audiodsp mdct sinewin" +cook_decoder_select="audiodsp sinewin" cri_decoder_select="mjpeg_decoder" cscd_decoder_suggest="zlib" -dca_decoder_select="mdct" -dca_encoder_select="mdct" dds_decoder_select="texturedsp" -dirac_decoder_select="dirac_parse dwt golomb videodsp mpegvideoenc" +dirac_decoder_select="dirac_parse dwt golomb mpegvideoenc qpeldsp videodsp" dnxhd_decoder_select="blockdsp idctdsp" -dnxhd_encoder_select="blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp" -dolby_e_decoder_select="mdct" +dnxhd_encoder_select="blockdsp fdctdsp idctdsp mpegvideoenc pixblockdsp videodsp" dvvideo_decoder_select="dvprofile idctdsp" dvvideo_encoder_select="dvprofile fdctdsp me_cmp pixblockdsp" dxa_decoder_deps="zlib" dxv_decoder_select="lzf texturedsp" +dxv_encoder_select="texturedspenc" eac3_decoder_select="ac3_decoder" eac3_encoder_select="ac3_encoder" -eamad_decoder_select="aandcttables blockdsp bswapdsp idctdsp mpegvideo" +eamad_decoder_select="aandcttables blockdsp bswapdsp" eatgq_decoder_select="aandcttables" -eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp" +eatqi_decoder_select="aandcttables blockdsp bswapdsp" exr_decoder_deps="zlib" exr_encoder_deps="zlib" ffv1_decoder_select="rangecoder" @@ -2815,8 +2945,7 @@ ffv1_encoder_select="rangecoder" ffvhuff_decoder_select="huffyuv_decoder" ffvhuff_encoder_select="huffyuv_encoder" fic_decoder_select="golomb" -flac_decoder_select="flacdsp" -flac_encoder_select="bswapdsp flacdsp lpc" +flac_encoder_select="bswapdsp lpc" flashsv2_decoder_select="inflate_wrapper" flashsv2_encoder_select="deflate_wrapper" flashsv_decoder_select="inflate_wrapper" @@ -2825,6 +2954,7 @@ flv_decoder_select="h263_decoder" flv_encoder_select="h263_encoder" fourxm_decoder_select="blockdsp bswapdsp" fraps_decoder_select="bswapdsp huffman" +ftr_decoder_select="adts_header" g2m_decoder_deps="zlib" g2m_decoder_select="blockdsp idctdsp jpegtables" g729_decoder_select="audiodsp" @@ -2835,18 +2965,18 @@ h263_encoder_select="h263dsp mpegvideoenc" h263i_decoder_select="h263_decoder" h263p_decoder_select="h263_decoder" h263p_encoder_select="h263_encoder" -h264_decoder_select="atsc_a53 cabac golomb h264chroma h264dsp h264parse h264pred h264qpel videodsp" +h264_decoder_select="cabac golomb h264chroma h264dsp h264parse h264pred h264qpel h264_sei videodsp" h264_decoder_suggest="error_resilience" hap_decoder_select="snappy texturedsp" hap_encoder_deps="libsnappy" hap_encoder_select="texturedspenc" -hevc_decoder_select="atsc_a53 bswapdsp cabac dovi_rpu golomb hevcparse videodsp" +hevc_decoder_select="bswapdsp cabac dovi_rpudec golomb hevcparse hevc_sei videodsp" huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp" huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp" hymt_decoder_select="huffyuv_decoder" iac_decoder_select="imc_decoder" -imc_decoder_select="bswapdsp fft mdct sinewin" -imm4_decoder_select="bswapdsp" +imc_decoder_select="bswapdsp sinewin" +imm4_decoder_select="bswapdsp idctdsp" imm5_decoder_select="h264_decoder hevc_decoder" indeo3_decoder_select="hpeldsp" indeo4_decoder_select="ividsp" @@ -2856,12 +2986,14 @@ ipu_decoder_select="mpegvideodec" jpegls_decoder_select="mjpeg_decoder" jv_decoder_select="blockdsp" lagarith_decoder_select="llviddsp" -ljpeg_encoder_select="idctdsp jpegtables" +lead_decoder_select="idctdsp jpegtables" +ljpeg_encoder_select="jpegtables" lscr_decoder_select="inflate_wrapper" magicyuv_decoder_select="llviddsp" magicyuv_encoder_select="llvidencdsp" -mdec_decoder_select="blockdsp bswapdsp idctdsp mpegvideo" -metasound_decoder_select="lsp mdct sinewin" +mdec_decoder_select="blockdsp bswapdsp idctdsp" +media100_decoder_select="media100_to_mjpegb_bsf mjpegb_decoder" +metasound_decoder_select="lsp sinewin" mimic_decoder_select="blockdsp bswapdsp hpeldsp idctdsp" mjpeg_decoder_select="blockdsp hpeldsp exif idctdsp jpegtables" mjpeg_encoder_select="jpegtables mpegvideoenc" @@ -2884,45 +3016,46 @@ mpc7_decoder_select="bswapdsp mpegaudiodsp" mpc8_decoder_select="mpegaudiodsp" mpegvideo_decoder_select="mpegvideodec" mpeg1video_decoder_select="mpegvideodec" -mpeg1video_encoder_select="mpegvideoenc h263dsp" +mpeg1video_encoder_select="mpegvideoenc" mpeg2video_decoder_select="mpegvideodec" -mpeg2video_encoder_select="mpegvideoenc h263dsp" -mpeg4_decoder_select="h263_decoder mpeg4video_parser" -mpeg4_encoder_select="h263_encoder" +mpeg2video_encoder_select="mpegvideoenc" +mpeg4_decoder_select="h263_decoder" +mpeg4_encoder_select="h263_encoder qpeldsp" msa1_decoder_select="mss34dsp" mscc_decoder_select="inflate_wrapper" -msmpeg4v1_decoder_select="h263_decoder" -msmpeg4v2_decoder_select="h263_decoder" -msmpeg4v2_encoder_select="h263_encoder" -msmpeg4v3_decoder_select="h263_decoder" -msmpeg4v3_encoder_select="h263_encoder" +msmpeg4v1_decoder_select="msmpeg4dec" +msmpeg4v2_decoder_select="msmpeg4dec" +msmpeg4v2_encoder_select="msmpeg4enc" +msmpeg4v3_decoder_select="msmpeg4dec" +msmpeg4v3_encoder_select="msmpeg4enc" mss2_decoder_select="mpegvideodec qpeldsp vc1_decoder" mts2_decoder_select="jpegtables mss34dsp" mv30_decoder_select="aandcttables blockdsp" mvha_decoder_select="inflate_wrapper llviddsp" mwsc_decoder_select="inflate_wrapper" mxpeg_decoder_select="mjpeg_decoder" -nellymoser_decoder_select="mdct sinewin" -nellymoser_encoder_select="audio_frame_queue mdct sinewin" +nellymoser_decoder_select="sinewin" +nellymoser_encoder_select="audio_frame_queue sinewin" notchlc_decoder_select="lzf" nuv_decoder_select="idctdsp" -on2avc_decoder_select="mdct" opus_decoder_deps="swresample" -opus_decoder_select="mdct15" -opus_encoder_select="audio_frame_queue mdct15" +opus_encoder_select="audio_frame_queue" +pdv_decoder_select="inflate_wrapper" png_decoder_select="inflate_wrapper" png_encoder_select="deflate_wrapper llvidencdsp" prores_decoder_select="blockdsp idctdsp" prores_encoder_select="fdctdsp" +prores_aw_encoder_select="fdctdsp" +prores_ks_encoder_select="fdctdsp" qcelp_decoder_select="lsp" -qdm2_decoder_select="mdct rdft mpegaudiodsp" +qdm2_decoder_select="mpegaudiodsp" ra_144_decoder_select="audiodsp" ra_144_encoder_select="audio_frame_queue lpc audiodsp" ralf_decoder_select="golomb" rasc_decoder_select="inflate_wrapper" rawvideo_decoder_select="bswapdsp" rscc_decoder_deps="zlib" -rtjpeg_decoder_select="me_cmp" +rtv1_decoder_select="texturedsp" rv10_decoder_select="h263_decoder" rv10_encoder_select="h263_encoder" rv20_decoder_select="h263_decoder" @@ -2933,13 +3066,13 @@ screenpresso_decoder_deps="zlib" shorten_decoder_select="bswapdsp" sipr_decoder_select="lsp" smvjpeg_decoder_select="mjpeg_decoder" -snow_decoder_select="dwt h264qpel hpeldsp me_cmp rangecoder videodsp" -snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder" +snow_decoder_select="dwt h264qpel rangecoder videodsp" +snow_encoder_select="dwt h264qpel hpeldsp me_cmp mpegvideoenc rangecoder videodsp" sonic_decoder_select="golomb rangecoder" sonic_encoder_select="golomb rangecoder" sonic_ls_encoder_select="golomb rangecoder" sp5x_decoder_select="mjpeg_decoder" -speedhq_decoder_select="mpegvideo" +speedhq_decoder_select="blockdsp idctdsp" speedhq_encoder_select="mpegvideoenc" srgc_decoder_select="inflate_wrapper" svq1_decoder_select="hpeldsp" @@ -2959,17 +3092,17 @@ truehd_encoder_select="lpc audio_frame_queue" truemotion2_decoder_select="bswapdsp" truespeech_decoder_select="bswapdsp" tscc_decoder_select="inflate_wrapper" -twinvq_decoder_select="mdct lsp sinewin" +twinvq_decoder_select="lsp sinewin" txd_decoder_select="texturedsp" utvideo_decoder_select="bswapdsp llviddsp" utvideo_encoder_select="bswapdsp huffman llvidencdsp" vble_decoder_select="llviddsp" vbn_decoder_select="texturedsp" vbn_encoder_select="texturedspenc" -vc1_decoder_select="blockdsp h263_decoder h264qpel intrax8 mpegvideodec vc1dsp" +vmix_decoder_select="idctdsp" +vc1_decoder_select="blockdsp h264qpel intrax8 mpegvideodec qpeldsp vc1dsp" vc1image_decoder_select="vc1_decoder" -vorbis_decoder_select="mdct" -vorbis_encoder_select="audio_frame_queue mdct" +vorbis_encoder_select="audio_frame_queue" vp3_decoder_select="hpeldsp vp3dsp videodsp" vp4_decoder_select="vp3_decoder" vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp vp56dsp" @@ -2979,19 +3112,20 @@ vp6f_decoder_select="vp6_decoder" vp7_decoder_select="h264pred videodsp vp8dsp" vp8_decoder_select="h264pred videodsp vp8dsp" vp9_decoder_select="videodsp vp9_parser vp9_superframe_split_bsf" +vvc_decoder_select="cabac cbs_h266 golomb videodsp" wcmv_decoder_select="inflate_wrapper" webp_decoder_select="vp8_decoder exif" wmalossless_decoder_select="llauddsp" -wmapro_decoder_select="mdct sinewin wma_freqs" -wmav1_decoder_select="mdct sinewin wma_freqs" -wmav1_encoder_select="mdct sinewin wma_freqs" -wmav2_decoder_select="mdct sinewin wma_freqs" -wmav2_encoder_select="mdct sinewin wma_freqs" -wmavoice_decoder_select="lsp rdft dct mdct sinewin" -wmv1_decoder_select="h263_decoder" -wmv1_encoder_select="h263_encoder" -wmv2_decoder_select="blockdsp error_resilience h263_decoder idctdsp intrax8 videodsp wmv2dsp" -wmv2_encoder_select="h263_encoder wmv2dsp" +wmapro_decoder_select="sinewin wma_freqs" +wmav1_decoder_select="sinewin wma_freqs" +wmav1_encoder_select="sinewin wma_freqs" +wmav2_decoder_select="sinewin wma_freqs" +wmav2_encoder_select="sinewin wma_freqs" +wmavoice_decoder_select="lsp sinewin" +wmv1_decoder_select="msmpeg4dec" +wmv1_encoder_select="msmpeg4enc" +wmv2_decoder_select="blockdsp error_resilience idctdsp intrax8 msmpeg4dec videodsp wmv2dsp" +wmv2_encoder_select="msmpeg4enc wmv2dsp" wmv3_decoder_select="vc1_decoder" wmv3image_decoder_select="wmv3_decoder" xma1_decoder_select="wmapro_decoder" @@ -3004,22 +3138,26 @@ zmbv_decoder_select="inflate_wrapper" zmbv_encoder_select="deflate_wrapper" # hardware accelerators -crystalhd_deps="libcrystalhd_libcrystalhd_if_h" cuda_deps="ffnvcodec" cuvid_deps="ffnvcodec" d3d11va_deps="dxva_h ID3D11VideoDecoder ID3D11VideoContext" +d3d12va_deps="dxva_h ID3D12Device ID3D12VideoDecoder" dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32" ffnvcodec_deps_any="libdl LoadLibrary" +mediacodec_deps="android mediandk" nvdec_deps="ffnvcodec" vaapi_x11_deps="xlib_x11" videotoolbox_hwaccel_deps="videotoolbox pthreads" videotoolbox_hwaccel_extralibs="-framework QuartzCore" +vulkan_deps="threads" vulkan_deps_any="libdl LoadLibrary" av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1" av1_d3d11va_hwaccel_select="av1_decoder" av1_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_AV1" av1_d3d11va2_hwaccel_select="av1_decoder" +av1_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_AV1" +av1_d3d12va_hwaccel_select="av1_decoder" av1_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_AV1" av1_dxva2_hwaccel_select="av1_decoder" av1_nvdec_hwaccel_deps="nvdec CUVIDAV1PICPARAMS" @@ -3028,6 +3166,8 @@ av1_vaapi_hwaccel_deps="vaapi VADecPictureParameterBufferAV1_bit_depth_idx" av1_vaapi_hwaccel_select="av1_decoder" av1_vdpau_hwaccel_deps="vdpau VdpPictureInfoAV1" av1_vdpau_hwaccel_select="av1_decoder" +av1_vulkan_hwaccel_deps="vulkan" +av1_vulkan_hwaccel_select="av1_decoder" h263_vaapi_hwaccel_deps="vaapi" h263_vaapi_hwaccel_select="h263_decoder" h263_videotoolbox_hwaccel_deps="videotoolbox" @@ -3036,6 +3176,8 @@ h264_d3d11va_hwaccel_deps="d3d11va" h264_d3d11va_hwaccel_select="h264_decoder" h264_d3d11va2_hwaccel_deps="d3d11va" h264_d3d11va2_hwaccel_select="h264_decoder" +h264_d3d12va_hwaccel_deps="d3d12va" +h264_d3d12va_hwaccel_select="h264_decoder" h264_dxva2_hwaccel_deps="dxva2" h264_dxva2_hwaccel_select="h264_decoder" h264_nvdec_hwaccel_deps="nvdec" @@ -3046,10 +3188,14 @@ h264_vdpau_hwaccel_deps="vdpau" h264_vdpau_hwaccel_select="h264_decoder" h264_videotoolbox_hwaccel_deps="videotoolbox" h264_videotoolbox_hwaccel_select="h264_decoder" +h264_vulkan_hwaccel_deps="vulkan" +h264_vulkan_hwaccel_select="h264_decoder" hevc_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_HEVC" hevc_d3d11va_hwaccel_select="hevc_decoder" hevc_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_HEVC" hevc_d3d11va2_hwaccel_select="hevc_decoder" +hevc_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_HEVC" +hevc_d3d12va_hwaccel_select="hevc_decoder" hevc_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_HEVC" hevc_dxva2_hwaccel_select="hevc_decoder" hevc_nvdec_hwaccel_deps="nvdec" @@ -3060,6 +3206,8 @@ hevc_vdpau_hwaccel_deps="vdpau VdpPictureInfoHEVC" hevc_vdpau_hwaccel_select="hevc_decoder" hevc_videotoolbox_hwaccel_deps="videotoolbox" hevc_videotoolbox_hwaccel_select="hevc_decoder" +hevc_vulkan_hwaccel_deps="vulkan" +hevc_vulkan_hwaccel_select="hevc_decoder" mjpeg_nvdec_hwaccel_deps="nvdec" mjpeg_nvdec_hwaccel_select="mjpeg_decoder" mjpeg_vaapi_hwaccel_deps="vaapi" @@ -3074,6 +3222,8 @@ mpeg2_d3d11va_hwaccel_deps="d3d11va" mpeg2_d3d11va_hwaccel_select="mpeg2video_decoder" mpeg2_d3d11va2_hwaccel_deps="d3d11va" mpeg2_d3d11va2_hwaccel_select="mpeg2video_decoder" +mpeg2_d3d12va_hwaccel_deps="d3d12va" +mpeg2_d3d12va_hwaccel_select="mpeg2video_decoder" mpeg2_dxva2_hwaccel_deps="dxva2" mpeg2_dxva2_hwaccel_select="mpeg2video_decoder" mpeg2_nvdec_hwaccel_deps="nvdec" @@ -3098,6 +3248,8 @@ vc1_d3d11va_hwaccel_deps="d3d11va" vc1_d3d11va_hwaccel_select="vc1_decoder" vc1_d3d11va2_hwaccel_deps="d3d11va" vc1_d3d11va2_hwaccel_select="vc1_decoder" +vc1_d3d12va_hwaccel_deps="d3d12va" +vc1_d3d12va_hwaccel_select="vc1_decoder" vc1_dxva2_hwaccel_deps="dxva2" vc1_dxva2_hwaccel_select="vc1_decoder" vc1_nvdec_hwaccel_deps="nvdec" @@ -3114,6 +3266,8 @@ vp9_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_VP9" vp9_d3d11va_hwaccel_select="vp9_decoder" vp9_d3d11va2_hwaccel_deps="d3d11va DXVA_PicParams_VP9" vp9_d3d11va2_hwaccel_select="vp9_decoder" +vp9_d3d12va_hwaccel_deps="d3d12va DXVA_PicParams_VP9" +vp9_d3d12va_hwaccel_select="vp9_decoder" vp9_dxva2_hwaccel_deps="dxva2 DXVA_PicParams_VP9" vp9_dxva2_hwaccel_select="vp9_decoder" vp9_nvdec_hwaccel_deps="nvdec" @@ -3126,12 +3280,14 @@ vp9_videotoolbox_hwaccel_deps="videotoolbox" vp9_videotoolbox_hwaccel_select="vp9_decoder" wmv3_d3d11va_hwaccel_select="vc1_d3d11va_hwaccel" wmv3_d3d11va2_hwaccel_select="vc1_d3d11va2_hwaccel" +wmv3_d3d12va_hwaccel_select="vc1_d3d12va_hwaccel" wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel" wmv3_nvdec_hwaccel_select="vc1_nvdec_hwaccel" wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel" wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel" # hardware-accelerated codecs +d3d12va_encode_deps="d3d12va ID3D12VideoEncoder d3d12_encoder_feature" mediafoundation_deps="mftransform_h MFCreateAlignedMemoryBuffer" omx_deps="libdl pthreads" omx_rpi_select="omx" @@ -3140,10 +3296,15 @@ qsvdec_select="qsv" qsvenc_select="qsv" qsvvpp_select="qsv" vaapi_encode_deps="vaapi" +vulkan_encode_deps="vulkan" v4l2_m2m_deps="linux_videodev2_h sem_timedwait" +bilateral_cuda_filter_deps="ffnvcodec" +bilateral_cuda_filter_deps_any="cuda_nvcc cuda_llvm" chromakey_cuda_filter_deps="ffnvcodec" chromakey_cuda_filter_deps_any="cuda_nvcc cuda_llvm" +colorspace_cuda_filter_deps="ffnvcodec" +colorspace_cuda_filter_deps_any="cuda_nvcc cuda_llvm" hwupload_cuda_filter_deps="ffnvcodec" scale_npp_filter_deps="ffnvcodec libnpp" scale2ref_npp_filter_deps="ffnvcodec libnpp" @@ -3156,21 +3317,41 @@ overlay_cuda_filter_deps="ffnvcodec" overlay_cuda_filter_deps_any="cuda_nvcc cuda_llvm" sharpen_npp_filter_deps="ffnvcodec libnpp" +ddagrab_filter_deps="d3d11va IDXGIOutput1 DXGI_OUTDUPL_FRAME_INFO" + amf_deps_any="libdl LoadLibrary" nvenc_deps="ffnvcodec" nvenc_deps_any="libdl LoadLibrary" +aac_mediacodec_decoder_deps="mediacodec" +aac_mediacodec_decoder_select="aac_adtstoasc_bsf aac_parser" aac_mf_encoder_deps="mediafoundation" ac3_mf_encoder_deps="mediafoundation" +amrnb_mediacodec_decoder_deps="mediacodec" +amrnb_mediacodec_decoder_select="amr_parser" +amrwb_mediacodec_decoder_deps="mediacodec" +amrwb_mediacodec_decoder_select="amr_parser" +av1_amf_encoder_deps="amf" av1_cuvid_decoder_deps="cuvid CUVIDAV1PICPARAMS" +av1_mediacodec_decoder_deps="mediacodec" +av1_mediacodec_encoder_deps="mediacodec" +av1_mediacodec_encoder_select="extract_extradata_bsf" +av1_nvenc_encoder_deps="nvenc NV_ENC_PIC_PARAMS_AV1" +av1_nvenc_encoder_select="atsc_a53" +av1_qsv_decoder_select="qsvdec" +av1_qsv_encoder_deps="libvpl" +av1_qsv_encoder_select="qsvenc" +av1_vaapi_encoder_deps="VAEncPictureParameterBufferAV1" +av1_vaapi_encoder_select="cbs_av1 vaapi_encode" h263_v4l2m2m_decoder_deps="v4l2_m2m h263_v4l2_m2m" h263_v4l2m2m_encoder_deps="v4l2_m2m h263_v4l2_m2m" h264_amf_encoder_deps="amf" -h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser" h264_cuvid_decoder_deps="cuvid" h264_cuvid_decoder_select="h264_mp4toannexb_bsf" h264_mediacodec_decoder_deps="mediacodec" h264_mediacodec_decoder_select="h264_mp4toannexb_bsf h264_parser" +h264_mediacodec_encoder_deps="mediacodec" +h264_mediacodec_encoder_select="extract_extradata_bsf h264_metadata" h264_mf_encoder_deps="mediafoundation" h264_mmal_decoder_deps="mmal" h264_nvenc_encoder_deps="nvenc" @@ -3180,15 +3361,19 @@ h264_qsv_decoder_select="h264_mp4toannexb_bsf qsvdec" h264_qsv_encoder_select="atsc_a53 qsvenc" h264_rkmpp_decoder_deps="rkmpp" h264_rkmpp_decoder_select="h264_mp4toannexb_bsf" -h264_vaapi_encoder_select="cbs_h264 vaapi_encode" +h264_vaapi_encoder_select="atsc_a53 cbs_h264 vaapi_encode" +h264_vulkan_encoder_select="cbs_h264 vulkan_encode" h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m" h264_v4l2m2m_decoder_select="h264_mp4toannexb_bsf" h264_v4l2m2m_encoder_deps="v4l2_m2m h264_v4l2_m2m" hevc_amf_encoder_deps="amf" hevc_cuvid_decoder_deps="cuvid" hevc_cuvid_decoder_select="hevc_mp4toannexb_bsf" +hevc_d3d12va_encoder_select="cbs_h265 d3d12va_encode" hevc_mediacodec_decoder_deps="mediacodec" hevc_mediacodec_decoder_select="hevc_mp4toannexb_bsf hevc_parser" +hevc_mediacodec_encoder_deps="mediacodec" +hevc_mediacodec_encoder_select="extract_extradata_bsf hevc_metadata" hevc_mf_encoder_deps="mediafoundation" hevc_nvenc_encoder_deps="nvenc" hevc_nvenc_encoder_select="atsc_a53" @@ -3197,7 +3382,8 @@ hevc_qsv_encoder_select="hevcparse qsvenc" hevc_rkmpp_decoder_deps="rkmpp" hevc_rkmpp_decoder_select="hevc_mp4toannexb_bsf" hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC" -hevc_vaapi_encoder_select="cbs_h265 vaapi_encode" +hevc_vaapi_encoder_select="atsc_a53 cbs_h265 vaapi_encode" +hevc_vulkan_encoder_select="atsc_a53 cbs_h265 vulkan_encode" hevc_v4l2m2m_decoder_deps="v4l2_m2m hevc_v4l2_m2m" hevc_v4l2m2m_decoder_select="hevc_mp4toannexb_bsf" hevc_v4l2m2m_encoder_deps="v4l2_m2m hevc_v4l2_m2m" @@ -3208,9 +3394,10 @@ mjpeg_qsv_encoder_select="qsvenc" mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG" mjpeg_vaapi_encoder_select="cbs_jpeg jpegtables vaapi_encode" mp3_mf_encoder_deps="mediafoundation" +mp3_mediacodec_decoder_deps="mediacodec" +mp3_mediacodec_decoder_select="mpegaudioheader" mpeg1_cuvid_decoder_deps="cuvid" mpeg1_v4l2m2m_decoder_deps="v4l2_m2m mpeg1_v4l2_m2m" -mpeg2_crystalhd_decoder_select="crystalhd" mpeg2_cuvid_decoder_deps="cuvid" mpeg2_mmal_decoder_deps="mmal" mpeg2_mediacodec_decoder_deps="mediacodec" @@ -3218,21 +3405,21 @@ mpeg2_qsv_decoder_select="qsvdec" mpeg2_qsv_encoder_select="qsvenc" mpeg2_vaapi_encoder_select="cbs_mpeg2 vaapi_encode" mpeg2_v4l2m2m_decoder_deps="v4l2_m2m mpeg2_v4l2_m2m" -mpeg4_crystalhd_decoder_select="crystalhd" mpeg4_cuvid_decoder_deps="cuvid" mpeg4_mediacodec_decoder_deps="mediacodec" +mpeg4_mediacodec_encoder_deps="mediacodec" +mpeg4_mediacodec_encoder_select="extract_extradata_bsf" mpeg4_mmal_decoder_deps="mmal" mpeg4_omx_encoder_deps="omx" mpeg4_v4l2m2m_decoder_deps="v4l2_m2m mpeg4_v4l2_m2m" mpeg4_v4l2m2m_encoder_deps="v4l2_m2m mpeg4_v4l2_m2m" -msmpeg4_crystalhd_decoder_select="crystalhd" -vc1_crystalhd_decoder_select="crystalhd" vc1_cuvid_decoder_deps="cuvid" vc1_mmal_decoder_deps="mmal" vc1_qsv_decoder_select="qsvdec" vc1_v4l2m2m_decoder_deps="v4l2_m2m vc1_v4l2_m2m" vp8_cuvid_decoder_deps="cuvid" vp8_mediacodec_decoder_deps="mediacodec" +vp8_mediacodec_encoder_deps="mediacodec" vp8_qsv_decoder_select="qsvdec" vp8_rkmpp_decoder_deps="rkmpp" vp8_vaapi_encoder_deps="VAEncPictureParameterBufferVP8" @@ -3241,6 +3428,7 @@ vp8_v4l2m2m_decoder_deps="v4l2_m2m vp8_v4l2_m2m" vp8_v4l2m2m_encoder_deps="v4l2_m2m vp8_v4l2_m2m" vp9_cuvid_decoder_deps="cuvid" vp9_mediacodec_decoder_deps="mediacodec" +vp9_mediacodec_encoder_deps="mediacodec" vp9_qsv_decoder_select="qsvdec" vp9_rkmpp_decoder_deps="rkmpp" vp9_vaapi_encoder_deps="VAEncPictureParameterBufferVP9" @@ -3248,25 +3436,29 @@ vp9_vaapi_encoder_select="vaapi_encode" vp9_qsv_encoder_deps="libmfx MFX_CODEC_VP9" vp9_qsv_encoder_select="qsvenc" vp9_v4l2m2m_decoder_deps="v4l2_m2m vp9_v4l2_m2m" -wmv3_crystalhd_decoder_select="crystalhd" -av1_qsv_decoder_select="qsvdec" +vvc_qsv_decoder_select="vvc_mp4toannexb_bsf qsvdec" # parsers aac_parser_select="adts_header mpeg4audio" av1_parser_select="cbs_av1" -h264_parser_select="atsc_a53 golomb h264dsp h264parse" -hevc_parser_select="hevcparse" +evc_parser_select="evcparse" +ftr_parser_select="adts_header mpeg4audio" +h264_parser_select="golomb h264dsp h264parse h264_sei" +hevc_parser_select="hevcparse hevc_sei" mpegaudio_parser_select="mpegaudioheader" -mpegvideo_parser_select="mpegvideo" mpeg4video_parser_select="h263dsp mpegvideodec qpeldsp" vc1_parser_select="vc1dsp" +vvc_parser_select="cbs_h266" # bitstream_filters aac_adtstoasc_bsf_select="adts_header mpeg4audio" av1_frame_merge_bsf_select="cbs_av1" av1_frame_split_bsf_select="cbs_av1" av1_metadata_bsf_select="cbs_av1" +dovi_rpu_bsf_select="cbs_h265 cbs_av1 dovi_rpudec dovi_rpuenc" +dts2pts_bsf_select="cbs_h264 h264parse" eac3_core_bsf_select="ac3_parser" +evc_frame_merge_bsf_select="evcparse" filter_units_bsf_select="cbs" h264_metadata_bsf_deps="const_nan" h264_metadata_bsf_select="cbs_h264" @@ -3274,8 +3466,9 @@ h264_redundant_pps_bsf_select="cbs_h264" hevc_metadata_bsf_select="cbs_h265" mjpeg2jpeg_bsf_select="jpegtables" mpeg2_metadata_bsf_select="cbs_mpeg2" -trace_headers_bsf_select="cbs" +trace_headers_bsf_select="cbs cbs_vp8" vp9_metadata_bsf_select="cbs_vp9" +vvc_metadata_bsf_select="cbs_h266" # external libraries aac_at_decoder_deps="audiotoolbox" @@ -3321,13 +3514,14 @@ prores_videotoolbox_encoder_deps="pthreads" prores_videotoolbox_encoder_select="videotoolbox_encoder" libaom_av1_decoder_deps="libaom" libaom_av1_encoder_deps="libaom" -libaom_av1_encoder_select="extract_extradata_bsf" +libaom_av1_encoder_select="extract_extradata_bsf dovi_rpuenc" libaribb24_decoder_deps="libaribb24" +libaribcaption_decoder_deps="libaribcaption" libcelt_decoder_deps="libcelt" libcodec2_decoder_deps="libcodec2" libcodec2_encoder_deps="libcodec2" libdav1d_decoder_deps="libdav1d" -libdav1d_decoder_select="atsc_a53" +libdav1d_decoder_select="atsc_a53 dovi_rpudec" libdavs2_decoder_deps="libdavs2" libdavs2_decoder_select="avs2_parser" libfdk_aac_decoder_deps="libfdk_aac" @@ -3343,6 +3537,9 @@ libilbc_encoder_deps="libilbc" libjxl_decoder_deps="libjxl libjxl_threads" libjxl_encoder_deps="libjxl libjxl_threads" libkvazaar_encoder_deps="libkvazaar" +liblc3_decoder_deps="liblc3" +liblc3_encoder_deps="liblc3" +liblc3_encoder_select="audio_frame_queue" libmodplug_demuxer_deps="libmodplug" libmp3lame_encoder_deps="libmp3lame" libmp3lame_encoder_select="audio_frame_queue mpegaudioheader" @@ -3353,14 +3550,12 @@ libopencore_amrwb_decoder_deps="libopencore_amrwb" libopenh264_decoder_deps="libopenh264" libopenh264_decoder_select="h264_mp4toannexb_bsf" libopenh264_encoder_deps="libopenh264" -libopenjpeg_decoder_deps="libopenjpeg" libopenjpeg_encoder_deps="libopenjpeg" libopenmpt_demuxer_deps="libopenmpt" libopus_decoder_deps="libopus" libopus_encoder_deps="libopus" libopus_encoder_select="audio_frame_queue" librav1e_encoder_deps="librav1e" -librav1e_encoder_select="extract_extradata_bsf" librsvg_decoder_deps="librsvg" libshine_encoder_deps="libshine" libshine_encoder_select="audio_frame_queue mpegaudioheader" @@ -3368,6 +3563,7 @@ libspeex_decoder_deps="libspeex" libspeex_encoder_deps="libspeex" libspeex_encoder_select="audio_frame_queue" libsvtav1_encoder_deps="libsvtav1" +libsvtav1_encoder_select="dovi_rpuenc" libtheora_encoder_deps="libtheora" libtwolame_encoder_deps="libtwolame" libuavs3d_decoder_deps="libuavs3d" @@ -3379,16 +3575,20 @@ libvpx_vp8_decoder_deps="libvpx" libvpx_vp8_encoder_deps="libvpx" libvpx_vp9_decoder_deps="libvpx" libvpx_vp9_encoder_deps="libvpx" +libvvenc_encoder_deps="libvvenc" libwebp_encoder_deps="libwebp" libwebp_anim_encoder_deps="libwebp" libx262_encoder_deps="libx262" libx264_encoder_deps="libx264" -libx264_encoder_select="atsc_a53" +libx264_encoder_select="atsc_a53 golomb" libx264rgb_encoder_deps="libx264" libx264rgb_encoder_select="libx264_encoder" libx265_encoder_deps="libx265" +libx265_encoder_select="atsc_a53 dovi_rpuenc" libxavs_encoder_deps="libxavs" libxavs2_encoder_deps="libxavs2" +libxevd_decoder_deps="libxevd" +libxeve_encoder_deps="libxeve" libxvid_encoder_deps="libxvid" libzvbi_teletext_decoder_deps="libzvbi" vapoursynth_demuxer_deps="vapoursynth" @@ -3414,22 +3614,27 @@ caf_demuxer_select="iso_media" caf_muxer_select="iso_media" dash_muxer_select="mp4_muxer" dash_demuxer_deps="libxml2" +daud_muxer_select="pcm_rechunk_bsf" dirac_demuxer_select="dirac_parser" dts_demuxer_select="dca_parser" dtshd_demuxer_select="dca_parser" dv_demuxer_select="dvprofile" dv_muxer_select="dvprofile" +dvdvideo_demuxer_select="mpegps_demuxer" +dvdvideo_demuxer_deps="libdvdnav libdvdread" dxa_demuxer_select="riffdec" eac3_demuxer_select="ac3_parser" +evc_demuxer_select="evc_frame_merge_bsf evc_parser" f4v_muxer_select="mov_muxer" fifo_muxer_deps="threads" flac_demuxer_select="flac_parser" -flv_muxer_select="aac_adtstoasc_bsf" +flv_muxer_select="aac_adtstoasc_bsf iso_writer" gxf_muxer_select="pcm_rechunk_bsf" hds_muxer_select="flv_muxer" -hls_demuxer_select="adts_header ac3_parser" -hls_muxer_select="mpegts_muxer" -hls_muxer_suggest="gcrypt openssl" +hls_demuxer_select="aac_demuxer ac3_demuxer adts_header ac3_parser eac3_demuxer mov_demuxer mpegts_demuxer" +hls_muxer_select="mov_muxer mpegts_muxer" +iamf_demuxer_select="iamfdec" +iamf_muxer_select="iamfenc" image2_alias_pix_demuxer_select="image2_demuxer" image2_brender_pix_demuxer_select="image2_demuxer" imf_demuxer_deps="libxml2" @@ -3441,19 +3646,20 @@ latm_muxer_select="aac_adtstoasc_bsf mpeg4audio" matroska_audio_muxer_select="matroska_muxer" matroska_demuxer_select="riffdec" matroska_demuxer_suggest="bzlib zlib" -matroska_muxer_select="mpeg4audio riffenc aac_adtstoasc_bsf pgs_frame_merge_bsf vp9_superframe_bsf" +matroska_muxer_select="iso_writer mpeg4audio riffenc aac_adtstoasc_bsf pgs_frame_merge_bsf vp9_superframe_bsf" mlp_demuxer_select="mlp_parser" mmf_muxer_select="riffenc" mov_demuxer_select="iso_media riffdec" -mov_demuxer_suggest="zlib" -mov_muxer_select="iso_media riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser" +mov_demuxer_suggest="iamfdec zlib" +mov_muxer_select="iso_media iso_writer riffenc rtpenc_chain vp9_superframe_bsf aac_adtstoasc_bsf ac3_parser" +mov_muxer_suggest="iamfenc" mp3_demuxer_select="mpegaudio_parser" mp3_muxer_select="mpegaudioheader" mp4_muxer_select="mov_muxer" mpegts_demuxer_select="iso_media" -mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf" +mpegts_muxer_select="ac3_parser adts_muxer latm_muxer h264_mp4toannexb_bsf hevc_mp4toannexb_bsf vvc_mp4toannexb_bsf" mpegtsraw_demuxer_select="mpegts_demuxer" -mxf_muxer_select="pcm_rechunk_bsf" +mxf_muxer_select="iso_writer pcm_rechunk_bsf rangecoder" mxf_d10_muxer_select="mxf_muxer" mxf_opatom_muxer_select="mxf_muxer" nut_muxer_select="riffenc" @@ -3466,6 +3672,7 @@ ogv_muxer_select="ogg_muxer" opus_muxer_select="ogg_muxer" psp_muxer_select="mov_muxer" rtp_demuxer_select="sdp_demuxer" +rtp_muxer_select="iso_writer" rtp_mpegts_muxer_select="mpegts_muxer rtp_muxer" rtpdec_select="asf_demuxer mov_demuxer mpegts_demuxer rm_demuxer rtp_protocol srtp" rtsp_demuxer_select="http_protocol rtpdec" @@ -3496,7 +3703,6 @@ xwma_demuxer_select="riffdec" # indevs / outdevs android_camera_indev_deps="android camera2ndk mediandk pthreads" -android_camera_indev_extralibs="-landroid -lcamera2ndk -lmediandk" alsa_indev_deps="alsa" alsa_outdev_deps="alsa" avfoundation_indev_deps="avfoundation corevideo coremedia pthreads" @@ -3521,6 +3727,7 @@ gdigrab_indev_deps="CreateDIBSection" gdigrab_indev_extralibs="-lgdi32" gdigrab_indev_select="bmp_decoder" iec61883_indev_deps="libiec61883" +iec61883_indev_select="dv_demuxer" jack_indev_deps="libjack" jack_indev_deps_any="sem_timedwait dispatch_dispatch_h" kmsgrab_indev_deps="libdrm" @@ -3548,6 +3755,8 @@ xcbgrab_indev_suggest="libxcb_shm libxcb_shape libxcb_xfixes" xv_outdev_deps="xlib_xv xlib_x11 xlib_xext" # protocols +android_content_protocol_deps="jni" +android_content_protocol_select="file_protocol" async_protocol_deps="threads" bluray_protocol_deps="libbluray" ffrtmpcrypt_protocol_conflict="librtmp_protocol" @@ -3594,8 +3803,8 @@ udp_protocol_select="network" udplite_protocol_select="network" unix_protocol_deps="sys_un_h" unix_protocol_select="network" -ipfs_protocol_select="https_protocol" -ipns_protocol_select="https_protocol" +ipfs_gateway_protocol_select="https_protocol" +ipns_gateway_protocol_select="https_protocol" # external library protocols libamqp_protocol_deps="librabbitmq" @@ -3626,12 +3835,14 @@ avgblur_vulkan_filter_deps="vulkan spirv_compiler" azmq_filter_deps="libzmq" blackframe_filter_deps="gpl" blend_vulkan_filter_deps="vulkan spirv_compiler" -bm3d_filter_deps="avcodec" -bm3d_filter_select="dct" boxblur_filter_deps="gpl" boxblur_opencl_filter_deps="opencl gpl" bs2b_filter_deps="libbs2b" +bwdif_cuda_filter_deps="ffnvcodec" +bwdif_cuda_filter_deps_any="cuda_nvcc cuda_llvm" +bwdif_vulkan_filter_deps="vulkan spirv_compiler" chromaber_vulkan_filter_deps="vulkan spirv_compiler" +color_vulkan_filter_deps="vulkan spirv_compiler" colorkey_opencl_filter_deps="opencl" colormatrix_filter_deps="gpl" convolution_opencl_filter_deps="opencl" @@ -3642,6 +3853,7 @@ coreimagesrc_filter_extralibs="-framework OpenGL" cover_rect_filter_deps="avcodec avformat gpl" cropdetect_filter_deps="gpl" deinterlace_qsv_filter_deps="libmfx" +deinterlace_qsv_filter_select="qsvvpp" deinterlace_vaapi_filter_deps="vaapi" delogo_filter_deps="gpl" denoise_vaapi_filter_deps="vaapi" @@ -3652,31 +3864,32 @@ dilation_opencl_filter_deps="opencl" dnn_classify_filter_select="dnn" dnn_detect_filter_select="dnn" dnn_processing_filter_select="dnn" -drawtext_filter_deps="libfreetype" +drawtext_filter_deps="libfreetype libharfbuzz" drawtext_filter_suggest="libfontconfig libfribidi" elbg_filter_deps="avcodec" eq_filter_deps="gpl" erosion_opencl_filter_deps="opencl" find_rect_filter_deps="avcodec avformat gpl" -firequalizer_filter_deps="avcodec" -firequalizer_filter_select="rdft" flip_vulkan_filter_deps="vulkan spirv_compiler" -flite_filter_deps="libflite" +flite_filter_deps="libflite threads" framerate_filter_select="scene_sad" freezedetect_filter_select="scene_sad" frei0r_deps_any="libdl LoadLibrary" frei0r_filter_deps="frei0r" frei0r_src_filter_deps="frei0r" fspp_filter_deps="gpl" +fsync_filter_deps="avformat" gblur_vulkan_filter_deps="vulkan spirv_compiler" hflip_vulkan_filter_deps="vulkan spirv_compiler" histeq_filter_deps="gpl" hqdn3d_filter_deps="gpl" iccdetect_filter_deps="lcms2" iccgen_filter_deps="lcms2" +identity_filter_select="scene_sad" interlace_filter_deps="gpl" kerndeint_filter_deps="gpl" ladspa_filter_deps="ladspa libdl" +lcevc_filter_deps="liblcevc_dec" lensfun_filter_deps="liblensfun version3" libplacebo_filter_deps="libplacebo vulkan" lv2_filter_deps="lv2" @@ -3689,10 +3902,14 @@ minterpolate_filter_select="scene_sad" mptestsrc_filter_deps="gpl" negate_filter_deps="lut_filter" nlmeans_opencl_filter_deps="opencl" +nlmeans_vulkan_filter_deps="vulkan spirv_compiler" nnedi_filter_deps="gpl" ocr_filter_deps="libtesseract" ocv_filter_deps="libopencv" openclsrc_filter_deps="opencl" +qrencode_filter_deps="libqrencode" +qrencodesrc_filter_deps="libqrencode" +quirc_filter_deps="libquirc" overlay_opencl_filter_deps="opencl" overlay_qsv_filter_deps="libmfx" overlay_qsv_filter_select="qsvvpp" @@ -3718,19 +3935,18 @@ sab_filter_deps="gpl swscale" scale2ref_filter_deps="swscale" scale_filter_deps="swscale" scale_qsv_filter_deps="libmfx" +scale_qsv_filter_select="qsvvpp" scdet_filter_select="scene_sad" select_filter_select="scene_sad" sharpness_vaapi_filter_deps="vaapi" showcqt_filter_deps="avformat swscale" showcqt_filter_suggest="libfontconfig libfreetype" -showspatial_filter_deps="avcodec" -showspatial_filter_select="fft" signature_filter_deps="gpl avcodec avformat" smartblur_filter_deps="gpl swscale" sobel_opencl_filter_deps="opencl" sofalizer_filter_deps="libmysofa" spp_filter_deps="gpl avcodec" -spp_filter_select="fft idctdsp fdctdsp me_cmp pixblockdsp" +spp_filter_select="idctdsp fdctdsp me_cmp pixblockdsp" sr_filter_deps="avformat swscale" sr_filter_select="dnn" stereo3d_filter_deps="gpl" @@ -3745,6 +3961,7 @@ tonemap_vaapi_filter_deps="vaapi VAProcFilterParameterBufferHDRToneMapping" tonemap_opencl_filter_deps="opencl const_nan" transpose_opencl_filter_deps="opencl" transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags" +transpose_vt_filter_deps="videotoolbox VTPixelRotationSessionCreate" transpose_vulkan_filter_deps="vulkan spirv_compiler" unsharp_opencl_filter_deps="opencl" uspp_filter_deps="gpl avcodec" @@ -3753,42 +3970,57 @@ vflip_vulkan_filter_deps="vulkan spirv_compiler" vidstabdetect_filter_deps="libvidstab" vidstabtransform_filter_deps="libvidstab" libvmaf_filter_deps="libvmaf" +libvmaf_cuda_filter_deps="libvmaf libvmaf_cuda ffnvcodec" zmq_filter_deps="libzmq" zoompan_filter_deps="swscale" zscale_filter_deps="libzimg const_nan" scale_vaapi_filter_deps="vaapi" +scale_vt_filter_deps="videotoolbox VTPixelTransferSessionCreate" scale_vulkan_filter_deps="vulkan spirv_compiler" vpp_qsv_filter_deps="libmfx" vpp_qsv_filter_select="qsvvpp" xfade_opencl_filter_deps="opencl" +xfade_vulkan_filter_deps="vulkan spirv_compiler" yadif_cuda_filter_deps="ffnvcodec" yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm" yadif_videotoolbox_filter_deps="metal corevideo videotoolbox" +hstack_vaapi_filter_deps="vaapi_1" +vstack_vaapi_filter_deps="vaapi_1" +xstack_vaapi_filter_deps="vaapi_1" +hstack_qsv_filter_deps="libmfx" +hstack_qsv_filter_select="qsvvpp" +vstack_qsv_filter_deps="libmfx" +vstack_qsv_filter_select="qsvvpp" +xstack_qsv_filter_deps="libmfx" +xstack_qsv_filter_select="qsvvpp" +pad_vaapi_filter_deps="vaapi_1" +drawbox_vaapi_filter_deps="vaapi_1" # examples +avio_http_serve_files_deps="avformat avutil fork" avio_list_dir_deps="avformat avutil" -avio_reading_deps="avformat avcodec avutil" +avio_read_callback_deps="avformat avcodec avutil" decode_audio_example_deps="avcodec avutil" +decode_filter_audio_example_deps="avfilter avcodec avformat avutil" +decode_filter_video_example_deps="avfilter avcodec avformat avutil" decode_video_example_deps="avcodec avutil" -demuxing_decoding_example_deps="avcodec avformat avutil" +demux_decode_example_deps="avcodec avformat avutil" encode_audio_example_deps="avcodec avutil" encode_video_example_deps="avcodec avutil" extract_mvs_example_deps="avcodec avformat avutil" filter_audio_example_deps="avfilter avutil" -filtering_audio_example_deps="avfilter avcodec avformat avutil" -filtering_video_example_deps="avfilter avcodec avformat avutil" -http_multiclient_example_deps="avformat avutil fork" hw_decode_example_deps="avcodec avformat avutil" -metadata_example_deps="avformat avutil" -muxing_example_deps="avcodec avformat avutil swscale" -qsvdec_example_deps="avcodec avutil libmfx h264_qsv_decoder" -remuxing_example_deps="avcodec avformat avutil" -resampling_audio_example_deps="avutil swresample" -scaling_video_example_deps="avutil swscale" +mux_example_deps="avcodec avformat avutil swscale" +qsv_decode_example_deps="avcodec avutil libmfx h264_qsv_decoder" +remux_example_deps="avcodec avformat avutil" +resample_audio_example_deps="avutil swresample" +scale_video_example_deps="avutil swscale" +show_metadata_example_deps="avformat avutil" transcode_aac_example_deps="avcodec avformat swresample" -transcoding_example_deps="avfilter avcodec avformat avutil" +transcode_example_deps="avfilter avcodec avformat avutil" vaapi_encode_example_deps="avcodec avutil h264_vaapi_encoder" vaapi_transcode_example_deps="avcodec avformat avutil h264_vaapi_encoder" +qsv_transcode_example_deps="avcodec avformat avutil h264_qsv_encoder" # EXTRALIBS_LIST cpu_init_extralibs="pthreads_extralibs" @@ -3796,14 +4028,14 @@ cws2fws_extralibs="zlib_extralibs" # libraries, in any order avcodec_deps="avutil" -avcodec_suggest="libm stdatomic" +avcodec_suggest="libm stdatomic liblcevc_dec" avdevice_deps="avformat avcodec avutil" avdevice_suggest="libm stdatomic" avfilter_deps="avutil" avfilter_suggest="libm stdatomic" avformat_deps="avcodec avutil" avformat_suggest="libm network zlib stdatomic" -avutil_suggest="clock_gettime ffnvcodec libm libdrm libmfx opencl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic" +avutil_suggest="clock_gettime ffnvcodec gcrypt libm libdrm libmfx opencl openssl user32 vaapi vulkan videotoolbox corefoundation corevideo coremedia bcrypt stdatomic" postproc_deps="avutil gpl" postproc_suggest="libm stdatomic" swresample_deps="avutil" @@ -3811,19 +4043,19 @@ swresample_suggest="libm libsoxr stdatomic" swscale_deps="avutil" swscale_suggest="libm stdatomic" -avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs" +avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs lcms2_extralibs" avfilter_extralibs="pthreads_extralibs" -avutil_extralibs="d3d11va_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs" +avutil_extralibs="d3d11va_extralibs d3d12va_extralibs mediacodec_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vaapi_win32_extralibs vdpau_x11_extralibs" # programs -ffmpeg_deps="avcodec avfilter avformat" -ffmpeg_select="aformat_filter anull_filter atrim_filter format_filter - hflip_filter null_filter +ffmpeg_deps="avcodec avfilter avformat threads" +ffmpeg_select="aformat_filter anull_filter atrim_filter crop_filter + format_filter hflip_filter null_filter rotate_filter transpose_filter trim_filter vflip_filter" ffmpeg_suggest="ole32 psapi shell32" -ffplay_deps="avcodec avformat swscale swresample sdl2" -ffplay_select="rdft crop_filter transpose_filter hflip_filter vflip_filter rotate_filter" -ffplay_suggest="shell32" +ffplay_deps="avcodec avformat avfilter swscale swresample sdl2" +ffplay_select="crop_filter transpose_filter hflip_filter vflip_filter rotate_filter" +ffplay_suggest="shell32 libplacebo vulkan" ffprobe_deps="avcodec avformat" ffprobe_suggest="shell32" @@ -3851,6 +4083,8 @@ mandir_default='${prefix}/share/man' # toolchain ar_default="ar" cc_default="gcc" +stdc_default="c17" +stdcxx_default="c++11" cxx_default="g++" host_cc_default="gcc" doxygen_default="doxygen" @@ -3889,11 +4123,13 @@ enable $DOCUMENT_LIST enable $EXAMPLE_LIST enable $LIBRARY_LIST enable stripping +enable version_tracking enable asm enable debug enable doc enable faan faandct faanidct +enable iamf enable large_tests enable optimizations enable ptx_compression @@ -4002,10 +4238,10 @@ find_filters_extern(){ } FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c) -OUTDEV_LIST=$(find_things_extern muxer AVOutputFormat libavdevice/alldevices.c outdev) -INDEV_LIST=$(find_things_extern demuxer AVInputFormat libavdevice/alldevices.c indev) -MUXER_LIST=$(find_things_extern muxer AVOutputFormat libavformat/allformats.c) -DEMUXER_LIST=$(find_things_extern demuxer AVInputFormat libavformat/allformats.c) +OUTDEV_LIST=$(find_things_extern muxer FFOutputFormat libavdevice/alldevices.c outdev) +INDEV_LIST=$(find_things_extern demuxer FFInputFormat libavdevice/alldevices.c indev) +MUXER_LIST=$(find_things_extern muxer FFOutputFormat libavformat/allformats.c) +DEMUXER_LIST=$(find_things_extern demuxer FFInputFormat libavformat/allformats.c) ENCODER_LIST=$(find_things_extern encoder FFCodec libavcodec/allcodecs.c) DECODER_LIST=$(find_things_extern decoder FFCodec libavcodec/allcodecs.c) CODEC_LIST=" @@ -4014,7 +4250,7 @@ CODEC_LIST=" " PARSER_LIST=$(find_things_extern parser AVCodecParser libavcodec/parsers.c) BSF_LIST=$(find_things_extern bsf FFBitStreamFilter libavcodec/bitstream_filters.c) -HWACCEL_LIST=$(find_things_extern hwaccel AVHWAccel libavcodec/hwaccels.h) +HWACCEL_LIST=$(find_things_extern hwaccel FFHWAccel libavcodec/hwaccels.h) PROTOCOL_LIST=$(find_things_extern protocol URLProtocol libavformat/protocols.c) AVCODEC_COMPONENTS_LIST=" @@ -4156,6 +4392,9 @@ for opt do --enable-sdl) enable sdl2 ;; + --enable-lto*) + lto=-f${opt#--enable-} + ;; --enable-*=*|--disable-*=*) eval $(echo "${opt%%=*}" | sed 's/--/action=/;s/-/ thing=/') is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt" @@ -4312,32 +4551,49 @@ enabled ossfuzz && ! echo $CFLAGS | grep -q -- "-fsanitize=" && ! echo $CFLAGS add_ldflags -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp } +add_sanitizer_flags(){ + case "$1" in + asan) + add_cflags -fsanitize=address + add_ldflags -fsanitize=address + ;; + lsan) + add_cflags -fsanitize=leak + add_ldflags -fsanitize=leak + ;; + msan) + add_cflags -fsanitize=memory -fsanitize-memory-track-origins + add_ldflags -fsanitize=memory + ;; + tsan) + add_cflags -fsanitize=thread + add_ldflags -fsanitize=thread + ;; + usan) + add_cflags -fsanitize=undefined + add_ldflags -fsanitize=undefined + ;; + ?*) + die "Unknown sanitizer $1" + ;; + esac +} + case "$toolchain" in - *-asan) - cc_default="${toolchain%-asan}" - add_cflags -fsanitize=address - add_ldflags -fsanitize=address - ;; - *-msan) - cc_default="${toolchain%-msan}" - add_cflags -fsanitize=memory -fsanitize-memory-track-origins - add_ldflags -fsanitize=memory - ;; - *-tsan) - cc_default="${toolchain%-tsan}" - add_cflags -fsanitize=thread - add_ldflags -fsanitize=thread - case "$toolchain" in - gcc-tsan) - add_cflags -fPIC - add_ldflags -fPIC - ;; - esac + clang-*) + add_sanitizer_flags "${toolchain#clang-}" + cc_default="clang" + cxx_default="clang++" ;; - *-usan) - cc_default="${toolchain%-usan}" - add_cflags -fsanitize=undefined - add_ldflags -fsanitize=undefined + gcc-*) + add_sanitizer_flags "${toolchain#gcc-}" + cc_default="gcc" + cxx_default="g++" + # In case of tsan with gcc, PIC has to be enabled + if [ "${toolchain#gcc-}" = "tsan" ]; then + add_cflags -fPIC + add_ldflags -fPIC + fi ;; valgrind-*) target_exec_default="valgrind" @@ -4351,12 +4607,6 @@ case "$toolchain" in esac ;; msvc) - # Check whether the current MSVC version needs the C99 converter. - # From MSVC 2013 (compiler major version 18) onwards, it does actually - # support enough of C99 to build ffmpeg. Default to the new - # behaviour if the regexp was unable to match anything, since this - # successfully parses the version number of existing supported - # versions that require the converter (MSVC 2010 and 2012). cl_major_ver=$(cl.exe 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p') if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then cc_default="cl.exe" @@ -4365,6 +4615,7 @@ case "$toolchain" in die "Unsupported MSVC version (2013 or newer required)" fi ld_default="$source_path/compat/windows/mslink" + windres_default="$source_path/compat/windows/mswindres" nm_default="dumpbin.exe -symbols" ar_default="lib.exe" case "${arch:-$arch_default}" in @@ -4455,7 +4706,7 @@ if enabled cuda_nvcc; then fi set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - target_exec x86asmexe metalcc metallib + target_exec x86asmexe metalcc metallib stdc stdcxx enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -4538,7 +4789,7 @@ chmod +x $TMPE # make sure we can execute files in $TMPDIR cat > $TMPSH 2>> $logfile <> $logfile 2>&1 if ! $TMPSH >> $logfile 2>&1; then @@ -4580,7 +4831,7 @@ msvc_common_flags(){ # generic catch all at the bottom will print the original flag. -Wall) ;; -Wextra) ;; - -std=c*) ;; + -std=c*) echo /std:${flag#-std=};; # Common flags -fomit-frame-pointer) ;; -g) echo -Z7 ;; @@ -4590,6 +4841,7 @@ msvc_common_flags(){ -fPIC) ;; -mthumb) ;; -march=*) ;; + -mfp16-format=*) ;; -lz) echo zlib.lib ;; -lx264) echo libx264.lib ;; -lstdc++) ;; @@ -4624,8 +4876,8 @@ icl_flags(){ # Despite what Intel's documentation says -Wall, which is supported # on Windows, does enable remarks so disable them here. -Wall) echo $flag -Qdiag-disable:remark ;; - -std=c99) echo -Qstd=c99 ;; - -flto) echo -ipo ;; + -std=$stdc) echo -Qstd=$stdc ;; + -flto*) echo -ipo ;; esac done } @@ -4633,7 +4885,7 @@ icl_flags(){ icc_flags(){ for flag; do case $flag in - -flto) echo -ipo ;; + -flto*) echo -ipo ;; *) echo $flag ;; esac done @@ -4672,7 +4924,7 @@ suncc_flags(){ athlon*) echo -xarch=pentium_proa ;; esac ;; - -std=c99) echo -xc99 ;; + -std=$stdc) echo -x$stdc ;; -fomit-frame-pointer) echo -xregs=frameptr ;; -fPIC) echo -KPIC -xcode=pic32 ;; -W*,*) echo $flag ;; @@ -4761,8 +5013,8 @@ probe_cc(){ _type=suncc _ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-) _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)' - _DEPFLAGS='-xM1 -xc99' - _ldflags='-std=c99' + _DEPFLAGS='-xM1 -x$stdc' + _ldflags='-std=$stdc' _cflags_speed='-O5' _cflags_size='-O5 -xspace' _flags_filter=suncc_flags @@ -4829,7 +5081,12 @@ probe_cc(){ else _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r') fi - _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)' + if [ -x "$(command -v wslpath)" ]; then + _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); if (!match($$0, / /)) { print $$0 } }'\'' | xargs -r -d\\n -n1 wslpath -u | awk '\''BEGIN { printf "%s:", "$@" }; { sub(/\r/,""); printf " %s", $$0 }; END { print "" }'\'' > $(@:.o=.d)' + + else + _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)' + fi _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs' _cflags_speed="-O2" _cflags_size="-O1" @@ -5023,9 +5280,6 @@ case "$arch" in s390|s390x) arch="s390" ;; - sh4|sh) - arch="sh4" - ;; sun4*|sparc*) arch="sparc" ;; @@ -5052,10 +5306,6 @@ if enabled aarch64; then ;; esac -elif enabled alpha; then - - cpuflags="-mcpu=$cpu" - elif enabled arm; then check_arm_arch() { @@ -5120,30 +5370,7 @@ elif enabled arm; then ;; esac -elif enabled avr32; then - - case $cpu in - ap7[02]0[0-2]) - subarch="avr32_ap" - cpuflags="-mpart=$cpu" - ;; - ap) - subarch="avr32_ap" - cpuflags="-march=$cpu" - ;; - uc3[ab]*) - subarch="avr32_uc" - cpuflags="-mcpu=$cpu" - ;; - uc) - subarch="avr32_uc" - cpuflags="-march=$cpu" - ;; - esac - -elif enabled bfin; then - - cpuflags="-mcpu=$cpu" + test_cflags -mfp16-format=ieee && add_cflags -mfp16-format=ieee elif enabled loongarch; then @@ -5321,6 +5548,18 @@ elif enabled ppc; then ;; esac +elif enabled riscv; then + + check_headers asm/hwprobe.h + check_headers sys/hwprobe.h + + if test_cpp_condition stddef.h "__riscv_zbb"; then + enable fast_clz + fi + if test_cpp_condition stddef.h "__riscv_zfhmin"; then + enable fast_float16 + fi + elif enabled sparc; then case $cpu in @@ -5345,22 +5584,26 @@ elif enabled x86; then cpuflags="-march=$cpu" disable i686 ;; - # targets that do support nopl and conditional mov (cmov) - i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx\ - |core*|atom|bonnell|nehalem|westmere|silvermont|sandybridge|ivybridge|haswell|broadwell|skylake*|knl\ - |amdfam10|barcelona|b[dt]ver*|znver*) - cpuflags="-march=$cpu" - enable i686 - enable fast_cmov - ;; # targets that do support conditional mov but on which it's slow pentium4|pentium4m|prescott|nocona) cpuflags="-march=$cpu" enable i686 disable fast_cmov ;; + # everything else should support nopl and conditional mov (cmov) + *) + cpuflags="-march=$cpu" + enable i686 + enable fast_cmov + ;; esac +else + + if test_cpp_condition inttypes.h "UINTPTR_MAX >= UINT64_MAX"; then + enable fast_64bit + fi + fi if [ "$cpu" != generic ]; then @@ -5382,21 +5625,36 @@ if test "$?" != 0; then die "C compiler test failed." fi -add_cppflags -D_ISOC99_SOURCE +add_cppflags -D_ISOC11_SOURCE add_cxxflags -D__STDC_CONSTANT_MACROS -check_cxxflags -std=c++11 || check_cxxflags -std=c++0x +check_cxxflags_cc -std=$stdcxx ctype.h "__cplusplus >= 201103L" || + { check_cxxflags -std=c++11 && stdcxx="c++11" || { check_cxxflags -std=c++0x && stdcxx="c++0x"; }; } # some compilers silently accept -std=c11, so we also need to check that the # version macro is defined properly -test_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L" && - add_cflags -std=c11 || - check_cflags -std=c99 +check_cflags_cc -std=$stdc ctype.h "__STDC_VERSION__ >= 201112L" || + { check_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L" && stdc="c11" || die "Compiler lacks C11 support"; } + +test_cc < +#include +struct Foo { + int a; + void *ptr; +} obj; +static_assert(offsetof(struct Foo, a) == 0, + "First element of struct does not have offset 0"); +_Static_assert(offsetof(struct Foo, ptr) >= offsetof(struct Foo, a) + sizeof(obj.a), + "elements not properly ordered in struct"); +EOF check_cppflags -D_FILE_OFFSET_BITS=64 check_cppflags -D_LARGEFILE_SOURCE -add_host_cppflags -D_ISOC99_SOURCE -check_host_cflags -std=c99 +add_host_cppflags -D_ISOC11_SOURCE +check_host_cflags_cc -std=$stdc ctype.h "__STDC_VERSION__ >= 201112L" || + check_host_cflags_cc -std=c11 ctype.h "__STDC_VERSION__ >= 201112L" || die "Host compiler lacks C11 support" + check_host_cflags -Wall check_host_cflags $host_cflags_speed @@ -5410,7 +5668,7 @@ check_64bit(){ } case "$arch" in - aarch64|alpha|ia64) + aarch64|ia64) enabled shared && enable_weak pic ;; loongarch) @@ -5497,11 +5755,12 @@ case $target_os in ;; netbsd) disable symver + enable section_data_rel_ro oss_indev_extralibs="-lossaudio" oss_outdev_extralibs="-lossaudio" enabled gcc || check_ldflags -Wl,-zmuldefs ;; - openbsd|bitrig) + openbsd) disable symver enable section_data_rel_ro striptype="" @@ -5515,6 +5774,7 @@ case $target_os in disable symver ;; freebsd) + enable section_data_rel_ro ;; bsd/os) add_extralibs -lpoll -lgnugetopt @@ -5565,8 +5825,9 @@ case $target_os in # Cannot build both shared and static libs when using dllimport. disable static fi - enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres + ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -Wl,--large-address-aware + add_cppflags -DWIN32_LEAN_AND_MEAN shlibdir_default="$bindir_default" SLIBPREF="libmyth" SLIBSUF=".dll" @@ -5616,7 +5877,9 @@ case $target_os in # Cannot build both shared and static libs with MSVC or icl. disable static fi + ! enabled small && test_cmd $windres --version && enable gnu_windres enabled x86_32 && check_ldflags -LARGEADDRESSAWARE + add_cppflags -DWIN32_LEAN_AND_MEAN shlibdir_default="$bindir_default" SLIBPREF="libmyth" SLIBSUF=".dll" @@ -5645,7 +5908,8 @@ case $target_os in SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(FULLNAME).dll.a' enabled x86_64 && objformat="win64" || objformat="win32" enable dos_paths - enabled shared && ! enabled small && test_cmd $windres --version && enable gnu_windres + ! enabled small && test_cmd $windres --version && enable gnu_windres + add_cppflags -DWIN32_LEAN_AND_MEAN add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 ;; *-dos|freedos|opendos) @@ -5884,22 +6148,16 @@ enabled pic && enable_weak_pic test_cc <" to not have any effect unless it + # had an extra "+" included - but it was activated on the next + # ".arch_extension" directive. Check if we can include "+crc" as dummy + # feature to make the .arch directive behave as expected and take + # effect right away. + check_arch_level "${as_arch_level}+crc" + fi + enabled armv8 && check_insn armv8 'prfm pldl1strm, [x0]' # internal assembler in clang 3.3 does not support this instruction enabled neon && check_insn neon 'ext v0.8B, v0.8B, v1.8B, #1' - enabled vfp && check_insn vfp 'fmadd d0, d0, d1, d2' - - map 'enabled_any ${v}_external ${v}_inline || disable $v' $ARCH_EXT_LIST_ARM - -elif enabled alpha; then - check_cflags -mieee + archext_list="dotprod i8mm" + enabled dotprod && check_archext_insn dotprod 'udot v0.4s, v0.16b, v0.16b' + enabled i8mm && check_archext_insn i8mm 'usdot v0.4s, v0.16b, v0.16b' + + # Disable the main feature (e.g. HAVE_NEON) if neither inline nor external + # assembly support the feature out of the box. Skip this for the features + # checked with check_archext_insn above, as that function takes care of + # updating all the variables as necessary. + for v in $ARCH_EXT_LIST_ARM; do + is_in $v $archext_list && continue + enabled_any ${v}_external ${v}_inline || disable $v + done elif enabled arm; then @@ -5986,6 +6273,12 @@ EOF warn "Compiler does not indicate floating-point ABI, guessing $fpabi." fi + # Test for various instruction sets, testing support both in inline and + # external assembly. This sets the ${v}_inline or ${v}_external flags + # if the instruction can be used unconditionally in either inline or + # external assembly. This means that if the ${v}_external feature is set, + # that feature can be used unconditionally in various support macros + # anywhere in external assembly, in any function. enabled armv5te && check_insn armv5te 'qadd r0, r0, r0' enabled armv6 && check_insn armv6 'sadd16 r0, r0, r0' enabled armv6t2 && check_insn armv6t2 'movt r0, #0' @@ -5994,6 +6287,14 @@ EOF enabled vfpv3 && check_insn vfpv3 'vmov.f32 s0, #1.0' enabled setend && check_insn setend 'setend be' + # If neither inline nor external assembly can use the feature by default, + # disable the main unsuffixed feature (e.g. HAVE_NEON). + # + # For targets that support runtime CPU feature detection, don't disable + # the main feature flag - there we assume that all supported toolchains + # can assemble code for all instruction set features (e.g. NEON) with + # suitable assembly flags (such as ".fpu neon"); we don't check + # specifically that they really do. [ $target_os = linux ] || [ $target_os = android ] || map 'enabled_any ${v}_external ${v}_inline || disable $v' \ $ARCH_EXT_LIST_ARM @@ -6091,6 +6392,13 @@ elif enabled ppc; then check_cpp_condition power8 "altivec.h" "defined(_ARCH_PWR8)" fi +elif enabled riscv; then + + enabled rv && check_inline_asm rv '".option arch, +zbb\nrev8 t0, t1"' + enabled rvv && check_inline_asm rvv '".option arch, +v\nvsetivli zero, 0, e8, m1, ta, ma"' + enabled rv_zicbop && check_inline_asm rv_zicbop '".option arch, +zicbop\nprefetch.r 64(a0)"' + enabled rv_zvbb && check_inline_asm rv_zvbb '".option arch, +zvbb\nvclz.v v0, v8"' + elif enabled x86; then check_builtin rdtsc intrin.h "__rdtsc()" @@ -6147,7 +6455,6 @@ EOF done disabled x86asm && die "nasm/yasm not found or too old. Use --disable-x86asm for a crippled build." X86ASMFLAGS="-f $objformat" - enabled pic && append X86ASMFLAGS "-DPIC" test -n "$extern_prefix" && append X86ASMFLAGS "-DPREFIX" case "$objformat" in elf*) enabled debug && append X86ASMFLAGS $x86asm_debug ;; @@ -6158,7 +6465,6 @@ EOF enabled avx2 && check_x86asm avx2_external "vextracti128 xmm0, ymm0, 0" enabled xop && check_x86asm xop_external "vpmacsdd xmm0, xmm1, xmm2, xmm3" enabled fma4 && check_x86asm fma4_external "vfmaddps ymm0, ymm1, ymm2, ymm3" - check_x86asm cpunop "CPU amdnop" fi case "$cpu" in @@ -6173,6 +6479,7 @@ elif enabled loongarch; then fi check_cc intrinsics_neon arm_neon.h "int16x8_t test = vdupq_n_s16(0)" +check_cc intrinsics_sse2 emmintrin.h "__m128i test = _mm_setzero_si128()" check_ldflags -Wl,--as-needed check_ldflags -Wl,-z,noexecstack @@ -6217,30 +6524,46 @@ if ! disabled network; then fi fi -check_builtin atomic_cas_ptr atomic.h "void **ptr; void *oldval, *newval; atomic_cas_ptr(ptr, oldval, newval)" -check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()" check_builtin MemoryBarrier windows.h "MemoryBarrier()" -check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)" check_builtin gmtime_r time.h "time_t *time; struct tm *tm; gmtime_r(time, tm)" check_builtin localtime_r time.h "time_t *time; struct tm *tm; localtime_r(time, tm)" +check_builtin float16 "" "_Float16 f16var" +if enabled float16; then + if enabled x86; then + test_cpp_condition stddef.h "defined(__F16C__)" && enable fast_float16 + elif enabled arm || enabled aarch64; then + enable fast_float16 + fi +fi + case "$custom_allocator" in + "") + ;; jemalloc) - # jemalloc by default does not use a prefix - require libjemalloc jemalloc/jemalloc.h malloc -ljemalloc + test -n "$malloc_prefix" || + malloc_prefix=$($pkg_config --variable=jemalloc_prefix $pkg_config_flags jemalloc 2>/dev/null) + require_pkg_config custom_allocator jemalloc jemalloc/jemalloc.h ${malloc_prefix}malloc ;; tcmalloc) - require_pkg_config libtcmalloc libtcmalloc gperftools/tcmalloc.h tc_malloc + require_pkg_config custom_allocator libtcmalloc gperftools/tcmalloc.h tc_malloc malloc_prefix=tc_ ;; + *) + require_pkg_config custom_allocator "$custom_allocator" stdlib.h malloc + ;; esac +if test -n "$custom_allocator"; then + add_extralibs "$custom_allocator_extralibs" +fi + check_func_headers malloc.h _aligned_malloc && enable aligned_malloc check_func ${malloc_prefix}memalign && enable memalign check_func ${malloc_prefix}posix_memalign && enable posix_memalign check_func access -check_func_headers stdlib.h arc4random +check_func_headers stdlib.h arc4random_buf check_lib clock_gettime time.h clock_gettime || check_lib clock_gettime time.h clock_gettime -lrt check_func fcntl check_func fork @@ -6254,12 +6577,14 @@ check_func mmap check_func mprotect # Solaris has nanosleep in -lrt, OpenSolaris no longer needs that check_func_headers time.h nanosleep || check_lib nanosleep time.h nanosleep -lrt +check_func_headers sys/prctl.h prctl check_func sched_getaffinity check_func setrlimit check_struct "sys/stat.h" "struct stat" st_mtim.tv_nsec -D_BSD_SOURCE check_func strerror_r check_func sysconf check_func sysctl +check_func tempnam check_func usleep check_func_headers conio.h kbhit @@ -6269,6 +6594,8 @@ check_func_headers mach/mach_time.h mach_absolute_time check_func_headers stdlib.h getenv check_func_headers sys/stat.h lstat check_func_headers sys/auxv.h getauxval +check_func_headers sys/auxv.h elf_aux_info +check_func_headers sys/sysctl.h sysctlbyname check_func_headers windows.h GetModuleHandle check_func_headers windows.h GetProcessAffinityMask @@ -6309,11 +6636,11 @@ enabled libdrm && check_headers linux/dma-buf.h check_headers linux/perf_event.h -check_headers libcrystalhd/libcrystalhd_if.h check_headers malloc.h check_headers mftransform.h check_headers net/udplite.h check_headers poll.h +check_headers pthread_np.h check_headers sys/param.h check_headers sys/resource.h check_headers sys/select.h @@ -6323,6 +6650,8 @@ check_headers termios.h check_headers unistd.h check_headers valgrind/valgrind.h check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox +check_func_headers VideoToolbox/VideoToolbox.h VTPixelTransferSessionCreate -framework VideoToolbox +check_func_headers VideoToolbox/VideoToolbox.h VTPixelRotationSessionCreate -framework VideoToolbox check_headers windows.h check_headers asm/types.h @@ -6333,20 +6662,20 @@ check_headers asm/types.h # some configurations also require linking to libatomic, so try # both with -latomic and without for LATOMIC in "-latomic" ""; do - check_builtin stdatomic stdatomic.h \ - "atomic_int foo, bar = ATOMIC_VAR_INIT(-1); atomic_store(&foo, 0); foo += bar" \ + check_builtin stdatomic stdatomic.h \ + "atomic_int foo, bar = -1; atomic_store(&foo, 0); foo += bar" \ $LATOMIC && eval stdatomic_extralibs="\$LATOMIC" && break done check_lib advapi32 "windows.h" RegCloseKey -ladvapi32 check_lib bcrypt "windows.h bcrypt.h" BCryptGenRandom -lbcrypt && check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM" -check_lib ole32 "windows.h" CoTaskMemFree -lole32 +check_lib ole32 "windows.h objbase.h" CoTaskMemFree -lole32 check_lib shell32 "windows.h shellapi.h" CommandLineToArgvW -lshell32 check_lib psapi "windows.h psapi.h" GetProcessMemoryInfo -lpsapi check_lib android android/native_window.h ANativeWindow_acquire -landroid -check_lib mediandk "stdint.h media/NdkImage.h" AImage_delete -lmediandk +check_lib mediandk "stdint.h media/NdkMediaFormat.h" AMediaFormat_new -lmediandk check_lib camera2ndk "stdbool.h stdint.h camera/NdkCameraManager.h" ACameraManager_create -lcamera2ndk enabled appkit && check_apple_framework AppKit @@ -6394,8 +6723,17 @@ check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss check_type "windows.h dxva.h" "DXVA_PicParams_AV1" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 check_type "windows.h dxva.h" "DXVA_PicParams_VP9" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 +check_type "windows.h dxgi1_2.h" "DXGI_OUTDUPL_FRAME_INFO" +check_type "windows.h dxgi1_2.h" "IDXGIOutput1" +check_type "windows.h dxgi1_5.h" "IDXGIOutput5" check_type "windows.h d3d11.h" "ID3D11VideoDecoder" check_type "windows.h d3d11.h" "ID3D11VideoContext" +check_type "windows.h d3d12.h" "ID3D12Device" +check_type "windows.h d3d12video.h" "ID3D12VideoDecoder" +check_type "windows.h d3d12video.h" "ID3D12VideoEncoder" +test_code cc "windows.h d3d12video.h" "D3D12_FEATURE_VIDEO feature = D3D12_FEATURE_VIDEO_ENCODER_CODEC" && \ +test_code cc "windows.h d3d12video.h" "D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS req" && enable d3d12_encoder_feature +check_type "windows.h" "DPI_AWARENESS_CONTEXT" -D_WIN32_WINNT=0x0A00 check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602 check_func_headers mfapi.h MFCreateAlignedMemoryBuffer -lmfplat @@ -6424,10 +6762,11 @@ fi if ! disabled ffnvcodec; then ffnv_hdr_list="ffnvcodec/nvEncodeAPI.h ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h ffnvcodec/dynlink_nvcuvid.h" - check_pkg_config ffnvcodec "ffnvcodec >= 9.1.23.1" "$ffnv_hdr_list" "" || \ - check_pkg_config ffnvcodec "ffnvcodec >= 9.0.18.3 ffnvcodec < 9.1" "$ffnv_hdr_list" "" || \ - check_pkg_config ffnvcodec "ffnvcodec >= 8.2.15.10 ffnvcodec < 8.3" "$ffnv_hdr_list" "" || \ - check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.11 ffnvcodec < 8.2" "$ffnv_hdr_list" "" + check_pkg_config ffnvcodec "ffnvcodec >= 12.1.14.0" "$ffnv_hdr_list" "" || \ + check_pkg_config ffnvcodec "ffnvcodec >= 12.0.16.1 ffnvcodec < 12.1" "$ffnv_hdr_list" "" || \ + check_pkg_config ffnvcodec "ffnvcodec >= 11.1.5.3 ffnvcodec < 12.0" "$ffnv_hdr_list" "" || \ + check_pkg_config ffnvcodec "ffnvcodec >= 11.0.10.3 ffnvcodec < 11.1" "$ffnv_hdr_list" "" || \ + check_pkg_config ffnvcodec "ffnvcodec >= 8.1.24.15 ffnvcodec < 8.2" "$ffnv_hdr_list" "" fi if enabled_all libglslang libshaderc; then @@ -6473,6 +6812,12 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then if enabled pthreads; then check_builtin sem_timedwait semaphore.h "sem_t *s; sem_init(s,0,0); sem_timedwait(s,0); sem_destroy(s)" $pthreads_extralibs check_func pthread_cancel $pthreads_extralibs + hdrs=pthread.h + if enabled pthread_np_h; then + hdrs="$hdrs pthread_np.h" + fi + check_lib pthread_set_name_np "$hdrs" pthread_set_name_np -lpthread + check_lib pthread_setname_np "$hdrs" pthread_setname_np -lpthread fi fi @@ -6508,16 +6853,13 @@ for func in $MATH_FUNCS; do eval check_mathfunc $func \${${func}_args:-1} $libm_extralibs done -for func in $COMPLEX_FUNCS; do - eval check_complexfunc $func \${${func}_args:-1} -done - # these are off by default, so fail if requested and not available enabled avisynth && { require_headers "avisynth/avisynth_c.h avisynth/avs/version.h" && - { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 1 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" || - die "ERROR: AviSynth+ header version must be >= 3.7.1"; } } + { test_cpp_condition avisynth/avs/version.h "AVS_MAJOR_VER >= 3 && AVS_MINOR_VER >= 7 && AVS_BUGFIX_VER >= 3 || AVS_MAJOR_VER >= 3 && AVS_MINOR_VER > 7 || AVS_MAJOR_VER > 3" || + die "ERROR: AviSynth+ header version must be >= 3.7.3"; } } enabled cuda_nvcc && { check_nvcc cuda_nvcc || die "ERROR: failed checking for nvcc."; } -enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint +enabled chromaprint && { check_pkg_config chromaprint libchromaprint "chromaprint.h" chromaprint_get_version || + require chromaprint chromaprint.h chromaprint_get_version -lchromaprint; } enabled decklink && { require_headers DeckLinkAPI.h && { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a0b0000" || die "ERROR: Decklink API version must be >= 10.11"; } } enabled frei0r && require_headers "frei0r.h" @@ -6526,10 +6868,11 @@ enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gn enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; } enabled ladspa && require_headers "ladspa.h dlfcn.h" enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext -enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version +enabled libaom && require_pkg_config libaom "aom >= 2.0.0" aom/aom_codec.h aom_codec_version enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new || { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } || die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } +enabled libaribcaption && require_pkg_config libaribcaption "libaribcaption >= 1.1.1" "aribcaption/aribcaption.h" aribcc_context_alloc enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 enabled libass && require_pkg_config libass "libass >= 0.11.0" ass/ass.h ass_library_init @@ -6543,7 +6886,9 @@ enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lc enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d/dav1d.h" dav1d_version enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new -enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion +enabled libdrm && check_pkg_config libdrm libdrm xf86drm.h drmGetVersion +enabled libdvdnav && require_pkg_config libdvdnav "dvdnav >= 6.1.1" dvdnav/dvdnav.h dvdnav_open2 +enabled libdvdread && require_pkg_config libdvdread "dvdread >= 6.1.2" dvdread/dvd_reader.h DVDOpen2 enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && warn "using libfdk without pkg-config"; } } @@ -6553,12 +6898,13 @@ enabled fontconfig && enable libfontconfig enabled libfontconfig && require_pkg_config libfontconfig fontconfig "fontconfig/fontconfig.h" FcInit enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build.h FT_FREETYPE_H" FT_Init_FreeType enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info +enabled libharfbuzz && require_pkg_config libharfbuzz harfbuzz hb.h hb_buffer_create enabled libglslang && { check_lib spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ - -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \ + -lglslang -lMachineIndependent -lGenericCodeGen \ -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm || require spirv_compiler glslang/Include/glslang_c_interface.h glslang_initialize_process \ - -lglslang -lOSDependent -lHLSL -lOGLCompiler \ - -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm; } + -lglslang -lMachineIndependent -lOSDependent -lHLSL -lOGLCompiler -lGenericCodeGen \ + -lSPVRemapper -lSPIRV -lSPIRV-Tools-opt -lSPIRV-Tools -lpthread -lstdc++ -lm ; } enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu || require libgme gme/gme.h gme_new_emu -lgme -lstdc++; } enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do @@ -6568,21 +6914,42 @@ enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -li enabled libjxl && require_pkg_config libjxl "libjxl >= 0.7.0" jxl/decode.h JxlDecoderVersion && require_pkg_config libjxl_threads "libjxl_threads >= 0.7.0" jxl/thread_parallel_runner.h JxlThreadParallelRunner enabled libklvanc && require libklvanc libklvanc/vanc.h klvanc_context_create -lklvanc -enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kvazaar.h kvz_api_get -enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_new +enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 2.0.0" kvazaar.h kvz_api_get +enabled liblc3 && require_pkg_config liblc3 "lc3 >= 1.1.0" lc3.h lc3_hr_setup_encoder +enabled liblensfun && require_pkg_config liblensfun lensfun lensfun.h lf_db_create +enabled liblcevc_dec && require_pkg_config liblcevc_dec "lcevc_dec >= 2.0.0" "LCEVC/lcevc_dec.h" LCEVC_CreateDecoder + +if enabled libmfx && enabled libvpl; then + die "ERROR: can not use libmfx and libvpl together" # While it may appear that require is being used as a pkg-config # fallback for libmfx, it is actually being used to detect a different # installation route altogether. If libmfx is installed via the Intel # Media SDK or Intel Media Server Studio, these don't come with # pkg-config support. Instead, users should make sure that the build # can find the libraries and headers through other means. -enabled libmfx && { check_pkg_config libmfx "libmfx >= 1.28" "mfx/mfxvideo.h" MFXInit || - { require libmfx "mfx/mfxvideo.h mfx/mfxdefs.h" MFXInit "-llibmfx $advapi32_extralibs" && - { test_cpp_condition mfx/mfxdefs.h "MFX_VERSION >= 1028" || die "ERROR: libmfx version must be >= 1.28"; } && - warn "using libmfx without pkg-config"; } } +elif enabled libmfx; then + { check_pkg_config libmfx "libmfx >= 1.28 libmfx < 2.0" "mfxvideo.h" MFXInit || +# Some old versions of libmfx have the following settings in libmfx.pc: +# includedir=/usr/include +# Cflags: -I${includedir} +# So add -I${includedir}/mfx to CFLAGS + { check_pkg_config libmfx "libmfx >= 1.28 libmfx < 2.0" "mfx/mfxvideo.h" MFXInit && add_cflags -I${libmfx_incdir}/mfx; } || + { require libmfx "mfxvideo.h mfxdefs.h" MFXInit "-llibmfx $advapi32_extralibs" && + { test_cpp_condition mfxdefs.h "MFX_VERSION >= 1028 && MFX_VERSION < 2000" || die "ERROR: libmfx version must be >= 1.28 and < 2.0"; } && + warn "using libmfx without pkg-config"; } } && + warn "libmfx is deprecated. Please run configure with --enable-libvpl to use libvpl instead." +elif enabled libvpl; then +# Consider pkg-config only. The name of libmfx is still passed to check_pkg_config function for --enable-libvpl option +# because QSV has dependency on libmfx, we can use the same dependency if using libmfx in this check. The package name +# is extracted from "vpl >= 2.6" + check_pkg_config libmfx "vpl >= 2.6" "mfxvideo.h mfxdispatcher.h" MFXLoad || \ + die "ERROR: libvpl >= 2.6 not found" + add_cflags -DMFX_DEPRECATED_OFF + check_type "vpl/mfxdefs.h vpl/mfxvideo.h" "struct mfxConfigInterface" +fi if enabled libmfx; then - check_cc MFX_CODEC_VP9 "mfx/mfxvp9.h mfx/mfxstructures.h" "MFX_CODEC_VP9" + check_cc MFX_CODEC_VP9 "mfxdefs.h mfxstructures.h" "MFX_CODEC_VP9" fi enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load @@ -6598,11 +6965,13 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && { check_pkg_config libopencv opencv opencv2/core/core_c.h cvCreateImageHeader || require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } -enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion +enabled libopenh264 && require_pkg_config libopenh264 "openh264 >= 1.3.0" wels/codec_api.h WelsGetCodecVersion enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" -enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api +enabled libopenvino && { { check_pkg_config libopenvino openvino openvino/c/openvino.h ov_core_create && enable openvino2; } || + { check_pkg_config libopenvino openvino c_api/ie_c_api.h ie_c_api_version || + require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api; } } enabled libopus && { enabled libopus_decoder && { require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create @@ -6613,10 +6982,12 @@ enabled libopus && { } enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaudio.h pa_context_new +enabled libqrencode && require_pkg_config libqrencode libqrencode qrencode.h QRcode_encodeString +enabled libquirc && require libquirc quirc.h quirc_decode -lquirc enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection -enabled librav1e && require_pkg_config librav1e "rav1e >= 0.4.0" rav1e.h rav1e_context_new +enabled librav1e && require_pkg_config librav1e "rav1e >= 0.5.0" rav1e.h rav1e_context_new enabled librist && require_pkg_config librist "librist >= 0.2.7" librist/librist.h rist_receiver_create -enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo +enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_new_from_data enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++" enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize @@ -6625,7 +6996,7 @@ enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbcli require libsmbclient libsmbclient.h smbc_init -lsmbclient; } enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init +enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/sftp.h sftp_init enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle @@ -6633,6 +7004,7 @@ enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Versi enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg enabled libtls && require_pkg_config libtls libtls tls.h tls_configure +enabled libtorch && check_cxxflags -std=c++17 && require_cpp libtorch torch/torch.h "torch::Tensor" -ltorch -lc10 -ltorch_cpu -lstdc++ -lpthread enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame && { check_lib libtwolame twolame.h twolame_encode_buffer_float32_interleaved -ltwolame || die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; } @@ -6640,6 +7012,7 @@ enabled libuavs3d && require_pkg_config libuavs3d "uavs3d >= 1.1.41" uav enabled libv4l2 && require_pkg_config libv4l2 libv4l2 libv4l2.h v4l2_ioctl enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 2.0.0" libvmaf.h vmaf_init +enabled libvmaf && check_pkg_config libvmaf_cuda "libvmaf >= 2.0.0" libvmaf_cuda.h vmaf_cuda_state_init enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init && require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init @@ -6666,18 +7039,22 @@ enabled libvpx && { fi } +enabled libvvenc && require_pkg_config libvvenc "libvvenc >= 1.6.1" "vvenc/vvenc.h" vvenc_get_version enabled libwebp && { enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode && - require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && { + require_cpp_condition libx264 x264.h "X264_BUILD >= 155" && { [ "$toolchain" != "msvc" ] || require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } && + check_cpp_condition libx264_hdr10 x264.h "X264_BUILD >= 163" && check_cpp_condition libx262 x264.h "X264_MPEG2" enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && - require_cpp_condition libx265 x265.h "X265_BUILD >= 70" + require_cpp_condition libx265 x265.h "X265_BUILD >= 89" enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get +enabled libxevd && require_pkg_config libxevd "xevd >= 0.4.1" "xevd.h" xevd_decode +enabled libxeve && require_pkg_config libxeve "xeve >= 0.5.1" "xeve.h" xeve_encode enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled libzimg && require_pkg_config libzimg "zimg >= 2.7.0" zimg.h zimg_get_api_version enabled libzmq && require_pkg_config libzmq "libzmq >= 4.2.1" zmq.h zmq_ctx_new @@ -6697,13 +7074,14 @@ enabled mmal && { check_lib mmal interface/mmal/mmal.h mmal_port_co check_lib mmal interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host; } || die "ERROR: mmal not found" && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS"; } -enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do +enabled openal && { check_pkg_config openal "openal >= 1.1" "AL/al.h" alGetError || + { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do check_lib openal 'AL/al.h' alGetError "${al_extralibs}" && break; done } || die "ERROR: openal not found"; } && { test_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" || die "ERROR: openal must be installed and version must be 1.1 or compatible"; } enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || - check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel "-framework OpenCL" || check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || die "ERROR: opencl not found"; } && { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || @@ -6711,8 +7089,8 @@ enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueN die "ERROR: opencl must be installed and version must be 1.2 or compatible"; } enabled opengl && { check_lib opengl GL/glx.h glXGetProcAddress "-lGL" || check_lib opengl windows.h wglGetProcAddress "-lopengl32 -lgdi32" || - check_lib opengl OpenGL/gl3.h glGetError "-Wl,-framework,OpenGL" || - check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -Wl,-framework,OpenGLES" || + check_lib opengl OpenGL/gl3.h glGetError "-framework OpenGL" || + check_lib opengl ES2/gl.h glGetError "-isysroot=${sysroot} -framework OpenGLES" || die "ERROR: opengl not found." } enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoRequestIFrame || @@ -6738,7 +7116,7 @@ enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/r { enabled libdrm || die "ERROR: rkmpp requires --enable-libdrm"; } } -enabled vapoursynth && require_pkg_config vapoursynth "vapoursynth-script >= 42" VSScript.h vsscript_init +enabled vapoursynth && require_headers "vapoursynth/VSScript4.h vapoursynth/VapourSynth4.h" if enabled gcrypt; then @@ -6780,12 +7158,12 @@ if enabled decklink; then fi enabled securetransport && - check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && - check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" || + check_func SecIdentityCreate "-framework CoreFoundation -framework Security" && + check_lib securetransport "Security/SecureTransport.h Security/Security.h" "SSLCreateContext" "-framework CoreFoundation -framework Security" || disable securetransport enabled securetransport && - check_func SecItemImport "-Wl,-framework,CoreFoundation -Wl,-framework,Security" + check_func SecItemImport "-framework CoreFoundation -framework Security" enabled schannel && check_func_headers "windows.h security.h" InitializeSecurityContext -DSECURITY_WIN32 -lsecur32 && @@ -6803,11 +7181,13 @@ pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout xmllint --version > /dev/null 2>&1 && enable xmllint || disable xmllint +check_headers linux/fb.h +check_headers linux/videodev2.h +test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete +test_code cc sys/ioctl.h "int ioctl(int, int, ...)" && enable posix_ioctl + # check V4L2 codecs available in the API if enabled v4l2_m2m; then - check_headers linux/fb.h - check_headers linux/videodev2.h - test_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_sanitized struct_v4l2_frmivalenum_discrete check_cc v4l2_m2m linux/videodev2.h "int i = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_VIDEO_M2M | V4L2_BUF_FLAG_LAST;" check_cc vc1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_VC1_ANNEX_G;" check_cc mpeg1_v4l2_m2m linux/videodev2.h "int i = V4L2_PIX_FMT_MPEG1;" @@ -6852,8 +7232,7 @@ enabled alsa && { check_pkg_config alsa alsa "alsa/asoundlib.h" snd_pcm_htimesta enabled libjack && require_pkg_config libjack jack jack/jack.h jack_port_get_latency_range -enabled sndio && { check_pkg_config sndio sndio "sndio.h" sio_open || - check_lib sndio sndio.h sio_open -lsndio; } +enabled sndio && check_pkg_config sndio sndio sndio.h sio_open if enabled libcdio; then check_pkg_config libcdio libcdio_paranoia "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open || @@ -6874,9 +7253,8 @@ fi check_func_headers "windows.h" CreateDIBSection "$gdigrab_indev_extralibs" -# d3d11va requires linking directly to dxgi and d3d11 if not building for -# the desktop api partition -test_cpp < #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) @@ -6889,8 +7267,17 @@ test_cpp <= 0.35.0" "va/va.h" vaInitialize if enabled vaapi; then - check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM + case $target_os in + mingw32*|mingw64*|win32|win64) + check_pkg_config vaapi_win32 "libva-win32" "va/va_win32.h" vaGetDisplayWin32 + ;; + *) + check_pkg_config vaapi_drm "libva-drm" "va/va_drm.h" vaGetDisplayDRM + ;; + esac if enabled xlib_x11; then check_pkg_config vaapi_x11 "libva-x11" "va/va_x11.h" vaGetDisplay @@ -6917,6 +7311,7 @@ if enabled vaapi; then check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG" check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8" check_type "va/va.h va/va_enc_vp9.h" "VAEncPictureParameterBufferVP9" + check_type "va/va.h va/va_enc_av1.h" "VAEncPictureParameterBufferAV1" fi if enabled_all opencl libdrm ; then @@ -6945,22 +7340,29 @@ if enabled_all opencl d3d11va ; then enable opencl_d3d11 fi +if enabled_all opencl videotoolbox ; then + check_func_headers OpenCL/cl_gl_ext.h clCreateImageFromIOSurfaceWithPropertiesAPPLE -framework VideoToolbox -framework OpenCL && + enable opencl_videotoolbox +fi + enabled vdpau && check_cpp_condition vdpau vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" enabled vdpau && check_lib vdpau_x11 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau -lX11 -enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.h" DtsCrystalHDVersion -lcrystalhd - if enabled vulkan; then - check_pkg_config_header_only vulkan "vulkan >= 1.2.189" "vulkan/vulkan.h" "defined VK_VERSION_1_2" || - check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_3) || (defined(VK_VERSION_1_2) && VK_HEADER_VERSION >= 189)" + check_pkg_config_header_only vulkan "vulkan >= 1.3.277" "vulkan/vulkan.h" "defined VK_VERSION_1_3" || + check_cpp_condition vulkan "vulkan/vulkan.h" "defined(VK_VERSION_1_4) || (defined(VK_VERSION_1_3) && VK_HEADER_VERSION >= 277)" +fi + +if disabled vulkan; then + disable libglslang libshaderc spirv_compiler fi if enabled x86; then case $target_os in - mingw32*|mingw64*|win32|win64|linux|cygwin*) + freebsd|mingw32*|mingw64*|win32|win64|linux|cygwin*) ;; *) disable ffnvcodec cuvid nvdec nvenc @@ -6984,17 +7386,21 @@ enabled nvenc && test_cc -I$source_path < NV_ENCODE_API_FUNCTION_LIST flist; -void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_PRESET_HQ_GUID } }; } +void f(void) { struct { const GUID guid; } s[] = { { NV_ENC_CODEC_H264_GUID } }; } int main(void) { return 0; } EOF +if enabled nvenc; then + check_type "ffnvcodec/nvEncodeAPI.h" "NV_ENC_PIC_PARAMS_AV1" +fi + if enabled_any nvdec cuvid; then check_type "ffnvcodec/dynlink_cuda.h ffnvcodec/dynlink_cuviddec.h" "CUVIDAV1PICPARAMS" fi enabled amf && check_cpp_condition amf "AMF/core/Version.h" \ - "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400090000" + "(AMF_VERSION_MAJOR << 48 | AMF_VERSION_MINOR << 32 | AMF_VERSION_RELEASE << 16 | AMF_VERSION_BUILD_NUM) >= 0x0001000400210000" # Funny iconv installations are not unusual, so check it after all flags have been set if enabled libc_iconv; then @@ -7055,7 +7461,6 @@ void (^block)(void); EOF # add some linker flags -check_ldflags -Wl,--warn-common check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic @@ -7120,18 +7525,28 @@ fi check_optflags(){ check_cflags "$@" - enabled lto && check_ldflags "$@" + [ -n "$lto" ] && check_ldflags "$@" } check_optflags $optflags check_optflags -fno-math-errno check_optflags -fno-signed-zeros -if enabled lto; then +if [ -n "$lto" ]; then test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker" - check_cflags -flto - check_ldflags -flto $cpuflags + check_cflags $lto + check_ldflags $lto $cpuflags disable inline_asm_direct_symbol_refs + if test "$cc_type" = "clang"; then + # Clang's LTO fails on Windows, when there are references outside + # of inline assembly to nonlocal labels defined within inline assembly, + # see https://github.com/llvm/llvm-project/issues/76046. + case $target_os in + mingw32|win32) + disable inline_asm_nonlocal_labels + ;; + esac + fi fi enabled ftrapv && check_cflags -ftrapv @@ -7161,7 +7576,7 @@ if enabled icc; then # icc 11.0 and 11.1 work with ebp_available, but don't pass the test enable ebp_available # The test above does not test linking - enabled lto && disable symver_asm_label + [ -n "$lto" ] && disable symver_asm_label if enabled x86_32; then icc_version=$($cc -dumpversion) test ${icc_version%%.*} -ge 11 && @@ -7249,17 +7664,6 @@ elif enabled_any msvc icl; then fi # msvcrt10 x64 incorrectly enables log2, only msvcrt12 (MSVC 2013) onwards actually has log2. check_cpp_condition log2 crtversion.h "_VC_CRT_MAJOR_VERSION >= 12" - # The CRT headers contain __declspec(restrict) in a few places, but if redefining - # restrict, this might break. MSVC 2010 and 2012 fail with __declspec(__restrict) - # (as it ends up if the restrict redefine is done before including stdlib.h), while - # MSVC 2013 and newer can handle it fine. - # If this declspec fails, force including stdlib.h before the restrict redefinition - # happens in config.h. - if [ $restrict_keyword != restrict ]; then - test_cc <= 190024218" || @@ -7293,12 +7697,6 @@ esac enable frame_thread_encoder -# these filters depend on removed avcodec APIs -# they are kept disabled for now, but will be removed if -# nobody updates and re-enables them -disable mcdeint_filter -disable uspp_filter - enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } check_deps $CONFIG_LIST \ @@ -7308,6 +7706,12 @@ check_deps $CONFIG_LIST \ enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" +enabled threads || warn \ + "Threading support was disabled or is not available on the target platform." \ + "This means that not only is this build not multi-threaded, but also" \ + "that the libraries from this build MUST NOT be used in a multi-threaded"\ + "environment." + case $target_os in haiku) disable memalign @@ -7379,21 +7783,18 @@ for thread in $THREADS_LIST; do done if disabled stdatomic; then - if enabled atomics_gcc; then - add_cppflags '-I\$(SRC_PATH)/compat/atomics/gcc' - elif enabled atomics_win32; then + if enabled atomics_win32; then add_cppflags '-I\$(SRC_PATH)/compat/atomics/win32' - elif enabled atomics_suncc; then - add_cppflags '-I\$(SRC_PATH)/compat/atomics/suncc' - elif enabled pthreads; then - add_compat atomics/pthread/stdatomic.o - add_cppflags '-I\$(SRC_PATH)/compat/atomics/pthread' else enabled threads && die "Threading is enabled, but no atomics are available" add_cppflags '-I\$(SRC_PATH)/compat/atomics/dummy' fi fi +check_builtin stdbit "stdbit.h assert.h" \ + 'static_assert(__STDC_VERSION_STDBIT_H__ >= 202311L, "Compiler lacks stdbit.h")' || \ + add_cppflags '-I\$(SRC_PATH)/compat/stdbit' + # Check if requested libraries were found. for lib in $AUTODETECT_LIBS; do requested $lib && ! enabled $lib && die "ERROR: $lib requested but not found"; @@ -7404,19 +7805,20 @@ enabled zlib && add_cppflags -DZLIB_CONST # conditional library dependencies, in any order enabled amovie_filter && prepend avfilter_deps "avformat avcodec" enabled aresample_filter && prepend avfilter_deps "swresample" -enabled bm3d_filter && prepend avfilter_deps "avcodec" enabled cover_rect_filter && prepend avfilter_deps "avformat avcodec" enabled ebur128_filter && enabled swresample && prepend avfilter_deps "swresample" enabled elbg_filter && prepend avfilter_deps "avcodec" enabled find_rect_filter && prepend avfilter_deps "avformat avcodec" -enabled firequalizer_filter && prepend avfilter_deps "avcodec" +enabled fsync_filter && prepend avfilter_deps "avformat" enabled mcdeint_filter && prepend avfilter_deps "avcodec" -enabled movie_filter && prepend avfilter_deps "avformat avcodec" +enabled movie_filter && prepend avfilter_deps "avformat avcodec" enabled pan_filter && prepend avfilter_deps "swresample" enabled pp_filter && prepend avfilter_deps "postproc" +enabled qrencode_filter && prepend avfilter_deps "swscale" +enabled qrencodesrc_filter && prepend avfilter_deps "swscale" enabled removelogo_filter && prepend avfilter_deps "avformat avcodec swscale" enabled sab_filter && prepend avfilter_deps "swscale" -enabled scale_filter && prepend avfilter_deps "swscale" +enabled scale_filter && prepend avfilter_deps "swscale" enabled scale2ref_filter && prepend avfilter_deps "swscale" enabled showcqt_filter && prepend avfilter_deps "avformat swscale" enabled signature_filter && prepend avfilter_deps "avcodec avformat" @@ -7518,7 +7920,8 @@ if enabled x86; then fi if enabled aarch64; then echo "NEON enabled ${neon-no}" - echo "VFP enabled ${vfp-no}" + echo "DOTPROD enabled ${dotprod-no}" + echo "I8MM enabled ${i8mm-no}" fi if enabled arm; then echo "ARMv5TE enabled ${armv5te-no}" @@ -7546,6 +7949,10 @@ if enabled loongarch; then echo "LSX enabled ${lsx-no}" echo "LASX enabled ${lasx-no}" fi +if enabled riscv; then + echo "RISC-V CBO Prefetch ${rv_zicbop-no}" + echo "RISC-V Vector enabled ${rvv-no}" +fi echo "debug symbols ${debug-no}" echo "strip symbols ${stripping-no}" echo "optimize for size ${small-no}" @@ -7773,6 +8180,7 @@ SAMPLES:=${samples:-\$(FATE_SAMPLES)} NOREDZONE_FLAGS=$noredzone_flags LIBFUZZER_PATH=$libfuzzer_path IGNORE_TESTS=$ignore_tests +VERSION_TRACKING=$version_tracking EOF map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> ffbuild/config.mak' $LIBRARY_LIST @@ -7787,17 +8195,15 @@ cat > $TMPH <>$TMPH +enabled aarch64 && + echo "#define AS_ARCH_LEVEL $as_arch_level" >>$TMPH + if enabled x86asm; then append config_files $TMPASM cat > $TMPASM < $@ + $(M)doc/print_options$(HOSTEXESUF) $* > $@ doc/%.html: TAG = HTML doc/%-all.html: TAG = HTML diff --git a/mythtv/external/FFmpeg/doc/authors.texi b/mythtv/external/FFmpeg/doc/authors.texi index 6c8c1d7efad..ce088392f88 100644 --- a/mythtv/external/FFmpeg/doc/authors.texi +++ b/mythtv/external/FFmpeg/doc/authors.texi @@ -3,9 +3,9 @@ The FFmpeg developers. For details about the authorship, see the Git history of the project -(git://source.ffmpeg.org/ffmpeg), e.g. by typing the command +(https://git.ffmpeg.org/ffmpeg), e.g. by typing the command @command{git log} in the FFmpeg source directory, or browsing the -online repository at @url{http://source.ffmpeg.org}. +online repository at @url{https://git.ffmpeg.org/ffmpeg}. Maintainers for the specific components are listed in the file @file{MAINTAINERS} in the source code tree. diff --git a/mythtv/external/FFmpeg/doc/bitstream_filters.texi b/mythtv/external/FFmpeg/doc/bitstream_filters.texi index 50c95f035d2..e1cb87a522f 100644 --- a/mythtv/external/FFmpeg/doc/bitstream_filters.texi +++ b/mythtv/external/FFmpeg/doc/bitstream_filters.texi @@ -101,6 +101,29 @@ Remove zero padding at the end of a packet. Extract the core from a DCA/DTS stream, dropping extensions such as DTS-HD. +@section dovi_rpu + +Manipulate Dolby Vision metadata in a HEVC/AV1 bitstream, optionally enabling +metadata compression. + +@table @option +@item strip +If enabled, strip all Dolby Vision metadata (configuration record + RPU data +blocks) from the stream. +@item compression +Which compression level to enable. +@table @samp +@item none +No metadata compression. +@item limited +Limited metadata compression scheme. Should be compatible with most devices. +This is the default. +@item extended +Extended metadata compression. Devices are not required to support this. Note +that this level currently behaves the same as @samp{limited} in libavcodec. +@end table +@end table + @section dump_extra Add extradata to the beginning of the filtered packets except when @@ -199,6 +222,13 @@ Identical to @option{pass_types}, except the units in the given set removed and all others passed through. @end table +The types used by pass_types and remove_types correspond to NAL unit types +(nal_unit_type) in H.264, HEVC and H.266 (see Table 7-1 in the H.264 +and HEVC specifications or Table 5 in the H.266 specification), to +marker values for JPEG (without 0xFF prefix) and to start codes without +start code prefix (i.e. the byte following the 0x000001) for MPEG-2. +For VP8 and VP9, every unit has type zero. + Extradata is unchanged by this transformation, but note that if the stream contains inline parameter sets then the output may be unusable if they are removed. @@ -213,6 +243,21 @@ To remove all AUDs, SEI and filler from an H.265 stream: ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=35|38-40' OUTPUT @end example +To remove all user data from a MPEG-2 stream, including Closed Captions: +@example +ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=178' OUTPUT +@end example + +To remove all SEI from a H264 stream, including Closed Captions: +@example +ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=6' OUTPUT +@end example + +To remove all prefix and suffix SEI from a HEVC stream, including Closed Captions and dynamic HDR: +@example +ffmpeg -i INPUT -c:v copy -bsf:v 'filter_units=remove_types=39|40' OUTPUT +@end example + @section hapqa_extract Extract Rgb or Alpha part of an HAPQA file, without recompression, in order to create an HAPQ or an HAPAlphaOnly file. @@ -382,9 +427,6 @@ This applies a specific fixup to some Blu-ray streams which contain redundant PPSs modifying irrelevant parameters of the stream which confuse other transformations which require correct extradata. -A new single global PPS is created, and all of the redundant PPSs -within the stream are removed. - @section hevc_metadata Modify metadata embedded in an HEVC stream. @@ -437,6 +479,10 @@ will replace the current ones if the stream is already cropped. These fields are set in pixels. Note that some sizes may not be representable if the chroma is subsampled (H.265 section 7.4.3.2.1). +@item width +@item height +Set width and height after crop. + @item level Set the level in the VPS and SPS. See H.265 section A.4 and tables A.6 and A.7. @@ -531,10 +577,6 @@ metadata header from each subtitle packet. See also the @ref{text2movsub} filter. -@section mp3decomp - -Decompress non-standard compressed MP3 audio headers. - @section mpeg2_metadata Modify metadata embedded in an MPEG-2 stream. @@ -885,6 +927,15 @@ The sample rate of stream packet belongs. The AV_NOPTS_VALUE constant. @end table +For example, to set PTS equal to DTS (not recommended if B-frames are involved): +@example +ffmpeg -i INPUT -c:a copy -bsf:a setts=pts=DTS out.mkv +@end example + +@section showinfo +Log basic packet information. Mainly useful for testing, debugging, +and development. + @anchor{text2movsub} @section text2movsub diff --git a/mythtv/external/FFmpeg/doc/bootstrap.min.css b/mythtv/external/FFmpeg/doc/bootstrap.min.css index 6f68017d584..45bf263d6e6 100644 --- a/mythtv/external/FFmpeg/doc/bootstrap.min.css +++ b/mythtv/external/FFmpeg/doc/bootstrap.min.css @@ -2,4 +2,4 @@ * Bootstrap v3.2.0 (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} + *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} diff --git a/mythtv/external/FFmpeg/doc/codecs.texi b/mythtv/external/FFmpeg/doc/codecs.texi index 5e100209001..6bdeb664e72 100644 --- a/mythtv/external/FFmpeg/doc/codecs.texi +++ b/mythtv/external/FFmpeg/doc/codecs.texi @@ -3,7 +3,7 @@ @c man begin CODEC OPTIONS libavcodec provides some generic global options, which can be set on -all the encoders and decoders. In addition each codec may support +all the encoders and decoders. In addition, each codec may support so-called private options, which are specific for a given codec. Sometimes, a global option may only affect a specific kind of codec, @@ -644,6 +644,8 @@ for codecs that support it. See also @file{doc/examples/export_mvs.c}. Do not skip samples and export skip information as frame side data. @item ass_ro_flush_noop Do not reset ASS ReadOrder field on flush. +@item icc_profiles +Generate/parse embedded ICC profiles from/to colorimetry tags. @end table @item export_side_data @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) @@ -695,10 +697,13 @@ profiles are documented in the relevant encoder documentation. @item level @var{integer} (@emph{encoding,audio,video}) +Set the encoder level. This level depends on the specific codec, and +might correspond to the profile level. It is set by default to +@samp{unknown}. + Possible values: @table @samp @item unknown - @end table @item lowres @var{integer} (@emph{decoding,audio,video}) @@ -762,18 +767,11 @@ Set rate-distortion optimal quantization. @item compression_level @var{integer} (@emph{encoding,audio,video}) @item bits_per_raw_sample @var{integer} @item channel_layout @var{integer} (@emph{decoding/encoding,audio}) +See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils} +for the required syntax. -Possible values: -@table @samp -@end table -@item request_channel_layout @var{integer} (@emph{decoding,audio}) - -Possible values: -@table @samp -@end table @item rc_max_vbv_use @var{float} (@emph{encoding,video}) @item rc_min_vbv_use @var{float} (@emph{encoding,video}) -@item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video}) @item color_primaries @var{integer} (@emph{decoding/encoding,video}) Possible values: @@ -888,9 +886,11 @@ Possible values: @table @samp @item tv @item mpeg +@item limited MPEG (219*2^(n-8)) @item pc @item jpeg +@item full JPEG (2^n-1) @end table diff --git a/mythtv/external/FFmpeg/doc/community.texi b/mythtv/external/FFmpeg/doc/community.texi new file mode 100644 index 00000000000..97a49f15ede --- /dev/null +++ b/mythtv/external/FFmpeg/doc/community.texi @@ -0,0 +1,182 @@ +\input texinfo @c -*- texinfo -*- +@documentencoding UTF-8 + +@settitle Community +@titlepage +@center @titlefont{Community} +@end titlepage + +@top + +@contents + +@anchor{Organisation} +@chapter Organisation + +The FFmpeg project is organized through a community working on global consensus. + +Decisions are taken by the ensemble of active members, through voting and are aided by two committees. + +@anchor{General Assembly} +@chapter General Assembly + +The ensemble of active members is called the General Assembly (GA). + +The General Assembly is sovereign and legitimate for all its decisions regarding the FFmpeg project. + +The General Assembly is made up of active contributors. + +Contributors are considered "active contributors" if they have authored more than 20 patches in the last 36 months in the main FFmpeg repository, or if they have been voted in by the GA. + +The list of active contributors is updated twice each year, on 1st January and 1st July, 0:00 UTC. + +Additional members are added to the General Assembly through a vote after proposal by a member of the General Assembly. They are part of the GA for two years, after which they need a confirmation by the GA. + +A script to generate the current members of the general assembly (minus members voted in) can be found in `tools/general_assembly.pl`. + +@anchor{Voting} +@chapter Voting + +Voting is done using a ranked voting system, currently running on https://vote.ffmpeg.org/ . + +Majority vote means more than 50% of the expressed ballots. + +@anchor{Technical Committee} +@chapter Technical Committee + +The Technical Committee (TC) is here to arbitrate and make decisions when technical conflicts occur in the project. They will consider the merits of all the positions, judge them and make a decision. + +The TC resolves technical conflicts but is not a technical steering committee. + +Decisions by the TC are binding for all the contributors. + +Decisions made by the TC can be re-opened after 1 year or by a majority vote of the General Assembly, requested by one of the member of the GA. + +The TC is elected by the General Assembly for a duration of 1 year, and is composed of 5 members. Members can be re-elected if they wish. A majority vote in the General Assembly can trigger a new election of the TC. + +The members of the TC can be elected from outside of the GA. Candidates for election can either be suggested or self-nominated. + +The conflict resolution process is detailed in the resolution process document. + +The TC can be contacted at . + +@anchor{Resolution Process} +@section Resolution Process + +The Technical Committee (TC) is here to arbitrate and make decisions when technical conflicts occur in the project. + +The TC main role is to resolve technical conflicts. It is therefore not a technical steering committee, but it is understood that some decisions might impact the future of the project. + +@subsection Seizing + +The TC can take possession of any technical matter that it sees fit. + +To involve the TC in a matter, email tc@ or CC them on an ongoing discussion. + +As members of TC are developers, they also can email tc@ to raise an issue. +@subsection Announcement + +The TC, once seized, must announce itself on the main mailing list, with a [TC] tag. + +The TC has 2 modes of operation: a RFC one and an internal one. + +If the TC thinks it needs the input from the larger community, the TC can call for a RFC. Else, it can decide by itself. + +The decision to use a RFC process or an internal discussion is a discretionary decision of the TC. + +The TC can also reject a seizure for a few reasons such as: the matter was not discussed enough previously; it lacks expertise to reach a beneficial decision on the matter; or the matter is too trivial. +@subsection RFC call + +In the RFC mode, one person from the TC posts on the mailing list the technical question and will request input from the community. + +The mail will have the following specification: + + a precise title + a specific tag [TC RFC] + a top-level email + contain a precise question that does not exceed 100 words and that is answerable by developers + may have an extra description, or a link to a previous discussion, if deemed necessary, + contain a precise end date for the answers. + +The answers from the community must be on the main mailing list and must have the following specification: + + keep the tag and the title unchanged + limited to 400 words + a first-level, answering directly to the main email + answering to the question. + +Further replies to answers are permitted, as long as they conform to the community standards of politeness, they are limited to 100 words, and are not nested more than once. (max-depth=2) + +After the end-date, mails on the thread will be ignored. + +Violations of those rules will be escalated through the Community Committee. + +After all the emails are in, the TC has 96 hours to give its final decision. Exceptionally, the TC can request an extra delay, that will be notified on the mailing list. +@subsection Within TC + +In the internal case, the TC has 96 hours to give its final decision. Exceptionally, the TC can request an extra delay. +@subsection Decisions + +The decisions from the TC will be sent on the mailing list, with the [TC] tag. + +Internally, the TC should take decisions with a majority, or using ranked-choice voting. + +Each TC member must vote on such decision according to what is, in their view, best for the project. + +If a TC member feels they are affected by a conflict of interest with regards to the case, they should announce it and recuse themselves from the TC +discussion and vote. + +A conflict of interest is presumed to occur when a TC member has a personal interest (e.g. financial) in a specific outcome of the case. + +The decision from the TC should be published with a summary of the reasons that lead to this decision. + +The decisions from the TC are final, until the matters are reopened after no less than one year. + +@anchor{Community Committee} +@chapter Community Committee + +The Community Committee (CC) is here to arbitrage and make decisions when inter-personal conflicts occur in the project. It will decide quickly and take actions, for the sake of the project. + +The CC can remove privileges of offending members, including removal of commit access and temporary ban from the community. + +Decisions made by the CC can be re-opened after 1 year or by a majority vote of the General Assembly. Indefinite bans from the community must be confirmed by the General Assembly, in a majority vote. + +The CC is elected by the General Assembly for a duration of 1 year, and is composed of 5 members. Members can be re-elected if they wish. A majority vote in the General Assembly can trigger a new election of the CC. + +The members of the CC can be elected from outside of the GA. Candidates for election can either be suggested or self-nominated. + +The CC is governed by and responsible for enforcing the Code of Conduct. + +The CC can be contacted at . + +@anchor{Code of Conduct} +@chapter Code of Conduct + +Be friendly and respectful towards others and third parties. +Treat others the way you yourself want to be treated. + +Be considerate. Not everyone shares the same viewpoint and priorities as you do. +Different opinions and interpretations help the project. +Looking at issues from a different perspective assists development. + +Do not assume malice for things that can be attributed to incompetence. Even if +it is malice, it's rarely good to start with that as initial assumption. + +Stay friendly even if someone acts contrarily. Everyone has a bad day +once in a while. +If you yourself have a bad day or are angry then try to take a break and reply +once you are calm and without anger if you have to. + +Try to help other team members and cooperate if you can. + +The goal of software development is to create technical excellence, not for any +individual to be better and "win" against the others. Large software projects +are only possible and successful through teamwork. + +If someone struggles do not put them down. Give them a helping hand +instead and point them in the right direction. + +Finally, keep in mind the immortal words of Bill and Ted, +"Be excellent to each other." + +@bye diff --git a/mythtv/external/FFmpeg/doc/decoders.texi b/mythtv/external/FFmpeg/doc/decoders.texi index e2fcbf5dc93..17bb361ffa5 100644 --- a/mythtv/external/FFmpeg/doc/decoders.texi +++ b/mythtv/external/FFmpeg/doc/decoders.texi @@ -38,6 +38,51 @@ Select an operating point of a scalable AV1 bitstream (0 - 31). Default is 0. @end table +@section hevc +HEVC (AKA ITU-T H.265 or ISO/IEC 23008-2) decoder. + +The decoder supports MV-HEVC multiview streams with at most two views. Views to +be output are selected by supplying a list of view IDs to the decoder (the +@option{view_ids} option). This option may be set either statically before +decoder init, or from the @code{get_format()} callback - useful for the case +when the view count or IDs change dynamically during decoding. + +Only the base layer is decoded by default. + +Note that if you are using the @code{ffmpeg} CLI tool, you should be using view +specifiers as documented in its manual, rather than the options documented here. + +@subsection Options + +@table @option + +@item view_ids (MV-HEVC) +Specify a list of view IDs that should be output. This option can also be set to +a single '-1', which will cause all views defined in the VPS to be decoded and +output. + +@item view_ids_available (MV-HEVC) +This option may be read by the caller to retrieve an array of view IDs available +in the active VPS. The array is empty for single-layer video. + +The value of this option is guaranteed to be accurate when read from the +@code{get_format()} callback. It may also be set at other times (e.g. after +opening the decoder), but the value is informational only and may be incorrect +(e.g. when the stream contains multiple distinct VPS NALUs). + +@item view_pos_available (MV-HEVC) +This option may be read by the caller to retrieve an array of view positions +(left, right, or unspecified) available in the active VPS, as +@code{AVStereo3DView} values. When the array is available, its elements apply to +the corresponding elements of @option{view_ids_available}, i.e. +@code{view_pos_available[i]} contains the position of view with ID +@code{view_ids_available[i]}. + +Same validity restrictions as for @option{view_ids_available} apply to +this option. + +@end table + @section rawvideo Raw video decoder. @@ -77,13 +122,17 @@ The following options are supported by the libdav1d wrapper. @item framethreads Set amount of frame threads to use during decoding. The default value is 0 (autodetect). This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the -global option @code{threads} instead. +option @code{max_frame_delay} and the global option @code{threads} instead. @item tilethreads Set amount of tile threads to use during decoding. The default value is 0 (autodetect). This option is deprecated for libdav1d >= 1.0 and will be removed in the future. Use the global option @code{threads} instead. +@item max_frame_delay +Set max amount of frames the decoder may buffer internally. The default value is 0 +(autodetect). + @item filmgrain Apply film grain to the decoded video if present in the bitstream. Defaults to the internal default of the library. @@ -126,10 +175,34 @@ Set amount of frame threads to use during decoding. The default value is 0 (auto @end table +@section libxevd + +eXtra-fast Essential Video Decoder (XEVD) MPEG-5 EVC decoder wrapper. + +This decoder requires the presence of the libxevd headers and library +during configuration. You need to explicitly configure the build with +@option{--enable-libxevd}. + +The xevd project website is at @url{https://github.com/mpeg5/xevd}. + +@subsection Options + +The following options are supported by the libxevd wrapper. +The xevd-equivalent options or values are listed in parentheses for easy migration. + +To get a more accurate and extensive documentation of the libxevd options, +invoke the command @code{xevd_app --help} or consult the libxevd documentation. + +@table @option +@item threads (@emph{threads}) +Force to use a specific number of threads + +@end table + @section QSV Decoders The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC, -JPEG/MJPEG, VP8, VP9, AV1). +JPEG/MJPEG, VP8, VP9, AV1, VVC). @subsection Common Options @@ -349,6 +422,169 @@ Enabled by default. @end table +@section libaribcaption + +Yet another ARIB STD-B24 caption decoder using external @dfn{libaribcaption} +library. + +Implements profiles A and C of the Japanse ARIB STD-B24 standard, +Brazilian ABNT NBR 15606-1, and Philippines version of ISDB-T. + +Requires the presence of the libaribcaption headers and library +(@url{https://github.com/xqq/libaribcaption}) during configuration. +You need to explicitly configure the build with @code{--enable-libaribcaption}. +If both @dfn{libaribb24} and @dfn{libaribcaption} are enabled, @dfn{libaribcaption} +decoder precedes. + +@subsection libaribcaption Decoder Options + +@table @option + +@item -sub_type @var{subtitle_type} +Specifies the format of the decoded subtitles. + +@table @samp +@item bitmap +Graphical image. +@item ass +ASS formatted text. +@item text +Simple text based output without formatting. +@end table + +The default is @dfn{ass} as same as @dfn{libaribb24} decoder. +Some present players (e.g., @dfn{mpv}) expect ASS format for ARIB caption. + +@item -caption_encoding @var{encoding_scheme} +Specifies the encoding scheme of input subtitle text. + +@table @samp +@item auto +Automatically detect text encoding (default). +@item jis +8bit-char JIS encoding defined in ARIB STD B24. +This encoding used in Japan for ISDB captions. +@item utf8 +UTF-8 encoding defined in ARIB STD B24. +This encoding is used in Philippines for ISDB-T captions. +@item latin +Latin character encoding defined in ABNT NBR 15606-1. +This encoding is used in South America for SBTVD / ISDB-Tb captions. +@end table + +@item -font @var{font_name[,font_name2,...]} +Specify comma-separated list of font family names to be used for @dfn{bitmap} +or @dfn{ass} type subtitle rendering. +Only first font name is used for @dfn{ass} type subtitle. + +If not specified, use internaly defined default font family. + +@item -ass_single_rect @var{boolean} +ARIB STD-B24 specifies that some captions may be displayed at different +positions at a time (multi-rectangle subtitle). +Since some players (e.g., old @dfn{mpv}) can't handle multiple ASS rectangles +in a single AVSubtitle, or multiple ASS rectangles of indeterminate duration +with the same start timestamp, this option can change the behavior so that +all the texts are displayed in a single ASS rectangle. + +The default is @var{false}. + +If your player cannot handle AVSubtitles with multiple ASS rectangles properly, +set this option to @var{true} or define @env{ASS_SINGLE_RECT=1} to change +default behavior at compilation. + +@item -force_outline_text @var{boolean} +Specify whether always render outline text for all characters regardless of +the indication by charactor style. + +The default is @var{false}. + +@item -outline_width @var{number} (0.0 - 3.0) +Specify width for outline text, in dots (relative). + +The default is @var{1.5}. + +@item -ignore_background @var{boolean} +Specify whether to ignore background color rendering. + +The default is @var{false}. + +@item -ignore_ruby @var{boolean} +Specify whether to ignore rendering for ruby-like (furigana) characters. + +The default is @var{false}. + +@item -replace_drcs @var{boolean} +Specify whether to render replaced DRCS characters as Unicode characters. + +The default is @var{true}. + +@item -replace_msz_ascii @var{boolean} +Specify whether to replace MSZ (Middle Size; half width) fullwidth +alphanumerics with halfwidth alphanumerics. + +The default is @var{true}. + +@item -replace_msz_japanese @var{boolean} +Specify whether to replace some MSZ (Middle Size; half width) fullwidth +japanese special characters with halfwidth ones. + +The default is @var{true}. + +@item -replace_msz_glyph @var{boolean} +Specify whether to replace MSZ (Middle Size; half width) characters +with halfwidth glyphs if the fonts supports it. +This option works under FreeType or DirectWrite renderer +with Adobe-Japan1 compliant fonts. +e.g., IBM Plex Sans JP, Morisawa BIZ UDGothic, Morisawa BIZ UDMincho, +Yu Gothic, Yu Mincho, and Meiryo. + +The default is @var{true}. + +@item -canvas_size @var{image_size} +Specify the resolution of the canvas to render subtitles to; usually, this +should be frame size of input video. +This only applies when @code{-subtitle_type} is set to @var{bitmap}. + +The libaribcaption decoder assumes input frame size for bitmap rendering as below: +@enumerate +@item +PROFILE_A : 1440 x 1080 with SAR (PAR) 4:3 +@item +PROFILE_C : 320 x 180 with SAR (PAR) 1:1 +@end enumerate + +If actual frame size of input video does not match above assumption, +the rendered captions may be distorted. +To make the captions undistorted, add @code{-canvas_size} option to specify +actual input video size. + +Note that the @code{-canvas_size} option is not required for video with +different size but same aspect ratio. +In such cases, the caption will be stretched or shrunk to actual video size +if @code{-canvas_size} option is not specified. +If @code{-canvas_size} option is specified with different size, +the caption will be stretched or shrunk as specified size with calculated SAR. + +@end table + +@subsection libaribcaption decoder usage examples + +Display MPEG-TS file with ARIB subtitle by @code{ffplay} tool: +@example +ffplay -sub_type bitmap MPEG.TS +@end example + +Display MPEG-TS file with input frame size 1920x1080 by @code{ffplay} tool: +@example +ffplay -sub_type bitmap -canvas_size 1920x1080 MPEG.TS +@end example + +Embed ARIB subtitle in transcoded video: +@example +ffmpeg -sub_type bitmap -i src.m2t -filter_complex "[0:v][0:s]overlay" -vcodec h264 dest.mp4 +@end example + @section dvbsub @subsection Options diff --git a/mythtv/external/FFmpeg/doc/demuxers.texi b/mythtv/external/FFmpeg/doc/demuxers.texi index 2b6dd86c2a7..04293c48138 100644 --- a/mythtv/external/FFmpeg/doc/demuxers.texi +++ b/mythtv/external/FFmpeg/doc/demuxers.texi @@ -285,11 +285,199 @@ This demuxer accepts the following option: @end table +@section dvdvideo + +DVD-Video demuxer, powered by libdvdnav and libdvdread. + +Can directly ingest DVD titles, specifically sequential PGCs, into +a conversion pipeline. Menu assets, such as background video or audio, +can also be demuxed given the menu's coordinates (at best effort). +Seeking is not supported at this time. + +Block devices (DVD drives), ISO files, and directory structures are accepted. +Activate with @code{-f dvdvideo} in front of one of these inputs. + +This demuxer does NOT have decryption code of any kind. You are on your own +working with encrypted DVDs, and should not expect support on the matter. + +Underlying playback is handled by libdvdnav, and structure parsing by libdvdread. +FFmpeg must be built with GPL library support available as well as the +configure switches @code{--enable-libdvdnav} and @code{--enable-libdvdread}. + +You will need to provide either the desired "title number" or exact PGC/PG coordinates. +Many open-source DVD players and tools can aid in providing this information. +If not specified, the demuxer will default to title 1 which works for many discs. +However, due to the flexibility of the format, it is recommended to check manually. +There are many discs that are authored strangely or with invalid headers. + +If the input is a real DVD drive, please note that there are some drives which may +silently fail on reading bad sectors from the disc, returning random bits instead +which is effectively corrupt data. This is especially prominent on aging or rotting discs. +A second pass and integrity checks would be needed to detect the corruption. +This is not an FFmpeg issue. + +@subsection Background + +DVD-Video is not a directly accessible, linear container format in the +traditional sense. Instead, it allows for complex and programmatic playback of +carefully muxed MPEG-PS streams that are stored in headerless VOB files. +To the end-user, these streams are known simply as "titles", but the actual +logical playback sequence is defined by one or more "PGCs", or Program Group Chains, +within the title. The PGC is in turn comprised of multiple "PGs", or Programs", +which are the actual video segments (and for a typical video feature, sequentially +ordered). The PGC structure, along with stream layout and metadata, are stored in +IFO files that need to be parsed. PGCs can be thought of as playlists in easier terms. + +An actual DVD player relies on user GUI interaction via menus and an internal VM +to drive the direction of demuxing. Generally, the user would either navigate (via menus) +or automatically be redirected to the PGC of their choice. During this process and +the subsequent playback, the DVD player's internal VM also maintains a state and +executes instructions that can create jumps to different sectors during playback. +This is why libdvdnav is involved, as a linear read of the MPEG-PS blobs on the +disc (VOBs) is not enough to produce the right sequence in many cases. + +There are many other DVD structures (a long subject) that will not be discussed here. +NAV packets, in particular, are handled by this demuxer to build accurate timing +but not emitted as a stream. For a good high-level understanding, refer to: +@url{https://code.videolan.org/videolan/libdvdnav/-/blob/master/doc/dvd_structures} + +@subsection Options + +This demuxer accepts the following options: + +@table @option + +@item title @var{int} +The title number to play. Must be set if @option{pgc} and @option{pg} are not set. +Not applicable to menus. +Default is 0 (auto), which currently only selects the first available title (title 1) +and notifies the user about the implications. + +@item chapter_start @var{int} +The chapter, or PTT (part-of-title), number to start at. Not applicable to menus. +Default is 1. + +@item chapter_end @var{int} +The chapter, or PTT (part-of-title), number to end at. Not applicable to menus. +Default is 0, which is a special value to signal end at the last possible chapter. + +@item angle @var{int} +The video angle number, referring to what is essentially an additional +video stream that is composed from alternate frames interleaved in the VOBs. +Not applicable to menus. +Default is 1. + +@item region @var{int} +The region code to use for playback. Some discs may use this to default playback +at a particular angle in different regions. This option will not affect the region code +of a real DVD drive, if used as an input. Not applicable to menus. +Default is 0, "world". + +@item menu @var{bool} +Demux menu assets instead of navigating a title. Requires exact coordinates +of the menu (@option{menu_lu}, @option{menu_vts}, @option{pgc}, @option{pg}). +Default is false. + +@item menu_lu @var{int} +The menu language to demux. In DVD, menus are grouped by language. +Default is 0, the first language unit. + +@item menu_vts @var{int} +The VTS where the menu lives, or 0 if it is a VMG menu (root-level). +Default is 0, VMG menu. + +@item pgc @var{int} +The entry PGC to start playback, in conjunction with @option{pg}. +Alternative to setting @option{title}. +Chapter markers are not supported at this time. +Must be explicitly set for menus. +Default is 0, automatically resolve from value of @option{title}. + +@item pg @var{int} +The entry PG to start playback, in conjunction with @option{pgc}. +Alternative to setting @option{title}. +Chapter markers are not supported at this time. +Default is 0, automatically resolve from value of @option{title}, or +start from the beginning (PG 1) of the menu. + +@item preindex @var{bool} +Enable this to have accurate chapter (PTT) markers and duration measurement, +which requires a slow second pass read in order to index the chapter marker +timestamps from NAV packets. This is non-ideal extra work for real optical drives. +It is recommended and faster to use this option with a backup of the DVD structure +stored on a hard drive. Not compatible with @option{pgc} and @option{pg}. +Not applicable to menus. +Default is 0, false. + +@item trim @var{bool} +Skip padding cells (i.e. cells shorter than 1 second) from the beginning. +There exist many discs with filler segments at the beginning of the PGC, +often with junk data intended for controlling a real DVD player's +buffering speed and with no other material data value. +Not applicable to menus. +Default is 1, true. + +@end table + +@subsection Examples + +@itemize +@item +Open title 3 from a given DVD structure: +@example +ffmpeg -f dvdvideo -title 3 -i ... +@end example + +@item +Open chapters 3-6 from title 1 from a given DVD structure: +@example +ffmpeg -f dvdvideo -chapter_start 3 -chapter_end 6 -title 1 -i ... +@end example + +@item +Open only chapter 5 from title 1 from a given DVD structure: +@example +ffmpeg -f dvdvideo -chapter_start 5 -chapter_end 5 -title 1 -i ... +@end example + +@item +Demux menu with language 1 from VTS 1, PGC 1, starting at PG 1: +@example +ffmpeg -f dvdvideo -menu 1 -menu_lu 1 -menu_vts 1 -pgc 1 -pg 1 -i ... +@end example +@end itemize + +@section ea + +Electronic Arts Multimedia format demuxer. + +This format is used by various Electronic Arts games. + +@subsection Options + +@table @option + +@item merge_alpha @var{bool} + +Normally the VP6 alpha channel (if exists) is returned as a secondary video +stream, by setting this option you can make the demuxer return a single video +stream which contains the alpha channel in addition to the ordinary video. + +@end table + @section imf Interoperable Master Format demuxer. -This demuxer presents audio and video streams found in an IMF Composition. +This demuxer presents audio and video streams found in an IMF Composition, as +specified in @url{https://doi.org/10.5594/SMPTE.ST2067-2.2020, SMPTE ST 2067-2}. + +@example +ffmpeg [-assetmaps ,,...] -i ... +@end example + +If @code{-assetmaps} is not specified, the demuxer looks for a file called +@file{ASSETMAP.xml} in the same directory as the CPL. @section flv, live_flv, kux @@ -401,6 +589,10 @@ Use HTTP partial requests for downloading HTTP segments. @item seg_format_options Set options for the demuxer of media segments using a list of key=value pairs separated by @code{:}. + +@item seg_max_retry +Maximum number of times to reload a segment on error, useful when segment skip on network error is not desired. +Default value is 0. @end table @section image2 @@ -747,8 +939,15 @@ error or used to store a negative value for dts correction when treated as signe the user set an upper limit, beyond which the delta is clamped to 1. Values greater than the limit if negative when cast to int32 are used to adjust onward dts. -Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto +Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows up to a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range. + +@item interleaved_read +Interleave packets from multiple tracks at demuxer level. For badly interleaved files, this prevents playback issues +caused by large gaps between packets in different tracks, as MOV/MP4 do not have packet placement requirements. +However, this can cause excessive seeking on very badly interleaved files, due to seeking between tracks, so disabling +it may prevent I/O issues, at the expense of playback. + @end table @subsection Audible AAX @@ -839,6 +1038,36 @@ the command: ffplay -f rawvideo -pixel_format rgb24 -video_size 320x240 -framerate 10 input.raw @end example +@anchor{rcwtdec} +@section rcwt + +RCWT (Raw Captions With Time) is a format native to ccextractor, a commonly +used open source tool for processing 608/708 Closed Captions (CC) sources. +For more information on the format, see @ref{rcwtenc,,,ffmpeg-formats}. + +This demuxer implements the specification as of March 2024, which has +been stable and unchanged since April 2014. + +@subsection Examples + +@itemize +@item +Render CC to ASS using the built-in decoder: +@example +ffmpeg -i CC.rcwt.bin CC.ass +@end example +Note that if your output appears to be empty, you may have to manually +set the decoder's @option{data_field} option to pick the desired CC substream. + +@item +Convert an RCWT backup to Scenarist (SCC) format: +@example +ffmpeg -i CC.rcwt.bin -c:s copy CC.scc +@end example +Note that the SCC format does not support all of the possible CC extensions +that can be stored in RCWT (such as EIA-708). +@end itemize + @section sbg SBaGen script demuxer. @@ -906,4 +1135,27 @@ which in turn, acts as a ceiling for the size of scripts that can be read. Default is 1 MiB. @end table +@section w64 + +Sony Wave64 Audio demuxer. + +This demuxer accepts the following options: +@table @option +@item max_size +See the same option for the @ref{wav} demuxer. +@end table + +@anchor{wav} +@section wav + +RIFF Wave Audio demuxer. + +This demuxer accepts the following options: +@table @option +@item max_size +Specify the maximum packet size in bytes for the demuxed packets. By default +this is set to 0, which means that a sensible value is chosen based on the +input format. +@end table + @c man end DEMUXERS diff --git a/mythtv/external/FFmpeg/doc/dev_community/community.md b/mythtv/external/FFmpeg/doc/dev_community/community.md deleted file mode 100644 index 21e08e20e3b..00000000000 --- a/mythtv/external/FFmpeg/doc/dev_community/community.md +++ /dev/null @@ -1,79 +0,0 @@ -# FFmpeg project - -## Organisation - -The FFmpeg project is organized through a community working on global consensus. - -Decisions are taken by the ensemble of active members, through voting and -are aided by two committees. - -## General Assembly - -The ensemble of active members is called the General Assembly (GA). - -The General Assembly is sovereign and legitimate for all its decisions -regarding the FFmpeg project. - -The General Assembly is made up of active contributors. - -Contributors are considered "active contributors" if they have pushed more -than 20 patches in the last 36 months in the main FFmpeg repository, or -if they have been voted in by the GA. - -Additional members are added to the General Assembly through a vote after -proposal by a member of the General Assembly. -They are part of the GA for two years, after which they need a confirmation by -the GA. - -## Voting - -Voting is done using a ranked voting system, currently running on https://vote.ffmpeg.org/ . - -Majority vote means more than 50% of the expressed ballots. - -## Technical Committee - -The Technical Committee (TC) is here to arbitrate and make decisions when -technical conflicts occur in the project. -They will consider the merits of all the positions, judge them and make a -decision. - -The TC resolves technical conflicts but is not a technical steering committee. - -Decisions by the TC are binding for all the contributors. - -Decisions made by the TC can be re-opened after 1 year or by a majority vote -of the General Assembly, requested by one of the member of the GA. - -The TC is elected by the General Assembly for a duration of 1 year, and -is composed of 5 members. -Members can be re-elected if they wish. A majority vote in the General Assembly -can trigger a new election of the TC. - -The members of the TC can be elected from outside of the GA. -Candidates for election can either be suggested or self-nominated. - -The conflict resolution process is detailed in the [resolution process](resolution_process.md) document. - -## Community committee - -The Community Committee (CC) is here to arbitrage and make decisions when -inter-personal conflicts occur in the project. It will decide quickly and -take actions, for the sake of the project. - -The CC can remove privileges of offending members, including removal of -commit access and temporary ban from the community. - -Decisions made by the CC can be re-opened after 1 year or by a majority vote -of the General Assembly. Indefinite bans from the community must be confirmed -by the General Assembly, in a majority vote. - -The CC is elected by the General Assembly for a duration of 1 year, and is -composed of 5 members. -Members can be re-elected if they wish. A majority vote in the General Assembly -can trigger a new election of the CC. - -The members of the CC can be elected from outside of the GA. -Candidates for election can either be suggested or self-nominated. - -The CC is governed by and responsible for enforcing the Code of Conduct. diff --git a/mythtv/external/FFmpeg/doc/dev_community/resolution_process.md b/mythtv/external/FFmpeg/doc/dev_community/resolution_process.md deleted file mode 100644 index 4ed0b63c433..00000000000 --- a/mythtv/external/FFmpeg/doc/dev_community/resolution_process.md +++ /dev/null @@ -1,91 +0,0 @@ -# Technical Committee - -_This document only makes sense with the rules from [the community document](community)_. - -The Technical Committee (**TC**) is here to arbitrate and make decisions when -technical conflicts occur in the project. - -The TC main role is to resolve technical conflicts. -It is therefore not a technical steering committee, but it is understood that -some decisions might impact the future of the project. - -# Process - -## Seizing - -The TC can take possession of any technical matter that it sees fit. - -To involve the TC in a matter, email tc@ or CC them on an ongoing discussion. - -As members of TC are developers, they also can email tc@ to raise an issue. - -## Announcement - -The TC, once seized, must announce itself on the main mailing list, with a _[TC]_ tag. - -The TC has 2 modes of operation: a RFC one and an internal one. - -If the TC thinks it needs the input from the larger community, the TC can call -for a RFC. Else, it can decide by itself. - -If the disagreement involves a member of the TC, that member should recuse -themselves from the decision. - -The decision to use a RFC process or an internal discussion is a discretionary -decision of the TC. - -The TC can also reject a seizure for a few reasons such as: -the matter was not discussed enough previously; it lacks expertise to reach a -beneficial decision on the matter; or the matter is too trivial. - -### RFC call - -In the RFC mode, one person from the TC posts on the mailing list the -technical question and will request input from the community. - -The mail will have the following specification: -* a precise title -* a specific tag [TC RFC] -* a top-level email -* contain a precise question that does not exceed 100 words and that is answerable by developers -* may have an extra description, or a link to a previous discussion, if deemed necessary, -* contain a precise end date for the answers. - -The answers from the community must be on the main mailing list and must have -the following specification: -* keep the tag and the title unchanged -* limited to 400 words -* a first-level, answering directly to the main email -* answering to the question. - -Further replies to answers are permitted, as long as they conform to the -community standards of politeness, they are limited to 100 words, and are not -nested more than once. (max-depth=2) - -After the end-date, mails on the thread will be ignored. - -Violations of those rules will be escalated through the Community Committee. - -After all the emails are in, the TC has 96 hours to give its final decision. -Exceptionally, the TC can request an extra delay, that will be notified on the -mailing list. - -### Within TC - -In the internal case, the TC has 96 hours to give its final decision. -Exceptionally, the TC can request an extra delay. - - -## Decisions - -The decisions from the TC will be sent on the mailing list, with the _[TC]_ tag. - -Internally, the TC should take decisions with a majority, or using -ranked-choice voting. - -The decision from the TC should be published with a summary of the reasons that -lead to this decision. - -The decisions from the TC are final, until the matters are reopened after -no less than one year. - diff --git a/mythtv/external/FFmpeg/doc/developer.texi b/mythtv/external/FFmpeg/doc/developer.texi index addee0d8263..41b21938ef8 100644 --- a/mythtv/external/FFmpeg/doc/developer.texi +++ b/mythtv/external/FFmpeg/doc/developer.texi @@ -10,41 +10,109 @@ @contents -@chapter Notes for external developers +@chapter Introduction -This document is mostly useful for internal FFmpeg developers. -External developers who need to use the API in their application should -refer to the API doxygen documentation in the public headers, and -check the examples in @file{doc/examples} and in the source code to -see how the public API is employed. - -You can use the FFmpeg libraries in your commercial program, but you -are encouraged to @emph{publish any patch you make}. In this case the -best way to proceed is to send your patches to the ffmpeg-devel -mailing list following the guidelines illustrated in the remainder of -this document. +This text is concerned with the development @emph{of} FFmpeg itself. Information +on using the FFmpeg libraries in other programs can be found elsewhere, e.g. in: +@itemize @bullet +@item +the installed header files +@item +@url{http://ffmpeg.org/doxygen/trunk/index.html, the Doxygen documentation} +generated from the headers +@item +the examples under @file{doc/examples} +@end itemize For more detailed legal information about the use of FFmpeg in external programs read the @file{LICENSE} file in the source tree and consult @url{https://ffmpeg.org/legal.html}. -@chapter Contributing - -There are 2 ways by which code gets into FFmpeg: +If you modify FFmpeg code for your own use case, you are highly encouraged to +@emph{submit your changes back to us}, using this document as a guide. There are +both pragmatic and ideological reasons to do so: @itemize @bullet -@item Submitting patches to the ffmpeg-devel mailing list. - See @ref{Submitting patches} for details. -@item Directly committing changes to the main tree. +@item +Maintaining external changes to keep up with upstream development is +time-consuming and error-prone. With your code in the main tree, it will be +maintained by FFmpeg developers. +@item +FFmpeg developers include leading experts in the field who can find bugs or +design flaws in your code. +@item +By supporting the project you find useful you ensure it continues to be +maintained and developed. @end itemize -Whichever way, changes should be reviewed by the maintainer of the code -before they are committed. And they should follow the @ref{Coding Rules}. +All proposed code changes should be submitted for review to +@url{mailto:ffmpeg-devel@@ffmpeg.org, the development mailing list}, as +described in more detail in the @ref{Submitting patches} chapter. The code +should comply with the @ref{Development Policy} and follow the @ref{Coding Rules}. The developer making the commit and the author are responsible for their changes and should try to fix issues their commit causes. @anchor{Coding Rules} @chapter Coding Rules +@section Language + +FFmpeg is mainly programmed in the ISO C11 language, except for the public +headers which must stay C99 compatible. + +Compiler-specific extensions may be used with good reason, but must not be +depended on, i.e. the code must still compile and work with compilers lacking +the extension. + +The following C99 features must not be used anywhere in the codebase: +@itemize @bullet +@item +variable-length arrays; + +@item +complex numbers; + +@item +mixed statements and declarations. +@end itemize + +@subsection SIMD/DSP +@anchor{SIMD/DSP} + +As modern compilers are unable to generate efficient SIMD or other +performance-critical DSP code from plain C, handwritten assembly is used. +Usually such code is isolated in a separate function. Then the standard approach +is writing multiple versions of this function – a plain C one that works +everywhere and may also be useful for debugging, and potentially multiple +architecture-specific optimized implementations. Initialization code then +chooses the best available version at runtime and loads it into a function +pointer; the function in question is then always called through this pointer. + +The specific syntax used for writing assembly is: +@itemize @bullet +@item +NASM on x86; + +@item +GAS on ARM and RISC-V. +@end itemize + +A unit testing framework for assembly called @code{checkasm} lives under +@file{tests/checkasm}. All new assembly should come with @code{checkasm} tests; +adding tests for existing assembly that lacks them is also strongly encouraged. + +@subsection Other languages + +Other languages than C may be used in special cases: +@itemize @bullet +@item +Compiler intrinsics or inline assembly when the code in question cannot be +written in the standard way described in the @ref{SIMD/DSP} section. This +typically applies to code that needs to be inlined. + +@item +Objective-C where required for interacting with macOS-specific interfaces. +@end itemize + @section Code formatting conventions There are the following guidelines regarding the indentation in files: @@ -67,8 +135,39 @@ K&R coding style is used. @end itemize The presentation is one inspired by 'indent -i4 -kr -nut'. -The main priority in FFmpeg is simplicity and small code size in order to -minimize the bug count. +@subsection Vim configuration +In order to configure Vim to follow FFmpeg formatting conventions, paste +the following snippet into your @file{.vimrc}: +@example +" indentation rules for FFmpeg: 4 spaces, no tabs +set expandtab +set shiftwidth=4 +set softtabstop=4 +set cindent +set cinoptions=(0 +" Allow tabs in Makefiles. +autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8 +" Trailing whitespace and tabs are forbidden, so highlight them. +highlight ForbiddenWhitespace ctermbg=red guibg=red +match ForbiddenWhitespace /\s\+$\|\t/ +" Do not highlight spaces at the end of line while typing on that line. +autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@/lib.v} files. + +@item +Other public identifiers (struct, union, enum, macro, type names) must use their +library's public prefix (@code{AV}, @code{Sws}, or @code{Swr}). @end itemize Furthermore, name space reserved for the system should not be invaded. @@ -209,50 +268,50 @@ symbols. If in doubt, just avoid names starting with @code{_} altogether. @section Miscellaneous conventions @itemize @bullet -@item -fprintf and printf are forbidden in libavformat and libavcodec, -please use av_log() instead. - @item Casts should be used only when necessary. Unneeded parentheses should also be avoided if they don't make the code easier to understand. @end itemize -@section Editor configuration -In order to configure Vim to follow FFmpeg formatting conventions, paste -the following snippet into your @file{.vimrc}: -@example -" indentation rules for FFmpeg: 4 spaces, no tabs -set expandtab -set shiftwidth=4 -set softtabstop=4 -set cindent -set cinoptions=(0 -" Allow tabs in Makefiles. -autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8 -" Trailing whitespace and tabs are forbidden, so highlight them. -highlight ForbiddenWhitespace ctermbg=red guibg=red -match ForbiddenWhitespace /\s\+$\|\t/ -" Do not highlight spaces at the end of line while typing on that line. -autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@ 5 lines) chunk of code, then either do NOT change the indentation of the inner part within (do not move it to the right)! or do so in a separate commit -@subheading Commit messages should always be filled out properly. -Always fill out the commit log message. Describe in a few lines what you -changed and why. You can refer to mailing list postings if you fix a -particular bug. Comments such as "fixed!" or "Changed it." are unacceptable. -Recommended format: - -@example -area changed: Short 1 line description - -details describing what and why and giving references. -@end example - @subheading Credit the author of the patch. Make sure the author of the commit is set correctly. (see git commit --author) If you apply a patch, send an answer to ffmpeg-devel (or wherever you got the patch from) saying that you applied the patch. -@subheading Complex patches should refer to discussion surrounding them. -When applying patches that have been discussed (at length) on the mailing -list, reference the thread in the log message. +@subheading Credit any researchers +If a commit/patch fixes an issues found by some researcher, always credit the +researcher in the commit message for finding/reporting the issue. @subheading Always wait long enough before pushing changes Do NOT commit to code actively maintained by others without permission. @@ -353,22 +402,6 @@ time-frame (12h for build failures and security fixes, 3 days small changes, Also note, the maintainer can simply ask for more time to review! @section Code -@subheading API/ABI changes should be discussed before they are made. -Do not change behavior of the programs (renaming options etc) or public -API or ABI without first discussing it on the ffmpeg-devel mailing list. -Do not remove widely used functionality or features (redundant code can be removed). - -@subheading Remember to check if you need to bump versions for libav*. -Depending on the change, you may need to change the version integer. -Incrementing the first component means no backward compatibility to -previous versions (e.g. removal of a function from the public API). -Incrementing the second component means backward compatible change -(e.g. addition of a function to the public API or extension of an -existing data structure). -Incrementing the third component means a noteworthy binary compatible -change (e.g. encoder bug fix that matters for the decoder). The third -component always starts at 100 to distinguish FFmpeg from Libav. - @subheading Warnings for correct code may be disabled if there is no other option. Compiler warnings indicate potential bugs or code with bad style. If a type of warning always points to correct and clean code, that warning should @@ -378,10 +411,150 @@ If it is a bug, the bug has to be fixed. If it is not, the code should be changed to not generate a warning unless that causes a slowdown or obfuscates the code. -@subheading Check untrusted input properly. -Never write to unallocated memory, never write over the end of arrays, -always check values read from some untrusted source before using them -as array index or other risky things. +@section Library public interfaces +Every library in FFmpeg provides a set of public APIs in its installed headers, +which are those listed in the variable @code{HEADERS} in that library's +@file{Makefile}. All identifiers defined in those headers (except for those +explicitly documented otherwise), and corresponding symbols exported from +compiled shared or static libraries are considered public interfaces and must +comply with the API and ABI compatibility rules described in this section. + +Public APIs must be backward compatible within a given major version. I.e. any +valid user code that compiles and works with a given library version must still +compile and work with any later version, as long as the major version number is +unchanged. "Valid user code" here means code that is calling our APIs in a +documented and/or intended manner and is not relying on any undefined behavior. +Incrementing the major version may break backward compatibility, but only to the +extent described in @ref{Major version bumps}. + +We also guarantee backward ABI compatibility for shared and static libraries. +I.e. it should be possible to replace a shared or static build of our library +with a build of any later version (re-linking the user binary in the static +case) without breaking any valid user binaries, as long as the major version +number remains unchanged. + +@subsection Adding new interfaces +Any new public identifiers in installed headers are considered new API - this +includes new functions, structs, macros, enum values, typedefs, new fields in +existing structs, new installed headers, etc. Consider the following +guidelines when adding new APIs. + +@subsubheading Motivation +While new APIs can be added relatively easily, changing or removing them is much +harder due to abovementioned compatibility requirements. You should then +consider carefully whether the functionality you are adding really needs to be +exposed to our callers as new public API. + +Your new API should have at least one well-established use case outside of the +library that cannot be easily achieved with existing APIs. Every library in +FFmpeg also has a defined scope - your new API must fit within it. + +@subsubheading Replacing existing APIs +If your new API is replacing an existing one, it should be strictly superior to +it, so that the advantages of using the new API outweight the cost to the +callers of changing their code. After adding the new API you should then +deprecate the old one and schedule it for removal, as described in +@ref{Removing interfaces}. + +If you deem an existing API deficient and want to fix it, the preferred approach +in most cases is to add a differently-named replacement and deprecate the +existing API rather than modify it. It is important to make the changes visible +to our callers (e.g. through compile- or run-time deprecation warnings) and make +it clear how to transition to the new API (e.g. in the Doxygen documentation or +on the wiki). + +@subsubheading API design +The FFmpeg libraries are used by a variety of callers to perform a wide range of +multimedia-related processing tasks. You should therefore - within reason - try +to design your new API for the broadest feasible set of use cases and avoid +unnecessarily limiting it to a specific type of callers (e.g. just media +playback or just transcoding). + +@subsubheading Consistency +Check whether similar APIs already exist in FFmpeg. If they do, try to model +your new addition on them to achieve better overall consistency. + +The naming of your new identifiers should follow the @ref{Naming conventions} +and be aligned with other similar APIs, if applicable. + +@subsubheading Extensibility +You should also consider how your API might be extended in the future in a +backward-compatible way. If you are adding a new struct @code{AVFoo}, the +standard approach is requiring the caller to always allocate it through a +constructor function, typically named @code{av_foo_alloc()}. This way new fields +may be added to the end of the struct without breaking ABI compatibility. +Typically you will also want a destructor - @code{av_foo_free(AVFoo**)} that +frees the indirectly supplied object (and its contents, if applicable) and +writes @code{NULL} to the supplied pointer, thus eliminating the potential +dangling pointer in the caller's memory. + +If you are adding new functions, consider whether it might be desirable to tweak +their behavior in the future - you may want to add a flags argument, even though +it would be unused initially. + +@subsubheading Documentation +All new APIs must be documented as Doxygen-formatted comments above the +identifiers you add to the public headers. You should also briefly mention the +change in @file{doc/APIchanges}. + +@subsubheading Bump the version +Backward-incompatible API or ABI changes require incrementing (bumping) the +major version number, as described in @ref{Major version bumps}. Major +bumps are significant events that happen on a schedule - so if your change +strictly requires one you should add it under @code{#if} preprocesor guards that +disable it until the next major bump happens. + +New APIs that can be added without breaking API or ABI compatibility require +bumping the minor version number. + +Incrementing the third (micro) version component means a noteworthy binary +compatible change (e.g. encoder bug fix that matters for the decoder). The third +component always starts at 100 to distinguish FFmpeg from Libav. + +@anchor{Removing interfaces} +@subsection Removing interfaces +Due to abovementioned compatibility guarantees, removing APIs is an involved +process that should only be undertaken with good reason. Typically a deficient, +restrictive, or otherwise inadequate API is replaced by a superior one, though +it does at times happen that we remove an API without any replacement (e.g. when +the feature it provides is deemed not worth the maintenance effort, out of scope +of the project, fundamentally flawed, etc.). + +The removal has two steps - first the API is deprecated and scheduled for +removal, but remains present and functional. The second step is actually +removing the API - this is described in @ref{Major version bumps}. + +To deprecate an API you should signal to our users that they should stop using +it. E.g. if you intend to remove struct members or functions, you should mark +them with @code{attribute_deprecated}. When this cannot be done, it may be +possible to detect the use of the deprecated API at runtime and print a warning +(though take care not to print it too often). You should also document the +deprecation (and the replacement, if applicable) in the relevant Doxygen +documentation block. + +Finally, you should define a deprecation guard along the lines of +@code{#define FF_API_ (LIBAVBAR_VERSION_MAJOR < XX)} (where XX is the major +version in which the API will be removed) in @file{libavbar/version_major.h} +(@file{version.h} in case of @code{libavutil}). Then wrap all uses of the +deprecated API in @code{#if FF_API_ .... #endif}, so that the code will +automatically get disabled once the major version reaches XX. You can also use +@code{FF_DISABLE_DEPRECATION_WARNINGS} and @code{FF_ENABLE_DEPRECATION_WARNINGS} +to suppress compiler deprecation warnings inside these guards. You should test +that the code compiles and works with the guard macro evaluating to both true +and false. + +@anchor{Major version bumps} +@subsection Major version bumps +A major version bump signifies an API and/or ABI compatibility break. To reduce +the negative effects on our callers, who are required to adapt their code, +backward-incompatible changes during a major bump should be limited to: +@itemize @bullet +@item +Removing previously deprecated APIs. + +@item +Performing ABI- but not API-breaking changes, like reordering struct contents. +@end itemize @section Documentation/Other @subheading Subscribe to the ffmpeg-devel mailing list. @@ -425,35 +598,6 @@ finding a new maintainer and also don't forget to update the @file{MAINTAINERS} We think our rules are not too hard. If you have comments, contact us. -@chapter Code of conduct - -Be friendly and respectful towards others and third parties. -Treat others the way you yourself want to be treated. - -Be considerate. Not everyone shares the same viewpoint and priorities as you do. -Different opinions and interpretations help the project. -Looking at issues from a different perspective assists development. - -Do not assume malice for things that can be attributed to incompetence. Even if -it is malice, it's rarely good to start with that as initial assumption. - -Stay friendly even if someone acts contrarily. Everyone has a bad day -once in a while. -If you yourself have a bad day or are angry then try to take a break and reply -once you are calm and without anger if you have to. - -Try to help other team members and cooperate if you can. - -The goal of software development is to create technical excellence, not for any -individual to be better and "win" against the others. Large software projects -are only possible and successful through teamwork. - -If someone struggles do not put them down. Give them a helping hand -instead and point them in the right direction. - -Finally, keep in mind the immortal words of Bill and Ted, -"Be excellent to each other." - @anchor{Submitting patches} @chapter Submitting patches @@ -494,6 +638,11 @@ patch is inline or attached per mail. You can check @url{https://patchwork.ffmpeg.org}, if your patch does not show up, its mime type likely was wrong. +@subheading How to setup git send-email? + +Please see @url{https://git-send-email.io/}. +For gmail additionally see @url{https://shallowsky.com/blog/tech/email/gmail-app-passwds.html}. + @subheading Sending patches from email clients Using @code{git send-email} might not be desirable for everyone. The following trick allows to send patches via email clients in a safe @@ -538,7 +687,7 @@ number) in @file{libavcodec/version.h} or @file{libavformat/version.h}? Did you register it in @file{allcodecs.c} or @file{allformats.c}? @item -Did you add the AVCodecID to @file{avcodec.h}? +Did you add the AVCodecID to @file{codec_id.h}? When adding new codec IDs, also add an entry to the codec descriptor list in @file{libavcodec/codec_desc.c}. @@ -553,7 +702,7 @@ already being compiled by some other rule, like a raw demuxer. @item Did you add an entry to the table of supported formats or codecs in -@file{doc/general.texi}? +@file{doc/general_contents.texi}? @item Did you add an entry in the Changelog? @@ -670,16 +819,14 @@ Lines with similar content should be aligned vertically when doing so improves readability. @item -Consider adding a regression test for your code. +Consider adding a regression test for your code. All new modules +should be covered by tests. That includes demuxers, muxers, decoders, encoders +filters, bitstream filters, parsers. If its not possible to do that, add +an explanation why to your patchset, its ok to not test if theres a reason. @item If you added YASM code please check that things still work with --disable-yasm. -@item -Make sure you check the return values of function and return appropriate -error codes. Especially memory allocation functions like @code{av_malloc()} -are notoriously left unchecked, which is a serious problem. - @item Test your code with valgrind and or Address Sanitizer to ensure it's free of leaks, out of array accesses, etc. @@ -729,6 +876,8 @@ accordingly]. @section Adding files to the fate-suite dataset +If you need a sample uploaded send a mail to samples-request. + When there is no muxer or encoder available to generate test media for a specific test then the media has to be included in the fate-suite. First please make sure that the sample file is as small as possible to test the diff --git a/mythtv/external/FFmpeg/doc/encoders.texi b/mythtv/external/FFmpeg/doc/encoders.texi index 02a91ffe964..0749417db4f 100644 --- a/mythtv/external/FFmpeg/doc/encoders.texi +++ b/mythtv/external/FFmpeg/doc/encoders.texi @@ -144,8 +144,7 @@ If this option is unspecified it is set to @samp{aac_low}. AC-3 audio encoders. -These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as -the undocumented RealAudio 3 (a.k.a. dnet). +These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366. The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed} encoder only uses fixed-point integer math. This does not mean that one is @@ -615,7 +614,7 @@ and slightly improves compression. Opus encoder. -This is a native FFmpeg encoder for the Opus format. Currently its in development and +This is a native FFmpeg encoder for the Opus format. Currently, it's in development and only implements the CELT part of the codec. Its quality is usually worse and at best is equal to the libopus encoder. @@ -789,6 +788,11 @@ about 80-96 kbps/channel @end table Default value is 0. + +@item frame_length +Set the audio frame length in samples. Default value is the internal +default of the library. Refer to the library's documentation for information +about supported values. @end table @subsection Examples @@ -809,6 +813,63 @@ ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a @end example @end itemize +@anchor{liblc3-enc} +@section liblc3 + +liblc3 LC3 (Low Complexity Communication Codec) encoder wrapper. + +Requires the presence of the liblc3 headers and library during configuration. +You need to explicitly configure the build with @code{--enable-liblc3}. + +This encoder has support for the Bluetooth SIG LC3 codec for the LE Audio +protocol, and the following features of LC3plus: +@itemize +@item +Frame duration of 2.5 and 5ms. +@item +High-Resolution mode, 48 KHz, and 96 kHz sampling rates. +@end itemize + +For more information see the liblc3 project at +@url{https://github.com/google/liblc3}. + +@subsection Options + +The following options are mapped on the shared FFmpeg codec options. + +@table @option +@item b @var{bitrate} +Set the bit rate in bits/s. This will determine the fixed size of the encoded +frames, for a selected frame duration. + +@item ar @var{frequency} +Set the audio sampling rate (in Hz). + +@item channels +Set the number of audio channels. + +@item frame_duration +Set the audio frame duration in milliseconds. Default value is 10ms. +Allowed frame durations are 2.5ms, 5ms, 7.5ms and 10ms. +LC3 (Bluetooth LE Audio), allows 7.5ms and 10ms; and LC3plus 2.5ms, 5ms +and 10ms. + +The 10ms frame duration is available in LC3 and LC3 plus standard. +In this mode, the produced bitstream can be referenced either as LC3 or LC3plus. + +@item high_resolution @var{boolean} +Enable the high-resolution mode if set to 1. The high-resolution mode is +available with all LC3plus frame durations and for a sampling rate of 48 KHz, +and 96 KHz. + +The encoder automatically turns off this mode at lower sampling rates and +activates it at 96 KHz. + +This mode should be preferred at high bitrates. In this mode, the audio +bandwidth is always up to the Nyquist frequency, compared to LC3 at 48 KHz, +which limits the bandwidth to 20 KHz. +@end table + @anchor{libmp3lame} @section libmp3lame @@ -859,6 +920,13 @@ Enable the encoder to use ABR when set to 1. The @command{lame} @option{--abr} sets the target bitrate, while this options only tells FFmpeg to use ABR still relies on @option{b} to set bitrate. +@item copyright (@emph{-c}) +Set MPEG audio copyright flag when set to 1. The default value is 0 +(disabled). + +@item original (@emph{-o}) +Set MPEG audio original flag when set to 1. The default value is 1 +(enabled). @end table @section libopencore-amrnb @@ -965,14 +1033,17 @@ Favor improved speech intelligibility. @item audio Favor faithfulness to the input (the default). @item lowdelay -Restrict to only the lowest delay modes. +Restrict to only the lowest delay modes by disabling voice-optimized +modes. @end table @item cutoff (N.A.) Set cutoff bandwidth in Hz. The argument must be exactly one of the following: 4000, 6000, 8000, 12000, or 20000, corresponding to narrowband, mediumband, wideband, super wideband, and fullband -respectively. The default is 0 (cutoff disabled). +respectively. The default is 0 (cutoff disabled). Note that libopus +forces a wideband cutoff for bitrates < 15 kbps, unless CELT-only +(@option{application} set to @samp{lowdelay}) mode is used. @item mapping_family (@emph{mapping_family}) Set channel mapping family to be used by the encoder. The default value of -1 @@ -1949,22 +2020,6 @@ Set the number of slices, used in parallelized encoding. Default value is 0. This is only used when @option{slice_mode} is set to @samp{fixed}. -@item slice_mode -Set slice mode. Can assume one of the following possible values: - -@table @samp -@item fixed -a fixed number of slices -@item rowmb -one slice per row of macroblocks -@item auto -automatic number of slices according to number of threads -@item dyn -dynamic slicing -@end table - -Default value is @samp{auto}. - @item loopfilter Enable loop filter, if set to 1 (automatically enabled). To disable set a value of 0. @@ -2176,6 +2231,8 @@ Set altref noise reduction filter type: backward, forward, centered. Set altref noise reduction filter strength. @item rc-lookahead, lag-in-frames (@emph{lag-in-frames}) Set number of frames to look ahead for frametype and ratecontrol. +@item min-gf-interval +Set minimum golden/alternate reference frame interval (VP9 only). @end table @item error-resilient @@ -2236,6 +2293,12 @@ the two temporal layer 2 frames within the temporal period. @end table @end table +@item VP8-specific options +@table @option +@item screen-content-mode +Screen content mode, one of: 0 (off), 1 (screen), 2 (screen with more aggressive rate control). +@end table + @item VP9-specific options @table @option @item lossless @@ -2315,6 +2378,70 @@ Indicates frame duration For more information about libvpx see: @url{http://www.webmproject.org/} +@section libvvenc + +VVenC H.266/VVC encoder wrapper. + +This encoder requires the presence of the libvvenc headers and library +during configuration. You need to explicitly configure the build with +@option{--enable-libvvenc}. + +The VVenC project website is at +@url{https://github.com/fraunhoferhhi/vvenc}. + +@subsection Supported Pixel Formats + +VVenC supports only 10-bit color spaces as input. But the internal (encoded) +bit depth can be set to 8-bit or 10-bit at runtime. + +@subsection Options + +@table @option +@item b +Sets target video bitrate. + +@item g +Set the GOP size. Currently support for g=1 (Intra only) or default. + +@item preset +Set the VVenC preset. + +@item levelidc +Set level idc. + +@item tier +Set vvc tier. + +@item qp +Set constant quantization parameter. + +@item subopt @var{boolean} +Set subjective (perceptually motivated) optimization. Default is 1 (on). + +@item bitdepth8 @var{boolean} +Set 8bit coding mode instead of using 10bit. Default is 0 (off). + +@item period +set (intra) refresh period in seconds. + +@item vvenc-params +Set vvenc options using a list of @var{key}=@var{value} couples separated +by ":". See @command{vvencapp --fullhelp} or @command{vvencFFapp --fullhelp} for a list of options. + +For example, the options might be provided as: + +@example +intraperiod=64:decodingrefreshtype=idr:poc0idr=1:internalbitdepth=8 +@end example + +For example the encoding options might be provided with @option{-vvenc-params}: + +@example +ffmpeg -i input -c:v libvvenc -b 1M -vvenc-params intraperiod=64:decodingrefreshtype=idr:poc0idr=1:internalbitdepth=8 output.mp4 +@end example + +@end table + @section libwebp libwebp WebP Image encoder wrapper @@ -2420,6 +2547,10 @@ To get a more accurate and extensive documentation of the libx264 options, invoke the command @command{x264 --fullhelp} or consult the libx264 documentation. +In the list below, note that the @command{x264} option name is shown +in parentheses after the libavcodec corresponding name, in case there +is a direct mapping. + @table @option @item b (@emph{bitrate}) Set bitrate in bits/s. Note that FFmpeg's @option{b} option is @@ -2427,17 +2558,19 @@ expressed in bits/s, while @command{x264}'s @option{bitrate} is in kilobits/s. @item bf (@emph{bframes}) +Number of B-frames between I and P-frames @item g (@emph{keyint}) +Maximum GOP size @item qmin (@emph{qpmin}) -Minimum quantizer scale. +Minimum quantizer scale @item qmax (@emph{qpmax}) -Maximum quantizer scale. +Maximum quantizer scale @item qdiff (@emph{qpstep}) -Maximum difference between quantizer scales. +Maximum difference between quantizer scales @item qblur (@emph{qblur}) Quantizer curve blur @@ -2446,7 +2579,21 @@ Quantizer curve blur Quantizer curve compression factor @item refs (@emph{ref}) -Number of reference frames each P-frame can use. The range is from @var{0-16}. +Number of reference frames each P-frame can use. The range is @var{0-16}. + +@item level (@emph{level}) +Set the @code{x264_param_t.i_level_idc} value in case the value is +positive, it is ignored otherwise. + +This value can be set using the @code{AVCodecContext} API (e.g. by +setting the @code{AVCodecContext} value directly), and is specified as +an integer mapped on a corresponding level (e.g. the value 31 maps +to H.264 level IDC "3.1", as defined in the @code{x264_levels} +table). It is ignored when set to a non positive value. + +Alternatively it can be set as a private option, overriding the value +set in @code{AVCodecContext}, and in this case must be specified as +the level IDC identifier (e.g. "3.1"), as defined by H.264 Annex A. @item sc_threshold (@emph{scenecut}) Sets the threshold for the scene change detection. @@ -2454,7 +2601,8 @@ Sets the threshold for the scene change detection. @item trellis (@emph{trellis}) Performs Trellis quantization to increase efficiency. Enabled by default. -@item nr (@emph{nr}) +@item nr (@emph{nr}) +Noise reduction @item me_range (@emph{merange}) Maximum range of the motion search in pixels. @@ -2535,6 +2683,7 @@ open GOP by setting it to @code{-cgop}. The result is similar to the behavior of @command{x264}'s @option{--open-gop} option. @item rc_init_occupancy (@emph{vbv-init}) +Initial VBV buffer occupancy @item preset (@emph{preset}) Set the encoding preset. @@ -2580,7 +2729,7 @@ Set AQ strength, reduce blocking and blurring in flat and textured areas. Use psychovisual optimizations when set to 1. When set to 0, it has the same effect as @command{x264}'s @option{--no-psy} option. -@item psy-rd (@emph{psy-rd}) +@item psy-rd (@emph{psy-rd}) Set strength of psychovisual optimization, in @var{psy-rd}:@var{psy-trellis} format. @@ -2612,7 +2761,7 @@ to 1. @item avcintra-class (@emph{class}) Configure the encoder to generate AVC-Intra. -Valid values are 50,100 and 200 +Valid values are 50, 100 and 200 @item bluray-compat (@emph{bluray-compat}) Configure the encoder to be compatible with the bluray standard. @@ -2663,8 +2812,8 @@ Set loop filter parameters, in @var{alpha}:@var{beta} form. Set fluctuations reduction in QP (before curve compression). @item partitions (@emph{partitions}) -Set partitions to consider as a comma-separated list of. Possible -values in the list: +Set partitions to consider as a comma-separated list of values. +Possible values in the list: @table @samp @item p8x8 @@ -2720,19 +2869,32 @@ Variable bit rate. Constant bit rate (not allowed in MP4 container). @end table -@item x264opts (N.A.) -Set any x264 option, see @command{x264 --fullhelp} for a list. +@item x264opts @var{opts} +@item x264-params @var{opts} +Override the x264 configuration using a :-separated list of key=value +options. + +The argument for both options is a list of @var{key}=@var{value} +couples separated by ":". With @option{x264opts} the value can be +omitted, and the value @code{1} is assumed in that case. -Argument is a list of @var{key}=@var{value} couples separated by -":". In @var{filter} and @var{psy-rd} options that use ":" as a separator -themselves, use "," instead. They accept it as well since long ago but this -is kept undocumented for some reason. +For @var{filter} and @var{psy-rd} options values that use ":" as a +separator themselves, use "," instead. They accept it as well since +long ago but this is kept undocumented for some reason. + +For example, the options might be provided as: +@example +level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 +@end example For example to specify libx264 encoding options with @command{ffmpeg}: @example ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv @end example +To get the complete list of the libx264 options, invoke the command +@command{x264 --fullhelp} or consult the libx264 documentation. + @item a53cc @var{boolean} Import closed captions (which must be ATSC compatible format) into output. Only the mpeg2 and h264 decoders provide these. Default is 1 (on). @@ -2740,19 +2902,9 @@ Only the mpeg2 and h264 decoders provide these. Default is 1 (on). @item udu_sei @var{boolean} Import user data unregistered SEI if available into output. Default is 0 (off). -@item x264-params (N.A.) -Override the x264 configuration using a :-separated list of key=value -parameters. - -This option is functionally the same as the @option{x264opts}, but is -duplicated for compatibility with the Libav fork. - -For example to specify libx264 encoding options with @command{ffmpeg}: -@example -ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\ -cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\ -no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT -@end example +@item mb_info @var{boolean} +Set mb_info data through AVFrameSideData, only useful when used from the +API. Default is 0 (off). @end table Encoding ffpresets for common usages are provided so they can be used with the @@ -2892,6 +3044,75 @@ ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2 @end example @end table +@section libxeve + +eXtra-fast Essential Video Encoder (XEVE) MPEG-5 EVC encoder wrapper. +The xeve-equivalent options or values are listed in parentheses for easy migration. + +This encoder requires the presence of the libxeve headers and library +during configuration. You need to explicitly configure the build with +@option{--enable-libxeve}. + +@float NOTE +Many libxeve encoder options are mapped to FFmpeg global codec options, +while unique encoder options are provided through private options. +Additionally the xeve-params private options allows one to pass a list +of key=value tuples as accepted by the libxeve @code{parse_xeve_params} function. +@end float + +The xeve project website is at @url{https://github.com/mpeg5/xeve}. + +@subsection Options + +The following options are supported by the libxeve wrapper. +The xeve-equivalent options or values are listed in parentheses for easy migration. + +@float NOTE +To reduce the duplication of documentation, only the private options +and some others requiring special attention are documented here. For +the documentation of the undocumented generic options, see +@ref{codec-options,,the Codec Options chapter}. +@end float + +@float NOTE +To get a more accurate and extensive documentation of the libxeve options, +invoke the command @code{xeve_app --help} or consult the libxeve documentation. +@end float + +@table @option +@item b (@emph{bitrate}) +Set target video bitrate in bits/s. +Note that FFmpeg's b option is expressed in bits/s, while xeve's bitrate is in kilobits/s. + +@item bf (@emph{bframes}) +Set the maximum number of B frames (1,3,7,15). + +@item g (@emph{keyint}) +Set the GOP size (I-picture period). + +@item preset (@emph{preset}) +Set the xeve preset. +Set the encoder preset value to determine encoding speed [fast, medium, slow, placebo] + +@item tune (@emph{tune}) +Set the encoder tune parameter [psnr, zerolatency] + +@item profile (@emph{profile}) +Set the encoder profile [0: baseline; 1: main] + +@item crf (@emph{crf}) +Set the quality for constant quality mode. +Constant rate factor <10..49> [default: 32] + +@item qp (@emph{qp}) +Set constant quantization rate control method parameter. +Quantization parameter qp <0..51> [default: 32] + +@item threads (@emph{threads}) +Force to use a specific number of threads + +@end table + @section libxvid Xvid MPEG-4 Part 2 encoder wrapper. @@ -2944,9 +3165,6 @@ Enable high quality AC prediction. @item gray Only encode grayscale. -@item gmc -Enable the use of global motion compensation (GMC). - @item qpel Enable quarter-pixel motion compensation. @@ -2958,29 +3176,28 @@ Place global headers in extradata instead of every keyframe. @end table -@item trellis +@item gmc +Enable the use of global motion compensation (GMC). Default is 0 +(disabled). -@item me_method -Set motion estimation method. Possible values in decreasing order of +@item me_quality +Set motion estimation quality level. Possible values in decreasing order of speed and increasing order of quality: @table @samp -@item zero +@item 0 Use no motion estimation (default). -@item phods -@item x1 -@item log +@item 1, 2 Enable advanced diamond zonal search for 16x16 blocks and half-pixel -refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for -@samp{phods}. +refinement for 16x16 blocks. -@item epzs +@item 3, 4 Enable all of the things described above, plus advanced diamond zonal -search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion -estimation on chroma planes. +search for 8x8 blocks and half-pixel refinement for 8x8 blocks, also +enable motion estimation on chroma planes for P and B-frames. -@item full +@item 5, 6 Enable all of the things described above, plus extended 16x16 and 8x8 blocks search. @end table @@ -3016,6 +3233,9 @@ be better than any of the two specified individually. In other words, the resulting quality will be the worse one of the two effects. +@item trellis +Set rate-distortion optimal quantization. + @item ssim Set structural similarity (SSIM) displaying method. Possible values: @@ -3063,6 +3283,20 @@ Video encoders can take input in either of nv12 or yuv420p form (some encoders support both, some support only either - in practice, nv12 is the safer choice, especially among HW encoders). +@section Microsoft RLE + +Microsoft RLE aka MSRLE encoder. +Only 8-bit palette mode supported. +Compatible with Windows 3.1 and Windows 95. + +@subsection Options + +@table @option +@item g @var{integer} +Keyframe interval. +A keyframe is inserted at least every @code{-g} frames, sometimes sooner. +@end table + @section mpeg2 MPEG-2 video encoder. @@ -3202,8 +3436,8 @@ recommended value) and do not set a size constraint. @section QSV Encoders -The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC, JPEG/MJPEG -and VP9) +The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC, JPEG/MJPEG, +VP9, AV1) @subsection Ratecontrol Method The ratecontrol method is selected as follows: @@ -3226,8 +3460,8 @@ quality range is 1 to 51, with 1 being the best quality. @end itemize @item -Otherwise, a bitrate-based mode is used. For all of those, you should specify at -least the desired average bitrate with the @option{b} option. +Otherwise when the desired average bitrate is specified with the @option{b} +option, a bitrate-based mode is used. @itemize @minus @item @var{LA} - VBR with lookahead, when the @option{look_ahead} option is specified. @@ -3244,10 +3478,13 @@ the average bitrate. than the average bitrate. @item -@var{AVBR} - average VBR mode, when @option{maxrate} is not specified. This mode -is further configured by the @option{avbr_accuracy} and -@option{avbr_convergence} options. +@var{AVBR} - average VBR mode, when @option{maxrate} is not specified, both +@option{avbr_accuracy} and @option{avbr_convergence} are set to non-zero. This +mode is available for H264 and HEVC on Windows. @end itemize + +@item +Otherwise the default ratecontrol method @var{CQP} is used. @end itemize Note that depending on your system, a different mode than the one you specified @@ -3300,19 +3537,6 @@ Specifies how many asynchronous operations an application performs before the application explicitly synchronizes the result. If zero, the value is not specified. -@item @var{avbr_accuracy} -Accuracy of the AVBR ratecontrol (unit of tenth of percent). - -@item @var{avbr_convergence} -Convergence of the AVBR ratecontrol (unit of 100 frames) - -The parameters @var{avbr_accuracy} and @var{avbr_convergence} are for the -average variable bitrate control (AVBR) algorithm. -The algorithm focuses on overall encoding quality while meeting the specified -bitrate, @var{target_bitrate}, within the accuracy range @var{avbr_accuracy}, -after a @var{avbr_Convergence} period. This method does not follow HRD and the -instant bitrate is not capped or padded. - @item @var{preset} This option itemizes a range of choices from veryfast (best speed) to veryslow (best quality). @@ -3337,10 +3561,69 @@ For encoders set this flag to ON to reduce power consumption and GPU usage. Following options can be used durning qsv encoding. @table @option -@item @var{qsv_config_qp} +@item @var{global_quality} +@item @var{i_quant_factor} +@item @var{i_quant_offset} +@item @var{b_quant_factor} +@item @var{b_quant_offset} +Supported in h264_qsv and hevc_qsv. +Change these value to reset qsv codec's qp configuration. + +@item @var{max_frame_size} Supported in h264_qsv and hevc_qsv. -This option can be set in per-frame metadata. QP parameter can be dynamically -changed when encoding in CQP mode. +Change this value to reset qsv codec's MaxFrameSize configuration. + +@item @var{gop_size} +Change this value to reset qsv codec's gop configuration. + +@item @var{int_ref_type} +@item @var{int_ref_cycle_size} +@item @var{int_ref_qp_delta} +@item @var{int_ref_cycle_dist} +Supported in h264_qsv and hevc_qsv. +Change these value to reset qsv codec's Intra Refresh configuration. + +@item @var{qmax} +@item @var{qmin} +@item @var{max_qp_i} +@item @var{min_qp_i} +@item @var{max_qp_p} +@item @var{min_qp_p} +@item @var{max_qp_b} +@item @var{min_qp_b} +Supported in h264_qsv. +Change these value to reset qsv codec's max/min qp configuration. + +@item @var{low_delay_brc} +Supported in h264_qsv, hevc_qsv and av1_qsv. +Change this value to reset qsv codec's low_delay_brc configuration. + +@item @var{framerate} +Change this value to reset qsv codec's framerate configuration. + +@item @var{bit_rate} +@item @var{rc_buffer_size} +@item @var{rc_initial_buffer_occupancy} +@item @var{rc_max_rate} +Change these value to reset qsv codec's bitrate control configuration. + +@item @var{pic_timing_sei} +Supported in h264_qsv and hevc_qsv. +Change this value to reset qsv codec's pic_timing_sei configuration. + +@item @var{qsv_params} +Set QSV encoder parameters as a colon-separated list of key-value pairs. + +The @option{qsv_params} should be formatted as @code{key1=value1:key2=value2:...}. + +These parameters are passed directly to the underlying Intel Quick Sync Video (QSV) encoder using the MFXSetParameter function. + +Example: +@example +ffmpeg -i input.mp4 -c:v h264_qsv -qsv_params "CodingOption1=1:CodingOption2=2" output.mp4 +@end example + +This option allows fine-grained control over various encoder-specific settings provided by the QSV encoder. @end table @subsection H264 options @@ -3444,8 +3727,10 @@ Specifies intra refresh type. The major goal of intra refresh is improvement of error resilience without significant impact on encoded bitstream size caused by I frames. The SDK encoder achieves this by encoding part of each frame in refresh cycle using intra MBs. @var{none} means no refresh. @var{vertical} means -vertical refresh, by column of MBs. To enable intra refresh, B frame should be -set to 0. +vertical refresh, by column of MBs. @var{horizontal} means horizontal refresh, +by rows of MBs. @var{slice} means horizontal refresh by slices without +overlapping. In case of @var{slice}, in_ref_cycle_size is ignored. To enable +intra refresh, B frame should be set to 0. @item @var{int_ref_cycle_size} Specifies number of pictures within refresh cycle starting from 2. 0 and 1 are @@ -3500,6 +3785,52 @@ Maximum video quantizer scale for B frame. @item @var{min_qp_b} Minimum video quantizer scale for B frame. + +@item @var{scenario} +Provides a hint to encoder about the scenario for the encoding session. +@table @samp +@item unknown +@item displayremoting +@item videoconference +@item archive +@item livestreaming +@item cameracapture +@item videosurveillance +@item gamestreaming +@item remotegaming +@end table + +@item @var{avbr_accuracy} +Accuracy of the AVBR ratecontrol (unit of tenth of percent). + +@item @var{avbr_convergence} +Convergence of the AVBR ratecontrol (unit of 100 frames) + +The parameters @var{avbr_accuracy} and @var{avbr_convergence} are for the +average variable bitrate control (AVBR) algorithm. +The algorithm focuses on overall encoding quality while meeting the specified +bitrate, @var{target_bitrate}, within the accuracy range @var{avbr_accuracy}, +after a @var{avbr_Convergence} period. This method does not follow HRD and the +instant bitrate is not capped or padded. + +@item @var{skip_frame} +Use per-frame metadata "qsv_skip_frame" to skip frame when encoding. This option +defines the usage of this metadata. +@table @samp +@item no_skip +Frame skipping is disabled. +@item insert_dummy +Encoder inserts into bitstream frame where all macroblocks are encoded as +skipped. +@item insert_nothing +Similar to insert_dummy, but encoder inserts nothing into bitstream. The skipped +frames are still used in brc. For example, gop still include skipped frames, and +the frames after skipped frames will be larger in size. +@item brc_only +skip_frame metadata indicates the number of missed frames before the current +frame. +@end table + @end table @subsection HEVC Options @@ -3540,6 +3871,13 @@ Setting this flag turns on or off LowDelayBRC feautre in qsv plugin, which provi more accurate bitrate control to minimize the variance of bitstream size frame by frame. Value: -1-default 0-off 1-on +@item @var{adaptive_i} +This flag controls insertion of I frames by the QSV encoder. Turn ON this flag +to allow changing of frame type from P and B to I. + +@item @var{adaptive_b} +This flag controls changing of frame type from B to P. + @item @var{p_strategy} Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0). @@ -3583,6 +3921,15 @@ Set the encoding profile (scc requires libmfx >= 1.32). @item scc @end table +@item @var{tier} +Set the encoding tier (only level >= 4 can support high tier). +This option only takes effect when the level option is specified. + +@table @samp +@item main +@item high +@end table + @item @var{gpb} 1: GPB (generalized P/B frame) @@ -3609,8 +3956,10 @@ Specifies intra refresh type. The major goal of intra refresh is improvement of error resilience without significant impact on encoded bitstream size caused by I frames. The SDK encoder achieves this by encoding part of each frame in refresh cycle using intra MBs. @var{none} means no refresh. @var{vertical} means -vertical refresh, by column of MBs. To enable intra refresh, B frame should be -set to 0. +vertical refresh, by column of MBs. @var{horizontal} means horizontal refresh, +by rows of MBs. @var{slice} means horizontal refresh by slices without +overlapping. In case of @var{slice}, in_ref_cycle_size is ignored. To enable +intra refresh, B frame should be set to 0. @item @var{int_ref_cycle_size} Specifies number of pictures within refresh cycle starting from 2. 0 and 1 are @@ -3641,6 +3990,52 @@ Maximum video quantizer scale for B frame. @item @var{min_qp_b} Minimum video quantizer scale for B frame. + +@item @var{scenario} +Provides a hint to encoder about the scenario for the encoding session. +@table @samp +@item unknown +@item displayremoting +@item videoconference +@item archive +@item livestreaming +@item cameracapture +@item videosurveillance +@item gamestreaming +@item remotegaming +@end table + +@item @var{avbr_accuracy} +Accuracy of the AVBR ratecontrol (unit of tenth of percent). + +@item @var{avbr_convergence} +Convergence of the AVBR ratecontrol (unit of 100 frames) + +The parameters @var{avbr_accuracy} and @var{avbr_convergence} are for the +average variable bitrate control (AVBR) algorithm. +The algorithm focuses on overall encoding quality while meeting the specified +bitrate, @var{target_bitrate}, within the accuracy range @var{avbr_accuracy}, +after a @var{avbr_Convergence} period. This method does not follow HRD and the +instant bitrate is not capped or padded. + +@item @var{skip_frame} +Use per-frame metadata "qsv_skip_frame" to skip frame when encoding. This option +defines the usage of this metadata. +@table @samp +@item no_skip +Frame skipping is disabled. +@item insert_dummy +Encoder inserts into bitstream frame where all macroblocks are encoded as +skipped. +@item insert_nothing +Similar to insert_dummy, but encoder inserts nothing into bitstream. The skipped +frames are still used in brc. For example, gop still include skipped frames, and +the frames after skipped frames will be larger in size. +@item brc_only +skip_frame metadata indicates the number of missed frames before the current +frame. +@end table + @end table @subsection MPEG2 Options @@ -3674,6 +4069,56 @@ Number of columns for tiled encoding (requires libmfx >= 1.29). Number of rows for tiled encoding (requires libmfx >= 1.29). @end table +@subsection AV1 Options +These options are used by av1_qsv (requires libvpl). +@table @option +@item @var{profile} +@table @samp +@item unknown +@item main +@end table + +@item @var{tile_cols} +Number of columns for tiled encoding. + +@item @var{tile_rows} +Number of rows for tiled encoding. + +@item @var{adaptive_i} +This flag controls insertion of I frames by the QSV encoder. Turn ON this flag +to allow changing of frame type from P and B to I. + +@item @var{adaptive_b} +This flag controls changing of frame type from B to P. + +@item @var{b_strategy} +This option controls usage of B frames as reference. + +@item @var{extbrc} +Extended bitrate control. + +@item @var{look_ahead_depth} +Depth of look ahead in number frames, available when extbrc option is enabled. + +@item @var{low_delay_brc} +Setting this flag turns on or off LowDelayBRC feautre in qsv plugin, which provides +more accurate bitrate control to minimize the variance of bitstream size frame +by frame. Value: -1-default 0-off 1-on + +@item @var{max_frame_size} +Set the allowed max size in bytes for each frame. If the frame size exceeds +the limitation, encoder will adjust the QP value to control the frame size. +Invalid in CQP rate control mode. + +@item @var{max_frame_size_i} +Maximum encoded frame size for I frames in bytes. If this value is set as larger +than zero, then for I frames the value set by max_frame_size is ignored. + +@item @var{max_frame_size_p} +Maximum encoded frame size for P frames in bytes. If this value is set as larger +than zero, then for P frames the value set by max_frame_size is ignored. +@end table + @section snow @subsection Options @@ -3788,11 +4233,29 @@ Quality-defined variable-bitrate. Average variable bitrate. @end table +@item blbrc +Enable block level rate control, which assigns different bitrate block by block. +Invalid for CQP mode. + @end table Each encoder also has its own specific options: @table @option +@item av1_vaapi +@option{profile} sets the value of @emph{seq_profile}. +@option{tier} sets the value of @emph{seq_tier}. +@option{level} sets the value of @emph{seq_level_idx}. + +@table @option +@item tiles +Set the number of tiles to encode the input video with, as columns x rows. +(default is auto, which means use minimal tile column/row number). +@item tile_groups +Set tile groups number. All the tiles will be distributed as evenly as possible to +each tile group. (default is 1). +@end table + @item h264_vaapi @option{profile} sets the value of @emph{profile_idc} and the @emph{constraint_set*_flag}s. @option{level} sets the value of @emph{level_idc}. diff --git a/mythtv/external/FFmpeg/doc/examples/.gitignore b/mythtv/external/FFmpeg/doc/examples/.gitignore index 44960e1de7f..d787afdd4c5 100644 --- a/mythtv/external/FFmpeg/doc/examples/.gitignore +++ b/mythtv/external/FFmpeg/doc/examples/.gitignore @@ -22,3 +22,4 @@ /transcoding /vaapi_encode /vaapi_transcode +/qsv_transcode diff --git a/mythtv/external/FFmpeg/doc/examples/Makefile b/mythtv/external/FFmpeg/doc/examples/Makefile index 81bfd34d5d0..4efed6b11d8 100644 --- a/mythtv/external/FFmpeg/doc/examples/Makefile +++ b/mythtv/external/FFmpeg/doc/examples/Makefile @@ -1,26 +1,27 @@ +EXAMPLES-$(CONFIG_AVIO_HTTP_SERVE_FILES) += avio_http_serve_files EXAMPLES-$(CONFIG_AVIO_LIST_DIR_EXAMPLE) += avio_list_dir -EXAMPLES-$(CONFIG_AVIO_READING_EXAMPLE) += avio_reading +EXAMPLES-$(CONFIG_AVIO_READ_CALLBACK_EXAMPLE) += avio_read_callback EXAMPLES-$(CONFIG_DECODE_AUDIO_EXAMPLE) += decode_audio +EXAMPLES-$(CONFIG_DECODE_FILTER_AUDIO_EXAMPLE) += decode_filter_audio +EXAMPLES-$(CONFIG_DECODE_FILTER_VIDEO_EXAMPLE) += decode_filter_video EXAMPLES-$(CONFIG_DECODE_VIDEO_EXAMPLE) += decode_video -EXAMPLES-$(CONFIG_DEMUXING_DECODING_EXAMPLE) += demuxing_decoding +EXAMPLES-$(CONFIG_DEMUX_DECODE_EXAMPLE) += demux_decode EXAMPLES-$(CONFIG_ENCODE_AUDIO_EXAMPLE) += encode_audio EXAMPLES-$(CONFIG_ENCODE_VIDEO_EXAMPLE) += encode_video EXAMPLES-$(CONFIG_EXTRACT_MVS_EXAMPLE) += extract_mvs EXAMPLES-$(CONFIG_FILTER_AUDIO_EXAMPLE) += filter_audio -EXAMPLES-$(CONFIG_FILTERING_AUDIO_EXAMPLE) += filtering_audio -EXAMPLES-$(CONFIG_FILTERING_VIDEO_EXAMPLE) += filtering_video -EXAMPLES-$(CONFIG_HTTP_MULTICLIENT_EXAMPLE) += http_multiclient EXAMPLES-$(CONFIG_HW_DECODE_EXAMPLE) += hw_decode -EXAMPLES-$(CONFIG_METADATA_EXAMPLE) += metadata -EXAMPLES-$(CONFIG_MUXING_EXAMPLE) += muxing -EXAMPLES-$(CONFIG_QSVDEC_EXAMPLE) += qsvdec -EXAMPLES-$(CONFIG_REMUXING_EXAMPLE) += remuxing -EXAMPLES-$(CONFIG_RESAMPLING_AUDIO_EXAMPLE) += resampling_audio -EXAMPLES-$(CONFIG_SCALING_VIDEO_EXAMPLE) += scaling_video +EXAMPLES-$(CONFIG_MUX_EXAMPLE) += mux +EXAMPLES-$(CONFIG_QSV_DECODE_EXAMPLE) += qsv_decode +EXAMPLES-$(CONFIG_REMUX_EXAMPLE) += remux +EXAMPLES-$(CONFIG_RESAMPLE_AUDIO_EXAMPLE) += resample_audio +EXAMPLES-$(CONFIG_SCALE_VIDEO_EXAMPLE) += scale_video +EXAMPLES-$(CONFIG_SHOW_METADATA_EXAMPLE) += show_metadata EXAMPLES-$(CONFIG_TRANSCODE_AAC_EXAMPLE) += transcode_aac -EXAMPLES-$(CONFIG_TRANSCODING_EXAMPLE) += transcoding +EXAMPLES-$(CONFIG_TRANSCODE_EXAMPLE) += transcode EXAMPLES-$(CONFIG_VAAPI_ENCODE_EXAMPLE) += vaapi_encode EXAMPLES-$(CONFIG_VAAPI_TRANSCODE_EXAMPLE) += vaapi_transcode +EXAMPLES-$(CONFIG_QSV_TRANSCODE_EXAMPLE) += qsv_transcode EXAMPLES := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)$(EXESUF)) EXAMPLES_G := $(EXAMPLES-yes:%=doc/examples/%$(PROGSSUF)_g$(EXESUF)) diff --git a/mythtv/external/FFmpeg/doc/examples/Makefile.example b/mythtv/external/FFmpeg/doc/examples/Makefile.example index a232d97f987..dee9ebf2f0b 100644 --- a/mythtv/external/FFmpeg/doc/examples/Makefile.example +++ b/mythtv/external/FFmpeg/doc/examples/Makefile.example @@ -11,33 +11,40 @@ CFLAGS += -Wall -g CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS) LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS) -EXAMPLES= avio_list_dir \ - avio_reading \ +# missing the following targets, since they need special options in the FFmpeg build: +# qsv_decode +# qsv_transcode +# vaapi_encode +# vaapi_transcode + +EXAMPLES=\ + avio_http_serve_files \ + avio_list_dir \ + avio_read_callback \ decode_audio \ + decode_filter_audio \ + decode_filter_video \ decode_video \ - demuxing_decoding \ + demux_decode \ encode_audio \ encode_video \ extract_mvs \ - filtering_video \ - filtering_audio \ - http_multiclient \ hw_decode \ - metadata \ - muxing \ - remuxing \ - resampling_audio \ - scaling_video \ + mux \ + remux \ + resample_audio \ + scale_video \ + show_metadata \ transcode_aac \ - transcoding \ + transcode OBJS=$(addsuffix .o,$(EXAMPLES)) # the following examples make explicit use of the math library avcodec: LDLIBS += -lm encode_audio: LDLIBS += -lm -muxing: LDLIBS += -lm -resampling_audio: LDLIBS += -lm +mux: LDLIBS += -lm +resample_audio: LDLIBS += -lm .phony: all clean-test clean diff --git a/mythtv/external/FFmpeg/doc/examples/README b/mythtv/external/FFmpeg/doc/examples/README index c1ce619d350..6cb4b6e17a2 100644 --- a/mythtv/external/FFmpeg/doc/examples/README +++ b/mythtv/external/FFmpeg/doc/examples/README @@ -7,8 +7,10 @@ that you have them installed and working on your system. Method 1: build the installed examples in a generic read/write user directory -Copy to a read/write user directory and just use "make", it will link -to the libraries on your system, assuming the PKG_CONFIG_PATH is +Copy to a read/write user directory and run: +make -f Makefile.example + +It will link to the libraries on your system, assuming the PKG_CONFIG_PATH is correctly configured. Method 2: build the examples in-tree @@ -20,4 +22,4 @@ examples using "make examplesclean" If you want to try the dedicated Makefile examples (to emulate the first method), go into doc/examples and run a command such as -PKG_CONFIG_PATH=pc-uninstalled make. +PKG_CONFIG_PATH=pc-uninstalled make -f Makefile.example diff --git a/mythtv/external/FFmpeg/doc/examples/http_multiclient.c b/mythtv/external/FFmpeg/doc/examples/avio_http_serve_files.c similarity index 95% rename from mythtv/external/FFmpeg/doc/examples/http_multiclient.c rename to mythtv/external/FFmpeg/doc/examples/avio_http_serve_files.c index 831e89c60a4..2aae3870c2d 100644 --- a/mythtv/external/FFmpeg/doc/examples/http_multiclient.c +++ b/mythtv/external/FFmpeg/doc/examples/avio_http_serve_files.c @@ -21,12 +21,11 @@ */ /** - * @file - * libavformat multi-client network API usage example. + * @file libavformat multi-client network API usage example + * @example avio_http_serve_files.c * - * @example http_multiclient.c - * This example will serve a file without decoding or demuxing it over http. - * Multiple clients can connect and will receive the same file. + * Serve a file without decoding or demuxing it over the HTTP protocol. Multiple + * clients can connect and will receive the same file. */ #include diff --git a/mythtv/external/FFmpeg/doc/examples/avio_list_dir.c b/mythtv/external/FFmpeg/doc/examples/avio_list_dir.c index 3073baaefa9..bb19debad31 100644 --- a/mythtv/external/FFmpeg/doc/examples/avio_list_dir.c +++ b/mythtv/external/FFmpeg/doc/examples/avio_list_dir.c @@ -20,6 +20,13 @@ * THE SOFTWARE. */ +/** + * @file libavformat AVIOContext list directory API usage example + * @example avio_list_dir.c + * + * Show how to list directories through the libavformat AVIOContext API. + */ + #include #include #include diff --git a/mythtv/external/FFmpeg/doc/examples/avio_reading.c b/mythtv/external/FFmpeg/doc/examples/avio_read_callback.c similarity index 96% rename from mythtv/external/FFmpeg/doc/examples/avio_reading.c rename to mythtv/external/FFmpeg/doc/examples/avio_read_callback.c index 36ee02afa54..dffc061d9f8 100644 --- a/mythtv/external/FFmpeg/doc/examples/avio_reading.c +++ b/mythtv/external/FFmpeg/doc/examples/avio_read_callback.c @@ -21,18 +21,18 @@ */ /** - * @file - * libavformat AVIOContext API example. + * @file libavformat AVIOContext read callback API usage example + * @example avio_read_callback.c * * Make libavformat demuxer access media content through a custom * AVIOContext read callback. - * @example avio_reading.c */ #include #include #include #include +#include struct buffer_data { uint8_t *ptr; diff --git a/mythtv/external/FFmpeg/doc/examples/decode_audio.c b/mythtv/external/FFmpeg/doc/examples/decode_audio.c index 49ad22cba63..bcb3d87a695 100644 --- a/mythtv/external/FFmpeg/doc/examples/decode_audio.c +++ b/mythtv/external/FFmpeg/doc/examples/decode_audio.c @@ -21,10 +21,11 @@ */ /** - * @file - * audio decoding with libavcodec API example - * + * @file libavcodec audio decoding API usage example * @example decode_audio.c + * + * Decode data from an MP2 input file and generate a raw audio file to + * be played with ffplay. */ #include diff --git a/mythtv/external/FFmpeg/doc/examples/filtering_audio.c b/mythtv/external/FFmpeg/doc/examples/decode_filter_audio.c similarity index 92% rename from mythtv/external/FFmpeg/doc/examples/filtering_audio.c rename to mythtv/external/FFmpeg/doc/examples/decode_filter_audio.c index 51fc47be2a9..d637ca1724e 100644 --- a/mythtv/external/FFmpeg/doc/examples/filtering_audio.c +++ b/mythtv/external/FFmpeg/doc/examples/decode_filter_audio.c @@ -23,9 +23,11 @@ */ /** - * @file - * API example for audio decoding and filtering - * @example filtering_audio.c + * @file audio decoding and filtering usage example + * @example decode_filter_audio.c + * + * Demux, decode and filter audio input file, generate a raw audio + * file to be played with ffplay. */ #include @@ -35,6 +37,7 @@ #include #include #include +#include #include static const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"; @@ -277,6 +280,25 @@ int main(int argc, char **argv) } av_packet_unref(packet); } + if (ret == AVERROR_EOF) { + /* signal EOF to the filtergraph */ + if (av_buffersrc_add_frame_flags(buffersrc_ctx, NULL, 0) < 0) { + av_log(NULL, AV_LOG_ERROR, "Error while closing the filtergraph\n"); + goto end; + } + + /* pull remaining frames from the filtergraph */ + while (1) { + ret = av_buffersink_get_frame(buffersink_ctx, filt_frame); + if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) + break; + if (ret < 0) + goto end; + print_frame(filt_frame); + av_frame_unref(filt_frame); + } + } + end: avfilter_graph_free(&filter_graph); avcodec_free_context(&dec_ctx); diff --git a/mythtv/external/FFmpeg/doc/examples/filtering_video.c b/mythtv/external/FFmpeg/doc/examples/decode_filter_video.c similarity index 92% rename from mythtv/external/FFmpeg/doc/examples/filtering_video.c rename to mythtv/external/FFmpeg/doc/examples/decode_filter_video.c index 7b3e16c40c0..b91ca56d4e9 100644 --- a/mythtv/external/FFmpeg/doc/examples/filtering_video.c +++ b/mythtv/external/FFmpeg/doc/examples/decode_filter_video.c @@ -24,7 +24,7 @@ /** * @file * API example for decoding and filtering - * @example filtering_video.c + * @example decode_filter_video.c */ #define _XOPEN_SOURCE 600 /* for usleep */ @@ -36,6 +36,7 @@ #include #include #include +#include #include const char *filter_descr = "scale=78:24,transpose=cclock"; @@ -276,6 +277,25 @@ int main(int argc, char **argv) } av_packet_unref(packet); } + if (ret == AVERROR_EOF) { + /* signal EOF to the filtergraph */ + if (av_buffersrc_add_frame_flags(buffersrc_ctx, NULL, 0) < 0) { + av_log(NULL, AV_LOG_ERROR, "Error while closing the filtergraph\n"); + goto end; + } + + /* pull remaining frames from the filtergraph */ + while (1) { + ret = av_buffersink_get_frame(buffersink_ctx, filt_frame); + if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) + break; + if (ret < 0) + goto end; + display_frame(filt_frame, buffersink_ctx->inputs[0]->time_base); + av_frame_unref(filt_frame); + } + } + end: avfilter_graph_free(&filter_graph); avcodec_free_context(&dec_ctx); diff --git a/mythtv/external/FFmpeg/doc/examples/decode_video.c b/mythtv/external/FFmpeg/doc/examples/decode_video.c index 7238e381039..b0b3a6ae928 100644 --- a/mythtv/external/FFmpeg/doc/examples/decode_video.c +++ b/mythtv/external/FFmpeg/doc/examples/decode_video.c @@ -21,10 +21,11 @@ */ /** - * @file - * video decoding with libavcodec API example + * @file libavcodec video decoding API usage example + * @example decode_video.c * * - * @example decode_video.c + * Read from an MPEG1 video file, decode frames, and generate PGM images as + * output. */ #include @@ -69,12 +70,12 @@ static void decode(AVCodecContext *dec_ctx, AVFrame *frame, AVPacket *pkt, exit(1); } - printf("saving frame %3d\n", dec_ctx->frame_number); + printf("saving frame %3"PRId64"\n", dec_ctx->frame_num); fflush(stdout); /* the picture is allocated by the decoder. no need to free it */ - snprintf(buf, sizeof(buf), "%s-%d", filename, dec_ctx->frame_number); + snprintf(buf, sizeof(buf), "%s-%"PRId64, filename, dec_ctx->frame_num); pgm_save(frame->data[0], frame->linesize[0], frame->width, frame->height, buf); } diff --git a/mythtv/external/FFmpeg/doc/examples/demuxing_decoding.c b/mythtv/external/FFmpeg/doc/examples/demux_decode.c similarity index 96% rename from mythtv/external/FFmpeg/doc/examples/demuxing_decoding.c rename to mythtv/external/FFmpeg/doc/examples/demux_decode.c index 999a78db0d6..64f5547bc43 100644 --- a/mythtv/external/FFmpeg/doc/examples/demuxing_decoding.c +++ b/mythtv/external/FFmpeg/doc/examples/demux_decode.c @@ -21,12 +21,12 @@ */ /** - * @file - * Demuxing and decoding example. + * @file libavformat and libavcodec demuxing and decoding API usage example + * @example demux_decode.c * - * Show how to use the libavformat and libavcodec API to demux and - * decode audio and video data. - * @example demuxing_decoding.c + * Show how to use the libavformat and libavcodec API to demux and decode audio + * and video data. Write the output as raw audio and input files to be played by + * ffplay. */ #include @@ -73,14 +73,14 @@ static int output_video_frame(AVFrame *frame) return -1; } - printf("video_frame n:%d coded_n:%d\n", - video_frame_count++, frame->coded_picture_number); + printf("video_frame n:%d\n", + video_frame_count++); /* copy decoded frame to destination buffer: * this is required since rawvideo expects non aligned data */ - av_image_copy(video_dst_data, video_dst_linesize, - (const uint8_t **)(frame->data), frame->linesize, - pix_fmt, width, height); + av_image_copy2(video_dst_data, video_dst_linesize, + frame->data, frame->linesize, + pix_fmt, width, height); /* write to rawvideo file */ fwrite(video_dst_data[0], 1, video_dst_bufsize, video_dst_file); @@ -138,11 +138,9 @@ static int decode_packet(AVCodecContext *dec, const AVPacket *pkt) ret = output_audio_frame(frame); av_frame_unref(frame); - if (ret < 0) - return ret; } - return 0; + return ret; } static int open_codec_context(int *stream_idx, diff --git a/mythtv/external/FFmpeg/doc/examples/encode_audio.c b/mythtv/external/FFmpeg/doc/examples/encode_audio.c index 9a1792b7250..bb16683d946 100644 --- a/mythtv/external/FFmpeg/doc/examples/encode_audio.c +++ b/mythtv/external/FFmpeg/doc/examples/encode_audio.c @@ -21,10 +21,10 @@ */ /** - * @file - * audio encoding with libavcodec API example. - * + * @file libavcodec encoding audio API usage examples * @example encode_audio.c + * + * Generate a synthetic audio signal and encode it to an output MP2 file. */ #include diff --git a/mythtv/external/FFmpeg/doc/examples/encode_video.c b/mythtv/external/FFmpeg/doc/examples/encode_video.c index 939ed68324e..4fae146f2e9 100644 --- a/mythtv/external/FFmpeg/doc/examples/encode_video.c +++ b/mythtv/external/FFmpeg/doc/examples/encode_video.c @@ -21,10 +21,10 @@ */ /** - * @file - * video encoding with libavcodec API example - * + * @file libavcodec encoding video API usage example * @example encode_video.c + * + * Generate synthetic video data and encode it to an output file. */ #include @@ -202,7 +202,7 @@ int main(int argc, char **argv) It makes only sense because this tiny examples writes packets directly. This is called "elementary stream" and only works for some codecs. To create a valid file, you usually need to write packets - into a proper file format or protocol; see muxing.c. + into a proper file format or protocol; see mux.c. */ if (codec->id == AV_CODEC_ID_MPEG1VIDEO || codec->id == AV_CODEC_ID_MPEG2VIDEO) fwrite(endcode, 1, sizeof(endcode), f); diff --git a/mythtv/external/FFmpeg/doc/examples/extract_mvs.c b/mythtv/external/FFmpeg/doc/examples/extract_mvs.c index cc1311da918..5603064d723 100644 --- a/mythtv/external/FFmpeg/doc/examples/extract_mvs.c +++ b/mythtv/external/FFmpeg/doc/examples/extract_mvs.c @@ -21,6 +21,14 @@ * THE SOFTWARE. */ +/** + * @file libavcodec motion vectors extraction API usage example + * @example extract_mvs.c + * + * Read from input file, decode video stream and print a motion vectors + * representation to stdout. + */ + #include #include #include @@ -61,10 +69,11 @@ static int decode_packet(const AVPacket *pkt) const AVMotionVector *mvs = (const AVMotionVector *)sd->data; for (i = 0; i < sd->size / sizeof(*mvs); i++) { const AVMotionVector *mv = &mvs[i]; - printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n", + printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64",%4d,%4d,%4d\n", video_frame_count, mv->source, mv->w, mv->h, mv->src_x, mv->src_y, - mv->dst_x, mv->dst_y, mv->flags); + mv->dst_x, mv->dst_y, mv->flags, + mv->motion_x, mv->motion_y, mv->motion_scale); } } av_frame_unref(frame); @@ -166,7 +175,7 @@ int main(int argc, char **argv) goto end; } - printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags\n"); + printf("framenum,source,blockw,blockh,srcx,srcy,dstx,dsty,flags,motion_x,motion_y,motion_scale\n"); /* read frames from the file */ while (av_read_frame(fmt_ctx, pkt) >= 0) { diff --git a/mythtv/external/FFmpeg/doc/examples/filter_audio.c b/mythtv/external/FFmpeg/doc/examples/filter_audio.c index f53e52562b8..8b237e2adf3 100644 --- a/mythtv/external/FFmpeg/doc/examples/filter_audio.c +++ b/mythtv/external/FFmpeg/doc/examples/filter_audio.c @@ -19,13 +19,11 @@ */ /** - * @file - * libavfilter API usage example. - * + * @file libavfilter audio filtering API usage example * @example filter_audio.c - * This example will generate a sine wave audio, - * pass it through a simple filter chain, and then compute the MD5 checksum of - * the output data. + * + * This example will generate a sine wave audio, pass it through a simple filter + * chain, and then compute the MD5 checksum of the output data. * * The filter chain it uses is: * (input) -> abuffer -> volume -> aformat -> abuffersink -> (output) @@ -43,15 +41,15 @@ #include #include -#include "libavutil/channel_layout.h" -#include "libavutil/md5.h" -#include "libavutil/mem.h" -#include "libavutil/opt.h" -#include "libavutil/samplefmt.h" +#include +#include +#include +#include +#include -#include "libavfilter/avfilter.h" -#include "libavfilter/buffersink.h" -#include "libavfilter/buffersrc.h" +#include +#include +#include #define INPUT_SAMPLERATE 48000 #define INPUT_FORMAT AV_SAMPLE_FMT_FLTP diff --git a/mythtv/external/FFmpeg/doc/examples/hw_decode.c b/mythtv/external/FFmpeg/doc/examples/hw_decode.c index 0d23f451e69..ac4e4455050 100644 --- a/mythtv/external/FFmpeg/doc/examples/hw_decode.c +++ b/mythtv/external/FFmpeg/doc/examples/hw_decode.c @@ -24,18 +24,18 @@ */ /** - * @file - * HW-Accelerated decoding example. - * + * @file HW-accelerated decoding API usage.example * @example hw_decode.c - * This example shows how to do HW-accelerated decoding with output - * frames from the HW video surfaces. + * + * Perform HW-accelerated decoding with output frames from HW video + * surfaces. */ #include #include #include +#include #include #include #include diff --git a/mythtv/external/FFmpeg/doc/examples/muxing.c b/mythtv/external/FFmpeg/doc/examples/mux.c similarity index 95% rename from mythtv/external/FFmpeg/doc/examples/muxing.c rename to mythtv/external/FFmpeg/doc/examples/mux.c index 3acb7783223..0f3a2bb125f 100644 --- a/mythtv/external/FFmpeg/doc/examples/muxing.c +++ b/mythtv/external/FFmpeg/doc/examples/mux.c @@ -21,12 +21,11 @@ */ /** - * @file - * libavformat API example. + * @file libavformat muxing API usage example + * @example mux.c * - * Output a media file in any supported libavformat format. The default - * codecs are used. - * @example muxing.c + * Generate a synthetic audio and video signal and mux them to a media file in + * any supported libavformat format. The default codecs are used. */ #include @@ -219,8 +218,6 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt, int sample_rate, int nb_samples) { AVFrame *frame = av_frame_alloc(); - int ret; - if (!frame) { fprintf(stderr, "Error allocating an audio frame\n"); exit(1); @@ -232,8 +229,7 @@ static AVFrame *alloc_audio_frame(enum AVSampleFormat sample_fmt, frame->nb_samples = nb_samples; if (nb_samples) { - ret = av_frame_get_buffer(frame, 0); - if (ret < 0) { + if (av_frame_get_buffer(frame, 0) < 0) { fprintf(stderr, "Error allocating an audio buffer\n"); exit(1); } @@ -351,8 +347,7 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost) if (frame) { /* convert samples from native format to destination codec format, using the resampler */ /* compute destination number of samples */ - dst_nb_samples = av_rescale_rnd(swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples, - c->sample_rate, c->sample_rate, AV_ROUND_UP); + dst_nb_samples = swr_get_delay(ost->swr_ctx, c->sample_rate) + frame->nb_samples; av_assert0(dst_nb_samples == frame->nb_samples); /* when we pass a frame to the encoder, it may keep a reference to it @@ -383,27 +378,27 @@ static int write_audio_frame(AVFormatContext *oc, OutputStream *ost) /**************************************************************/ /* video output */ -static AVFrame *alloc_picture(enum AVPixelFormat pix_fmt, int width, int height) +static AVFrame *alloc_frame(enum AVPixelFormat pix_fmt, int width, int height) { - AVFrame *picture; + AVFrame *frame; int ret; - picture = av_frame_alloc(); - if (!picture) + frame = av_frame_alloc(); + if (!frame) return NULL; - picture->format = pix_fmt; - picture->width = width; - picture->height = height; + frame->format = pix_fmt; + frame->width = width; + frame->height = height; /* allocate the buffers for the frame data */ - ret = av_frame_get_buffer(picture, 0); + ret = av_frame_get_buffer(frame, 0); if (ret < 0) { fprintf(stderr, "Could not allocate frame data.\n"); exit(1); } - return picture; + return frame; } static void open_video(AVFormatContext *oc, const AVCodec *codec, @@ -424,7 +419,7 @@ static void open_video(AVFormatContext *oc, const AVCodec *codec, } /* allocate and init a re-usable frame */ - ost->frame = alloc_picture(c->pix_fmt, c->width, c->height); + ost->frame = alloc_frame(c->pix_fmt, c->width, c->height); if (!ost->frame) { fprintf(stderr, "Could not allocate video frame\n"); exit(1); @@ -435,9 +430,9 @@ static void open_video(AVFormatContext *oc, const AVCodec *codec, * output format. */ ost->tmp_frame = NULL; if (c->pix_fmt != AV_PIX_FMT_YUV420P) { - ost->tmp_frame = alloc_picture(AV_PIX_FMT_YUV420P, c->width, c->height); + ost->tmp_frame = alloc_frame(AV_PIX_FMT_YUV420P, c->width, c->height); if (!ost->tmp_frame) { - fprintf(stderr, "Could not allocate temporary picture\n"); + fprintf(stderr, "Could not allocate temporary video frame\n"); exit(1); } } diff --git a/mythtv/external/FFmpeg/doc/examples/qsvdec.c b/mythtv/external/FFmpeg/doc/examples/qsv_decode.c similarity index 93% rename from mythtv/external/FFmpeg/doc/examples/qsvdec.c rename to mythtv/external/FFmpeg/doc/examples/qsv_decode.c index b662ae91c3c..5a6f3625aa6 100644 --- a/mythtv/external/FFmpeg/doc/examples/qsvdec.c +++ b/mythtv/external/FFmpeg/doc/examples/qsv_decode.c @@ -21,28 +21,25 @@ */ /** - * @file - * Intel QSV-accelerated H.264 decoding example. + * @file Intel QSV-accelerated H.264 decoding API usage example + * @example qsv_decode.c * - * @example qsvdec.c - * This example shows how to do QSV-accelerated H.264 decoding with output - * frames in the GPU video surfaces. + * Perform QSV-accelerated H.264 decoding with output frames in the + * GPU video surfaces, write the decoded frames to an output file. */ -#include "config.h" - #include -#include "libavformat/avformat.h" -#include "libavformat/avio.h" +#include +#include -#include "libavcodec/avcodec.h" +#include -#include "libavutil/buffer.h" -#include "libavutil/error.h" -#include "libavutil/hwcontext.h" -#include "libavutil/hwcontext_qsv.h" -#include "libavutil/mem.h" +#include +#include +#include +#include +#include static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts) { diff --git a/mythtv/external/FFmpeg/doc/examples/qsv_transcode.c b/mythtv/external/FFmpeg/doc/examples/qsv_transcode.c new file mode 100644 index 00000000000..665a76af2ed --- /dev/null +++ b/mythtv/external/FFmpeg/doc/examples/qsv_transcode.c @@ -0,0 +1,436 @@ +/* + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @file Intel QSV-accelerated video transcoding API usage example + * @example qsv_transcode.c + * + * Perform QSV-accelerated transcoding and show to dynamically change + * encoder's options. + * + * Usage: qsv_transcode input_stream codec output_stream initial option + * { frame_number new_option } + * e.g: - qsv_transcode input.mp4 h264_qsv output_h264.mp4 "g 60" + * - qsv_transcode input.mp4 hevc_qsv output_hevc.mp4 "g 60 async_depth 1" + * 100 "g 120" + * (initialize codec with gop_size 60 and change it to 120 after 100 + * frames) + */ + +#include +#include + +#include +#include +#include +#include +#include + +static AVFormatContext *ifmt_ctx = NULL, *ofmt_ctx = NULL; +static AVBufferRef *hw_device_ctx = NULL; +static AVCodecContext *decoder_ctx = NULL, *encoder_ctx = NULL; +static int video_stream = -1; + +typedef struct DynamicSetting { + int frame_number; + char* optstr; +} DynamicSetting; +static DynamicSetting *dynamic_setting; +static int setting_number; +static int current_setting_number; + +static int str_to_dict(char* optstr, AVDictionary **opt) +{ + char *key, *value; + if (strlen(optstr) == 0) + return 0; + key = strtok(optstr, " "); + if (key == NULL) + return AVERROR(EINVAL); + value = strtok(NULL, " "); + if (value == NULL) + return AVERROR(EINVAL); + av_dict_set(opt, key, value, 0); + do { + key = strtok(NULL, " "); + if (key == NULL) + return 0; + value = strtok(NULL, " "); + if (value == NULL) + return AVERROR(EINVAL); + av_dict_set(opt, key, value, 0); + } while(1); +} + +static int dynamic_set_parameter(AVCodecContext *avctx) +{ + AVDictionary *opts = NULL; + int ret = 0; + static int frame_number = 0; + frame_number++; + if (current_setting_number < setting_number && + frame_number == dynamic_setting[current_setting_number].frame_number) { + AVDictionaryEntry *e = NULL; + ret = str_to_dict(dynamic_setting[current_setting_number++].optstr, &opts); + if (ret < 0) { + fprintf(stderr, "The dynamic parameter is wrong\n"); + goto fail; + } + /* Set common option. The dictionary will be freed and replaced + * by a new one containing all options not found in common option list. + * Then this new dictionary is used to set private option. */ + if ((ret = av_opt_set_dict(avctx, &opts)) < 0) + goto fail; + /* Set codec specific option */ + if ((ret = av_opt_set_dict(avctx->priv_data, &opts)) < 0) + goto fail; + /* There is no "framerate" option in commom option list. Use "-r" to set + * framerate, which is compatible with ffmpeg commandline. The video is + * assumed to be average frame rate, so set time_base to 1/framerate. */ + e = av_dict_get(opts, "r", NULL, 0); + if (e) { + avctx->framerate = av_d2q(atof(e->value), INT_MAX); + encoder_ctx->time_base = av_inv_q(encoder_ctx->framerate); + } + } +fail: + av_dict_free(&opts); + return ret; +} + +static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts) +{ + while (*pix_fmts != AV_PIX_FMT_NONE) { + if (*pix_fmts == AV_PIX_FMT_QSV) { + return AV_PIX_FMT_QSV; + } + + pix_fmts++; + } + + fprintf(stderr, "The QSV pixel format not offered in get_format()\n"); + + return AV_PIX_FMT_NONE; +} + +static int open_input_file(char *filename) +{ + int ret; + const AVCodec *decoder = NULL; + AVStream *video = NULL; + + if ((ret = avformat_open_input(&ifmt_ctx, filename, NULL, NULL)) < 0) { + fprintf(stderr, "Cannot open input file '%s', Error code: %s\n", + filename, av_err2str(ret)); + return ret; + } + + if ((ret = avformat_find_stream_info(ifmt_ctx, NULL)) < 0) { + fprintf(stderr, "Cannot find input stream information. Error code: %s\n", + av_err2str(ret)); + return ret; + } + + ret = av_find_best_stream(ifmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); + if (ret < 0) { + fprintf(stderr, "Cannot find a video stream in the input file. " + "Error code: %s\n", av_err2str(ret)); + return ret; + } + video_stream = ret; + video = ifmt_ctx->streams[video_stream]; + + switch(video->codecpar->codec_id) { + case AV_CODEC_ID_H264: + decoder = avcodec_find_decoder_by_name("h264_qsv"); + break; + case AV_CODEC_ID_HEVC: + decoder = avcodec_find_decoder_by_name("hevc_qsv"); + break; + case AV_CODEC_ID_VP9: + decoder = avcodec_find_decoder_by_name("vp9_qsv"); + break; + case AV_CODEC_ID_VP8: + decoder = avcodec_find_decoder_by_name("vp8_qsv"); + break; + case AV_CODEC_ID_AV1: + decoder = avcodec_find_decoder_by_name("av1_qsv"); + break; + case AV_CODEC_ID_MPEG2VIDEO: + decoder = avcodec_find_decoder_by_name("mpeg2_qsv"); + break; + case AV_CODEC_ID_MJPEG: + decoder = avcodec_find_decoder_by_name("mjpeg_qsv"); + break; + default: + fprintf(stderr, "Codec is not supportted by qsv\n"); + return AVERROR(EINVAL); + } + + if (!(decoder_ctx = avcodec_alloc_context3(decoder))) + return AVERROR(ENOMEM); + + if ((ret = avcodec_parameters_to_context(decoder_ctx, video->codecpar)) < 0) { + fprintf(stderr, "avcodec_parameters_to_context error. Error code: %s\n", + av_err2str(ret)); + return ret; + } + decoder_ctx->framerate = av_guess_frame_rate(ifmt_ctx, video, NULL); + + decoder_ctx->hw_device_ctx = av_buffer_ref(hw_device_ctx); + if (!decoder_ctx->hw_device_ctx) { + fprintf(stderr, "A hardware device reference create failed.\n"); + return AVERROR(ENOMEM); + } + decoder_ctx->get_format = get_format; + decoder_ctx->pkt_timebase = video->time_base; + if ((ret = avcodec_open2(decoder_ctx, decoder, NULL)) < 0) + fprintf(stderr, "Failed to open codec for decoding. Error code: %s\n", + av_err2str(ret)); + + return ret; +} + +static int encode_write(AVPacket *enc_pkt, AVFrame *frame) +{ + int ret = 0; + + av_packet_unref(enc_pkt); + + if((ret = dynamic_set_parameter(encoder_ctx)) < 0) { + fprintf(stderr, "Failed to set dynamic parameter. Error code: %s\n", + av_err2str(ret)); + goto end; + } + + if ((ret = avcodec_send_frame(encoder_ctx, frame)) < 0) { + fprintf(stderr, "Error during encoding. Error code: %s\n", av_err2str(ret)); + goto end; + } + while (1) { + if (ret = avcodec_receive_packet(encoder_ctx, enc_pkt)) + break; + enc_pkt->stream_index = 0; + av_packet_rescale_ts(enc_pkt, encoder_ctx->time_base, + ofmt_ctx->streams[0]->time_base); + if ((ret = av_interleaved_write_frame(ofmt_ctx, enc_pkt)) < 0) { + fprintf(stderr, "Error during writing data to output file. " + "Error code: %s\n", av_err2str(ret)); + return ret; + } + } + +end: + if (ret == AVERROR_EOF) + return 0; + ret = ((ret == AVERROR(EAGAIN)) ? 0:-1); + return ret; +} + +static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec, char *optstr) +{ + AVFrame *frame; + int ret = 0; + + ret = avcodec_send_packet(decoder_ctx, pkt); + if (ret < 0) { + fprintf(stderr, "Error during decoding. Error code: %s\n", av_err2str(ret)); + return ret; + } + + while (ret >= 0) { + if (!(frame = av_frame_alloc())) + return AVERROR(ENOMEM); + + ret = avcodec_receive_frame(decoder_ctx, frame); + if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) { + av_frame_free(&frame); + return 0; + } else if (ret < 0) { + fprintf(stderr, "Error while decoding. Error code: %s\n", av_err2str(ret)); + goto fail; + } + if (!encoder_ctx->hw_frames_ctx) { + AVDictionaryEntry *e = NULL; + AVDictionary *opts = NULL; + AVStream *ost; + /* we need to ref hw_frames_ctx of decoder to initialize encoder's codec. + Only after we get a decoded frame, can we obtain its hw_frames_ctx */ + encoder_ctx->hw_frames_ctx = av_buffer_ref(decoder_ctx->hw_frames_ctx); + if (!encoder_ctx->hw_frames_ctx) { + ret = AVERROR(ENOMEM); + goto fail; + } + /* set AVCodecContext Parameters for encoder, here we keep them stay + * the same as decoder. + */ + encoder_ctx->time_base = av_inv_q(decoder_ctx->framerate); + encoder_ctx->pix_fmt = AV_PIX_FMT_QSV; + encoder_ctx->width = decoder_ctx->width; + encoder_ctx->height = decoder_ctx->height; + if ((ret = str_to_dict(optstr, &opts)) < 0) { + fprintf(stderr, "Failed to set encoding parameter.\n"); + goto fail; + } + /* There is no "framerate" option in commom option list. Use "-r" to + * set framerate, which is compatible with ffmpeg commandline. The + * video is assumed to be average frame rate, so set time_base to + * 1/framerate. */ + e = av_dict_get(opts, "r", NULL, 0); + if (e) { + encoder_ctx->framerate = av_d2q(atof(e->value), INT_MAX); + encoder_ctx->time_base = av_inv_q(encoder_ctx->framerate); + } + if ((ret = avcodec_open2(encoder_ctx, enc_codec, &opts)) < 0) { + fprintf(stderr, "Failed to open encode codec. Error code: %s\n", + av_err2str(ret)); + av_dict_free(&opts); + goto fail; + } + av_dict_free(&opts); + + if (!(ost = avformat_new_stream(ofmt_ctx, enc_codec))) { + fprintf(stderr, "Failed to allocate stream for output format.\n"); + ret = AVERROR(ENOMEM); + goto fail; + } + + ost->time_base = encoder_ctx->time_base; + ret = avcodec_parameters_from_context(ost->codecpar, encoder_ctx); + if (ret < 0) { + fprintf(stderr, "Failed to copy the stream parameters. " + "Error code: %s\n", av_err2str(ret)); + goto fail; + } + + /* write the stream header */ + if ((ret = avformat_write_header(ofmt_ctx, NULL)) < 0) { + fprintf(stderr, "Error while writing stream header. " + "Error code: %s\n", av_err2str(ret)); + goto fail; + } + } + frame->pts = av_rescale_q(frame->pts, decoder_ctx->pkt_timebase, + encoder_ctx->time_base); + if ((ret = encode_write(pkt, frame)) < 0) + fprintf(stderr, "Error during encoding and writing.\n"); + +fail: + av_frame_free(&frame); + } + return ret; +} + +int main(int argc, char **argv) +{ + const AVCodec *enc_codec; + int ret = 0; + AVPacket *dec_pkt = NULL; + + if (argc < 5 || (argc - 5) % 2) { + av_log(NULL, AV_LOG_ERROR, "Usage: %s " + " <\"encoding option set 0\"> [ <\"encoding options set 1\">]...\n", argv[0]); + return 1; + } + setting_number = (argc - 5) / 2; + dynamic_setting = av_malloc(setting_number * sizeof(*dynamic_setting)); + current_setting_number = 0; + for (int i = 0; i < setting_number; i++) { + dynamic_setting[i].frame_number = atoi(argv[i*2 + 5]); + dynamic_setting[i].optstr = argv[i*2 + 6]; + } + + ret = av_hwdevice_ctx_create(&hw_device_ctx, AV_HWDEVICE_TYPE_QSV, NULL, NULL, 0); + if (ret < 0) { + fprintf(stderr, "Failed to create a QSV device. Error code: %s\n", av_err2str(ret)); + goto end; + } + + dec_pkt = av_packet_alloc(); + if (!dec_pkt) { + fprintf(stderr, "Failed to allocate decode packet\n"); + goto end; + } + + if ((ret = open_input_file(argv[1])) < 0) + goto end; + + if (!(enc_codec = avcodec_find_encoder_by_name(argv[2]))) { + fprintf(stderr, "Could not find encoder '%s'\n", argv[2]); + ret = -1; + goto end; + } + + if ((ret = (avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, argv[3]))) < 0) { + fprintf(stderr, "Failed to deduce output format from file extension. Error code: " + "%s\n", av_err2str(ret)); + goto end; + } + + if (!(encoder_ctx = avcodec_alloc_context3(enc_codec))) { + ret = AVERROR(ENOMEM); + goto end; + } + + ret = avio_open(&ofmt_ctx->pb, argv[3], AVIO_FLAG_WRITE); + if (ret < 0) { + fprintf(stderr, "Cannot open output file. " + "Error code: %s\n", av_err2str(ret)); + goto end; + } + + /* read all packets and only transcoding video */ + while (ret >= 0) { + if ((ret = av_read_frame(ifmt_ctx, dec_pkt)) < 0) + break; + + if (video_stream == dec_pkt->stream_index) + ret = dec_enc(dec_pkt, enc_codec, argv[4]); + + av_packet_unref(dec_pkt); + } + + /* flush decoder */ + av_packet_unref(dec_pkt); + if ((ret = dec_enc(dec_pkt, enc_codec, argv[4])) < 0) { + fprintf(stderr, "Failed to flush decoder %s\n", av_err2str(ret)); + goto end; + } + + /* flush encoder */ + if ((ret = encode_write(dec_pkt, NULL)) < 0) { + fprintf(stderr, "Failed to flush encoder %s\n", av_err2str(ret)); + goto end; + } + + /* write the trailer for output stream */ + if ((ret = av_write_trailer(ofmt_ctx)) < 0) + fprintf(stderr, "Failed to write trailer %s\n", av_err2str(ret)); + +end: + avformat_close_input(&ifmt_ctx); + avformat_close_input(&ofmt_ctx); + avcodec_free_context(&decoder_ctx); + avcodec_free_context(&encoder_ctx); + av_buffer_unref(&hw_device_ctx); + av_packet_free(&dec_pkt); + av_freep(&dynamic_setting); + return ret; +} diff --git a/mythtv/external/FFmpeg/doc/examples/remuxing.c b/mythtv/external/FFmpeg/doc/examples/remux.c similarity index 96% rename from mythtv/external/FFmpeg/doc/examples/remuxing.c rename to mythtv/external/FFmpeg/doc/examples/remux.c index 2657f9dc669..1f002987c57 100644 --- a/mythtv/external/FFmpeg/doc/examples/remuxing.c +++ b/mythtv/external/FFmpeg/doc/examples/remux.c @@ -21,13 +21,14 @@ */ /** - * @file - * libavformat/libavcodec demuxing and muxing API example. + * @file libavformat/libavcodec demuxing and muxing API usage example + * @example remux.c * - * Remux streams from one container format to another. - * @example remuxing.c + * Remux streams from one container format to another. Data is copied from the + * input to the output without transcoding. */ +#include #include #include diff --git a/mythtv/external/FFmpeg/doc/examples/resampling_audio.c b/mythtv/external/FFmpeg/doc/examples/resample_audio.c similarity index 97% rename from mythtv/external/FFmpeg/doc/examples/resampling_audio.c rename to mythtv/external/FFmpeg/doc/examples/resample_audio.c index 9f1521a5a5f..db9b4e5e087 100644 --- a/mythtv/external/FFmpeg/doc/examples/resampling_audio.c +++ b/mythtv/external/FFmpeg/doc/examples/resample_audio.c @@ -21,8 +21,12 @@ */ /** - * @example resampling_audio.c - * libswresample API use example. + * @file audio resampling API usage example + * @example resample_audio.c + * + * Generate a synthetic audio signal, and Use libswresample API to perform audio + * resampling. The output is written to a raw audio file to be played with + * ffplay. */ #include diff --git a/mythtv/external/FFmpeg/doc/examples/scaling_video.c b/mythtv/external/FFmpeg/doc/examples/scale_video.c similarity index 97% rename from mythtv/external/FFmpeg/doc/examples/scaling_video.c rename to mythtv/external/FFmpeg/doc/examples/scale_video.c index 587f3abe4f1..cb4da4a5767 100644 --- a/mythtv/external/FFmpeg/doc/examples/scaling_video.c +++ b/mythtv/external/FFmpeg/doc/examples/scale_video.c @@ -21,9 +21,10 @@ */ /** - * @file - * libswscale API use example. - * @example scaling_video.c + * @file libswscale API usage example + * @example scale_video.c + * + * Generate a synthetic video signal and use libswscale to perform rescaling. */ #include diff --git a/mythtv/external/FFmpeg/doc/examples/metadata.c b/mythtv/external/FFmpeg/doc/examples/show_metadata.c similarity index 91% rename from mythtv/external/FFmpeg/doc/examples/metadata.c rename to mythtv/external/FFmpeg/doc/examples/show_metadata.c index 7c44009a240..abe3cc0cae3 100644 --- a/mythtv/external/FFmpeg/doc/examples/metadata.c +++ b/mythtv/external/FFmpeg/doc/examples/show_metadata.c @@ -21,9 +21,10 @@ */ /** - * @file - * Shows how the metadata API can be used in application programs. - * @example metadata.c + * @file libavformat metadata extraction API usage example + * @example show_metadata.c + * + * Show metadata from an input file. */ #include @@ -52,7 +53,7 @@ int main (int argc, char **argv) return ret; } - while ((tag = av_dict_get(fmt_ctx->metadata, "", tag, AV_DICT_IGNORE_SUFFIX))) + while ((tag = av_dict_iterate(fmt_ctx->metadata, tag))) printf("%s=%s\n", tag->key, tag->value); avformat_close_input(&fmt_ctx); diff --git a/mythtv/external/FFmpeg/doc/examples/transcoding.c b/mythtv/external/FFmpeg/doc/examples/transcode.c similarity index 92% rename from mythtv/external/FFmpeg/doc/examples/transcoding.c rename to mythtv/external/FFmpeg/doc/examples/transcode.c index 013f89fc7d2..cbe5088ef60 100644 --- a/mythtv/external/FFmpeg/doc/examples/transcoding.c +++ b/mythtv/external/FFmpeg/doc/examples/transcode.c @@ -23,9 +23,11 @@ */ /** - * @file - * API example for demuxing, decoding, filtering, encoding and muxing - * @example transcoding.c + * @file demuxing, decoding, filtering, encoding and muxing API usage example + * @example transcode.c + * + * Convert input to output file, applying some hard-coded filter-graph on both + * audio and video streams. */ #include @@ -33,6 +35,7 @@ #include #include #include +#include #include #include @@ -95,6 +98,11 @@ static int open_input_file(const char *filename) "for stream #%u\n", i); return ret; } + + /* Inform the decoder about the timebase for the packet timestamps. + * This is highly recommended, but not mandatory. */ + codec_ctx->pkt_timebase = stream->time_base; + /* Reencode video & audio and remux subtitles etc. */ if (codec_ctx->codec_type == AVMEDIA_TYPE_VIDEO || codec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) { @@ -189,7 +197,7 @@ static int open_output_file(const char *filename) /* Third parameter can be used to pass settings to encoder */ ret = avcodec_open2(enc_ctx, encoder, NULL); if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Cannot open video encoder for stream #%u\n", i); + av_log(NULL, AV_LOG_ERROR, "Cannot open %s encoder for stream #%u\n", encoder->name, i); return ret; } ret = avcodec_parameters_from_context(out_stream->codecpar, enc_ctx); @@ -264,7 +272,7 @@ static int init_filter(FilteringContext* fctx, AVCodecContext *dec_ctx, snprintf(args, sizeof(args), "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, - dec_ctx->time_base.num, dec_ctx->time_base.den, + dec_ctx->pkt_timebase.num, dec_ctx->pkt_timebase.den, dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den); @@ -304,7 +312,7 @@ static int init_filter(FilteringContext* fctx, AVCodecContext *dec_ctx, av_channel_layout_describe(&dec_ctx->ch_layout, buf, sizeof(buf)); snprintf(args, sizeof(args), "time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=%s", - dec_ctx->time_base.num, dec_ctx->time_base.den, dec_ctx->sample_rate, + dec_ctx->pkt_timebase.num, dec_ctx->pkt_timebase.den, dec_ctx->sample_rate, av_get_sample_fmt_name(dec_ctx->sample_fmt), buf); ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in", @@ -434,6 +442,10 @@ static int encode_write_frame(unsigned int stream_index, int flush) /* encode filtered frame */ av_packet_unref(enc_pkt); + if (filt_frame && filt_frame->pts != AV_NOPTS_VALUE) + filt_frame->pts = av_rescale_q(filt_frame->pts, filt_frame->time_base, + stream->enc_ctx->time_base); + ret = avcodec_send_frame(stream->enc_ctx, filt_frame); if (ret < 0) @@ -488,6 +500,7 @@ static int filter_encode_write_frame(AVFrame *frame, unsigned int stream_index) break; } + filter->filtered_frame->time_base = av_buffersink_get_time_base(filter->buffersink_ctx);; filter->filtered_frame->pict_type = AV_PICTURE_TYPE_NONE; ret = encode_write_frame(stream_index, 0); av_frame_unref(filter->filtered_frame); @@ -542,9 +555,6 @@ int main(int argc, char **argv) av_log(NULL, AV_LOG_DEBUG, "Going to reencode&filter the frame\n"); - av_packet_rescale_ts(packet, - ifmt_ctx->streams[stream_index]->time_base, - stream->dec_ctx->time_base); ret = avcodec_send_packet(stream->dec_ctx, packet); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Decoding failed\n"); @@ -576,11 +586,38 @@ int main(int argc, char **argv) av_packet_unref(packet); } - /* flush filters and encoders */ + /* flush decoders, filters and encoders */ for (i = 0; i < ifmt_ctx->nb_streams; i++) { - /* flush filter */ + StreamContext *stream; + if (!filter_ctx[i].filter_graph) continue; + + stream = &stream_ctx[i]; + + av_log(NULL, AV_LOG_INFO, "Flushing stream %u decoder\n", i); + + /* flush decoder */ + ret = avcodec_send_packet(stream->dec_ctx, NULL); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Flushing decoding failed\n"); + goto end; + } + + while (ret >= 0) { + ret = avcodec_receive_frame(stream->dec_ctx, stream->dec_frame); + if (ret == AVERROR_EOF) + break; + else if (ret < 0) + goto end; + + stream->dec_frame->pts = stream->dec_frame->best_effort_timestamp; + ret = filter_encode_write_frame(stream->dec_frame, i); + if (ret < 0) + goto end; + } + + /* flush filter */ ret = filter_encode_write_frame(NULL, i); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Flushing filter failed\n"); diff --git a/mythtv/external/FFmpeg/doc/examples/transcode_aac.c b/mythtv/external/FFmpeg/doc/examples/transcode_aac.c index 2d4f9a59d37..20de08d93bf 100644 --- a/mythtv/external/FFmpeg/doc/examples/transcode_aac.c +++ b/mythtv/external/FFmpeg/doc/examples/transcode_aac.c @@ -19,30 +19,30 @@ */ /** - * @file - * Simple audio converter - * + * @file audio transcoding to MPEG/AAC API usage example * @example transcode_aac.c - * Convert an input audio file to AAC in an MP4 container using FFmpeg. - * Formats other than MP4 are supported based on the output file extension. + * + * Convert an input audio file to AAC in an MP4 container. Formats other than + * MP4 are supported based on the output file extension. * @author Andreas Unterweger (dustsigns@gmail.com) */ #include -#include "libavformat/avformat.h" -#include "libavformat/avio.h" +#include +#include +#include -#include "libavcodec/avcodec.h" +#include -#include "libavutil/audio_fifo.h" -#include "libavutil/avassert.h" -#include "libavutil/avstring.h" -#include "libavutil/channel_layout.h" -#include "libavutil/frame.h" -#include "libavutil/opt.h" +#include +#include +#include +#include +#include +#include -#include "libswresample/swresample.h" +#include /* The output bit rate in bit/s */ #define OUTPUT_BIT_RATE 96000 @@ -448,26 +448,17 @@ static int init_converted_samples(uint8_t ***converted_input_samples, int error; /* Allocate as many pointers as there are audio channels. - * Each pointer will later point to the audio samples of the corresponding + * Each pointer will point to the audio samples of the corresponding * channels (although it may be NULL for interleaved formats). - */ - if (!(*converted_input_samples = calloc(output_codec_context->ch_layout.nb_channels, - sizeof(**converted_input_samples)))) { - fprintf(stderr, "Could not allocate converted input sample pointers\n"); - return AVERROR(ENOMEM); - } - - /* Allocate memory for the samples of all channels in one consecutive + * Allocate memory for the samples of all channels in one consecutive * block for convenience. */ - if ((error = av_samples_alloc(*converted_input_samples, NULL, + if ((error = av_samples_alloc_array_and_samples(converted_input_samples, NULL, output_codec_context->ch_layout.nb_channels, frame_size, output_codec_context->sample_fmt, 0)) < 0) { fprintf(stderr, "Could not allocate converted input samples (error '%s')\n", av_err2str(error)); - av_freep(&(*converted_input_samples)[0]); - free(*converted_input_samples); return error; } return 0; @@ -599,10 +590,9 @@ static int read_decode_convert_and_store(AVAudioFifo *fifo, ret = 0; cleanup: - if (converted_input_samples) { + if (converted_input_samples) av_freep(&converted_input_samples[0]); - free(converted_input_samples); - } + av_freep(&converted_input_samples); av_frame_free(&input_frame); return ret; diff --git a/mythtv/external/FFmpeg/doc/examples/vaapi_encode.c b/mythtv/external/FFmpeg/doc/examples/vaapi_encode.c index e232fa579a1..ff3ebb1e2b8 100644 --- a/mythtv/external/FFmpeg/doc/examples/vaapi_encode.c +++ b/mythtv/external/FFmpeg/doc/examples/vaapi_encode.c @@ -1,6 +1,4 @@ /* - * Video Acceleration API (video encoding) encode sample - * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -21,13 +19,12 @@ */ /** - * @file - * Intel VAAPI-accelerated encoding example. - * + * @file Intel VAAPI-accelerated encoding API usage example * @example vaapi_encode.c - * This example shows how to do VAAPI-accelerated encoding. now only support NV12 - * raw file, usage like: vaapi_encode 1920 1080 input.yuv output.h264 * + * Perform VAAPI-accelerated encoding. Read input from an NV12 raw + * file, and write the H.264 encoded data to an output raw file. + * Usage: vaapi_encode 1920 1080 input.yuv output.h264 */ #include @@ -91,6 +88,10 @@ static int encode_write(AVCodecContext *avctx, AVFrame *frame, FILE *fout) enc_pkt->stream_index = 0; ret = fwrite(enc_pkt->data, enc_pkt->size, 1, fout); av_packet_unref(enc_pkt); + if (ret != enc_pkt->size) { + ret = AVERROR(errno); + break; + } } end: diff --git a/mythtv/external/FFmpeg/doc/examples/vaapi_transcode.c b/mythtv/external/FFmpeg/doc/examples/vaapi_transcode.c index a174bb643a7..e1b7a438836 100644 --- a/mythtv/external/FFmpeg/doc/examples/vaapi_transcode.c +++ b/mythtv/external/FFmpeg/doc/examples/vaapi_transcode.c @@ -1,6 +1,4 @@ /* - * Video Acceleration API (video transcoding) transcode sample - * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -21,11 +19,10 @@ */ /** - * @file - * Intel VAAPI-accelerated transcoding example. - * + * @file Intel VAAPI-accelerated transcoding API usage example * @example vaapi_transcode.c - * This example shows how to do VAAPI-accelerated transcoding. + * + * Perform VAAPI-accelerated transcoding. * Usage: vaapi_transcode input_stream codec output_stream * e.g: - vaapi_transcode input.mp4 h264_vaapi output_h264.mp4 * - vaapi_transcode input.mp4 vp9_vaapi output_vp9.ivf @@ -218,10 +215,8 @@ static int dec_enc(AVPacket *pkt, const AVCodec *enc_codec) fail: av_frame_free(&frame); - if (ret < 0) - return ret; } - return 0; + return ret; } int main(int argc, char **argv) diff --git a/mythtv/external/FFmpeg/doc/faq.texi b/mythtv/external/FFmpeg/doc/faq.texi index 8b165eb436d..477cc60533a 100644 --- a/mythtv/external/FFmpeg/doc/faq.texi +++ b/mythtv/external/FFmpeg/doc/faq.texi @@ -450,7 +450,7 @@ work with streams that were detected during the initial scan; streams that are detected later are ignored. The size of the initial scan is controlled by two options: @code{probesize} -(default ~5 Mo) and @code{analyzeduration} (default 5,000,000 µs = 5 s). For +(default ~5@tie{}Mo) and @code{analyzeduration} (default 5,000,000@tie{}µs = 5@tie{}s). For the subtitle stream to be detected, both values must be large enough. @section Why was the @command{ffmpeg} @option{-sameq} option removed? What to use instead? @@ -467,7 +467,7 @@ point acceptable for your tastes. The most common options to do that are @option{-qscale} and @option{-qmax}, but you should peruse the documentation of the encoder you chose. -@section I have a stretched video, why does scaling does not fix it? +@section I have a stretched video, why does scaling not fix it? A lot of video codecs and formats can store the @emph{aspect ratio} of the video: this is the ratio between the width and the height of either the full diff --git a/mythtv/external/FFmpeg/doc/fate.texi b/mythtv/external/FFmpeg/doc/fate.texi index 84508560157..17644ce65ae 100644 --- a/mythtv/external/FFmpeg/doc/fate.texi +++ b/mythtv/external/FFmpeg/doc/fate.texi @@ -79,6 +79,14 @@ Do not put a '~' character in the samples path to indicate a home directory. Because of shell nuances, this will cause FATE to fail. @end float +Beware that some assertions are disabled by default, so mind setting +@option{--assert-level=} at configuration time, e.g. when seeking +the highest possible test coverage: +@example +./configure --assert-level=2 +@end example +Note that raising the assert level could have a performance impact. + To get the complete list of tests, run the command: @example make fate-list @@ -223,6 +231,14 @@ meaning only while running the regression tests. Specify how many threads to use while running regression tests, it is quite useful to detect thread-related regressions. +This variable may be set to the string "random", optionally followed by a +number, like "random99", This will cause each test to use a random number of +threads. If a number is specified, it is used as a maximum number of threads, +otherwise 16 is the maximum. + +In case a test fails, the thread count used for it will be written into the +errfile. + @item THREAD_TYPE Specify which threading strategy test, either @samp{slice} or @samp{frame}, by default @samp{slice+frame} diff --git a/mythtv/external/FFmpeg/doc/fate_config.sh.template b/mythtv/external/FFmpeg/doc/fate_config.sh.template index ab1bda45e4c..8681805d65e 100644 --- a/mythtv/external/FFmpeg/doc/fate_config.sh.template +++ b/mythtv/external/FFmpeg/doc/fate_config.sh.template @@ -31,3 +31,25 @@ makeopts= # extra options passed to 'make' # defaulting to makeopts above if this is not set #tar= # command to create a tar archive from its arguments on stdout, # defaults to 'tar c' +#fate_targets= # targets to make when running fate; defaults to "fate", + # can be set to run a subset of tests, e.g. "fate-checkasm". + +#fate_environments= # a list of names of configurations to run tests for; + # each round is run with variables from ${${name}_env} set. + +# One example of using fate_environments: + +# target_exec="qemu-aarch64-static" +# fate_targets="fate-checkasm fate-cpu" +# fate_environments="sve128 sve256" +# sve128_env="QEMU_CPU=max,sve128=on" +# sve256_env="QEMU_CPU=max,sve256=on" + +# The variables set by fate_environments can also be used explicitly +# by target_exec, e.g. like this: + +# target_exec="qemu-aarch64-static -cpu \$(MY_CPU)" +# fate_targets="fate-checkasm fate-cpu" +# fate_environments="sve128 sve256" +# sve128_env="MY_CPU=max,sve128=on" +# sve256_env="MY_CPU=max,sve256=on" diff --git a/mythtv/external/FFmpeg/doc/ffmpeg.texi b/mythtv/external/FFmpeg/doc/ffmpeg.texi index 767df69b7f4..34007f7ea2f 100644 --- a/mythtv/external/FFmpeg/doc/ffmpeg.texi +++ b/mythtv/external/FFmpeg/doc/ffmpeg.texi @@ -17,9 +17,9 @@ ffmpeg [@var{global_options}] @{[@var{input_file_options}] -i @file{input_url}@} @chapter Description @c man begin DESCRIPTION -@command{ffmpeg} is a very fast video and audio converter that can also grab from -a live audio/video source. It can also convert between arbitrary sample -rates and resize video on the fly with a high quality polyphase filter. +@command{ffmpeg} is a universal media converter. It can read a wide variety of +inputs - including live grabbing/recording devices - filter, and transcode them +into a plethora of output formats. @command{ffmpeg} reads from an arbitrary number of input "files" (which can be regular files, pipes, network streams, grabbing devices, etc.), specified by the @@ -49,24 +49,32 @@ Do not mix input and output files -- first specify all input files, then all output files. Also do not mix options which belong to different files. All options apply ONLY to the next input or output file and are reset between files. +Some simple examples follow. + @itemize @item -To set the video bitrate of the output file to 64 kbit/s: +Convert an input media file to a different format, by re-encoding media streams: +@example +ffmpeg -i input.avi output.mp4 +@end example + +@item +Set the video bitrate of the output file to 64 kbit/s: @example -ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi +ffmpeg -i input.avi -b:v 64k -bufsize 64k output.mp4 @end example @item -To force the frame rate of the output file to 24 fps: +Force the frame rate of the output file to 24 fps: @example -ffmpeg -i input.avi -r 24 output.avi +ffmpeg -i input.avi -r 24 output.mp4 @end example @item -To force the frame rate of the input file (valid for raw formats only) -to 1 fps and the frame rate of the output file to 24 fps: +Force the frame rate of the input file (valid for raw formats only) to 1 fps and +the frame rate of the output file to 24 fps: @example -ffmpeg -r 1 -i input.m2v -r 24 output.avi +ffmpeg -r 1 -i input.m2v -r 24 output.mp4 @end example @end itemize @@ -110,7 +118,7 @@ Encoded packets are then passed to the decoder (unless streamcopy is selected for the stream, see further for a description). The decoder produces uncompressed frames (raw video/PCM audio/...) which can be processed further by filtering (see next section). After filtering, the frames are passed to the -encoder, which encodes them and outputs encoded packets. Finally those are +encoder, which encodes them and outputs encoded packets. Finally, those are passed to the muxer, which writes the encoded packets to the output file. @section Filtering @@ -211,6 +219,46 @@ Since there is no decoding or encoding, it is very fast and there is no quality loss. However, it might not work in some cases because of many factors. Applying filters is obviously also impossible, since filters work on uncompressed data. +@section Loopback decoders +While decoders are normally associated with demuxer streams, it is also possible +to create "loopback" decoders that decode the output from some encoder and allow +it to be fed back to complex filtergraphs. This is done with the @code{-dec} +directive, which takes as a parameter the index of the output stream that should +be decoded. Every such directive creates a new loopback decoder, indexed with +successive integers starting at zero. These indices should then be used to refer +to loopback decoders in complex filtergraph link labels, as described in the +documentation for @option{-filter_complex}. + +Decoding AVOptions can be passed to loopback decoders by placing them before +@code{-dec}, analogously to input/output options. + +E.g. the following example: + +@example +ffmpeg -i INPUT \ + -map 0:v:0 -c:v libx264 -crf 45 -f null - \ + -threads 3 -dec 0:0 \ + -filter_complex '[0:v][dec:0]hstack[stack]' \ + -map '[stack]' -c:v ffv1 OUTPUT +@end example + +reads an input video and +@itemize +@item +(line 2) encodes it with @code{libx264} at low quality; + +@item +(line 3) decodes this encoded stream using 3 threads; + +@item +(line 4) places decoded video side by side with the original input video; + +@item +(line 5) combined video is then losslessly encoded and written into +@file{OUTPUT}. + +@end itemize + @c man end DETAILED DESCRIPTION @chapter Stream selection @@ -615,6 +663,228 @@ Not all muxers support embedded thumbnails, and those who do, only support a few Creates a program with the specified @var{title}, @var{program_num} and adds the specified @var{stream}(s) to it. +@item -stream_group [map=@var{input_file_id}=@var{stream_group}][type=@var{type}:]st=@var{stream}[:st=@var{stream}][:stg=@var{stream_group}][:id=@var{stream_group_id}...] (@emph{output}) + +Creates a stream group of the specified @var{type} and @var{stream_group_id}, or by +@var{map}ping an input group, adding the specified @var{stream}(s) and/or previously +defined @var{stream_group}(s) to it. + +@var{type} can be one of the following: +@table @option + +@item iamf_audio_element +Groups @var{stream}s that belong to the same IAMF Audio Element + +For this group @var{type}, the following options are available +@table @option +@item audio_element_type +The Audio Element type. The following values are supported: + +@table @option +@item channel +Scalable channel audio representation +@item scene +Ambisonics representation +@end table + +@item demixing +Demixing information used to reconstruct a scalable channel audio representation. +This option must be separated from the rest with a ',', and takes the following +key=value options + +@table @option +@item parameter_id +An identifier parameters blocks in frames may refer to +@item dmixp_mode +A pre-defined combination of demixing parameters +@end table + +@item recon_gain +Recon gain information used to reconstruct a scalable channel audio representation. +This option must be separated from the rest with a ',', and takes the following +key=value options + +@table @option +@item parameter_id +An identifier parameters blocks in frames may refer to +@end table + +@item layer +A layer defining a Channel Layout in the Audio Element. +This option must be separated from the rest with a ','. Several ',' separated entries +can be defined, and at least one must be set. + +It takes the following ":"-separated key=value options + +@table @option +@item ch_layout +The layer's channel layout +@item flags +The following flags are available: + +@table @option +@item recon_gain +Wether to signal if recon_gain is present as metadata in parameter blocks within frames +@end table + +@item output_gain +@item output_gain_flags +Which channels output_gain applies to. The following flags are available: + +@table @option +@item FL +@item FR +@item BL +@item BR +@item TFL +@item TFR +@end table + +@item ambisonics_mode +The ambisonics mode. This has no effect if audio_element_type is set to channel. + +The following values are supported: + +@table @option +@item mono +Each ambisonics channel is coded as an individual mono stream in the group +@end table + +@end table + +@item default_w +Default weight value + +@end table + +@item iamf_mix_presentation +Groups @var{stream}s that belong to all IAMF Audio Element the same +IAMF Mix Presentation references + +For this group @var{type}, the following options are available + +@table @option +@item submix +A sub-mix within the Mix Presentation. +This option must be separated from the rest with a ','. Several ',' separated entries +can be defined, and at least one must be set. + +It takes the following ":"-separated key=value options + +@table @option +@item parameter_id +An identifier parameters blocks in frames may refer to, for post-processing the mixed +audio signal to generate the audio signal for playback +@item parameter_rate +The sample rate duration fields in parameters blocks in frames that refer to this +@var{parameter_id} are expressed as +@item default_mix_gain +Default mix gain value to apply when there are no parameter blocks sharing the same +@var{parameter_id} for a given frame + +@item element +References an Audio Element used in this Mix Presentation to generate the final output +audio signal for playback. +This option must be separated from the rest with a '|'. Several '|' separated entries +can be defined, and at least one must be set. + +It takes the following ":"-separated key=value options: + +@table @option +@item stg +The @var{stream_group_id} for an Audio Element which this sub-mix refers to +@item parameter_id +An identifier parameters blocks in frames may refer to, for applying any processing to +the referenced and rendered Audio Element before being summed with other processed Audio +Elements +@item parameter_rate +The sample rate duration fields in parameters blocks in frames that refer to this +@var{parameter_id} are expressed as +@item default_mix_gain +Default mix gain value to apply when there are no parameter blocks sharing the same +@var{parameter_id} for a given frame +@item annotations +A key=value string describing the sub-mix element where "key" is a string conforming to +BCP-47 that specifies the language for the "value" string. "key" must be the same as the +one in the mix's @var{annotations} +@item headphones_rendering_mode +Indicates whether the input channel-based Audio Element is rendered to stereo loudspeakers +or spatialized with a binaural renderer when played back on headphones. +This has no effect if the referenced Audio Element's @var{audio_element_type} is set to +channel. + +The following values are supported: + +@table @option +@item stereo +@item binaural +@end table + +@end table + +@item layout +Specifies the layouts for this sub-mix on which the loudness information was measured. +This option must be separated from the rest with a '|'. Several '|' separated entries +can be defined, and at least one must be set. + +It takes the following ":"-separated key=value options: + +@table @option +@item layout_type + +@table @option +@item loudspeakers +The layout follows the loudspeaker sound system convention of ITU-2051-3. +@item binaural +The layout is binaural. +@end table + +@item sound_system +Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus 7.1.2 and 3.1.2 +This has no effect if @var{layout_type} is set to binaural. +@item integrated_loudness +The program integrated loudness information, as defined in ITU-1770-4. +@item digital_peak +The digital (sampled) peak value of the audio signal, as defined in ITU-1770-4. +@item true_peak +The true peak of the audio signal, as defined in ITU-1770-4. +@item dialog_anchored_loudness +The Dialogue loudness information, as defined in ITU-1770-4. +@item album_anchored_loudness +The Album loudness information, as defined in ITU-1770-4. +@end table + +@end table + +@item annotations +A key=value string string describing the mix where "key" is a string conforming to BCP-47 +that specifies the language for the "value" string. "key" must be the same as the ones in +all sub-mix element's @var{annotations}s +@end table + +@end table + +E.g. to create an scalable 5.1 IAMF file from several WAV input files +@example +ffmpeg -i front.wav -i back.wav -i center.wav -i lfe.wav +-map 0:0 -map 1:0 -map 2:0 -map 3:0 -c:a opus +-stream_group type=iamf_audio_element:id=1:st=0:st=1:st=2:st=3, +demixing=parameter_id=998, +recon_gain=parameter_id=101, +layer=ch_layout=stereo, +layer=ch_layout=5.1, +-stream_group type=iamf_mix_presentation:id=2:stg=0:annotations=en-us=Mix_Presentation, +submix=parameter_id=100:parameter_rate=48000|element=stg=0:parameter_id=100:annotations=en-us=Scalable_Submix|layout=sound_system=stereo|layout=sound_system=5.1 +-streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 output.iamf +@end example + +To copy the two stream groups (Audio Element and Mix Presentation) from an input IAMF file with four +streams into an mp4 output +@example +ffmpeg -i input.iamf -c:a copy -stream_group map=0=0:st=0:st=1:st=2:st=3 -stream_group map=0=1:stg=0 +-streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 output.mp4 +@end example + @item -target @var{type} (@emph{output}) Specify target file type (@code{vcd}, @code{svcd}, @code{dvd}, @code{dv}, @code{dv50}). @var{type} may be prefixed with @code{pal-}, @code{ntsc-} or @@ -769,11 +1039,6 @@ syntax. See the @ref{filter_complex_option,,-filter_complex option} if you want to create filtergraphs with multiple inputs and/or outputs. -@item -filter_script[:@var{stream_specifier}] @var{filename} (@emph{output,per-stream}) -This option is similar to @option{-filter}, the only difference is that its -argument is the name of the file from which a filtergraph description is to be -read. - @item -reinit_filter[:@var{stream_specifier}] @var{integer} (@emph{input,per-stream}) This boolean option determines if the filtergraph(s) to which this stream is fed gets reinitialized when input frame parameters change mid-stream. This option is enabled by @@ -821,7 +1086,7 @@ be achieved with @code{ffmpeg ... < /dev/null} but it requires a shell. @item -debug_ts (@emph{global}) -Print timestamp information. It is off by default. This option is +Print timestamp/latency information. It is off by default. This option is mostly useful for testing and debugging purposes, and the output format may change from one version to another, so it should not be employed by portable scripts. @@ -877,9 +1142,20 @@ This is not the same as the @option{-framerate} option used for some input forma like image2 or v4l2 (it used to be the same in older versions of FFmpeg). If in doubt use @option{-framerate} instead of the input option @option{-r}. -As an output option, duplicate or drop input frames to achieve constant output +As an output option: +@table @option +@item video encoding +Duplicate or drop frames right before encoding them to achieve constant output frame rate @var{fps}. +@item video streamcopy +Indicate to the muxer that @var{fps} is the stream frame rate. No data is +dropped or duplicated in this case. This may produce invalid files if @var{fps} +does not match the actual stream frame rate as determined by packet timestamps. +See also the @code{setts} bitstream filter. + +@end table + @item -fpsmax[:@var{stream_specifier}] @var{fps} (@emph{output,per-stream}) Set maximum frame rate (Hz value, fraction or abbreviation). @@ -912,6 +1188,32 @@ If used together with @option{-vcodec copy}, it will affect the aspect ratio stored at container level, but not the aspect ratio stored in encoded frames, if it exists. +@item -display_rotation[:@var{stream_specifier}] @var{rotation} (@emph{input,per-stream}) +Set video rotation metadata. + +@var{rotation} is a decimal number specifying the amount in degree by +which the video should be rotated counter-clockwise before being +displayed. + +This option overrides the rotation/display transform metadata stored in +the file, if any. When the video is being transcoded (rather than +copied) and @code{-autorotate} is enabled, the video will be rotated at +the filtering stage. Otherwise, the metadata will be written into the +output file if the muxer supports it. + +If the @code{-display_hflip} and/or @code{-display_vflip} options are +given, they are applied after the rotation specified by this option. + +@item -display_hflip[:@var{stream_specifier}] (@emph{input,per-stream}) +Set whether on display the image should be horizontally flipped. + +See the @code{-display_rotation} option for more details. + +@item -display_vflip[:@var{stream_specifier}] (@emph{input,per-stream}) +Set whether on display the image should be vertically flipped. + +See the @code{-display_rotation} option for more details. + @item -vn (@emph{input/output}) As an input option, blocks all video streams of a file from being filtered or being automatically selected or mapped for any output. See @code{-discard} @@ -977,7 +1279,12 @@ If @var{pix_fmt} is a single @code{+}, ffmpeg selects the same pixel format as the input (or graph output) and automatic conversions are disabled. @item -sws_flags @var{flags} (@emph{input/output}) -Set SwScaler flags. +Set default flags for the libswscale library. These flags are used by +automatically inserted @code{scale} filters and those within simple +filtergraphs, if not overridden within the filtergraph definition. + +See the @ref{scaler_options,,ffmpeg-scaler manual,ffmpeg-scaler} for a list +of scaler options. @item -rc_override[:@var{stream_specifier}] @var{override} (@emph{output,per-stream}) Rate control override for specific intervals, formatted as "int,int,int" @@ -985,43 +1292,24 @@ list separated with slashes. Two first values are the beginning and end frame numbers, last one is quantizer to use if positive, or quality factor if negative. -@item -ilme -Force interlacing support in encoder (MPEG-2 and MPEG-4 only). -Use this option if your input file is interlaced and you want -to keep the interlaced format for minimum losses. -The alternative is to deinterlace the input stream by use of a filter -such as @code{yadif} or @code{bwdif}, but deinterlacing introduces losses. -@item -psnr -Calculate PSNR of compressed frames. @item -vstats -Dump video coding statistics to @file{vstats_HHMMSS.log}. -@item -vstats_file @var{file} -Dump video coding statistics to @var{file}. -@item -vstats_version @var{file} -Specifies which version of the vstats format to use. Default is 2. +Dump video coding statistics to @file{vstats_HHMMSS.log}. See the +@ref{vstats_file_format,,vstats file format} section for the format description. -version = 1 : - -@code{frame= %5d q= %2.1f PSNR= %6.2f f_size= %6d s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s} +@item -vstats_file @var{file} +Dump video coding statistics to @var{file}. See the +@ref{vstats_file_format,,vstats file format} section for the format description. -version > 1: +@item -vstats_version @var{file} +Specify which version of the vstats format to use. Default is @code{2}. See the +@ref{vstats_file_format,,vstats file format} section for the format description. -@code{out= %2d st= %2d frame= %5d q= %2.1f PSNR= %6.2f f_size= %6d s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s} -@item -top[:@var{stream_specifier}] @var{n} (@emph{output,per-stream}) -top=1/bottom=0/auto=-1 field first -@item -dc @var{precision} -Intra_dc_precision. @item -vtag @var{fourcc/tag} (@emph{output}) Force video tag/fourcc. This is an alias for @code{-tag:v}. -@item -qphist (@emph{global}) -Show QP histogram -@item -vbsf @var{bitstream_filter} -Deprecated see -bsf @item -force_key_frames[:@var{stream_specifier}] @var{time}[,@var{time}...] (@emph{output,per-stream}) @item -force_key_frames[:@var{stream_specifier}] expr:@var{expr} (@emph{output,per-stream}) @item -force_key_frames[:@var{stream_specifier}] source (@emph{output,per-stream}) -@item -force_key_frames[:@var{stream_specifier}] source_no_drop (@emph{output,per-stream}) @var{force_key_frames} can take arguments of the following form: @@ -1082,10 +1370,6 @@ starting from second 13: @item source If the argument is @code{source}, ffmpeg will force a key frame if the current frame being encoded is marked as a key frame in its source. - -@item source_no_drop -If the argument is @code{source_no_drop}, ffmpeg will force a key frame if -the current frame being encoded is marked as a key frame in its source. In cases where this particular source frame has to be dropped, enforce the next available frame to become a key frame instead. @@ -1095,6 +1379,21 @@ Note that forcing too many keyframes is very harmful for the lookahead algorithms of certain encoders: using fixed-GOP options or similar would be more efficient. +@item -apply_cropping[:@var{stream_specifier}] @var{source} (@emph{input,per-stream}) +Automatically crop the video after decoding according to file metadata. +Default is @emph{all}. + +@table @option +@item none (0) +Don't apply any cropping metadata. +@item all (1) +Apply both codec and container level croppping. This is the default mode. +@item codec (2) +Apply codec level croppping. +@item container (3) +Apply container level croppping. +@end table + @item -copyinkf[:@var{stream_specifier}] (@emph{output,per-stream}) When doing stream copy, copy also non-key frames found at the beginning. @@ -1131,11 +1430,58 @@ Choose the first device and use the primary device context. @item d3d11va @var{device} is the number of the Direct3D 11 display adapter. +If not specified, it will attempt to use the default Direct3D 11 display adapter +or the first Direct3D 11 display adapter whose hardware VendorId is specified +by @samp{vendor_id}. + +Examples: +@table @emph +@item -init_hw_device d3d11va +Create a d3d11va device on the default Direct3D 11 display adapter. + +@item -init_hw_device d3d11va:1 +Create a d3d11va device on the Direct3D 11 display adapter specified by index 1. + +@item -init_hw_device d3d11va:,vendor_id=0x8086 +Create a d3d11va device on the first Direct3D 11 display adapter whose hardware VendorId is 0x8086. +@end table @item vaapi -@var{device} is either an X11 display name or a DRM render node. +@var{device} is either an X11 display name, a DRM render node or a DirectX adapter index. If not specified, it will attempt to open the default X11 display (@emph{$DISPLAY}) -and then the first DRM render node (@emph{/dev/dri/renderD128}). +and then the first DRM render node (@emph{/dev/dri/renderD128}), or the default +DirectX adapter on Windows. + +The following options are recognized: +@table @option +@item kernel_driver +When @var{device} is not specified, use this option to specify the name of the kernel +driver associated with the desired device. This option is available only when +the hardware acceleration method @emph{drm} and @emph{vaapi} are enabled. +@item vendor_id +When @var{device} and @var{kernel_driver} are not specified, use this option to specify +the vendor id associated with the desired device. This option is available only when the +hardware acceleration method @emph{drm} and @emph{vaapi} are enabled and @emph{kernel_driver} +is not specified. +@end table + +Examples: +@table @emph +@item -init_hw_device vaapi +Create a vaapi device on the default device. + +@item -init_hw_device vaapi:/dev/dri/renderD129 +Create a vaapi device on DRM render node @file{/dev/dri/renderD129}. + +@item -init_hw_device vaapi:1 +Create a vaapi device on DirectX adapter 1. + +@item -init_hw_device vaapi:,kernel_driver=i915 +Create a vaapi device on a device associated with kernel driver @samp{i915}. + +@item -init_hw_device vaapi:,vendor_id=0x8086 +Create a vaapi device on a device associated with vendor id @samp{0x8086}. +@end table @item vdpau @var{device} is an X11 display name. @@ -1158,16 +1504,38 @@ If not specified, @samp{auto_any} is used. platform-appropriate subdevice (@samp{dxva2} or @samp{d3d11va} or @samp{vaapi}) and then deriving a QSV device from that.) -Alternatively, @samp{child_device_type} helps to choose platform-appropriate subdevice type. -On Windows @samp{d3d11va} is used as default subdevice type. +The following options are recognized: +@table @option +@item child_device +Specify a DRM render node on Linux or DirectX adapter on Windows. +@item child_device_type +Choose platform-appropriate subdevice type. On Windows @samp{d3d11va} is used +as default subdevice type when @code{--enable-libvpl} is specified at configuration time, +@samp{dxva2} is used as default subdevice type when @code{--enable-libmfx} is specified at +configuration time. On Linux user can use @samp{vaapi} only as subdevice type. +@end table Examples: @table @emph +@item -init_hw_device qsv:hw,child_device=/dev/dri/renderD129 +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DRM render node @file{/dev/dri/renderD129}. + +@item -init_hw_device qsv:hw,child_device=1 +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DirectX adapter 1. + @item -init_hw_device qsv:hw,child_device_type=d3d11va Choose the GPU subdevice with type @samp{d3d11va} and create QSV device with @samp{MFX_IMPL_HARDWARE}. @item -init_hw_device qsv:hw,child_device_type=dxva2 Choose the GPU subdevice with type @samp{dxva2} and create QSV device with @samp{MFX_IMPL_HARDWARE}. + +@item -init_hw_device qsv:hw,child_device=1,child_device_type=d3d11va +Create a QSV device with @samp{MFX_IMPL_HARDWARE} on DirectX adapter 1 with subdevice type @samp{d3d11va}. + +@item -init_hw_device vaapi=va:/dev/dri/renderD129 -init_hw_device qsv=hw1@@@var{va} +Create a VAAPI device called @samp{va} on @file{/dev/dri/renderD129}, then derive a QSV device called @samp{hw1} +from device @samp{va}. + @end table @item opencl @@ -1312,6 +1680,22 @@ List all hardware acceleration components enabled in this build of ffmpeg. Actual runtime availability depends on the hardware and its suitable driver being installed. +@item -fix_sub_duration_heartbeat[:@var{stream_specifier}] +Set a specific output video stream as the heartbeat stream according to which +to split and push through currently in-progress subtitle upon receipt of a +random access packet. + +This lowers the latency of subtitles for which the end packet or the following +subtitle has not yet been received. As a drawback, this will most likely lead +to duplication of subtitle events in order to cover the full duration, so +when dealing with use cases where latency of when the subtitle event is passed +on to output is not relevant this option should not be utilized. + +Requires @option{-fix_sub_duration} to be set for the relevant input subtitle +stream for this to have any effect, as well as for the input subtitle stream +having to be directly mapped to the same output in which the heartbeat stream +resides. + @end table @section Audio Options @@ -1358,14 +1742,21 @@ This is an alias for @code{-filter:a}, see the @ref{filter_option,,-filter optio @table @option @item -atag @var{fourcc/tag} (@emph{output}) Force audio tag/fourcc. This is an alias for @code{-tag:a}. -@item -absf @var{bitstream_filter} -Deprecated, see -bsf +@item -ch_layout[:@var{stream_specifier}] @var{layout} (@emph{input/output,per-stream}) +Alias for @code{-channel_layout}. +@item -channel_layout[:@var{stream_specifier}] @var{layout} (@emph{input/output,per-stream}) +Set the audio channel layout. For output streams it is set by default to the +input channel layout. For input streams it overrides the channel layout of the +input. Not all decoders respect the overridden channel layout. This option +also sets the channel layout for audio grabbing devices and raw demuxers +and is mapped to the corresponding demuxer option. @item -guess_layout_max @var{channels} (@emph{input,per-stream}) If some input channel layout is not known, try to guess only if it corresponds to at most the specified number of channels. For example, 2 tells to @command{ffmpeg} to recognize 1 channel as mono and 2 channels as stereo but not 6 channels as 5.1. The default is to always try to guess. Use -0 to disable all guessing. +0 to disable all guessing. Using the @code{-channel_layout} option to +explicitly specify an input layout also disables guessing. @end table @section Subtitle options @@ -1381,8 +1772,6 @@ option to disable streams individually. As an output option, disables subtitle recording i.e. automatic selection or mapping of any subtitle stream. For full manual control see the @code{-map} option. -@item -sbsf @var{bitstream_filter} -Deprecated, see -bsf @end table @section Advanced Subtitle options @@ -1410,22 +1799,41 @@ Set the size of the canvas used to render subtitles. @section Advanced options @table @option -@item -map [-]@var{input_file_id}[:@var{stream_specifier}][?][,@var{sync_file_id}[:@var{stream_specifier}]] | @var{[linklabel]} (@emph{output}) +@item -map [-]@var{input_file_id}[:@var{stream_specifier}][:@var{view_specifier}][?] | @var{[linklabel]} (@emph{output}) -Designate one or more input streams as a source for the output file. Each input -stream is identified by the input file index @var{input_file_id} and -the input stream index @var{input_stream_id} within the input -file. Both indices start at 0. If specified, -@var{sync_file_id}:@var{stream_specifier} sets which input stream -is used as a presentation sync reference. +Create one or more streams in the output file. This option has two forms for +specifying the data source(s): the first selects one or more streams from some +input file (specified with @code{-i}), the second takes an output from some +complex filtergraph (specified with @code{-filter_complex}). -The first @code{-map} option on the command line specifies the -source for output stream 0, the second @code{-map} option specifies -the source for output stream 1, etc. +In the first form, an output stream is created for every stream from the input +file with the index @var{input_file_id}. If @var{stream_specifier} is given, +only those streams that match the specifier are used (see the +@ref{Stream specifiers} section for the @var{stream_specifier} syntax). A @code{-} character before the stream identifier creates a "negative" mapping. It disables matching streams from already created mappings. +An optional @var{view_specifier} may be given after the stream specifier, which +for multiview video specifies the view to be used. The view specifier may have +one of the following formats: +@table @option +@item view:@var{view_id} +select a view by its ID; @var{view_id} may be set to 'all' to use all the views +interleaved into one stream; + +@item vidx:@var{view_idx} +select a view by its index; i.e. 0 is the base view, 1 is the first non-base +view, etc. + +@item vpos:@var{position} +select a view by its display position; @var{position} may be @code{left} or +@code{right} +@end table +The default for transcoding is to only use the base view, i.e. the equivalent of +@code{vidx:0}. For streamcopy, view specifiers are not supported and all views +are always copied. + A trailing @code{?} after the stream index will allow the map to be optional: if the map matches no streams the map will be ignored instead of failing. Note the map will still fail if an invalid input file index @@ -1435,39 +1843,56 @@ An alternative @var{[linklabel]} form will map outputs from complex filter graphs (see the @option{-filter_complex} option) to the output file. @var{linklabel} must correspond to a defined output link label in the graph. -For example, to map ALL streams from the first input file to output +This option may be specified multiple times, each adding more streams to the +output file. Any given input stream may also be mapped any number of times as a +source for different output streams, e.g. in order to use different encoding +options and/or filters. The streams are created in the output in the same order +in which the @code{-map} options are given on the commandline. + +Using this option disables the default mappings for this output file. + +Examples: + +@table @emph + +@item map everything +To map ALL streams from the first input file to output @example ffmpeg -i INPUT -map 0 output @end example -For example, if you have two audio streams in the first input file, -these streams are identified by "0:0" and "0:1". You can use -@code{-map} to select which streams to place in an output file. For -example: +@item select specific stream +If you have two audio streams in the first input file, these streams are +identified by @var{0:0} and @var{0:1}. You can use @code{-map} to select which +streams to place in an output file. For example: @example ffmpeg -i INPUT -map 0:1 out.wav @end example -will map the input stream in @file{INPUT} identified by "0:1" to -the (single) output stream in @file{out.wav}. +will map the second input stream in @file{INPUT} to the (single) output stream +in @file{out.wav}. -For example, to select the stream with index 2 from input file -@file{a.mov} (specified by the identifier "0:2"), and stream with -index 6 from input @file{b.mov} (specified by the identifier "1:6"), -and copy them to the output file @file{out.mov}: +@item create multiple streams +To select the stream with index 2 from input file @file{a.mov} (specified by the +identifier @var{0:2}), and stream with index 6 from input @file{b.mov} +(specified by the identifier @var{1:6}), and copy them to the output file +@file{out.mov}: @example ffmpeg -i a.mov -i b.mov -c copy -map 0:2 -map 1:6 out.mov @end example +@item create multiple streams 2 To select all video and the third audio stream from an input file: @example ffmpeg -i INPUT -map 0:v -map 0:a:2 OUTPUT @end example +@item negative map To map all the streams except the second audio, use negative mappings @example ffmpeg -i INPUT -map 0 -map -0:a:1 OUTPUT @end example +@item optional map To map the video and audio streams from the first input, and using the trailing @code{?}, ignore the audio mapping if no audio streams exist in the first input: @@ -1475,12 +1900,13 @@ the first input: ffmpeg -i INPUT -map 0:v -map 0:a? OUTPUT @end example +@item map by language To pick the English audio stream: @example ffmpeg -i INPUT -map 0:m:language:eng OUTPUT @end example -Note that using this option disables the default mappings for this output file. +@end table @item -ignore_unknown Ignore input streams with unknown type instead of failing if copying @@ -1490,73 +1916,6 @@ such streams is attempted. Allow input streams with unknown type to be copied instead of failing if copying such streams is attempted. -@item -map_channel [@var{input_file_id}.@var{stream_specifier}.@var{channel_id}|-1][?][:@var{output_file_id}.@var{stream_specifier}] -Map an audio channel from a given input to an output. If -@var{output_file_id}.@var{stream_specifier} is not set, the audio channel will -be mapped on all the audio streams. - -Using "-1" instead of -@var{input_file_id}.@var{stream_specifier}.@var{channel_id} will map a muted -channel. - -A trailing @code{?} will allow the map_channel to be -optional: if the map_channel matches no channel the map_channel will be ignored instead -of failing. - -For example, assuming @var{INPUT} is a stereo audio file, you can switch the -two audio channels with the following command: -@example -ffmpeg -i INPUT -map_channel 0.0.1 -map_channel 0.0.0 OUTPUT -@end example - -If you want to mute the first channel and keep the second: -@example -ffmpeg -i INPUT -map_channel -1 -map_channel 0.0.1 OUTPUT -@end example - -The order of the "-map_channel" option specifies the order of the channels in -the output stream. The output channel layout is guessed from the number of -channels mapped (mono if one "-map_channel", stereo if two, etc.). Using "-ac" -in combination of "-map_channel" makes the channel gain levels to be updated if -input and output channel layouts don't match (for instance two "-map_channel" -options and "-ac 6"). - -You can also extract each channel of an input to specific outputs; the following -command extracts two channels of the @var{INPUT} audio stream (file 0, stream 0) -to the respective @var{OUTPUT_CH0} and @var{OUTPUT_CH1} outputs: -@example -ffmpeg -i INPUT -map_channel 0.0.0 OUTPUT_CH0 -map_channel 0.0.1 OUTPUT_CH1 -@end example - -The following example splits the channels of a stereo input into two separate -streams, which are put into the same output file: -@example -ffmpeg -i stereo.wav -map 0:0 -map 0:0 -map_channel 0.0.0:0.0 -map_channel 0.0.1:0.1 -y out.ogg -@end example - -Note that currently each output stream can only contain channels from a single -input stream; you can't for example use "-map_channel" to pick multiple input -audio channels contained in different streams (from the same or different files) -and merge them into a single output stream. It is therefore not currently -possible, for example, to turn two separate mono streams into a single stereo -stream. However splitting a stereo stream into two single channel mono streams -is possible. - -If you need this feature, a possible workaround is to use the @emph{amerge} -filter. For example, if you need to merge a media (here @file{input.mkv}) with 2 -mono audio streams into one single stereo channel audio stream (and keep the -video stream), you can use the following command: -@example -ffmpeg -i input.mkv -filter_complex "[0:1] [0:2] amerge" -c:a pcm_s16le -c:v copy output.mkv -@end example - -To map the first two audio channels from the first input, and using the -trailing @code{?}, ignore the audio channel mapping if the first input is -mono instead of stereo: -@example -ffmpeg -i INPUT -map_channel 0.0.0 -map_channel 0.0.1? OUTPUT -@end example - @item -map_metadata[:@var{metadata_spec_out}] @var{infile}[:@var{metadata_spec_in}] (@emph{output,per-metadata}) Set metadata information of the next output file from @var{infile}. Note that those are file indices (zero-based), not filenames. @@ -1633,6 +1992,9 @@ it may cause packet loss. It is useful for when flow speed of output packets is important, such as live streaming. @item -re (@emph{input}) Read input at native frame rate. This is equivalent to setting @code{-readrate 1}. +@item -readrate_initial_burst @var{seconds} +Set an initial read burst time, in seconds, after which @option{-re/-readrate} +will be enforced. @item -vsync @var{parameter} (@emph{global}) @itemx -fps_mode[:@var{stream_specifier}] @var{parameter} (@emph{output,per-stream}) Set video sync method / framerate mode. vsync is applied to all output video streams @@ -1651,9 +2013,6 @@ constant frame rate. @item vfr (2) Frames are passed through with their timestamp or dropped so as to prevent 2 frames from having the same timestamp. -@item drop -As passthrough but destroys all timestamps, making the muxer generate -fresh timestamps based on frame-rate. @item auto (-1) Chooses between cfr and vfr depending on muxer capabilities. This is the default method. @@ -1674,24 +2033,6 @@ The default is -1.1. One possible usecase is to avoid framedrops in case of noisy timestamps or to increase frame drop precision in case of exact timestamps. -@item -async @var{samples_per_second} -Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, -the parameter is the maximum samples per second by which the audio is changed. --async 1 is a special case where only the start of the audio stream is corrected -without any later correction. - -Note that the timestamps may be further modified by the muxer, after this. -For example, in the case that the format option @option{avoid_negative_ts} -is enabled. - -This option has been deprecated. Use the @code{aresample} audio filter instead. - -@item -adrift_threshold @var{time} -Set the minimum difference between timestamps and audio data (in seconds) to trigger -adding/dropping samples to make it match the timestamps. This option effectively is -a threshold to select between hard (add/drop) and soft (squeeze/stretch) compensation. -@code{-async} must be set to a positive value. - @item -apad @var{parameters} (@emph{output,per-stream}) Pad the output audio stream(s). This is the same as applying @code{-af apad}. Argument is a string of filter parameters composed the same as with the @code{apad} filter. @@ -1738,8 +2079,7 @@ Try to make the choice automatically, in order to generate a sane output. Default value is -1. @item -enc_time_base[:@var{stream_specifier}] @var{timebase} (@emph{output,per-stream}) -Set the encoder timebase. @var{timebase} is a floating point number, -and can assume one of the following values: +Set the encoder timebase. @var{timebase} can assume one of the following values: @table @option @item 0 @@ -1747,16 +2087,17 @@ Assign a default value according to the media type. For video - use 1/framerate, for audio - use 1/samplerate. -@item -1 -Use the input stream timebase when possible. +@item demux +Use the timebase from the demuxer. -If an input stream is not available, the default timebase will be used. +@item filter +Use the timebase from the filtergraph. -@item >0 +@item a positive number Use the provided number as the timebase. This field can be provided as a ratio of two integers (e.g. 1:24, 1:48000) -or as a floating point number (e.g. 0.04166, 2.0833e-5) +or as a decimal number (e.g. 0.04166, 2.0833e-5) @end table Default value is 0. @@ -1765,12 +2106,54 @@ Default value is 0. Enable bitexact mode for (de)muxer and (de/en)coder @item -shortest (@emph{output}) Finish encoding when the shortest output stream ends. -@item -dts_delta_threshold -Timestamp discontinuity delta threshold. -@item -dts_error_threshold @var{seconds} -Timestamp error delta threshold. This threshold use to discard crazy/damaged -timestamps and the default is 30 hours which is arbitrarily picked and quite -conservative. + +Note that this option may require buffering frames, which introduces extra +latency. The maximum amount of this latency may be controlled with the +@code{-shortest_buf_duration} option. + +@item -shortest_buf_duration @var{duration} (@emph{output}) +The @code{-shortest} option may require buffering potentially large amounts +of data when at least one of the streams is "sparse" (i.e. has large gaps +between frames – this is typically the case for subtitles). + +This option controls the maximum duration of buffered frames in seconds. +Larger values may allow the @code{-shortest} option to produce more accurate +results, but increase memory use and latency. + +The default value is 10 seconds. + +@item -dts_delta_threshold @var{threshold} +Timestamp discontinuity delta threshold, expressed as a decimal number +of seconds. + +The timestamp discontinuity correction enabled by this option is only +applied to input formats accepting timestamp discontinuity (for which +the @code{AVFMT_TS_DISCONT} flag is enabled), e.g. MPEG-TS and HLS, and +is automatically disabled when employing the @code{-copyts} option +(unless wrapping is detected). + +If a timestamp discontinuity is detected whose absolute value is +greater than @var{threshold}, ffmpeg will remove the discontinuity by +decreasing/increasing the current DTS and PTS by the corresponding +delta value. + +The default value is 10. + +@item -dts_error_threshold @var{threshold} +Timestamp error delta threshold, expressed as a decimal number of +seconds. + +The timestamp correction enabled by this option is only applied to +input formats not accepting timestamp discontinuity (for which the +@code{AVFMT_TS_DISCONT} flag is not enabled). + +If a timestamp discontinuity is detected whose absolute value is +greater than @var{threshold}, ffmpeg will drop the PTS/DTS timestamp +value. + +The default value is @code{3600*30} (30 hours), which is arbitrarily +picked and quite conservative. + @item -muxdelay @var{seconds} (@emph{output}) Set the maximum demux-decode delay. @item -muxpreload @var{seconds} (@emph{output}) @@ -1787,16 +2170,36 @@ an output mpegts file: ffmpeg -i inurl -streamid 0:33 -streamid 1:36 out.ts @end example -@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream}) -Set bitstream filters for matching streams. @var{bitstream_filters} is -a comma-separated list of bitstream filters. Use the @code{-bsfs} option -to get the list of bitstream filters. +@item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{input/output,per-stream}) +Apply bitstream filters to matching streams. The filters are applied to each +packet as it is received from the demuxer (when used as an input option) or +before it is sent to the muxer (when used as an output option). + +@var{bitstream_filters} is a comma-separated list of bitstream filter +specifications, each of the form +@example +@var{filter}[=@var{optname0}=@var{optval0}:@var{optname1}=@var{optval1}:...] +@end example +Any of the ',=:' characters that are to be a part of an option value need to be +escaped with a backslash. + +Use the @code{-bsfs} option to get the list of bitstream filters. + +E.g. @example -ffmpeg -i h264.mp4 -c:v copy -bsf:v h264_mp4toannexb -an out.h264 +ffmpeg -bsf:v h264_mp4toannexb -i h264.mp4 -c:v copy -an out.h264 @end example +applies the @code{h264_mp4toannexb} bitstream filter (which converts +MP4-encapsulated H.264 stream to Annex B) to the @emph{input} video stream. + +On the other hand, @example ffmpeg -i file.mov -an -vn -bsf:s mov2textsub -c:s copy -f rawvideo sub.txt @end example +applies the @code{mov2textsub} bitstream filter (which extracts text from MOV +subtitles) to the @emph{output} subtitle stream. Note, however, that since both +examples use @code{-c copy}, it matters little whether the filters are applied +on input or output - that would change if transcoding was happening. @item -tag[:@var{stream_specifier}] @var{codec_tag} (@emph{input/output,per-stream}) Force a tag/fourcc for matching streams. @@ -1814,13 +2217,71 @@ Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or outputs. For simple graphs -- those with one input and one output of the same type -- see the @option{-filter} options. @var{filtergraph} is a description of the filtergraph, as described in the ``Filtergraph syntax'' section of the -ffmpeg-filters manual. +ffmpeg-filters manual. This option may be specified multiple times - each use +creates a new complex filtergraph. -Input link labels must refer to input streams using the -@code{[file_index:stream_specifier]} syntax (i.e. the same as @option{-map} -uses). If @var{stream_specifier} matches multiple streams, the first one will be -used. An unlabeled input will be connected to the first unused input stream of -the matching type. +Inputs to a complex filtergraph may come from different source types, +distinguished by the format of the corresponding link label: +@itemize +@item +To connect an input stream, use @code{[file_index:stream_specifier]} (i.e. the +same syntax as @option{-map}). If @var{stream_specifier} matches multiple +streams, the first one will be used. For multiview video, the stream specifier +may be followed by the view specifier, see documentation for the @option{-map} +option for its syntax. + +@item +To connect a loopback decoder use [dec:@var{dec_idx}], where @var{dec_idx} is +the index of the loopback decoder to be connected to given input. For multiview +video, the decoder index may be followed by the view specifier, see +documentation for the @option{-map} option for its syntax. + +@item +To connect an output from another complex filtergraph, use its link label. E.g +the following example: + +@example +ffmpeg -i input.mkv \ + -filter_complex '[0:v]scale=size=hd1080,split=outputs=2[for_enc][orig_scaled]' \ + -c:v libx264 -map '[for_enc]' output.mkv \ + -dec 0:0 \ + -filter_complex '[dec:0][orig_scaled]hstack[stacked]' \ + -map '[stacked]' -c:v ffv1 comparison.mkv +@end example + +reads an input video and +@itemize +@item +(line 2) uses a complex filtergraph with one input and two outputs +to scale the video to 1920x1080 and duplicate the result to both +outputs; + +@item +(line 3) encodes one scaled output with @code{libx264} and writes the result to +@file{output.mkv}; + +@item +(line 4) decodes this encoded stream with a loopback decoder; + +@item +(line 5) places the output of the loopback decoder (i.e. the +@code{libx264}-encoded video) side by side with the scaled original input; + +@item +(line 6) combined video is then losslessly encoded and written into +@file{comparison.mkv}. + +@end itemize + +Note that the two filtergraphs cannot be combined into one, because then there +would be a cycle in the transcoding pipeline (filtergraph output goes to +encoding, from there to decoding, then back to the same graph), and such cycles +are not allowed. + +@end itemize + +An unlabeled input will be connected to the first unused input stream of the +matching type. Output link labels are referred to with @option{-map}. Unlabeled outputs are added to the first output file. @@ -1881,11 +2342,6 @@ The default is the number of available CPUs. Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or outputs. Equivalent to @option{-filter_complex}. -@item -filter_complex_script @var{filename} (@emph{global}) -This option is similar to @option{-filter_complex}, the only difference is that -its argument is the name of the file from which a complex filtergraph -description is to be read. - @item -accurate_seek (@emph{input}) This option enables or disables accurate seeking in input files with the @option{-ss} option. It is enabled by default, so seeking is accurate when @@ -1899,13 +2355,16 @@ to the @option{-ss} option is considered an actual timestamp, and is not offset by the start time of the file. This matters only for files which do not start from timestamp 0, such as transport streams. -@item -thread_queue_size @var{size} (@emph{input}) -This option sets the maximum number of queued packets when reading from the -file or device. With low latency / high rate live streams, packets may be -discarded if they are not read in a timely manner; setting this value can +@item -thread_queue_size @var{size} (@emph{input/output}) +For input, this option sets the maximum number of queued packets when reading +from the file or device. With low latency / high rate live streams, packets may +be discarded if they are not read in a timely manner; setting this value can force ffmpeg to use a separate input thread and read packets as soon as they arrive. By default ffmpeg only does this if multiple inputs are specified. +For output, this option specified the maximum number of packets that may be +queued to each muxing thread. + @item -sdp_file @var{file} (@emph{global}) Print sdp information for an output stream to @var{file}. This allows dumping sdp information when at least one output isn't an @@ -1986,6 +2445,128 @@ encoder/muxer, it does not change the stream to conform to this value. Setting values that do not match the stream properties may result in encoding failures or invalid output files. +@anchor{stats_enc_options} +@item -stats_enc_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) +@item -stats_enc_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) +@item -stats_mux_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream}) +Write per-frame encoding information about the matching streams into the file +given by @var{path}. + +@option{-stats_enc_pre} writes information about raw video or audio frames right +before they are sent for encoding, while @option{-stats_enc_post} writes +information about encoded packets as they are received from the encoder. +@option{-stats_mux_pre} writes information about packets just as they are about to +be sent to the muxer. Every frame or packet produces one line in the specified +file. The format of this line is controlled by @option{-stats_enc_pre_fmt} / +@option{-stats_enc_post_fmt} / @option{-stats_mux_pre_fmt}. + +When stats for multiple streams are written into a single file, the lines +corresponding to different streams will be interleaved. The precise order of +this interleaving is not specified and not guaranteed to remain stable between +different invocations of the program, even with the same options. + +@item -stats_enc_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) +@item -stats_enc_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) +@item -stats_mux_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream}) +Specify the format for the lines written with @option{-stats_enc_pre} / +@option{-stats_enc_post} / @option{-stats_mux_pre}. + +@var{format_spec} is a string that may contain directives of the form +@var{@{fmt@}}. @var{format_spec} is backslash-escaped --- use \@{, \@}, and \\ +to write a literal @{, @}, or \, respectively, into the output. + +The directives given with @var{fmt} may be one of the following: +@table @option +@item fidx +Index of the output file. + +@item sidx +Index of the output stream in the file. + +@item n +Frame number. Pre-encoding: number of frames sent to the encoder so far. +Post-encoding: number of packets received from the encoder so far. +Muxing: number of packets submitted to the muxer for this stream so far. + +@item ni +Input frame number. Index of the input frame (i.e. output by a decoder) that +corresponds to this output frame or packet. -1 if unavailable. + +@item tb +Timebase in which this frame/packet's timestamps are expressed, as a rational +number @var{num/den}. Note that encoder and muxer may use different timebases. + +@item tbi +Timebase for @var{ptsi}, as a rational number @var{num/den}. Available when +@var{ptsi} is available, @var{0/1} otherwise. + +@item pts +Presentation timestamp of the frame or packet, as an integer. Should be +multiplied by the timebase to compute presentation time. + +@item ptsi +Presentation timestamp of the input frame (see @var{ni}), as an integer. Should +be multiplied by @var{tbi} to compute presentation time. Printed as +(2^63 - 1 = 9223372036854775807) when not available. + +@item t +Presentation time of the frame or packet, as a decimal number. Equal to +@var{pts} multiplied by @var{tb}. + +@item ti +Presentation time of the input frame (see @var{ni}), as a decimal number. Equal +to @var{ptsi} multiplied by @var{tbi}. Printed as inf when not available. + +@item dts (@emph{packet}) +Decoding timestamp of the packet, as an integer. Should be multiplied by the +timebase to compute presentation time. + +@item dt (@emph{packet}) +Decoding time of the frame or packet, as a decimal number. Equal to +@var{dts} multiplied by @var{tb}. + +@item sn (@emph{frame,audio}) +Number of audio samples sent to the encoder so far. + +@item samp (@emph{frame,audio}) +Number of audio samples in the frame. + +@item size (@emph{packet}) +Size of the encoded packet in bytes. + +@item br (@emph{packet}) +Current bitrate in bits per second. + +@item abr (@emph{packet}) +Average bitrate for the whole stream so far, in bits per second, -1 if it cannot +be determined at this point. + +@item key (@emph{packet}) +Character 'K' if the packet contains a keyframe, character 'N' otherwise. +@end table + +Directives tagged with @emph{packet} may only be used with +@option{-stats_enc_post_fmt} and @option{-stats_mux_pre_fmt}. + +Directives tagged with @emph{frame} may only be used with +@option{-stats_enc_pre_fmt}. + +Directives tagged with @emph{audio} may only be used with audio streams. + +The default format strings are: +@table @option +@item pre-encoding +@{fidx@} @{sidx@} @{n@} @{t@} +@item post-encoding +@{fidx@} @{sidx@} @{n@} @{t@} +@end table +In the future, new items may be added to the end of the default formatting +strings. Users who depend on the format staying exactly the same, should +prescribe it manually. + +Note that stats for different streams written into the same file may have +different formats. + @end table @section Preset files @@ -2043,6 +2624,63 @@ search for the file @file{libvpx-1080p.avpreset}. If no such file is found, then ffmpeg will search for a file named @var{arg}.avpreset in the same directories. +@anchor{vstats_file_format} +@section vstats file format +The @code{-vstats} and @code{-vstats_file} options enable generation of a file +containing statistics about the generated video outputs. + +The @code{-vstats_version} option controls the format version of the generated +file. + +With version @code{1} the format is: +@example +frame= @var{FRAME} q= @var{FRAME_QUALITY} PSNR= @var{PSNR} f_size= @var{FRAME_SIZE} s_size= @var{STREAM_SIZE}kB time= @var{TIMESTAMP} br= @var{BITRATE}kbits/s avg_br= @var{AVERAGE_BITRATE}kbits/s +@end example + +With version @code{2} the format is: +@example +out= @var{OUT_FILE_INDEX} st= @var{OUT_FILE_STREAM_INDEX} frame= @var{FRAME_NUMBER} q= @var{FRAME_QUALITY}f PSNR= @var{PSNR} f_size= @var{FRAME_SIZE} s_size= @var{STREAM_SIZE}kB time= @var{TIMESTAMP} br= @var{BITRATE}kbits/s avg_br= @var{AVERAGE_BITRATE}kbits/s +@end example + +The value corresponding to each key is described below: +@table @option +@item avg_br +average bitrate expressed in Kbits/s + +@item br +bitrate expressed in Kbits/s + +@item frame +number of encoded frame + +@item out +out file index + +@item PSNR +Peak Signal to Noise Ratio + +@item q +quality of the frame + +@item f_size +encoded packet size expressed as number of bytes + +@item s_size +stream size expressed in KiB + +@item st +out file stream index + +@item time +time of the packet + +@item type +picture type +@end table + +See also the @ref{stats_enc_options,,-stats_enc options} for an alternative way +to show encoding statistics. + @c man end OPTIONS @chapter Examples @@ -2306,7 +2944,7 @@ ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1) @ignore @setfilename ffmpeg -@settitle ffmpeg video converter +@settitle ffmpeg media converter @end ignore diff --git a/mythtv/external/FFmpeg/doc/ffplay.texi b/mythtv/external/FFmpeg/doc/ffplay.texi index 5dd860b846f..93f77eeecea 100644 --- a/mythtv/external/FFmpeg/doc/ffplay.texi +++ b/mythtv/external/FFmpeg/doc/ffplay.texi @@ -196,6 +196,18 @@ will produce a thread pool with this many threads available for parallel processing. The default is 0 which means that the thread count will be determined by the number of available CPUs. +@item -enable_vulkan +Use vulkan renderer rather than SDL builtin renderer. Depends on libplacebo. + +@item -vulkan_params + +Vulkan configuration using a list of @var{key}=@var{value} pairs separated by +":". + +@item -hwaccel +Use HW accelerated decoding. Enable this option will enable vulkan renderer +automatically. + @end table @section While playing diff --git a/mythtv/external/FFmpeg/doc/ffprobe.texi b/mythtv/external/FFmpeg/doc/ffprobe.texi index 4dc9f577bb8..6333249a6e8 100644 --- a/mythtv/external/FFmpeg/doc/ffprobe.texi +++ b/mythtv/external/FFmpeg/doc/ffprobe.texi @@ -41,15 +41,15 @@ ffprobe will show it. ffprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of a form defined by the selected -writer, which is specified by the @option{print_format} option. +writer, which is specified by the @option{output_format} option. Sections may contain other nested sections, and are identified by a name (which may be shared by other sections), and an unique name. See the output of @option{sections}. Metadata tags stored in the container or in the streams are recognized -and printed in the corresponding "FORMAT", "STREAM" or "PROGRAM_STREAM" -section. +and printed in the corresponding "FORMAT", "STREAM", "STREAM_GROUP_STREAM" +or "PROGRAM_STREAM" section. @c man end @@ -83,7 +83,7 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values. Prettify the format of the displayed values, it corresponds to the options "-unit -prefix -byte_binary_prefix -sexagesimal". -@item -of, -print_format @var{writer_name}[=@var{writer_options}] +@item -output_format, -of, -print_format @var{writer_name}[=@var{writer_options}] Set the output printing format. @var{writer_name} specifies the name of the writer, and @@ -91,7 +91,7 @@ Set the output printing format. For example for printing the output in JSON format, specify: @example --print_format json +-output_format json @end example For more details on the available output printing formats, see the @@ -232,6 +232,13 @@ multimedia stream. Each media stream information is printed within a dedicated section with name "PROGRAM_STREAM". +@item -show_stream_groups +Show information about stream groups and their streams contained in the +input multimedia stream. + +Each media stream information is printed within a dedicated section +with name "STREAM_GROUP_STREAM". + @item -show_chapters Show information about chapters stored in the format. @@ -415,8 +422,9 @@ keyN=valN [/SECTION] @end example -Metadata tags are printed as a line in the corresponding FORMAT, STREAM or -PROGRAM_STREAM section, and are prefixed by the string "TAG:". +Metadata tags are printed as a line in the corresponding FORMAT, STREAM, +STREAM_GROUP_STREAM or PROGRAM_STREAM section, and are prefixed by the +string "TAG:". A description of the accepted options follows. diff --git a/mythtv/external/FFmpeg/doc/ffprobe.xsd b/mythtv/external/FFmpeg/doc/ffprobe.xsd index 3af621a17ae..64e2d88574e 100644 --- a/mythtv/external/FFmpeg/doc/ffprobe.xsd +++ b/mythtv/external/FFmpeg/doc/ffprobe.xsd @@ -1,386 +1,528 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + targetNamespace="http://www.ffmpeg.org/schema/ffprobe" + xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mythtv/external/FFmpeg/doc/fftools-common-opts.texi b/mythtv/external/FFmpeg/doc/fftools-common-opts.texi index d9145704d6e..4e48789defd 100644 --- a/mythtv/external/FFmpeg/doc/fftools-common-opts.texi +++ b/mythtv/external/FFmpeg/doc/fftools-common-opts.texi @@ -13,6 +13,15 @@ corresponding value to true. They can be set to false by prefixing the option name with "no". For example using "-nofoo" will set the boolean option with name "foo" to false. +Options that take arguments support a special syntax where the argument given on +the command line is interpreted as a path to the file from which the actual +argument value is loaded. To use this feature, add a forward slash '/' +immediately before the option name (after the leading dash). E.g. +@example +ffmpeg -i INPUT -/filter:v filter.script OUTPUT +@end example +will load a filtergraph description from the file named @file{filter.script}. + @anchor{Stream specifiers} @section Stream specifiers Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers @@ -37,9 +46,9 @@ Matches the stream with this index. E.g. @code{-threads:1 4} would set the thread count for the second stream to 4. If @var{stream_index} is used as an additional stream specifier (see below), then it selects stream number @var{stream_index} from the matching streams. Stream numbering is based on the -order of the streams as detected by libavformat except when a program ID is -also specified. In this case it is based on the ordering of the streams in the -program. +order of the streams as detected by libavformat except when a stream group +specifier or program ID is also specified. In this case it is based on the +ordering of the streams in the group or program. @item @var{stream_type}[:@var{additional_stream_specifier}] @var{stream_type} is one of following: 'v' or 'V' for video, 'a' for audio, 's' for subtitle, 'd' for data, and 't' for attachments. 'v' matches all video @@ -48,6 +57,17 @@ thumbnails or cover arts. If @var{additional_stream_specifier} is used, then it matches streams which both have this type and match the @var{additional_stream_specifier}. Otherwise, it matches all streams of the specified type. +@item g:@var{group_specifier}[:@var{additional_stream_specifier}] +Matches streams which are in the group with the specifier @var{group_specifier}. +if @var{additional_stream_specifier} is used, then it matches streams which both +are part of the group and match the @var{additional_stream_specifier}. +@var{group_specifier} may be one of the following: +@table @option +@item @var{group_index} +Match the stream with this group index. +@item #@var{group_id} or i:@var{group_id} +Match the stream with this group id. +@end table @item p:@var{program_id}[:@var{additional_stream_specifier}] Matches streams which are in the program with the id @var{program_id}. If @var{additional_stream_specifier} is used, then it matches streams which both @@ -59,6 +79,10 @@ Match the stream by stream id (e.g. PID in MPEG-TS container). Matches streams with the metadata tag @var{key} having the specified value. If @var{value} is not given, matches streams that contain the given tag with any value. +@item disp:@var{dispositions}[:@var{additional_stream_specifier}] +Matches streams with the given disposition(s). @var{dispositions} is a list of +one or more dispositions (as printed by the @option{-dispositions} option) +joined with '+'. @item u Matches streams with usable configuration, the codec must be defined and the essential information such as video dimension or audio sample rate must be present. diff --git a/mythtv/external/FFmpeg/doc/filters.texi b/mythtv/external/FFmpeg/doc/filters.texi index 40f21fb34ce..428986a1e90 100644 --- a/mythtv/external/FFmpeg/doc/filters.texi +++ b/mythtv/external/FFmpeg/doc/filters.texi @@ -171,6 +171,17 @@ within the quoted text; otherwise the argument string is considered terminated when the next special character (belonging to the set @samp{[]=;,}) is encountered. +A special syntax implemented in the @command{ffmpeg} CLI tool allows loading +option values from files. This is done be prepending a slash '/' to the option +name, then the supplied value is interpreted as a path from which the actual +value is loaded. E.g. +@example +ffmpeg -i -vf drawtext=/text=/tmp/some_text +@end example +will load the text to be drawn from @file{/tmp/some_text}. API users wishing to +implement a similar feature should use the @code{avfilter_graph_segment_*()} +functions together with custom IO code. + The name and arguments of the filter are optionally preceded and followed by a list of link labels. A link label allows one to name a link and associate it to a filter output @@ -203,6 +214,23 @@ In a complete filterchain all the unlabelled filter input and output pads must be connected. A filtergraph is considered valid if all the filter input and output pads of all the filterchains are connected. +Leading and trailing whitespaces (space, tabs, or line feeds) separating tokens +in the filtergraph specification are ignored. This means that the filtergraph +can be expressed using empty lines and spaces to improve redability. + +For example, the filtergraph: +@example +testsrc,split[L1],hflip[L2];[L1][L2] hstack +@end example + +can be represented as: +@example +testsrc, +split [L1], hflip [L2]; + +[L1][L2] hstack +@end example + Libavfilter will automatically insert @ref{scale} filters where format conversion is required. It is possible to specify swscale flags for those automatically inserted scalers by prepending @@ -271,6 +299,14 @@ previous string will finally result in: -vf "drawtext=text=this is a \\\\\\'string\\\\\\'\\\\: may contain one\\, or more\\, special characters" @end example +In order to avoid cumbersome escaping when using a commandline tool accepting a +filter specification as input, it is advisable to avoid direct inclusion of the +filter or options specification in the shell. + +For example, in case of the @ref{drawtext,,drawtext filter}, you might prefer to +use the @option{textfile} option in place of @option{text} to specify the text +to render. + @chapter Timeline editing Some filters support a generic @option{enable} option. For the filters @@ -288,7 +324,8 @@ timestamp expressed in seconds, NAN if the input timestamp is unknown sequential number of the input frame, starting from 0 @item pos -the position in the file of the input frame, NAN if unknown +the position in the file of the input frame, NAN if unknown; deprecated, do +not use @item w @item h @@ -350,6 +387,19 @@ terminates. Default value is 0. If set to 1, force the filter to extend the last frame of secondary streams until the end of the primary stream. A value of 0 disables this behavior. Default value is 1. + +@item ts_sync_mode +How strictly to sync streams based on secondary input timestamps; it accepts +one of the following values: + +@table @option +@item default +Frame from secondary input with the nearest lower or equal timestamp to the +primary input frame. +@item nearest +Frame from secondary input with the absolute nearest timestamp to the primary +input frame. +@end table @end table @c man end OPTIONS FOR FILTERS WITH SEVERAL INPUTS @@ -364,6 +414,63 @@ build. Below is a description of the currently available audio filters. +@section aap +Apply Affine Projection algorithm to the first audio stream using the second audio stream. + +This adaptive filter is used to estimate unknown audio based on multiple input audio samples. +Affine projection algorithm can make trade-offs between computation complexity with convergence speed. + +A description of the accepted options follows. + +@table @option +@item order +Set the filter order. + +@item projection +Set the projection order. + +@item mu +Set the filter mu. + +@item delta +Set the coefficient to initialize internal covariance matrix. + +@item out_mode +Set the filter output samples. It accepts the following values: +@table @option +@item i +Pass the 1st input. + +@item d +Pass the 2nd input. + +@item o +Pass difference between desired, 2nd input and error signal estimate. + +@item n +Pass difference between input, 1st input and error signal estimate. + +@item e +Pass error signal estimated samples. + +Default value is @var{o}. +@end table + +@item precision +Set which precision to use when processing samples. + +@table @option +@item auto +Auto pick internal sample format depending on other filters. + +@item float +Always use single-floating point precision sample format. + +@item double +Always use double-floating point precision sample format. +@end table +@end table + @section acompressor A compressor is mainly used to reduce the dynamic range of a signal. @@ -859,6 +966,91 @@ Compute derivative/integral of audio stream. Applying both filters one after another produces original audio. +@section adrc + +Apply spectral dynamic range controller filter to input audio stream. + +A description of the accepted options follows. + +@table @option +@item transfer +Set the transfer expression. + +The expression can contain the following constants: + +@table @option +@item ch +current channel number + +@item sn +current sample number + +@item nb_channels +number of channels + +@item t +timestamp expressed in seconds + +@item sr +sample rate + +@item p +current frequency power value, in dB + +@item f +current frequency in Hz +@end table + +Default value is @code{p}. + +@item attack +Set the attack in milliseconds. Default is @code{50} milliseconds. +Allowed range is from 1 to 1000 milliseconds. +@item release +Set the release in milliseconds. Default is @code{100} milliseconds. +Allowed range is from 5 to 2000 milliseconds. +@item channels +Set which channels to filter, by default @code{all} channels in audio stream are filtered. +@end table + +@subsection Commands + +This filter supports the all above options as @ref{commands}. + +@subsection Examples + +@itemize +@item +Apply spectral compression to all frequencies with threshold of -50 dB and 1:6 ratio: +@example +adrc=transfer='if(gt(p,-50),-50+(p-(-50))/6,p)':attack=50:release=100 +@end example + +@item +Similar to above but with 1:2 ratio and filtering only front center channel: +@example +adrc=transfer='if(gt(p,-50),-50+(p-(-50))/2,p)':attack=50:release=100:channels=FC +@end example + +@item +Apply spectral noise gate to all frequencies with threshold of -85 dB and with short attack time and short release time: +@example +adrc=transfer='if(lte(p,-85),p-800,p)':attack=1:release=5 +@end example + +@item +Apply spectral expansion to all frequencies with threshold of -10 dB and 1:2 ratio: +@example +adrc=transfer='if(lt(p,-10),-10+(p-(-10))*2,p)':attack=50:release=100 +@end example + +@item +Apply limiter to max -60 dB to all frequencies, with attack of 2 ms and release of 10 ms: +@example +adrc=transfer='min(p,-60)':attack=2:release=10 +@end example +@end itemize + @section adynamicequalizer Apply dynamic equalization to input audio stream. @@ -868,15 +1060,15 @@ A description of the accepted options follows. @table @option @item threshold Set the detection threshold used to trigger equalization. -Threshold detection is using bandpass filter. +Threshold detection is using detection filter. Default value is 0. Allowed range is from 0 to 100. @item dfrequency -Set the detection frequency in Hz used for bandpass filter used to trigger equalization. +Set the detection frequency in Hz used for detection filter used to trigger equalization. Default value is 1000 Hz. Allowed range is between 2 and 1000000 Hz. @item dqfactor -Set the detection resonance factor for bandpass filter used to trigger equalization. +Set the detection resonance factor for detection filter used to trigger equalization. Default value is 1. Allowed range is from 0.001 to 1000. @item tfrequency @@ -897,38 +1089,45 @@ Set the amount of milliseconds the signal from detection has to fall below the detection threshold before equalization ends. Default is 200. Allowed range is between 1 and 2000. -@item knee -Curve the sharp knee around the detection threshold to calculate -equalization gain more softly. -Default is 1. Allowed range is between 0 and 8. - @item ratio Set the ratio by which the equalization gain is raised. -Default is 1. Allowed range is between 1 and 20. +Default is 1. Allowed range is between 0 and 30. @item makeup -Set the makeup offset in dB by which the equalization gain is raised. -Default is 0. Allowed range is between 0 and 30. +Set the makeup offset by which the equalization gain is raised. +Default is 0. Allowed range is between 0 and 100. @item range -Set the max allowed cut/boost amount in dB. Default is 0. -Allowed range is from 0 to 200. - -@item slew -Set the slew factor. Default is 1. Allowed range is from 1 to 200. +Set the max allowed cut/boost amount. Default is 50. +Allowed range is from 1 to 200. @item mode Set the mode of filter operation, can be one of the following: @table @samp @item listen -Output only isolated bandpass signal. -@item cut +Output only isolated detection signal. +@item cutbelow +Cut frequencies below detection threshold. +@item cutabove Cut frequencies above detection threshold. -@item boost -Boost frequencies bellow detection threshold. +@item boostbelow +Boost frequencies below detection threshold. +@item boostabove +Boost frequencies above detection threshold. +@end table +Default mode is @samp{cutbelow}. + +@item dftype +Set the type of detection filter, can be one of the following: + +@table @samp +@item bandpass +@item lowpass +@item highpass +@item peak @end table -Default mode is @samp{cut}. +Default type is @samp{bandpass}. @item tftype Set the type of target filter, can be one of the following: @@ -939,6 +1138,38 @@ Set the type of target filter, can be one of the following: @item highshelf @end table Default type is @samp{bell}. + +@item auto +Automatically gather threshold from detection filter. By default +is @samp{disabled}. +This option is useful to detect threshold in certain time frame of +input audio stream, in such case option value is changed at runtime. + +Available values are: +@table @samp +@item disabled +Disable using automatically gathered threshold value. +@item off +Stop picking threshold value. +@item on +Start picking threshold value. +@item adaptive +Adaptively pick threshold value, by calculating sliding window entropy. +@end table + +@item precision +Set which precision to use when processing samples. + +@table @option +@item auto +Auto pick internal sample format depending on other filters. + +@item float +Always use single-floating point precision sample format. + +@item double +Always use double-floating point precision sample format. +@end table @end table @subsection Commands @@ -1277,9 +1508,25 @@ select logistic sigmoid select sine cardinal function @item isinc select inverted sine cardinal function +@item quat +select quartic +@item quatr +select quartic root +@item qsin2 +select squared quarter of sine wave +@item hsin2 +select squared half of sine wave @item nofade no fade applied @end table + +@item silence +Set the initial gain for fade-in or final gain for fade-out. +Default value is @code{0.0}. + +@item unity +Set the initial gain for fade-out or final gain for fade-in. +Default value is @code{1.0}. @end table @subsection Commands @@ -1532,6 +1779,7 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default is @code{hann}. @@ -1560,6 +1808,12 @@ Apply whisper effect: @example afftfilt="real='hypot(re,im)*cos((random(0)*2-1)*2*3.14)':imag='hypot(re,im)*sin((random(1)*2-1)*2*3.14)':win_size=128:overlap=0.8" @end example + +@item +Apply phase shift: +@example +afftfilt="real=re*cos(1)-im*sin(1):imag=re*sin(1)+im*cos(1)" +@end example @end itemize @anchor{afir} @@ -1593,27 +1847,24 @@ Set wet gain. This sets final output gain. Set Impulse Response filter length. Default is 1, which means whole IR is processed. @item gtype -Enable applying gain measured from power of IR. - -Set which approach to use for auto gain measurement. - -@table @option -@item none -Do not apply any gain. - -@item peak -select peak gain, very conservative approach. This is default value. +This option is deprecated, and does nothing. -@item dc -select DC gain, limited application. +@item irnorm +Set norm to be applied to IR coefficients before filtering. +Allowed range is from @var{-1} to @var{2}. +IR coefficients are normalized with calculated vector norm set by this option. +For negative values, no norm is calculated, and IR coefficients are not modified at all. +Default is @var{1}. -@item gn -select gain to noise approach, this is most popular one. -@end table +@item irlink +For multichannel IR if this option is set to @var{true}, all IR channels will be +normalized with maximal measured gain of all IR channels coefficients as set by @code{irnorm} option. +When disabled, all IR coefficients in each IR channel will be normalized independently. +Default is @var{true}. @item irgain Set gain to be applied to IR coefficients before filtering. -Allowed range is 0 to 1. This gain is applied after any gain applied with @var{gtype} option. +Allowed range is 0 to 1. This gain is applied after any gain applied with @var{irnorm} option. @item irfmt Set format of IR stream. Can be @code{mono} or @code{input}. @@ -1624,27 +1875,25 @@ Set max allowed Impulse Response filter duration in seconds. Default is 30 secon Allowed range is 0.1 to 60 seconds. @item response -Show IR frequency response, magnitude(magenta), phase(green) and group delay(yellow) in additional video stream. -By default it is disabled. +This option is deprecated, and does nothing. @item channel -Set for which IR channel to display frequency response. By default is first channel -displayed. This option is used only when @var{response} is enabled. +This option is deprecated, and does nothing. @item size -Set video stream size. This option is used only when @var{response} is enabled. +This option is deprecated, and does nothing. @item rate -Set video stream frame rate. This option is used only when @var{response} is enabled. +This option is deprecated, and does nothing. @item minp Set minimal partition size used for convolution. Default is @var{8192}. -Allowed range is from @var{1} to @var{32768}. +Allowed range is from @var{1} to @var{65536}. Lower values decreases latency at cost of higher CPU usage. @item maxp Set maximal partition size used for convolution. Default is @var{8192}. -Allowed range is from @var{8} to @var{32768}. +Allowed range is from @var{8} to @var{65536}. Lower values may increase CPU usage. @item nbirs @@ -1671,6 +1920,12 @@ Always use double-floating point precision sample format. @end table Default value is auto. + +@item irload +Set when to load IR stream. Can be @code{init} or @code{access}. +First one load and prepares all IRs on initialization, second one +once on first access of specific IR. +Default is @code{init}. @end table @subsection Examples @@ -1681,6 +1936,19 @@ Apply reverb to stream using mono IR file as second input, complete command usin @example ffmpeg -i input.wav -i middle_tunnel_1way_mono.wav -lavfi afir output.wav @end example + +@item +Apply true stereo processing given input stereo stream, and two stereo impulse responses for left and right channel, +the impulse response files are files with names l_ir.wav and r_ir.wav, and setting irnorm option value: +@example +"pan=4C|c0=FL|c1=FL|c2=FR|c3=FR[a];amovie=l_ir.wav[LIR];amovie=r_ir.wav[RIR];[LIR][RIR]amerge[ir];[a][ir]afir=irfmt=input:irnorm=1.2,pan=stereo|FL0 and <1 values will make less conservative gain adjustments, like when framelen option is set to smaller value, if framelen option value is compensated for non-zero overlap then gain adjustments will be smoother across time compared to zero overlap case. + +@item curve, v +Specify the peak mapping curve expression which is going to be used when calculating +gain applied to frames. The max output frame gain will still be limited by other +options mentioned previously for this filter. + +The expression can contain the following constants: + +@table @option +@item ch +current channel number + +@item sn +current sample number + +@item nb_channels +number of channels + +@item t +timestamp expressed in seconds + +@item sr +sample rate + +@item p +current frame peak value +@end table @end table @subsection Commands @@ -4637,7 +5067,7 @@ Set transform type of IIR filter. @end table @item precision, r -Set precison of filtering. +Set precision of filtering. @table @option @item auto Pick automatic sample format depending on surround filters. @@ -5148,7 +5578,7 @@ Set transform type of IIR filter. @end table @item precision, r -Set precison of filtering. +Set precision of filtering. @table @option @item auto Pick automatic sample format depending on surround filters. @@ -5508,7 +5938,7 @@ Set transform type of IIR filter. @end table @item precision, r -Set precison of filtering. +Set precision of filtering. @table @option @item auto Pick automatic sample format depending on surround filters. @@ -5736,6 +6166,16 @@ ReplayGain scanner filter. This filter takes an audio stream as an input and outputs it unchanged. At end of filtering it displays @code{track_gain} and @code{track_peak}. +The filter accepts the following exported read-only options: + +@table @option +@item track_gain +Exported track gain in dB at end of stream. + +@item track_peak +Exported track peak at end of stream. +@end table + @section resample Convert the audio sample format, sample rate and channel layout. It is @@ -6077,19 +6517,20 @@ trimming. Default is 0, which is equal to trimming all samples detected as silence. @item start_mode -Specify mode of detection of silence end in start of multi-channel audio. +Specify mode of detection of silence end at start of multi-channel audio. Can be @var{any} or @var{all}. Default is @var{any}. -With @var{any}, any sample that is detected as non-silence will cause -stopped trimming of silence. -With @var{all}, only if all channels are detected as non-silence will cause -stopped trimming of silence. +With @var{any}, any sample from any channel that is detected as non-silence +will trigger end of silence trimming at start of audio stream. +With @var{all}, only if every sample from every channel is detected as non-silence +will trigger end of silence trimming at start of audio stream, limited usage. @item stop_periods -Set the count for trimming silence from the end of audio. +Set the count for trimming silence from the end of audio. When specifying a +positive value, it trims audio after it finds specified silence period. To remove silence from the middle of a file, specify a @var{stop_periods} that is negative. This value is then treated as a positive value and is used to indicate the effect should restart processing as specified by -@var{start_periods}, making it suitable for removing periods of silence +@var{stop_periods}, making it suitable for removing periods of silence in the middle of the audio. Default value is @code{0}. @@ -6111,22 +6552,49 @@ trimming. Default is 0, which is equal to trimming all samples detected as silence. @item stop_mode -Specify mode of detection of silence start in end of multi-channel audio. -Can be @var{any} or @var{all}. Default is @var{any}. -With @var{any}, any sample that is detected as non-silence will cause -stopped trimming of silence. -With @var{all}, only if all channels are detected as non-silence will cause -stopped trimming of silence. +Specify mode of detection of silence start after start of multi-channel audio. +Can be @var{any} or @var{all}. Default is @var{all}. +With @var{any}, any sample from any channel that is detected as silence +will trigger start of silence trimming after start of audio stream, limited usage. +With @var{all}, only if every sample from every channel is detected as silence +will trigger start of silence trimming after start of audio stream. @item detection -Set how is silence detected. Can be @code{rms} or @code{peak}. Second is faster -and works better with digital silence which is exactly 0. +Set how is silence detected. +@table @option +@item avg +Mean of absolute values of samples in moving window. +@item rms +Root squared mean of absolute values of samples in moving window. +@item peak +Maximum of absolute values of samples in moving window. +@item median +Median of absolute values of samples in moving window. +@item ptp +Absolute of max peak to min peak difference of samples in moving window. +@item dev +Standard deviation of values of samples in moving window. +@end table Default value is @code{rms}. @item window Set duration in number of seconds used to calculate size of window in number -of samples for detecting silence. +of samples for detecting silence. Using @code{0} will effectively disable +any windowing and use only single sample per channel for silence detection. +In that case it may be needed to also set @option{start_silence} and/or +@option{stop_silence} to nonzero values with also @option{start_duration} and/or +@option{stop_duration} to nonzero values. Default value is @code{0.02}. Allowed range is from @code{0} to @code{10}. + +@item timestamp +Set processing mode of every audio frame output timestamp. +@table @option +@item write +Full timestamps rewrite, keep only the start time for the first output frame. +@item copy +Non-dropped frames are left with same timestamp as input audio frame. +@end table +Defaults value is @code{write}. @end table @subsection Examples @@ -6154,8 +6622,31 @@ silence is detected in all channels at same positions in stream: @example silenceremove=window=0:detection=peak:stop_mode=all:start_mode=all:stop_periods=-1:stop_threshold=0 @end example + +@item +Trim every 2nd encountered silence period from beginning to end where there is +more than 1 second of silence per silence period in audio: +@example +silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB +@end example + +@item +Similar as above, but keep maximum of 0.5 seconds of silence from each trimmed period: +@example +silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB:stop_silence=0.5 +@end example + +@item +Similar as above, but keep maximum of 1.5 seconds of silence from start of audio: +@example +silenceremove=stop_periods=-2:stop_duration=1:stop_threshold=-90dB:stop_silence=0.5:start_periods=1:start_duration=1:start_silence=1.5:stop_threshold=-90dB +@end example @end itemize +@subsection Commands + +This filter supports some above options as @ref{commands}. + @section sofalizer SOFAlizer uses head-related transfer functions (HRTFs) to create virtual @@ -6309,12 +6800,50 @@ option. When enabled any half-cycle of samples with their local peak value below Link channels when calculating gain applied to each filtered channel sample, by default is disabled. When disabled each filtered channel gain calculation is independent, otherwise when this option is enabled the minimum of all possible gains for each filtered channel is used. + +@item rms, m +Set the expansion target RMS value. This specifies the highest allowed RMS level for the normalized +audio input. Default value is 0.0, thus disabled. Allowed range is from 0.0 to 1.0. @end table @subsection Commands This filter supports the all above options as @ref{commands}. +@subsection Examples + +@itemize +@item +Weak and slow amplification: +@example +speechnorm=e=3:r=0.00001:l=1 +@end example + +@item +Moderate and slow amplification: +@example +speechnorm=e=6.25:r=0.00001:l=1 +@end example + +@item +Strong and fast amplification: +@example +speechnorm=e=12.5:r=0.0001:l=1 +@end example + +@item +Very strong and fast amplification: +@example +speechnorm=e=25:r=0.0001:l=1 +@end example + +@item +Extreme and fast amplification: +@example +speechnorm=e=50:r=0.0001:l=1 +@end example +@end itemize + @section stereotools This filter has some handy utilities to manage stereo signals, for converting @@ -6576,10 +7105,20 @@ In @var{add} mode, LFE channel is created from input audio and added to output. In @var{sub} mode, LFE channel is created from input audio and added to output but also all non-LFE output channels are subtracted with output LFE channel. +@item smooth +Set temporal smoothness strength, used to gradually change factors when transforming +stereo sound in time. Allowed range is from @var{0.0} to @var{1.0}. +Useful to improve output quality with @var{focus} option values greater than @var{0.0}. +Default is @var{0.0}. Only values inside this range and without edges are effective. + @item angle Set angle of stereo surround transform, Allowed range is from @var{0} to @var{360}. Default is @var{90}. +@item focus +Set focus of stereo surround transform, Allowed range is from @var{-1} to @var{1}. +Default is @var{0}. + @item fc_in Set front center input volume. By default, this is @var{1}. @@ -6682,6 +7221,7 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default is @code{hann}. @@ -6755,7 +7295,7 @@ Set transform type of IIR filter. @end table @item precision, r -Set precison of filtering. +Set precision of filtering. @table @option @item auto Pick automatic sample format depending on surround filters. @@ -6845,7 +7385,7 @@ Set transform type of IIR filter. @end table @item precision, r -Set precison of filtering. +Set precision of filtering. @table @option @item auto Pick automatic sample format depending on surround filters. @@ -7036,7 +7576,7 @@ number of samples consumed by the filter @item nb_samples number of samples in the current frame @item pos -original frame position in the file +original frame position in the file; deprecated, do not use @item pts frame PTS @item sample_rate @@ -7295,6 +7835,98 @@ aevalsrc="0.1*sin(2*PI*(360-2.5/2)*t) | 0.1*sin(2*PI*(360+2.5/2)*t)" @end itemize +@section afdelaysrc + +Generate a fractional delay FIR coefficients. + +The resulting stream can be used with @ref{afir} filter for filtering the audio signal. + +The filter accepts the following options: + +@table @option +@item delay, d +Set the fractional delay. Default is 0. + +@item sample_rate, r +Set the sample rate, default is 44100. + +@item nb_samples, n +Set the number of samples per each frame. Default is 1024. + +@item taps, t +Set the number of filter coefficients in output audio stream. +Default value is 0. + +@item channel_layout, c +Specifies the channel layout, and can be a string representing a channel layout. +The default value of @var{channel_layout} is "stereo". +@end table + +@section afireqsrc + +Generate a FIR equalizer coefficients. + +The resulting stream can be used with @ref{afir} filter for filtering the audio signal. + +The filter accepts the following options: + +@table @option +@item preset, p +Set equalizer preset. +Default preset is @code{flat}. + +Available presets are: +@table @samp +@item custom +@item flat +@item acoustic +@item bass +@item beats +@item classic +@item clear +@item deep bass +@item dubstep +@item electronic +@item hard-style +@item hip-hop +@item jazz +@item metal +@item movie +@item pop +@item r&b +@item rock +@item vocal booster +@end table + +@item gains, g +Set custom gains for each band. Only used if the preset option is set to @code{custom}. +Gains are separated by white spaces and each gain is set in dBFS. +Default is @code{0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0}. + +@item bands, b +Set the custom bands from where custon equalizer gains are set. +This must be in strictly increasing order. Only used if the preset option is set to @code{custom}. +Bands are separated by white spaces and each band represent frequency in Hz. +Default is @code{25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000 24000}. + +@item taps, t +Set number of filter coefficients in output audio stream. +Default value is @code{4096}. + +@item sample_rate, r +Set sample rate of output audio stream, default is @code{44100}. + +@item nb_samples, n +Set number of samples per each frame in output audio stream. Default is @code{1024}. + +@item interp, i +Set interpolation method for FIR equalizer coefficients. Can be @code{linear} or @code{cubic}. + +@item phase, h +Set phase type of FIR filter. Can be @code{linear} or @code{min}: minimum-phase. +Default is minimum-phase filter. +@end table + @section afirsrc Generate a FIR coefficients using frequency sampling method. @@ -7305,7 +7937,7 @@ The filter accepts the following options: @table @option @item taps, t -Set number of filter coefficents in output audio stream. +Set number of filter coefficients in output audio stream. Default value is 1025. @item frequency, f @@ -7478,6 +8110,9 @@ Specify a value used to seed the PRNG. @item nb_samples, n Set the number of samples per each output frame, default is 1024. + +@item density +Set the density (0.0 - 1.0) for the velvet noise generator, default is 0.05. @end table @subsection Examples @@ -7923,13 +8558,32 @@ The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. +@section backgroundkey + +Turns a static background into transparency. + +The filter accepts the following option: + +@table @option +@item threshold +Threshold for scene change detection. +@item similarity +Similarity percentage with the background. +@item blend +Set the blend amount for pixels that are not similar. +@end table + +@subsection Commands + +This filter supports the all above options as @ref{commands}. + @section bbox Compute the bounding box for the non-black pixels in the input frame -luminance plane. +luma plane. This filter computes the bounding box containing all the pixels with a -luminance value greater than the minimum allowed value. +luma value greater than the minimum allowed value. The parameters describing the bounding box are printed on the filter log. @@ -7937,7 +8591,7 @@ The filter accepts the following option: @table @option @item min_val -Set the minimal luminance value. Default is @code{16}. +Set the minimal luma value. Default is @code{16}. @end table @subsection Commands @@ -7965,6 +8619,45 @@ Set planes to filter. Default is first only. This filter supports the all above options as @ref{commands}. +@section bilateral_cuda +CUDA accelerated bilateral filter, an edge preserving filter. +This filter is mathematically accurate thanks to the use of GPU acceleration. +For best output quality, use one to one chroma subsampling, i.e. yuv444p format. + +The filter accepts the following options: +@table @option +@item sigmaS +Set sigma of gaussian function to calculate spatial weight, also called sigma space. +Allowed range is 0.1 to 512. Default is 0.1. + +@item sigmaR +Set sigma of gaussian function to calculate color range weight, also called sigma color. +Allowed range is 0.1 to 512. Default is 0.1. + +@item window_size +Set window size of the bilateral function to determine the number of neighbours to loop on. +If the number entered is even, one will be added automatically. +Allowed range is 1 to 255. Default is 1. +@end table +@subsection Examples + +@itemize +@item +Apply the bilateral filter on a video. + +@example +./ffmpeg -v verbose \ +-hwaccel cuda -hwaccel_output_format cuda -i input.mp4 \ +-init_hw_device cuda \ +-filter_complex \ +" \ +[0:v]scale_cuda=format=yuv444p[scaled_video]; +[scaled_video]bilateral_cuda=window_size=9:sigmaS=3.0:sigmaR=50.0" \ +-an -sn -c:v h264_nvenc -cq 20 out.mp4 +@end example + +@end itemize + @section bitplanenoise Show and measure bit plane noise. @@ -8021,14 +8714,14 @@ Default value is 0.98. @item pixel_black_th, pix_th Set the threshold for considering a pixel "black". -The threshold expresses the maximum pixel luminance value for which a +The threshold expresses the maximum pixel luma value for which a pixel is considered "black". The provided value is scaled according to the following equation: @example -@var{absolute_threshold} = @var{luminance_minimum_value} + @var{pixel_black_th} * @var{luminance_range_size} +@var{absolute_threshold} = @var{luma_minimum_value} + @var{pixel_black_th} * @var{luma_range_size} @end example -@var{luminance_range_size} and @var{luminance_minimum_value} depend on +@var{luma_range_size} and @var{luma_minimum_value} depend on the input video format, the range is [0-255] for YUV full-range formats and [16-235] for YUV non full-range formats. @@ -8496,6 +9189,7 @@ boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chrom @end example @end itemize +@anchor{bwdif} @section bwdif Deinterlace the input video ("bwdif" stands for "Bob Weaver @@ -8549,33 +9243,95 @@ Only deinterlace frames marked as interlaced. The default value is @code{all}. @end table -@section cas +@section bwdif_cuda -Apply Contrast Adaptive Sharpen filter to video stream. +Deinterlace the input video using the @ref{bwdif} algorithm, but implemented +in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec +and/or nvenc. -The filter accepts the following options: +It accepts the following parameters: @table @option -@item strength -Set the sharpening strength. Default value is 0. +@item mode +The interlacing mode to adopt. It accepts one of the following values: -@item planes -Set planes to filter. Default value is to filter all -planes except alpha plane. +@table @option +@item 0, send_frame +Output one frame for each frame. +@item 1, send_field +Output one frame for each field. @end table -@subsection Commands -This filter supports same @ref{commands} as options. - -@section chromahold -Remove all color information for all colors except for certain one. +The default value is @code{send_field}. -The filter accepts the following options: +@item parity +The picture field parity assumed for the input interlaced video. It accepts one +of the following values: @table @option -@item color -The color which will not be replaced with neutral chroma. - +@item 0, tff +Assume the top field is first. +@item 1, bff +Assume the bottom field is first. +@item -1, auto +Enable automatic detection of field parity. +@end table + +The default value is @code{auto}. +If the interlacing is unknown or the decoder does not export this information, +top field first will be assumed. + +@item deint +Specify which frames to deinterlace. Accepts one of the following +values: + +@table @option +@item 0, all +Deinterlace all frames. +@item 1, interlaced +Only deinterlace frames marked as interlaced. +@end table + +The default value is @code{all}. +@end table + +@section ccrepack + +Repack CEA-708 closed captioning side data + +This filter fixes various issues seen with commerical encoders +related to upstream malformed CEA-708 payloads, specifically +incorrect number of tuples (wrong cc_count for the target FPS), +and incorrect ordering of tuples (i.e. the CEA-608 tuples are not at +the first entries in the payload). + +@section cas + +Apply Contrast Adaptive Sharpen filter to video stream. + +The filter accepts the following options: + +@table @option +@item strength +Set the sharpening strength. Default value is 0. + +@item planes +Set planes to filter. Default value is to filter all +planes except alpha plane. +@end table + +@subsection Commands +This filter supports same @ref{commands} as options. + +@section chromahold +Remove all color information for all colors except for certain one. + +The filter accepts the following options: + +@table @option +@item color +The color which will not be replaced with neutral chroma. + @item similarity Similarity percentage with the above color. 0.01 matches only the exact key color, while 1.0 matches everything. @@ -9012,7 +9768,7 @@ Set the red highlight spot. Allowed range is from -1.0 to 1.0. Default value is 0. @item bh -Set the red highlight spot. Allowed range is from -1.0 to 1.0. +Set the blue highlight spot. Allowed range is from -1.0 to 1.0. Default value is 0. @item saturation @@ -9671,6 +10427,38 @@ For example to convert the input to SMPTE-240M, use the command: colorspace=smpte240m @end example +@section colorspace_cuda + +CUDA accelerated implementation of the colorspace filter. + +It is by no means feature complete compared to the software colorspace filter, +and at the current time only supports color range conversion between jpeg/full +and mpeg/limited range. + +The filter accepts the following options: + +@table @option +@item range +Specify output color range. + +The accepted values are: +@table @samp +@item tv +TV (restricted) range + +@item mpeg +MPEG (restricted) range + +@item pc +PC (full) range + +@item jpeg +JPEG (full) range + +@end table + +@end table + @section colortemperature Adjust color temperature in video to simulate variations in ambient color temperature. @@ -9713,7 +10501,7 @@ and from 1 to 49 odd number of signed integers in @var{row} mode. @item 2rdiv @item 3rdiv Set multiplier for calculated value for each plane. -If unset or 0, it will be sum of all matrix elements. +If unset or 0, it will be 1/sum of all matrix elements. @item 0bias @item 1bias @@ -9902,6 +10690,30 @@ ffmpeg -f lavfi -i nullsrc=s=100x100,coreimage=filter=CIQRCodeGenerator@@inputMe @end example @end itemize +@section corr + +Obtain the correlation between two input videos. + +This filter takes two input videos. + +Both input videos must have the same resolution and pixel format for +this filter to work correctly. Also it assumes that both inputs +have the same number of frames, which are compared one by one. + +The obtained per component, average, min and max correlation is printed through +the logging system. + +The filter stores the calculated correlation of each frame in frame metadata. + +This filter also supports the @ref{framesync} options. + +In the below example the input file @file{main.mpg} being processed is compared +with the reference file @file{ref.mpg}. + +@example +ffmpeg -i main.mpg -i ref.mpg -lavfi corr -f null - +@end example + @section cover_rect Cover a rectangular object @@ -10017,7 +10829,8 @@ pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. The number of the input frame, starting from 0. @item pos -the position in the file of the input frame, NAN if unknown +the position in the file of the input frame, NAN if unknown; deprecated, +do not use @item t The timestamp expressed in seconds. It's NAN if the input timestamp is unknown. @@ -10106,7 +10919,7 @@ crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((i @item Apply erratic camera effect depending on timestamp: @example -crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)" +crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13) @end example @item @@ -10138,12 +10951,23 @@ Auto-detect the crop size. It calculates the necessary cropping parameters and prints the recommended parameters via the logging system. The detected dimensions -correspond to the non-black area of the input video. +correspond to the non-black or video area of the input video according to @var{mode}. It accepts the following parameters: @table @option +@item mode +Depending on @var{mode} crop detection is based on either the mere black value of surrounding pixels or a combination of motion vectors and edge pixels. + +@table @samp +@item black +Detect black pixels surrounding the playing video. For fine control use option @var{limit}. + +@item mvedges +Detect the playing video by the motion vectors inside the video and scanning for edge pixels typically forming the border of a playing video. +@end table + @item limit Set higher black value threshold, which can be optionally specified from nothing (0) to everything (255 for 8-bit based formats). An intensity @@ -10169,6 +10993,56 @@ detect the current optimal crop area. Default value is 0. This can be useful when channel logos distort the video area. 0 indicates 'never reset', and returns the largest area encountered during playback. + +@item mv_threshold +Set motion in pixel units as threshold for motion detection. It defaults to 8. + +@item low +@item high +Set low and high threshold values used by the Canny thresholding +algorithm. + +The high threshold selects the "strong" edge pixels, which are then +connected through 8-connectivity with the "weak" edge pixels selected +by the low threshold. + +@var{low} and @var{high} threshold values must be chosen in the range +[0,1], and @var{low} should be lesser or equal to @var{high}. + +Default value for @var{low} is @code{5/255}, and default value for @var{high} +is @code{15/255}. +@end table + +@subsection Examples + +@itemize +@item +Find video area surrounded by black borders: +@example +ffmpeg -i file.mp4 -vf cropdetect,metadata=mode=print -f null - +@end example + +@item +Find an embedded video area, generate motion vectors beforehand: +@example +ffmpeg -i file.mp4 -vf mestimate,cropdetect=mode=mvedges,metadata=mode=print -f null - +@end example + +@item +Find an embedded video area, use motion vectors from decoder: +@example +ffmpeg -flags2 +export_mvs -i file.mp4 -vf cropdetect=mode=mvedges,metadata=mode=print -f null - +@end example +@end itemize + +@subsection Commands + +This filter supports the following commands: + +@table @option +@item limit +The command accepts the same syntax of the corresponding option. +If the specified expression is not valid, it is kept at its current value. @end table @anchor{cue} @@ -10218,11 +11092,15 @@ By default, a component curve is defined by the two points @var{(0;0)} and "adjusted" to its own value, which means no change to the image. The filter allows you to redefine these two points and add some more. A new -curve (using a natural cubic spline interpolation) will be define to pass -smoothly through all these new coordinates. The new defined points needs to be -strictly increasing over the x-axis, and their @var{x} and @var{y} values must -be in the @var{[0;1]} interval. If the computed curves happened to go outside -the vector spaces, the values will be clipped accordingly. +curve will be defined to pass smoothly through all these new coordinates. The +new defined points need to be strictly increasing over the x-axis, and their +@var{x} and @var{y} values must be in the @var{[0;1]} interval. The curve is +formed by using a natural or monotonic cubic spline interpolation, depending +on the @var{interp} option (default: @code{natural}). The @code{natural} +spline produces a smoother curve in general while the monotonic (@code{pchip}) +spline guarantees the transitions between the specified points to be +monotonic. If the computed curves happened to go outside the vector spaces, +the values will be clipped accordingly. The filter accepts the following options: @@ -10266,6 +11144,15 @@ options. In this case, the unset component(s) will fallback on this Specify a Photoshop curves file (@code{.acv}) to import the settings from. @item plot Save Gnuplot script of the curves in specified file. +@item interp +Specify the kind of interpolation. Available algorithms are: +@table @samp +@item natural +Natural cubic spline using a piece-wise cubic polynomial that is twice continuously differentiable. +@item pchip +Monotonic cubic spline using a piecewise cubic Hermite interpolating polynomial (PCHIP). +@end table + @end table To avoid some filtergraph syntax conflicts, each key points list need to be @@ -10613,6 +11500,11 @@ stream is the clean source from where the kept frames are chosen. Default is @item chroma Set whether or not chroma is considered in the metric calculations. Default is @code{1}. + +@item mixed +Set whether or not the input only partially contains content to be decimated. +Default is @code{false}. +If enabled video output stream will be in variable frame rate. @end table @section deconvolve @@ -10815,9 +11707,6 @@ See @url{http://openaccess.thecvf.com/content_ECCV_2018/papers/Xia_Li_Recurrent_ Training as well as model generation scripts are provided in the repository at @url{https://github.com/XueweiMeng/derain_filter.git}. -Native model files (.model) can be generated from TensorFlow model -files (.pb) by using tools/python/convert.py - The filter accepts the following options: @table @option @@ -10838,21 +11727,16 @@ Specify which DNN backend to use for model loading and execution. This option ac the following values: @table @samp -@item native -Native implementation of DNN loading and execution. - @item tensorflow TensorFlow backend. To enable this backend you need to install the TensorFlow for C library (see @url{https://www.tensorflow.org/install/lang_c}) and configure FFmpeg with @code{--enable-libtensorflow} @end table -Default value is @samp{native}. @item model Set path to model file specifying network architecture and its parameters. -Note that different backends use different file formats. TensorFlow and native -backend can load files for only its format. +Note that different backends use different file formats. TensorFlow can load files for only its format. @end table To get full functionality (such as async execution), please use the @ref{dnn_processing} filter. @@ -11176,9 +12060,6 @@ Specify which DNN backend to use for model loading and execution. This option ac the following values: @table @samp -@item native -Native implementation of DNN loading and execution. - @item tensorflow TensorFlow backend. To enable this backend you need to install the TensorFlow for C library (see @@ -11192,16 +12073,21 @@ need to build and install the OpenVINO for C library (see @code{--enable-libopenvino} (--extra-cflags=-I... --extra-ldflags=-L... might be needed if the header files and libraries are not installed into system path) -@end table +@item torch +Libtorch backend. To enable this backend you need to build and install Libtroch +for C++ library. Please download cxx11 ABI version (see +@url{https://pytorch.org/get-started/locally}) +and configure FFmpeg with @code{--enable-libtorch +--extra-cflags=-I/libtorch_root/libtorch/include +--extra-cflags=-I/libtorch_root/libtorch/include/torch/csrc/api/include +--extra-ldflags=-L/libtorch_root/libtorch/lib/} -Default value is @samp{native}. +@end table @item model Set path to model file specifying network architecture and its parameters. -Note that different backends use different file formats. TensorFlow, OpenVINO and native -backend can load files for only its format. - -Native model file (.model) can be generated from TensorFlow model file (.pb) by using tools/python/convert.py +Note that different backends use different file formats. TensorFlow, OpenVINO +and Libtorch backend can load files for only its format. @item input Set the input name of the dnn network. @@ -11227,12 +12113,6 @@ Remove rain in rgb24 frame with can.pb (see @ref{derain} filter): ./ffmpeg -i rain.jpg -vf format=rgb24,dnn_processing=dnn_backend=tensorflow:model=can.pb:input=x:output=y derain.jpg @end example -@item -Halve the pixel value of the frame with format gray32f: -@example -ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png -@end example - @item Handle the Y channel with srcnn.pb (see @ref{sr} filter) for frame with yuv420p (planar YUV formats supported): @example @@ -11572,7 +12452,7 @@ Draw a text string or text from a specified file on top of a video, using the libfreetype library. To enable compilation of this filter, you need to configure FFmpeg with -@code{--enable-libfreetype}. +@code{--enable-libfreetype} and @code{--enable-libharfbuzz}. To enable default font fallback and the @var{font} option you need to configure FFmpeg with @code{--enable-libfontconfig}. To enable the @var{text_shaping} option, you need to configure FFmpeg with @@ -11591,7 +12471,17 @@ The default value of @var{box} is 0. @item boxborderw Set the width of the border to be drawn around the box using @var{boxcolor}. -The default value of @var{boxborderw} is 0. +The value must be specified using one of the following formats: +@itemize @bullet +@item @code{boxborderw=10} set the width of all the borders to 10 +@item @code{boxborderw=10|20} set the width of the top and bottom borders to 10 + and the width of the left and right borders to 20 +@item @code{boxborderw=10|20|30} set the width of the top border to 10, the width + of the bottom border to 30 and the width of the left and right borders to 20 +@item @code{boxborderw=10|20|30|40} set the borders width to 10 (top), 20 (right), + 30 (bottom), 40 (left) +@end itemize +The default value of @var{boxborderw} is "0". @item boxcolor The color to be used for drawing box around text. For the syntax of this @@ -11600,8 +12490,23 @@ option, check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual, The default value of @var{boxcolor} is "white". @item line_spacing -Set the line spacing in pixels of the border to be drawn around the box using @var{box}. -The default value of @var{line_spacing} is 0. +Set the line spacing in pixels. The default value of @var{line_spacing} is 0. + +@item text_align +Set the vertical and horizontal alignment of the text with respect to the box boundaries. +The value is combination of flags, one for the vertical alignment (T=top, +M=middle, B=bottom) and one for the horizontal alignment (L=left, C=center, R=right). +Please note that tab characters are only supported with the left horizontal alignment. + +@item y_align +Specify what the @var{y} value is referred to. Possible values are: +@itemize @bullet +@item @code{text} the top of the highest glyph of the first text line is placed at @var{y} +@item @code{baseline} the baseline of the first text line is placed at @var{y} +@item @code{font} the baseline of the first text line is placed at @var{y} plus the + ascent (in pixels) defined in the font metrics +@end itemize +The default value of @var{y_align} is "text" for backward compatibility. @item borderw Set the width of the border to be drawn around the text using @var{bordercolor}. @@ -11615,13 +12520,12 @@ The default value of @var{bordercolor} is "black". @item expansion Select how the @var{text} is expanded. Can be either @code{none}, -@code{strftime} (deprecated) or -@code{normal} (default). See the @ref{drawtext_expansion, Text expansion} section -below for details. +@code{strftime} (deprecated) or @code{normal} (default). See the +@ref{drawtext_expansion, Text expansion} section below for details. @item basetime Set a start time for the count. Value is in microseconds. Only applied -in the deprecated strftime expansion mode. To emulate in normal expansion +in the deprecated @code{strftime} expansion mode. To emulate in normal expansion mode use the @code{pts} function, supplying the start time (in seconds) as the second argument. @@ -11698,6 +12602,14 @@ ffmpeg-utils manual,ffmpeg-utils}. The default value of @var{shadowcolor} is "black". +@item boxw +Set the width of the box to be drawn around text. +The default value of @var{boxw} is computed automatically to match the text width + +@item boxh +Set the height of the box to be drawn around text. +The default value of @var{boxh} is computed automatically to match the text height + @item shadowx @item shadowy The x and y offsets for the text shadow position with respect to the @@ -11809,6 +12721,18 @@ contained in the rendered text, it is equivalent to @var{ascent} - maximum glyph width, that is the maximum width for all the glyphs contained in the rendered text +@item font_a +the ascent size defined in the font metrics + +@item font_d +the descent size defined in the font metrics + +@item top_a +the maximum ascender of the glyphs of the first text line + +@item bottom_d +the maximum descender of the glyphs of the last text line + @item n the number of input frame, starting from 0 @@ -11842,7 +12766,7 @@ The current packet's position in the input file or stream (in bytes, from the start of the input). A value of -1 indicates this info is not available. -@item pkt_duration +@item duration The current packet's duration, in seconds. @item pkt_size @@ -11852,10 +12776,12 @@ The current packet's size (in bytes). @anchor{drawtext_expansion} @subsection Text expansion -If @option{expansion} is set to @code{strftime}, -the filter recognizes strftime() sequences in the provided text and -expands them accordingly. Check the documentation of strftime(). This -feature is deprecated. +If @option{expansion} is set to @code{strftime}, the filter recognizes +sequences accepted by the @code{strftime} C function in the provided +text and expands them accordingly. Check the documentation of +@code{strftime}. This feature is deprecated in favor of @code{normal} +expansion with the @code{gmtime} or @code{localtime} expansion +functions. If @option{expansion} is set to @code{none}, the text is printed verbatim. @@ -11870,11 +12796,11 @@ braces is a function name, possibly followed by arguments separated by ':'. If the arguments contain special characters or delimiters (':' or '@}'), they should be escaped. -Note that they probably must also be escaped as the value for the -@option{text} option in the filter argument string and as the filter -argument in the filtergraph description, and possibly also for the shell, -that makes up to four levels of escaping; using a text file avoids these -problems. +Note that they probably must also be escaped as the value for the @option{text} +option in the filter argument string and as the filter argument in the +filtergraph description, and possibly also for the shell, that makes up to four +levels of escaping; using a text file with the @option{textfile} option avoids +these problems. The following functions are available: @@ -11902,13 +12828,13 @@ It can be used to add padding with zeros from the left. @item gmtime The time at which the filter is running, expressed in UTC. -It can accept an argument: a strftime() format string. +It can accept an argument: a @code{strftime} C function format string. The format string is extended to support the variable @var{%[1-6]N} which prints fractions of the second with optionally specified number of digits. @item localtime The time at which the filter is running, expressed in the local time zone. -It can accept an argument: a strftime() format string. +It can accept an argument: a @code{strftime} C function format string. The format string is extended to support the variable @var{%[1-6]N} which prints fractions of the second with optionally specified number of digits. @@ -11950,8 +12876,8 @@ If the format is set to @code{hms}, a third argument @code{24HH} may be supplied to present the hour part of the formatted timestamp in 24h format (00-23). -If the format is set to @code{localtime} or @code{gmtime}, -a third argument may be supplied: a strftime() format string. +If the format is set to @code{localtime} or @code{gmtime}, a third +argument may be supplied: a @code{strftime} C function format string. By default, @var{YYYY-MM-DD HH:MM:SS} format will be used. @end table @@ -11973,11 +12899,34 @@ Full filter invocation with sendcmd would look like this: @example sendcmd=c='56.0 drawtext reinit fontsize=56\:fontcolor=green\:text=Hello\\ World' @end example -@end table If the entire argument can't be parsed or applied as valid values then the filter will continue with its existing parameters. +@end table + +The following options are also supported as @ref{commands}: + +@itemize @bullet +@item x +@item y +@item alpha +@item fontsize +@item fontcolor +@item boxcolor +@item bordercolor +@item shadowcolor +@item box +@item boxw +@item boxh +@item boxborderw +@item line_spacing +@item text_align +@item shadowx +@item shadowy +@item borderw +@end itemize + @subsection Examples @itemize @@ -12045,7 +12994,7 @@ drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:enable=lt(mod(t\, @item Use fontconfig to set the font. Note that the colons need to be escaped. @example -drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg' +drawtext='fontfile=Linux Libertine O-40\\:style=Semibold:text=FFmpeg' @end example @item @@ -12055,7 +13004,8 @@ drawtext="text='Test Text': fontsize=h/30: x=(w-text_w)/2: y=(h-text_h*2)" @end example @item -Print the date of a real-time encoding (see strftime(3)): +Print the date of a real-time encoding (see documentation for the +@code{strftime} C function): @example drawtext='fontfile=FreeSans.ttf:text=%@{localtime\:%a %b %d %Y@}' @end example @@ -12099,6 +13049,9 @@ For more information about fontconfig, check: For more information about libfribidi, check: @url{http://fribidi.org/}. +For more information about libharfbuzz, check: +@url{https://github.com/harfbuzz/harfbuzz}. + @section edgedetect Detect and draw edges. The filter uses the Canny Edge Detection algorithm. @@ -12282,7 +13235,7 @@ frame count of the input frame starting from 0 @item pos byte position of the corresponding packet in the input file, NAN if -unspecified +unspecified; deprecated, do not use @item r frame rate of the input video, NAN if the input frame rate is unknown @@ -12419,16 +13372,16 @@ Specify the search radius for best edge matching. Default value is 2. Allowed range is from 0 to 15. @item ecost -Specify the edge cost for edge matching. Default value is 1.0. -Allowed range is from 0 to 9. +Specify the edge cost for edge matching. Default value is 2. +Allowed range is from 0 to 50. @item mcost -Specify the middle cost for edge matching. Default value is 0.5. -Allowed range is from 0 to 1. +Specify the middle cost for edge matching. Default value is 1. +Allowed range is from 0 to 50. @item dcost -Specify the distance cost for edge matching. Default value is 0.5. -Allowed range is from 0 to 1. +Specify the distance cost for edge matching. Default value is 1. +Allowed range is from 0 to 50. @item interp Specify the interpolation used. Default is 4-point interpolation. It accepts one @@ -12631,6 +13584,12 @@ Draw black box on top left part of video frame of size 100x100 with drawbox filt @example [in][blurin]feedback=x=0:y=0:w=100:h=100[out][blurout];[blurout]drawbox=x=0:y=0:w=100:h=100:t=100[blurin] @end example + +@item +Pixelize rectangular part of video frame of size 100x100 with pixelize filter. +@example +[in][blurin]feedback=x=320:y=240:w=100:h=100[out][blurout];[blurout]pixelize[blurin] +@end example @end itemize @section fftdnoiz @@ -13177,15 +14136,6 @@ For example: ffmpeg -i in.vob -vf "fieldorder=bff" out.dv @end example -@section fifo, afifo - -Buffer input images and send them when they are requested. - -It is mainly useful when auto-inserted by the libavfilter -framework. - -It does not take parameters. - @section fillborders Fill borders of the input video, without changing video stream dimensions. @@ -13249,7 +14199,35 @@ value. @section find_rect -Find a rectangular object +Find a rectangular object in the input video. + +The object to search for must be specified as a gray8 image specified with the +@option{object} option. + +For each possible match, a score is computed. If the score reaches the specified +threshold, the object is considered found. + +If the input video contains multiple instances of the object, the filter will +find only one of them. + +When an object is found, the following metadata entries are set in the matching +frame: +@table @option +@item lavfi.rect.w +width of object + +@item lavfi.rect.h +height of object + +@item lavfi.rect.x +x position of object + +@item lavfi.rect.y +y position of object + +@item lavfi.rect.score +match score of the found object +@end table It accepts the following options: @@ -13258,7 +14236,12 @@ It accepts the following options: Filepath of the object image, needs to be in gray8. @item threshold -Detection threshold, default is 0.5. +Detection threshold, expressed as a decimal number in the range 0-1. + +A threshold value of 0.01 means only exact matches, a threshold of 0.99 means +almost everything matches. + +Default value is 0.5. @item mipmaps Number of mipmaps, default is 3. @@ -13278,6 +14261,16 @@ Cover a rectangular object by the supplied image of a given video using @command @example ffmpeg -i file.ts -vf find_rect=newref.pgm,cover_rect=cover.jpg:mode=cover new.mkv @end example + +@item +Find the position of an object in each frame using @command{ffprobe} and write +it to a log file: +@example +ffprobe -f lavfi movie=test.mp4,find_rect=object=object.pgm:threshold=0.3 \ + -show_entries frame=pkt_pts_time:frame_tags=lavfi.rect.x,lavfi.rect.y \ + -of csv -o find_rect.csv +@end example + @end itemize @section floodfill @@ -13331,6 +14324,14 @@ It accepts the following parameters: A '|'-separated list of pixel format names, such as "pix_fmts=yuv420p|monow|rgb24". +@item color_spaces +A '|'-separated list of color space names, such as +"color_spaces=bt709|bt470bg|bt2020nc". + +@item color_ranges +A '|'-separated list of color range names, such as +"color_spaces=tv|pc". + @end table @subsection Examples @@ -13689,6 +14690,47 @@ option may cause flicker since the B-Frames have often larger QP. Default is @end table +@anchor{fsync} +@section fsync + +Synchronize video frames with an external mapping from a file. + +For each input PTS given in the map file it either drops or creates as many +frames as necessary to recreate the sequence of output frames given in the +map file. + +This filter is useful to recreate the output frames of a framerate conversion +by the @ref{fps} filter, recorded into a map file using the ffmpeg option +@code{-stats_mux_pre}, and do further processing to the corresponding frames +e.g. quality comparison. + +Each line of the map file must contain three items per input frame, the input +PTS (decimal), the output PTS (decimal) and the +output TIMEBASE (decimal/decimal), seperated by a space. +This file format corresponds to the output +of @code{-stats_mux_pre_fmt="@{ptsi@} @{pts@} @{tb@}"}. + +The filter assumes the map file is sorted by increasing input PTS. + +The filter accepts the following options: +@table @option + +@item file, f +The filename of the map file to be used. +@end table + +Example: +@example +# Convert a video to 25 fps and record a MAP_FILE file with the default format of this filter +ffmpeg -i INPUT -vf fps=fps=25 -stats_mux_pre MAP_FILE -stats_mux_pre_fmt "@{ptsi@} @{pts@} @{tb@}" OUTPUT + +# Sort MAP_FILE by increasing input PTS +sort -n MAP_FILE + +# Use INPUT, OUTPUT and the MAP_FILE from above to compare the corresponding frames in INPUT and OUTPUT via SSIM +ffmpeg -i INPUT -i OUTPUT -filter_complex '[0:v]fsync=file=MAP_FILE[ref];[1:v][ref]ssim' -f null - +@end example + @section gblur Apply Gaussian blur filter. @@ -13725,7 +14767,7 @@ The filter accepts the following options: @table @option @item lum_expr, lum -Set the luminance expression. +Set the luma expression. @item cb_expr, cb Set the chrominance blue expression. @item cr_expr, cr @@ -13750,7 +14792,7 @@ colorspace. If one of the chrominance expression is not defined, it falls back on the other one. If no alpha expression is specified it will evaluate to opaque value. If none of chrominance expressions are specified, they will evaluate -to the luminance expression. +to the luma expression. The expressions can use the following variables and functions: @@ -13781,7 +14823,7 @@ Return the value of the pixel at location (@var{x},@var{y}) of the current plane. @item lum(x, y) -Return the value of the pixel at location (@var{x},@var{y}) of the luminance +Return the value of the pixel at location (@var{x},@var{y}) of the luma plane. @item cb(x, y) @@ -13932,14 +14974,33 @@ Set video output size. Default is @var{hd720}. Set video opacity. Default is @var{0.9}. Allowed range is from @var{0} to @var{1}. @item mode, m -Set output mode, can be @var{fulll} or @var{compact}. -In @var{compact} mode only filters with some queued frames have displayed stats. +Set output mode flags. + +Available values for flags are: +@table @samp +@item full +No any filtering. Default. +@item compact +Show only filters with queued frames. +@item nozero +Show only filters with non-zero stats. +@item noeof +Show only filters with non-eof stat. +@item nodisabled +Show only filters that are enabled in timeline. +@end table @item flags, f Set flags which enable which stats are shown in video. Available values for flags are: @table @samp +@item none +All flags turned off. + +@item all +All flags turned on. + @item queue Display number of queued frames in each link. @@ -13987,6 +15048,9 @@ Display number of samples given out from filter. @item sample_count_delta Display delta number of samples between above two values. + +@item disabled +Show the timeline filter status. @end table @item rate, r @@ -14481,6 +15545,7 @@ Set the scaling dimension: @code{2} for @code{hq2x}, @code{3} for Default is @code{3}. @end table +@anchor{hstack} @section hstack Stack input videos horizontally. @@ -14811,6 +15876,8 @@ the logging system. The filter stores the calculated identity scores of each frame in frame metadata. +This filter also supports the @ref{framesync} options. + In the below example the input file @file{main.mpg} being processed is compared with the reference file @file{ref.mpg}. @@ -14902,6 +15969,15 @@ further computations. This allows inserting the idet filter as a low computation method to clean up the interlaced flag @end table +@subsection Examples + +Inspect the field order of the first 360 frames in a video, in verbose detail: +@example +ffmpeg -i INPUT -filter:v idet,metadata=mode=print -frames:v 360 -an -f null - +@end example +The idet filter will add analysis metadata to each frame, which will then be +discarded. At the end, the filter will also print a final report with statistics. + @section il Deinterleave or interleave fields. @@ -15299,8 +16375,7 @@ ffmpeg -i input.mov -vf lensfun=make=Canon:model="Canon EOS 100D":lens_model="Ca @section libplacebo Flexible GPU-accelerated processing filter based on libplacebo -(@url{https://code.videolan.org/videolan/libplacebo}). Note that this filter -currently only accepts Vulkan input frames. +(@url{https://code.videolan.org/videolan/libplacebo}). @subsection Options @@ -15312,12 +16387,45 @@ to preserve the source colorimetry and size as best as it can, but it will apply any embedded film grain, dolby vision metadata or anamorphic SAR present in source frames. @table @option +@item inputs +Set the number of inputs. This can be used, alongside the @code{idx} variable, +to allow placing/blending multiple inputs inside the output frame. This +effectively enables functionality similar to @ref{hstack}, @ref{overlay}, etc. + @item w @item h -Set the output video dimension expression. Default value is the input dimension. +Set the output video dimension expression. Default values are @code{iw} and +@code{ih}. Allows for the same expressions as the @ref{scale} filter. +@item crop_x +@item crop_y +Set the input crop x/y expressions, default values are @code{(iw-cw)/2} and +@code{(ih-ch)/2}. + +@item crop_w +@item crop_h +Set the input crop width/height expressions, default values are @code{iw} and +@code{ih}. + +@item pos_x +@item pos_y +Set the output placement x/y expressions, default values are @code{(ow-pw)/2} +and @code{(oh-ph)/2}. + +@item pos_w +@item pos_h +Set the output placement width/height expressions, default values are @code{ow} +and @code{oh}. + +@item fps +Set the output frame rate. This can be rational, e.g. @code{60000/1001}. If +set to the special string @code{none} (the default), input timestamps will +instead be passed through to the output unmodified. Otherwise, the input video +frames will be interpolated as necessary to rescale the video to the specified +target framerate, in a manner as determined by the @option{frame_mixer} option. + @item format Set the output format override. If unset (the default), frames will be output in the same format as the respective input frames. Otherwise, format conversion @@ -15328,9 +16436,10 @@ will be performed. Work the same as the identical @ref{scale} filter options. @item normalize_sar -If enabled (the default), output frames will always have a pixel aspect ratio -of 1:1. If disabled, any aspect ratio mismatches, including those from e.g. -anamorphic video sources, are forwarded to the output pixel aspect ratio. +If enabled, output frames will always have a pixel aspect ratio of 1:1. This +will introduce additional padding/cropping as necessary. If disabled (the +default), any aspect ratio mismatches, including those from e.g. anamorphic +video sources, are forwarded to the output pixel aspect ratio. @item pad_crop_ratio Specifies a ratio (between @code{0.0} and @code{1.0}) between padding and @@ -15340,6 +16449,28 @@ content with black borders, while a value of @code{1.0} always crops off parts of the content. Intermediate values are possible, leading to a mix of the two approaches. +@item fillcolor +Set the color used to fill the output area not covered by the output image, for +example as a result of @option{normalize_sar}. For the general syntax of this +option, check the @ref{color syntax,,"Color" section in the ffmpeg-utils +manual,ffmpeg-utils}. Defaults to @code{black}. + +@item corner_rounding +Render frames with rounded corners. The value, given as a float ranging from +@code{0.0} to @code{1.0}, indicates the relative degree of rounding, from fully +square to fully circular. In other words, it gives the radius divided by half +the smaller side length. Defaults to @code{0.0}. + +@item extra_opts +Pass extra libplacebo internal configuration options. These can be specified +as a list of @var{key}=@var{value} pairs separated by ':'. The following example +shows how to configure a custom filter kernel ("EWA LanczosSharp") and use it +to double the input image resolution: + +@example +-vf "libplacebo=w=iw*2:h=ih*2:extra_opts='upscaler=custom\:upscaler_preset=ewa_lanczos\:upscaler_blur=0.9812505644269356'" +@end example + @item colorspace @item color_primaries @item color_trc @@ -15361,6 +16492,32 @@ BT.2020+PQ, overriding the usual input frame metadata. These will also be picked as the values of @code{auto} for the respective frame output options. @end table +In addition to the expression constants documented for the @ref{scale} filter, +the @option{crop_w}, @option{crop_h}, @option{crop_x}, @option{crop_y}, +@option{pos_w}, @option{pos_h}, @option{pos_x} and @option{pos_y} options can +also contain the following constants: + +@table @option +@item in_idx, idx +The (0-based) numeric index of the currently active input stream. +@item crop_w, cw +@item crop_h, ch +The computed values of @option{crop_w} and @option{crop_h}. + +@item pos_w, pw +@item pos_h, ph +The computed values of @option{pos_w} and @option{pos_h}. + +@item in_t, t +The input frame timestamp, in seconds. NAN if input timestamp is unknown. + +@item out_t, ot +The input frame timestamp, in seconds. NAN if input timestamp is unknown. + +@item n +The input frame number, starting with 0. +@end table + @subsubsection Scaling The options in this section control how libplacebo performs upscaling and (if necessary) downscaling. Note that libplacebo will always internally operate on @@ -15413,6 +16570,31 @@ Cubic BC spline with parameters recommended by Mitchell and Netravali. Very little ringing. @end table +@item frame_mixer +Controls the kernel used for mixing frames temporally. The default value is +@code{none}, which disables frame mixing. For a full list of possible values, +pass @code{help} to this option. The most important values are: +@table @samp +@item none +Disables frame mixing, giving a result equivalent to "nearest neighbour" +semantics. + +@item oversample +Oversamples the input video to create a "Smooth Motion"-type effect: if an +output frame would exactly fall on the transition between two video frames, it +is blended according to the relative overlap. This is the recommended option +whenever preserving the original subjective appearance is desired. + +@item mitchell_clamp +Larger filter kernel that smoothly interpolates multiple frames in a manner +designed to eliminate ringing and other artefacts as much as possible. This is +the recommended option wherever maximum visual smoothness is desired. + +@item linear +Linear blend/fade between frames. Especially useful for constructing e.g. +slideshows. +@end table + @item lut_entries Configures the size of scaler LUTs, ranging from @code{1} to @code{256}. The default of @code{0} will pick libplacebo's internal default, typically @@ -15526,10 +16708,11 @@ logarithmic scale between @code{0.0} and @code{100.0}. Default to @code{5.5} and @code{10.0}, respectively. Setting either to a negative value disables this functionality. -@item overshoot -Peak smoothing overshoot margin, between @code{0.0} and @code{1.0}. Provides a -safety margin to prevent clipping as a result of peak smoothing. Defaults to -@code{0.05}, corresponding to a margin of 5%. +@item percentile +Which percentile of the frame brightness histogram to use as the source peak +for tone-mapping. Defaults to @code{99.995}, a fairly conservative value. +Setting this to @code{100.0} disables frame histogram measurement and instead +uses the true peak brightness for tone-mapping. @end table @subsubsection Tone mapping @@ -15538,37 +16721,36 @@ gamut-mapping when dealing with mismatches between wide-gamut or HDR content. In general, libplacebo relies on accurate source tagging and mastering display gamut information to produce the best results. @table @option -@item intent -Rendering intent to use when adapting between different primary color gamuts -(after tone-mapping). -@table @samp -@item perceptual -Perceptual gamut mapping. Currently equivalent to relative colorimetric. -@item relative -Relative colorimetric. This is the default. -@item absolute -Absolute colorimetric. -@item saturation -Saturation mapping. Forcibly stretches the source gamut to the target gamut. -@end table - @item gamut_mode How to handle out-of-gamut colors that can occur as a result of colorimetric gamut mapping. @table @samp @item clip -Do nothing, simply clip out-of-range colors to the RGB volume. This is the -default. -@item warn -Highlight out-of-gamut pixels (by coloring them pink). -@item darken -Linearly reduces content brightness to preserves saturated details, followed by -clipping the remaining out-of-gamut colors. As the name implies, this makes -everything darker, but provides a good balance between preserving details and -colors. +Do nothing, simply clip out-of-range colors to the RGB volume. Low quality but +extremely fast. +@item perceptual +Perceptually soft-clip colors to the gamut volume. This is the default. +@item relative +Relative colorimetric hard-clip. Similar to @code{perceptual} but without +the soft knee. +@item saturation +Saturation mapping, maps primaries directly to primaries in RGB space. +Not recommended except for artificial computer graphics for which a bright, +saturated display is desired. +@item absolute +Absolute colorimetric hard-clip. Performs no adjustment of the white point. @item desaturate Hard-desaturates out-of-gamut colors towards white, while preserving the -luminance. Has a tendency to shift colors. +luminance. Has a tendency to distort the visual appearance of bright objects. +@item darken +Linearly reduces content brightness to preserves saturated details, followed by +clipping the remaining out-of-gamut colors. +@item warn +Highlight out-of-gamut pixels (by inverting/marking them). +@item linear +Linearly reduces chromaticity of the entire image to make it fit within the +target color volume. Be careful when using this on BT.2020 sources without +proper mastering metadata, as doing so will lead to excessive desaturation. @end table @item tonemapping @@ -15580,6 +16762,18 @@ Automatic selection based on internal heuristics. This is the default. Performs no tone-mapping, just clips out-of-range colors. Retains perfect color accuracy for in-range colors but completely destroys out-of-range information. Does not perform any black point adaptation. Not configurable. +@item st2094-40 +EETF from SMPTE ST 2094-40 Annex B, which applies the Bezier curves from HDR10+ +dynamic metadata based on Bezier curves to perform tone-mapping. The OOTF used +is adjusted based on the ratio between the targeted and actual display peak +luminances. +@item st2094-10 +EETF from SMPTE ST 2094-10 Annex B.2, which takes into account the input signal +average luminance in addition to the maximum/minimum. The configurable contrast +parameter influences the slope of the linear output segment, defaulting to +@code{1.0} for no increase/decrease in contrast. Note that this does not +currently include the subjective gain/offset/gamma controls defined in Annex +B.3. @item bt.2390 EETF from the ITU-R Report BT.2390, a hermite spline roll-off with linear segment. The knee point offset is configurable. Note that this parameter @@ -15635,42 +16829,27 @@ For tunable tone mapping functions, this parameter can be used to fine-tune the curve behavior. Refer to the documentation of @code{tonemapping}. The default value of @code{0.0} is replaced by the curve's preferred default setting. -@item tonemapping_mode -This option determines how the tone mapping function specified by -@code{tonemapping} is applied to the colors in a scene. Possible values are: -@table @samp -@item auto -Automatic selection based on internal heuristics. This is the default. -@item rgb -Apply the function per-channel in the RGB colorspace. -Per-channel tone-mapping in RGB. Guarantees no clipping and heavily desaturates -the output, but distorts the colors quite significantly. Very similar to the -"Hollywood" look and feel. -@item max -Tone-mapping is performed on the brightest component found in the signal. Good -at preserving details in highlights, but has a tendency to crush blacks. -@item hybrid -Tone-map per-channel for highlights and linearly (luma-based) for -midtones/shadows, based on a fixed gamma @code{2.4} coefficient curve. -@item luma -Tone-map linearly on the luma component (CIE Y), and adjust (desaturate) the -chromaticities to compensate using a simple constant factor. This is -essentially the mode used in ITU-R BT.2446 method A. -@end table - @item inverse_tonemapping If enabled, this filter will also attempt stretching SDR signals to fill HDR output color volumes. Disabled by default. -@item tonemapping_crosstalk -Extra tone-mapping crosstalk factor, between @code{0.0} and @code{0.3}. This -can help reduce issues tone-mapping certain bright spectral colors. Defaults to -@code{0.04}. - @item tonemapping_lut_size Size of the tone-mapping LUT, between @code{2} and @code{1024}. Defaults to @code{256}. Note that this figure is squared when combined with @code{peak_detect}. + +@item contrast_recovery +Contrast recovery strength. If set to a value above @code{0.0}, the source +image will be divided into high-frequency and low-frequency components, and a +portion of the high-frequency image is added back onto the tone-mapped output. +May cause excessive ringing artifacts for some HDR sources, but can improve the +subjective sharpness and detail left over in the image after tone-mapping. +Defaults to @code{0.30}. + +@item contrast_smoothness +Contrast recovery lowpass kernel size. Defaults to @code{3.5}. Increasing or +decreasing this will affect the visual appearance substantially. Has no effect +when @code{contrast_recovery} is disabled. @end table @subsubsection Dithering @@ -15736,9 +16915,6 @@ Disable linear light scaling. @item disable_builtin Disable built-in GPU sampling (forces LUT). -@item force_icc_lut -Force the use of a full ICC 3DLUT for gamut mapping. - @item disable_fbos Forcibly disable FBOs, resulting in loss of almost all functionality, but offering the maximum possible speed. @@ -15749,16 +16925,6 @@ This filter supports almost all of the above options as @ref{commands}. @subsection Examples @itemize -@item -Complete example for how to initialize the Vulkan device, upload frames to the -GPU, perform filter conversion to yuv420p, and download frames back to the CPU -for output. Note that in specific cases you can get around the need to perform -format conversion by specifying the correct @code{format} filter option -corresponding to the input frames. -@example -ffmpeg -i $INPUT -init_hw_device vulkan -vf hwupload,libplacebo=format=yuv420p,hwdownload,format=yuv420p $OUTPUT -@end example - @item Tone-map input to standard gamut BT.709 output: @example @@ -15771,6 +16937,12 @@ Rescale input to fit into standard 1080p, with high quality scaling: libplacebo=w=1920:h=1080:force_original_aspect_ratio=decrease:normalize_sar=true:upscaler=ewa_lanczos:downscaler=ewa_lanczos @end example +@item +Interpolate low FPS / VFR input to smoothed constant 60 fps output: +@example +libplacebo=fps=60:frame_mixer=mitchell_clamp +@end example + @item Convert input to standard sRGB JPEG: @example @@ -15798,11 +16970,18 @@ since otherwise the VRAM roundtrip will more than offset any expected speedup. @example ffmpeg -export_side_data +film_grain ... -vf libplacebo=apply_filmgrain=true @end example + +@item +Interop with VAAPI hwdec to avoid round-tripping through RAM: +@example +ffmpeg -init_hw_device vulkan -hwaccel vaapi -hwaccel_output_format vaapi ... -vf libplacebo +@end example @end itemize +@anchor{libvmaf} @section libvmaf -Calulate the VMAF (Video Multi-Method Assessment Fusion) score for a +Calculate the VMAF (Video Multi-Method Assessment Fusion) score for a reference/distorted pair of input videos. The first input is the distorted video, and the second input is the reference video. @@ -15820,36 +16999,19 @@ The filter has following options: A `|` delimited list of vmaf models. Each model can be configured with a number of parameters. Default value: @code{"version=vmaf_v0.6.1"} -@item model_path -Deprecated, use model='path=...'. - -@item enable_transform -Deprecated, use model='enable_transform=true'. - -@item phone_model -Deprecated, use model='enable_transform=true'. - -@item enable_conf_interval -Deprecated, use model='enable_conf_interval=true'. - @item feature A `|` delimited list of features. Each feature can be configured with a number of parameters. -@item psnr -Deprecated, use feature='name=psnr'. - -@item ssim -Deprecated, use feature='name=ssim'. - -@item ms_ssim -Deprecated, use feature='name=ms_ssim'. - @item log_path Set the file path to be used to store log files. @item log_fmt Set the format of the log file (xml, json, csv, or sub). +@item pool +Set the pool method to be used for computing vmaf. +Options are @code{min}, @code{harmonic_mean} or @code{mean} (default). + @item n_threads Set number of threads to be used when initializing libvmaf. Default value: @code{0}, no threads. @@ -15879,7 +17041,7 @@ ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='model=version=vmaf_v0.6 @end example @item -Example with multiple addtional features: +Example with multiple additional features: @example ffmpeg -i distorted.mpg -i reference.mpg -lavfi libvmaf='feature=name=psnr|name=ciede' -f null - @end example @@ -15891,6 +17053,32 @@ ffmpeg -i distorted.mpg -i reference.mkv -lavfi "[0:v]settb=AVTB,setpts=PTS-STAR @end example @end itemize +@section libvmaf_cuda + +This is the CUDA variant of the @ref{libvmaf} filter. It only accepts CUDA frames. + +It requires Netflix's vmaf library (libvmaf) as a pre-requisite. +After installing the library it can be enabled using: +@code{./configure --enable-nonfree --enable-ffnvcodec --enable-libvmaf}. + +@subsection Examples +@itemize + +@item +Basic usage showing CUVID hardware decoding and CUDA scaling with @ref{scale_cuda}: +@example +ffmpeg \ + -hwaccel cuda -hwaccel_output_format cuda -codec:v av1_cuvid -i dis.obu \ + -hwaccel cuda -hwaccel_output_format cuda -codec:v av1_cuvid -i ref.obu \ + -filter_complex " + [0:v]scale_cuda=format=yuv420p[dis]; \ + [1:v]scale_cuda=format=yuv420p[ref]; \ + [dis][ref]libvmaf_cuda=log_fmt=json:log_path=output.json + " \ + -f null - +@end example +@end itemize + @section limitdiff Apply limited difference filter using second and optionally third video stream. @@ -15959,6 +17147,10 @@ Set maximal size in number of frames. Default is 0. @item start Set first frame of loop. Default is 0. + +@item time +Set the time of loop start in seconds. +Only used if option named @var{start} is set to @code{-1}. @end table @subsection Examples @@ -16098,6 +17290,9 @@ The command accepts the same syntax of the corresponding option. If the specified expression is not valid, it is kept at its current value. +@anchor{lutrgb} +@anchor{lutyuv} +@anchor{lut} @section lut, lutrgb, lutyuv Compute a look-up table for binding each pixel component input value @@ -16127,7 +17322,7 @@ set blue component expression alpha component expression @item y -set Y/luminance component expression +set Y/luma component expression @item u set U/Cb component expression @item v @@ -16202,7 +17397,7 @@ lutyuv="y=negval:u=negval:v=negval" @end example @item -Negate luminance: +Negate luma: @example lutyuv=y=negval @end example @@ -16232,7 +17427,7 @@ format=rgba,lutrgb=a="maxval-minval/2" @end example @item -Correct luminance gamma by a factor of 0.5: +Correct luma gamma by a factor of 0.5: @example lutyuv=y=gammaval(0.5) @end example @@ -16437,6 +17632,10 @@ video streams. Set which planes will be processed as bitmap, unprocessed planes will be copied from second stream. By default value 0xf, all planes will be processed. + +@item mode +Set mode of filter operation. Can be @code{abs} or @code{diff}. +Default is @code{abs}. @end table @subsection Commands @@ -16481,8 +17680,6 @@ Apply motion-compensation deinterlacing. It needs one field per frame as input and must thus be used together with yadif=1/3 or equivalent. -This filter is only available in ffmpeg version 4.4 or earlier. - This filter accepts the following options: @table @option @item mode @@ -16752,7 +17949,7 @@ Macroblock size. Default @code{16}. Motion estimation search parameter. Default @code{32}. @item vsbmc -Enable variable-size block motion compensation. Motion estimation is applied with smaller block sizes at object boundaries in order to make the them less blur. Default is @code{0} (disabled). +Enable variable-size block motion compensation. Motion estimation is applied with smaller block sizes at object boundaries in order to make them less blurry. Default is @code{0} (disabled). @end table @end table @@ -16905,6 +18102,13 @@ number of previous sequentially dropped frames. Default value is 0. +@item keep +Set the maximum number of consecutive similar frames to ignore before to start dropping them. +If the value is 0, the frame is dropped disregarding the +number of previous sequentially similar frames. + +Default value is 0. + @item hi @item lo @item frac @@ -16938,6 +18142,8 @@ the logging system. The filter stores the calculated MSAD of each frame in frame metadata. +This filter also supports the @ref{framesync} options. + In the below example the input file @file{main.mpg} being processed is compared with the reference file @file{ref.mpg}. @@ -17578,25 +18784,28 @@ Set the format for the output video. It accepts the following values: @table @samp @item yuv420 -force YUV420 output +force YUV 4:2:0 8-bit planar output @item yuv420p10 -force YUV420p10 output +force YUV 4:2:0 10-bit planar output @item yuv422 -force YUV422 output +force YUV 4:2:2 8-bit planar output @item yuv422p10 -force YUV422p10 output +force YUV 4:2:2 10-bit planar output @item yuv444 -force YUV444 output +force YUV 4:4:4 8-bit planar output + +@item yuv444p10 +force YUV 4:4:4 10-bit planar output @item rgb -force packed RGB output +force RGB 8-bit packed output @item gbrp -force planar RGB output +force RGB 8-bit planar output @item auto automatically pick format @@ -17639,7 +18848,8 @@ format. For example for the pixel format "yuv422p" @var{hsub} is 2 and the number of input frame, starting from 0 @item pos -the position in the file of the input frame, NAN if unknown +the position in the file of the input frame, NAN if unknown; deprecated, +do not use @item t The timestamp, expressed in seconds. It's NAN if the input timestamp is unknown. @@ -17648,7 +18858,7 @@ The timestamp, expressed in seconds. It's NAN if the input timestamp is unknown. This filter also supports the @ref{framesync} options. -Note that the @var{n}, @var{pos}, @var{t} variables are available only +Note that the @var{n}, @var{t} variables are available only when evaluation is done @emph{per frame}, and will evaluate to NAN when @option{eval} is set to @samp{init}. @@ -17803,6 +19013,7 @@ The ordinal index of the main input frame, starting from 0. @item pos The byte offset position in the file of the main input frame, NAN if unknown. +Deprecated, do not use. @item t The timestamp of the main input frame, expressed in seconds, NAN if unknown. @@ -18066,9 +19277,6 @@ Compute new histogram for each frame. @end table Default value is @var{full}. -@item use_alpha -Create a palette of colors with alpha components. -Setting this, will automatically disable 'reserve_transparent'. @end table The filter also exports the frame metadata @code{lavfi.color_quant_ratio} @@ -18111,6 +19319,14 @@ Floyd and Steingberg dithering (error diffusion) Frankie Sierra dithering v2 (error diffusion) @item sierra2_4a Frankie Sierra dithering v2 "Lite" (error diffusion) +@item sierra3 +Frankie Sierra dithering v3 (error diffusion) +@item burkes +Burkes dithering (error diffusion) +@item atkinson +Atkinson dithering by Bill Atkinson at Apple Computer (error diffusion) +@item none +Disable dithering. @end table Default is @var{sierra2_4a}. @@ -18147,11 +19363,6 @@ will be treated as completely opaque, and values below this threshold will be treated as completely transparent. The option must be an integer value in the range [0,255]. Default is @var{128}. - -@item use_alpha -Apply the palette by taking alpha values into account. Only useful with -palettes that are containing multiple colors with alpha components. -Setting this will automatically disable 'alpha_treshold'. @end table @subsection Examples @@ -18428,10 +19639,10 @@ Honor the quality commands for this subfilter. Do chrominance filtering, too (default). @item y/nochrom -Do luminance filtering only (no chrominance). +Do luma filtering only (no chrominance). @item n/noluma -Do chrominance filtering only (no luminance). +Do chrominance filtering only (no luma). @end table These options can be appended after the subfilter name, separated by a '|'. @@ -18503,7 +19714,7 @@ larger -> stronger filtering @item al/autolevels[:f/fullyrange], automatic brightness / contrast correction @table @option @item f/fullyrange -Stretch luminance to @code{0-255}. +Stretch luma to @code{0-255}. @end table @item lb/linblenddeint @@ -18571,7 +19782,7 @@ pp=default/tmpnoise|1|2|3 @end example @item -Apply deblocking on luminance only, and switch vertical deblocking on or off +Apply deblocking on luma only, and switch vertical deblocking on or off automatically depending on available CPU time: @example pp=hb|y/vb|a @@ -18683,6 +19894,13 @@ Available LUTs: @item nominal @item preferred @item total +@item spectral +@item cool +@item heat +@item fiery +@item blues +@item green +@item helix @end table @item opacity @@ -18726,6 +19944,7 @@ pseudocolor="'if(between(val,ymax,amax),lerp(ymin,ymax,(val-ymax)/(amax-ymax)),- @end example @end itemize +@anchor{psnr} @section psnr Obtain the average, maximum and minimum PSNR (Peak Signal to Noise @@ -18932,140 +20151,464 @@ qp=2+2*sin(PI*qp) @end example @end itemize -@section random +@section qrencode +Generate a QR code using the libqrencode library (see +@url{https://fukuchi.org/works/qrencode/}), and overlay it on top of the current +frame. -Flush video frames from internal cache of frames into a random order. -No frame is discarded. -Inspired by @ref{frei0r} nervous filter. +To enable the compilation of this filter, you need to configure FFmpeg with +@code{--enable-libqrencode}. -@table @option -@item frames -Set size in number of frames of internal cache, in range from @code{2} to -@code{512}. Default is @code{30}. +The QR code is generated from the provided text or text pattern. The +corresponding QR code is scaled and overlayed into the video output according to +the specified options. -@item seed -Set seed for random number generator, must be an integer included between -@code{0} and @code{UINT32_MAX}. If not specified, or if explicitly set to -less than @code{0}, the filter will try to use a good random seed on a -best effort basis. -@end table +In case no text is specified, no QR code is overlaied. -@section readeia608 +This filter accepts the following options: -Read closed captioning (EIA-608) information from the top lines of a video frame. +@table @option -This filter adds frame metadata for @code{lavfi.readeia608.X.cc} and -@code{lavfi.readeia608.X.line}, where @code{X} is the number of the identified line -with EIA-608 data (starting from 0). A description of each metadata value follows: +@item qrcode_width, q +@item padded_qrcode_width, Q +Specify an expression for the width of the rendered QR code, with and without +padding. The @var{qrcode_width} expression can reference the value set by the +@var{padded_qrcode_width} expression, and vice versa. +By default @var{padded_qrcode_width} is set to @var{qrcode_width}, meaning that +there is no padding. -@table @option -@item lavfi.readeia608.X.cc -The two bytes stored as EIA-608 data (printed in hexadecimal). +These expressions are evaluated for each new frame. -@item lavfi.readeia608.X.line -The number of the line on which the EIA-608 data was identified and read. -@end table +See the @ref{qrencode_expressions,,qrencode Expressions} section for details. -This filter accepts the following options: +@item x +@item y +Specify an expression for positioning the padded QR code top-left corner. The +@var{x} expression can reference the value set by the @var{y} expression, and +vice. -@table @option -@item scan_min -Set the line to start scanning for EIA-608 data. Default is @code{0}. +By default @var{x} and @var{y} are set set to @var{0}, meaning that the QR code +is placed in the top left corner of the input. -@item scan_max -Set the line to end scanning for EIA-608 data. Default is @code{29}. +These expressions are evaluated for each new frame. -@item spw -Set the ratio of width reserved for sync code detection. -Default is @code{0.27}. Allowed range is @code{[0.1 - 0.7]}. +See the @ref{qrencode_expressions,,qrencode Expressions} section for details. -@item chp -Enable checking the parity bit. In the event of a parity error, the filter will output -@code{0x00} for that character. Default is false. +@item case_sensitive, cs +Instruct libqrencode to use case sensitive encoding. This is enabled by +default. This can be disabled to reduce the QR encoding size. -@item lp -Lowpass lines prior to further processing. Default is enabled. -@end table +@item level, l +Specify the QR encoding error correction level. With an higher correction level, +the encoding size will increase but the code will be more robust to corruption. +Lower level is @var{L}. -@subsection Commands +It accepts the following values: +@table @samp +@item L +@item M +@item Q +@item H +@end table -This filter supports the all above options as @ref{commands}. +@item expansion +Select how the input text is expanded. Can be either @code{none}, or +@code{normal} (default). See the @ref{qrencode_text_expansion,,qrencode Text expansion} +section below for details. -@subsection Examples +@item text +@item textfile +Define the text to be rendered. In case neither is specified, no QR is encoded +(just an empty colored frame). -@itemize -@item -Output a csv with presentation time and the first two lines of identified EIA-608 captioning data. -@example -ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv -@end example -@end itemize +In case expansion is enabled, the text is treated as a text template, using the +qrencode expansion mechanism. See the @ref{qrencode_text_expansion,,qrencode +Text expansion} section below for details. -@section readvitc +@item background_color, bc +@item foreground_color, fc +Set the QR code and background color. The default value of +@var{foreground_color} is "black", the default value of @var{background_color} +is "white". -Read vertical interval timecode (VITC) information from the top lines of a -video frame. +For the syntax of the color options, check the @ref{color syntax,,"Color" +section in the ffmpeg-utils manual,ffmpeg-utils}. +@end table -The filter adds frame metadata key @code{lavfi.readvitc.tc_str} with the -timecode value, if a valid timecode has been detected. Further metadata key -@code{lavfi.readvitc.found} is set to 0/1 depending on whether -timecode data has been found or not. +@anchor{qrencode_expressions} +@subsection qrencode Expressions -This filter accepts the following options: +The expressions set by the options contain the following constants and functions. @table @option -@item scan_max -Set the maximum number of lines to scan for VITC data. If the value is set to -@code{-1} the full video frame is scanned. Default is @code{45}. +@item dar +input display aspect ratio, it is the same as (@var{w} / @var{h}) * @var{sar} -@item thr_b -Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0], -default value is @code{0.2}. The value must be equal or less than @code{thr_w}. +@item duration +the current frame's duration, in seconds -@item thr_w -Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0], -default value is @code{0.6}. The value must be equal or greater than @code{thr_b}. -@end table +@item hsub +@item vsub +horizontal and vertical chroma subsample values. For example for the +pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. -@subsection Examples +@item main_h, H +the input height -@itemize -@item -Detect and draw VITC data onto the video frame; if no valid VITC is detected, -draw @code{--:--:--:--} as a placeholder: -@example -ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%@{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--@}:x=(w-tw)/2:y=400-ascent' -@end example -@end itemize +@item main_w, W +the input width -@section remap +@item n +the number of input frame, starting from 0 -Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream. +@item pict_type +a number representing the picture type -Destination pixel at position (X, Y) will be picked from source (x, y) position -where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero -value for pixel will be used for destination pixel. +@item qr_w, w +the width of the encoded QR code -Xmap and Ymap input video streams must be of same dimensions. Output video stream -will have Xmap/Ymap video stream dimensions. -Xmap and Ymap input video streams are 16bit depth, single channel. +@item rendered_qr_w, q +@item rendered_padded_qr_w, Q +the width of the rendered QR code, without and without padding. -@table @option -@item format -Specify pixel format of output from this filter. Can be @code{color} or @code{gray}. -Default is @code{color}. +These parameters allow the @var{q} and @var{Q} expressions to refer to each +other, so you can for example specify @code{q=3/4*Q}. -@item fill -Specify the color of the unmapped pixels. For the syntax of this option, -check the @ref{color syntax,,"Color" section in the ffmpeg-utils -manual,ffmpeg-utils}. Default color is @code{black}. -@end table +@item rand(min, max) +return a random number included between @var{min} and @var{max} -@section removegrain +@item sar +the input sample aspect ratio -The removegrain filter is a spatial denoiser for progressive video. +@item t +timestamp expressed in seconds, NAN if the input timestamp is unknown -@table @option +@item x +@item y +the x and y offset coordinates where the text is drawn. + +These parameters allow the @var{x} and @var{y} expressions to refer to each +other, so you can for example specify @code{y=x/dar}. +@end table + +@anchor{qrencode_text_expansion} +@subsection qrencode Text expansion + +If @option{expansion} is set to @code{none}, the text is printed verbatim. + +If @option{expansion} is set to @code{normal} (which is the default), +the following expansion mechanism is used. + +The backslash character @samp{\}, followed by any character, always expands to +the second character. + +Sequences of the form @code{%@{...@}} are expanded. The text between the +braces is a function name, possibly followed by arguments separated by ':'. +If the arguments contain special characters or delimiters (':' or '@}'), +they should be escaped. + +Note that they probably must also be escaped as the value for the @option{text} +option in the filter argument string and as the filter argument in the +filtergraph description, and possibly also for the shell, that makes up to four +levels of escaping; using a text file with the @option{textfile} option avoids +these problems. + +The following functions are available: + +@table @command +@item n, frame_num +return the frame number + +@item pts +Return the presentation timestamp of the current frame. + +It can take up to two arguments. + +The first argument is the format of the timestamp; it defaults to @code{flt} for +seconds as a decimal number with microsecond accuracy; @code{hms} stands for a +formatted @var{[-]HH:MM:SS.mmm} timestamp with millisecond accuracy. +@code{gmtime} stands for the timestamp of the frame formatted as UTC time; +@code{localtime} stands for the timestamp of the frame formatted as local time +zone time. If the format is set to @code{hms24hh}, the time is formatted in 24h +format (00-23). + +The second argument is an offset added to the timestamp. + +If the format is set to @code{localtime} or @code{gmtime}, a third argument may +be supplied: a @code{strftime} C function format string. By default, +@var{YYYY-MM-DD HH:MM:SS} format will be used. + +@item expr, e +Evaluate the expression's value and output as a double. + +It must take one argument specifying the expression to be evaluated, accepting +the constants and functions defined in @ref{qrencode_expressions}. + +@item expr_formatted, ef +Evaluate the expression's value and output as a formatted string. + +The first argument is the expression to be evaluated, just as for the @var{expr} function. +The second argument specifies the output format. Allowed values are @samp{x}, +@samp{X}, @samp{d} and @samp{u}. They are treated exactly as in the +@code{printf} function. +The third parameter is optional and sets the number of positions taken by the output. +It can be used to add padding with zeros from the left. + +@item gmtime +The time at which the filter is running, expressed in UTC. +It can accept an argument: a @code{strftime} C function format string. +The format string is extended to support the variable @var{%[1-6]N} +which prints fractions of the second with optionally specified number of digits. + +@item localtime +The time at which the filter is running, expressed in the local time zone. +It can accept an argument: a @code{strftime} C function format string. +The format string is extended to support the variable @var{%[1-6]N} +which prints fractions of the second with optionally specified number of digits. + +@item metadata +Frame metadata. Takes one or two arguments. + +The first argument is mandatory and specifies the metadata key. + +The second argument is optional and specifies a default value, used when the +metadata key is not found or empty. + +Available metadata can be identified by inspecting entries starting with TAG +included within each frame section printed by running @code{ffprobe +-show_frames}. + +String metadata generated in filters leading to the qrencode filter are also +available. + +@item rand(min, max) +return a random number included between @var{min} and @var{max} +@end table + +@subsection Examples + +@itemize +@item +Generate a QR code encoding the specified text with the default size, overalaid +in the top left corner of the input video, with the default size: +@example +qrencode=text=www.ffmpeg.org +@end example + +@item +Same as below, but select blue on pink colors: +@example +qrencode=text=www.ffmpeg.org:bc=pink@@0.5:fc=blue +@end example + +@item +Place the QR code in the bottom right corner of the input video: +@example +qrencode=text=www.ffmpeg.org:x=W-Q:y=H-Q +@end example + +@item +Generate a QR code with width of 200 pixels and padding, making the padded width +4/3 of the QR code width: +@example +qrencode=text=www.ffmpeg.org:q=200:Q=4/3*q +@end example + +@item +Generate a QR code with padded width of 200 pixels and padding, making the QR +code width 3/4 of the padded width: +@example +qrencode=text=www.ffmpeg.org:Q=200:q=3/4*Q +@end example + +@item +Make the QR code a fraction of the input video width: +@example +qrencode=text=www.ffmpeg.org:q=W/5 +@end example + +@item +Generate a QR code encoding the frame number: +@example +qrencode=text=%@{n@} +@end example + +@item +Generate a QR code encoding the GMT timestamp: +@example +qrencode=text=%@{gmtime@} +@end example + +@item +Generate a QR code encoding the timestamp expressed as a float: +@example +qrencode=text=%@{pts@} +@end example + +@end itemize + +@section quirc + +Identify and decode a QR code using the libquirc library (see +@url{https://github.com/dlbeer/quirc/}), and print the identified QR codes +positions and payload as metadata. + +To enable the compilation of this filter, you need to configure FFmpeg with +@code{--enable-libquirc}. + +For each found QR code in the input video, some metadata entries are added with +the prefix @var{lavfi.quirc.N}, where @var{N} is the index, starting from 0, +associated to the QR code. + +A description of each metadata value follows: + +@table @option +@item lavfi.quirc.count +the number of found QR codes, it is not set in case none was found + +@item lavfi.quirc.N.corner.M.x +@item lavfi.quirc.N.coreer.M.y +the x/y positions of the four corners of the square containing the QR code, +where @var{M} is the index of the corner starting from 0 + +@item lavfi.quirc.N.payload +the payload of the QR code +@end table + +@section random + +Flush video frames from internal cache of frames into a random order. +No frame is discarded. +Inspired by @ref{frei0r} nervous filter. + +@table @option +@item frames +Set size in number of frames of internal cache, in range from @code{2} to +@code{512}. Default is @code{30}. + +@item seed +Set seed for random number generator, must be an integer included between +@code{0} and @code{UINT32_MAX}. If not specified, or if explicitly set to +less than @code{0}, the filter will try to use a good random seed on a +best effort basis. +@end table + +@section readeia608 + +Read closed captioning (EIA-608) information from the top lines of a video frame. + +This filter adds frame metadata for @code{lavfi.readeia608.X.cc} and +@code{lavfi.readeia608.X.line}, where @code{X} is the number of the identified line +with EIA-608 data (starting from 0). A description of each metadata value follows: + +@table @option +@item lavfi.readeia608.X.cc +The two bytes stored as EIA-608 data (printed in hexadecimal). + +@item lavfi.readeia608.X.line +The number of the line on which the EIA-608 data was identified and read. +@end table + +This filter accepts the following options: + +@table @option +@item scan_min +Set the line to start scanning for EIA-608 data. Default is @code{0}. + +@item scan_max +Set the line to end scanning for EIA-608 data. Default is @code{29}. + +@item spw +Set the ratio of width reserved for sync code detection. +Default is @code{0.27}. Allowed range is @code{[0.1 - 0.7]}. + +@item chp +Enable checking the parity bit. In the event of a parity error, the filter will output +@code{0x00} for that character. Default is false. + +@item lp +Lowpass lines prior to further processing. Default is enabled. +@end table + +@subsection Commands + +This filter supports the all above options as @ref{commands}. + +@subsection Examples + +@itemize +@item +Output a csv with presentation time and the first two lines of identified EIA-608 captioning data. +@example +ffprobe -f lavfi -i movie=captioned_video.mov,readeia608 -show_entries frame=pts_time:frame_tags=lavfi.readeia608.0.cc,lavfi.readeia608.1.cc -of csv +@end example +@end itemize + +@section readvitc + +Read vertical interval timecode (VITC) information from the top lines of a +video frame. + +The filter adds frame metadata key @code{lavfi.readvitc.tc_str} with the +timecode value, if a valid timecode has been detected. Further metadata key +@code{lavfi.readvitc.found} is set to 0/1 depending on whether +timecode data has been found or not. + +This filter accepts the following options: + +@table @option +@item scan_max +Set the maximum number of lines to scan for VITC data. If the value is set to +@code{-1} the full video frame is scanned. Default is @code{45}. + +@item thr_b +Set the luma threshold for black. Accepts float numbers in the range [0.0,1.0], +default value is @code{0.2}. The value must be equal or less than @code{thr_w}. + +@item thr_w +Set the luma threshold for white. Accepts float numbers in the range [0.0,1.0], +default value is @code{0.6}. The value must be equal or greater than @code{thr_b}. +@end table + +@subsection Examples + +@itemize +@item +Detect and draw VITC data onto the video frame; if no valid VITC is detected, +draw @code{--:--:--:--} as a placeholder: +@example +ffmpeg -i input.avi -filter:v 'readvitc,drawtext=fontfile=FreeMono.ttf:text=%@{metadata\\:lavfi.readvitc.tc_str\\:--\\\\\\:--\\\\\\:--\\\\\\:--@}:x=(w-tw)/2:y=400-ascent' +@end example +@end itemize + +@section remap + +Remap pixels using 2nd: Xmap and 3rd: Ymap input video stream. + +Destination pixel at position (X, Y) will be picked from source (x, y) position +where x = Xmap(X, Y) and y = Ymap(X, Y). If mapping values are out of range, zero +value for pixel will be used for destination pixel. + +Xmap and Ymap input video streams must be of same dimensions. Output video stream +will have Xmap/Ymap video stream dimensions. +Xmap and Ymap input video streams are 16bit depth, single channel. + +@table @option +@item format +Specify pixel format of output from this filter. Can be @code{color} or @code{gray}. +Default is @code{color}. + +@item fill +Specify the color of the unmapped pixels. For the syntax of this option, +check the @ref{color syntax,,"Color" section in the ffmpeg-utils +manual,ffmpeg-utils}. Default color is @code{black}. +@end table + +@section removegrain + +The removegrain filter is a spatial denoiser for progressive video. + +@table @option @item m0 Set mode for the first plane. @@ -19450,8 +20993,8 @@ the next filter, the scale filter will convert the input to the requested format. @subsection Options -The filter accepts the following options, or any of the options -supported by the libswscale scaler. +The filter accepts the following options, any of the options supported +by the libswscale scaler, as well as any of the @ref{framesync} options. See @ref{scaler_options,,the ffmpeg-scaler manual,ffmpeg-scaler} for the complete list of scaler options. @@ -19595,8 +21138,23 @@ Set full range (0-255 in case of 8-bit luma). Set "MPEG" range (16-235 in case of 8-bit luma). @end table -@item force_original_aspect_ratio -Enable decreasing or increasing output video width or height if necessary to +@item in_chroma_loc +@item out_chroma_loc +Set in/output chroma sample location. If not specified, center-sited chroma +is used by default. Possible values: + +@table @samp +@item auto, unknown +@item left +@item center +@item topleft +@item top +@item bottomleft +@item bottom +@end table + +@item force_original_aspect_ratio +Enable decreasing or increasing output video width or height if necessary to keep the original aspect ratio. Possible values: @table @samp @@ -19688,6 +21246,17 @@ seconds. Only available with @code{eval=frame}. The position (byte offset) of the frame in the input stream, or NaN if this information is unavailable and/or meaningless (for example in case of synthetic video). Only available with @code{eval=frame}. +Deprecated, do not use. + +@item ref_w, rw +@item ref_h, rh +@item ref_a +@item ref_dar, rdar +@item ref_n +@item ref_t +@item ref_pos +Eqvuialent to the above, but for a second reference input. If any of these +variables are present, this filter accepts two inputs. @end table @subsection Examples @@ -19789,6 +21358,20 @@ making sure the resulting resolution is even (required by some codecs): @example scale='trunc(ih*dar/2)*2:trunc(ih/2)*2',setsar=1/1 @end example + +@item +Scale a subtitle stream (sub) to match the main video (main) in size before +overlaying. ("scale2ref") +@example +'[main]split[a][b]; [ref][a]scale=rw:rh[c]; [b][c]overlay' +@end example + +@item +Scale a logo to 1/10th the height of a video, while preserving its display +aspect ratio. +@example +[logo-in][video-in]scale=w=oh*dar:h=rh/10[logo-out] +@end example @end itemize @subsection Commands @@ -19804,6 +21387,7 @@ If the specified expression is not valid, it is kept at its current value. @end table +@anchor{scale_cuda} @section scale_cuda Scale (resize) and convert (pixel format) the input video, using accelerated CUDA kernels. @@ -19846,7 +21430,7 @@ pixel format is used. The filter does not support converting between YUV and RGB pixel formats. @item passthrough -If set to 0, every frame is processed, even if no conversion is neccesary. +If set to 0, every frame is processed, even if no conversion is necessary. This mode can be useful to use the filter as a buffer for a downstream frame-consumer that exhausts the limited decoder frame pool. @@ -20020,79 +21604,7 @@ seconds. Only available with @code{eval=frame}. The position (byte offset) of the frame in the input stream, or NaN if this information is unavailable and/or meaningless (for example in case of synthetic video). Only available with @code{eval=frame}. -@end table - -@section scale2ref - -Scale (resize) the input video, based on a reference video. - -See the scale filter for available options, scale2ref supports the same but -uses the reference video instead of the main input as basis. scale2ref also -supports the following additional constants for the @option{w} and -@option{h} options: - -@table @var -@item main_w -@item main_h -The main input video's width and height - -@item main_a -The same as @var{main_w} / @var{main_h} - -@item main_sar -The main input video's sample aspect ratio - -@item main_dar, mdar -The main input video's display aspect ratio. Calculated from -@code{(main_w / main_h) * main_sar}. - -@item main_hsub -@item main_vsub -The main input video's horizontal and vertical chroma subsample values. -For example for the pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} -is 1. - -@item main_n -The (sequential) number of the main input frame, starting from 0. -Only available with @code{eval=frame}. - -@item main_t -The presentation timestamp of the main input frame, expressed as a number of -seconds. Only available with @code{eval=frame}. - -@item main_pos -The position (byte offset) of the frame in the main input stream, or NaN if -this information is unavailable and/or meaningless (for example in case of synthetic video). -Only available with @code{eval=frame}. -@end table - -@subsection Examples - -@itemize -@item -Scale a subtitle stream (b) to match the main video (a) in size before overlaying -@example -'scale2ref[b][a];[a][b]overlay' -@end example - -@item -Scale a logo to 1/10th the height of a video, while preserving its display aspect ratio. -@example -[logo-in][video-in]scale2ref=w=oh*mdar:h=ih/10[logo-out][video-out] -@end example -@end itemize - -@subsection Commands - -This filter supports the following commands: -@table @option -@item width, w -@item height, h -Set the output video dimension expression. -The command accepts the same syntax of the corresponding option. - -If the specified expression is not valid, it is kept at its current -value. +Deprecated, do not use. @end table @section scale2ref_npp @@ -20150,6 +21662,27 @@ Scale a logo to 1/10th the height of a video, while preserving its display aspec @end example @end itemize +@section scale_vt + +Scale and convert the color parameters using VTPixelTransferSession. + +The filter accepts the following options: +@table @option +@item w +@item h +Set the output video dimension expression. Default value is the input dimension. + +@item color_matrix +Set the output colorspace matrix. + +@item color_primaries +Set the output color primaries. + +@item color_transfer +Set the output transfer characteristics. + +@end table + @section scharr Apply scharr operator to input video stream. @@ -20349,12 +21882,9 @@ It accepts the following parameters: @item r, ratio, dar (@code{setdar} only), sar (@code{setsar} only) Set the aspect ratio used by the filter. -The parameter can be a floating point number string, an expression, or -a string of the form @var{num}:@var{den}, where @var{num} and -@var{den} are the numerator and denominator of the aspect ratio. If -the parameter is not specified, it is assumed the value "0". -In case the form "@var{num}:@var{den}" is used, the @code{:} character -should be escaped. +The parameter can be a floating point number string, or an expression. If the +parameter is not specified, the value "0" is assumed, meaning that the same +input value is used. @item max Set the maximum integer value to use for expressing numerator and @@ -20363,19 +21893,14 @@ Default value is @code{100}. @end table -The parameter @var{sar} is an expression containing -the following constants: +The parameter @var{sar} is an expression containing the following constants: @table @option -@item E, PI, PHI -These are approximated values for the mathematical constants e -(Euler's number), pi (Greek pi), and phi (the golden ratio). - @item w, h The input width and height. @item a -These are the same as @var{w} / @var{h}. +Same as @var{w} / @var{h}. @item sar The input sample aspect ratio. @@ -20564,6 +22089,23 @@ Keep the same colorspace property (default). @item chroma-derived-c @item ictcp @end table + +@item chroma_location +Set the chroma sample location. +Available values are: + +@table @samp +@item auto +Keep the same chroma location (default). + +@item unspecified, unknown +@item left +@item center +@item topleft +@item top +@item bottomleft +@item bottom +@end table @end table @section sharpen_npp @@ -20624,6 +22166,10 @@ This filter supports the following options: @table @option @item checksum Calculate checksums of each plane. By default enabled. + +@item udu_sei_as_ascii +Try to print user data unregistered SEI as ascii character when possible, +in hex format otherwise. @end table The shown line contains a sequence of key/value pairs of the form @@ -20643,10 +22189,6 @@ time base units. The time base unit depends on the filter input pad. The Presentation TimeStamp of the input frame, expressed as a number of seconds. -@item pos -The position of the frame in the input stream, or -1 if this information is -unavailable and/or meaningless (for example in case of synthetic video). - @item fmt The pixel format name. @@ -21082,9 +22624,11 @@ ffmpeg -i input1.mkv -i input2.mkv -filter_complex "[0:v][1:v] signature=nb_inpu @anchor{siti} @section siti -Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, as defined -in ITU-T P.910: Subjective video quality assessment methods for multimedia -applications. Available PDF at @url{https://www.itu.int/rec/T-REC-P.910-199909-S/en }. +Calculate Spatial Information (SI) and Temporal Information (TI) scores for a video, +as defined in ITU-T Rec. P.910 (11/21): Subjective video quality assessment methods +for multimedia applications. Available PDF at @url{https://www.itu.int/rec/T-REC-P.910-202111-S/en}. +Note that this is a legacy implementation that corresponds to a superseded recommendation. +Refer to ITU-T Rec. P.910 (07/22) for the latest version: @url{https://www.itu.int/rec/T-REC-P.910-202207-I/en} It accepts the following option: @@ -21145,9 +22689,27 @@ whether a pixel should be blurred or not. The option value must be an integer in the range [-30,30]. A value of 0 will filter all the image, a value included in [0,30] will filter flat areas and a value included in [-30,0] will filter edges. Default value is @option{luma_threshold}. + +@item alpha_radius, ar +Set the alpha radius. The option value must be a float number in +the range [0.1,5.0] that specifies the variance of the gaussian filter +used to blur the image (slower if larger). Default value is @option{luma_radius}. + +@item alpha_strength, as +Set the alpha strength. The option value must be a float number +in the range [-1.0,1.0] that configures the blurring. A value included +in [0.0,1.0] will blur the image whereas a value included in +[-1.0,0.0] will sharpen the image. Default value is @option{luma_strength}. + +@item alpha_threshold, at +Set the alpha threshold used as a coefficient to determine +whether a pixel should be blurred or not. The option value must be an +integer in the range [-30,30]. A value of 0 will filter all the image, +a value included in [0,30] will filter flat areas and a value included +in [-30,0] will filter edges. Default value is @option{luma_threshold}. @end table -If a chroma option is not explicitly set, the corresponding luma value +If a chroma or alpha option is not explicitly set, the corresponding luma value is set. @section sobel @@ -21237,9 +22799,6 @@ Training scripts as well as scripts for model file (.pb) saving can be found at @url{https://github.com/XueweiMeng/sr/tree/sr_dnn_native}. Original repository is at @url{https://github.com/HighVoltageRocknRoll/sr.git}. -Native model files (.model) can be generated from TensorFlow model -files (.pb) by using tools/python/convert.py - The filter accepts the following options: @table @option @@ -21248,9 +22807,6 @@ Specify which DNN backend to use for model loading and execution. This option ac the following values: @table @samp -@item native -Native implementation of DNN loading and execution. - @item tensorflow TensorFlow backend. To enable this backend you need to install the TensorFlow for C library (see @@ -21258,13 +22814,10 @@ need to install the TensorFlow for C library (see @code{--enable-libtensorflow} @end table -Default value is @samp{native}. - @item model Set path to model file specifying network architecture and its parameters. -Note that different backends use different file formats. TensorFlow backend -can load files for both formats, while native backend can load files for only -its format. +Note that different backends use different file formats. TensorFlow, OpenVINO backend +can load files for only its format. @item scale_factor Set scale factor for SRCNN model. Allowed values are @code{2}, @code{3} and @code{4}. @@ -21635,6 +23188,13 @@ Set subtitles stream index. @code{subtitles} filter only. @item force_style Override default style or script info parameters of the subtitles. It accepts a string containing ASS style format @code{KEY=VALUE} couples separated by ",". + +@item wrap_unicode +Break lines according to the Unicode Line Breaking Algorithm. Availability requires +at least libass release 0.17.0 (or LIBASS_VERSION 0x01600010), @emph{and} libass must +have been built with libunibreak. + +The option is enabled by default except for native ASS. @end table If the first key is not specified, it is assumed that the first value @@ -21725,7 +23285,8 @@ The number of the input frame, starting from 0. The timestamp expressed in seconds. It's NAN if the input timestamp is unknown. @item pos -the position in the file of the input frame, NAN if unknown +the position in the file of the input frame, NAN if unknown; deprecated, +do not use @end table @subsection Commands @@ -21928,6 +23489,10 @@ The filter accepts the following options: Set the frames batch size to analyze; in a set of @var{n} frames, the filter will pick one of them, and then handle the next batch of @var{n} frames until the end. Default is @code{100}. + +@item log +Set the log level to display picked frame stats. +Default is @code{info}. @end table Since the filter keeps track of the whole frames sequence, a bigger @var{n} @@ -21961,7 +23526,7 @@ The filter accepts the following options: @table @option @item layout -Set the grid size in the form @code{COLUMNSxROWS}. Range is upto UINT_MAX cells. +Set the grid size in the form @code{COLUMNSxROWS}. Range is up to UINT_MAX cells. Default is @code{6x5}. @item nb_frames @@ -22013,6 +23578,70 @@ tile=3x2:nb_frames=5:padding=7:margin=2 @end example @end itemize +@section tiltandshift +Apply tilt-and-shift effect. + +What happens when you invert time and space? + +Normally a video is composed of several frames that represent a different +instant of time and shows a scene that evolves in the space captured by the +frame. This filter is the antipode of that concept, taking inspiration from +tilt and shift photography. + +A filtered frame contains the whole timeline of events composing the sequence, +and this is obtained by placing a slice of pixels from each frame into a single +one. However, since there are no infinite-width frames, this is done up the +width of the input frame, and a video is recomposed by shifting away one +column for each subsequent frame. In order to map space to time, the filter +tilts each input frame as well, so that motion is preserved. This is accomplished +by progressively selecting a different column from each input frame. + +The end result is a sort of inverted parallax, so that far away objects move +much faster that the ones in the front. The ideal conditions for this video +effect are when there is either very little motion and the backgroud is static, +or when there is a lot of motion and a very wide depth of field (e.g. wide +panorama, while moving on a train). + +The filter accepts the following parameters: + +@table @option + +@item tilt +Tilt video while shifting (default). When unset, video will be sliding a +static image, composed of the first column of each frame. + +@item start +What to do at the start of filtering (see below). + +@item end +What to do at the end of filtering (see below). + +@item hold +How many columns should pass through before start of filtering. + +@item pad +How many columns should be inserted before end of filtering. + +@end table + +Normally the filter shifts and tilts from the very first frame, and stops when +the last one is received. However, before filtering starts, normal video may +be preseved, so that the effect is slowly shifted in its place. Similarly, +the last video frame may be reconstructed at the end. Alternatively it is +possible to just start and end with black. + +@table @samp +@item none +Filtering starts immediately and ends when the last frame is received. + +@item frame +The first frames or the very last frame are kept intact during processing. + +@item black +Black is padded at the beginning or at the end of filtering. + +@end table + @section tinterlace Perform various types of temporal field interlacing. @@ -22835,7 +24464,7 @@ The way this differs from the behavior of spp is that uspp actually encodes & decodes each case with libavcodec Snow, whereas spp uses a simplified intra only 8x8 DCT similar to MJPEG. -This filter is only available in ffmpeg version 4.4 or earlier. +This filter is not available in ffmpeg versions between 5.0 and 6.0. The filter accepts the following options: @@ -22850,6 +24479,9 @@ that value the speed drops by a factor of approximately 2. Default value is @item qp Force a constant quantization parameter. If not set, the filter will use the QP from the video stream (if available). + +@item codec +Use specified codec instead of snow. @end table @section v360 @@ -23528,6 +25160,19 @@ If set to 0, it is disabled. The frames are counted starting from 1. Show fields and transforms in the resulting frames. It accepts an integer in the range 0-2. Default value is 0, which disables any visualization. + +@item fileformat +Format for the transforms data file to be written. +Acceptable values are + +@table @samp +@item ascii +Human-readable plain text + +@item binary +Binary format, roughly 40% smaller than @code{ascii}. (@emph{default}) +@end table + @end table @subsection Examples @@ -23779,6 +25424,8 @@ The obtained average VIF score is printed through the logging system. The filter stores the calculated VIF score of each frame. +This filter also supports the @ref{framesync} options. + In the below example the input file @file{main.mpg} being processed is compared with the reference file @file{ref.mpg}. @@ -23918,6 +25565,7 @@ Example: ffmpeg -i ref.mpg -vf vmafmotion -f null - @end example +@anchor{vstack} @section vstack Stack input videos vertically. @@ -24015,7 +25663,7 @@ This filter supports same @ref{commands} as options. @section waveform Video waveform monitor. -The waveform monitor plots color component intensity. By default luminance +The waveform monitor plots color component intensity. By default luma only. Each column of the waveform corresponds to a column of pixels in the source video. @@ -24070,7 +25718,7 @@ correction is easy to perform by making level adjustments the three waveforms. Default is @code{stack}. @item components, c -Set which color components to display. Default is 1, which means only luminance +Set which color components to display. Default is 1, which means only luma or red color component if input is in RGB colorspace. If is set for example to 7 it will display all 3 (if) available color components. @@ -24180,6 +25828,12 @@ Set sample aspect ration to 1/1. Set sample aspect ratio to match input size of video @end table Default is @samp{none}. + +@item input +Set input formats for filter to pick from. +Can be @samp{all}, for selecting from all available formats, +or @samp{first}, for selecting first available format. +Default is @samp{first}. @end table @section weave, doubleweave @@ -24310,6 +25964,18 @@ Set one of available transition effects: @item zoomin @item fadefast @item fadeslow +@item hlwind +@item hrwind +@item vuwind +@item vdwind +@item coverleft +@item coverright +@item coverup +@item coverdown +@item revealleft +@item revealright +@item revealup +@item revealdown @end table Default transition effect is fade. @@ -24399,6 +26065,74 @@ minimum values, and @code{1} maximum values. This filter supports all above options as @ref{commands}, excluding option @code{inputs}. +@anchor{xpsnr} +@section xpsnr + +Obtain the average (across all input frames) and minimum (across all color plane averages) +eXtended Perceptually weighted peak Signal-to-Noise Ratio (XPSNR) between two input videos. + +The XPSNR is a low-complexity psychovisually motivated distortion measurement algorithm for +assessing the difference between two video streams or images. This is especially useful for +objectively quantifying the distortions caused by video and image codecs, as an alternative +to a formal subjective test. The logarithmic XPSNR output values are in a similar range as +those of traditional @ref{psnr} assessments but better reflect human impressions of visual +coding quality. More details on the XPSNR measure, which essentially represents a blockwise +weighted variant of the PSNR measure, can be found in the following freely available papers: + +@itemize +@item +C. R. Helmrich, M. Siekmann, S. Becker, S. Bosse, D. Marpe, and T. Wiegand, "XPSNR: A +Low-Complexity Extension of the Perceptually Weighted Peak Signal-to-Noise Ratio for +High-Resolution Video Quality Assessment," in Proc. IEEE Int. Conf. Acoustics, Speech, +Sig. Process. (ICASSP), virt./online, May 2020. @url{www.ecodis.de/xpsnr.htm} + +@item +C. R. Helmrich, S. Bosse, H. Schwarz, D. Marpe, and T. Wiegand, "A Study of the +Extended Perceptually Weighted Peak Signal-to-Noise Ratio (XPSNR) for Video Compression +with Different Resolutions and Bit Depths," ITU Journal: ICT Discoveries, vol. 3, no. +1, pp. 65 - 72, May 2020. @url{http://handle.itu.int/11.1002/pub/8153d78b-en} +@end itemize + +When publishing the results of XPSNR assessments obtained using, e.g., this FFmpeg filter, a +reference to the above papers as a means of documentation is strongly encouraged. The filter +requires two input videos. The first input is considered a (usually not distorted) reference +source and is passed unchanged to the output, whereas the second input is a (distorted) test +signal. Except for the bit depth, these two video inputs must have the same pixel format. In +addition, for best performance, both compared input videos should be in YCbCr color format. + +The obtained overall XPSNR values mentioned above are printed through the logging system. In +case of input with multiple color planes, we suggest reporting of the minimum XPSNR average. + +The following parameter, which behaves like the one for the @ref{psnr} filter, is accepted: + +@table @option +@item stats_file, f +If specified, the filter will use the named file to save the XPSNR value of each individual +frame and color plane. When the file name equals "-", that data is sent to standard output. +@end table + +This filter also supports the @ref{framesync} options. + +@subsection Examples +@itemize +@item +XPSNR analysis of two 1080p HD videos, ref_source.yuv and test_video.yuv, both at 24 frames +per second, with color format 4:2:0, bit depth 8, and output of a logfile named "xpsnr.log": +@example +ffmpeg -s 1920x1080 -framerate 24 -pix_fmt yuv420p -i ref_source.yuv -s 1920x1080 -framerate +24 -pix_fmt yuv420p -i test_video.yuv -lavfi xpsnr="stats_file=xpsnr.log" -f null - +@end example + +@item +XPSNR analysis of two 2160p UHD videos, ref_source.yuv with bit depth 8 and test_video.yuv +with bit depth 10, both at 60 frames per second with color format 4:2:0, no logfile output: +@example +ffmpeg -s 3840x2160 -framerate 60 -pix_fmt yuv420p -i ref_source.yuv -s 3840x2160 -framerate +60 -pix_fmt yuv420p10le -i test_video.yuv -lavfi xpsnr="stats_file=-" -f null - +@end example +@end itemize + +@anchor{xstack} @section xstack Stack video inputs into custom layout. @@ -25467,6 +27201,7 @@ Apply dilation filter with threshold0 set to 30, threshold1 set 40, threshold2 s @end example @end itemize +@anchor{nlmeans_opencl} @section nlmeans_opencl Non-local Means denoise filter through OpenCL, this filter accepts same options as @ref{nlmeans}. @@ -26094,35 +27829,63 @@ To use vaapi filters, you need to setup the vaapi device correctly. For more inf Overlay one video on the top of another. It takes two inputs and has one output. The first input is the "main" video on which the second input is overlaid. -This filter requires same memory layout for all the inputs. So, format conversion may be needed. The filter accepts the following options: @table @option - @item x -Set the x coordinate of the overlaid video on the main video. -Default value is @code{0}. - @item y -Set the y coordinate of the overlaid video on the main video. -Default value is @code{0}. +Set expressions for the x and y coordinates of the overlaid video +on the main video. -@item w -Set the width of the overlaid video on the main video. -Default value is the width of input overlay video. +Default value is "0" for both expressions. +@item w @item h -Set the height of the overlaid video on the main video. -Default value is the height of input overlay video. +Set expressions for the width and height the overlaid video +on the main video. + +Default values are 'overlay_iw' for 'w' and 'overlay_ih*w/overlay_iw' for 'h'. + +The expressions can contain the following parameters: + +@table @option + +@item main_w, W +@item main_h, H +The main input width and height. + +@item overlay_iw +@item overlay_ih +The overlay input width and height. + +@item overlay_w, w +@item overlay_h, h +The overlay output width and height. + +@item overlay_x, x +@item overlay_y, y +Position of the overlay layer inside of main + +@end table @item alpha -Set blocking detection thresholds. Allowed range is 0.0 to 1.0, it -requires an input video with alpha channel. -Default value is @code{0.0}. +Set transparency of overlaid video. Allowed range is 0.0 to 1.0. +Higher value means lower transparency. +Default value is @code{1.0}. + +@item eof_action +See @ref{framesync}. + +@item shortest +See @ref{framesync}. + +@item repeatlast +See @ref{framesync}. @end table +This filter also supports the @ref{framesync} options. @subsection Examples @itemize @@ -26142,8 +27905,7 @@ The inputs have same memory layout for color channels, the overlay has additiona @section tonemap_vaapi -Perform HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion with tone-mapping. -It maps the dynamic range of HDR10 content to the SDR content. +Perform HDR-to-SDR or HDR-to-HDR tone-mapping. It currently only accepts HDR10 as input. It accepts the following parameters: @@ -26152,42 +27914,781 @@ It accepts the following parameters: @item format Specify the output pixel format. -Currently supported formats are: -@table @var -@item p010 -@item nv12 -@end table - -Default is nv12. +Default is nv12 for HDR-to-SDR tone-mapping and p010 for HDR-to-HDR +tone-mapping. @item primaries, p Set the output color primaries. -Default is same as input. +Default is bt709 for HDR-to-SDR tone-mapping and same as input for HDR-to-HDR +tone-mapping. @item transfer, t Set the output transfer characteristics. -Default is bt709. +Default is bt709 for HDR-to-SDR tone-mapping and same as input for HDR-to-HDR +tone-mapping. @item matrix, m Set the output colorspace matrix. -Default is same as input. +Default is bt709 for HDR-to-SDR tone-mapping and same as input for HDR-to-HDR +tone-mapping. +@item display +Set the output mastering display colour volume. It is given by a '|'-separated +list of two values, two values are space separated. It set display primaries +x & y in G, B, R order, then white point x & y, the nominal minimum & maximum +display luminances. + +HDR-to-HDR tone-mapping will be performed when this option is set. + +@item light +Set the output content light level information. It accepts 2 space-separated +values, the first input is the maximum light level and the second input is +the maximum average light level. + +It is ignored for HDR-to-SDR tone-mapping, and optional for HDR-to-HDR +tone-mapping. + +@end table + +@subsection Example + +@itemize +@item +Convert HDR(HDR10) video to bt2020-transfer-characteristic p010 format +@example +tonemap_vaapi=format=p010:t=bt2020-10 +@end example +@item +Convert HDR video to HDR video +@example +tonemap_vaapi=display=7500\ 3000|34000\ 16000|13250\ 34500|15635\ 16450|500\ 10000000 +@end example +@end itemize + +@section hstack_vaapi +Stack input videos horizontally. + +This is the VA-API variant of the @ref{hstack} filter, each input stream may +have different height, this filter will scale down/up each input stream while +keeping the original aspect. + +It accepts the following options: + +@table @option +@item inputs +See @ref{hstack}. + +@item shortest +See @ref{hstack}. + +@item height +Set height of output. If set to 0, this filter will set height of output to +height of the first input stream. Default value is 0. +@end table + +@section vstack_vaapi +Stack input videos vertically. + +This is the VA-API variant of the @ref{vstack} filter, each input stream may +have different width, this filter will scale down/up each input stream while +keeping the original aspect. + +It accepts the following options: + +@table @option +@item inputs +See @ref{vstack}. + +@item shortest +See @ref{vstack}. + +@item width +Set width of output. If set to 0, this filter will set width of output to +width of the first input stream. Default value is 0. +@end table + +@section xstack_vaapi +Stack video inputs into custom layout. + +This is the VA-API variant of the @ref{xstack} filter, each input stream may +have different size, this filter will scale down/up each input stream to the +given output size, or the size of the first input stream. + +It accepts the following options: + +@table @option +@item inputs +See @ref{xstack}. + +@item shortest +See @ref{xstack}. + +@item layout +See @ref{xstack}. +Moreover, this permits the user to supply output size for each input stream. +@example +xstack_vaapi=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080 +@end example + +@item grid +See @ref{xstack}. + +@item grid_tile_size +Set output size for each input stream when @option{grid} is set. If this option +is not set, this filter will set output size by default to the size of the +first input stream. For the syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. + +@item fill +See @ref{xstack}. +@end table + +@section pad_vaapi + +Add paddings to the input image, and place the original input at the +provided @var{x}, @var{y} coordinates. + +It accepts the following options: + +@table @option +@item width, w +@item height, h +Specify an expression for the size of the output image with the +paddings added. If the value for @var{width} or @var{height} is 0, the +corresponding input size is used for the output. + +The @var{width} expression can reference the value set by the +@var{height} expression, and vice versa. + +The default value of @var{width} and @var{height} is 0. + +@item x +@item y +Specify the offsets to place the input image at within the padded area, +with respect to the top/left border of the output image. + +The @var{x} expression can reference the value set by the @var{y} +expression, and vice versa. + +The default value of @var{x} and @var{y} is 0. + +If @var{x} or @var{y} evaluate to a negative number, they'll be changed +so the input image is centered on the padded area. + +@item color +Specify the color of the padded area. For the syntax of this option, +check the @ref{color syntax,,"Color" section in the ffmpeg-utils +manual,ffmpeg-utils}. + +@item aspect +Pad to an aspect instead to a resolution. +@end table + +The value for the @var{width}, @var{height}, @var{x}, and @var{y} +options are expressions containing the following constants: + +@table @option +@item in_w +@item in_h +The input video width and height. + +@item iw +@item ih +These are the same as @var{in_w} and @var{in_h}. + +@item out_w +@item out_h +The output width and height (the size of the padded area), as +specified by the @var{width} and @var{height} expressions. + +@item ow +@item oh +These are the same as @var{out_w} and @var{out_h}. + +@item x +@item y +The x and y offsets as specified by the @var{x} and @var{y} +expressions, or NAN if not yet specified. + +@item a +same as @var{iw} / @var{ih} + +@item sar +input sample aspect ratio + +@item dar +input display aspect ratio, it is the same as (@var{iw} / @var{ih}) * @var{sar} +@end table + +@section drawbox_vaapi + +Draw a colored box on the input image. + +It accepts the following parameters: + +@table @option +@item x +@item y +The expressions which specify the top left corner coordinates of the box. It defaults to 0. + +@item width, w +@item height, h +The expressions which specify the width and height of the box; if 0 they are interpreted as +the input width and height. It defaults to 0. + +@item color, c +Specify the color of the box to write. For the general syntax of this option, +check the @ref{color syntax,,"Color" section in the ffmpeg-utils manual,ffmpeg-utils}. + +@item thickness, t +The expression which sets the thickness of the box edge. +A value of @code{fill} will create a filled box. Default value is @code{3}. + +See below for the list of accepted constants. + +@item replace +With value @code{1}, the pixels of the painted box will overwrite the video's color and alpha pixels. +Default is @code{0}, which composites the box onto the input video. +@end table + +The parameters for @var{x}, @var{y}, @var{w} and @var{h} and @var{t} are expressions containing the +following constants: + +@table @option +@item in_h, ih +@item in_w, iw +The input width and height. + +@item x +@item y +The x and y offset coordinates where the box is drawn. + +@item w +@item h +The width and height of the drawn box. + +@item t +The thickness of the drawn box. + +@end table + +@subsection Examples + +@itemize +@item +Draw a black box around the edge of the input image: +@example +drawbox +@end example + +@item +Draw a box with color red and an opacity of 50%: +@example +drawbox=10:20:200:60:red@@0.5 +@end example + +The previous example can be specified as: +@example +drawbox=x=10:y=20:w=200:h=60:color=red@@0.5 +@end example + +@item +Fill the box with pink color: +@example +drawbox=x=10:y=10:w=100:h=100:color=pink@@0.5:t=fill +@end example + +@item +Draw a 2-pixel red 2.40:1 mask: +@example +drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red +@end example +@end itemize + +@c man end VAAPI VIDEO FILTERS + +@chapter Vulkan Video Filters +@c man begin VULKAN VIDEO FILTERS + +Below is a description of the currently available Vulkan video filters. + +To enable compilation of these filters you need to configure FFmpeg with +@code{--enable-vulkan} and either @code{--enable-libglslang} or @code{--enable-libshaderc}. + +Running Vulkan filters requires you to initialize a hardware device and to pass that device to all filters in any filter graph. +@table @option + +@item -init_hw_device vulkan[=@var{name}][:@var{device}[,@var{key=value}...]] +Initialise a new hardware device of type @var{vulkan} called @var{name}, using the +given device parameters and options in @var{key=value}. The following options +are supported: + +@table @option +@item debug +Switches validation layers on if set to 1. + +@item linear_images +Allocates linear images. Does not apply to decoding. + +@item disable_multiplane +Disables multiplane images. Does not apply to decoding. +@end table + +@item -filter_hw_device @var{name} +Pass the hardware device called @var{name} to all filters in any filter graph. + +@end table + +For more detailed information see @url{https://www.ffmpeg.org/ffmpeg.html#Advanced-Video-options} + +@itemize +@item +Example of choosing the first device and running nlmeans_vulkan filter with default parameters on it. +@example +-init_hw_device vulkan=vk:0 -filter_hw_device vk -i INPUT -vf "hwupload,nlmeans_vulkan,hwdownload" OUTPUT +@end example +@end itemize + +As Vulkan filters are not able to access frame data in normal memory, all frame data needs to be uploaded (@ref{hwupload}) to hardware surfaces connected to the appropriate device before being used and then downloaded (@ref{hwdownload}) back to normal memory. Note that @ref{hwupload} will upload to a frame with the same layout as the software frame, so it may be necessary to add a @ref{format} filter immediately before to get the input into the right format and @ref{hwdownload} does not support all formats on the output - it is usually necessary to insert an additional @ref{format} filter immediately following in the graph to get the output in a supported format. + +@section avgblur_vulkan + +Apply an average blur filter, implemented on the GPU using Vulkan. + +The filter accepts the following options: + +@table @option +@item sizeX +Set horizontal radius size. +Range is @code{[1, 32]} and default value is @code{3}. + +@item sizeY +Set vertical radius size. Range is @code{[1, 32]} and default value is @code{3}. + +@item planes +Set which planes to filter. Default value is @code{0xf}, by which all planes are processed. +@end table + +@section blend_vulkan + +Blend two Vulkan frames into each other. + +The @code{blend} filter takes two input streams and outputs one +stream, the first input is the "top" layer and second input is +"bottom" layer. By default, the output terminates when the longest input terminates. + +A description of the accepted options follows. + +@table @option +@item c0_mode +@item c1_mode +@item c2_mode +@item c3_mode +@item all_mode +Set blend mode for specific pixel component or all pixel components in case +of @var{all_mode}. Default value is @code{normal}. + +Available values for component modes are: +@table @samp +@item normal +@item multiply +@end table + +@end table + +@section bwdif_vulkan + +Deinterlacer using @ref{bwdif}, the "Bob Weaver Deinterlacing Filter" algorithm, implemented +on the GPU using Vulkan. + +It accepts the following parameters: + +@table @option +@item mode +The interlacing mode to adopt. It accepts one of the following values: + +@table @option +@item 0, send_frame +Output one frame for each frame. +@item 1, send_field +Output one frame for each field. +@end table + +The default value is @code{send_field}. + +@item parity +The picture field parity assumed for the input interlaced video. It accepts one +of the following values: + +@table @option +@item 0, tff +Assume the top field is first. +@item 1, bff +Assume the bottom field is first. +@item -1, auto +Enable automatic detection of field parity. +@end table + +The default value is @code{auto}. +If the interlacing is unknown or the decoder does not export this information, +top field first will be assumed. + +@item deint +Specify which frames to deinterlace. Accepts one of the following +values: + +@table @option +@item 0, all +Deinterlace all frames. +@item 1, interlaced +Only deinterlace frames marked as interlaced. +@end table + +The default value is @code{all}. +@end table + +@section chromaber_vulkan + +Apply an effect that emulates chromatic aberration. Works best with RGB inputs, +but provides a similar effect with YCbCr inputs too. + +@table @option +@item dist_x +Horizontal displacement multiplier. Each chroma pixel's position will be multiplied +by this amount, starting from the center of the image. Default is @code{0}. + +@item dist_y +Similarly, this sets the vertical displacement multiplier. Default is @code{0}. + +@end table + +@section color_vulkan + +Video source that creates a Vulkan frame of a solid color. +Useful for benchmarking, or overlaying. + +It accepts the following parameters: + +@table @option +@item color +The color to use. Either a name, or a hexadecimal value. +The default value is @code{black}. + +@item size +The size of the output frame. Default value is @code{1920x1080}. + +@item rate +The framerate to output at. Default value is @code{60} frames per second. + +@item duration +The video duration. Default value is @code{-0.000001}. + +@item sar +The video signal aspect ratio. Default value is @code{1/1}. + +@item format +The pixel format of the output Vulkan frames. Default value is @code{yuv444p}. + +@item out_range +Set the output YCbCr sample range. + +This allows the autodetected value to be overridden as well as allows forcing +a specific value used for the output and encoder. If not specified, the +range depends on the pixel format. Possible values: + +@table @samp +@item auto/unknown +Choose automatically. + +@item jpeg/full/pc +Set full range (0-255 in case of 8-bit luma). + +@item mpeg/limited/tv +Set "MPEG" range (16-235 in case of 8-bit luma). +@end table + +@end table + +@section vflip_vulkan + +Flips an image vertically. + +@section hflip_vulkan + +Flips an image horizontally. + +@section flip_vulkan + +Flips an image along both the vertical and horizontal axis. + +@section gblur_vulkan + +Apply Gaussian blur filter on Vulkan frames. + +The filter accepts the following options: + +@table @option +@item sigma +Set horizontal sigma, standard deviation of Gaussian blur. Default is @code{0.5}. + +@item sigmaV +Set vertical sigma, if negative it will be same as @code{sigma}. +Default is @code{-1}. + +@item planes +Set which planes to filter. By default all planes are filtered. + +@item size +Set the kernel size along the horizontal axis. Default is @code{19}. + +@item sizeV +Set the kernel size along the vertical axis. Default is @code{0}, +which sets to use the same value as @var{size}. + +@end table + +@section nlmeans_vulkan + +Denoise frames using Non-Local Means algorithm, implemented on the GPU using +Vulkan. +Supports more pixel formats than @ref{nlmeans} or @ref{nlmeans_opencl}, including +alpha channel support. + +The filter accepts the following options. + +@table @option +@item s +Set denoising strength for all components. Default is 1.0. Must be in range [1.0, 100.0]. + +@item p +Set patch size for all planes. Default is 7. Must be odd number in range [0, 99]. + +@item r +Set research size. Default is 15. Must be odd number in range [0, 99]. + +@item t +Set parallelism. Default is 36. Must be a number in the range [1, 168]. +Larger values may speed up processing, at the cost of more VRAM. +Lower values will slow it down, reducing VRAM usage. +Only supported on GPUs with atomic float operations (RDNA3+, Ampere+). + +@item s0 +@item s1 +@item s2 +@item s3 +Set denoising strength for a specific component. Default is @var{1}, equal to @option{s}. +Must be odd number in range [1, 100]. + +@item p0 +@item p1 +@item p2 +@item p3 +Set patch size for a specific component. Default is @var{7}, equal to @option{p}. +Must be odd number in range [0, 99]. + +@end table + +@section overlay_vulkan + +Overlay one video on top of another. + +It takes two inputs and has one output. The first input is the "main" video on which the second input is overlaid. +This filter requires all inputs to use the same pixel format. So, format conversion may be needed. + +The filter accepts the following options: + +@table @option +@item x +Set the x coordinate of the overlaid video on the main video. +Default value is @code{0}. + +@item y +Set the y coordinate of the overlaid video on the main video. +Default value is @code{0}. + +@end table + +@section transpose_vt + +Transpose rows with columns in the input video and optionally flip it. +For more in depth examples see the @ref{transpose} video filter, which shares mostly the same options. + +It accepts the following parameters: + +@table @option + +@item dir +Specify the transposition direction. + +Can assume the following values: +@table @samp +@item cclock_flip +Rotate by 90 degrees counterclockwise and vertically flip. (default) + +@item clock +Rotate by 90 degrees clockwise. + +@item cclock +Rotate by 90 degrees counterclockwise. + +@item clock_flip +Rotate by 90 degrees clockwise and vertically flip. + +@item hflip +Flip the input video horizontally. + +@item vflip +Flip the input video vertically. + +@end table + +@item passthrough +Do not apply the transposition if the input geometry matches the one +specified by the specified value. It accepts the following values: +@table @samp +@item none +Always apply transposition. (default) +@item portrait +Preserve portrait geometry (when @var{height} >= @var{width}). +@item landscape +Preserve landscape geometry (when @var{width} >= @var{height}). +@end table + +@end table + +@section transpose_vulkan + +Transpose rows with columns in the input video and optionally flip it. +For more in depth examples see the @ref{transpose} video filter, which shares mostly the same options. + +It accepts the following parameters: + +@table @option + +@item dir +Specify the transposition direction. + +Can assume the following values: +@table @samp +@item cclock_flip +Rotate by 90 degrees counterclockwise and vertically flip. (default) + +@item clock +Rotate by 90 degrees clockwise. + +@item cclock +Rotate by 90 degrees counterclockwise. + +@item clock_flip +Rotate by 90 degrees clockwise and vertically flip. +@end table + +@item passthrough +Do not apply the transposition if the input geometry matches the one +specified by the specified value. It accepts the following values: +@table @samp +@item none +Always apply transposition. (default) +@item portrait +Preserve portrait geometry (when @var{height} >= @var{width}). +@item landscape +Preserve landscape geometry (when @var{width} >= @var{height}). @end table -@subsection Example +@end table -@itemize -@item -Convert HDR(HDR10) video to bt2020-transfer-characteristic p010 format +@c man end VULKAN VIDEO FILTERS + +@chapter QSV Video Filters +@c man begin QSV VIDEO FILTERS + +Below is a description of the currently available QSV video filters. + +To enable compilation of these filters you need to configure FFmpeg with +@code{--enable-libmfx} or @code{--enable-libvpl}. + +To use QSV filters, you need to setup the QSV device correctly. For more information, please read @url{https://trac.ffmpeg.org/wiki/Hardware/QuickSync} + +@section hstack_qsv +Stack input videos horizontally. + +This is the QSV variant of the @ref{hstack} filter, each input stream may +have different height, this filter will scale down/up each input stream while +keeping the original aspect. + +It accepts the following options: + +@table @option +@item inputs +See @ref{hstack}. + +@item shortest +See @ref{hstack}. + +@item height +Set height of output. If set to 0, this filter will set height of output to +height of the first input stream. Default value is 0. +@end table + +@section vstack_qsv +Stack input videos vertically. + +This is the QSV variant of the @ref{vstack} filter, each input stream may +have different width, this filter will scale down/up each input stream while +keeping the original aspect. + +It accepts the following options: + +@table @option +@item inputs +See @ref{vstack}. + +@item shortest +See @ref{vstack}. + +@item width +Set width of output. If set to 0, this filter will set width of output to +width of the first input stream. Default value is 0. +@end table + +@section xstack_qsv +Stack video inputs into custom layout. + +This is the QSV variant of the @ref{xstack} filter. + +It accepts the following options: + +@table @option +@item inputs +See @ref{xstack}. + +@item shortest +See @ref{xstack}. + +@item layout +See @ref{xstack}. +Moreover, this permits the user to supply output size for each input stream. @example -tonemap_vaapi=format=p010:t=bt2020-10 +xstack_qsv=inputs=4:layout=0_0_1920x1080|0_h0_1920x1080|w0_0_1920x1080|w0_h0_1920x1080 @end example -@end itemize -@c man end VAAPI VIDEO FILTERS +@item grid +See @ref{xstack}. + +@item grid_tile_size +Set output size for each input stream when @option{grid} is set. If this option +is not set, this filter will set output size by default to the size of the +first input stream. For the syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. + +@item fill +See @ref{xstack}. +@end table + +@c man end QSV VIDEO FILTERS @chapter Video Sources @c man begin VIDEO SOURCES @@ -26227,14 +28728,19 @@ Specify the timebase assumed by the timestamps of the buffered frames. @item frame_rate Specify the frame rate expected for the video stream. +@item colorspace +A string representing the color space of the buffered video frames. +It may be a number corresponding to a color space, or a color space +name. + +@item range +A string representing the color range of the buffered video frames. +It may be a number corresponding to a color range, or a color range +name. + @item pixel_aspect, sar The sample (pixel) aspect ratio of the input video. -@item sws_param -This option is deprecated and ignored. Prepend @code{sws_flags=@var{flags};} -to the filtergraph description to specify swscale flags for automatically -inserted scalers. See @ref{Filtergraph syntax}. - @item hw_frames_ctx When using a hardware pixel format, this should be a reference to an AVHWFramesContext describing input frames. @@ -26435,6 +28941,102 @@ need for a nullsrc video source. @end itemize +@section ddagrab + +Captures the Windows Desktop via Desktop Duplication API. + +The filter exclusively returns D3D11 Hardware Frames, for on-gpu encoding +or processing. So an explicit @ref{hwdownload} is needed for any kind of +software processing. + +It accepts the following options: + +@table @option +@item output_idx +DXGI Output Index to capture. + +Usually corresponds to the index Windows has given the screen minus one, +so it's starting at 0. + +Defaults to output 0. + +@item draw_mouse +Whether to draw the mouse cursor. + +Defaults to true. + +Only affects hardware cursors. If a game or application renders its own cursor, +it'll always be captured. + +@item framerate +Maximum framerate at which the desktop will be captured - the interval between +successive frames will not be smaller than the inverse of the framerate. When +@var{dup_frames} is true (the default) and the desktop is not being updated +often enough, the filter will duplicate a previous frame. Note that there is no +background buffering going on, so when the filter is not polled often enough +then the actual inter-frame interval may be significantly larger. + +Defaults to 30 FPS. + +@item video_size +Specify the size of the captured video. + +Defaults to the full size of the screen. + +Cropped from the bottom/right if smaller than screen size. + +@item offset_x +Horizontal offset of the captured video. + +@item offset_y +Vertical offset of the captured video. + +@item output_fmt +Desired filter output format. +Defaults to 8 Bit BGRA. + +It accepts the following values: +@table @samp +@item auto +Passes all supported output formats to DDA and returns what DDA decides to use. +@item 8bit +@item bgra +8 Bit formats always work, and DDA will convert to them if necessary. +@item 10bit +@item x2bgr10 +Filter initialization will fail if 10 bit format is requested but unavailable. +@end table + +@item dup_frames +When this option is set to true (the default), the filter will duplicate frames +when the desktop has not been updated in order to maintain approximately +constant target framerate. When this option is set to false, the filter will +wait for the desktop to be updated (inter-frame intervals may vary significantly +in this case). + +@end table + +@subsection Examples + +Capture primary screen and encode using nvenc: +@example +ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 output.mp4 +@end example + +You can also skip the lavfi device and directly use the filter. +Also demonstrates downloading the frame and encoding with libx264. +Explicit output format specification is required in this case: +@example +ffmpeg -filter_complex ddagrab=output_idx=1:framerate=60,hwdownload,format=bgra -c:v libx264 -crf 18 output.mp4 +@end example + +If you want to capture only a subsection of the desktop, this can be achieved +by specifying a smaller size and its offsets into the screen: +@example +ddagrab=video_size=800x600:offset_x=100:offset_y=100 +@end example + + @section gradients Generate several gradients. @@ -26472,9 +29074,22 @@ supposed to be generated forever. Set speed of gradients rotation. @item type, t -Set type of gradients, can be @code{linear} or @code{radial} or @code{circular} or @code{spiral}. +Set type of gradients. +Available values are: +@table @samp +@item linear +@item radial +@item circular +@item spiral +@item square +@end table + +Default type is @var{linear}. @end table +@subsection Commands + +This source supports the some above options as @ref{commands}. @section mandelbrot @@ -26692,81 +29307,313 @@ live cell stay alive, and @var{NB} the number of alive neighbor cells which make a dead cell to become alive (i.e. to "born"). "s" and "b" can be used in place of "S" and "B", respectively. -Alternatively a rule can be specified by an 18-bits integer. The 9 -high order bits are used to encode the next cell state if it is alive -for each number of neighbor alive cells, the low order bits specify -the rule for "borning" new cells. Higher order bits encode for an -higher number of neighbor cells. -For example the number 6153 = @code{(12<<9)+9} specifies a stay alive -rule of 12 and a born rule of 9, which corresponds to "S23/B03". +Alternatively a rule can be specified by an 18-bits integer. The 9 +high order bits are used to encode the next cell state if it is alive +for each number of neighbor alive cells, the low order bits specify +the rule for "borning" new cells. Higher order bits encode for an +higher number of neighbor cells. +For example the number 6153 = @code{(12<<9)+9} specifies a stay alive +rule of 12 and a born rule of 9, which corresponds to "S23/B03". + +Default value is "S23/B3", which is the original Conway's game of life +rule, and will keep a cell alive if it has 2 or 3 neighbor alive +cells, and will born a new cell if there are three alive cells around +a dead cell. + +@item size, s +Set the size of the output video. For the syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. + +If @option{filename} is specified, the size is set by default to the +same size of the input file. If @option{size} is set, it must contain +the size specified in the input file, and the initial grid defined in +that file is centered in the larger resulting area. + +If a filename is not specified, the size value defaults to "320x240" +(used for a randomly generated initial grid). + +@item stitch +If set to 1, stitch the left and right grid edges together, and the +top and bottom edges also. Defaults to 1. + +@item mold +Set cell mold speed. If set, a dead cell will go from @option{death_color} to +@option{mold_color} with a step of @option{mold}. @option{mold} can have a +value from 0 to 255. + +@item life_color +Set the color of living (or new born) cells. + +@item death_color +Set the color of dead cells. If @option{mold} is set, this is the first color +used to represent a dead cell. + +@item mold_color +Set mold color, for definitely dead and moldy cells. + +For the syntax of these 3 color options, check the @ref{color syntax,,"Color" section in the +ffmpeg-utils manual,ffmpeg-utils}. +@end table + +@subsection Examples + +@itemize +@item +Read a grid from @file{pattern}, and center it on a grid of size +300x300 pixels: +@example +life=f=pattern:s=300x300 +@end example + +@item +Generate a random grid of size 200x200, with a fill ratio of 2/3: +@example +life=ratio=2/3:s=200x200 +@end example + +@item +Specify a custom rule for evolving a randomly generated grid: +@example +life=rule=S14/B34 +@end example + +@item +Full example with slow death effect (mold) using @command{ffplay}: +@example +ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16 +@end example +@end itemize + +@section perlin +Generate Perlin noise. + +Perlin noise is a kind of noise with local continuity in space. This +can be used to generate patterns with continuity in space and time, +e.g. to simulate smoke, fluids, or terrain. + +In case more than one octave is specified through the @option{octaves} +option, Perlin noise is generated as a sum of components, each one +with doubled frequency. In this case the @option{persistence} option +specify the ratio of the amplitude with respect to the previous +component. More octave components enable to specify more high +frequency details in the generated noise (e.g. small size variations +due to boulders in a generated terrain). + +@subsection Options +@table @option + +@item size, s +Specify the size (width and height) of the buffered video frames. For the +syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +Default value is @code{320x240}. + +@item rate, r +Specify the frame rate expected for the video stream, expressed as a +number of frames per second. Default value is @code{25}. + +@item octaves +Specify the total number of components making up the noise, each one +with doubled frequency. Default value is @code{1}. + +@item persistence +Set the ratio used to compute the amplitude of the next octave +component with respect to the previous component amplitude. Default +value is @code{1}. + +@item xscale +@item yscale +Define a scale factor used to multiple the x, y coordinates. This can +be useful to define an effect with a pattern stretched along the x or +y axis. Default value is @code{1}. + +@item tscale +Define a scale factor used to multiple the time coordinate. This can +be useful to change the time variation speed. Default value is @code{1}. + +@item random_mode +Set random mode used to compute initial pattern. + +Supported values are: +@table @option +@item random +Compute and use random seed. + +@item ken +Use the predefined initial pattern defined by Ken Perlin in the +original article, can be useful to compare the output with other +sources. + +@item seed +Use the value specified by @option{random_seed} option. +@end table + +Default value is @code{random}. + +@item random_seed, seed +When @option{random_mode} is set to @var{random_seed}, use this value +to compute the initial pattern. Default value is @code{0}. +@end table + +@subsection Examples +@itemize +@item +Generate single component: +@example +perlin +@end example + +@item +Use Perlin noise with 7 components, each one with a halved contribution +to total amplitude: +@example +perlin=octaves=7:persistence=0.5 +@end example + +@item +Chain Perlin noise with the @ref{lutyuv} to generate a black&white +effect: +@example +perlin=octaves=3:tscale=0.3,lutyuv=y='if(lt(val\,128)\,255\,0)' +@end example + +@item +Stretch noise along the y axis, and convert gray level to red-only +signal: +@example +perlin=octaves=7:tscale=0.4:yscale=0.3,lutrgb=r=val:b=0:g=0 +@end example +@end itemize + +@section qrencodesrc + +Generate a QR code using the libqrencode library (see +@url{https://fukuchi.org/works/qrencode/}). + +To enable the compilation of this source, you need to configure FFmpeg with +@code{--enable-libqrencode}. + +The QR code is generated from the provided text or text pattern. The +corresponding QR code is scaled and put in the video output according to the +specified output size options. + +In case no text is specified, the QR code is not generated, but an empty colored +output is returned instead. + +This source accepts the following options: + +@table @option + +@item qrcode_width, q +@item padded_qrcode_width, Q +Specify an expression for the width of the rendered QR code, with and without +padding. The @var{qrcode_width} expression can reference the value set by the +@var{padded_qrcode_width} expression, and vice versa. +By default @var{padded_qrcode_width} is set to @var{qrcode_width}, meaning that +there is no padding. -Default value is "S23/B3", which is the original Conway's game of life -rule, and will keep a cell alive if it has 2 or 3 neighbor alive -cells, and will born a new cell if there are three alive cells around -a dead cell. +These expressions are evaluated only once, when initializing the source. +See the @ref{qrencode_expressions,,qrencode Expressions} section for details. -@item size, s -Set the size of the output video. For the syntax of this option, check the -@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +Note that some of the constants are missing for the source (for example the +@var{x} or @var{t} or ¸@var{n}), since they only makes sense when evaluating the +expression for each frame rather than at initialization time. -If @option{filename} is specified, the size is set by default to the -same size of the input file. If @option{size} is set, it must contain -the size specified in the input file, and the initial grid defined in -that file is centered in the larger resulting area. +@item rate, r +Specify the frame rate of the sourced video, as the number of frames +generated per second. It has to be a string in the format +@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a floating point +number or a valid video frame rate abbreviation. The default value is +"25". -If a filename is not specified, the size value defaults to "320x240" -(used for a randomly generated initial grid). +@item case_sensitive, cs +Instruct libqrencode to use case sensitive encoding. This is enabled by +default. This can be disabled to reduce the QR encoding size. -@item stitch -If set to 1, stitch the left and right grid edges together, and the -top and bottom edges also. Defaults to 1. +@item level, l +Specify the QR encoding error correction level. With an higher correction level, +the encoding size will increase but the code will be more robust to corruption. +Lower level is @var{L}. -@item mold -Set cell mold speed. If set, a dead cell will go from @option{death_color} to -@option{mold_color} with a step of @option{mold}. @option{mold} can have a -value from 0 to 255. +It accepts the following values: +@table @samp +@item L +@item M +@item Q +@item H +@end table -@item life_color -Set the color of living (or new born) cells. +@item expansion +Select how the input text is expanded. Can be either @code{none}, or +@code{normal} (default). See the @ref{qrencode_text_expansion,,qrencode Text expansion} +section for details. -@item death_color -Set the color of dead cells. If @option{mold} is set, this is the first color -used to represent a dead cell. +@item text +@item textfile +Define the text to be rendered. In case neither is specified, no QR is encoded +(just an empty colored frame). -@item mold_color -Set mold color, for definitely dead and moldy cells. +In case expansion is enabled, the text is treated as a text template, using the +qrencode expansion mechanism. See the @ref{qrencode_text_expansion,,qrencode +Text expansion} section for details. -For the syntax of these 3 color options, check the @ref{color syntax,,"Color" section in the -ffmpeg-utils manual,ffmpeg-utils}. +@item background_color, bc +@item foreground_color, fc +Set the QR code and background color. The default value of +@var{foreground_color} is "black", the default value of @var{background_color} +is "white". + +For the syntax of the color options, check the @ref{color syntax,,"Color" +section in the ffmpeg-utils manual,ffmpeg-utils}. @end table @subsection Examples @itemize @item -Read a grid from @file{pattern}, and center it on a grid of size -300x300 pixels: +Generate a QR code encoding the specified text with the default size: @example -life=f=pattern:s=300x300 +qrencodesrc=text=www.ffmpeg.org @end example @item -Generate a random grid of size 200x200, with a fill ratio of 2/3: +Same as below, but select blue on pink colors: @example -life=ratio=2/3:s=200x200 +qrencodesrc=text=www.ffmpeg.org:bc=pink:fc=blue @end example @item -Specify a custom rule for evolving a randomly generated grid: +Generate a QR code with width of 200 pixels and padding, making the padded width +4/3 of the QR code width: @example -life=rule=S14/B34 +qrencodesrc=text=www.ffmpeg.org:q=200:Q=4/3*q @end example @item -Full example with slow death effect (mold) using @command{ffplay}: +Generate a QR code with padded width of 200 pixels and padding, making the QR +code width 3/4 of the padded width: @example -ffplay -f lavfi life=s=300x200:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=1200:800:flags=16 +qrencodesrc=text=www.ffmpeg.org:Q=200:q=3/4*Q +@end example + +@item +Generate a QR code encoding the frame number: +@example +qrencodesrc=text=%@{n@} +@end example + +@item +Generate a QR code encoding the GMT timestamp: +@example +qrencodesrc=text=%@{gmtime@} +@end example + +@item +Generate a QR code encoding the timestamp expressed as a float: +@example +qrencodesrc=text=%@{pts@} @end example + @end itemize @anchor{allrgb} @@ -26935,7 +29782,7 @@ color=c=red@@0.2:s=qcif:r=10 @item If the input content is to be ignored, @code{nullsrc} can be used. The -following command generates noise in the luminance plane by employing +following command generates noise in the luma plane by employing the @code{geq} filter: @example nullsrc=s=256x256, geq=random(1)*255:128:128 @@ -27049,6 +29896,104 @@ Set max jump for single pan destination. Allowed range is from 1 to 10000. Set fractal type, can be default @code{carpet} or @code{triangle}. @end table +@section zoneplate +Generate a zoneplate test video pattern. + +This source accepts the following options: + +@table @option +@item size, s +Set frame size. For the syntax of this option, check the @ref{video size syntax,,"Video +size" section in the ffmpeg-utils manual,ffmpeg-utils}. Default value is "320x240". + +@item rate, r +Set frame rate, expressed as number of frames per second. Default +value is "25". + +@item duration, d +Set the duration of the sourced video. See +@ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} +for the accepted syntax. + +If not specified, or the expressed duration is negative, the video is +supposed to be generated forever. + +@item sar +Set the sample aspect ratio of the sourced video. + +@item precision +Set precision in bits for look-up table for sine calculations. Default value is 10. +Allowed range is from 4 to 16. + +@item xo +Set horizontal axis offset for output signal. Default value is 0. + +@item yo +Set vertical axis offset for output signal. Default value is 0. + +@item to +Set time axis offset for output signal. Default value is 0. + +@item k0 +Set 0-order, constant added to signal phase. Default value is 0. + +@item kx +Set 1-order, phase factor multiplier for horizontal axis. Default value is 0. + +@item ky +Set 1-order, phase factor multiplier for vertical axis. Default value is 0. + +@item kt +Set 1-order, phase factor multiplier for time axis. Default value is 0. + +@item kxt, kyt, kxy +Set phase factor multipliers for combination of spatial and temporal axis. +Default value is 0. + +@item kx2 +Set 2-order, phase factor multiplier for horizontal axis. Default value is 0. + +@item ky2 +Set 2-order, phase factor multiplier for vertical axis. Default value is 0. + +@item kt2 +Set 2-order, phase factor multiplier for time axis. Default value is 0. + +@item ku +Set the constant added to final phase to produce chroma-blue component of signal. +Default value is 0. + +@item kv +Set the constant added to final phase to produce chroma-red component of signal. +Default value is 0. +@end table + +@subsection Commands + +This source supports the some above options as @ref{commands}. + +@subsection Examples + +@itemize +@item +Generate horizontal color sine sweep: +@example +zoneplate=ku=512:kv=0:kt2=0:kx2=256:s=wvga:xo=-426:kt=11 +@end example + +@item +Generate vertical color sine sweep: +@example +zoneplate=ku=512:kv=0:kt2=0:ky2=156:s=wvga:yo=-240:kt=11 +@end example + +@item +Generate circular zone-plate: +@example +zoneplate=ku=512:kv=100:kt2=0:ky2=256:kx2=556:s=wvga:yo=0:kt=11 +@end example +@end itemize + @c man end VIDEO SOURCES @chapter Video Sinks @@ -27082,6 +30027,61 @@ tools. Below is a description of the currently available multimedia filters. +@section a3dscope + +Convert input audio to 3d scope video output. + +The filter accepts the following options: + +@table @option +@item rate, r +Set frame rate, expressed as number of frames per second. Default +value is "25". + +@item size, s +Specify the video size for the output. For the syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +Default value is @code{hd720}. + +@item fov +Set the camera field of view. Default is 90 degrees. +Allowed range is from 40 to 150. + +@item roll +Set the camera roll. + +@item pitch +Set the camera pitch. + +@item yaw +Set the camera yaw. + +@item xzoom +Set the camera zoom on X-axis. + +@item yzoom +Set the camera zoom on Y-axis. + +@item zzoom +Set the camera zoom on Z-axis. + +@item xpos +Set the camera position on X-axis. + +@item ypos +Set the camera position on Y-axis. + +@item zpos +Set the camera position on Z-axis. + +@item length +Set the length of displayed audio waves in number of frames. +@end table + +@subsection Commands + +Filter supports the some above options as @ref{commands}. + @section abitscope Convert input audio to a video output, displaying the audio bit scope. @@ -27345,6 +30345,9 @@ Draw dot for each sample. @item line Draw line between previous and current sample. + +@item aaline +Draw anti-aliased line between previous and current sample. @end table Default value is @samp{dot}. @@ -27585,6 +30588,8 @@ Force the frame logging level. Available values are: @table @samp +@item quiet +logging disabled @item info information logging level @item verbose @@ -27642,6 +30647,24 @@ live mixing). Sets the display scale for the loudness. Valid parameters are @code{absolute} (in LUFS) or @code{relative} (LU) relative to the target. This only affects the video output, not the summary or continuous log output. + +@item integrated +Read-only exported value for measured integrated loudness, in LUFS. + +@item range +Read-only exported value for measured loudness range, in LU. + +@item lra_low +Read-only exported value for measured LRA low, in LUFS. + +@item lra_high +Read-only exported value for measured LRA high, in LUFS. + +@item sample_peak +Read-only exported value for measured sample peak, in dBFS. + +@item true_peak +Read-only exported value for measured true peak, in dBFS. @end table @subsection Examples @@ -28056,7 +31079,7 @@ This is 1 if the filtered frame is a key-frame, 0 otherwise. @item pos the position in the file of the filtered frame, -1 if the information -is not available (e.g. for synthetic video) +is not available (e.g. for synthetic video); deprecated, do not use @item scene @emph{(video only)} value between 0 and 1 to indicate a new scene; a low value reflects a low @@ -28082,6 +31105,15 @@ missing. That basically means that an input frame is selected if its pts is within the interval set by the concat demuxer. +@item iw @emph{(video only)} +Represents the width of the input video frame. + +@item ih @emph{(video only)} +Represents the height of the input video frame. + +@item view @emph{(video only)} +View ID for multi-view video. + @end table The default value of the select expression is "1". @@ -28246,7 +31278,7 @@ constants: @table @option @item POS Original position in the file of the frame, or undefined if undefined -for the current frame. +for the current frame. Deprecated, do not use. @item PTS The presentation timestamp in input. @@ -28394,7 +31426,7 @@ the time in seconds of the current frame @item POS original position in the file of the frame, or undefined if undefined -for the current frame +for the current frame; deprecated, do not use @item PREV_INPTS The previous input PTS. @@ -28418,6 +31450,9 @@ The wallclock (RTC) time at the start of the movie in microseconds. @item TB The timebase of the input timestamps. +@item T_CHANGE +Time of the first frame after command was applied or time of the first frame if no commands. + @end table @subsection Examples @@ -28447,6 +31482,12 @@ Set fixed rate of 25 frames per second: setpts=N/(25*TB) @end example +@item +Apply a random jitter effect of +/-100 TB units: +@example +setpts=PTS+randomi(0, -100\,100) +@end example + @item Set fixed rate 25 fps with some jitter: @example @@ -28473,6 +31514,10 @@ asetpts=N/SR/TB @end itemize +@subsection Commands + +Both filters support all above options as @ref{commands}. + @section setrange Force color range for the output video frame. @@ -28840,6 +31885,134 @@ axisfile=myaxis.png:basefreq=40:endfreq=10000 @end example @end itemize +@section showcwt + +Convert input audio to video output representing frequency spectrum +using Continuous Wavelet Transform and Morlet wavelet. + +The filter accepts the following options: + +@table @option +@item size, s +Specify the video size for the output. For the syntax of this option, +check the @ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +Default value is @code{640x512}. + +@item rate, r +Set the output frame rate. Default value is @code{25}. + +@item scale +Set the frequency scale used. Allowed values are: + +@table @option +@item linear +@item log +@item bark +@item mel +@item erbs +@item sqrt +@item cbrt +@item qdrt +@item fm +@end table +Default value is @code{linear}. + +@item iscale +Set the intensity scale used. Allowed values are: + +@table @option +@item linear +@item log +@item sqrt +@item cbrt +@item qdrt +@end table +Default value is @code{log}. + +@item min +Set the minimum frequency that will be used in output. +Default is @code{20} Hz. + +@item max +Set the maximum frequency that will be used in output. +Default is @code{20000} Hz. The real frequency upper limit +depends on input audio's sample rate and such will be enforced +on this value when it is set to value greater than Nyquist frequency. + +@item imin +Set the minimum intensity that will be used in output. + +@item imax +Set the maximum intensity that will be used in output. + +@item logb +Set the logarithmic basis for brightness strength when +mapping calculated magnitude values to pixel values. +Allowed range is from @code{0} to @code{1}. +Default value is @code{0.0001}. + +@item deviation +Set the frequency deviation. +Lower values than @code{1} are more frequency oriented, +while higher values than @code{1} are more time oriented. +Allowed range is from @code{0} to @code{10}. +Default value is @code{1}. + +@item pps +Set the number of pixel output per each second in one row. +Allowed range is from @code{1} to @code{1024}. +Default value is @code{64}. + +@item mode +Set the output visual mode. Allowed values are: + +@table @option +@item magnitude +Show magnitude. +@item phase +Show only phase. +@item magphase +Show combination of magnitude and phase. +Magnitude is mapped to brightness and phase to color. +@item channel +Show unique color per channel magnitude. +@item stereo +Show unique color per stereo difference. +@end table + +Default value is @code{magnitude}. + +@item slide +Set the output slide method. Allowed values are: + +@table @option +@item replace +@item scroll +@item frame +@end table + +@item direction +Set the direction method for output slide method. Allowed values are: + +@table @option +@item lr +Direction from left to right. +@item rl +Direction from right to left. +@item ud +Direction from up to down. +@item du +Direction from down to up. +@end table + +@item bar +Set the ratio of bargraph display to display size. Default is 0. + +@item rotation +Set color rotation, must be in [-1.0, 1.0] range. +Default value is @code{0}. +@end table + @section showfreqs Convert input audio to video output representing the audio power spectrum. @@ -28933,6 +32106,7 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default is @code{hanning}. @@ -29019,14 +32193,13 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default value is @code{hann}. -@item overlap -Set ratio of overlap window. Default value is @code{0.5}. -When value is @code{1} overlap is set to recommended size for specific -window function currently used. +@item rate, r +Set output framerate. @end table @anchor{showspectrum} @@ -29180,6 +32353,7 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default value is @code{hann}. @@ -29377,6 +32551,7 @@ It accepts the following values: @item parzen @item poisson @item bohman +@item kaiser @end table Default value is @code{hann}. @@ -29942,6 +33117,10 @@ Set stream output duration. By default duration is unlimited. Set foreground/background/additional color. @end table +@subsection Commands + +This source supports the some above options as @ref{commands}. + @anchor{movie} @section movie diff --git a/mythtv/external/FFmpeg/doc/formats.texi b/mythtv/external/FFmpeg/doc/formats.texi index 640b23b7906..876a9e92b31 100644 --- a/mythtv/external/FFmpeg/doc/formats.texi +++ b/mythtv/external/FFmpeg/doc/formats.texi @@ -46,7 +46,8 @@ Enable fast, but inaccurate seeks for some formats. @item genpts Generate missing PTS if DTS is present. @item igndts -Ignore DTS if PTS is set. Inert when nofillin is set. +Ignore DTS if PTS is also set. In case the PTS is set, the DTS value +is set to NOPTS. This is ignored when the @code{nofillin} flag is set. @item ignidx Ignore index. @item nobuffer @@ -224,9 +225,26 @@ Specifies the maximum number of streams. This can be used to reject files that would require too many resources due to a large number of streams. @item skip_estimate_duration_from_pts @var{bool} (@emph{input}) -Skip estimation of input duration when calculated using PTS. +Skip estimation of input duration if it requires an additional probing for PTS at end of file. At present, applicable for MPEG-PS and MPEG-TS. +@item duration_probesize @var{integer} (@emph{input}) +Set probing size, in bytes, for input duration estimation when it actually requires +an additional probing for PTS at end of file (at present: MPEG-PS and MPEG-TS). +It is aimed at users interested in better durations probing for itself, or indirectly +because using the concat demuxer, for example. +The typical use case is an MPEG-TS CBR with a high bitrate, high video buffering and +ending cleaning with similar PTS for video and audio: in such a scenario, the large +physical gap between the last video packet and the last audio packet makes it necessary +to read many bytes in order to get the video stream duration. +Another use case is where the default probing behaviour only reaches a single video frame which is +not the last one of the stream due to frame reordering, so the duration is not accurate. +Setting this option has a performance impact even for small files because the probing +size is fixed. +Default behaviour is a general purpose trade-off, largely adaptive, but the probing size +will not be extended to get streams durations at all costs. +Must be an integer not lesser than 1, or 0 for default behaviour. + @item strict, f_strict @var{integer} (@emph{input/output}) Specify how strictly to follow the standards. @code{f_strict} is deprecated and should be used only via the @command{ffmpeg} tool. diff --git a/mythtv/external/FFmpeg/doc/general_contents.texi b/mythtv/external/FFmpeg/doc/general_contents.texi index b1d3e3aa05c..5980ac6f028 100644 --- a/mythtv/external/FFmpeg/doc/general_contents.texi +++ b/mythtv/external/FFmpeg/doc/general_contents.texi @@ -160,6 +160,19 @@ Go to @url{http://lame.sourceforge.net/} and follow the instructions for installing the library. Then pass @code{--enable-libmp3lame} to configure to enable it. +@section LCEVCdec + +FFmpeg can make use of the liblcevc_dec library for LCEVC enhacement layer +decoding on supported bitstreams. + +Go to @url{https://github.com/v-novaltd/LCEVCdec} and follow the instructions +for installing the library. Then pass @code{--enable-liblcevc-dec} to configure to +enable it. + +@float NOTE +LCEVCdec is under the BSD-3-Clause-Clear License. +@end float + @section libilbc iLBC is a narrowband speech codec that has been made freely available @@ -237,6 +250,14 @@ Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for installing the library. Then pass @code{--enable-libfdk-aac} to configure to enable it. +@subsection LC3 library + +FFmpeg can make use of the Google LC3 library for LC3 decoding & encoding. + +Go to @url{https://github.com/google/liblc3/} and follow the instructions for +installing the library. +Then pass @code{--enable-liblc3} to configure to enable it. + @section OpenH264 FFmpeg can make use of the OpenH264 library for H.264 decoding and encoding. @@ -343,6 +364,22 @@ libxavs2 is under the GNU Public License Version 2 or later details), you must upgrade FFmpeg's license to GPL in order to use it. @end float +@section eXtra-fast Essential Video Encoder (XEVE) + +FFmpeg can make use of the XEVE library for EVC video encoding. + +Go to @url{https://github.com/mpeg5/xeve} and follow the instructions for +installing the XEVE library. Then pass @code{--enable-libxeve} to configure to +enable it. + +@section eXtra-fast Essential Video Decoder (XEVD) + +FFmpeg can make use of the XEVD library for EVC video decoding. + +Go to @url{https://github.com/mpeg5/xevd} and follow the instructions for +installing the XEVD library. Then pass @code{--enable-libxevd} to configure to +enable it. + @section ZVBI ZVBI is a VBI decoding library which can be used by FFmpeg to decode DVB @@ -510,6 +547,8 @@ library: @tab A format used by libvpx @item Internet Video Recording @tab @tab X @item IRCAM @tab X @tab X +@item LAF @tab @tab X + @tab Limitless Audio Format @item LATM @tab X @tab X @item LMLM4 @tab @tab X @tab Used by Linux Media Labs MPEG-4 PCI boards @@ -532,6 +571,8 @@ library: @item Metal Gear Solid: The Twin Snakes @tab @tab X @item Megalux Frame @tab @tab X @tab Used by Megalux Ultimate Paint +@item MobiClip MODS @tab @tab X +@item MobiClip MOFLEX @tab @tab X @item Mobotix .mxg @tab @tab X @item Monkey's Audio @tab @tab X @item Motion Pixels MVI @tab @tab X @@ -575,6 +616,7 @@ library: @item Ogg @tab X @tab X @item Playstation Portable PMP @tab @tab X @item Portable Voice Format @tab @tab X +@item RK Audio (RKA) @tab @tab X @item TechnoTrend PVA @tab @tab X @tab Used by TechnoTrend DVB PCI boards. @item QCP @tab @tab X @@ -582,8 +624,10 @@ library: @item raw AC-3 @tab X @tab X @item raw AMR-NB @tab @tab X @item raw AMR-WB @tab @tab X +@item raw APAC @tab @tab X @item raw aptX @tab X @tab X @item raw aptX HD @tab X @tab X +@item raw Bonk @tab @tab X @item raw Chinese AVS video @tab X @tab X @item raw DFPWM @tab X @tab X @item raw Dirac @tab X @tab X @@ -591,6 +635,7 @@ library: @item raw DTS @tab X @tab X @item raw DTS-HD @tab @tab X @item raw E-AC-3 @tab X @tab X +@item raw EVC @tab X @tab X @item raw FLAC @tab X @tab X @item raw GSM @tab @tab X @item raw H.261 @tab X @tab X @@ -608,6 +653,7 @@ library: @item raw video @tab X @tab X @item raw id RoQ @tab X @tab @item raw OBU @tab X @tab X +@item raw OSQ @tab @tab X @item raw SBC @tab X @tab X @item raw Shorten @tab @tab X @item raw TAK @tab @tab X @@ -645,7 +691,8 @@ library: @item Redirector @tab @tab X @item RedSpark @tab @tab X @item Renderware TeXture Dictionary @tab @tab X -@item Resolume DXV @tab @tab X +@item Resolume DXV @tab X @tab X + @tab Encoding is only supported for the DXT1 (Normal Quality, No Alpha) texture format. @item RF64 @tab @tab X @item RL2 @tab @tab X @tab Audio and video format used in some games by Entertainment Software Partners. @@ -659,8 +706,10 @@ library: @item Sample Dump eXchange @tab @tab X @item SAP @tab X @tab X @item SBG @tab @tab X +@item SDNS @tab @tab X @item SDP @tab @tab X @item SER @tab @tab X +@item Digital Pictures SGA @tab @tab X @item Sega FILM/CPK @tab X @tab X @tab Used in many Sega Saturn console games. @item Silicon Graphics Movie @tab @tab X @@ -698,7 +747,9 @@ library: @item Vivo @tab @tab X @item VPK @tab @tab X @tab Audio format used in Sony PS games. +@item Marble WADY @tab @tab X @item WAV @tab X @tab X +@item Waveform Archiver @tab @tab X @item WavPack @tab X @tab X @item WebM @tab X @tab X @item Windows Televison (WTV) @tab X @tab X @@ -710,6 +761,7 @@ library: @tab Multimedia format used in Westwood Studios games. @item Wideband Single-bit Data (WSD) @tab @tab X @item WVE @tab @tab X +@item Konami XMD @tab @tab X @item XMV @tab @tab X @tab Microsoft video container used in Xbox games. @item XVAG @tab @tab X @@ -749,6 +801,8 @@ following image formats are supported: @tab OpenEXR @item FITS @tab X @tab X @tab Flexible Image Transport System +@item HDR @tab X @tab X + @tab Radiance HDR RGBE Image format @item IMG @tab @tab X @tab GEM Raster image @item JPEG @tab X @tab X @@ -757,6 +811,7 @@ following image formats are supported: @item JPEG-LS @tab X @tab X @item LJPEG @tab X @tab @tab Lossless JPEG +@item Media 100 @tab @tab X @item MSP @tab @tab X @tab Microsoft Paint image @item PAM @tab X @tab X @@ -799,6 +854,8 @@ following image formats are supported: @tab Targa (.TGA) image format @item VBN @tab X @tab X @tab Vizrt Binary Image format +@item WBMP @tab X @tab X + @tab Wireless Application Protocol Bitmap image format @item WebP @tab E @tab X @tab WebP image format, encoding supported through external library libwebp @item XBM @tab X @tab X @@ -926,6 +983,8 @@ following image formats are supported: @item Electronic Arts TQI video @tab @tab X @item Escape 124 @tab @tab X @item Escape 130 @tab @tab X +@item EVC / MPEG-5 Part 1 @tab E @tab E + @tab encoding and decoding supported through external libraries libxeve and libxevd @item FFmpeg video codec #1 @tab X @tab X @tab lossless codec (fourcc: FFV1) @item Flash Screen Video v1 @tab X @tab X @@ -977,8 +1036,11 @@ following image formats are supported: @item Kega Game Video (KGV1) @tab @tab X @tab Kega emulator screen capture codec. @item Lagarith @tab @tab X +@item LCEVC / MPEG-5 LCEVC / MPEG-5 Part 2 @tab @tab E + @tab decoding supported through external library liblcevc-dec @item LCL (LossLess Codec Library) MSZH @tab @tab X @item LCL (LossLess Codec Library) ZLIB @tab E @tab E +@item LEAD MCMP @tab @tab X @item LOCO @tab @tab X @item LucasArts SANM/Smush @tab @tab X @tab Used in LucasArts games / SMUSH animations. @@ -989,7 +1051,7 @@ following image formats are supported: @tab Also known as Microsoft Screen 3. @item Microsoft Expression Encoder Screen @tab @tab X @tab Also known as Microsoft Titanium Screen 2. -@item Microsoft RLE @tab @tab X +@item Microsoft RLE @tab X @tab X @item Microsoft Screen 1 @tab @tab X @tab Also known as Windows Media Video V7 Screen. @item Microsoft Screen 2 @tab @tab X @@ -1049,6 +1111,8 @@ following image formats are supported: @item RealVideo 4.0 @tab @tab X @item Renderware TXD (TeXture Dictionary) @tab @tab X @tab Texture dictionaries used by the Renderware Engine. +@item RivaTuner Video @tab @tab X + @tab fourcc: 'RTV1' @item RL2 video @tab @tab X @tab used in some games by Entertainment Software Partners @item ScreenPressor @tab @tab X @@ -1085,6 +1149,8 @@ following image formats are supported: @item v408 QuickTime uncompressed 4:4:4:4 @tab X @tab X @item v410 QuickTime uncompressed 4:4:4 10-bit @tab X @tab X @item VBLE Lossless Codec @tab @tab X +@item vMix Video @tab @tab X + @tab fourcc: 'VMX1' @item VMware Screen Codec / VMware Video @tab @tab X @tab Codec used in videos captured by VMware. @item Westwood Studios VQA (Vector Quantized Animation) video @tab @tab X @@ -1151,6 +1217,7 @@ following image formats are supported: @item ADPCM IMA Electronic Arts SEAD @tab @tab X @item ADPCM IMA Funcom @tab @tab X @item ADPCM IMA High Voltage Software ALP @tab X @tab X +@item ADPCM IMA Mobiclip MOFLEX @tab @tab X @item ADPCM IMA QuickTime @tab X @tab X @item ADPCM IMA Simon & Schuster Interactive @tab X @tab X @item ADPCM IMA Ubisoft APM @tab X @tab X @@ -1180,6 +1247,7 @@ following image formats are supported: @item ADPCM Sound Blaster Pro 4-bit @tab @tab X @item ADPCM VIMA @tab @tab X @tab Used in LucasArts SMUSH animations. +@item ADPCM Konami XMD @tab @tab X @item ADPCM Westwood Studios IMA @tab X @tab X @tab Used in Westwood Studios games like Command and Conquer. @item ADPCM Yamaha @tab X @tab X @@ -1201,6 +1269,7 @@ following image formats are supported: @item ATRAC9 @tab @tab X @item Bink Audio @tab @tab X @tab Used in Bink and Smacker files in many games. +@item Bonk audio @tab @tab X @item CELT @tab @tab E @tab decoding supported through external library libcelt @item codec2 @tab E @tab E @@ -1216,9 +1285,12 @@ following image formats are supported: @item DCA (DTS Coherent Acoustics) @tab X @tab X @tab supported extensions: XCh, XXCH, X96, XBR, XLL, LBR (partially) @item Dolby E @tab @tab X +@item DPCM Cuberoot-Delta-Exact @tab @tab X + @tab Used in few games. @item DPCM Gremlin @tab @tab X @item DPCM id RoQ @tab X @tab X @tab Used in Quake III, Jedi Knight 2 and other computer games. +@item DPCM Marble WADY @tab @tab X @item DPCM Interplay @tab @tab X @tab Used in various Interplay computer games. @item DPCM Squareroot-Delta-Exact @tab @tab X @@ -1239,6 +1311,7 @@ following image formats are supported: @item Enhanced AC-3 @tab X @tab X @item EVRC (Enhanced Variable Rate Codec) @tab @tab X @item FLAC (Free Lossless Audio Codec) @tab X @tab IX +@item FTR Voice @tab @tab X @item G.723.1 @tab X @tab X @item G.729 @tab @tab X @item GSM @tab E @tab X @@ -1250,8 +1323,11 @@ following image formats are supported: @tab encoding and decoding supported through external library libilbc @item IMC (Intel Music Coder) @tab @tab X @item Interplay ACM @tab @tab X -@item MACE (Macintosh Audio Compression/Expansion) 3:1 @tab @tab X +@item LC3 @tab E @tab E + @tab supported through external library liblc3 @item MACE (Macintosh Audio Compression/Expansion) 6:1 @tab @tab X +@item Marian's A-pac audio @tab @tab X +@item MI-SC4 (Micronas SC-4 Audio) @tab @tab X @item MLP (Meridian Lossless Packing) @tab X @tab X @tab Used in DVD-Audio discs. @item Monkey's Audio @tab @tab X @@ -1261,12 +1337,14 @@ following image formats are supported: @item MP3 (MPEG audio layer 3) @tab E @tab IX @tab encoding supported through external library LAME, ADU MP3 and MP3onMP4 also supported @item MPEG-4 Audio Lossless Coding (ALS) @tab @tab X +@item MobiClip FastAudio @tab @tab X @item Musepack SV7 @tab @tab X @item Musepack SV8 @tab @tab X @item Nellymoser Asao @tab X @tab X @item On2 AVC (Audio for Video Codec) @tab @tab X @item Opus @tab E @tab X @tab encoding supported through external library libopus +@item OSQ (Original Sound Quality) @tab @tab X @item PCM A-law @tab X @tab X @item PCM mu-law @tab X @tab X @item PCM Archimedes VIDC @tab X @tab X @@ -1295,6 +1373,7 @@ following image formats are supported: @item PCM unsigned 24-bit little-endian @tab X @tab X @item PCM unsigned 32-bit big-endian @tab X @tab X @item PCM unsigned 32-bit little-endian @tab X @tab X +@item PCM SGA @tab @tab X @item QCELP / PureVoice @tab @tab X @item QDesign Music Codec 1 @tab @tab X @item QDesign Music Codec 2 @tab @tab X @@ -1307,6 +1386,7 @@ following image formats are supported: @tab Real low bitrate AC-3 codec @item RealAudio Lossless @tab @tab X @item RealAudio SIPR / ACELP.NET @tab @tab X +@item RK Audio (RKA) @tab @tab X @item SBC (low-complexity subband codec) @tab X @tab X @tab Used in Bluetooth A2DP @item Shorten @tab @tab X @@ -1327,9 +1407,11 @@ following image formats are supported: @item TwinVQ (VQF flavor) @tab @tab X @item VIMA @tab @tab X @tab Used in LucasArts SMUSH animations. +@item ViewQuest VQC @tab @tab X @item Vorbis @tab E @tab X @tab A native but very primitive encoder exists. @item Voxware MetaSound @tab @tab X +@item Waveform Archiver @tab @tab X @item WavPack @tab X @tab X @item Westwood Audio (SND1) @tab @tab X @item Windows Media Audio 1 @tab X @tab X diff --git a/mythtv/external/FFmpeg/doc/git-howto.texi b/mythtv/external/FFmpeg/doc/git-howto.texi index 874afabbbc3..075b188abe7 100644 --- a/mythtv/external/FFmpeg/doc/git-howto.texi +++ b/mythtv/external/FFmpeg/doc/git-howto.texi @@ -53,7 +53,7 @@ Most distribution and operating system provide a package for it. @section Cloning the source tree @example -git clone git://source.ffmpeg.org/ffmpeg +git clone https://git.ffmpeg.org/ffmpeg.git @end example This will put the FFmpeg sources into the directory @var{}. @@ -66,7 +66,7 @@ This will put the FFmpeg sources into the directory @var{} and let you push back your changes to the remote repository. @example -git clone gil@@ffmpeg.org:ffmpeg-web +git clone git@@ffmpeg.org:ffmpeg-web @end example This will put the source of the FFmpeg website into the directory @@ -187,11 +187,18 @@ to make sure you don't have untracked files or deletions. git add [-i|-p|-A] @end example -Make sure you have told Git your name and email address +Make sure you have told Git your name, email address and GPG key @example git config --global user.name "My Name" git config --global user.email my@@email.invalid +git config --global user.signingkey ABCDEF0123245 +@end example + +Enable signing all commits or use -S + +@example +git config --global commit.gpgsign true @end example Use @option{--global} to set the global configuration for all your Git checkouts. @@ -423,6 +430,19 @@ git checkout -b svn_23456 $SHA1 where @var{$SHA1} is the commit hash from the @command{git log} output. +@chapter gpg key generation + +If you have no gpg key yet, we recommend that you create a ed25519 based key as it +is small, fast and secure. Especially it results in small signatures in git. + +@example +gpg --default-new-key-algo "ed25519/cert,sign+cv25519/encr" --quick-generate-key "human@@server.com" +@end example + +When generating a key, make sure the email specified matches the email used in git as some sites like +github consider mismatches a reason to declare such commits unverified. After generating a key you +can add it to the MAINTAINER file and upload it to a keyserver. + @chapter Pre-push checklist Once you have a set of commits that you feel are ready for pushing, diff --git a/mythtv/external/FFmpeg/doc/indevs.texi b/mythtv/external/FFmpeg/doc/indevs.texi index 8a198c4b441..cdf44a66382 100644 --- a/mythtv/external/FFmpeg/doc/indevs.texi +++ b/mythtv/external/FFmpeg/doc/indevs.texi @@ -222,7 +222,8 @@ $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv @section bktr -BSD video input device. +BSD video input device. Deprecated and will be removed - please contact +the developers if you are interested in maintaining it. @subsection Options @@ -395,6 +396,22 @@ Defaults to @samp{audio}. @item draw_bars If set to @samp{true}, color bars are drawn in the event of a signal loss. Defaults to @samp{true}. +This option is deprecated, please use the @code{signal_loss_action} option. + +@item signal_loss_action +Sets the action to take in the event of a signal loss. Accepts one of the +following values: + +@table @option +@item 1, none +Do nothing on signal loss. This usually results in black frames. +@item 2, bars +Draw color bars on signal loss. Only supported for 8-bit input signals. +@item 3, repeat +Repeat the last video frame on signal loss. +@end table + +Defaults to @samp{bars}. @item queue_size Sets maximum input buffer size in bytes. If the buffering reaches this value, @@ -722,7 +739,7 @@ Win32 GDI-based screen capture device. This device allows you to capture a region of the display on Windows. -There are two options for the input filename: +Amongst options for the imput filenames are such elements as: @example desktop @end example @@ -730,9 +747,13 @@ or @example title=@var{window_title} @end example +or +@example +hwnd=@var{window_hwnd} +@end example The first option will capture the entire desktop, or a fixed region of the -desktop. The second option will instead capture the contents of a single +desktop. The second and third options will instead capture the contents of a single window, regardless of its position on the screen. For example, to grab the entire desktop using @command{ffmpeg}: @@ -991,9 +1012,8 @@ This input device reads data from the open output pads of a libavfilter filtergraph. For each filtergraph open output, the input device will create a -corresponding stream which is mapped to the generated output. Currently -only video data is supported. The filtergraph is specified through the -option @option{graph}. +corresponding stream which is mapped to the generated output. +The filtergraph is specified through the option @option{graph}. @subsection Options @@ -1065,9 +1085,9 @@ ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]" @end example @item -Dump decoded frames to images and closed captions to a file (experimental): +Dump decoded frames to images and Closed Captions to an RCWT backup: @example -ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin +ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rcwt subcc.bin @end example @end itemize diff --git a/mythtv/external/FFmpeg/doc/infra.txt b/mythtv/external/FFmpeg/doc/infra.txt new file mode 100644 index 00000000000..30a85dd5ce9 --- /dev/null +++ b/mythtv/external/FFmpeg/doc/infra.txt @@ -0,0 +1,94 @@ +FFmpeg Infrastructure: +====================== + + + + +Servers: +~~~~~~~~ + + +Main Server: +------------ +Our Main server is hosted at telepoint.bg +for more details see: https://www.ffmpeg.org/#thanks_sponsor_0001 +Nothing runs on our main server directly, instead several VMs run on it. + + +ffmpeg.org VM: +-------------- +Web, mail, and public facing git, also website git + + +fftrac VM: +---------- +trac.ffmpeg.org Issue tracking + + +ffaux VM: +--------- +patchwork.ffmpeg.org Patch tracking +vote.ffmpeg.org Condorcet voting + + +fate: +----- +fate.ffmpeg.org FFmpeg automated testing environment + + +coverage: +--------- +coverage.ffmpeg.org Fate code coverage + + +The main and fate server as well as VMs currently run ubuntu + + + +Cronjobs: +~~~~~~~~~ +Part of the docs is in the main ffmpeg repository as texi files, this part is build by a cronjob. So is the +doxygen stuff as well as the FFmpeg git snapshot. +These 3 scripts are under the ffcron user + + + +Git: +~~~~ +Public facing git is provided by our infra, (https://git.ffmpeg.org/gitweb) +main developer ffmpeg git repository for historic reasons is provided by (git@source.ffmpeg.org:ffmpeg) +Other developer git repositories are provided via git@git.ffmpeg.org: +git mirrors are available on https://github.com/FFmpeg +(there are some exceptions where primary repositories are on github or elsewhere instead of the mirrors) + +Github mirrors are redundantly synced by multiple people + +You need a new git repository related to FFmpeg ? contact root at ffmpeg.org + + +Fate: +~~~~~ +fatesamples are provided via rsync. Every FFmpeg developer who has a shell account in ffmpeg.org +should be in the samples group and be able to upload samples. +See https://www.ffmpeg.org/fate.html#Uploading-new-samples-to-the-fate-suite + + + +Accounts: +~~~~~~~~~ +You need an account for some FFmpeg work? Send mail to root at ffmpeg.org + + + +VMs: +~~~~ +You need a VM, docker container for FFmpeg? contact root at ffmpeg.org +(for docker, CC Andriy) + + + +IRC: +~~~~ +irc channels are at https://libera.chat/ +irc channel archives are at https://libera.irclog.whitequark.org + diff --git a/mythtv/external/FFmpeg/doc/mailing-list-faq.texi b/mythtv/external/FFmpeg/doc/mailing-list-faq.texi index 534ef3f8020..e10d92a5fc7 100644 --- a/mythtv/external/FFmpeg/doc/mailing-list-faq.texi +++ b/mythtv/external/FFmpeg/doc/mailing-list-faq.texi @@ -157,9 +157,6 @@ Perform a site search using your favorite search engine. Example: You can ask for help in the official @t{#ffmpeg} IRC channel on Libera Chat. -Some users prefer the third-party @url{http://www.ffmpeg-archive.org/, Nabble} -interface which presents the mailing lists in a typical forum layout. - There are also numerous third-party help sites such as @url{https://superuser.com/tags/ffmpeg, Super User} and @url{https://www.reddit.com/r/ffmpeg/, r/ffmpeg on reddit}. @@ -344,7 +341,7 @@ recommended. Avoid sending the same message to multiple mailing lists. @item -Please follow our @url{https://ffmpeg.org/developer.html#Code-of-conduct, Code of Conduct}. +Please follow our @url{https://ffmpeg.org/community.html#Code-of-conduct, Code of Conduct}. @end itemize @chapter Help diff --git a/mythtv/external/FFmpeg/doc/metadata.texi b/mythtv/external/FFmpeg/doc/metadata.texi index be91059a98c..e081da7735f 100644 --- a/mythtv/external/FFmpeg/doc/metadata.texi +++ b/mythtv/external/FFmpeg/doc/metadata.texi @@ -1,3 +1,4 @@ +@anchor{metadata} @chapter Metadata @c man begin METADATA diff --git a/mythtv/external/FFmpeg/doc/mips.txt b/mythtv/external/FFmpeg/doc/mips.txt index a84e89ae798..a42546f0cda 100644 --- a/mythtv/external/FFmpeg/doc/mips.txt +++ b/mythtv/external/FFmpeg/doc/mips.txt @@ -48,17 +48,7 @@ Files that have MIPS copyright notice in them: float_dsp_mips.c libm_mips.h softfloat_tables.h -* libavcodec/ - fft_fixed_32.c - fft_init_table.c - fft_table.h - mdct_fixed_32.c * libavcodec/mips/ - aacdec_fixed.c - aacsbr_fixed.c - aacsbr_template.c - aaccoder_mips.c - aacpsy_mips.h ac3dsp_mips.c acelp_filters_mips.c acelp_vectors_mips.c @@ -69,10 +59,6 @@ Files that have MIPS copyright notice in them: compute_antialias_fixed.h compute_antialias_float.h lsp_mips.h - dsputil_mips.c - fft_mips.c - fft_table.h - fft_init_table.c fmtconvert_mips.c iirfilter_mips.c mpegaudiodsp_mips_fixed.c diff --git a/mythtv/external/FFmpeg/doc/multithreading.txt b/mythtv/external/FFmpeg/doc/multithreading.txt index 470194ff857..842d331e4fb 100644 --- a/mythtv/external/FFmpeg/doc/multithreading.txt +++ b/mythtv/external/FFmpeg/doc/multithreading.txt @@ -36,9 +36,9 @@ Frame threading - * Codecs similar to ffv1, whose streams don't reset across frames, will not work because their bitstreams cannot be decoded in parallel. -* The contents of buffers must not be read before ff_thread_await_progress() +* The contents of buffers must not be read before ff_progress_frame_await() has been called on them. reget_buffer() and buffer age optimizations no longer work. -* The contents of buffers must not be written to after ff_thread_report_progress() +* The contents of buffers must not be written to after ff_progress_frame_report() has been called on them. This includes draw_edges(). Porting codecs to frame threading @@ -53,15 +53,13 @@ thread. Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little speed gain at this point but it should work. -If there are inter-frame dependencies, so the codec calls -ff_thread_report/await_progress(), set FF_CODEC_CAP_ALLOCATE_PROGRESS in -AVCodec.caps_internal and use ff_thread_get_buffer() to allocate frames. The -frames must then be freed with ff_thread_release_buffer(). -Otherwise decode directly into the user-supplied frames. +Use ff_thread_get_buffer() (or ff_progress_frame_get_buffer() +in case you have inter-frame dependencies and use the ProgressFrame API) +to allocate frame buffers. -Call ff_thread_report_progress() after some part of the current picture has decoded. +Call ff_progress_frame_report() after some part of the current picture has decoded. A good place to put this is where draw_horiz_band() is called - add this if it isn't called anywhere, as it's useful too and the implementation is trivial when you're doing this. Note that draw_edges() needs to be called before reporting progress. -Before accessing a reference frame or its MVs, call ff_thread_await_progress(). +Before accessing a reference frame or its MVs, call ff_progress_frame_await(). diff --git a/mythtv/external/FFmpeg/doc/muxers.texi b/mythtv/external/FFmpeg/doc/muxers.texi index b2f4326aae1..ce93ba14880 100644 --- a/mythtv/external/FFmpeg/doc/muxers.texi +++ b/mythtv/external/FFmpeg/doc/muxers.texi @@ -19,69 +19,721 @@ enabled demuxers and muxers. A description of some of the currently available muxers follows. +@anchor{raw muxers} +@section Raw muxers + +This section covers raw muxers. They accept a single stream matching +the designated codec. They do not store timestamps or metadata. The +recognized extension is the same as the muxer name unless indicated +otherwise. + +It comprises the following muxers. The media type and the eventual +extensions used to automatically selects the muxer from the output +extensions are also shown. + +@table @samp +@item ac3 @emph{audio} +Dolby Digital, also known as AC-3. + +@item adx @emph{audio} +CRI Middleware ADX audio. + +This muxer will write out the total sample count near the start of the +first packet when the output is seekable and the count can be stored +in 32 bits. + +@item aptx @emph{audio} +aptX (Audio Processing Technology for Bluetooth) + +@item aptx_hd @emph{audio} (aptxdh) +aptX HD (Audio Processing Technology for Bluetooth) audio + +@item avs2 @emph{video} (avs, avs2) +AVS2-P2 (Audio Video Standard - Second generation - Part 2) / +IEEE 1857.4 video + +@item avs3 @emph{video} (avs3) +AVS3-P2 (Audio Video Standard - Third generation - Part 2) / +IEEE 1857.10 video + +@item cavsvideo @emph{video} (cavs) +Chinese AVS (Audio Video Standard - First generation) + +@item codec2raw @emph{audio} +Codec 2 audio. + +No extension is registered so format name has to be supplied e.g. with +the ffmpeg CLI tool @code{-f codec2raw}. + +@item data @emph{any} +Generic data muxer. + +This muxer accepts a single stream with any codec of any type. The +input stream has to be selected using the @code{-map} option with the +@command{ffmpeg} CLI tool. + +No extension is registered so format name has to be supplied e.g. with +the @command{ffmpeg} CLI tool @code{-f data}. + +@item dfpwm @emph{audio} (dfpwm) +Raw DFPWM1a (Dynamic Filter Pulse With Modulation) audio muxer. + +@item dirac @emph{video} (drc, vc2) +BBC Dirac video. + +The Dirac Pro codec is a subset and is standardized as SMPTE VC-2. + +@item dnxhd @emph{video} (dnxhd, dnxhr) +Avid DNxHD video. + +It is standardized as SMPTE VC-3. Accepts DNxHR streams. + +@item dts @emph{audio} +DTS Coherent Acoustics (DCA) audio + +@item eac3 @emph{audio} +Dolby Digital Plus, also known as Enhanced AC-3 + +@item evc @emph{video} (evc) +MPEG-5 Essential Video Coding (EVC) / EVC / MPEG-5 Part 1 EVC video + +@item g722 @emph{audio} +ITU-T G.722 audio + +@item g723_1 @emph{audio} (tco, rco) +ITU-T G.723.1 audio + +@item g726 @emph{audio} +ITU-T G.726 big-endian ("left-justified") audio. + +No extension is registered so format name has to be supplied e.g. with +the @command{ffmpeg} CLI tool @code{-f g726}. + +@item g726le @emph{audio} +ITU-T G.726 little-endian ("right-justified") audio. + +No extension is registered so format name has to be supplied e.g. with +the @command{ffmpeg} CLI tool @code{-f g726le}. + +@item gsm @emph{audio} +Global System for Mobile Communications audio + +@item h261 @emph{video} +ITU-T H.261 video + +@item h263 @emph{video} +ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 video + +@item h264 @emph{video} (h264, 264) +ITU-T H.264 / MPEG-4 Part 10 AVC video. Bitstream shall be converted +to Annex B syntax if it's in length-prefixed mode. + +@item hevc @emph{video} (hevc, h265, 265) +ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted +to Annex B syntax if it's in length-prefixed mode. + +@item m4v @emph{video} +MPEG-4 Part 2 video + +@item mjpeg @emph{video} (mjpg, mjpeg) +Motion JPEG video + +@item mlp @emph{audio} +Meridian Lossless Packing, also known as Packed PCM + +@item mp2 @emph{audio} (mp2, m2a, mpa) +MPEG-1 Audio Layer II audio + +@item mpeg1video @emph{video} (mpg, mpeg, m1v) +MPEG-1 Part 2 video. + +@item mpeg2video @emph{video} (m2v) +ITU-T H.262 / MPEG-2 Part 2 video + +@item obu @emph{video} +AV1 low overhead Open Bitstream Units muxer. + +Temporal delimiter OBUs will be inserted in all temporal units of the +stream. + +@item rawvideo @emph{video} (yuv, rgb) +Raw uncompressed video. + +@item sbc @emph{audio} (sbc, msbc) +Bluetooth SIG low-complexity subband codec audio + +@item truehd @emph{audio} (thd) +Dolby TrueHD audio + +@item vc1 @emph{video} +SMPTE 421M / VC-1 video +@end table + +@subsection Examples + +@itemize +@item +Store raw video frames with the @samp{rawvideo} muxer using @command{ffmpeg}: +@example +ffmpeg -f lavfi -i testsrc -t 10 -s hd1080p testsrc.yuv +@end example + +Since the rawvideo muxer do not store the information related to size +and format, this information must be provided when demuxing the file: +@example +ffplay -video_size 1920x1080 -pixel_format rgb24 -f rawvideo testsrc.rgb +@end example +@end itemize + +@section Raw PCM muxers +This section covers raw PCM (Pulse-Code Modulation) audio muxers. + +They accept a single stream matching the designated codec. They do not +store timestamps or metadata. The recognized extension is the same as +the muxer name. + +It comprises the following muxers. The optional additional extension +used to automatically select the muxer from the output extension is +also shown in parentheses. + +@table @samp +@item alaw (al) +PCM A-law + +@item f32be +PCM 32-bit floating-point big-endian + +@item f32le +PCM 32-bit floating-point little-endian + +@item f64be +PCM 64-bit floating-point big-endian + +@item f64le +PCM 64-bit floating-point little-endian + +@item mulaw (ul) +PCM mu-law + +@item s16be +PCM signed 16-bit big-endian + +@item s16le +PCM signed 16-bit little-endian + +@item s24be +PCM signed 24-bit big-endian + +@item s24le +PCM signed 24-bit little-endian + +@item s32be +PCM signed 32-bit big-endian + +@item s32le +PCM signed 32-bit little-endian + +@item s8 (sb) +PCM signed 8-bit + +@item u16be +PCM unsigned 16-bit big-endian + +@item u16le +PCM unsigned 16-bit little-endian + +@item u24be +PCM unsigned 24-bit big-endian + +@item u24le +PCM unsigned 24-bit little-endian + +@item u32be +PCM unsigned 32-bit big-endian + +@item u32le +PCM unsigned 32-bit little-endian + +@item u8 (ub) +PCM unsigned 8-bit + +@item vidc +PCM Archimedes VIDC +@end table + +@section MPEG-1/MPEG-2 program stream muxers + +This section covers formats belonging to the MPEG-1 and MPEG-2 Systems +family. + +The MPEG-1 Systems format (also known as ISO/IEEC 11172-1 or MPEG-1 +program stream) has been adopted for the format of media track stored +in VCD (Video Compact Disc). + +The MPEG-2 Systems standard (also known as ISO/IEEC 13818-1) covers +two containers formats, one known as transport stream and one known as +program stream; only the latter is covered here. + +The MPEG-2 program stream format (also known as VOB due to the +corresponding file extension) is an extension of MPEG-1 program +stream: in addition to support different codecs for the audio and +video streams, it also stores subtitles and navigation metadata. +MPEG-2 program stream has been adopted for storing media streams in +SVCD and DVD storage devices. + +This section comprises the following muxers. + +@table @samp +@item mpeg (mpg,mpeg) +MPEG-1 Systems / MPEG-1 program stream muxer. + +@item vcd +MPEG-1 Systems / MPEG-1 program stream (VCD) muxer. + +This muxer can be used to generate tracks in the format accepted by +the VCD (Video Compact Disc) storage devices. + +It is the same as the @samp{mpeg} muxer with a few differences. + +@item vob +MPEG-2 program stream (VOB) muxer. + +@item dvd +MPEG-2 program stream (DVD VOB) muxer. + +This muxer can be used to generate tracks in the format accepted by +the DVD (Digital Versatile Disc) storage devices. + +This is the same as the @samp{vob} muxer with a few differences. + +@item svcd (vob) +MPEG-2 program stream (SVCD VOB) muxer. + +This muxer can be used to generate tracks in the format accepted by +the SVCD (Super Video Compact Disc) storage devices. + +This is the same as the @samp{vob} muxer with a few differences. +@end table + +@subsection Options +@table @option +@item muxrate @var{rate} +Set user-defined mux rate expressed as a number of bits/s. If not +specied the automatically computed mux rate is employed. Default value +is @code{0}. + +@item preload @var{delay} +Set initial demux-decode delay in microseconds. Default value is +@code{500000}. +@end table + +@section MOV/MPEG-4/ISOMBFF muxers + +This section covers formats belonging to the QuickTime / MOV family, +including the MPEG-4 Part 14 format and ISO base media file format +(ISOBMFF). These formats share a common structure based on the ISO +base media file format (ISOBMFF). + +The MOV format was originally developed for use with Apple QuickTime. +It was later used as the basis for the MPEG-4 Part 1 (later Part 14) +format, also known as ISO/IEC 14496-1. That format was then +generalized into ISOBMFF, also named MPEG-4 Part 12 format, ISO/IEC +14496-12, or ISO/IEC 15444-12. + +It comprises the following muxers. + +@table @samp +@item 3gp +Third Generation Partnership Project (3GPP) format for 3G UMTS +multimedia services + +@item 3g2 +Third Generation Partnership Project 2 (3GP2 or 3GPP2) format for 3G +CDMA2000 multimedia services, similar to @samp{3gp} with extensions +and limitations + +@item f4v +Adobe Flash Video format + +@item ipod +MPEG-4 audio file format, as MOV/MP4 but limited to contain only audio +streams, typically played with the Apple ipod device + +@item ismv +Microsoft IIS (Internet Information Services) Smooth Streaming +Audio/Video (ISMV or ISMA) format. This is based on MPEG-4 Part 14 +format with a few incompatible variants, used to stream media files +for the Microsoft IIS server. + +@item mov +QuickTime player format identified by the @code{.mov} extension + +@item mp4 +MP4 or MPEG-4 Part 14 format + +@item psp +PlayStation Portable MP4/MPEG-4 Part 14 format variant. This is based +on MPEG-4 Part 14 format with a few incompatible variants, used to +play files on PlayStation devices. +@end table + +@subsection Fragmentation + +The @samp{mov}, @samp{mp4}, and @samp{ismv} muxers support +fragmentation. Normally, a MOV/MP4 file has all the metadata about all +packets stored in one location. + +This data is usually written at the end of the file, but it can be +moved to the start for better playback by adding @code{+faststart} to +the @code{-movflags}, or using the @command{qt-faststart} tool). + +A fragmented file consists of a number of fragments, where packets and +metadata about these packets are stored together. Writing a fragmented +file has the advantage that the file is decodable even if the writing +is interrupted (while a normal MOV/MP4 is undecodable if it is not +properly finished), and it requires less memory when writing very long +files (since writing normal MOV/MP4 files stores info about every +single packet in memory until the file is closed). The downside is +that it is less compatible with other applications. + +Fragmentation is enabled by setting one of the options that define +how to cut the file into fragments: +@table @option +@item frag_duration +@item frag_size +@item min_frag_duration +@item movflags +frag_keyframe +@item movflags +frag_custom +@end table + +If more than one condition is specified, fragments are cut when one of +the specified conditions is fulfilled. The exception to this is the +option @option{min_frag_duration}, which has to be fulfilled for any +of the other conditions to apply. + +@subsection Options + +@table @option + +@item brand @var{brand_string} +Override major brand. + +@item empty_hdlr_name @var{bool} +Enable to skip writing the name inside a @code{hdlr} box. +Default is @code{false}. + +@item encryption_key @var{key} +set the media encryption key in hexadecimal format + +@item encryption_kid @var{kid} +set the media encryption key identifier in hexadecimal format + +@item encryption_scheme @var{scheme} +configure the encryption scheme, allowed values are @samp{none}, and +@samp{cenc-aes-ctr} + +@item frag_duration @var{duration} +Create fragments that are @var{duration} microseconds long. + +@item frag_interleave @var{number} +Interleave samples within fragments (max number of consecutive +samples, lower is tighter interleaving, but with more overhead. It is +set to @code{0} by default. + +@item frag_size @var{size} +create fragments that contain up to @var{size} bytes of payload data + +@item iods_audio_profile @var{profile} +specify iods number for the audio profile atom (from -1 to 255), +default is @code{-1} + +@item iods_video_profile @var{profile} +specify iods number for the video profile atom (from -1 to 255), +default is @code{-1} + +@item ism_lookahead @var{num_entries} +specify number of lookahead entries for ISM files (from 0 to 255), +default is @code{0} + +@item min_frag_duration @var{duration} +do not create fragments that are shorter than @var{duration} microseconds long + +@item moov_size @var{bytes} +Reserves space for the moov atom at the beginning of the file instead of placing the +moov atom at the end. If the space reserved is insufficient, muxing will fail. + +@item mov_gamma @var{gamma} +specify gamma value for gama atom (as a decimal number from 0 to 10), +default is @code{0.0}, must be set together with @code{+ movflags} + +@item movflags @var{flags} +Set various muxing switches. The following flags can be used: +@table @samp +@item cmaf +write CMAF (Common Media Application Format) compatible fragmented +MP4 output + +@item dash +write DASH (Dynamic Adaptive Streaming over HTTP) compatible fragmented +MP4 output + +@item default_base_moof +Similarly to the @samp{omit_tfhd_offset} flag, this flag avoids +writing the absolute base_data_offset field in tfhd atoms, but does so +by using the new default-base-is-moof flag instead. This flag is new +from 14496-12:2012. This may make the fragments easier to parse in +certain circumstances (avoiding basing track fragment location +calculations on the implicit end of the previous track fragment). + +@item delay_moov +delay writing the initial moov until the first fragment is cut, or +until the first fragment flush + +@item disable_chpl +Disable Nero chapter markers (chpl atom). Normally, both Nero chapters +and a QuickTime chapter track are written to the file. With this +option set, only the QuickTime chapter track will be written. Nero +chapters can cause failures when the file is reprocessed with certain +tagging programs, like mp3Tag 2.61a and iTunes 11.3, most likely other +versions are affected as well. + +@item faststart +Run a second pass moving the index (moov atom) to the beginning of the +file. This operation can take a while, and will not work in various +situations such as fragmented output, thus it is not enabled by +default. + +@item frag_custom +Allow the caller to manually choose when to cut fragments, by calling +@code{av_write_frame(ctx, NULL)} to write a fragment with the packets +written so far. (This is only useful with other applications +integrating libavformat, not from @command{ffmpeg}.) + +@item frag_discont +signal that the next fragment is discontinuous from earlier ones + +@item frag_every_frame +fragment at every frame + +@item frag_keyframe +start a new fragment at each video keyframe + +@item global_sidx +write a global sidx index at the start of the file + +@item isml +create a live smooth streaming feed (for pushing to a publishing point) + +@item negative_cts_offsets +Enables utilization of version 1 of the CTTS box, in which the CTS offsets can +be negative. This enables the initial sample to have DTS/CTS of zero, and +reduces the need for edit lists for some cases such as video tracks with +B-frames. Additionally, eases conformance with the DASH-IF interoperability +guidelines. + +This option is implicitly set when writing @samp{ismv} (Smooth +Streaming) files. + +@item omit_tfhd_offset +Do not write any absolute base_data_offset in tfhd atoms. This avoids +tying fragments to absolute byte positions in the file/streams. + +@item prefer_icc +If writing colr atom prioritise usage of ICC profile if it exists in +stream packet side data. + +@item rtphint +add RTP hinting tracks to the output file + +@item separate_moof +Write a separate moof (movie fragment) atom for each track. Normally, +packets for all tracks are written in a moof atom (which is slightly +more efficient), but with this option set, the muxer writes one +moof/mdat pair for each track, making it easier to separate tracks. + +@item skip_sidx +Skip writing of sidx atom. When bitrate overhead due to sidx atom is +high, this option could be used for cases where sidx atom is not +mandatory. When the @samp{global_sidx} flag is enabled, this option +is ignored. + +@item skip_trailer +skip writing the mfra/tfra/mfro trailer for fragmented files + +@item use_metadata_tags +use mdta atom for metadata + +@item write_colr +write colr atom even if the color info is unspecified. This flag is +experimental, may be renamed or changed, do not use from scripts. + +@item write_gama +write deprecated gama atom + +@item hybrid_fragmented +For recoverability - write the output file as a fragmented file. +This allows the intermediate file to be read while being written +(in particular, if the writing process is aborted uncleanly). When +writing is finished, the file is converted to a regular, non-fragmented +file, which is more compatible and allows easier and quicker seeking. + +If writing is aborted, the intermediate file can manually be +remuxed to get a regular, non-fragmented file of what had been +written into the unfinished file. +@end table + +@item movie_timescale @var{scale} +Set the timescale written in the movie header box (@code{mvhd}). +Range is 1 to INT_MAX. Default is @code{1000}. + +@item rtpflags @var{flags} +Add RTP hinting tracks to the output file. + +The following flags can be used: +@table @samp +@item h264_mode0 +use mode 0 for H.264 in RTP + +@item latm +use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC + +@item rfc2190 +use RFC 2190 packetization instead of RFC 4629 for H.263 + +@item send_bye +send RTCP BYE packets when finishing + +@item skip_rtcp +do not send RTCP sender reports +@end table + +@item skip_iods @var{bool} +skip writing iods atom (default value is @code{true}) + +@item use_editlist @var{bool} +use edit list (default value is @code{auto}) + +@item use_stream_ids_as_track_ids @var{bool} +use stream ids as track ids (default value is @code{false}) + +@item video_track_timescale @var{scale} +Set the timescale used for video tracks. Range is @code{0} to INT_MAX. If +set to @code{0}, the timescale is automatically set based on the +native stream time base. Default is @code{0}. + +@item write_btrt @var{bool} +Force or disable writing bitrate box inside stsd box of a track. The +box contains decoding buffer size (in bytes), maximum bitrate and +average bitrate for the track. The box will be skipped if none of +these values can be computed. Default is @code{-1} or @code{auto}, +which will write the box only in MP4 mode. + +@item write_prft @var{option} +Write producer time reference box (PRFT) with a specified time source for the +NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource +as wallclock time and @samp{pts} to specify timesource as input packets' PTS +values. + +@item write_tmcd @var{bool} +Specify @code{on} to force writing a timecode track, @code{off} to disable it +and @code{auto} to write a timecode track only for mov and mp4 output (default). + +Setting value to @samp{pts} is applicable only for a live encoding use case, +where PTS values are set as as wallclock time at the source. For example, an +encoding use case with decklink capture source where @option{video_pts} and +@option{audio_pts} are set to @samp{abs_wallclock}. +@end table + +@subsection Examples + +@itemize +@item +Push Smooth Streaming content in real time to a publishing point on +IIS with the @samp{ismv} muxer using @command{ffmpeg}: +@example +ffmpeg -re @var{} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1) +@end example +@end itemize + @anchor{a64} @section a64 +A64 Commodore 64 video muxer. -A64 muxer for Commodore 64 video. Accepts a single @code{a64_multi} or @code{a64_multi5} codec video stream. +This muxer accepts a single @code{a64_multi} or @code{a64_multi5} +codec video stream. -@anchor{adts} -@section adts +@section ac4 +Raw AC-4 audio muxer. -Audio Data Transport Stream muxer. It accepts a single AAC stream. +This muxer accepts a single @code{ac4} audio stream. @subsection Options +@table @option +@item write_crc @var{bool} +when enabled, write a CRC checksum for each packet to the output, +default is @code{false} +@end table + +@anchor{adts} +@section adts +Audio Data Transport Stream muxer. -It accepts the following options: +It accepts a single AAC stream. +@subsection Options @table @option - @item write_id3v2 @var{bool} -Enable to write ID3v2.4 tags at the start of the stream. Default is disabled. +Enable to write ID3v2.4 tags at the start of the stream. Default is +disabled. @item write_apetag @var{bool} -Enable to write APE tags at the end of the stream. Default is disabled. +Enable to write APE tags at the end of the stream. Default is +disabled. @item write_mpeg2 @var{bool} -Enable to set MPEG version bit in the ADTS frame header to 1 which indicates MPEG-2. Default is 0, which indicates MPEG-4. - +Enable to set MPEG version bit in the ADTS frame header to 1 which +indicates MPEG-2. Default is 0, which indicates MPEG-4. @end table +@anchor{aea} +@section aea +MD STUDIO audio muxer. + +This muxer accepts a single ATRAC1 audio stream with either one or two channels +and a sample rate of 44100Hz. + +As AEA supports storing the track title, this muxer will also write +the title from stream's metadata to the container. + @anchor{aiff} @section aiff - Audio Interchange File Format muxer. @subsection Options - -It accepts the following options: - @table @option -@item write_id3v2 +@item write_id3v2 @var{bool} Enable ID3v2 tags writing when set to 1. Default is 0 (disabled). -@item id3v2_version +@item id3v2_version @var{bool} Select ID3v2 version to write. Currently only version 3 and 4 (aka. ID3v2.3 and ID3v2.4) are supported. The default is version 4. - @end table @anchor{alp} @section alp +High Voltage Software's Lego Racers game audio muxer. -Muxer for audio of High Voltage Software's Lego Racers game. It accepts a single ADPCM_IMA_ALP stream -with no more than 2 channels nor a sample rate greater than 44100 Hz. +It accepts a single ADPCM_IMA_ALP stream with no more than 2 channels +and a sample rate not greater than 44100 Hz. -Extensions: tun, pcm +Extensions: @code{tun}, @code{pcm} @subsection Options - -It accepts the following options: - @table @option - @item type @var{type} Set file type. +@var{type} accepts the following values: @table @samp @item tun Set file type as music. Must have a sample rate of 22050 Hz. @@ -90,43 +742,171 @@ Set file type as music. Must have a sample rate of 22050 Hz. Set file type as sfx. @item auto -Set file type as per output file extension. @code{.pcm} results in type @code{pcm} else type @code{tun} is set. @var{(default)} +Set file type as per output file extension. @code{.pcm} results in +type @code{pcm} else type @code{tun} is set. @var{(default)} +@end table +@end table + +@section amr +3GPP AMR (Adaptive Multi-Rate) audio muxer. + +It accepts a single audio stream containing an AMR NB stream. + +@section amv +AMV (Actions Media Video) format muxer. + +@section apm +Ubisoft Rayman 2 APM audio muxer. + +It accepts a single ADPCM IMA APM audio stream. + +@section apng +Animated Portable Network Graphics muxer. + +It accepts a single APNG video stream. + +@subsection Options +@table @option +@item final_delay @var{delay} +Force a delay expressed in seconds after the last frame of each +repetition. Default value is @code{0.0}. + +@item plays @var{repetitions} +specify how many times to play the content, @code{0} causes an infinte +loop, with @code{1} there is no loop +@end table + +@subsection Examples +@itemize +@item +Use @command{ffmpeg} to generate an APNG output with 2 repetitions, +and with a delay of half a second after the first repetition: +@example +ffmpeg -i INPUT -final_delay 0.5 -plays 2 out.apng +@end example +@end itemize + +@section argo_asf +Argonaut Games ASF audio muxer. + +It accepts a single ADPCM audio stream. + +@subsection Options +@table @option +@item version_major @var{version} +override file major version, specified as an integer, default value is +@code{2} + +@item version_minor @var{version} +override file minor version, specified as an integer, default value is +@code{1} +@item name @var{name} +Embed file name into file, if not specified use the output file +name. The name is truncated to 8 characters. @end table +@section argo_cvg +Argonaut Games CVG audio muxer. + +It accepts a single one-channel ADPCM 22050Hz audio stream. + +The @option{loop} and @option{reverb} options set the corresponding +flags in the header which can be later retrieved to process the audio +stream accordingly. + +@subsection Options +@table @option +@item skip_rate_check @var{bool} +skip sample rate check (default is @code{false}) + +@item loop @var{bool} +set loop flag (default is @code{false}) + +@item reverb @var{boolean} +set reverb flag (default is @code{true}) @end table @anchor{asf} -@section asf +@section asf, asf_stream +Advanced / Active Systems (or Streaming) Format audio muxer. -Advanced Systems Format muxer. +The @samp{asf_stream} variant should be selected for streaming. Note that Windows Media Audio (wma) and Windows Media Video (wmv) use this muxer too. @subsection Options +@table @option +@item packet_size @var{size} +Set the muxer packet size as a number of bytes. By tuning this setting +you may reduce data fragmentation or muxer overhead depending on your +source. Default value is @code{3200}, minimum is @code{100}, maximum +is @code{64Ki}. +@end table + +@section ass +ASS/SSA (SubStation Alpha) subtitles muxer. -It accepts the following options: +It accepts a single ASS subtitles stream. +@subsection Options @table @option -@item packet_size -Set the muxer packet size. By tuning this setting you may reduce data -fragmentation or muxer overhead depending on your source. Default value is -3200, minimum is 100, maximum is 64k. +@item ignore_readorder @var{bool} +Write dialogue events immediately, even if they are out-of-order, +default is @code{false}, otherwise they are cached until the expected +time event is found. +@end table + +@section ast +AST (Audio Stream) muxer. +This format is used to play audio on some Nintendo Wii games. + +It accepts a single audio stream. + +The @option{loopstart} and @option{loopend} options can be used to +define a section of the file to loop for players honoring such +options. + +@subsection Options +@table @option +@item loopstart @var{start} +Specify loop start position expressesd in milliseconds, from @code{-1} +to @code{INT_MAX}, in case @code{-1} is set then no loop is specified +(default -1) and the @option{loopend} value is ignored. + +@item loopend @var{end} +Specify loop end position expressed in milliseconds, from @code{0} to +@code{INT_MAX}, default is @code{0}, in case @code{0} is set it +assumes the total stream duration. @end table +@section au +SUN AU audio muxer. + +It accepts a single audio stream. + @anchor{avi} @section avi - Audio Video Interleaved muxer. -@subsection Options +AVI is a proprietary format developed by Microsoft, and later formally specified +through the Open DML specification. -It accepts the following options: +Because of differences in players implementations, it might be required to set +some options to make sure that the generated output can be correctly played by +the target player. +@subsection Options @table @option -@item reserve_index_space +@item flipped_raw_rgb @var{bool} +If set to @code{true}, store positive height for raw RGB bitmaps, which +indicates bitmap is stored bottom-up. Note that this option does not flip the +bitmap which has to be done manually beforehand, e.g. by using the @samp{vflip} +filter. Default is @code{false} and indicates bitmap is stored top down. + +@item reserve_index_space @var{size} Reserve the specified amount of bytes for the OpenDML master index of each stream within the file header. By default additional master indexes are embedded within the data packets if there is no space left in the first master @@ -139,65 +919,109 @@ The required index space depends on the output file size and should be about 16 bytes per gigabyte. When this option is omitted or set to zero the necessary index space is guessed. -@item write_channel_mask +Default value is @code{0}. + +@item write_channel_mask @var{bool} Write the channel layout mask into the audio stream header. This option is enabled by default. Disabling the channel mask can be useful in specific scenarios, e.g. when merging multiple audio streams into one for compatibility with software that only supports a single audio stream in AVI (see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}). +@end table -@item flipped_raw_rgb -If set to true, store positive height for raw RGB bitmaps, which indicates -bitmap is stored bottom-up. Note that this option does not flip the bitmap -which has to be done manually beforehand, e.g. by using the vflip filter. -Default is @var{false} and indicates bitmap is stored top down. +@section avif +AV1 (Alliance for Open Media Video codec 1) image format muxer. + +This muxers stores images encoded using the AV1 codec. + +It accepts one or two video streams. In case two video streams are +provided, the second one shall contain a single plane storing the +alpha mask. + +In case more than one image is provided, the generated output is +considered an animated AVIF and the number of loops can be specified +with the @option{loop} option. + +This is based on the specification by Alliance for Open Media at url +@url{https://aomediacodec.github.io/av1-avif}. + +@subsection Options +@table @option +@item loop @var{count} +number of times to loop an animated AVIF, @code{0} specify an infinite +loop, default is @code{0} +@item movie_timescale @var{timescale} +Set the timescale written in the movie header box (@code{mvhd}). +Range is 1 to INT_MAX. Default is @code{1000}. @end table +@section avm2 +ShockWave Flash (SWF) / ActionScript Virtual Machine 2 (AVM2) format muxer. + +It accepts one audio stream, one video stream, or both. + +@section bit +G.729 (.bit) file format muxer. + +It accepts a single G.729 audio stream. + +@section caf +Apple CAF (Core Audio Format) muxer. + +It accepts a single audio stream. + +@section codec2 +Codec2 audio audio muxer. + +It accepts a single codec2 audio stream. + @anchor{chromaprint} @section chromaprint +Chromaprint fingerprinter muxers. -Chromaprint fingerprinter. +To enable compilation of this filter you need to configure FFmpeg with +@code{--enable-chromaprint}. -This muxer feeds audio data to the Chromaprint library, -which generates a fingerprint for the provided audio data. See @url{https://acoustid.org/chromaprint} +This muxer feeds audio data to the Chromaprint library, which +generates a fingerprint for the provided audio data. See: +@url{https://acoustid.org/chromaprint} -It takes a single signed native-endian 16-bit raw audio stream of at most 2 channels. +It takes a single signed native-endian 16-bit raw audio stream of at +most 2 channels. @subsection Options - @table @option -@item silence_threshold -Threshold for detecting silence. Range is from -1 to 32767, where -1 disables -silence detection. Silence detection can only be used with version 3 of the -algorithm. -Silence detection must be disabled for use with the AcoustID service. Default is -1. - -@item algorithm -Version of algorithm to fingerprint with. Range is 0 to 4. -Version 3 enables silence detection. Default is 1. +@item algorithm @var{version} +Select version of algorithm to fingerprint with. Range is @code{0} to +@code{4}. Version @code{3} enables silence detection. Default is @code{1}. -@item fp_format +@item fp_format @var{format} Format to output the fingerprint as. Accepts the following options: @table @samp -@item raw -Binary raw fingerprint - -@item compressed -Binary compressed fingerprint - @item base64 Base64 compressed fingerprint @emph{(default)} +@item compressed +Binary compressed fingerprint + +@item raw +Binary raw fingerprint @end table +@item silence_threshold @var{threshold} +Threshold for detecting silence. Range is from @code{-1} to +@code{32767}, where @code{-1} disables silence detection. Silence +detection can only be used with version @code{3} of the algorithm. + +Silence detection must be disabled for use with the AcoustID +service. Default is @code{-1}. @end table @anchor{crc} @section crc - -CRC (Cyclic Redundancy Check) testing format. +CRC (Cyclic Redundancy Check) muxer. This muxer computes and prints the Adler-32 CRC of all the input audio and video frames. By default audio frames are converted to signed @@ -211,34 +1035,39 @@ CRC=0x@var{CRC}, where @var{CRC} is a hexadecimal number 0-padded to See also the @ref{framecrc} muxer. @subsection Examples - -For example to compute the CRC of the input, and store it in the file -@file{out.crc}: +@itemize +@item +Use @command{ffmpeg} to compute the CRC of the input, and store it in +the file @file{out.crc}: @example ffmpeg -i INPUT -f crc out.crc @end example -You can print the CRC to stdout with the command: +@item +Use @command{ffmpeg} to print the CRC to stdout with the command: @example ffmpeg -i INPUT -f crc - @end example +@item You can select the output format of each frame with @command{ffmpeg} by -specifying the audio and video codec and format. For example to +specifying the audio and video codec and format. For example, to compute the CRC of the input audio converted to PCM unsigned 8-bit and the input video converted to MPEG-2 video, use the command: @example ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc - @end example +@end itemize @anchor{dash} @section dash +Dynamic Adaptive Streaming over HTTP (DASH) muxer. -Dynamic Adaptive Streaming over HTTP (DASH) muxer that creates segments -and manifest files according to the MPEG-DASH standard ISO/IEC 23009-1:2014. +This muxer creates segments and manifest files according to the +MPEG-DASH standard ISO/IEC 23009-1:2014 and following standard +updates. For more information see: - @itemize @bullet @item ISO DASH Specification: @url{http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip} @@ -246,279 +1075,547 @@ ISO DASH Specification: @url{http://standards.iso.org/ittf/PubliclyAvailableStan WebM DASH Specification: @url{https://sites.google.com/a/webmproject.org/wiki/adaptive-streaming/webm-dash-specification} @end itemize -It creates a MPD manifest file and segment files for each stream. +This muxer creates an MPD (Media Presentation Description) manifest +file and segment files for each stream. Segment files are placed in +the same directory of the MPD manifest file. + +The segment filename might contain pre-defined identifiers used in the +manifest @code{SegmentTemplate} section as defined in section +5.3.9.4.4 of the standard. + +Available identifiers are @code{$RepresentationID$}, @code{$Number$}, +@code{$Bandwidth$}, and @code{$Time$}. In addition to the standard +identifiers, an ffmpeg-specific @code{$ext$} identifier is also +supported. When specified, @command{ffmpeg} will replace @code{$ext$} +in the file name with muxing format's extensions such as @code{mp4}, +@code{webm} etc. + +@subsection Options +@table @option +@item adaptation_sets @var{adaptation_sets} +Assign streams to adaptation sets, specified in the MPD manifest +@code{AdaptationSets} section. -The segment filename might contain pre-defined identifiers used with SegmentTemplate -as defined in section 5.3.9.4.4 of the standard. Available identifiers are "$RepresentationID$", -"$Number$", "$Bandwidth$" and "$Time$". -In addition to the standard identifiers, an ffmpeg-specific "$ext$" identifier is also supported. -When specified ffmpeg will replace $ext$ in the file name with muxing format's extensions such as mp4, webm etc., +An adaptation set contains a set of one or more streams accessed as a +single subset, e.g. corresponding streams encoded at different size +selectable by the user depending on the available bandwidth, or to +different audio streams with a different language. +Each adaptation set is specified with the syntax: @example -ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ --b:v:0 800k -b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline \ --profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \ --b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 \ --window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" \ --f dash /path/to/out.mpd +id=@var{index},streams=@var{streams} @end example +where @var{index} must be a numerical index, and @var{streams} is a +sequence of @code{,}-separated stream indices. Multiple adaptation +sets can be specified, separated by spaces. + +To map all video (or audio) streams to an adaptation set, @code{v} (or +@code{a}) can be used as stream identifier instead of IDs. + +When no assignment is defined, this defaults to an adaptation set for +each stream. + +The following optional fields can also be specified: + @table @option -@item seg_duration @var{duration} -Set the segment length in seconds (fractional value can be set). The value is -treated as average segment duration when @var{use_template} is enabled and -@var{use_timeline} is disabled and as minimum segment duration for all the other -use cases. -@item frag_duration @var{duration} -Set the length in seconds of fragments within segments (fractional value can be set). -@item frag_type @var{type} -Set the type of interval for fragmentation. -@item window_size @var{size} -Set the maximum number of segments kept in the manifest. -@item extra_window_size @var{size} -Set the maximum number of segments kept outside of the manifest before removing from disk. -@item remove_at_exit @var{remove} -Enable (1) or disable (0) removal of all segments when finished. -@item use_template @var{template} -Enable (1) or disable (0) use of SegmentTemplate instead of SegmentList. -@item use_timeline @var{timeline} -Enable (1) or disable (0) use of SegmentTimeline in SegmentTemplate. -@item single_file @var{single_file} -Enable (1) or disable (0) storing all segments in one file, accessed using byte ranges. -@item single_file_name @var{file_name} -DASH-templated name to be used for baseURL. Implies @var{single_file} set to "1". In the template, "$ext$" is replaced with the file name extension specific for the segment format. -@item init_seg_name @var{init_name} -DASH-templated name to used for the initialization segment. Default is "init-stream$RepresentationID$.$ext$". "$ext$" is replaced with the file name extension specific for the segment format. -@item media_seg_name @var{segment_name} -DASH-templated name to used for the media segments. Default is "chunk-stream$RepresentationID$-$Number%05d$.$ext$". "$ext$" is replaced with the file name extension specific for the segment format. -@item utc_timing_url @var{utc_url} -URL of the page that will return the UTC timestamp in ISO format. Example: "https://time.akamai.com/?iso" -@item method @var{method} -Use the given HTTP method to create output files. Generally set to PUT or POST. -@item http_user_agent @var{user_agent} -Override User-Agent field in HTTP header. Applicable only for HTTP output. -@item http_persistent @var{http_persistent} -Use persistent HTTP connections. Applicable only for HTTP output. -@item hls_playlist @var{hls_playlist} -Generate HLS playlist files as well. The master playlist is generated with the filename @var{hls_master_name}. -One media playlist file is generated for each stream with filenames media_0.m3u8, media_1.m3u8, etc. -@item hls_master_name @var{file_name} -HLS master playlist name. Default is "master.m3u8". -@item streaming @var{streaming} -Enable (1) or disable (0) chunk streaming mode of output. In chunk streaming -mode, each frame will be a moof fragment which forms a chunk. -@item adaptation_sets @var{adaptation_sets} -Assign streams to AdaptationSets. Syntax is "id=x,streams=a,b,c id=y,streams=d,e" with x and y being the IDs -of the adaptation sets and a,b,c,d and e are the indices of the mapped streams. +@item descriptor +Define the descriptor as defined by ISO/IEC 23009-1:2014/Amd.2:2015. -To map all video (or audio) streams to an AdaptationSet, "v" (or "a") can be used as stream identifier instead of IDs. +For example: +@example + +@end example -When no assignment is defined, this defaults to an AdaptationSet for each stream. +The descriptor string should be a self-closing XML tag. -Optional syntax is "id=x,seg_duration=x,frag_duration=x,frag_type=type,descriptor=descriptor_string,streams=a,b,c id=y,seg_duration=y,frag_type=type,streams=d,e" and so on, -descriptor is useful to the scheme defined by ISO/IEC 23009-1:2014/Amd.2:2015. -For example, -adaptation_sets "id=0,descriptor=,streams=v". -Please note that descriptor string should be a self-closing xml tag. -seg_duration, frag_duration and frag_type override the global option values for each adaptation set. -For example, -adaptation_sets "id=0,seg_duration=2,frag_duration=1,frag_type=duration,streams=v id=1,seg_duration=2,frag_type=none,streams=a" -type_id marks an adaptation set as containing streams meant to be used for Trick Mode for the referenced adaptation set. -For example, -adaptation_sets "id=0,seg_duration=2,frag_type=none,streams=0 id=1,seg_duration=10,frag_type=none,trick_id=0,streams=1" -@item timeout @var{timeout} -Set timeout for socket I/O operations. Applicable only for HTTP output. -@item index_correction @var{index_correction} -Enable (1) or Disable (0) segment index correction logic. Applicable only when -@var{use_template} is enabled and @var{use_timeline} is disabled. +@item frag_duration +Override the global fragment duration specified with the +@option{frag_duration} option. + +@item frag_type +Override the global fragment type specified with the +@option{frag_type} option. + +@item seg_duration +Override the global segment duration specified with the +@option{seg_duration} option. + +@item trick_id +Mark an adaptation set as containing streams meant to be used for +Trick Mode for the referenced adaptation set. +@end table + +A few examples of possible values for the @option{adaptation_sets} +option follow: +@example +id=0,seg_duration=2,frag_duration=1,frag_type=duration,streams=v id=1,seg_duration=2,frag_type=none,streams=a +@end example + +@example +id=0,seg_duration=2,frag_type=none,streams=0 id=1,seg_duration=10,frag_type=none,trick_id=0,streams=1 +@end example + +@item dash_segment_type @var{type} +Set DASH segment files type. -When enabled, the logic monitors the flow of segment indexes. If a streams's -segment index value is not at the expected real time position, then the logic -corrects that index value. +Possible values: +@table @samp +@item auto +The dash segment files format will be selected based on the stream +codec. This is the default mode. +@item mp4 +the dash segment files will be in ISOBMFF/MP4 format +@item webm +the dash segment files will be in WebM format +@end table + +@item extra_window_size @var{size} +Set the maximum number of segments kept outside of the manifest before +removing from disk. -Typically this logic is needed in live streaming use cases. The network bandwidth -fluctuations are common during long run streaming. Each fluctuation can cause -the segment indexes fall behind the expected real time position. @item format_options @var{options_list} -Set container format (mp4/webm) options using a @code{:} separated list of +Set container format (mp4/webm) options using a @code{:}-separated list of key=value parameters. Values containing @code{:} special characters must be escaped. -@item global_sidx @var{global_sidx} -Write global SIDX atom. Applicable only for single file, mp4 output, non-streaming mode. +@item frag_duration @var{duration} +Set the length in seconds of fragments within segments, fractional +value can also be set. + +@item frag_type @var{type} +Set the type of interval for fragmentation. -@item dash_segment_type @var{dash_segment_type} Possible values: -@table @option +@table @samp @item auto -If this flag is set, the dash segment files format will be selected based on the stream codec. This is the default mode. +set one fragment per segment -@item mp4 -If this flag is set, the dash segment files will be in in ISOBMFF format. +@item every_frame +fragment at every frame -@item webm -If this flag is set, the dash segment files will be in in WebM format. +@item duration +fragment at specific time intervals + +@item pframes +fragment at keyframes and following P-Frame reordering (Video only, +experimental) @end table -@item ignore_io_errors @var{ignore_io_errors} -Ignore IO errors during open and write. Useful for long-duration runs with network output. +@item global_sidx @var{bool} +Write global @code{SIDX} atom. Applicable only for single file, mp4 +output, non-streaming mode. + +@item hls_master_name @var{file_name} +HLS master playlist name. Default is @file{master.m3u8}. + +@item hls_playlist @var{bool} +Generate HLS playlist files. The master playlist is generated with +filename specified by the @option{hls_master_name} option. One media +playlist file is generated for each stream with filenames +@file{media_0.m3u8}, @file{media_1.m3u8}, etc. + +@item http_opts @var{http_opts} +Specify a list of @code{:}-separated key=value options to pass to the +underlying HTTP protocol. Applicable only for HTTP output. + +@item http_persistent @var{bool} +Use persistent HTTP connections. Applicable only for HTTP output. + +@item http_user_agent @var{user_agent} +Override User-Agent field in HTTP header. Applicable only for HTTP +output. + +@item ignore_io_errors @var{bool} +Ignore IO errors during open and write. Useful for long-duration runs +with network output. This is disabled by default. -@item lhls @var{lhls} -Enable Low-latency HLS(LHLS). Adds #EXT-X-PREFETCH tag with current segment's URI. -hls.js player folks are trying to standardize an open LHLS spec. The draft spec is available in https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md -This option tries to comply with the above open spec. -It enables @var{streaming} and @var{hls_playlist} options automatically. +@item index_correction @var{bool} +Enable or disable segment index correction logic. Applicable only when +@option{use_template} is enabled and @option{use_timeline} is +disabled. This is disabled by default. + +When enabled, the logic monitors the flow of segment indexes. If a +streams's segment index value is not at the expected real time +position, then the logic corrects that index value. + +Typically this logic is needed in live streaming use cases. The +network bandwidth fluctuations are common during long run +streaming. Each fluctuation can cause the segment indexes fall behind +the expected real time position. + +@item init_seg_name @var{init_name} +DASH-templated name to use for the initialization segment. Default is +@code{init-stream$RepresentationID$.$ext$}. @code{$ext$} is replaced +with the file name extension specific for the segment format. + +@item ldash @var{bool} +Enable Low-latency Dash by constraining the presence and values of +some elements. This is disabled by default. + +@item lhls @var{bool} +Enable Low-latency HLS (LHLS). Add @code{#EXT-X-PREFETCH} tag with +current segment's URI. hls.js player folks are trying to standardize +an open LHLS spec. The draft spec is available at +@url{https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md}. + +This option tries to comply with the above open spec. It enables +@option{streaming} and @option{hls_playlist} options automatically. This is an experimental feature. -Note: This is not Apple's version LHLS. See @url{https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis} +Note: This is not Apple's version LHLS. See +@url{https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis} -@item ldash @var{ldash} -Enable Low-latency Dash by constraining the presence and values of some elements. +@item master_m3u8_publish_rate @var{segment_intervals_count} +Publish master playlist repeatedly every after specified number of +segment intervals. -@item master_m3u8_publish_rate @var{master_m3u8_publish_rate} -Publish master playlist repeatedly every after specified number of segment intervals. +@item max_playback_rate @var{rate} +Set the maximum playback rate indicated as appropriate for the +purposes of automatically adjusting playback latency and buffer +occupancy during normal playback by clients. -@item write_prft @var{write_prft} -Write Producer Reference Time elements on supported streams. This also enables writing -prft boxes in the underlying muxer. Applicable only when the @var{utc_url} option is enabled. -It's set to auto by default, in which case the muxer will attempt to enable it only in modes -that require it. +@item media_seg_name @var{segment_name} +DASH-templated name to use for the media segments. Default is +@code{chunk-stream$RepresentationID$-$Number%05d$.$ext$}. @code{$ext$} +is replaced with the file name extension specific for the segment +format. -@item mpd_profile @var{mpd_profile} -Set one or more manifest profiles. +@item method @var{method} +Use the given HTTP method to create output files. Generally set to @code{PUT} +or @code{POST}. -@item http_opts @var{http_opts} -A :-separated list of key=value options to pass to the underlying HTTP -protocol. Applicable only for HTTP output. +@item min_playback_rate @var{rate} +Set the minimum playback rate indicated as appropriate for the +purposes of automatically adjusting playback latency and buffer +occupancy during normal playback by clients. + +@item mpd_profile @var{flags} +Set one or more MPD manifest profiles. + +Possible values: +@table @samp +@item dash +MPEG-DASH ISO Base media file format live profile +@item dvb_dash +DVB-DASH profile +@end table + +Default value is @code{dash}. + +@item remove_at_exit @var{bool} +Enable or disable removal of all segments when finished. This is +disabled by default. + +@item seg_duration @var{duration} +Set the segment length in seconds (fractional value can be set). The +value is treated as average segment duration when the +@option{use_template} option is enabled and the @option{use_timeline} +option is disabled and as minimum segment duration for all the other +use cases. + +Default value is @code{5}. + +@item single_file @var{bool} +Enable or disable storing all segments in one file, accessed using +byte ranges. This is disabled by default. + +The name of the single file can be specified with the +@option{single_file_name} option, if not specified assume the basename +of the manifest file with the output format extension. + +@item single_file_name @var{file_name} +DASH-templated name to use for the manifest @code{baseURL} +element. Imply that the @option{single_file} option is set to +@var{true}. In the template, @code{$ext$} is replaced with the file +name extension specific for the segment format. + +@item streaming @var{bool} +Enable or disable chunk streaming mode of output. In chunk streaming +mode, each frame will be a @code{moof} fragment which forms a +chunk. This is disabled by default. @item target_latency @var{target_latency} -Set an intended target latency in seconds (fractional value can be set) for serving. Applicable only when @var{streaming} and @var{write_prft} options are enabled. -This is an informative fields clients can use to measure the latency of the service. +Set an intended target latency in seconds for serving (fractional +value can be set). Applicable only when the @option{streaming} and +@option{write_prft} options are enabled. This is an informative fields +clients can use to measure the latency of the service. + +@item timeout @var{timeout} +Set timeout for socket I/O operations expressed in seconds (fractional +value can be set). Applicable only for HTTP output. + +@item update_period @var{period} +Set the MPD update period, for dynamic content. The unit is +second. If set to @code{0}, the period is automatically computed. + +Default value is @code{0}. -@item min_playback_rate @var{min_playback_rate} -Set the minimum playback rate indicated as appropriate for the purposes of automatically -adjusting playback latency and buffer occupancy during normal playback by clients. +@item use_template @var{bool} +Enable or disable use of @code{SegmentTemplate} instead of +@code{SegmentList} in the manifest. This is enabled by default. -@item max_playback_rate @var{max_playback_rate} -Set the maximum playback rate indicated as appropriate for the purposes of automatically -adjusting playback latency and buffer occupancy during normal playback by clients. +@item use_timeline @var{bool} +Enable or disable use of @code{SegmentTimeline} within the +@code{SegmentTemplate} manifest section. This is enabled by default. -@item update_period @var{update_period} - Set the mpd update period ,for dynamic content. - The unit is second. +@item utc_timing_url @var{url} +URL of the page that will return the UTC timestamp in ISO +format, for example @code{https://time.akamai.com/?iso} +@item window_size @var{size} +Set the maximum number of segments kept in the manifest, discard the +oldest one. This is useful for live streaming. + +If the value is @code{0}, all segments are kept in the +manifest. Default value is @code{0}. + +@item write_prft @var{write_prft} +Write Producer Reference Time elements on supported streams. This also +enables writing prft boxes in the underlying muxer. Applicable only +when the @var{utc_url} option is enabled. It is set to @var{auto} by +default, in which case the muxer will attempt to enable it only in +modes that require it. @end table +@subsection Example +Generate a DASH output reading from an input source in realtime using +@command{ffmpeg}. + +Two multimedia streams are generated from the input file, both +containing a video stream encoded through @samp{libx264}, and an audio +stream encoded with @samp{libfdk_aac}. The first multimedia stream +contains video with a bitrate of 800k and audio at the default rate, +the second with video scaled to 320x170 pixels at 300k and audio +resampled at 22005 Hz. + +The @option{window_size} option keeps only the latest 5 segments with +the default duration of 5 seconds. + +@example +ffmpeg -re -i -map 0 -map 0 -c:a libfdk_aac -c:v libx264 \ +-b:v:0 800k -profile:v:0 main \ +-b:v:1 300k -s:v:1 320x170 -profile:v:1 baseline -ar:a:1 22050 \ +-bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 \ +-use_timeline 1 -use_template 1 -window_size 5 \ +-adaptation_sets "id=0,streams=v id=1,streams=a" \ +-f dash /path/to/out.mpd +@end example + +@section daud +D-Cinema audio muxer. + +It accepts a single 6-channels audio stream resampled at 96000 Hz +encoded with the @samp{pcm_24daud} codec. + +@subsection Example +Use @command{ffmpeg} to mux input audio to a @samp{5.1} channel layout +resampled at 96000Hz: +@example +ffmpeg -i INPUT -af aresample=96000,pan=5.1 slow.302 +@end example + +For ffmpeg versions before 7.0 you might have to use the @samp{asetnsamples} +filter to limit the muxed packet size, because this format does not support +muxing packets larger than 65535 bytes (3640 samples). For newer ffmpeg +versions audio is automatically packetized to 36000 byte (2000 sample) packets. + +@section dv +DV (Digital Video) muxer. + +It accepts exactly one @samp{dvvideo} video stream and at most two +@samp{pcm_s16} audio streams. More constraints are defined by the +property of the video, which must correspond to a DV video supported +profile, and on the framerate. + +@subsection Example +Use @command{ffmpeg} to convert the input: +@example +ffmpeg -i INPUT -s:v 720x480 -pix_fmt yuv411p -r 29.97 -ac 2 -ar 48000 -y out.dv +@end example + +@section ffmetadata +FFmpeg metadata muxer. + +This muxer writes the streams metadata in the @samp{ffmetadata} +format. + +See @ref{metadata,,the Metadata chapter,ffmpeg-formats} for +information about the format. + +@subsection Example + +Use @command{ffmpeg} to extract metadata from an input file to a @file{metadata.ffmeta} +file in @samp{ffmetadata} format: +@example +ffmpeg -i INPUT -f ffmetadata metadata.ffmeta +@end example + @anchor{fifo} @section fifo +FIFO (First-In First-Out) muxer. -The fifo pseudo-muxer allows the separation of encoding and muxing by using -first-in-first-out queue and running the actual muxer in a separate thread. This -is especially useful in combination with the @ref{tee} muxer and can be used to -send data to several destinations with different reliability/writing speed/latency. +The @samp{fifo} pseudo-muxer allows the separation of encoding and +muxing by using a first-in-first-out queue and running the actual muxer +in a separate thread. -API users should be aware that callback functions (interrupt_callback, -io_open and io_close) used within its AVFormatContext must be thread-safe. +This is especially useful in combination with +the @ref{tee} muxer and can be used to send data to several +destinations with different reliability/writing speed/latency. -The behavior of the fifo muxer if the queue fills up or if the output fails is -selectable, +The target muxer is either selected from the output name or specified +through the @option{fifo_format} option. +The behavior of the @samp{fifo} muxer if the queue fills up or if the +output fails (e.g. if a packet cannot be written to the output) is +selectable: @itemize @bullet - @item -output can be transparently restarted with configurable delay between retries -based on real time or time of the processed stream. +Output can be transparently restarted with configurable delay between +retries based on real time or time of the processed stream. @item -encoding can be blocked during temporary failure, or continue transparently -dropping packets in case fifo queue fills up. - +Encoding can be blocked during temporary failure, or continue transparently +dropping packets in case the FIFO queue fills up. @end itemize +API users should be aware that callback functions +(@code{interrupt_callback}, @code{io_open} and @code{io_close}) used +within its @code{AVFormatContext} must be thread-safe. + +@subsection Options @table @option -@item fifo_format +@item attempt_recovery @var{bool} +If failure occurs, attempt to recover the output. This is especially +useful when used with network output, since it makes it possible to +restart streaming transparently. By default this option is set to +@code{false}. + +@item drop_pkts_on_overflow @var{bool} +If set to @code{true}, in case the fifo queue fills up, packets will +be dropped rather than blocking the encoder. This makes it possible to +continue streaming without delaying the input, at the cost of omitting +part of the stream. By default this option is set to @code{false}, so in +such cases the encoder will be blocked until the muxer processes some +of the packets and none of them is lost. + +@item fifo_format @var{format_name} Specify the format name. Useful if it cannot be guessed from the output name suffix. -@item queue_size -Specify size of the queue (number of packets). Default value is 60. +@item format_opts @var{options} +Specify format options for the underlying muxer. Muxer options can be +specified as a list of @var{key}=@var{value} pairs separated by ':'. -@item format_opts -Specify format options for the underlying muxer. Muxer options can be specified -as a list of @var{key}=@var{value} pairs separated by ':'. +@item max_recovery_attempts @var{count} +Set maximum number of successive unsuccessful recovery attempts after +which the output fails permanently. By default this option is set to +@code{0} (unlimited). -@item drop_pkts_on_overflow @var{bool} -If set to 1 (true), in case the fifo queue fills up, packets will be dropped -rather than blocking the encoder. This makes it possible to continue streaming without -delaying the input, at the cost of omitting part of the stream. By default -this option is set to 0 (false), so in such cases the encoder will be blocked -until the muxer processes some of the packets and none of them is lost. +@item queue_size @var{size} +Specify size of the queue as a number of packets. Default value is +@code{60}. -@item attempt_recovery @var{bool} -If failure occurs, attempt to recover the output. This is especially useful -when used with network output, since it makes it possible to restart streaming transparently. -By default this option is set to 0 (false). +@item recover_any_error @var{bool} +If set to @code{true}, recovery will be attempted regardless of type +of the error causing the failure. By default this option is set to +@code{false} and in case of certain (usually permanent) errors the +recovery is not attempted even when the @option{attempt_recovery} +option is set to @code{true}. -@item max_recovery_attempts -Sets maximum number of successive unsuccessful recovery attempts after which -the output fails permanently. By default this option is set to 0 (unlimited). +@item recovery_wait_streamtime @var{bool} +If set to @code{false}, the real time is used when waiting for the +recovery attempt (i.e. the recovery will be attempted after the time +specified by the @option{recovery_wait_time} option). -@item recovery_wait_time @var{duration} -Waiting time before the next recovery attempt after previous unsuccessful -recovery attempt. Default value is 5 seconds. +If set to @code{true}, the time of the processed stream is taken into +account instead (i.e. the recovery will be attempted after discarding +the packets corresponding to the @option{recovery_wait_time} option). -@item recovery_wait_streamtime @var{bool} -If set to 0 (false), the real time is used when waiting for the recovery -attempt (i.e. the recovery will be attempted after at least -recovery_wait_time seconds). -If set to 1 (true), the time of the processed stream is taken into account -instead (i.e. the recovery will be attempted after at least @var{recovery_wait_time} -seconds of the stream is omitted). -By default, this option is set to 0 (false). +By default this option is set to @code{false}. -@item recover_any_error @var{bool} -If set to 1 (true), recovery will be attempted regardless of type of the error -causing the failure. By default this option is set to 0 (false) and in case of -certain (usually permanent) errors the recovery is not attempted even when -@var{attempt_recovery} is set to 1. +@item recovery_wait_time @var{duration} +Specify waiting time in seconds before the next recovery attempt after +previous unsuccessful recovery attempt. Default value is @code{5}. @item restart_with_keyframe @var{bool} Specify whether to wait for the keyframe after recovering from -queue overflow or failure. This option is set to 0 (false) by default. +queue overflow or failure. This option is set to @code{false} by default. @item timeshift @var{duration} -Buffer the specified amount of packets and delay writing the output. Note that -@var{queue_size} must be big enough to store the packets for timeshift. At the -end of the input the fifo buffer is flushed at realtime speed. - +Buffer the specified amount of packets and delay writing the +output. Note that the value of the @option{queue_size} option must be +big enough to store the packets for timeshift. At the end of the input +the fifo buffer is flushed at realtime speed. @end table -@subsection Examples - -@itemize +@subsection Example -@item -Stream something to rtmp server, continue processing the stream at real-time -rate even in case of temporary failure (network outage) and attempt to recover -streaming every second indefinitely. +Use @command{ffmpeg} to stream to an RTMP server, continue processing +the stream at real-time rate even in case of temporary failure +(network outage) and attempt to recover streaming every second +indefinitely: @example -ffmpeg -re -i ... -c:v libx264 -c:a aac -f fifo -fifo_format flv -map 0:v -map 0:a - -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 rtmp://example.com/live/stream_name +ffmpeg -re -i ... -c:v libx264 -c:a aac -f fifo -fifo_format flv \ + -drop_pkts_on_overflow 1 -attempt_recovery 1 -recovery_wait_time 1 \ + -map 0:v -map 0:a rtmp://example.com/live/stream_name @end example -@end itemize +@section film_cpk +Sega film (.cpk) muxer. -@section flv +This format was used as internal format for several Sega games. -Adobe Flash Video Format muxer. +For more information regarding the Sega film file format, visit +@url{http://wiki.multimedia.cx/index.php?title=Sega_FILM}. + +It accepts at maximum one @samp{cinepak} or raw video stream, and at +maximum one audio stream. + +@section filmstrip +Adobe Filmstrip muxer. + +This format is used by several Adobe tools to store a generated filmstrip export. It +accepts a single raw video stream. + +@section fits +Flexible Image Transport System (FITS) muxer. + +This image format is used to store astronomical data. + +For more information regarding the format, visit +@url{https://fits.gsfc.nasa.gov}. -This muxer accepts the following options: +@section flac +Raw FLAC audio muxer. +This muxer accepts exactly one FLAC audio stream. Additionally, it is possible to add +images with disposition @samp{attached_pic}. + +@subsection Options @table @option +@item write_header @var{bool} +write the file header if set to @code{true}, default is @code{true} +@end table + +@subsection Example +Use @command{ffmpeg} to store the audio stream from an input file, +together with several pictures used with @samp{attached_pic} +disposition: +@example +ffmpeg -i INPUT -i pic1.png -i pic2.jpg -map 0:a -map 1 -map 2 -disposition:v attached_pic OUTPUT +@end example + +@section flv +Adobe Flash Video Format muxer. +@subsection Options +@table @option @item flvflags @var{flags} Possible values: @table @samp - @item aac_seq_header_detect Place AAC sequence header based on audio stream data. @@ -659,24 +1756,26 @@ See also the @ref{framehash} and @ref{md5} muxers. @anchor{gif} @section gif - Animated GIF muxer. -It accepts the following options: +Note that the GIF format has a very large time base: the delay between two frames can +therefore not be smaller than one centi second. +@subsection Options @table @option -@item loop +@item loop @var{bool} Set the number of times to loop the output. Use @code{-1} for no loop, @code{0} for looping indefinitely (default). -@item final_delay +@item final_delay @var{delay} Force the delay (expressed in centiseconds) after the last frame. Each frame ends with a delay until the next frame. The default is @code{-1}, which is a special value to tell the muxer to re-use the previous delay. In case of a loop, you might want to customize this value to mark a pause for instance. @end table -For example, to encode a gif looping 10 times, with a 5 seconds delay between +@subsection Example +Encode a gif looping 10 times, with a 5 seconds delay between the loops: @example ffmpeg -i INPUT -loop 10 -final_delay 500 out.gif @@ -688,8 +1787,17 @@ force the @ref{image2} muxer: ffmpeg -i INPUT -c:v gif -f image2 "out%d.gif" @end example -Note 2: the GIF format has a very large time base: the delay between two frames -can therefore not be smaller than one centi second. +@section gxf +General eXchange Format (GXF) muxer. + +GXF was developed by Grass Valley Group, then standardized by SMPTE as SMPTE +360M and was extended in SMPTE RDD 14-2007 to include high-definition video +resolutions. + +It accepts at most one video stream with codec @samp{mjpeg}, or +@samp{mpeg1video}, or @samp{mpeg2video}, or @samp{dvvideo} with resolution +@samp{512x480} or @samp{608x576}, and several audio streams with rate 48000Hz +and codec @samp{pcm16_le}. @anchor{hash} @section hash @@ -736,6 +1844,45 @@ ffmpeg -i INPUT -f hash -hash md5 - See also the @ref{framehash} muxer. +@anchor{hds} +@section hds +HTTP Dynamic Streaming (HDS) muxer. + +HTTP dynamic streaming, or HDS, is an adaptive bitrate streaming method +developed by Adobe. HDS delivers MP4 video content over HTTP connections. HDS +can be used for on-demand streaming or live streaming. + +This muxer creates an .f4m (Adobe Flash Media Manifest File) manifest, an .abst +(Adobe Bootstrap File) for each stream, and segment files in a directory +specified as the output. + +These needs to be accessed by an HDS player throuhg HTTPS for it to be able to +perform playback on the generated stream. + +@subsection Options +@table @option +@item extra_window_size @var{int} +number of fragments kept outside of the manifest before removing from disk + +@item min_frag_duration @var{microseconds} +minimum fragment duration (in microseconds), default value is 1 second +(@code{10000000}) + +@item remove_at_exit @var{bool} +remove all fragments when finished when set to @code{true} + +@item window_size @var{int} +number of fragments kept in the manifest, if set to a value different from +@code{0}. By default all segments are kept in the output directory. +@end table + +@subsection Example +Use @command{ffmpeg} to generate HDS files to the @file{output.hds} directory in +real-time rate: +@example +ffmpeg -re -i INPUT -f hds -b:v 200k output.hds +@end example + @anchor{hls} @section hls @@ -764,9 +1911,6 @@ flexible implementation of a segmenter, and can be used to perform HLS segmentation. @subsection Options - -This muxer supports the following options: - @table @option @item hls_init_time @var{duration} Set the initial target segment length. Default value is @var{0}. @@ -774,9 +1918,9 @@ Set the initial target segment length. Default value is @var{0}. @var{duration} must be a time duration specification, see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}. -Segment will be cut on the next key frame after this time has passed on the first m3u8 list. -After the initial playlist is filled @command{ffmpeg} will cut segments -at duration equal to @code{hls_time} +Segment will be cut on the next key frame after this time has passed on the +first m3u8 list. After the initial playlist is filled, @command{ffmpeg} will cut +segments at duration equal to @option{hls_time}. @item hls_time @var{duration} Set the target segment length. Default value is 2. @@ -793,18 +1937,12 @@ will contain all the segments. Default value is 5. Set the number of unreferenced segments to keep on disk before @code{hls_flags delete_segments} deletes them. Increase this to allow continue clients to download segments which were recently referenced in the playlist. Default value is 1, meaning segments older than -@code{hls_list_size+1} will be deleted. - -@item hls_ts_options @var{options_list} -Set output format options using a :-separated list of key=value -parameters. Values containing @code{:} special characters must be -escaped. -@code{hls_ts_options} is deprecated, use hls_segment_options instead of it.. +@option{hls_list_size+1} will be deleted. -@item hls_start_number_source +@item hls_start_number_source @var{source} Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) according to the specified source. -Unless @code{hls_flags single_file} is set, it also specifies source of starting sequence numbers of -segment and subtitle filenames. In any case, if @code{hls_flags append_list} +Unless @option{hls_flags single_file} is set, it also specifies source of starting sequence numbers of +segment and subtitle filenames. In any case, if @option{hls_flags append_list} is set and read playlist sequence number is greater than the specified start sequence number, then that value will be used as start value. @@ -813,26 +1951,25 @@ It accepts the following values: @table @option @item generic (default) -Set the starting sequence numbers according to @var{start_number} option value. +Set the start numbers according to the @option{start_number} option value. @item epoch -The start number will be the seconds since epoch (1970-01-01 00:00:00) +Set the start number as the seconds since epoch (1970-01-01 00:00:00). @item epoch_us -The start number will be the microseconds since epoch (1970-01-01 00:00:00) +Set the start number as the microseconds since epoch (1970-01-01 00:00:00). @item datetime -The start number will be based on the current date/time as YYYYmmddHHMMSS. e.g. 20161231235759. - +Set the start number based on the current date/time as YYYYmmddHHMMSS. e.g. 20161231235759. @end table @item start_number @var{number} Start the playlist sequence number (@code{#EXT-X-MEDIA-SEQUENCE}) from the specified @var{number} -when @var{hls_start_number_source} value is @var{generic}. (This is the default case.) -Unless @code{hls_flags single_file} is set, it also specifies starting sequence numbers of segment and subtitle filenames. +when @option{hls_start_number_source} value is @var{generic}. (This is the default case.) +Unless @option{hls_flags single_file} is set, it also specifies starting sequence numbers of segment and subtitle filenames. Default value is 0. -@item hls_allow_cache @var{allowcache} +@item hls_allow_cache @var{bool} Explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments. @item hls_base_url @var{baseurl} @@ -845,29 +1982,37 @@ which can be cyclic, for example if the @option{wrap} option is specified. @item hls_segment_filename @var{filename} -Set the segment filename. Unless @code{hls_flags single_file} is set, -@var{filename} is used as a string format with the segment number: +Set the segment filename. Unless the @option{hls_flags} option is set with +@samp{single_file}, @var{filename} is used as a string format with the +segment number appended. + +For example: @example ffmpeg -i in.nut -hls_segment_filename 'file%03d.ts' out.m3u8 @end example -This example will produce the playlist, @file{out.m3u8}, and segment files: + +will produce the playlist, @file{out.m3u8}, and segment files: @file{file000.ts}, @file{file001.ts}, @file{file002.ts}, etc. -@var{filename} may contain full path or relative path specification, -but only the file name part without any path info will be contained in the m3u8 segment list. +@var{filename} may contain a full path or relative path specification, +but only the file name part without any path will be contained in the m3u8 segment list. Should a relative path be specified, the path of the created segment files will be relative to the current working directory. -When strftime_mkdir is set, the whole expanded value of @var{filename} will be written into the m3u8 segment list. +When @option{strftime_mkdir} is set, the whole expanded value of @var{filename} will be written into the m3u8 segment list. -When @code{var_stream_map} is set with two or more variant streams, the -@var{filename} pattern must contain the string "%v", this string specifies -the position of variant stream index in the generated segment file names. +When @option{var_stream_map} is set with two or more variant streams, the +@var{filename} pattern must contain the string "%v", and this string will be +expanded to the position of variant stream index in the generated segment file +names. + +For example: @example ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8 @end example -This example will produce the playlists segment file sets: + +will produce the playlists segment file sets: @file{file_0_000.ts}, @file{file_0_001.ts}, @file{file_0_002.ts}, etc. and @file{file_1_000.ts}, @file{file_1_001.ts}, @file{file_1_002.ts}, etc. @@ -877,48 +2022,60 @@ sub-directory or filename.) If the string %v is present in the directory name, t sub-directories are created after expanding the directory name pattern. This enables creation of segments corresponding to different variant streams in subdirectories. + +For example: @example ffmpeg -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ -hls_segment_filename 'vs%v/file_%03d.ts' vs%v/out.m3u8 @end example -This example will produce the playlists segment file sets: +will produce the playlists segment file sets: @file{vs0/file_000.ts}, @file{vs0/file_001.ts}, @file{vs0/file_002.ts}, etc. and @file{vs1/file_000.ts}, @file{vs1/file_001.ts}, @file{vs1/file_002.ts}, etc. -@item strftime -Use strftime() on @var{filename} to expand the segment filename with localtime. -The segment number is also available in this mode, but to use it, you need to specify second_level_segment_index -hls_flag and %%d will be the specifier. +@item strftime @var{bool} +Use @code{strftime()} on @var{filename} to expand the segment filename with +localtime. The segment number is also available in this mode, but to use it, +you need to set @samp{second_level_segment_index} in the @option{hls_flag} and +%%d will be the specifier. + +For example: @example ffmpeg -i in.nut -strftime 1 -hls_segment_filename 'file-%Y%m%d-%s.ts' out.m3u8 @end example -This example will produce the playlist, @file{out.m3u8}, and segment files: +will produce the playlist, @file{out.m3u8}, and segment files: @file{file-20160215-1455569023.ts}, @file{file-20160215-1455569024.ts}, etc. -Note: On some systems/environments, the @code{%s} specifier is not available. See - @code{strftime()} documentation. +Note: On some systems/environments, the @code{%s} specifier is not +available. See @code{strftime()} documentation. + +For example: @example ffmpeg -i in.nut -strftime 1 -hls_flags second_level_segment_index -hls_segment_filename 'file-%Y%m%d-%%04d.ts' out.m3u8 @end example -This example will produce the playlist, @file{out.m3u8}, and segment files: +will produce the playlist, @file{out.m3u8}, and segment files: @file{file-20160215-0001.ts}, @file{file-20160215-0002.ts}, etc. -@item strftime_mkdir -Used together with -strftime_mkdir, it will create all subdirectories which -is expanded in @var{filename}. +@item strftime_mkdir @var{bool} +Used together with @option{strftime}, it will create all subdirectories which +are present in the expanded values of option @option{hls_segment_filename}. + +For example: @example ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y%m%d/file-%Y%m%d-%s.ts' out.m3u8 @end example -This example will create a directory 201560215 (if it does not exist), and then +will create a directory @file{201560215} (if it does not exist), and then produce the playlist, @file{out.m3u8}, and segment files: -@file{20160215/file-20160215-1455569023.ts}, @file{20160215/file-20160215-1455569024.ts}, etc. +@file{20160215/file-20160215-1455569023.ts}, +@file{20160215/file-20160215-1455569024.ts}, etc. +For example: @example ffmpeg -i in.nut -strftime 1 -strftime_mkdir 1 -hls_segment_filename '%Y/%m/%d/file-%Y%m%d-%s.ts' out.m3u8 @end example -This example will create a directory hierarchy 2016/02/15 (if any of them do not exist), and then -produce the playlist, @file{out.m3u8}, and segment files: -@file{2016/02/15/file-20160215-1455569023.ts}, @file{2016/02/15/file-20160215-1455569024.ts}, etc. +will create a directory hierarchy @file{2016/02/15} (if any of them do not +exist), and then produce the playlist, @file{out.m3u8}, and segment files: +@file{2016/02/15/file-20160215-1455569023.ts}, +@file{2016/02/15/file-20160215-1455569024.ts}, etc. @item hls_segment_options @var{options_list} Set output format options using a :-separated list of key=value @@ -935,7 +2092,7 @@ format. The optional third line specifies the initialization vector (IV) as a hexadecimal string to be used instead of the segment sequence number (default) for encryption. Changes to @var{key_info_file} will result in segment encryption with the new key/IV and an entry in the playlist for the new key -URI/IV if @code{hls_flags periodic_rekey} is enabled. +URI/IV if @option{hls_flags periodic_rekey} is enabled. Key info file format: @example @@ -981,22 +2138,22 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \ -hls_key_info_file file.keyinfo out.m3u8 @end example -@item -hls_enc @var{enc} +@item hls_enc @var{bool} Enable (1) or disable (0) the AES128 encryption. When enabled every segment generated is encrypted and the encryption key is saved as @var{playlist name}.key. -@item -hls_enc_key @var{key} -16-octet key to encrypt the segments, by default it -is randomly generated. +@item hls_enc_key @var{key} +Specify a 16-octet key to encrypt the segments, by default it is randomly +generated. -@item -hls_enc_key_url @var{keyurl} +@item hls_enc_key_url @var{keyurl} If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename in the playlist. -@item -hls_enc_iv @var{iv} -16-octet initialization vector for every segment instead -of the autogenerated ones. +@item hls_enc_iv @var{iv} +Specify the 16-octet initialization vector for every segment instead of the +autogenerated ones. @item hls_segment_type @var{flags} Possible values: @@ -1009,23 +2166,23 @@ compatible with all HLS versions. @item fmp4 Output segment files in fragmented MP4 format, similar to MPEG-DASH. fmp4 files may be used in HLS version 7 and above. - @end table @item hls_fmp4_init_filename @var{filename} -Set filename to the fragment files header file, default filename is @file{init.mp4}. +Set filename for the fragment files header file, default filename is @file{init.mp4}. -Use @code{-strftime 1} on @var{filename} to expand the segment filename with localtime. +When @option{strftime} is enabled, @var{filename} is expanded to the segment filename with localtime. + +For example: @example -ffmpeg -i in.nut -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8 +ffmpeg -i in.nut -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8 @end example -This will produce init like this -@file{1602678741_init.mp4} +will produce init like this @file{1602678741_init.mp4}. -@item hls_fmp4_init_resend +@item hls_fmp4_init_resend @var{bool} Resend init file after m3u8 file refresh every time, default is @var{0}. -When @code{var_stream_map} is set with two or more variant streams, the +When @option{var_stream_map} is set with two or more variant streams, the @var{filename} pattern must contain the string "%v", this string specifies the position of variant stream index in the generated init file names. The string "%v" may be present in the filename or in the last directory name @@ -1042,11 +2199,12 @@ Possible values: If this flag is set, the muxer will store all segments in a single MPEG-TS file, and will use byte ranges in the playlist. HLS playlists generated with this way will have the version number 4. + For example: @example ffmpeg -i in.nut -hls_flags single_file out.m3u8 @end example -Will produce the playlist, @file{out.m3u8}, and a single segment file, +will produce the playlist, @file{out.m3u8}, and a single segment file, @file{out.ts}. @item delete_segments @@ -1061,7 +2219,7 @@ and remove the @code{#EXT-X-ENDLIST} from the old segment list. Round the duration info in the playlist file segment info to integer values, instead of using floating point. If there are no other features requiring higher HLS versions be used, -then this will allow ffmpeg to output a HLS version 2 m3u8. +then this will allow @command{ffmpeg} to output a HLS version 2 m3u8. @item discont_start Add the @code{#EXT-X-DISCONTINUITY} tag to the playlist, before the @@ -1076,137 +2234,165 @@ detect updates to the encryption info. Be sure to replace this file atomically, including the file containing the AES encryption key. @item independent_segments -Add the @code{#EXT-X-INDEPENDENT-SEGMENTS} to playlists that has video segments -and when all the segments of that playlist are guaranteed to start with a Key frame. +Add the @code{#EXT-X-INDEPENDENT-SEGMENTS} tag to playlists that has video segments +and when all the segments of that playlist are guaranteed to start with a key frame. @item iframes_only -Add the @code{#EXT-X-I-FRAMES-ONLY} to playlists that has video segments +Add the @code{#EXT-X-I-FRAMES-ONLY} tag to playlists that has video segments and can play only I-frames in the @code{#EXT-X-BYTERANGE} mode. @item split_by_time -Allow segments to start on frames other than keyframes. This improves -behavior on some players when the time between keyframes is inconsistent, +Allow segments to start on frames other than key frames. This improves +behavior on some players when the time between key frames is inconsistent, but may make things worse on others, and can cause some oddities during -seeking. This flag should be used with the @code{hls_time} option. +seeking. This flag should be used with the @option{hls_time} option. @item program_date_time Generate @code{EXT-X-PROGRAM-DATE-TIME} tags. @item second_level_segment_index -Makes it possible to use segment indexes as %%d in hls_segment_filename expression -besides date/time values when strftime is on. -To get fixed width numbers with trailing zeroes, %%0xd format is available where x is the required width. +Make it possible to use segment indexes as %%d in the +@option{hls_segment_filename} option expression besides date/time values when +@option{strftime} option is on. To get fixed width numbers with trailing zeroes, %%0xd format +is available where x is the required width. @item second_level_segment_size -Makes it possible to use segment sizes (counted in bytes) as %%s in hls_segment_filename -expression besides date/time values when strftime is on. -To get fixed width numbers with trailing zeroes, %%0xs format is available where x is the required width. +Make it possible to use segment sizes (counted in bytes) as %%s in +@option{hls_segment_filename} option expression besides date/time values when +strftime is on. To get fixed width numbers with trailing zeroes, %%0xs format +is available where x is the required width. @item second_level_segment_duration -Makes it possible to use segment duration (calculated in microseconds) as %%t in hls_segment_filename -expression besides date/time values when strftime is on. -To get fixed width numbers with trailing zeroes, %%0xt format is available where x is the required width. +Make it possible to use segment duration (calculated in microseconds) as %%t in +@option{hls_segment_filename} option expression besides date/time values when +strftime is on. To get fixed width numbers with trailing zeroes, %%0xt format +is available where x is the required width. +For example: @example ffmpeg -i sample.mpeg \ -f hls -hls_time 3 -hls_list_size 5 \ -hls_flags second_level_segment_index+second_level_segment_size+second_level_segment_duration \ -strftime 1 -strftime_mkdir 1 -hls_segment_filename "segment_%Y%m%d%H%M%S_%%04d_%%08s_%%013t.ts" stream.m3u8 @end example -This will produce segments like this: +will produce segments like this: @file{segment_20170102194334_0003_00122200_0000003000000.ts}, @file{segment_20170102194334_0004_00120072_0000003000000.ts} etc. @item temp_file -Write segment data to filename.tmp and rename to filename only once the segment is complete. A webserver -serving up segments can be configured to reject requests to *.tmp to prevent access to in-progress segments -before they have been added to the m3u8 playlist. This flag also affects how m3u8 playlist files are created. -If this flag is set, all playlist files will written into temporary file and renamed after they are complete, similarly as segments are handled. -But playlists with @code{file} protocol and with type (@code{hls_playlist_type}) other than @code{vod} -are always written into temporary file regardless of this flag. Master playlist files (@code{master_pl_name}), if any, with @code{file} protocol, -are always written into temporary file regardless of this flag if @code{master_pl_publish_rate} value is other than zero. - +Write segment data to @file{filename.tmp} and rename to filename only once the +segment is complete. + +A webserver serving up segments can be configured to reject requests to *.tmp to +prevent access to in-progress segments before they have been added to the m3u8 +playlist. + +This flag also affects how m3u8 playlist files are created. If this flag is set, +all playlist files will be written into a temporary file and renamed after they +are complete, similarly as segments are handled. But playlists with @code{file} +protocol and with @option{hls_playlist_type} type other than @samp{vod} are +always written into a temporary file regardless of this flag. + +Master playlist files specified with @option{master_pl_name}, if any, with +@code{file} protocol, are always written into temporary file regardless of this +flag if @option{master_pl_publish_rate} value is other than zero. @end table -@item hls_playlist_type event -Emit @code{#EXT-X-PLAYLIST-TYPE:EVENT} in the m3u8 header. Forces -@option{hls_list_size} to 0; the playlist can only be appended to. +@item hls_playlist_type @var{type} +If type is @samp{event}, emit @code{#EXT-X-PLAYLIST-TYPE:EVENT} in the m3u8 +header. This forces @option{hls_list_size} to 0; the playlist can only be +appended to. -@item hls_playlist_type vod -Emit @code{#EXT-X-PLAYLIST-TYPE:VOD} in the m3u8 header. Forces -@option{hls_list_size} to 0; the playlist must not change. +If type is @samp{vod}, emit @code{#EXT-X-PLAYLIST-TYPE:VOD} in the m3u8 +header. This forces @option{hls_list_size} to 0; the playlist must not change. -@item method +@item method @var{method} Use the given HTTP method to create the hls files. + +For example: @example ffmpeg -re -i in.ts -f hls -method PUT http://example.com/live/out.m3u8 @end example -This example will upload all the mpegts segment files to the HTTP -server using the HTTP PUT method, and update the m3u8 files every -@code{refresh} times using the same method. -Note that the HTTP server must support the given method for uploading +will upload all the mpegts segment files to the HTTP server using the HTTP PUT +method, and update the m3u8 files every @code{refresh} times using the same +method. Note that the HTTP server must support the given method for uploading files. -@item http_user_agent +@item http_user_agent @var{agent} Override User-Agent field in HTTP header. Applicable only for HTTP output. -@item var_stream_map -Map string which specifies how to group the audio, video and subtitle streams -into different variant streams. The variant stream groups are separated -by space. +@item var_stream_map @var{stream_map} +Specify a map string defining how to group the audio, video and subtitle streams +into different variant streams. The variant stream groups are separated by +space. + Expected string format is like this "a:0,v:0 a:1,v:1 ....". Here a:, v:, s: are the keys to specify audio, video and subtitle streams respectively. Allowed values are 0 to 9 (limited just based on practical usage). When there are two or more variant streams, the output filename pattern must -contain the string "%v", this string specifies the position of variant stream +contain the string "%v": this string specifies the position of variant stream index in the output media playlist filenames. The string "%v" may be present in the filename or in the last directory name containing the file. If the string is present in the directory name, then sub-directories are created after expanding the directory name pattern. This enables creation of variant streams in subdirectories. +A few examples follow. + +@itemize +@item +Create two hls variant streams. The first variant stream will contain video +stream of bitrate 1000k and audio stream of bitrate 64k and the second variant +stream will contain video stream of bitrate 256k and audio stream of bitrate +32k. Here, two media playlist with file names @file{out_0.m3u8} and +@file{out_1.m3u8} will be created. @example ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ http://example.com/live/out_%v.m3u8 @end example -This example creates two hls variant streams. The first variant stream will -contain video stream of bitrate 1000k and audio stream of bitrate 64k and the -second variant stream will contain video stream of bitrate 256k and audio -stream of bitrate 32k. Here, two media playlist with file names out_0.m3u8 and -out_1.m3u8 will be created. If you want something meaningful text instead of indexes -in result names, you may specify names for each or some of the variants -as in the following example. - +@item +If you want something meaningful text instead of indexes in result names, you +may specify names for each or some of the variants. The following example will +create two hls variant streams as in the previous one. But here, the two media +playlist with file names @file{out_my_hd.m3u8} and @file{out_my_sd.m3u8} will be +created. @example ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0,name:my_hd v:1,a:1,name:my_sd" \ http://example.com/live/out_%v.m3u8 @end example -This example creates two hls variant streams as in the previous one. -But here, the two media playlist with file names out_my_hd.m3u8 and -out_my_sd.m3u8 will be created. - +@item +Create three hls variant streams. The first variant stream will be a video only +stream with video bitrate 1000k, the second variant stream will be an audio only +stream with bitrate 64k and the third variant stream will be a video only stream +with bitrate 256k. Here, three media playlist with file names @file{out_0.m3u8}, +@file{out_1.m3u8} and @file{out_2.m3u8} will be created. @example ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k \ -map 0:v -map 0:a -map 0:v -f hls -var_stream_map "v:0 a:0 v:1" \ http://example.com/live/out_%v.m3u8 @end example -This example creates three hls variant streams. The first variant stream will -be a video only stream with video bitrate 1000k, the second variant stream will -be an audio only stream with bitrate 64k and the third variant stream will be a -video only stream with bitrate 256k. Here, three media playlist with file names -out_0.m3u8, out_1.m3u8 and out_2.m3u8 will be created. + +@item +Create the variant streams in subdirectories. Here, the first media playlist is +created at @file{http://example.com/live/vs_0/out.m3u8} and the second one at +@file{http://example.com/live/vs_1/out.m3u8}. @example ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" \ http://example.com/live/vs_%v/out.m3u8 @end example -This example creates the variant streams in subdirectories. Here, the first -media playlist is created at @file{http://example.com/live/vs_0/out.m3u8} and -the second one at @file{http://example.com/live/vs_1/out.m3u8}. + +@item +Create two audio only and two video only variant streams. In addition to the +@code{#EXT-X-STREAM-INF} tag for each variant stream in the master playlist, the +@code{#EXT-X-MEDIA} tag is also added for the two audio only variant streams and +they are mapped to the two video only variant streams with audio group names +'aud_low' and 'aud_high'. +By default, a single hls variant containing all the encoded streams is created. @example ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k -b:v:1 3000k \ -map 0:a -map 0:a -map 0:v -map 0:v -f hls \ @@ -1214,14 +2400,15 @@ ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k -b:v:1 3000k \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 @end example -This example creates two audio only and two video only variant streams. In -addition to the #EXT-X-STREAM-INF tag for each variant stream in the master -playlist, #EXT-X-MEDIA tag is also added for the two audio only variant streams -and they are mapped to the two video only variant streams with audio group names -'aud_low' and 'aud_high'. -By default, a single hls variant containing all the encoded streams is created. +@item +Create two audio only and one video only variant streams. In addition to the +@code{#EXT-X-STREAM-INF} tag for each variant stream in the master playlist, the +@code{#EXT-X-MEDIA} tag is also added for the two audio only variant streams and +they are mapped to the one video only variant streams with audio group name +'aud_low', and the audio group have default stat is NO or YES. +By default, a single hls variant containing all the encoded streams is created. @example ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -map 0:a -map 0:a -map 0:v -f hls \ @@ -1229,14 +2416,15 @@ ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 @end example -This example creates two audio only and one video only variant streams. In -addition to the #EXT-X-STREAM-INF tag for each variant stream in the master -playlist, #EXT-X-MEDIA tag is also added for the two audio only variant streams -and they are mapped to the one video only variant streams with audio group name -'aud_low', and the audio group have default stat is NO or YES. - -By default, a single hls variant containing all the encoded streams is created. +@item +Create two audio only and one video only variant streams. In addition to the +@code{#EXT-X-STREAM-INF} tag for each variant stream in the master playlist, the +@code{#EXT-X-MEDIA} tag is also added for the two audio only variant streams and +they are mapped to the one video only variant streams with audio group name +'aud_low', and the audio group have default stat is NO or YES, and one audio +have and language is named ENG, the other audio language is named CHN. By +default, a single hls variant containing all the encoded streams is created. @example ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -map 0:a -map 0:a -map 0:v -f hls \ @@ -1244,15 +2432,11 @@ ffmpeg -re -i in.ts -b:a:0 32k -b:a:1 64k -b:v:0 1000k \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 @end example -This example creates two audio only and one video only variant streams. In -addition to the #EXT-X-STREAM-INF tag for each variant stream in the master -playlist, #EXT-X-MEDIA tag is also added for the two audio only variant streams -and they are mapped to the one video only variant streams with audio group name -'aud_low', and the audio group have default stat is NO or YES, and one audio -have and language is named ENG, the other audio language is named CHN. - -By default, a single hls variant containing all the encoded streams is created. +@item +Create a single variant stream. Add the @code{#EXT-X-MEDIA} tag with +@code{TYPE=SUBTITLES} in the master playlist with webvtt subtitle group name +'subtitle'. Make sure the input file has one text subtitle stream at least. @example ffmpeg -y -i input_with_subtitle.mkv \ -b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \ @@ -1260,85 +2444,103 @@ ffmpeg -y -i input_with_subtitle.mkv \ -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \ -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \ -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \ - 10 -master_pl_publish_rate 10 -hls_flags \ + 10 -master_pl_publish_rate 10 -hls_flags \ delete_segments+discont_start+split_by_time ./tmp/video.m3u8 @end example +@end itemize -This example adds @code{#EXT-X-MEDIA} tag with @code{TYPE=SUBTITLES} in -the master playlist with webvtt subtitle group name 'subtitle'. Please make sure -the input file has one text subtitle stream at least. - -@item cc_stream_map +@item cc_stream_map @var{cc_stream_map} Map string which specifies different closed captions groups and their attributes. The closed captions stream groups are separated by space. + Expected string format is like this "ccgroup:,instreamid:,language: ....". 'ccgroup' and 'instreamid' are mandatory attributes. 'language' is an optional attribute. + The closed captions groups configured using this option are mapped to different variant streams by providing the same 'ccgroup' name in the -@code{var_stream_map} string. If @code{var_stream_map} is not set, then the -first available ccgroup in @code{cc_stream_map} is mapped to the output variant -stream. The examples for these two use cases are given below. +@option{var_stream_map} string. -@example -ffmpeg -re -i in.ts -b:v 1000k -b:a 64k -a53cc 1 -f hls \ - -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" \ - -master_pl_name master.m3u8 \ - http://example.com/live/out.m3u8 -@end example -This example adds @code{#EXT-X-MEDIA} tag with @code{TYPE=CLOSED-CAPTIONS} in -the master playlist with group name 'cc', language 'en' (english) and -INSTREAM-ID 'CC1'. Also, it adds @code{CLOSED-CAPTIONS} attribute with group -name 'cc' for the output variant stream. +For example: @example ffmpeg -re -i in.ts -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k \ - -a53cc:0 1 -a53cc:1 1\ + -a53cc:0 1 -a53cc:1 1 \ -map 0:v -map 0:a -map 0:v -map 0:a -f hls \ -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en ccgroup:cc,instreamid:CC2,language:sp" \ -var_stream_map "v:0,a:0,ccgroup:cc v:1,a:1,ccgroup:cc" \ -master_pl_name master.m3u8 \ http://example.com/live/out_%v.m3u8 @end example -This example adds two @code{#EXT-X-MEDIA} tags with @code{TYPE=CLOSED-CAPTIONS} in -the master playlist for the INSTREAM-IDs 'CC1' and 'CC2'. Also, it adds +will add two @code{#EXT-X-MEDIA} tags with @code{TYPE=CLOSED-CAPTIONS} in the +master playlist for the INSTREAM-IDs 'CC1' and 'CC2'. Also, it will add @code{CLOSED-CAPTIONS} attribute with group name 'cc' for the two output variant streams. -@item master_pl_name +If @option{var_stream_map} is not set, then the first available ccgroup in +@option{cc_stream_map} is mapped to the output variant stream. + +For example: +@example +ffmpeg -re -i in.ts -b:v 1000k -b:a 64k -a53cc 1 -f hls \ + -cc_stream_map "ccgroup:cc,instreamid:CC1,language:en" \ + -master_pl_name master.m3u8 \ + http://example.com/live/out.m3u8 +@end example +this will add @code{#EXT-X-MEDIA} tag with @code{TYPE=CLOSED-CAPTIONS} in the +master playlist with group name 'cc', language 'en' (english) and INSTREAM-ID +'CC1'. Also, it will add @code{CLOSED-CAPTIONS} attribute with group name 'cc' +for the output variant stream. + +@item master_pl_name @var{name} Create HLS master playlist with the given name. +For example: @example ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 http://example.com/live/out.m3u8 @end example -This example creates HLS master playlist with name master.m3u8 and it is -published at http://example.com/live/ +creates an HLS master playlist with name @file{master.m3u8} which is published +at @url{http://example.com/live/}. -@item master_pl_publish_rate +@item master_pl_publish_rate @var{count} Publish master play list repeatedly every after specified number of segment intervals. +For example: @example ffmpeg -re -i in.ts -f hls -master_pl_name master.m3u8 \ -hls_time 2 -master_pl_publish_rate 30 http://example.com/live/out.m3u8 @end example - -This example creates HLS master playlist with name master.m3u8 and keep +creates an HLS master playlist with name @file{master.m3u8} and keeps publishing it repeatedly every after 30 segments i.e. every after 60s. -@item http_persistent +@item http_persistent @var{bool} Use persistent HTTP connections. Applicable only for HTTP output. -@item timeout +@item timeout @var{timeout} Set timeout for socket I/O operations. Applicable only for HTTP output. -@item -ignore_io_errors +@item ignore_io_errors @var{bool} Ignore IO errors during open, write and delete. Useful for long-duration runs with network output. -@item headers +@item headers @var{headers} Set custom HTTP headers, can override built in default headers. Applicable only for HTTP output. - @end table +@section iamf +Immersive Audio Model and Formats (IAMF) muxer. + +IAMF is used to provide immersive audio content for presentation on a wide range +of devices in both streaming and offline applications. These applications +include internet audio streaming, multicasting/broadcasting services, file +download, gaming, communication, virtual and augmented reality, and others. In +these applications, audio may be played back on a wide range of devices, e.g., +headphones, mobile phones, tablets, TVs, sound bars, home theater systems, and +big screens. + +This format was promoted and desgined by Alliance for Open Media. + +For more information about this format, see @url{https://aomedia.org/iamf/}. + @anchor{ico} @section ico @@ -1372,12 +2574,16 @@ If a BMP image is used, it must use the BITMAPINFOHEADER DIB header If a PNG image is used, it must use the rgba pixel format @end itemize -@anchor{image2} -@section image2 +@section ilbc +Internet Low Bitrate Codec (iLBC) raw muxer. +It accepts a single @samp{ilbc} audio stream. + +@anchor{image2} +@section image2, image2pipe Image file muxer. -The image file muxer writes video frames to image files. +The @samp{image2} muxer writes video frames to image files. The output filenames are specified by a pattern, which can be used to produce sequentially numbered series of files. @@ -1403,45 +2609,47 @@ form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg}, etc. The image muxer supports the .Y.U.V image file format. This format is -special in that that each image frame consists of three files, for +special in that each image frame consists of three files, for each of the YUV420P components. To read or write this image file format, specify the name of the '.Y' file. The muxer will automatically open the '.U' and '.V' files as required. -@subsection Options +The @samp{image2pipe} muxer accepts the same options as the @samp{image2} muxer, +but ignores the pattern verification and expansion, as it is supposed to write +to the command output rather than to an actual stored file. +@subsection Options @table @option -@item frame_pts -If set to 1, expand the filename with pts from pkt->pts. +@item frame_pts @var{bool} +If set to 1, expand the filename with the packet PTS (presentation time stamp). Default value is 0. -@item start_number +@item start_number @var{count} Start the sequence from the specified number. Default value is 1. -@item update +@item update @var{bool} If set to 1, the filename will always be interpreted as just a filename, not a pattern, and the corresponding file will be continuously overwritten with new images. Default value is 0. -@item strftime +@item strftime @var{bool} If set to 1, expand the filename with date and time information from @code{strftime()}. Default value is 0. -@item atomic_writing +@item atomic_writing @var{bool} Write output to a temporary file, which is renamed to target filename once writing is completed. Default is disabled. @item protocol_opts @var{options_list} Set protocol options as a :-separated list of key=value parameters. Values containing the @code{:} special character must be escaped. - @end table @subsection Examples - -The following example shows how to use @command{ffmpeg} for creating a -sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ..., -taking one image every second from the input video: +@itemize +@item +Use @command{ffmpeg} for creating a sequence of files @file{img-001.jpeg}, +@file{img-002.jpeg}, ..., taking one image every second from the input video: @example ffmpeg -i in.avi -vsync cfr -r 1 -f image2 'img-%03d.jpeg' @end example @@ -1461,36 +2669,110 @@ Note also that the pattern must not necessarily contain "%d" or ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg @end example +@item The @option{strftime} option allows you to expand the filename with date and time information. Check the documentation of the @code{strftime()} function for the syntax. -For example to generate image files from the @code{strftime()} -"%Y-%m-%d_%H-%M-%S" pattern, the following @command{ffmpeg} command -can be used: +To generate image files from the @code{strftime()} "%Y-%m-%d_%H-%M-%S" pattern, +the following @command{ffmpeg} command can be used: @example ffmpeg -f v4l2 -r 1 -i /dev/video0 -f image2 -strftime 1 "%Y-%m-%d_%H-%M-%S.jpg" @end example -You can set the file name with current frame's PTS: +@item +Set the file name with current frame's PTS: @example -ffmpeg -f v4l2 -r 1 -i /dev/video0 -copyts -f image2 -frame_pts true %d.jpg" +ffmpeg -f v4l2 -r 1 -i /dev/video0 -copyts -f image2 -frame_pts true %d.jpg @end example -A more complex example is to publish contents of your desktop directly to a -WebDAV server every second: +@item +Publish contents of your desktop directly to a WebDAV server every second: @example ffmpeg -f x11grab -framerate 1 -i :0.0 -q:v 6 -update 1 -protocol_opts method=PUT http://example.com/desktop.jpg @end example +@end itemize -@section matroska +@section ircam +Berkeley / IRCAM / CARL Sound Filesystem (BICSF) format muxer. + +The Berkeley/IRCAM/CARL Sound Format, developed in the 1980s, is a result of the +merging of several different earlier sound file formats and systems including +the csound system developed by Dr Gareth Loy at the Computer Audio Research Lab +(CARL) at UC San Diego, the IRCAM sound file system developed by Rob Gross and +Dan Timis at the Institut de Recherche et Coordination Acoustique / Musique in +Paris and the Berkeley Fast Filesystem. + +It was developed initially as part of the Berkeley/IRCAM/CARL Sound Filesystem, +a suite of programs designed to implement a filesystem for audio applications +running under Berkeley UNIX. It was particularly popular in academic music +research centres, and was used a number of times in the creation of early +computer-generated compositions. + +This muxer accepts a single audio stream containing PCM data. +@section ivf +On2 IVF muxer. + +IVF was developed by On2 Technologies (formerly known as Duck +Corporation), to store internally developed codecs. + +This muxer accepts a single @samp{vp8}, @samp{vp9}, or @samp{av1} +video stream. + +@section jacosub +JACOsub subtitle format muxer. + +This muxer accepts a single @samp{jacosub} subtitles stream. + +For more information about the format, see +@url{http://unicorn.us.com/jacosub/jscripts.html}. + +@section kvag +Simon & Schuster Interactive VAG muxer. + +This custom VAG container is used by some Simon & Schuster Interactive +games such as "Real War", and "Real War: Rogue States". + +This muxer accepts a single @samp{adpcm_ima_ssi} audio stream. + +@section lc3 +Bluetooth SIG Low Complexity Communication Codec audio (LC3), or +ETSI TS 103 634 Low Complexity Communication Codec plus (LC3plus). + +This muxer accepts a single @samp{lc3} audio stream. + +@section lrc +LRC lyrics file format muxer. + +LRC (short for LyRiCs) is a computer file format that synchronizes +song lyrics with an audio file, such as MP3, Vorbis, or MIDI. + +This muxer accepts a single @samp{subrip} or @samp{text} subtitles stream. + +@subsection Metadata +The following metadata tags are converted to the format corresponding +metadata: + +@table @option +@item title +@item album +@item artist +@item author +@item creator +@item encoder +@item encoder_version +@end table + +If @samp{encoder_version} is not explicitly set, it is automatically +set to the libavformat version. + +@section matroska Matroska container muxer. This muxer implements the matroska and webm container specs. @subsection Metadata - The recognized metadata settings in this muxer are: @table @option @@ -1550,18 +2832,15 @@ ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_ @end example @subsection Options - -This muxer supports the following options: - @table @option -@item reserve_index_space +@item reserve_index_space @var{size} By default, this muxer writes the index for seeking (called cues in Matroska terms) at the end of the file, because it cannot know in advance how much space to leave for the index at the beginning of the file. However for some use cases -- e.g. streaming where seeking is possible but slow -- it is useful to put the index at the beginning of the file. -If this option is set to a non-zero value, the muxer will reserve a given amount +If this option is set to a non-zero value, the muxer will reserve @var{size} bytes of space in the file header and then try to write the cues there when the muxing finishes. If the reserved space does not suffice, no Cues will be written, the file will be finalized and writing the trailer will return an error. @@ -1570,7 +2849,7 @@ A safe size for most use cases should be about 50kB per hour of video. Note that cues are only written if the output is seekable and this option will have no effect if it is not. -@item cues_to_front +@item cues_to_front @var{bool} If set, the muxer will write the index at the beginning of the file by shifting the main data if necessary. This can be combined with reserve_index_space in which case the data is only shifted if @@ -1578,8 +2857,44 @@ the initially reserved space turns out to be insufficient. This option is ignored if the output is unseekable. -@item default_mode -This option controls how the FlagDefault of the output tracks will be set. +@item cluster_size_limit @var{size} +Store at most the provided amount of bytes in a cluster. + +If not specified, the limit is set automatically to a sensible +hardcoded fixed value. + +@item cluster_time_limit @var{duration} +Store at most the provided number of milliseconds in a cluster. + +If not specified, the limit is set automatically to a sensible +hardcoded fixed value. + +@item dash @var{bool} +Create a WebM file conforming to WebM DASH specification. By default +it is set to @code{false}. + +@item dash_track_number @var{index} +Track number for the DASH stream. By default it is set to @code{1}. + +@item live @var{bool} +Write files assuming it is a live stream. By default it is set to +@code{false}. + +@item allow_raw_vfw @var{bool} +Allow raw VFW mode. By default it is set to @code{false}. + +@item flipped_raw_rgb @var{bool} +If set to @code{true}, store positive height for raw RGB bitmaps, which indicates +bitmap is stored bottom-up. Note that this option does not flip the bitmap +which has to be done manually beforehand, e.g. by using the @samp{vflip} filter. +Default is @code{false} and indicates bitmap is stored top down. + +@item write_crc32 @var{bool} +Write a CRC32 element inside every Level 1 element. By default it is +set to @code{true}. This option is ignored for WebM. + +@item default_mode @var{mode} +Control how the FlagDefault of the output tracks will be set. It influences which tracks players should play by default. The default mode is @samp{passthrough}. @table @samp @@ -1597,182 +2912,46 @@ disposition default exists, no subtitle track will be marked as default. In this mode the FlagDefault is set if and only if the AV_DISPOSITION_DEFAULT flag is set in the disposition of the corresponding stream. @end table - -@item flipped_raw_rgb -If set to true, store positive height for raw RGB bitmaps, which indicates -bitmap is stored bottom-up. Note that this option does not flip the bitmap -which has to be done manually beforehand, e.g. by using the vflip filter. -Default is @var{false} and indicates bitmap is stored top down. - @end table @anchor{md5} @section md5 - MD5 testing format. This is a variant of the @ref{hash} muxer. Unlike that muxer, it defaults to using the MD5 hash function. -@subsection Examples +See also the @ref{hash} and @ref{framemd5} muxers. +@subsection Examples +@itemize +@item To compute the MD5 hash of the input converted to raw audio and video, and store it in the file @file{out.md5}: @example ffmpeg -i INPUT -f md5 out.md5 @end example -You can print the MD5 to stdout with the command: +@item +To print the MD5 hash to stdout: @example ffmpeg -i INPUT -f md5 - @end example +@end itemize -See also the @ref{hash} and @ref{framemd5} muxers. - -@section mov, mp4, ismv - -MOV/MP4/ISMV (Smooth Streaming) muxer. - -The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 -file has all the metadata about all packets stored in one location -(written at the end of the file, it can be moved to the start for -better playback by adding @var{faststart} to the @var{movflags}, or -using the @command{qt-faststart} tool). A fragmented -file consists of a number of fragments, where packets and metadata -about these packets are stored together. Writing a fragmented -file has the advantage that the file is decodable even if the -writing is interrupted (while a normal MOV/MP4 is undecodable if -it is not properly finished), and it requires less memory when writing -very long files (since writing normal MOV/MP4 files stores info about -every single packet in memory until the file is closed). The downside -is that it is less compatible with other applications. - -@subsection Options - -Fragmentation is enabled by setting one of the AVOptions that define -how to cut the file into fragments: - -@table @option -@item -moov_size @var{bytes} -Reserves space for the moov atom at the beginning of the file instead of placing the -moov atom at the end. If the space reserved is insufficient, muxing will fail. -@item -movflags frag_keyframe -Start a new fragment at each video keyframe. -@item -frag_duration @var{duration} -Create fragments that are @var{duration} microseconds long. -@item -frag_size @var{size} -Create fragments that contain up to @var{size} bytes of payload data. -@item -movflags frag_custom -Allow the caller to manually choose when to cut fragments, by -calling @code{av_write_frame(ctx, NULL)} to write a fragment with -the packets written so far. (This is only useful with other -applications integrating libavformat, not from @command{ffmpeg}.) -@item -min_frag_duration @var{duration} -Don't create fragments that are shorter than @var{duration} microseconds long. -@end table - -If more than one condition is specified, fragments are cut when -one of the specified conditions is fulfilled. The exception to this is -@code{-min_frag_duration}, which has to be fulfilled for any of the other -conditions to apply. - -Additionally, the way the output file is written can be adjusted -through a few other options: - -@table @option -@item -movflags empty_moov -Write an initial moov atom directly at the start of the file, without -describing any samples in it. Generally, an mdat/moov pair is written -at the start of the file, as a normal MOV/MP4 file, containing only -a short portion of the file. With this option set, there is no initial -mdat atom, and the moov atom only describes the tracks but has -a zero duration. - -This option is implicitly set when writing ismv (Smooth Streaming) files. -@item -movflags separate_moof -Write a separate moof (movie fragment) atom for each track. Normally, -packets for all tracks are written in a moof atom (which is slightly -more efficient), but with this option set, the muxer writes one moof/mdat -pair for each track, making it easier to separate tracks. - -This option is implicitly set when writing ismv (Smooth Streaming) files. -@item -movflags skip_sidx -Skip writing of sidx atom. When bitrate overhead due to sidx atom is high, -this option could be used for cases where sidx atom is not mandatory. -When global_sidx flag is enabled, this option will be ignored. -@item -movflags faststart -Run a second pass moving the index (moov atom) to the beginning of the file. -This operation can take a while, and will not work in various situations such -as fragmented output, thus it is not enabled by default. -@item -movflags rtphint -Add RTP hinting tracks to the output file. -@item -movflags disable_chpl -Disable Nero chapter markers (chpl atom). Normally, both Nero chapters -and a QuickTime chapter track are written to the file. With this option -set, only the QuickTime chapter track will be written. Nero chapters can -cause failures when the file is reprocessed with certain tagging programs, like -mp3Tag 2.61a and iTunes 11.3, most likely other versions are affected as well. -@item -movflags omit_tfhd_offset -Do not write any absolute base_data_offset in tfhd atoms. This avoids -tying fragments to absolute byte positions in the file/streams. -@item -movflags default_base_moof -Similarly to the omit_tfhd_offset, this flag avoids writing the -absolute base_data_offset field in tfhd atoms, but does so by using -the new default-base-is-moof flag instead. This flag is new from -14496-12:2012. This may make the fragments easier to parse in certain -circumstances (avoiding basing track fragment location calculations -on the implicit end of the previous track fragment). -@item -write_tmcd -Specify @code{on} to force writing a timecode track, @code{off} to disable it -and @code{auto} to write a timecode track only for mov and mp4 output (default). -@item -movflags negative_cts_offsets -Enables utilization of version 1 of the CTTS box, in which the CTS offsets can -be negative. This enables the initial sample to have DTS/CTS of zero, and -reduces the need for edit lists for some cases such as video tracks with -B-frames. Additionally, eases conformance with the DASH-IF interoperability -guidelines. - -This option is implicitly set when writing ismv (Smooth Streaming) files. - -@item -write_btrt @var{bool} -Force or disable writing bitrate box inside stsd box of a track. -The box contains decoding buffer size (in bytes), maximum bitrate and -average bitrate for the track. The box will be skipped if none of these values -can be computed. -Default is @code{-1} or @code{auto}, which will write the box only in MP4 mode. - -@item -write_prft -Write producer time reference box (PRFT) with a specified time source for the -NTP field in the PRFT box. Set value as @samp{wallclock} to specify timesource -as wallclock time and @samp{pts} to specify timesource as input packets' PTS -values. - -Setting value to @samp{pts} is applicable only for a live encoding use case, -where PTS values are set as as wallclock time at the source. For example, an -encoding use case with decklink capture source where @option{video_pts} and -@option{audio_pts} are set to @samp{abs_wallclock}. - -@item -empty_hdlr_name @var{bool} -Enable to skip writing the name inside a @code{hdlr} box. -Default is @code{false}. +@section microdvd +MicroDVD subtitle format muxer. -@item -movie_timescale @var{scale} -Set the timescale written in the movie header box (@code{mvhd}). -Range is 1 to INT_MAX. Default is 1000. +This muxer accepts a single @samp{microdvd} subtitles stream. -@item -video_track_timescale @var{scale} -Set the timescale used for video tracks. Range is 0 to INT_MAX. -If set to @code{0}, the timescale is automatically set based on -the native stream time base. Default is 0. -@end table +@section mmf +Synthetic music Mobile Application Format (SMAF) format muxer. -@subsection Example +SMAF is a music data format specified by Yamaha for portable +electronic devices, such as mobile phones and personal digital +assistants. -Smooth Streaming content can be pushed in real time to a publishing -point on IIS with this muxer. Example: -@example -ffmpeg -re @var{} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1) -@end example +This muxer accepts a single @samp{adpcm_yamaha} audio stream. @section mp3 @@ -1915,6 +3094,8 @@ Conform to System B (DVB) instead of System A (ATSC). Mark the initial packet of each stream as discontinuity. @item nit Emit NIT table. +@item omit_rai +Disable writing of random access indicator. @end table @item mpegts_copyts @var{boolean} @@ -2052,181 +3233,36 @@ ogg files can be safely chained. @end table -@anchor{raw muxers} -@section raw muxers - -Raw muxers accept a single stream matching the designated codec. They do not store timestamps or metadata. -The recognized extension is the same as the muxer name unless indicated otherwise. - -@subsection ac3 - -Dolby Digital, also known as AC-3, audio. - -@subsection adx - -CRI Middleware ADX audio. - -This muxer will write out the total sample count near the start of the first packet -when the output is seekable and the count can be stored in 32 bits. - -@subsection aptx - -aptX (Audio Processing Technology for Bluetooth) audio. - -@subsection aptx_hd - -aptX HD (Audio Processing Technology for Bluetooth) audio. - -Extensions: aptxhd - -@subsection avs2 - -AVS2-P2/IEEE1857.4 video. - -Extensions: avs, avs2 - -@subsection cavsvideo - -Chinese AVS (Audio Video Standard) video. - -Extensions: cavs - -@subsection codec2raw - -Codec 2 audio. - -No extension is registered so format name has to be supplied e.g. with the ffmpeg CLI tool @code{-f codec2raw}. - -@subsection data - -Data muxer accepts a single stream with any codec of any type. -The input stream has to be selected using the @code{-map} option with the ffmpeg CLI tool. - -No extension is registered so format name has to be supplied e.g. with the ffmpeg CLI tool @code{-f data}. - -@subsection dirac - -BBC Dirac video. The Dirac Pro codec is a subset and is standardized as SMPTE VC-2. - -Extensions: drc, vc2 +@anchor{rcwtenc} +@section rcwt -@subsection dnxhd +RCWT (Raw Captions With Time) is a format native to ccextractor, a commonly +used open source tool for processing 608/708 Closed Captions (CC) sources. +It can be used to archive the original extracted CC bitstream and to produce +a source file for later processing or conversion. The format allows +for interoperability between ccextractor and FFmpeg, is simple to parse, +and can be used to create a backup of the CC presentation. -Avid DNxHD video. It is standardized as SMPTE VC-3. Accepts DNxHR streams. +This muxer implements the specification as of March 2024, which has +been stable and unchanged since April 2014. -Extensions: dnxhd, dnxhr +This muxer will have some nuances from the way that ccextractor muxes RCWT. +No compatibility issues when processing the output with ccextractor +have been observed as a result of this so far, but mileage may vary +and outputs will not be a bit-exact match. -@subsection dts +A free specification of RCWT can be found here: +@url{https://github.com/CCExtractor/ccextractor/blob/master/docs/BINARY_FILE_FORMAT.TXT} -DTS Coherent Acoustics (DCA) audio. - -@subsection eac3 - -Dolby Digital Plus, also known as Enhanced AC-3, audio. - -@subsection g722 - -ITU-T G.722 audio. - -@subsection g723_1 - -ITU-T G.723.1 audio. - -Extensions: tco, rco - -@subsection g726 - -ITU-T G.726 big-endian ("left-justified") audio. - -No extension is registered so format name has to be supplied e.g. with the ffmpeg CLI tool @code{-f g726}. - -@subsection g726le - -ITU-T G.726 little-endian ("right-justified") audio. - -No extension is registered so format name has to be supplied e.g. with the ffmpeg CLI tool @code{-f g726le}. - -@subsection gsm - -Global System for Mobile Communications audio. - -@subsection h261 - -ITU-T H.261 video. - -@subsection h263 - -ITU-T H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 video. - -@subsection h264 - -ITU-T H.264 / MPEG-4 Part 10 AVC video. Bitstream shall be converted to Annex B syntax if it's in length-prefixed mode. - -Extensions: h264, 264 - -@subsection hevc - -ITU-T H.265 / MPEG-H Part 2 HEVC video. Bitstream shall be converted to Annex B syntax if it's in length-prefixed mode. - -Extensions: hevc, h265, 265 - -@subsection m4v - -MPEG-4 Part 2 video. - -@subsection mjpeg - -Motion JPEG video. - -Extensions: mjpg, mjpeg - -@subsection mlp - -Meridian Lossless Packing, also known as Packed PCM, audio. - -@subsection mp2 - -MPEG-1 Audio Layer II audio. - -Extensions: mp2, m2a, mpa - -@subsection mpeg1video - -MPEG-1 Part 2 video. - -Extensions: mpg, mpeg, m1v - -@subsection mpeg2video - -ITU-T H.262 / MPEG-2 Part 2 video. - -Extensions: m2v - -@subsection obu - -AV1 low overhead Open Bitstream Units muxer. Temporal delimiter OBUs will be inserted in all temporal units of the stream. - -@subsection rawvideo - -Raw uncompressed video. - -Extensions: yuv, rgb - -@subsection sbc - -Bluetooth SIG low-complexity subband codec audio. - -Extensions: sbc, msbc - -@subsection truehd - -Dolby TrueHD audio. - -Extensions: thd - -@subsection vc1 +@subsection Examples -SMPTE 421M / VC-1 video. +@itemize +@item +Extract Closed Captions to RCWT using lavfi: +@example +ffmpeg -f lavfi -i "movie=INPUT.mkv[out+subcc]" -map 0:s:0 -c:s copy -f rcwt CC.rcwt.bin +@end example +@end itemize @anchor{segment} @section segment, stream_segment, ssegment @@ -2367,6 +3403,11 @@ Note that splitting may not be accurate, unless you force the reference stream key-frames at the given time. See the introductory notice and the examples below. +@item min_seg_duration @var{time} +Set minimum segment duration to @var{time}, the value must be a duration +specification. This prevents the muxer ending segments at a duration below +this value. Only effective with @code{segment_time}. Default value is "0". + @item segment_atclocktime @var{1|0} If set to "1" split at regular clock time intervals starting from 00:00 o'clock. The @var{time} value specified in @option{segment_time} is diff --git a/mythtv/external/FFmpeg/doc/optimization.txt b/mythtv/external/FFmpeg/doc/optimization.txt index 974e2f9af27..3ed29fe38c6 100644 --- a/mythtv/external/FFmpeg/doc/optimization.txt +++ b/mythtv/external/FFmpeg/doc/optimization.txt @@ -267,6 +267,11 @@ CELL/SPU: http://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/30B3520C93F437AB87257060006FFE5E/$file/Language_Extensions_for_CBEA_2.4.pdf http://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/9F820A5FFA3ECE8C8725716A0062585F/$file/CBE_Handbook_v1.1_24APR2007_pub.pdf +RISC-V-specific: +---------------- +The RISC-V Instruction Set Manual, Volume 1, Unprivileged ISA: +https://riscv.org/technical/specifications/ + GCC asm links: -------------- official doc but quite ugly diff --git a/mythtv/external/FFmpeg/doc/outdevs.texi b/mythtv/external/FFmpeg/doc/outdevs.texi index aa41e295230..9ee857528e7 100644 --- a/mythtv/external/FFmpeg/doc/outdevs.texi +++ b/mythtv/external/FFmpeg/doc/outdevs.texi @@ -235,6 +235,11 @@ Enable SMPTE Level A mode on the used output. Must be @samp{unset}, @samp{true} or @samp{false}. Defaults to @option{unset}. +@item vanc_queue_size +Sets maximum output buffer size in bytes for VANC data. If the buffering reaches this value, +outgoing VANC data will be dropped. +Defaults to @samp{1048576}. + @end table @subsection Examples @@ -297,7 +302,7 @@ ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0 See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1). @section opengl -OpenGL output device. +OpenGL output device. Deprecated and will be removed. To enable this output device you need to configure FFmpeg with @code{--enable-opengl}. @@ -403,7 +408,13 @@ ffmpeg -i INPUT -f pulse "stream name" @section sdl -SDL (Simple DirectMedia Layer) output device. +SDL (Simple DirectMedia Layer) output device. Deprecated and will be removed. + +For monitoring purposes in FFmpeg, pipes and a video player such as ffplay can be used: + +@example +ffmpeg -i INPUT -f nut -c:v rawvideo - | ffplay - +@end example "sdl2" can be used as alias for "sdl". @@ -421,13 +432,18 @@ For more information about SDL, check: @table @option -@item window_title -Set the SDL window title, if not specified default to the filename -specified for the output device. +@item window_borderless +Set SDL window border off. +Default value is 0 (enable window border). -@item icon_title -Set the name of the iconified SDL window, if not specified it is set -to the same value of @var{window_title}. +@item window_enable_quit +Enable quit action (using window button or keyboard key) +when non-zero value is provided. +Default value is 1 (enable quit action). + +@item window_fullscreen +Set fullscreen mode when non-zero value is provided. +Default value is zero. @item window_size Set the SDL window size, can be a string of the form @@ -435,18 +451,13 @@ Set the SDL window size, can be a string of the form If not specified it defaults to the size of the input video, downscaled according to the aspect ratio. +@item window_title +Set the SDL window title, if not specified default to the filename +specified for the output device. + @item window_x @item window_y Set the position of the window on the screen. - -@item window_fullscreen -Set fullscreen mode when non-zero value is provided. -Default value is zero. - -@item window_enable_quit -Enable quit action (using window button or keyboard key) -when non-zero value is provided. -Default value is 1 (enable quit action) @end table @subsection Interactive commands diff --git a/mythtv/external/FFmpeg/doc/platform.texi b/mythtv/external/FFmpeg/doc/platform.texi index 4090b856700..764911d2302 100644 --- a/mythtv/external/FFmpeg/doc/platform.texi +++ b/mythtv/external/FFmpeg/doc/platform.texi @@ -92,9 +92,6 @@ For information about compiling FFmpeg on OS/2 see @chapter Windows -To get help and instructions for building FFmpeg under Windows, check out -the FFmpeg Windows Help Forum at @url{http://ffmpeg.zeranoe.com/forum/}. - @section Native Windows compilation using MinGW or MinGW-w64 FFmpeg can be built to run natively on Windows using the MinGW-w64 diff --git a/mythtv/external/FFmpeg/doc/protocols.texi b/mythtv/external/FFmpeg/doc/protocols.texi index 0df38d790c6..ed70af4b33c 100644 --- a/mythtv/external/FFmpeg/doc/protocols.texi +++ b/mythtv/external/FFmpeg/doc/protocols.texi @@ -275,6 +275,33 @@ For example, to convert a GIF file given inline with @command{ffmpeg}: ffmpeg -i "data:image/gif;base64,R0lGODdhCAAIAMIEAAAAAAAA//8AAP//AP///////////////ywAAAAACAAIAAADF0gEDLojDgdGiJdJqUX02iB4E8Q9jUMkADs=" smiley.png @end example +@section fd + +File descriptor access protocol. + +The accepted syntax is: +@example +fd: -fd @var{file_descriptor} +@end example + +If @option{fd} is not specified, by default the stdout file descriptor will be +used for writing, stdin for reading. Unlike the pipe protocol, fd protocol has +seek support if it corresponding to a regular file. fd protocol doesn't support +pass file descriptor via URL for security. + +This protocol accepts the following options: + +@table @option +@item blocksize +Set I/O operation maximum block size, in bytes. Default value is +@code{INT_MAX}, which results in not limiting the requested block size. +Setting this value reasonably low improves user termination request reaction +time, which is valuable if data transmission is slow. + +@item fd +Set file descriptor. +@end table + @section file File access protocol. @@ -415,9 +442,6 @@ value is -1. @item chunked_post If set to 1 use chunked Transfer-Encoding for posts, default is 1. -@item content_type -Set a specific content type for the POST messages or for listen mode. - @item http_proxy set HTTP proxy to tunnel through e.g. http://example.com:1234 @@ -425,35 +449,21 @@ set HTTP proxy to tunnel through e.g. http://example.com:1234 Set custom HTTP headers, can override built in default headers. The value must be a string encoding the headers. -@item multiple_requests -Use persistent connections if set to 1, default is 0. - -@item post_data -Set custom HTTP post data. - -@item referer -Set the Referer header. Include 'Referer: URL' header in HTTP request. +@item content_type +Set a specific content type for the POST messages or for listen mode. @item user_agent Override the User-Agent header. If not specified the protocol will use a string describing the libavformat build. ("Lavf/") -@item reconnect_at_eof -If set then eof is treated like an error and causes reconnection, this is useful -for live / endless streams. - -@item reconnect_streamed -If set then even streamed/non seekable streams will be reconnected on errors. - -@item reconnect_on_network_error -Reconnect automatically in case of TCP/TLS errors during connect. +@item referer +Set the Referer header. Include 'Referer: URL' header in HTTP request. -@item reconnect_on_http_error -A comma separated list of HTTP status codes to reconnect on. The list can -include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. +@item multiple_requests +Use persistent connections if set to 1, default is 0. -@item reconnect_delay_max -Sets the maximum delay in seconds after which to give up reconnecting +@item post_data +Set custom HTTP post data. @item mime_type Export the MIME type. @@ -461,6 +471,11 @@ Export the MIME type. @item http_version Exports the HTTP response version number. Usually "1.0" or "1.1". +@item cookies +Set the cookies to be sent in future requests. The format of each cookie is the +same as the value of a Set-Cookie HTTP response field. Multiple cookies can be +delimited by a newline character. + @item icy If set to 1 request ICY (SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading @@ -477,10 +492,40 @@ contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. -@item cookies -Set the cookies to be sent in future requests. The format of each cookie is the -same as the value of a Set-Cookie HTTP response field. Multiple cookies can be -delimited by a newline character. +@item metadata +Set an exported dictionary containing Icecast metadata from the bitstream, if present. +Only useful with the C API. + +@item auth_type + +Set HTTP authentication type. No option for Digest, since this method requires +getting nonce parameters from the server first and can't be used straight away like +Basic. + +@table @option +@item none +Choose the HTTP authentication type automatically. This is the default. +@item basic + +Choose the HTTP basic authentication. + +Basic authentication sends a Base64-encoded string that contains a user name and password +for the client. Base64 is not a form of encryption and should be considered the same as +sending the user name and password in clear text (Base64 is a reversible encoding). +If a resource needs to be protected, strongly consider using an authentication scheme +other than basic authentication. HTTPS/TLS should be used with basic authentication. +Without these additional security enhancements, basic authentication should not be used +to protect sensitive or valuable information. +@end table + +@item send_expect_100 +Send an Expect: 100-continue header for POST. If set to 1 it will send, if set +to 0 it won't, if set to -1 it will try to send if it is applicable. Default +value is -1. + +@item location +An exported dictionary containing the content location. Only useful with the C +API. @item offset Set initial byte offset. @@ -498,6 +543,37 @@ be given a Bad Request response. When unset the HTTP method is not checked for now. This will be replaced by autodetection in the future. +@item reconnect +Reconnect automatically when disconnected before EOF is hit. + +@item reconnect_at_eof +If set then eof is treated like an error and causes reconnection, this is useful +for live / endless streams. + +@item reconnect_on_network_error +Reconnect automatically in case of TCP/TLS errors during connect. + +@item reconnect_on_http_error +A comma separated list of HTTP status codes to reconnect on. The list can +include specific status codes (e.g. '503') or the strings '4xx' / '5xx'. + +@item reconnect_streamed +If set then even streamed/non seekable streams will be reconnected on errors. + +@item reconnect_delay_max +Set the maximum delay in seconds after which to give up reconnecting. + +@item reconnect_max_retries +Set the maximum number of times to retry a connection. Default unset. + +@item reconnect_delay_total_max +Set the maximum total delay in seconds after which to give up reconnecting. + +@item respect_retry_after +If enabled, and a Retry-After header is encountered, its requested reconnection +delay will be honored, rather than using exponential backoff. Useful for 429 and +503 errors. Default enabled. + @item listen If set to 1 enables experimental HTTP server. This can be used to send data when used as an output option, or read data from a client with HTTP POST when used as @@ -524,32 +600,16 @@ ffmpeg -i somefile.ogg -chunked_post 0 -c copy -f ogg http://@var{server}:@var{p wget --post-file=somefile.ogg http://@var{server}:@var{port} @end example -@item send_expect_100 -Send an Expect: 100-continue header for POST. If set to 1 it will send, if set -to 0 it won't, if set to -1 it will try to send if it is applicable. Default -value is -1. - -@item auth_type - -Set HTTP authentication type. No option for Digest, since this method requires -getting nonce parameters from the server first and can't be used straight away like -Basic. - -@table @option -@item none -Choose the HTTP authentication type automatically. This is the default. -@item basic +@item resource +The resource requested by a client, when the experimental HTTP server is in use. -Choose the HTTP basic authentication. +@item reply_code +The HTTP code returned to the client, when the experimental HTTP server is in use. -Basic authentication sends a Base64-encoded string that contains a user name and password -for the client. Base64 is not a form of encryption and should be considered the same as -sending the user name and password in clear text (Base64 is a reversible encoding). -If a resource needs to be protected, strongly consider using an authentication scheme -other than basic authentication. HTTPS/TLS should be used with basic authentication. -Without these additional security enhancements, basic authentication should not be used -to protect sensitive or valuable information. -@end table +@item short_seek_size +Set the threshold, in bytes, for when a readahead should be prefered over a seek and +new HTTP request. This is useful, for example, to make sure the same connection +is used for reading large video packets with small audio packets in between. @end table @@ -622,9 +682,6 @@ This protocol wraps the IPFS native protocols (ipfs:// and ipns://) to be sent to such a gateway. Users can (and should) host their own node which means this protocol will use one's local gateway to access files on the IPFS network. -If a user doesn't have a node of their own then the public gateway @code{https://dweb.link} -is used by default. - This protocol accepts the following options: @table @option @@ -632,18 +689,18 @@ This protocol accepts the following options: @item gateway Defines the gateway to use. When not set, the protocol will first try locating the local gateway by looking at @code{$IPFS_GATEWAY}, @code{$IPFS_PATH} -and @code{$HOME/.ipfs/}, in that order. If that fails @code{https://dweb.link} will be used. +and @code{$HOME/.ipfs/}, in that order. @end table One can use this protocol in 2 ways. Using IPFS: @example -ffplay ipfs://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T +ffplay ipfs:// @end example Or the IPNS protocol (IPNS is mutable IPFS): @example -ffplay ipns://QmbGtJg23skhvFmu9mJiePVByhfzu5rwo74MEkVDYAmF5T +ffplay ipns:// @end example @section mmst @@ -690,7 +747,7 @@ The accepted syntax is: pipe:[@var{number}] @end example -@var{number} is the number corresponding to the file descriptor of the +If @option{fd} isn't specified, @var{number} is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number} is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. @@ -717,6 +774,8 @@ Set I/O operation maximum block size, in bytes. Default value is @code{INT_MAX}, which results in not limiting the requested block size. Setting this value reasonably low improves user termination request reaction time, which is valuable if data transmission is slow. +@item fd +Set file descriptor. @end table Note that some formats (typically MOV), require the output protocol to @@ -870,6 +929,13 @@ be named, by prefixing the type with 'N' and specifying the name before the value (i.e. @code{NB:myFlag:1}). This option may be used multiple times to construct arbitrary AMF sequences. +@item rtmp_enhanced_codecs +Specify the list of codecs the client advertises to support in an +enhanced RTMP stream. This option should be set to a comma separated +list of fourcc values, like @code{hvc1,av01,vp09} for multiple codecs +or @code{hvc1} for only one codec. The specified list will be presented +in the "fourCcLive" property of the Connect Command Message. + @item rtmp_flashver Version of the Flash plugin used to run the SWF player. The default is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible; @@ -1178,6 +1244,59 @@ Options can be set on the @command{ffmpeg}/@command{ffplay} command line, or set in code via @code{AVOption}s or in @code{avformat_open_input}. +@subsection Muxer +The following options are supported. + +@table @option +@item rtsp_transport +Set RTSP transport protocols. + +It accepts the following values: +@table @samp +@item udp +Use UDP as lower transport protocol. + +@item tcp +Use TCP (interleaving within the RTSP control channel) as lower +transport protocol. +@end table + +Default value is @samp{0}. + +@item rtsp_flags +Set RTSP flags. + +The following values are accepted: +@table @samp +@item latm +Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC. +@item rfc2190 +Use RFC 2190 packetization instead of RFC 4629 for H.263. +@item skip_rtcp +Don't send RTCP sender reports. +@item h264_mode0 +Use mode 0 for H.264 in RTP. +@item send_bye +Send RTCP BYE packets when finishing. +@end table + +Default value is @samp{0}. + + +@item min_port +Set minimum local UDP port. Default value is 5000. + +@item max_port +Set maximum local UDP port. Default value is 65000. + +@item buffer_size +Set the maximum socket buffer size in bytes. + +@item pkt_size +Set max send packet size (in bytes). Default value is 1472. +@end table + +@subsection Demuxer The following options are supported. @table @option @@ -1203,6 +1322,10 @@ Use UDP multicast as lower transport protocol. @item http Use HTTP tunneling as lower transport protocol, which is useful for passing proxies. + +@item https +Use HTTPs tunneling as lower transport protocol, which is useful for +passing proxies and widely used for security consideration. @end table Multiple lower transport protocols may be specified, in that case they are @@ -1220,6 +1343,9 @@ Accept packets only from negotiated peer address and port. Act as a server, listening for an incoming connection. @item prefer_tcp Try TCP for RTP transport first, if TCP is available as RTSP RTP transport. +@item satip_raw +Export raw MPEG-TS stream instead of demuxing. The flag will simply write out +the raw stream, with the original PAT/PMT/PIDs intact. @end table Default value is @samp{none}. @@ -1232,6 +1358,7 @@ The following flags are accepted: @item video @item audio @item data +@item subtitle @end table By default it accepts all media types. @@ -1256,6 +1383,9 @@ Set socket TCP I/O timeout in microseconds. @item user_agent Override User-Agent header. If not specified, it defaults to the libavformat identifier string. + +@item buffer_size +Set the maximum socket buffer size in bytes. @end table When receiving data over UDP, the demuxer tries to reorder received packets @@ -1792,6 +1922,12 @@ The list of supported options follows. Listen for an incoming connection. 0 disables listen, 1 enables listen in single client mode, 2 enables listen in multi-client mode. Default value is 0. +@item local_addr=@var{addr} +Local IP address of a network interface used for tcp socket connect. + +@item local_port=@var{port} +Local port used for tcp socket connect. + @item timeout=@var{microseconds} Set raise error timeout, expressed in microseconds. diff --git a/mythtv/external/FFmpeg/doc/resampler.texi b/mythtv/external/FFmpeg/doc/resampler.texi index 5ed3f4377a2..a6224eefb30 100644 --- a/mythtv/external/FFmpeg/doc/resampler.texi +++ b/mythtv/external/FFmpeg/doc/resampler.texi @@ -11,18 +11,8 @@ programmatic use. @table @option -@item ich, in_channel_count -Set the number of input channels. Default value is 0. Setting this -value is not mandatory if the corresponding channel layout -@option{in_channel_layout} is set. - -@item och, out_channel_count -Set the number of output channels. Default value is 0. Setting this -value is not mandatory if the corresponding channel layout -@option{out_channel_layout} is set. - -@item uch, used_channel_count -Set the number of used input channels. Default value is 0. This option is +@item uchl, used_chlayout +Set used input channel layout. Default is unset. This option is only used for special remapping. @item isr, in_sample_rate @@ -41,8 +31,8 @@ Specify the output sample format. It is set by default to @code{none}. Set the internal sample format. Default value is @code{none}. This will automatically be chosen when it is not explicitly set. -@item icl, in_channel_layout -@item ocl, out_channel_layout +@item ichl, in_chlayout +@item ochl, out_chlayout Set the input/output channel layout. See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils} diff --git a/mythtv/external/FFmpeg/doc/t2h.pm b/mythtv/external/FFmpeg/doc/t2h.pm index d07d974286c..b7485e1f1e5 100644 --- a/mythtv/external/FFmpeg/doc/t2h.pm +++ b/mythtv/external/FFmpeg/doc/t2h.pm @@ -20,8 +20,45 @@ # License along with FFmpeg; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# Texinfo 7.0 changed the syntax of various functions. +# Provide a shim for older versions. +sub ff_set_from_init_file($$) { + my $key = shift; + my $value = shift; + if (exists &{'texinfo_set_from_init_file'}) { + texinfo_set_from_init_file($key, $value); + } else { + set_from_init_file($key, $value); + } +} + +sub ff_get_conf($) { + my $key = shift; + if (exists &{'texinfo_get_conf'}) { + texinfo_get_conf($key); + } else { + get_conf($key); + } +} + +sub get_formatting_function($$) { + my $obj = shift; + my $func = shift; + + my $sub = $obj->can('formatting_function'); + if ($sub) { + return $obj->formatting_function($func); + } else { + return $obj->{$func}; + } +} + +# determine texinfo version +my $program_version_num = version->declare(ff_get_conf('PACKAGE_VERSION'))->numify; +my $program_version_6_8 = $program_version_num >= 6.008000; + # no navigation elements -set_from_init_file('HEADERS', 0); +ff_set_from_init_file('HEADERS', 0); sub ffmpeg_heading_command($$$$$) { @@ -55,7 +92,7 @@ sub ffmpeg_heading_command($$$$$) $element = $command->{'parent'}; } if ($element) { - $result .= &{$self->{'format_element_header'}}($self, $cmdname, + $result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname, $command, $element); } @@ -112,7 +149,11 @@ sub ffmpeg_heading_command($$$$$) $cmdname = $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level]; } - $result .= &{$self->{'format_heading_text'}}( + # format_heading_text expects an array of headings for texinfo >= 7.0 + if ($program_version_num >= 7.000000) { + $heading = [$heading]; + } + $result .= &{get_formatting_function($self,'format_heading_text')}( $self, $cmdname, $heading, $heading_level + $self->get_conf('CHAPTER_HEADER_LEVEL') - 1, $command); @@ -126,23 +167,19 @@ foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') { texinfo_register_command_formatting($command, \&ffmpeg_heading_command); } -# determine if texinfo is at least version 6.8 -my $program_version_num = version->declare(get_conf('PACKAGE_VERSION'))->numify; -my $program_version_6_8 = $program_version_num >= 6.008000; - # print the TOC where @contents is used if ($program_version_6_8) { - set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline'); + ff_set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline'); } else { - set_from_init_file('INLINE_CONTENTS', 1); + ff_set_from_init_file('INLINE_CONTENTS', 1); } # make chapters

-set_from_init_file('CHAPTER_HEADER_LEVEL', 2); +ff_set_from_init_file('CHAPTER_HEADER_LEVEL', 2); # Do not add
-set_from_init_file('DEFAULT_RULE', ''); -set_from_init_file('BIG_RULE', ''); +ff_set_from_init_file('DEFAULT_RULE', ''); +ff_set_from_init_file('BIG_RULE', ''); # Customized file beginning sub ffmpeg_begin_file($$$) @@ -159,7 +196,18 @@ sub ffmpeg_begin_file($$$) my ($title, $description, $encoding, $date, $css_lines, $doctype, $bodytext, $copying_comment, $after_body_open, $extra_head, $program_and_version, $program_homepage, - $program, $generator) = $self->_file_header_informations($command); + $program, $generator); + if ($program_version_num >= 7.000000) { + ($title, $description, $encoding, $date, $css_lines, + $doctype, $bodytext, $copying_comment, $after_body_open, + $extra_head, $program_and_version, $program_homepage, + $program, $generator) = $self->_file_header_information($command); + } else { + ($title, $description, $encoding, $date, $css_lines, + $doctype, $bodytext, $copying_comment, $after_body_open, + $extra_head, $program_and_version, $program_homepage, + $program, $generator) = $self->_file_header_informations($command); + } my $links = $self->_get_links ($filename, $element); @@ -223,7 +271,7 @@ if ($program_version_6_8) { sub ffmpeg_end_file($) { my $self = shift; - my $program_string = &{$self->{'format_program_string'}}($self); + my $program_string = &{get_formatting_function($self,'format_program_string')}($self); my $program_text = < $program_string @@ -244,7 +292,7 @@ if ($program_version_6_8) { # Dummy title command # Ignore title. Title is handled through ffmpeg_begin_file(). -set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1); +ff_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1); sub ffmpeg_title($$$$) { return ''; @@ -262,8 +310,14 @@ sub ffmpeg_float($$$$$) my $args = shift; my $content = shift; - my ($caption, $prepended) = Texinfo::Common::float_name_caption($self, - $command); + my ($caption, $prepended); + if ($program_version_num >= 7.000000) { + ($caption, $prepended) = Texinfo::Convert::Converter::float_name_caption($self, + $command); + } else { + ($caption, $prepended) = Texinfo::Common::float_name_caption($self, + $command); + } my $caption_text = ''; my $prepended_text; my $prepended_save = ''; @@ -335,8 +389,13 @@ sub ffmpeg_float($$$$$) $caption->{'args'}->[0], 'float caption'); } if ($prepended_text.$caption_text ne '') { - $prepended_text = $self->_attribute_class('div','float-caption'). '>' - . $prepended_text; + if ($program_version_num >= 7.000000) { + $prepended_text = $self->html_attribute_class('div',['float-caption']). '>' + . $prepended_text; + } else { + $prepended_text = $self->_attribute_class('div','float-caption'). '>' + . $prepended_text; + } $caption_text .= ''; } my $html_class = ''; @@ -349,8 +408,13 @@ sub ffmpeg_float($$$$$) $prepended_text = ''; $caption_text = ''; } - return $self->_attribute_class('div', $html_class). '>' . "\n" . - $prepended_text . $caption_text . $content . ''; + if ($program_version_num >= 7.000000) { + return $self->html_attribute_class('div', [$html_class]). '>' . "\n" . + $prepended_text . $caption_text . $content . ''; + } else { + return $self->_attribute_class('div', $html_class). '>' . "\n" . + $prepended_text . $caption_text . $content . ''; + } } texinfo_register_command_formatting('float', diff --git a/mythtv/external/FFmpeg/doc/texidep.pl b/mythtv/external/FFmpeg/doc/texidep.pl index 099690378e6..33e6c7c53e3 100644 --- a/mythtv/external/FFmpeg/doc/texidep.pl +++ b/mythtv/external/FFmpeg/doc/texidep.pl @@ -1,4 +1,4 @@ -#! /usr/bin/env perl +#!/usr/bin/env perl # This script will print the dependency of a Texinfo file to stdout. # texidep.pl diff --git a/mythtv/external/FFmpeg/doc/transforms.md b/mythtv/external/FFmpeg/doc/transforms.md index 78f3f68d652..04a7c408f1b 100644 --- a/mythtv/external/FFmpeg/doc/transforms.md +++ b/mythtv/external/FFmpeg/doc/transforms.md @@ -704,3 +704,326 @@ Also note that this function requires a special iteration way, due to coefficien beginning to overlap, particularly `[o1]` with `[0]` after the second iteration. To iterate further, set `z = &z[16]` via `z += 8` for the second iteration. After the 4th iteration, the layout resets, so repeat the same. + + +# 15-point AVX FFT transform +The 15-point transform is based on the following unrolling. The input +must be permuted via the following loop: + +``` C + for (int k = 0; k < s->sub[0].len; k++) { + int cnt = 0; + int tmp[15]; + memcpy(tmp, &s->map[k*15], 15*sizeof(*tmp)); + for (int i = 1; i < 15; i += 3) { + s->map[k*15 + cnt] = tmp[i]; + cnt++; + } + for (int i = 2; i < 15; i += 3) { + s->map[k*15 + cnt] = tmp[i]; + cnt++; + } + for (int i = 0; i < 15; i += 3) { + s->map[k*15 + cnt] = tmp[i]; + cnt++; + } + memmove(&s->map[k*15 + 7], &s->map[k*15 + 6], 4*sizeof(int)); + memmove(&s->map[k*15 + 3], &s->map[k*15 + 1], 4*sizeof(int)); + s->map[k*15 + 1] = tmp[2]; + s->map[k*15 + 2] = tmp[0]; + } + +``` + +This separates the ACs from the DCs and flips the SIMD direction to +performing 5x3pt transforms at once, followed by 3x5pt transforms. + +``` C +static av_always_inline void fft15(TXComplex *out, TXComplex *in, + ptrdiff_t stride) +{ + const TXSample *tab = TX_TAB(ff_tx_tab_53); + TXComplex q[20]; + TXComplex dc[3], pc[32]; + TXComplex y[32], k[32]; + TXComplex t[32]; + TXComplex r[32]; + TXComplex z0[32]; + + /* DC */ + pc[0].re = in[ 1].im - in[ 0].im; + pc[0].im = in[ 1].re - in[ 0].re; + pc[1].re = in[ 1].re + in[ 0].re; + pc[1].im = in[ 1].im + in[ 0].im; + + dc[0].re = in[2].re + pc[1].re; + dc[0].im = in[2].im + pc[1].im; + + pc[0].re = tab[ 8] * pc[0].re; + pc[0].im = tab[ 9] * pc[0].im; + pc[1].re = tab[10] * pc[1].re; + pc[1].im = tab[11] * pc[1].im; + + dc[1].re = pc[0].re + pc[1].re; + dc[1].im = pc[0].im + pc[1].im; + dc[2].re = pc[1].re - pc[0].re; + dc[2].im = pc[1].im - pc[0].im; + + dc[1].re = in[2].re - dc[1].re; + dc[1].im = in[2].im + dc[1].im; + dc[2].re = in[2].re - dc[2].re; + dc[2].im = in[2].im + dc[2].im; + + /* ACs */ + q[0].im = in[ 3].re - in[ 7].re; // NOTE THE ORDER + q[0].re = in[ 3].im - in[ 7].im; + q[1].im = in[ 4].re - in[ 8].re; + q[1].re = in[ 4].im - in[ 8].im; + q[2].im = in[ 5].re - in[ 9].re; + q[2].re = in[ 5].im - in[ 9].im; + q[3].re = in[ 6].im - in[10].im; + q[3].im = in[ 6].re - in[10].re; + + q[4].re = in[ 3].re + in[ 7].re; + q[4].im = in[ 3].im + in[ 7].im; + q[5].re = in[ 4].re + in[ 8].re; + q[5].im = in[ 4].im + in[ 8].im; + q[6].re = in[ 5].re + in[ 9].re; + q[6].im = in[ 5].im + in[ 9].im; + q[7].re = in[ 6].re + in[10].re; + q[7].im = in[ 6].im + in[10].im; + + y[0].re = in[11].re + q[4].re; + y[0].im = in[11].im + q[4].im; + y[1].re = in[12].re + q[5].re; + y[1].im = in[12].im + q[5].im; + y[2].re = in[13].re + q[6].re; + y[2].im = in[13].im + q[6].im; + y[3].re = in[14].re + q[7].re; + y[3].im = in[14].im + q[7].im; + + q[0].re = tab[ 8] * q[0].re; + q[0].im = tab[ 9] * q[0].im; + q[1].re = tab[ 8] * q[1].re; + q[1].im = tab[ 9] * q[1].im; + q[2].re = tab[ 8] * q[2].re; + q[2].im = tab[ 9] * q[2].im; + q[3].re = tab[ 8] * q[3].re; + q[3].im = tab[ 9] * q[3].im; + + q[4].re = tab[10] * q[4].re; + q[4].im = tab[11] * q[4].im; + q[5].re = tab[10] * q[5].re; + q[5].im = tab[11] * q[5].im; + q[6].re = tab[10] * q[6].re; + q[6].im = tab[11] * q[6].im; + q[7].re = tab[10] * q[7].re; + q[7].im = tab[11] * q[7].im; + + k[0].re = q[4].re - q[0].re; + k[0].im = q[4].im - q[0].im; + k[1].re = q[5].re - q[1].re; + k[1].im = q[5].im - q[1].im; + k[2].re = q[6].re - q[2].re; + k[2].im = q[6].im - q[2].im; + k[3].re = q[7].re - q[3].re; + k[3].im = q[7].im - q[3].im; + + k[4].re = q[4].re + q[0].re; + k[4].im = q[4].im + q[0].im; + k[5].re = q[5].re + q[1].re; + k[5].im = q[5].im + q[1].im; + k[6].re = q[6].re + q[2].re; + k[6].im = q[6].im + q[2].im; + k[7].re = q[7].re + q[3].re; + k[7].im = q[7].im + q[3].im; + + k[0].re = in[11].re - k[0].re; + k[0].im = in[11].im + k[0].im; + k[1].re = in[12].re - k[1].re; + k[1].im = in[12].im + k[1].im; + k[2].re = in[13].re - k[2].re; + k[2].im = in[13].im + k[2].im; + k[3].re = in[14].re - k[3].re; + k[3].im = in[14].im + k[3].im; + + k[4].re = in[11].re - k[4].re; + k[4].im = in[11].im + k[4].im; + k[5].re = in[12].re - k[5].re; + k[5].im = in[12].im + k[5].im; + k[6].re = in[13].re - k[6].re; + k[6].im = in[13].im + k[6].im; + k[7].re = in[14].re - k[7].re; + k[7].im = in[14].im + k[7].im; + + /* 15pt start here */ + t[0].re = y[3].re + y[0].re; + t[0].im = y[3].im + y[0].im; + t[1].re = y[2].re + y[1].re; + t[1].im = y[2].im + y[1].im; + t[2].re = y[1].re - y[2].re; + t[2].im = y[1].im - y[2].im; + t[3].re = y[0].re - y[3].re; + t[3].im = y[0].im - y[3].im; + + t[4].re = k[3].re + k[0].re; + t[4].im = k[3].im + k[0].im; + t[5].re = k[2].re + k[1].re; + t[5].im = k[2].im + k[1].im; + t[6].re = k[1].re - k[2].re; + t[6].im = k[1].im - k[2].im; + t[7].re = k[0].re - k[3].re; + t[7].im = k[0].im - k[3].im; + + t[ 8].re = k[7].re + k[4].re; + t[ 8].im = k[7].im + k[4].im; + t[ 9].re = k[6].re + k[5].re; + t[ 9].im = k[6].im + k[5].im; + t[10].re = k[5].re - k[6].re; + t[10].im = k[5].im - k[6].im; + t[11].re = k[4].re - k[7].re; + t[11].im = k[4].im - k[7].im; + + out[ 0*stride].re = dc[0].re + t[0].re + t[ 1].re; + out[ 0*stride].im = dc[0].im + t[0].im + t[ 1].im; + out[10*stride].re = dc[1].re + t[4].re + t[ 5].re; + out[10*stride].im = dc[1].im + t[4].im + t[ 5].im; + out[ 5*stride].re = dc[2].re + t[8].re + t[ 9].re; + out[ 5*stride].im = dc[2].im + t[8].im + t[ 9].im; + + r[0].re = t[0].re * tab[0]; + r[0].im = t[0].im * tab[1]; + r[1].re = t[1].re * tab[0]; + r[1].im = t[1].im * tab[1]; + r[2].re = t[2].re * tab[4]; + r[2].im = t[2].im * tab[5]; + r[3].re = t[3].re * tab[4]; + r[3].im = t[3].im * tab[5]; + + r[4].re = t[4].re * tab[0]; + r[4].im = t[4].im * tab[1]; + r[5].re = t[5].re * tab[0]; + r[5].im = t[5].im * tab[1]; + r[6].re = t[6].re * tab[4]; + r[6].im = t[6].im * tab[5]; + r[7].re = t[7].re * tab[4]; + r[7].im = t[7].im * tab[5]; + + r[ 8].re = t[ 8].re * tab[0]; + r[ 8].im = t[ 8].im * tab[1]; + r[ 9].re = t[ 9].re * tab[0]; + r[ 9].im = t[ 9].im * tab[1]; + r[10].re = t[10].re * tab[4]; + r[10].im = t[10].im * tab[5]; + r[11].re = t[11].re * tab[4]; + r[11].im = t[11].im * tab[5]; + + t[0].re = t[0].re * tab[2]; + t[0].im = t[0].im * tab[3]; + t[1].re = t[1].re * tab[2]; + t[1].im = t[1].im * tab[3]; + t[2].re = t[2].re * tab[6]; + t[2].im = t[2].im * tab[7]; + t[3].re = t[3].re * tab[6]; + t[3].im = t[3].im * tab[7]; + + t[4].re = t[4].re * tab[2]; + t[4].im = t[4].im * tab[3]; + t[5].re = t[5].re * tab[2]; + t[5].im = t[5].im * tab[3]; + t[6].re = t[6].re * tab[6]; + t[6].im = t[6].im * tab[7]; + t[7].re = t[7].re * tab[6]; + t[7].im = t[7].im * tab[7]; + + t[ 8].re = t[ 8].re * tab[2]; + t[ 8].im = t[ 8].im * tab[3]; + t[ 9].re = t[ 9].re * tab[2]; + t[ 9].im = t[ 9].im * tab[3]; + t[10].re = t[10].re * tab[6]; + t[10].im = t[10].im * tab[7]; + t[11].re = t[11].re * tab[6]; + t[11].im = t[11].im * tab[7]; + + r[0].re = r[0].re - t[1].re; + r[0].im = r[0].im - t[1].im; + r[1].re = r[1].re - t[0].re; + r[1].im = r[1].im - t[0].im; + r[2].re = r[2].re - t[3].re; + r[2].im = r[2].im - t[3].im; + r[3].re = r[3].re + t[2].re; + r[3].im = r[3].im + t[2].im; + + r[4].re = r[4].re - t[5].re; + r[4].im = r[4].im - t[5].im; + r[5].re = r[5].re - t[4].re; + r[5].im = r[5].im - t[4].im; + r[6].re = r[6].re - t[7].re; + r[6].im = r[6].im - t[7].im; + r[7].re = r[7].re + t[6].re; + r[7].im = r[7].im + t[6].im; + + r[ 8].re = r[ 8].re - t[ 9].re; + r[ 8].im = r[ 8].im - t[ 9].im; + r[ 9].re = r[ 9].re - t[ 8].re; + r[ 9].im = r[ 9].im - t[ 8].im; + r[10].re = r[10].re - t[11].re; + r[10].im = r[10].im - t[11].im; + r[11].re = r[11].re + t[10].re; + r[11].im = r[11].im + t[10].im; + + z0[ 0].re = r[ 3].im + r[ 0].re; + z0[ 0].im = r[ 3].re + r[ 0].im; + z0[ 1].re = r[ 2].im + r[ 1].re; + z0[ 1].im = r[ 2].re + r[ 1].im; + z0[ 2].re = r[ 1].im - r[ 2].re; + z0[ 2].im = r[ 1].re - r[ 2].im; + z0[ 3].re = r[ 0].im - r[ 3].re; + z0[ 3].im = r[ 0].re - r[ 3].im; + + z0[ 4].re = r[ 7].im + r[ 4].re; + z0[ 4].im = r[ 7].re + r[ 4].im; + z0[ 5].re = r[ 6].im + r[ 5].re; + z0[ 5].im = r[ 6].re + r[ 5].im; + z0[ 6].re = r[ 5].im - r[ 6].re; + z0[ 6].im = r[ 5].re - r[ 6].im; + z0[ 7].re = r[ 4].im - r[ 7].re; + z0[ 7].im = r[ 4].re - r[ 7].im; + + z0[ 8].re = r[11].im + r[ 8].re; + z0[ 8].im = r[11].re + r[ 8].im; + z0[ 9].re = r[10].im + r[ 9].re; + z0[ 9].im = r[10].re + r[ 9].im; + z0[10].re = r[ 9].im - r[10].re; + z0[10].im = r[ 9].re - r[10].im; + z0[11].re = r[ 8].im - r[11].re; + z0[11].im = r[ 8].re - r[11].im; + + out[ 6*stride].re = dc[0].re + z0[0].re; + out[ 6*stride].im = dc[0].im + z0[3].re; + out[12*stride].re = dc[0].re + z0[2].im; + out[12*stride].im = dc[0].im + z0[1].im; + out[ 3*stride].re = dc[0].re + z0[1].re; + out[ 3*stride].im = dc[0].im + z0[2].re; + out[ 9*stride].re = dc[0].re + z0[3].im; + out[ 9*stride].im = dc[0].im + z0[0].im; + + out[ 1*stride].re = dc[1].re + z0[4].re; + out[ 1*stride].im = dc[1].im + z0[7].re; + out[ 7*stride].re = dc[1].re + z0[6].im; + out[ 7*stride].im = dc[1].im + z0[5].im; + out[13*stride].re = dc[1].re + z0[5].re; + out[13*stride].im = dc[1].im + z0[6].re; + out[ 4*stride].re = dc[1].re + z0[7].im; + out[ 4*stride].im = dc[1].im + z0[4].im; + + out[11*stride].re = dc[2].re + z0[8].re; + out[11*stride].im = dc[2].im + z0[11].re; + out[ 2*stride].re = dc[2].re + z0[10].im; + out[ 2*stride].im = dc[2].im + z0[9].im; + out[ 8*stride].re = dc[2].re + z0[9].re; + out[ 8*stride].im = dc[2].im + z0[10].re; + out[14*stride].re = dc[2].re + z0[11].im; + out[14*stride].im = dc[2].im + z0[8].im; +} +``` diff --git a/mythtv/external/FFmpeg/doc/utils.texi b/mythtv/external/FFmpeg/doc/utils.texi index 232a0608b3b..9968725d2a9 100644 --- a/mythtv/external/FFmpeg/doc/utils.texi +++ b/mythtv/external/FFmpeg/doc/utils.texi @@ -695,6 +695,8 @@ FL+FR+FC+LFE+SL+SR FL+FR+FC+BC+SL+SR @item 6.0(front) FL+FR+FLC+FRC+SL+SR +@item 3.1.2 +FL+FR+FC+LFE+TFL+TFR @item hexagonal FL+FR+FC+BL+BR+BC @item 6.1 @@ -713,8 +715,22 @@ FL+FR+FC+LFE+BL+BR+SL+SR FL+FR+FC+LFE+BL+BR+FLC+FRC @item 7.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR +@item 5.1.2 +FL+FR+FC+LFE+BL+BR+TFL+TFR @item octagonal FL+FR+FC+BL+BR+BC+SL+SR +@item cube +FL+FR+BL+BR+TFL+TFR+TBL+TBR +@item 5.1.4 +FL+FR+FC+LFE+BL+BR+TFL+TFR+TBL+TBR +@item 7.1.2 +FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR +@item 7.1.4 +FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBL+TBR +@item 7.2.3 +FL+FR+FC+LFE+BL+BR+SL+SR+TFL+TFR+TBC+LFE2 +@item 9.1.4 +FL+FR+FC+LFE+BL+BR+FLC+FRC+SL+SR+TFL+TFR+TBL+TBR @item hexadecagonal FL+FR+FC+BL+BR+BC+SL+SR+WL+WR+TBL+TBR+TBC+TFC+TFL+TFR @item downmix @@ -785,6 +801,11 @@ The following binary operators are available: @code{+}, @code{-}, The following unary operators are available: @code{+}, @code{-}. +Some internal variables can be used to store and load intermediary +results. They can be accessed using the @code{ld} and @code{st} +functions with an index argument varying from 0 to 9 to specify which +internal variable to access. + The following functions are available: @table @option @item abs(x) @@ -799,7 +820,7 @@ Compute arcsine of @var{x}. @item atan(x) Compute arctangent of @var{x}. -@item atan2(x, y) +@item atan2(y, x) Compute principal value of the arc tangent of @var{y}/@var{x}. @item between(x, min, max) @@ -882,9 +903,9 @@ Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise. @item isnan(x) Return 1.0 if @var{x} is NAN, 0.0 otherwise. -@item ld(var) -Load the value of the internal variable with number -@var{var}, which was previously stored with st(@var{var}, @var{expr}). +@item ld(idx) +Load the value of the internal variable with index @var{idx}, which was +previously stored with st(@var{idx}, @var{expr}). The function returns the loaded value. @item lerp(x, y, z) @@ -917,15 +938,31 @@ Compute the power of @var{x} elevated @var{y}, it is equivalent to @item print(t) @item print(t, l) -Print the value of expression @var{t} with loglevel @var{l}. If -@var{l} is not specified then a default log level is used. -Returns the value of the expression printed. +Print the value of expression @var{t} with loglevel @var{l}. If @var{l} is not +specified then a default log level is used. +Return the value of the expression printed. + +@item random(idx) +Return a pseudo random value between 0.0 and 1.0. @var{idx} is the +index of the internal variable used to save the seed/state, which can be +previously stored with @code{st(idx)}. + +To initialize the seed, you need to store the seed value as a 64-bit +unsigned integer in the internal variable with index @var{idx}. + +For example, to store the seed with value @code{42} in the internal +variable with index @code{0} and print a few random values: +@example +st(0,42); print(random(0)); print(random(0)); print(random(0)) +@end example -Prints t with loglevel l +@item randomi(idx, min, max) +Return a pseudo random value in the interval between @var{min} and +@var{max}. @var{idx} is the index of the internal variable which will be used to +save the seed/state, which can be previously stored with @code{st(idx)}. -@item random(x) -Return a pseudo random value between 0.0 and 1.0. @var{x} is the index of the -internal variable which will be used to save the seed/state. +To initialize the seed, you need to store the seed value as a 64-bit +unsigned integer in the internal variable with index @var{idx}. @item root(expr, max) Find an input value for which the function represented by @var{expr} @@ -934,14 +971,14 @@ with argument @var{ld(0)} is 0 in the interval 0..@var{max}. The expression in @var{expr} must denote a continuous function or the result is undefined. -@var{ld(0)} is used to represent the function input value, which means -that the given expression will be evaluated multiple times with -various input values that the expression can access through -@code{ld(0)}. When the expression evaluates to 0 then the -corresponding input value will be returned. +@var{ld(0)} is used to represent the function input value, which means that the +given expression will be evaluated multiple times with various input values that +the expression can access through @code{ld(0)}. When the expression evaluates to +0 then the corresponding input value will be returned. @item round(expr) -Round the value of expression @var{expr} to the nearest integer. For example, "round(1.5)" is "2.0". +Round the value of expression @var{expr} to the nearest integer. For example, +"round(1.5)" is "2.0". @item sgn(x) Compute sign of @var{x}. @@ -959,12 +996,15 @@ Compute the square root of @var{expr}. This is equivalent to @item squish(x) Compute expression @code{1/(1 + exp(4*x))}. -@item st(var, expr) +@item st(idx, expr) Store the value of the expression @var{expr} in an internal -variable. @var{var} specifies the number of the variable where to -store the value, and it is a value ranging from 0 to 9. The function -returns the value stored in the internal variable. -Note, Variables are currently not shared between expressions. +variable. @var{idx} specifies the index of the variable where to store +the value, and it is a value ranging from 0 to 9. The function returns +the value stored in the internal variable. + +The stored value can be retrieved with @code{ld(var)}. + +Note: variables are currently not shared between expressions. @item tan(x) Compute tangent of @var{x}. @@ -973,16 +1013,16 @@ Compute tangent of @var{x}. Compute hyperbolic tangent of @var{x}. @item taylor(expr, x) -@item taylor(expr, x, id) +@item taylor(expr, x, idx) Evaluate a Taylor series at @var{x}, given an expression representing -the @code{ld(id)}-th derivative of a function at 0. +the @code{ld(idx)}-th derivative of a function at 0. When the series does not converge the result is undefined. -@var{ld(id)} is used to represent the derivative order in @var{expr}, +@var{ld(idx)} is used to represent the derivative order in @var{expr}, which means that the given expression will be evaluated multiple times with various input values that the expression can access through -@code{ld(id)}. If @var{id} is not specified then 0 is assumed. +@code{ld(idx)}. If @var{idx} is not specified then 0 is assumed. Note, when you have the derivatives at y instead of 0, @code{taylor(expr, x-y)} can be used. @@ -1073,13 +1113,13 @@ indication of the corresponding powers of 10 and of 2. @item T 10^12 / 2^40 @item P -10^15 / 2^40 +10^15 / 2^50 @item E -10^18 / 2^50 +10^18 / 2^60 @item Z -10^21 / 2^60 +10^21 / 2^70 @item Y -10^24 / 2^70 +10^24 / 2^80 @end table @c man end EXPRESSION EVALUATION diff --git a/mythtv/external/FFmpeg/ffbuild/arch.mak b/mythtv/external/FFmpeg/ffbuild/arch.mak index 997e31e85ec..3fc40e5e5dd 100644 --- a/mythtv/external/FFmpeg/ffbuild/arch.mak +++ b/mythtv/external/FFmpeg/ffbuild/arch.mak @@ -15,5 +15,9 @@ OBJS-$(HAVE_LASX) += $(LASX-OBJS) $(LASX-OBJS-yes) OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes) OBJS-$(HAVE_VSX) += $(VSX-OBJS) $(VSX-OBJS-yes) +OBJS-$(HAVE_RV) += $(RV-OBJS) $(RV-OBJS-yes) +OBJS-$(HAVE_RVV) += $(RVV-OBJS) $(RVV-OBJS-yes) +OBJS-$(HAVE_RV_ZVBB) += $(RVVB-OBJS) $(RVVB-OBJS-yes) + OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes) OBJS-$(HAVE_X86ASM) += $(X86ASM-OBJS) $(X86ASM-OBJS-yes) diff --git a/mythtv/external/FFmpeg/ffbuild/common.mak b/mythtv/external/FFmpeg/ffbuild/common.mak index 9658d9d8b18..df98a23c884 100644 --- a/mythtv/external/FFmpeg/ffbuild/common.mak +++ b/mythtv/external/FFmpeg/ffbuild/common.mak @@ -130,7 +130,7 @@ $(BIN2CEXE): ffbuild/bin2c_host.o ifdef CONFIG_PTX_COMPRESSION %.ptx.gz: TAG = GZIP %.ptx.gz: %.ptx - $(M)gzip -c9 $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) >$@ + $(M)gzip -nc9 $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) >$@ %.ptx.c: %.ptx.gz $(BIN2CEXE) $(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@))) @@ -140,7 +140,7 @@ else endif clean:: - $(RM) $(BIN2CEXE) + $(RM) $(BIN2CEXE) $(CLEANSUFFIXES:%=ffbuild/%) %.c %.h %.pc %.ver %.version: TAG = GEN diff --git a/mythtv/external/FFmpeg/ffbuild/libversion.sh b/mythtv/external/FFmpeg/ffbuild/libversion.sh index a94ab580579..ecaa90cde66 100755 --- a/mythtv/external/FFmpeg/ffbuild/libversion.sh +++ b/mythtv/external/FFmpeg/ffbuild/libversion.sh @@ -1,3 +1,4 @@ +#!/bin/sh toupper(){ echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ } diff --git a/mythtv/external/FFmpeg/fftools/Makefile b/mythtv/external/FFmpeg/fftools/Makefile index fc898ce9020..22a20a0ca4a 100644 --- a/mythtv/external/FFmpeg/fftools/Makefile +++ b/mythtv/external/FFmpeg/fftools/Makefile @@ -13,13 +13,26 @@ ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF)) ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF)) OBJS-ffmpeg += \ + fftools/ffmpeg_dec.o \ + fftools/ffmpeg_demux.o \ + fftools/ffmpeg_enc.o \ fftools/ffmpeg_filter.o \ fftools/ffmpeg_hw.o \ fftools/ffmpeg_mux.o \ + fftools/ffmpeg_mux_init.o \ fftools/ffmpeg_opt.o \ + fftools/ffmpeg_sched.o \ + fftools/objpool.o \ + fftools/sync_queue.o \ + fftools/thread_queue.o \ + +OBJS-ffplay += fftools/ffplay_renderer.o define DOFFTOOL OBJS-$(1) += fftools/cmdutils.o fftools/opt_common.o fftools/$(1).o $(OBJS-$(1)-yes) +ifdef HAVE_GNU_WINDRES +OBJS-$(1) += fftools/fftoolsres.o +endif $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1)) $$(OBJS-$(1)): | fftools $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) diff --git a/mythtv/external/FFmpeg/fftools/cmdutils.c b/mythtv/external/FFmpeg/fftools/cmdutils.c index 18e768b386a..9beed94eadf 100644 --- a/mythtv/external/FFmpeg/fftools/cmdutils.c +++ b/mythtv/external/FFmpeg/fftools/cmdutils.c @@ -33,16 +33,14 @@ #include "compat/va_copy.h" #include "libavformat/avformat.h" #include "libswscale/swscale.h" -#include "libswscale/version.h" #include "libswresample/swresample.h" #include "libavutil/avassert.h" #include "libavutil/avstring.h" -#include "libavutil/channel_layout.h" +#include "libavutil/bprint.h" #include "libavutil/display.h" #include "libavutil/getenv_utf8.h" -#include "libavutil/mathematics.h" -#include "libavutil/imgutils.h" #include "libavutil/libm.h" +#include "libavutil/mem.h" #include "libavutil/parseutils.h" #include "libavutil/eval.h" #include "libavutil/dict.h" @@ -83,23 +81,8 @@ void init_dynload(void) #endif } -static void (*program_exit)(int ret); - -void register_exit(void (*cb)(int ret)) -{ - program_exit = cb; -} - -void exit_program(int ret) -{ - if (program_exit) - program_exit(ret); - - exit(ret); -} - -double parse_number_or_die(const char *context, const char *numstr, int type, - double min, double max) +int parse_number(const char *context, const char *numstr, enum OptionType type, + double min, double max, double *dst) { char *tail; const char *error; @@ -108,31 +91,21 @@ double parse_number_or_die(const char *context, const char *numstr, int type, error = "Expected number for %s but found: %s\n"; else if (d < min || d > max) error = "The value for %s was %s which is not within %f - %f\n"; - else if (type == OPT_INT64 && (int64_t)d != d) + else if (type == OPT_TYPE_INT64 && (int64_t)d != d) error = "Expected int64 for %s but found %s\n"; - else if (type == OPT_INT && (int)d != d) + else if (type == OPT_TYPE_INT && (int)d != d) error = "Expected int for %s but found %s\n"; - else - return d; - av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max); - exit_program(1); - return 0; -} - -int64_t parse_time_or_die(const char *context, const char *timestr, - int is_duration) -{ - int64_t us; - if (av_parse_time(&us, timestr, is_duration) < 0) { - av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n", - is_duration ? "duration" : "date", context, timestr); - exit_program(1); + else { + *dst = d; + return 0; } - return us; + + av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max); + return AVERROR(EINVAL); } void show_help_options(const OptionDef *options, const char *msg, int req_flags, - int rej_flags, int alt_flags) + int rej_flags) { const OptionDef *po; int first; @@ -142,7 +115,6 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags, char buf[128]; if (((po->flags & req_flags) != req_flags) || - (alt_flags && !(po->flags & alt_flags)) || (po->flags & rej_flags)) continue; @@ -151,10 +123,15 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags, first = 0; } av_strlcpy(buf, po->name, sizeof(buf)); - if (po->argname) { - av_strlcat(buf, " ", sizeof(buf)); - av_strlcat(buf, po->argname, sizeof(buf)); - } + + if (po->flags & OPT_FLAG_PERSTREAM) + av_strlcat(buf, "[:]", sizeof(buf)); + else if (po->flags & OPT_FLAG_SPEC) + av_strlcat(buf, "[:]", sizeof(buf)); + + if (po->argname) + av_strlcatf(buf, sizeof(buf), " <%s>", po->argname); + printf("-%-17s %s\n", buf, po->help); } printf("\n"); @@ -175,6 +152,9 @@ void show_help_children(const AVClass *class, int flags) static const OptionDef *find_option(const OptionDef *po, const char *name) { + if (*name == '/') + name++; + while (po->name) { const char *end; if (av_strstart(name, po->name, &end) && (!*end || *end == ':')) @@ -248,59 +228,150 @@ static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) } #endif /* HAVE_COMMANDLINETOARGVW */ +static int opt_has_arg(const OptionDef *o) +{ + if (o->type == OPT_TYPE_BOOL) + return 0; + if (o->type == OPT_TYPE_FUNC) + return !!(o->flags & OPT_FUNC_ARG); + return 1; +} + static int write_option(void *optctx, const OptionDef *po, const char *opt, - const char *arg) + const char *arg, const OptionDef *defs) { /* new-style options contain an offset into optctx, old-style address of * a global var*/ - void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ? + void *dst = po->flags & OPT_FLAG_OFFSET ? (uint8_t *)optctx + po->u.off : po->u.dst_ptr; - int *dstcount; + char *arg_allocated = NULL; + + enum OptionType so_type = po->type; + + SpecifierOptList *sol = NULL; + double num; + int ret = 0; + + if (*opt == '/') { + opt++; + + if (po->type == OPT_TYPE_BOOL) { + av_log(NULL, AV_LOG_FATAL, + "Requested to load an argument from file for a bool option '%s'\n", + po->name); + return AVERROR(EINVAL); + } - if (po->flags & OPT_SPEC) { - SpecifierOpt **so = dst; + arg_allocated = file_read(arg); + if (!arg_allocated) { + av_log(NULL, AV_LOG_FATAL, + "Error reading the value for option '%s' from file: %s\n", + opt, arg); + return AVERROR(EINVAL); + } + + arg = arg_allocated; + } + + if (po->flags & OPT_FLAG_SPEC) { char *p = strchr(opt, ':'); char *str; - dstcount = (int *)(so + 1); - *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1); + sol = dst; + ret = GROW_ARRAY(sol->opt, sol->nb_opt); + if (ret < 0) + goto finish; + str = av_strdup(p ? p + 1 : ""); - if (!str) - return AVERROR(ENOMEM); - (*so)[*dstcount - 1].specifier = str; - dst = &(*so)[*dstcount - 1].u; + if (!str) { + ret = AVERROR(ENOMEM); + goto finish; + } + sol->opt[sol->nb_opt - 1].specifier = str; + + if (po->flags & OPT_FLAG_PERSTREAM) { + ret = stream_specifier_parse(&sol->opt[sol->nb_opt - 1].stream_spec, + str, 0, NULL); + if (ret < 0) + goto finish; + } + + dst = &sol->opt[sol->nb_opt - 1].u; } - if (po->flags & OPT_STRING) { + if (po->type == OPT_TYPE_STRING) { char *str; - str = av_strdup(arg); + if (arg_allocated) { + str = arg_allocated; + arg_allocated = NULL; + } else + str = av_strdup(arg); av_freep(dst); - if (!str) - return AVERROR(ENOMEM); + + if (!str) { + ret = AVERROR(ENOMEM); + goto finish; + } + *(char **)dst = str; - } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) { - *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX); - } else if (po->flags & OPT_INT64) { - *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); - } else if (po->flags & OPT_TIME) { - *(int64_t *)dst = parse_time_or_die(opt, arg, 1); - } else if (po->flags & OPT_FLOAT) { - *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); - } else if (po->flags & OPT_DOUBLE) { - *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY); - } else if (po->u.func_arg) { - int ret = po->u.func_arg(optctx, opt, arg); + } else if (po->type == OPT_TYPE_BOOL || po->type == OPT_TYPE_INT) { + ret = parse_number(opt, arg, OPT_TYPE_INT64, INT_MIN, INT_MAX, &num); + if (ret < 0) + goto finish; + + *(int *)dst = num; + so_type = OPT_TYPE_INT; + } else if (po->type == OPT_TYPE_INT64) { + ret = parse_number(opt, arg, OPT_TYPE_INT64, INT64_MIN, (double)INT64_MAX, &num); + if (ret < 0) + goto finish; + + *(int64_t *)dst = num; + } else if (po->type == OPT_TYPE_TIME) { + ret = av_parse_time(dst, arg, 1); + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Invalid duration for option %s: %s\n", + opt, arg); + goto finish; + } + so_type = OPT_TYPE_INT64; + } else if (po->type == OPT_TYPE_FLOAT) { + ret = parse_number(opt, arg, OPT_TYPE_FLOAT, -INFINITY, INFINITY, &num); + if (ret < 0) + goto finish; + + *(float *)dst = num; + } else if (po->type == OPT_TYPE_DOUBLE) { + ret = parse_number(opt, arg, OPT_TYPE_DOUBLE, -INFINITY, INFINITY, &num); + if (ret < 0) + goto finish; + + *(double *)dst = num; + } else { + av_assert0(po->type == OPT_TYPE_FUNC && po->u.func_arg); + + ret = po->u.func_arg(optctx, opt, arg); if (ret < 0) { av_log(NULL, AV_LOG_ERROR, "Failed to set value '%s' for option '%s': %s\n", arg, opt, av_err2str(ret)); - return ret; + goto finish; } } - if (po->flags & OPT_EXIT) - exit_program(0); + if (po->flags & OPT_EXIT) { + ret = AVERROR_EXIT; + goto finish; + } - return 0; + if (sol) { + sol->type = so_type; + sol->opt_canon = (po->flags & OPT_HAS_CANON) ? + find_option(defs, po->u1.name_canon) : po; + } + +finish: + av_freep(&arg_allocated); + return ret; } int parse_option(void *optctx, const char *opt, const char *arg, @@ -308,7 +379,8 @@ int parse_option(void *optctx, const char *opt, const char *arg, { static const OptionDef opt_avoptions = { .name = "AVOption passthrough", - .flags = HAS_ARG, + .type = OPT_TYPE_FUNC, + .flags = OPT_FUNC_ARG, .u.func_arg = opt_default, }; @@ -319,9 +391,9 @@ int parse_option(void *optctx, const char *opt, const char *arg, if (!po->name && opt[0] == 'n' && opt[1] == 'o') { /* handle 'no' bool option */ po = find_option(options, opt + 2); - if ((po->name && (po->flags & OPT_BOOL))) + if ((po->name && po->type == OPT_TYPE_BOOL)) arg = "0"; - } else if (po->flags & OPT_BOOL) + } else if (po->type == OPT_TYPE_BOOL) arg = "1"; if (!po->name) @@ -330,20 +402,20 @@ int parse_option(void *optctx, const char *opt, const char *arg, av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); return AVERROR(EINVAL); } - if (po->flags & HAS_ARG && !arg) { + if (opt_has_arg(po) && !arg) { av_log(NULL, AV_LOG_ERROR, "Missing argument for option '%s'\n", opt); return AVERROR(EINVAL); } - ret = write_option(optctx, po, opt, arg); + ret = write_option(optctx, po, opt, arg, options); if (ret < 0) return ret; - return !!(po->flags & HAS_ARG); + return opt_has_arg(po); } -void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, - void (*parse_arg_function)(void *, const char*)) +int parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + int (*parse_arg_function)(void *, const char*)) { const char *opt; int optindex, handleoptions = 1, ret; @@ -364,16 +436,21 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options opt++; if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0) - exit_program(1); + return ret; optindex += ret; } else { - if (parse_arg_function) - parse_arg_function(optctx, opt); + if (parse_arg_function) { + ret = parse_arg_function(optctx, opt); + if (ret < 0) + return ret; + } } } + + return 0; } -int parse_optgroup(void *optctx, OptionGroup *g) +int parse_optgroup(void *optctx, OptionGroup *g, const OptionDef *defs) { int i, ret; @@ -396,7 +473,7 @@ int parse_optgroup(void *optctx, OptionGroup *g) av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n", o->key, o->opt->help, o->val); - ret = write_option(optctx, o->opt, o->key, o->val); + ret = write_option(optctx, o->opt, o->key, o->val, defs); if (ret < 0) return ret; } @@ -426,7 +503,7 @@ int locate_option(int argc, char **argv, const OptionDef *options, (po->name && !strcmp(optname, po->name))) return i; - if (!po->name || po->flags & HAS_ARG) + if (!po->name || opt_has_arg(po)) i++; } return 0; @@ -460,7 +537,14 @@ static void check_options(const OptionDef *po) { while (po->name) { if (po->flags & OPT_PERFILE) - av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT)); + av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT | OPT_DECODER)); + + if (po->type == OPT_TYPE_FUNC) + av_assert0(!(po->flags & (OPT_FLAG_OFFSET | OPT_FLAG_SPEC))); + + // OPT_FUNC_ARG can only be ser for OPT_TYPE_FUNC + av_assert0((po->type == OPT_TYPE_FUNC) || !(po->flags & OPT_FUNC_ARG)); + po++; } } @@ -506,7 +590,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit, return o; } -#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0 +#define FLAGS ((o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0) int opt_default(void *optctx, const char *opt, const char *arg) { const AVOption *o; @@ -599,13 +683,17 @@ static int match_group_separator(const OptionGroupDef *groups, int nb_groups, * @param group_idx which group definition should this group belong to * @param arg argument of the group delimiting option */ -static void finish_group(OptionParseContext *octx, int group_idx, - const char *arg) +static int finish_group(OptionParseContext *octx, int group_idx, + const char *arg) { OptionGroupList *l = &octx->groups[group_idx]; OptionGroup *g; + int ret; + + ret = GROW_ARRAY(l->groups, l->nb_groups); + if (ret < 0) + return ret; - GROW_ARRAY(l->groups, l->nb_groups); g = &l->groups[l->nb_groups - 1]; *g = octx->cur_group; @@ -622,41 +710,51 @@ static void finish_group(OptionParseContext *octx, int group_idx, swr_opts = NULL; memset(&octx->cur_group, 0, sizeof(octx->cur_group)); + + return ret; } /* * Add an option instance to currently parsed group. */ -static void add_opt(OptionParseContext *octx, const OptionDef *opt, - const char *key, const char *val) +static int add_opt(OptionParseContext *octx, const OptionDef *opt, + const char *key, const char *val) { - int global = !(opt->flags & (OPT_PERFILE | OPT_SPEC | OPT_OFFSET)); + int global = !(opt->flags & OPT_PERFILE); OptionGroup *g = global ? &octx->global_opts : &octx->cur_group; + int ret; + + ret = GROW_ARRAY(g->opts, g->nb_opts); + if (ret < 0) + return ret; - GROW_ARRAY(g->opts, g->nb_opts); g->opts[g->nb_opts - 1].opt = opt; g->opts[g->nb_opts - 1].key = key; g->opts[g->nb_opts - 1].val = val; + + return 0; } -static void init_parse_context(OptionParseContext *octx, - const OptionGroupDef *groups, int nb_groups) +static int init_parse_context(OptionParseContext *octx, + const OptionGroupDef *groups, int nb_groups) { static const OptionGroupDef global_group = { "global" }; int i; memset(octx, 0, sizeof(*octx)); - octx->nb_groups = nb_groups; - octx->groups = av_calloc(octx->nb_groups, sizeof(*octx->groups)); + octx->groups = av_calloc(nb_groups, sizeof(*octx->groups)); if (!octx->groups) - exit_program(1); + return AVERROR(ENOMEM); + octx->nb_groups = nb_groups; for (i = 0; i < octx->nb_groups; i++) octx->groups[i].group_def = &groups[i]; octx->global_opts.group_def = &global_group; octx->global_opts.arg = ""; + + return 0; } void uninit_parse_context(OptionParseContext *octx) @@ -688,19 +786,23 @@ int split_commandline(OptionParseContext *octx, int argc, char *argv[], const OptionDef *options, const OptionGroupDef *groups, int nb_groups) { + int ret; int optindex = 1; int dashdash = -2; /* perform system-dependent conversions for arguments list */ prepare_app_arguments(&argc, &argv); - init_parse_context(octx, groups, nb_groups); + ret = init_parse_context(octx, groups, nb_groups); + if (ret < 0) + return ret; + av_log(NULL, AV_LOG_DEBUG, "Splitting the commandline.\n"); while (optindex < argc) { const char *opt = argv[optindex++], *arg; const OptionDef *po; - int ret; + int group_idx; av_log(NULL, AV_LOG_DEBUG, "Reading option '%s' ...", opt); @@ -710,7 +812,10 @@ int split_commandline(OptionParseContext *octx, int argc, char *argv[], } /* unnamed group separators, e.g. output filename */ if (opt[0] != '-' || !opt[1] || dashdash+1 == optindex) { - finish_group(octx, 0, opt); + ret = finish_group(octx, 0, opt); + if (ret < 0) + return ret; + av_log(NULL, AV_LOG_DEBUG, " matched as %s.\n", groups[0].name); continue; } @@ -726,11 +831,15 @@ do { \ } while (0) /* named group separators, e.g. -i */ - if ((ret = match_group_separator(groups, nb_groups, opt)) >= 0) { + group_idx = match_group_separator(groups, nb_groups, opt); + if (group_idx >= 0) { GET_ARG(arg); - finish_group(octx, ret, arg); + ret = finish_group(octx, group_idx, arg); + if (ret < 0) + return ret; + av_log(NULL, AV_LOG_DEBUG, " matched as %s with argument '%s'.\n", - groups[ret].name, arg); + groups[group_idx].name, arg); continue; } @@ -740,13 +849,16 @@ do { \ if (po->flags & OPT_EXIT) { /* optional argument, e.g. -h */ arg = argv[optindex++]; - } else if (po->flags & HAS_ARG) { + } else if (opt_has_arg(po)) { GET_ARG(arg); } else { arg = "1"; } - add_opt(octx, po, opt, arg); + ret = add_opt(octx, po, opt, arg); + if (ret < 0) + return ret; + av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " "argument '%s'.\n", po->name, po->help, arg); continue; @@ -770,8 +882,11 @@ do { \ /* boolean -nofoo options */ if (opt[0] == 'n' && opt[1] == 'o' && (po = find_option(options, opt + 2)) && - po->name && po->flags & OPT_BOOL) { - add_opt(octx, po, opt, "0"); + po->name && po->type == OPT_TYPE_BOOL) { + ret = add_opt(octx, po, opt, "0"); + if (ret < 0) + return ret; + av_log(NULL, AV_LOG_DEBUG, " matched as option '%s' (%s) with " "argument 0.\n", po->name, po->help); continue; @@ -790,16 +905,6 @@ do { \ return 0; } -void print_error(const char *filename, int err) -{ - char errbuf[128]; - const char *errbuf_ptr = errbuf; - - if (av_strerror(err, errbuf, sizeof(errbuf)) < 0) - errbuf_ptr = strerror(AVUNERROR(err)); - av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, errbuf_ptr); -} - int read_yesno(void) { int c = getchar(); @@ -883,16 +988,366 @@ FILE *get_preset_file(char *filename, size_t filename_size, return f; } +int cmdutils_isalnum(char c) +{ + return (c >= '0' && c <= '9') || + (c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z'); +} + +void stream_specifier_uninit(StreamSpecifier *ss) +{ + av_freep(&ss->meta_key); + av_freep(&ss->meta_val); + av_freep(&ss->remainder); + + memset(ss, 0, sizeof(*ss)); +} + +int stream_specifier_parse(StreamSpecifier *ss, const char *spec, + int allow_remainder, void *logctx) +{ + char *endptr; + int ret; + + memset(ss, 0, sizeof(*ss)); + + ss->idx = -1; + ss->media_type = AVMEDIA_TYPE_UNKNOWN; + ss->stream_list = STREAM_LIST_ALL; + + av_log(logctx, AV_LOG_TRACE, "Parsing stream specifier: %s\n", spec); + + while (*spec) { + if (*spec <= '9' && *spec >= '0') { /* opt:index */ + ss->idx = strtol(spec, &endptr, 0); + + av_assert0(endptr > spec); + spec = endptr; + + av_log(logctx, AV_LOG_TRACE, + "Parsed index: %d; remainder: %s\n", ss->idx, spec); + + // this terminates the specifier + break; + } else if ((*spec == 'v' || *spec == 'a' || *spec == 's' || + *spec == 'd' || *spec == 't' || *spec == 'V') && + !cmdutils_isalnum(*(spec + 1))) { /* opt:[vasdtV] */ + if (ss->media_type != AVMEDIA_TYPE_UNKNOWN) { + av_log(logctx, AV_LOG_ERROR, "Stream type specified multiple times\n"); + ret = AVERROR(EINVAL); + goto fail; + } + + switch (*spec++) { + case 'v': ss->media_type = AVMEDIA_TYPE_VIDEO; break; + case 'a': ss->media_type = AVMEDIA_TYPE_AUDIO; break; + case 's': ss->media_type = AVMEDIA_TYPE_SUBTITLE; break; + case 'd': ss->media_type = AVMEDIA_TYPE_DATA; break; + case 't': ss->media_type = AVMEDIA_TYPE_ATTACHMENT; break; + case 'V': ss->media_type = AVMEDIA_TYPE_VIDEO; + ss->no_apic = 1; break; + default: av_assert0(0); + } + + av_log(logctx, AV_LOG_TRACE, "Parsed media type: %s; remainder: %s\n", + av_get_media_type_string(ss->media_type), spec); + } else if (*spec == 'g' && *(spec + 1) == ':') { + if (ss->stream_list != STREAM_LIST_ALL) + goto multiple_stream_lists; + + spec += 2; + if (*spec == '#' || (*spec == 'i' && *(spec + 1) == ':')) { + ss->stream_list = STREAM_LIST_GROUP_ID; + + spec += 1 + (*spec == 'i'); + } else + ss->stream_list = STREAM_LIST_GROUP_IDX; + + ss->list_id = strtol(spec, &endptr, 0); + if (spec == endptr) { + av_log(logctx, AV_LOG_ERROR, "Expected stream group idx/ID, got: %s\n", spec); + ret = AVERROR(EINVAL); + goto fail; + } + spec = endptr; + + av_log(logctx, AV_LOG_TRACE, "Parsed stream group %s: %"PRId64"; remainder: %s\n", + ss->stream_list == STREAM_LIST_GROUP_ID ? "ID" : "index", ss->list_id, spec); + } else if (*spec == 'p' && *(spec + 1) == ':') { + if (ss->stream_list != STREAM_LIST_ALL) + goto multiple_stream_lists; + + ss->stream_list = STREAM_LIST_PROGRAM; + + spec += 2; + ss->list_id = strtol(spec, &endptr, 0); + if (spec == endptr) { + av_log(logctx, AV_LOG_ERROR, "Expected program ID, got: %s\n", spec); + ret = AVERROR(EINVAL); + goto fail; + } + spec = endptr; + + av_log(logctx, AV_LOG_TRACE, + "Parsed program ID: %"PRId64"; remainder: %s\n", ss->list_id, spec); + } else if (!strncmp(spec, "disp:", 5)) { + const AVClass *st_class = av_stream_get_class(); + const AVOption *o = av_opt_find(&st_class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ); + char *disp = NULL; + size_t len; + + av_assert0(o); + + if (ss->disposition) { + av_log(logctx, AV_LOG_ERROR, "Multiple disposition specifiers\n"); + ret = AVERROR(EINVAL); + goto fail; + } + + spec += 5; + + for (len = 0; cmdutils_isalnum(spec[len]) || + spec[len] == '_' || spec[len] == '+'; len++) + continue; + + disp = av_strndup(spec, len); + if (!disp) { + ret = AVERROR(ENOMEM); + goto fail; + } + + ret = av_opt_eval_flags(&st_class, o, disp, &ss->disposition); + av_freep(&disp); + if (ret < 0) { + av_log(logctx, AV_LOG_ERROR, "Invalid disposition specifier\n"); + goto fail; + } + + spec += len; + + av_log(logctx, AV_LOG_TRACE, + "Parsed disposition: 0x%x; remainder: %s\n", ss->disposition, spec); + } else if (*spec == '#' || + (*spec == 'i' && *(spec + 1) == ':')) { + if (ss->stream_list != STREAM_LIST_ALL) + goto multiple_stream_lists; + + ss->stream_list = STREAM_LIST_STREAM_ID; + + spec += 1 + (*spec == 'i'); + ss->list_id = strtol(spec, &endptr, 0); + if (spec == endptr) { + av_log(logctx, AV_LOG_ERROR, "Expected stream ID, got: %s\n", spec); + ret = AVERROR(EINVAL); + goto fail; + } + spec = endptr; + + av_log(logctx, AV_LOG_TRACE, + "Parsed stream ID: %"PRId64"; remainder: %s\n", ss->list_id, spec); + + // this terminates the specifier + break; + } else if (*spec == 'm' && *(spec + 1) == ':') { + av_assert0(!ss->meta_key && !ss->meta_val); + + spec += 2; + ss->meta_key = av_get_token(&spec, ":"); + if (!ss->meta_key) { + ret = AVERROR(ENOMEM); + goto fail; + } + if (*spec == ':') { + spec++; + ss->meta_val = av_get_token(&spec, ":"); + if (!ss->meta_val) { + ret = AVERROR(ENOMEM); + goto fail; + } + } + + av_log(logctx, AV_LOG_TRACE, + "Parsed metadata: %s:%s; remainder: %s", ss->meta_key, + ss->meta_val ? ss->meta_val : "", spec); + + // this terminates the specifier + break; + } else if (*spec == 'u' && (*(spec + 1) == '\0' || *(spec + 1) == ':')) { + ss->usable_only = 1; + spec++; + av_log(logctx, AV_LOG_ERROR, "Parsed 'usable only'\n"); + + // this terminates the specifier + break; + } else + break; + + if (*spec == ':') + spec++; + } + + if (*spec) { + if (!allow_remainder) { + av_log(logctx, AV_LOG_ERROR, + "Trailing garbage at the end of a stream specifier: %s\n", + spec); + ret = AVERROR(EINVAL); + goto fail; + } + + if (*spec == ':') + spec++; + + ss->remainder = av_strdup(spec); + if (!ss->remainder) { + ret = AVERROR(EINVAL); + goto fail; + } + } + + return 0; + +multiple_stream_lists: + av_log(logctx, AV_LOG_ERROR, + "Cannot combine multiple program/group designators in a " + "single stream specifier"); + ret = AVERROR(EINVAL); + +fail: + stream_specifier_uninit(ss); + return ret; +} + +unsigned stream_specifier_match(const StreamSpecifier *ss, + const AVFormatContext *s, const AVStream *st, + void *logctx) +{ + const AVStreamGroup *g = NULL; + const AVProgram *p = NULL; + int start_stream = 0, nb_streams; + int nb_matched = 0; + + switch (ss->stream_list) { + case STREAM_LIST_STREAM_ID: + // stream with given ID makes no sense and should be impossible to request + av_assert0(ss->idx < 0); + // return early if we know for sure the stream does not match + if (st->id != ss->list_id) + return 0; + start_stream = st->index; + nb_streams = st->index + 1; + break; + case STREAM_LIST_ALL: + start_stream = ss->idx >= 0 ? 0 : st->index; + nb_streams = st->index + 1; + break; + case STREAM_LIST_PROGRAM: + for (unsigned i = 0; i < s->nb_programs; i++) { + if (s->programs[i]->id == ss->list_id) { + p = s->programs[i]; + break; + } + } + if (!p) { + av_log(logctx, AV_LOG_WARNING, "No program with ID %"PRId64" exists," + " stream specifier can never match\n", ss->list_id); + return 0; + } + nb_streams = p->nb_stream_indexes; + break; + case STREAM_LIST_GROUP_ID: + for (unsigned i = 0; i < s->nb_stream_groups; i++) { + if (ss->list_id == s->stream_groups[i]->id) { + g = s->stream_groups[i]; + break; + } + } + // fall-through + case STREAM_LIST_GROUP_IDX: + if (ss->stream_list == STREAM_LIST_GROUP_IDX && + ss->list_id >= 0 && ss->list_id < s->nb_stream_groups) + g = s->stream_groups[ss->list_id]; + + if (!g) { + av_log(logctx, AV_LOG_WARNING, "No stream group with group %s %" + PRId64" exists, stream specifier can never match\n", + ss->stream_list == STREAM_LIST_GROUP_ID ? "ID" : "index", + ss->list_id); + return 0; + } + nb_streams = g->nb_streams; + break; + default: av_assert0(0); + } + + for (int i = start_stream; i < nb_streams; i++) { + const AVStream *candidate = s->streams[g ? g->streams[i]->index : + p ? p->stream_index[i] : i]; + + if (ss->media_type != AVMEDIA_TYPE_UNKNOWN && + (ss->media_type != candidate->codecpar->codec_type || + (ss->no_apic && (candidate->disposition & AV_DISPOSITION_ATTACHED_PIC)))) + continue; + + if (ss->meta_key) { + const AVDictionaryEntry *tag = av_dict_get(candidate->metadata, + ss->meta_key, NULL, 0); + + if (!tag) + continue; + if (ss->meta_val && strcmp(tag->value, ss->meta_val)) + continue; + } + + if (ss->usable_only) { + const AVCodecParameters *par = candidate->codecpar; + + switch (par->codec_type) { + case AVMEDIA_TYPE_AUDIO: + if (!par->sample_rate || !par->ch_layout.nb_channels || + par->format == AV_SAMPLE_FMT_NONE) + continue; + break; + case AVMEDIA_TYPE_VIDEO: + if (!par->width || !par->height || par->format == AV_PIX_FMT_NONE) + continue; + break; + case AVMEDIA_TYPE_UNKNOWN: + continue; + } + } + + if (ss->disposition && + (candidate->disposition & ss->disposition) != ss->disposition) + continue; + + if (st == candidate) + return ss->idx < 0 || ss->idx == nb_matched; + + nb_matched++; + } + + return 0; +} + int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec) { - int ret = avformat_match_stream_specifier(s, st, spec); + StreamSpecifier ss; + int ret; + + ret = stream_specifier_parse(&ss, spec, 0, NULL); if (ret < 0) - av_log(s, AV_LOG_ERROR, "Invalid stream specifier: %s.\n", spec); + return ret; + + ret = stream_specifier_match(&ss, s, st, NULL); + stream_specifier_uninit(&ss); return ret; } -AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, - AVFormatContext *s, AVStream *st, const AVCodec *codec) +int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, const AVCodec *codec, + AVDictionary **dst, AVDictionary **opts_used) { AVDictionary *ret = NULL; const AVDictionaryEntry *t = NULL; @@ -901,10 +1356,6 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, char prefix = 0; const AVClass *cc = avcodec_get_class(); - if (!codec) - codec = s->oformat ? avcodec_find_encoder(codec_id) - : avcodec_find_decoder(codec_id); - switch (st->codecpar->codec_type) { case AVMEDIA_TYPE_VIDEO: prefix = 'v'; @@ -920,72 +1371,95 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, break; } - while (t = av_dict_get(opts, "", t, AV_DICT_IGNORE_SUFFIX)) { + while (t = av_dict_iterate(opts, t)) { const AVClass *priv_class; char *p = strchr(t->key, ':'); + int used = 0; /* check stream specification in opt name */ - if (p) - switch (check_stream_specifier(s, st, p + 1)) { - case 1: *p = 0; break; - case 0: continue; - default: exit_program(1); - } + if (p) { + int err = check_stream_specifier(s, st, p + 1); + if (err < 0) { + av_dict_free(&ret); + return err; + } else if (!err) + continue; + + *p = 0; + } if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) || !codec || ((priv_class = codec->priv_class) && av_opt_find(&priv_class, t->key, NULL, flags, - AV_OPT_SEARCH_FAKE_OBJ))) + AV_OPT_SEARCH_FAKE_OBJ))) { av_dict_set(&ret, t->key, t->value, 0); - else if (t->key[0] == prefix && + used = 1; + } else if (t->key[0] == prefix && av_opt_find(&cc, t->key + 1, NULL, flags, - AV_OPT_SEARCH_FAKE_OBJ)) + AV_OPT_SEARCH_FAKE_OBJ)) { av_dict_set(&ret, t->key + 1, t->value, 0); + used = 1; + } if (p) *p = ':'; + + if (used && opts_used) + av_dict_set(opts_used, t->key, "", 0); } - return ret; + + *dst = ret; + return 0; } -AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, - AVDictionary *codec_opts) +int setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *local_codec_opts, + AVDictionary ***dst) { - int i; + int ret; AVDictionary **opts; + *dst = NULL; + if (!s->nb_streams) - return NULL; + return 0; + opts = av_calloc(s->nb_streams, sizeof(*opts)); - if (!opts) { - av_log(NULL, AV_LOG_ERROR, - "Could not alloc memory for stream options.\n"); - exit_program(1); + if (!opts) + return AVERROR(ENOMEM); + + for (int i = 0; i < s->nb_streams; i++) { + ret = filter_codec_opts(local_codec_opts, s->streams[i]->codecpar->codec_id, + s, s->streams[i], NULL, &opts[i], NULL); + if (ret < 0) + goto fail; } - for (i = 0; i < s->nb_streams; i++) - opts[i] = filter_codec_opts(codec_opts, s->streams[i]->codecpar->codec_id, - s, s->streams[i], NULL); - return opts; + *dst = opts; + return 0; +fail: + for (int i = 0; i < s->nb_streams; i++) + av_dict_free(&opts[i]); + av_freep(&opts); + return ret; } -void *grow_array(void *array, int elem_size, int *size, int new_size) +int grow_array(void **array, int elem_size, int *size, int new_size) { if (new_size >= INT_MAX / elem_size) { av_log(NULL, AV_LOG_ERROR, "Array too big.\n"); - exit_program(1); + return AVERROR(ERANGE); } if (*size < new_size) { - uint8_t *tmp = av_realloc_array(array, new_size, elem_size); - if (!tmp) { - av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); - exit_program(1); - } + uint8_t *tmp = av_realloc_array(*array, new_size, elem_size); + if (!tmp) + return AVERROR(ENOMEM); memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size); *size = new_size; - return tmp; + *array = tmp; + return 0; } - return array; + return 0; } void *allocate_array_elem(void *ptr, size_t elem_size, int *nb_elems) @@ -993,18 +1467,16 @@ void *allocate_array_elem(void *ptr, size_t elem_size, int *nb_elems) void *new_elem; if (!(new_elem = av_mallocz(elem_size)) || - av_dynarray_add_nofree(ptr, nb_elems, new_elem) < 0) { - av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n"); - exit_program(1); - } + av_dynarray_add_nofree(ptr, nb_elems, new_elem) < 0) + return NULL; return new_elem; } -double get_rotation(int32_t *displaymatrix) +double get_rotation(const int32_t *displaymatrix) { double theta = 0; if (displaymatrix) - theta = -round(av_display_rotation_get((int32_t*) displaymatrix)); + theta = -round(av_display_rotation_get(displaymatrix)); theta -= 360*floor(theta/360 + 0.9/360); @@ -1016,3 +1488,49 @@ double get_rotation(int32_t *displaymatrix) return theta; } + +/* read file contents into a string */ +char *file_read(const char *filename) +{ + AVIOContext *pb = NULL; + int ret = avio_open(&pb, filename, AVIO_FLAG_READ); + AVBPrint bprint; + char *str; + + if (ret < 0) { + av_log(NULL, AV_LOG_ERROR, "Error opening file %s.\n", filename); + return NULL; + } + + av_bprint_init(&bprint, 0, AV_BPRINT_SIZE_UNLIMITED); + ret = avio_read_to_bprint(pb, &bprint, SIZE_MAX); + avio_closep(&pb); + if (ret < 0) { + av_bprint_finalize(&bprint, NULL); + return NULL; + } + ret = av_bprint_finalize(&bprint, &str); + if (ret < 0) + return NULL; + return str; +} + +void remove_avoptions(AVDictionary **a, AVDictionary *b) +{ + const AVDictionaryEntry *t = NULL; + + while ((t = av_dict_iterate(b, t))) { + av_dict_set(a, t->key, NULL, AV_DICT_MATCH_CASE); + } +} + +int check_avoptions(AVDictionary *m) +{ + const AVDictionaryEntry *t = av_dict_iterate(m, NULL); + if (t) { + av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); + return AVERROR_OPTION_NOT_FOUND; + } + + return 0; +} diff --git a/mythtv/external/FFmpeg/fftools/cmdutils.h b/mythtv/external/FFmpeg/fftools/cmdutils.h index d87e162ccd6..316b6a8c64a 100644 --- a/mythtv/external/FFmpeg/fftools/cmdutils.h +++ b/mythtv/external/FFmpeg/fftools/cmdutils.h @@ -49,16 +49,6 @@ extern AVDictionary *swr_opts; extern AVDictionary *format_opts, *codec_opts; extern int hide_banner; -/** - * Register a program-specific cleanup routine. - */ -void register_exit(void (*cb)(int ret)); - -/** - * Wraps exit with a program-specific cleanup routine. - */ -void exit_program(int ret) av_noreturn; - /** * Initialize dynamic library loading */ @@ -87,10 +77,19 @@ int opt_default(void *optctx, const char *opt, const char *arg); */ int opt_timelimit(void *optctx, const char *opt, const char *arg); +enum OptionType { + OPT_TYPE_FUNC, + OPT_TYPE_BOOL, + OPT_TYPE_STRING, + OPT_TYPE_INT, + OPT_TYPE_INT64, + OPT_TYPE_FLOAT, + OPT_TYPE_DOUBLE, + OPT_TYPE_TIME, +}; + /** * Parse a string and return its corresponding value as a double. - * Exit from the application if the string cannot be correctly - * parsed or the corresponding value is invalid. * * @param context the context of the value to be set (e.g. the * corresponding command line option name) @@ -100,28 +99,73 @@ int opt_timelimit(void *optctx, const char *opt, const char *arg); * @param min the minimum valid accepted value * @param max the maximum valid accepted value */ -double parse_number_or_die(const char *context, const char *numstr, int type, - double min, double max); +int parse_number(const char *context, const char *numstr, enum OptionType type, + double min, double max, double *dst); + +enum StreamList { + STREAM_LIST_ALL, + STREAM_LIST_STREAM_ID, + STREAM_LIST_PROGRAM, + STREAM_LIST_GROUP_ID, + STREAM_LIST_GROUP_IDX, +}; + +typedef struct StreamSpecifier { + // trailing stream index - pick idx-th stream that matches + // all the other constraints; -1 when not present + int idx; + + // which stream list to consider + enum StreamList stream_list; + + // STREAM_LIST_STREAM_ID: stream ID + // STREAM_LIST_GROUP_IDX: group index + // STREAM_LIST_GROUP_ID: group ID + // STREAM_LIST_PROGRAM: program ID + int64_t list_id; + + // when not AVMEDIA_TYPE_UNKNOWN, consider only streams of this type + enum AVMediaType media_type; + uint8_t no_apic; + + uint8_t usable_only; + + int disposition; + + char *meta_key; + char *meta_val; + + char *remainder; +} StreamSpecifier; /** - * Parse a string specifying a time and return its corresponding - * value as a number of microseconds. Exit from the application if - * the string cannot be correctly parsed. + * Parse a stream specifier string into a form suitable for matching. * - * @param context the context of the value to be set (e.g. the - * corresponding command line option name) - * @param timestr the string to be parsed - * @param is_duration a flag which tells how to interpret timestr, if - * not zero timestr is interpreted as a duration, otherwise as a - * date - * - * @see av_parse_time() + * @param ss Parsed specifier will be stored here; must be uninitialized + * with stream_specifier_uninit() when no longer needed. + * @param spec String containing the stream specifier to be parsed. + * @param allow_remainder When 1, the part of spec that is left after parsing + * the stream specifier is stored into ss->remainder. + * When 0, any remainder will cause parsing to fail. + */ +int stream_specifier_parse(StreamSpecifier *ss, const char *spec, + int allow_remainder, void *logctx); + +/** + * @return 1 if st matches the parsed specifier, 0 if it does not */ -int64_t parse_time_or_die(const char *context, const char *timestr, - int is_duration); +unsigned stream_specifier_match(const StreamSpecifier *ss, + const AVFormatContext *s, const AVStream *st, + void *logctx); + +void stream_specifier_uninit(StreamSpecifier *ss); typedef struct SpecifierOpt { - char *specifier; /**< stream/chapter/program/... specifier */ + // original specifier or empty string + char *specifier; + // parsed specifier for OPT_FLAG_PERSTREAM options + StreamSpecifier stream_spec; + union { uint8_t *str; int i; @@ -132,31 +176,73 @@ typedef struct SpecifierOpt { } u; } SpecifierOpt; +typedef struct SpecifierOptList { + SpecifierOpt *opt; + int nb_opt; + + /* Canonical option definition that was parsed into this list. */ + const struct OptionDef *opt_canon; + /* Type corresponding to the field that should be used from SpecifierOpt.u. + * May not match the option type, e.g. OPT_TYPE_BOOL options are stored as + * int, so this field would be OPT_TYPE_INT for them */ + enum OptionType type; +} SpecifierOptList; + typedef struct OptionDef { const char *name; + enum OptionType type; int flags; -#define HAS_ARG 0x0001 -#define OPT_BOOL 0x0002 -#define OPT_EXPERT 0x0004 -#define OPT_STRING 0x0008 -#define OPT_VIDEO 0x0010 -#define OPT_AUDIO 0x0020 -#define OPT_INT 0x0080 -#define OPT_FLOAT 0x0100 -#define OPT_SUBTITLE 0x0200 -#define OPT_INT64 0x0400 -#define OPT_EXIT 0x0800 -#define OPT_DATA 0x1000 -#define OPT_PERFILE 0x2000 /* the option is per-file (currently ffmpeg-only). - implied by OPT_OFFSET or OPT_SPEC */ -#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */ -#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt. - Implies OPT_OFFSET. Next element after the offset is - an int containing element count in the array. */ -#define OPT_TIME 0x10000 -#define OPT_DOUBLE 0x20000 -#define OPT_INPUT 0x40000 -#define OPT_OUTPUT 0x80000 + +/* The OPT_TYPE_FUNC option takes an argument. + * Must not be used with other option types, as for those it holds: + * - OPT_TYPE_BOOL do not take an argument + * - all other types do + */ +#define OPT_FUNC_ARG (1 << 0) +/* Program will immediately exit after processing this option */ +#define OPT_EXIT (1 << 1) +/* Option is intended for advanced users. Only affects + * help output. + */ +#define OPT_EXPERT (1 << 2) +#define OPT_VIDEO (1 << 3) +#define OPT_AUDIO (1 << 4) +#define OPT_SUBTITLE (1 << 5) +#define OPT_DATA (1 << 6) +/* The option is per-file (currently ffmpeg-only). At least one of OPT_INPUT, + * OPT_OUTPUT, OPT_DECODER must be set when this flag is in use. + */ +#define OPT_PERFILE (1 << 7) + +/* Option is specified as an offset in a passed optctx. + * Always use as OPT_OFFSET in option definitions. */ +#define OPT_FLAG_OFFSET (1 << 8) +#define OPT_OFFSET (OPT_FLAG_OFFSET | OPT_PERFILE) + +/* Option is to be stored in a SpecifierOptList. + Always use as OPT_SPEC in option definitions. */ +#define OPT_FLAG_SPEC (1 << 9) +#define OPT_SPEC (OPT_FLAG_SPEC | OPT_OFFSET) + +/* Option applies per-stream (implies OPT_SPEC). */ +#define OPT_FLAG_PERSTREAM (1 << 10) +#define OPT_PERSTREAM (OPT_FLAG_PERSTREAM | OPT_SPEC) + +/* ffmpeg-only - specifies whether an OPT_PERFILE option applies to input, + * output, or both. */ +#define OPT_INPUT (1 << 11) +#define OPT_OUTPUT (1 << 12) + +/* This option is a "canonical" form, to which one or more alternatives + * exist. These alternatives are listed in u1.names_alt. */ +#define OPT_HAS_ALT (1 << 13) +/* This option is an alternative form of some other option, whose + * name is stored in u1.name_canon */ +#define OPT_HAS_CANON (1 << 14) + +/* ffmpeg-only - OPT_PERFILE may apply to standalone decoders */ +#define OPT_DECODER (1 << 15) + union { void *dst_ptr; int (*func_arg)(void *, const char *, const char *); @@ -164,6 +250,15 @@ typedef struct OptionDef { } u; const char *help; const char *argname; + + union { + /* Name of the canonical form of this option. + * Is valid when OPT_HAS_CANON is set. */ + const char *name_canon; + /* A NULL-terminated list of alternate forms of this option. + * Is valid when OPT_HAS_ALT is set. */ + const char * const *names_alt; + } u1; } OptionDef; /** @@ -173,10 +268,9 @@ typedef struct OptionDef { * @param msg title of this group. Only printed if at least one option matches. * @param req_flags print only options which have all those flags set. * @param rej_flags don't print options which have any of those flags set. - * @param alt_flags print only options that have at least one of those flags set */ void show_help_options(const OptionDef *options, const char *msg, int req_flags, - int rej_flags, int alt_flags); + int rej_flags); /** * Show help for all options with given flags in class and all its @@ -202,8 +296,8 @@ void show_help_default(const char *opt, const char *arg); * argument without a leading option name flag. NULL if such arguments do * not have to be processed. */ -void parse_options(void *optctx, int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(void *optctx, const char*)); +int parse_options(void *optctx, int argc, char **argv, const OptionDef *options, + int (* parse_arg_function)(void *optctx, const char*)); /** * Parse one given option. @@ -278,7 +372,7 @@ typedef struct OptionParseContext { * * @param optctx an app-specific options context. NULL for global options group */ -int parse_optgroup(void *optctx, OptionGroup *g); +int parse_optgroup(void *optctx, OptionGroup *g, const OptionDef *defs); /** * Split the commandline into an intermediate form convenient for further @@ -341,10 +435,14 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec); * @param st A stream from s for which the options should be filtered. * @param codec The particular codec for which the options should be filtered. * If null, the default one is looked up according to the codec id. - * @return a pointer to the created dictionary + * @param dst a pointer to the created dictionary + * @param opts_used if non-NULL, every option stored in dst is also stored here, + * with specifiers preserved + * @return a non-negative number on success, a negative error code on failure */ -AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, - AVFormatContext *s, AVStream *st, const AVCodec *codec); +int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, + AVFormatContext *s, AVStream *st, const AVCodec *codec, + AVDictionary **dst, AVDictionary **opts_used); /** * Setup AVCodecContext options for avformat_find_stream_info(). @@ -353,12 +451,10 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id, * contained in s. * Each dictionary will contain the options from codec_opts which can * be applied to the corresponding stream codec context. - * - * @return pointer to the created array of dictionaries. - * Calls exit() on failure. */ -AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, - AVDictionary *codec_opts); +int setup_find_stream_info_opts(AVFormatContext *s, + AVDictionary *codec_opts, + AVDictionary ***dst); /** * Print an error message to stderr, indicating filename and a human @@ -369,7 +465,10 @@ AVDictionary **setup_find_stream_info_opts(AVFormatContext *s, * * @see av_strerror() */ -void print_error(const char *filename, int err); +static inline void print_error(const char *filename, int err) +{ + av_log(NULL, AV_LOG_ERROR, "%s: %s\n", filename, av_err2str(err)); +} /** * Print the program banner to stderr. The banner contents depend on the @@ -407,49 +506,43 @@ FILE *get_preset_file(char *filename, size_t filename_size, /** * Realloc array to hold new_size elements of elem_size. - * Calls exit() on failure. * - * @param array array to reallocate + * @param array pointer to the array to reallocate, will be updated + * with a new pointer on success * @param elem_size size in bytes of each element * @param size new element count will be written here * @param new_size number of elements to place in reallocated array - * @return reallocated array + * @return a non-negative number on success, a negative error code on failure */ -void *grow_array(void *array, int elem_size, int *size, int new_size); +int grow_array(void **array, int elem_size, int *size, int new_size); /** * Atomically add a new element to an array of pointers, i.e. allocate * a new entry, reallocate the array of pointers and make the new last * member of this array point to the newly allocated buffer. - * Calls exit() on failure. * * @param array array of pointers to reallocate * @param elem_size size of the new element to allocate * @param nb_elems pointer to the number of elements of the array array; * *nb_elems will be incremented by one by this function. - * @return pointer to the newly allocated entry + * @return pointer to the newly allocated entry or NULL on failure */ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems); #define GROW_ARRAY(array, nb_elems)\ - array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1) - -#define ALLOC_ARRAY_ELEM(array, nb_elems)\ - allocate_array_elem(&array, sizeof(*array[0]), &nb_elems) + grow_array((void**)&array, sizeof(*array), &nb_elems, nb_elems + 1) -#define GET_PIX_FMT_NAME(pix_fmt)\ - const char *name = av_get_pix_fmt_name(pix_fmt); +double get_rotation(const int32_t *displaymatrix); -#define GET_CODEC_NAME(id)\ - const char *name = avcodec_descriptor_get(id)->name; +/* read file contents into a string */ +char *file_read(const char *filename); -#define GET_SAMPLE_FMT_NAME(sample_fmt)\ - const char *name = av_get_sample_fmt_name(sample_fmt) +/* Remove keys in dictionary b from dictionary a */ +void remove_avoptions(AVDictionary **a, AVDictionary *b); -#define GET_SAMPLE_RATE_NAME(rate)\ - char name[16];\ - snprintf(name, sizeof(name), "%d", rate); +/* Check if any keys exist in dictionary m */ +int check_avoptions(AVDictionary *m); -double get_rotation(int32_t *displaymatrix); +int cmdutils_isalnum(char c); #endif /* FFTOOLS_CMDUTILS_H */ diff --git a/mythtv/external/FFmpeg/fftools/ffmpeg.c b/mythtv/external/FFmpeg/fftools/ffmpeg.c index e7384f052a0..420ba3c6e47 100644 --- a/mythtv/external/FFmpeg/fftools/ffmpeg.c +++ b/mythtv/external/FFmpeg/fftools/ffmpeg.c @@ -24,14 +24,14 @@ */ #include "config.h" -#include -#include -#include -#include + #include #include #include #include +#include +#include +#include #if HAVE_IO_H #include @@ -40,37 +40,6 @@ #include #endif -#include "libavformat/avformat.h" -#include "libavdevice/avdevice.h" -#include "libswresample/swresample.h" -#include "libavutil/opt.h" -#include "libavutil/channel_layout.h" -#include "libavutil/parseutils.h" -#include "libavutil/samplefmt.h" -#include "libavutil/fifo.h" -#include "libavutil/hwcontext.h" -#include "libavutil/internal.h" -#include "libavutil/intreadwrite.h" -#include "libavutil/dict.h" -#include "libavutil/display.h" -#include "libavutil/mathematics.h" -#include "libavutil/pixdesc.h" -#include "libavutil/avstring.h" -#include "libavutil/libm.h" -#include "libavutil/imgutils.h" -#include "libavutil/timestamp.h" -#include "libavutil/bprint.h" -#include "libavutil/time.h" -#include "libavutil/thread.h" -#include "libavutil/threadmessage.h" -#include "libavcodec/mathops.h" -#include "libavcodec/version.h" -#include "libavformat/os_support.h" - -# include "libavfilter/avfilter.h" -# include "libavfilter/buffersrc.h" -# include "libavfilter/buffersink.h" - #if HAVE_SYS_RESOURCE_H #include #include @@ -86,7 +55,6 @@ #include #endif - #if HAVE_SYS_SELECT_H #include #endif @@ -100,26 +68,24 @@ #include #endif -#include +#include "libavutil/bprint.h" +#include "libavutil/dict.h" +#include "libavutil/mem.h" +#include "libavutil/time.h" -#include "ffmpeg.h" -#include "cmdutils.h" +#include "libavformat/avformat.h" + +#include "libavdevice/avdevice.h" -#include "libavutil/avassert.h" +#include "cmdutils.h" +#include "ffmpeg.h" +#include "ffmpeg_sched.h" +#include "ffmpeg_utils.h" const char program_name[] = "ffmpeg"; const int program_birth_year = 2000; -static FILE *vstats_file; - -const char *const forced_keyframes_const_names[] = { - "n", - "n_forced", - "prev_forced_n", - "prev_forced_t", - "t", - NULL -}; +FILE *vstats_file; typedef struct BenchmarkTimeStamps { int64_t real_usec; @@ -129,34 +95,24 @@ typedef struct BenchmarkTimeStamps { static BenchmarkTimeStamps get_benchmark_time_stamps(void); static int64_t getmaxrss(void); -static int ifilter_has_all_input_formats(FilterGraph *fg); -static int64_t nb_frames_dup = 0; -static uint64_t dup_warning = 1000; -static int64_t nb_frames_drop = 0; -static int64_t decode_error_stat[2]; -unsigned nb_output_dumped = 0; - -int want_sdp = 1; +atomic_uint nb_output_dumped = 0; static BenchmarkTimeStamps current_time; AVIOContext *progress_avio = NULL; -static uint8_t *subtitle_out; - -InputStream **input_streams = NULL; -int nb_input_streams = 0; InputFile **input_files = NULL; int nb_input_files = 0; -OutputStream **output_streams = NULL; -int nb_output_streams = 0; OutputFile **output_files = NULL; int nb_output_files = 0; FilterGraph **filtergraphs; int nb_filtergraphs; +Decoder **decoders; +int nb_decoders; + #if HAVE_TERMIOS_H /* init terminal so that we can grab keys */ @@ -164,167 +120,6 @@ static struct termios oldtty; static int restore_tty; #endif -#if HAVE_THREADS -static void free_input_threads(void); -#endif - -/* sub2video hack: - Convert subtitles to video with alpha to insert them in filter graphs. - This is a temporary solution until libavfilter gets real subtitles support. - */ - -static int sub2video_get_blank_frame(InputStream *ist) -{ - int ret; - AVFrame *frame = ist->sub2video.frame; - - av_frame_unref(frame); - ist->sub2video.frame->width = ist->dec_ctx->width ? ist->dec_ctx->width : ist->sub2video.w; - ist->sub2video.frame->height = ist->dec_ctx->height ? ist->dec_ctx->height : ist->sub2video.h; - ist->sub2video.frame->format = AV_PIX_FMT_RGB32; - if ((ret = av_frame_get_buffer(frame, 0)) < 0) - return ret; - memset(frame->data[0], 0, frame->height * frame->linesize[0]); - return 0; -} - -static void sub2video_copy_rect(uint8_t *dst, int dst_linesize, int w, int h, - AVSubtitleRect *r) -{ - uint32_t *pal, *dst2; - uint8_t *src, *src2; - int x, y; - - if (r->type != SUBTITLE_BITMAP) { - av_log(NULL, AV_LOG_WARNING, "sub2video: non-bitmap subtitle\n"); - return; - } - if (r->x < 0 || r->x + r->w > w || r->y < 0 || r->y + r->h > h) { - av_log(NULL, AV_LOG_WARNING, "sub2video: rectangle (%d %d %d %d) overflowing %d %d\n", - r->x, r->y, r->w, r->h, w, h - ); - return; - } - - dst += r->y * dst_linesize + r->x * 4; - src = r->data[0]; - pal = (uint32_t *)r->data[1]; - for (y = 0; y < r->h; y++) { - dst2 = (uint32_t *)dst; - src2 = src; - for (x = 0; x < r->w; x++) - *(dst2++) = pal[*(src2++)]; - dst += dst_linesize; - src += r->linesize[0]; - } -} - -static void sub2video_push_ref(InputStream *ist, int64_t pts) -{ - AVFrame *frame = ist->sub2video.frame; - int i; - int ret; - - av_assert1(frame->data[0]); - ist->sub2video.last_pts = frame->pts = pts; - for (i = 0; i < ist->nb_filters; i++) { - ret = av_buffersrc_add_frame_flags(ist->filters[i]->filter, frame, - AV_BUFFERSRC_FLAG_KEEP_REF | - AV_BUFFERSRC_FLAG_PUSH); - if (ret != AVERROR_EOF && ret < 0) - av_log(NULL, AV_LOG_WARNING, "Error while add the frame to buffer source(%s).\n", - av_err2str(ret)); - } -} - -void sub2video_update(InputStream *ist, int64_t heartbeat_pts, AVSubtitle *sub) -{ - AVFrame *frame = ist->sub2video.frame; - int8_t *dst; - int dst_linesize; - int num_rects, i; - int64_t pts, end_pts; - - if (!frame) - return; - if (sub) { - pts = av_rescale_q(sub->pts + sub->start_display_time * 1000LL, - AV_TIME_BASE_Q, ist->st->time_base); - end_pts = av_rescale_q(sub->pts + sub->end_display_time * 1000LL, - AV_TIME_BASE_Q, ist->st->time_base); - num_rects = sub->num_rects; - } else { - /* If we are initializing the system, utilize current heartbeat - PTS as the start time, and show until the following subpicture - is received. Otherwise, utilize the previous subpicture's end time - as the fall-back value. */ - pts = ist->sub2video.initialize ? - heartbeat_pts : ist->sub2video.end_pts; - end_pts = INT64_MAX; - num_rects = 0; - } - if (sub2video_get_blank_frame(ist) < 0) { - av_log(ist->dec_ctx, AV_LOG_ERROR, - "Impossible to get a blank canvas.\n"); - return; - } - dst = frame->data [0]; - dst_linesize = frame->linesize[0]; - for (i = 0; i < num_rects; i++) - sub2video_copy_rect(dst, dst_linesize, frame->width, frame->height, sub->rects[i]); - sub2video_push_ref(ist, pts); - ist->sub2video.end_pts = end_pts; - ist->sub2video.initialize = 0; -} - -static void sub2video_heartbeat(InputStream *ist, int64_t pts) -{ - InputFile *infile = input_files[ist->file_index]; - int i, j, nb_reqs; - int64_t pts2; - - /* When a frame is read from a file, examine all sub2video streams in - the same file and send the sub2video frame again. Otherwise, decoded - video frames could be accumulating in the filter graph while a filter - (possibly overlay) is desperately waiting for a subtitle frame. */ - for (i = 0; i < infile->nb_streams; i++) { - InputStream *ist2 = input_streams[infile->ist_index + i]; - if (!ist2->sub2video.frame) - continue; - /* subtitles seem to be usually muxed ahead of other streams; - if not, subtracting a larger time here is necessary */ - pts2 = av_rescale_q(pts, ist->st->time_base, ist2->st->time_base) - 1; - /* do not send the heartbeat frame if the subtitle is already ahead */ - if (pts2 <= ist2->sub2video.last_pts) - continue; - if (pts2 >= ist2->sub2video.end_pts || ist2->sub2video.initialize) - /* if we have hit the end of the current displayed subpicture, - or if we need to initialize the system, update the - overlayed subpicture and its start/end times */ - sub2video_update(ist2, pts2 + 1, NULL); - for (j = 0, nb_reqs = 0; j < ist2->nb_filters; j++) - nb_reqs += av_buffersrc_get_nb_failed_requests(ist2->filters[j]->filter); - if (nb_reqs) - sub2video_push_ref(ist2, pts2); - } -} - -static void sub2video_flush(InputStream *ist) -{ - int i; - int ret; - - if (ist->sub2video.end_pts < INT64_MAX) - sub2video_update(ist, INT64_MAX, NULL); - for (i = 0; i < ist->nb_filters; i++) { - ret = av_buffersrc_add_frame(ist->filters[i]->filter, NULL); - if (ret != AVERROR_EOF && ret < 0) - av_log(NULL, AV_LOG_WARNING, "Flush the frame error.\n"); - } -} - -/* end of sub2video hack */ - static void term_exit_sigsafe(void) { #if HAVE_TERMIOS_H @@ -341,9 +136,8 @@ void term_exit(void) static volatile int received_sigterm = 0; static volatile int received_nb_signals = 0; -static atomic_int transcode_init_done = ATOMIC_VAR_INIT(0); +static atomic_int transcode_init_done = 0; static volatile int ffmpeg_exited = 0; -int main_return_code = 0; static int64_t copy_ts_first_pts = AV_NOPTS_VALUE; static void @@ -474,7 +268,7 @@ static int read_key(void) return n; } #elif HAVE_KBHIT -# if HAVE_PEEKNAMEDPIPE +# if HAVE_PEEKNAMEDPIPE && HAVE_GETSTDHANDLE static int is_pipe; static HANDLE input_handle; DWORD dw, nchars; @@ -491,8 +285,9 @@ static int read_key(void) } //Read it if(nchars != 0) { - read(0, &ch, 1); - return ch; + if (read(0, &ch, 1) == 1) + return ch; + return 0; }else{ return -1; } @@ -513,119 +308,24 @@ const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL }; static void ffmpeg_cleanup(int ret) { - int i, j; - if (do_benchmark) { - int maxrss = getmaxrss() / 1024; - av_log(NULL, AV_LOG_INFO, "bench: maxrss=%ikB\n", maxrss); + int64_t maxrss = getmaxrss() / 1024; + av_log(NULL, AV_LOG_INFO, "bench: maxrss=%"PRId64"KiB\n", maxrss); } - for (i = 0; i < nb_filtergraphs; i++) { - FilterGraph *fg = filtergraphs[i]; - avfilter_graph_free(&fg->graph); - for (j = 0; j < fg->nb_inputs; j++) { - InputFilter *ifilter = fg->inputs[j]; - struct InputStream *ist = ifilter->ist; - - if (ifilter->frame_queue) { - AVFrame *frame; - while (av_fifo_read(ifilter->frame_queue, &frame, 1) >= 0) - av_frame_free(&frame); - av_fifo_freep2(&ifilter->frame_queue); - } - av_freep(&ifilter->displaymatrix); - if (ist->sub2video.sub_queue) { - AVSubtitle sub; - while (av_fifo_read(ist->sub2video.sub_queue, &sub, 1) >= 0) - avsubtitle_free(&sub); - av_fifo_freep2(&ist->sub2video.sub_queue); - } - av_buffer_unref(&ifilter->hw_frames_ctx); - av_freep(&ifilter->name); - av_freep(&fg->inputs[j]); - } - av_freep(&fg->inputs); - for (j = 0; j < fg->nb_outputs; j++) { - OutputFilter *ofilter = fg->outputs[j]; - - avfilter_inout_free(&ofilter->out_tmp); - av_freep(&ofilter->name); - av_channel_layout_uninit(&ofilter->ch_layout); - av_freep(&fg->outputs[j]); - } - av_freep(&fg->outputs); - av_freep(&fg->graph_desc); - - av_freep(&filtergraphs[i]); - } + for (int i = 0; i < nb_filtergraphs; i++) + fg_free(&filtergraphs[i]); av_freep(&filtergraphs); - av_freep(&subtitle_out); - - /* close files */ - for (i = 0; i < nb_output_files; i++) - of_close(&output_files[i]); - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - - if (!ost) - continue; - - av_bsf_free(&ost->bsf_ctx); - - av_frame_free(&ost->filtered_frame); - av_frame_free(&ost->last_frame); - av_packet_free(&ost->pkt); - av_dict_free(&ost->encoder_opts); - - av_freep(&ost->forced_keyframes); - av_expr_free(ost->forced_keyframes_pexpr); - av_freep(&ost->avfilter); - av_freep(&ost->logfile_prefix); - - av_freep(&ost->audio_channels_map); - ost->audio_channels_mapped = 0; + for (int i = 0; i < nb_output_files; i++) + of_free(&output_files[i]); - av_dict_free(&ost->sws_dict); - av_dict_free(&ost->swr_opts); + for (int i = 0; i < nb_input_files; i++) + ifile_close(&input_files[i]); - avcodec_free_context(&ost->enc_ctx); - avcodec_parameters_free(&ost->ref_par); - - if (ost->muxing_queue) { - AVPacket *pkt; - while (av_fifo_read(ost->muxing_queue, &pkt, 1) >= 0) - av_packet_free(&pkt); - av_fifo_freep2(&ost->muxing_queue); - } - - av_freep(&output_streams[i]); - } -#if HAVE_THREADS - free_input_threads(); -#endif - for (i = 0; i < nb_input_files; i++) { - avformat_close_input(&input_files[i]->ctx); - av_packet_free(&input_files[i]->pkt); - av_freep(&input_files[i]); - } - for (i = 0; i < nb_input_streams; i++) { - InputStream *ist = input_streams[i]; - - av_frame_free(&ist->decoded_frame); - av_packet_free(&ist->pkt); - av_dict_free(&ist->decoder_opts); - avsubtitle_free(&ist->prev_sub.subtitle); - av_frame_free(&ist->sub2video.frame); - av_freep(&ist->filters); - av_freep(&ist->hwaccel_device); - av_freep(&ist->dts_buffer); - - avcodec_free_context(&ist->dec_ctx); - - av_freep(&input_streams[i]); - } + for (int i = 0; i < nb_decoders; i++) + dec_free(&decoders[i]); + av_freep(&decoders); if (vstats_file) { if (fclose(vstats_file)) @@ -634,11 +334,13 @@ static void ffmpeg_cleanup(int ret) av_err2str(AVERROR(errno))); } av_freep(&vstats_filename); + of_enc_stats_close(); + + hw_device_free_all(); + av_freep(&filter_nbthreads); - av_freep(&input_streams); av_freep(&input_files); - av_freep(&output_streams); av_freep(&output_files); uninit_opts(); @@ -655,997 +357,281 @@ static void ffmpeg_cleanup(int ret) ffmpeg_exited = 1; } -void remove_avoptions(AVDictionary **a, AVDictionary *b) +OutputStream *ost_iter(OutputStream *prev) { - const AVDictionaryEntry *t = NULL; + int of_idx = prev ? prev->file->index : 0; + int ost_idx = prev ? prev->index + 1 : 0; - while ((t = av_dict_get(b, "", t, AV_DICT_IGNORE_SUFFIX))) { - av_dict_set(a, t->key, NULL, AV_DICT_MATCH_CASE); - } -} + for (; of_idx < nb_output_files; of_idx++) { + OutputFile *of = output_files[of_idx]; + if (ost_idx < of->nb_streams) + return of->streams[ost_idx]; -void assert_avoptions(AVDictionary *m) -{ - const AVDictionaryEntry *t; - if ((t = av_dict_get(m, "", NULL, AV_DICT_IGNORE_SUFFIX))) { - av_log(NULL, AV_LOG_FATAL, "Option %s not found.\n", t->key); - exit_program(1); + ost_idx = 0; } -} -static void abort_codec_experimental(const AVCodec *c, int encoder) -{ - exit_program(1); + return NULL; } -static void update_benchmark(const char *fmt, ...) +InputStream *ist_iter(InputStream *prev) { - if (do_benchmark_all) { - BenchmarkTimeStamps t = get_benchmark_time_stamps(); - va_list va; - char buf[1024]; - - if (fmt) { - va_start(va, fmt); - vsnprintf(buf, sizeof(buf), fmt, va); - va_end(va); - av_log(NULL, AV_LOG_INFO, - "bench: %8" PRIu64 " user %8" PRIu64 " sys %8" PRIu64 " real %s \n", - t.user_usec - current_time.user_usec, - t.sys_usec - current_time.sys_usec, - t.real_usec - current_time.real_usec, buf); - } - current_time = t; - } -} + int if_idx = prev ? prev->file->index : 0; + int ist_idx = prev ? prev->index + 1 : 0; -static void close_output_stream(OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base; + for (; if_idx < nb_input_files; if_idx++) { + InputFile *f = input_files[if_idx]; + if (ist_idx < f->nb_streams) + return f->streams[ist_idx]; - ost->finished |= ENCODER_FINISHED; - if (of->shortest) { - int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, time_base, AV_TIME_BASE_Q); - of->recording_time = FFMIN(of->recording_time, end); + ist_idx = 0; } -} - -/* - * Send a single packet to the output, applying any bitstream filters - * associated with the output stream. This may result in any number - * of packets actually being written, depending on what bitstream - * filters are applied. The supplied packet is consumed and will be - * blank (as if newly-allocated) when this function returns. - * - * If eof is set, instead indicate EOF to all bitstream filters and - * therefore flush any delayed packets to the output. A blank packet - * must be supplied in this case. - */ -static void output_packet(OutputFile *of, AVPacket *pkt, - OutputStream *ost, int eof) -{ - int ret = 0; - - /* apply the output bitstream filters */ - if (ost->bsf_ctx) { - ret = av_bsf_send_packet(ost->bsf_ctx, eof ? NULL : pkt); - if (ret < 0) - goto finish; - while ((ret = av_bsf_receive_packet(ost->bsf_ctx, pkt)) >= 0) - of_write_packet(of, pkt, ost, 0); - if (ret == AVERROR(EAGAIN)) - ret = 0; - } else if (!eof) - of_write_packet(of, pkt, ost, 0); -finish: - if (ret < 0 && ret != AVERROR_EOF) { - av_log(NULL, AV_LOG_ERROR, "Error applying bitstream filters to an output " - "packet for stream #%d:%d.\n", ost->file_index, ost->index); - if(exit_on_error) - exit_program(1); - } + return NULL; } -static int check_recording_time(OutputStream *ost) +static void frame_data_free(void *opaque, uint8_t *data) { - OutputFile *of = output_files[ost->file_index]; + FrameData *fd = (FrameData *)data; - if (of->recording_time != INT64_MAX && - av_compare_ts(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, of->recording_time, - AV_TIME_BASE_Q) >= 0) { - close_output_stream(ost); - return 0; - } - return 1; + avcodec_parameters_free(&fd->par_enc); + + av_free(data); } -static double adjust_frame_pts_to_encoder_tb(OutputFile *of, OutputStream *ost, - AVFrame *frame) +static int frame_data_ensure(AVBufferRef **dst, int writable) { - double float_pts = AV_NOPTS_VALUE; // this is identical to frame.pts but with higher precision - AVCodecContext *enc = ost->enc_ctx; - if (!frame || frame->pts == AV_NOPTS_VALUE || - !enc || !ost->filter || !ost->filter->graph->graph) - goto early_exit; + AVBufferRef *src = *dst; - { - AVFilterContext *filter = ost->filter->filter; - - int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; - AVRational filter_tb = av_buffersink_get_time_base(filter); - AVRational tb = enc->time_base; - int extra_bits = av_clip(29 - av_log2(tb.den), 0, 16); - - tb.den <<= extra_bits; - float_pts = - av_rescale_q(frame->pts, filter_tb, tb) - - av_rescale_q(start_time, AV_TIME_BASE_Q, tb); - float_pts /= 1 << extra_bits; - // avoid exact midoints to reduce the chance of rounding differences, this can be removed in case the fps code is changed to work with integers - float_pts += FFSIGN(float_pts) * 1.0 / (1<<17); - - frame->pts = - av_rescale_q(frame->pts, filter_tb, enc->time_base) - - av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base); - } + if (!src || (writable && !av_buffer_is_writable(src))) { + FrameData *fd; -early_exit: + fd = av_mallocz(sizeof(*fd)); + if (!fd) + return AVERROR(ENOMEM); - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "filter -> pts:%s pts_time:%s exact:%f time_base:%d/%d\n", - frame ? av_ts2str(frame->pts) : "NULL", - frame ? av_ts2timestr(frame->pts, &enc->time_base) : "NULL", - float_pts, - enc ? enc->time_base.num : -1, - enc ? enc->time_base.den : -1); - } + *dst = av_buffer_create((uint8_t *)fd, sizeof(*fd), + frame_data_free, NULL, 0); + if (!*dst) { + av_buffer_unref(&src); + av_freep(&fd); + return AVERROR(ENOMEM); + } - return float_pts; -} + if (src) { + const FrameData *fd_src = (const FrameData *)src->data; -static int init_output_stream(OutputStream *ost, AVFrame *frame, - char *error, int error_len); + memcpy(fd, fd_src, sizeof(*fd)); + fd->par_enc = NULL; -static int init_output_stream_wrapper(OutputStream *ost, AVFrame *frame, - unsigned int fatal) -{ - int ret = AVERROR_BUG; - char error[1024] = {0}; + if (fd_src->par_enc) { + int ret = 0; - if (ost->initialized) - return 0; + fd->par_enc = avcodec_parameters_alloc(); + ret = fd->par_enc ? + avcodec_parameters_copy(fd->par_enc, fd_src->par_enc) : + AVERROR(ENOMEM); + if (ret < 0) { + av_buffer_unref(dst); + av_buffer_unref(&src); + return ret; + } + } - ret = init_output_stream(ost, frame, error, sizeof(error)); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error initializing output stream %d:%d -- %s\n", - ost->file_index, ost->index, error); + av_buffer_unref(&src); + } else { + fd->dec.frame_num = UINT64_MAX; + fd->dec.pts = AV_NOPTS_VALUE; - if (fatal) - exit_program(1); + for (unsigned i = 0; i < FF_ARRAY_ELEMS(fd->wallclock); i++) + fd->wallclock[i] = INT64_MIN; + } } - return ret; + return 0; } -static double psnr(double d) +FrameData *frame_data(AVFrame *frame) { - return -10.0 * log10(d); + int ret = frame_data_ensure(&frame->opaque_ref, 1); + return ret < 0 ? NULL : (FrameData*)frame->opaque_ref->data; } -static void update_video_stats(OutputStream *ost, const AVPacket *pkt, int write_vstats) +const FrameData *frame_data_c(AVFrame *frame) { - const uint8_t *sd = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, - NULL); - AVCodecContext *enc = ost->enc_ctx; - int64_t frame_number; - double ti1, bitrate, avg_bitrate; - - ost->quality = sd ? AV_RL32(sd) : -1; - ost->pict_type = sd ? sd[4] : AV_PICTURE_TYPE_NONE; - - for (int i = 0; ierror); i++) { - if (sd && i < sd[5]) - ost->error[i] = AV_RL64(sd + 8 + 8*i); - else - ost->error[i] = -1; - } - - if (!write_vstats) - return; - - /* this is executed just the first time update_video_stats is called */ - if (!vstats_file) { - vstats_file = fopen(vstats_filename, "w"); - if (!vstats_file) { - perror("fopen"); - exit_program(1); - } - } - - frame_number = ost->packets_encoded; - if (vstats_version <= 1) { - fprintf(vstats_file, "frame= %5"PRId64" q= %2.1f ", frame_number, - ost->quality / (float)FF_QP2LAMBDA); - } else { - fprintf(vstats_file, "out= %2d st= %2d frame= %5"PRId64" q= %2.1f ", ost->file_index, ost->index, frame_number, - ost->quality / (float)FF_QP2LAMBDA); - } - - if (ost->error[0]>=0 && (enc->flags & AV_CODEC_FLAG_PSNR)) - fprintf(vstats_file, "PSNR= %6.2f ", psnr(ost->error[0] / (enc->width * enc->height * 255.0 * 255.0))); - - fprintf(vstats_file,"f_size= %6d ", pkt->size); - /* compute pts value */ - ti1 = pkt->dts * av_q2d(ost->mux_timebase); - if (ti1 < 0.01) - ti1 = 0.01; + int ret = frame_data_ensure(&frame->opaque_ref, 0); + return ret < 0 ? NULL : (const FrameData*)frame->opaque_ref->data; +} - bitrate = (pkt->size * 8) / av_q2d(enc->time_base) / 1000.0; - avg_bitrate = (double)(ost->data_size * 8) / ti1 / 1000.0; - fprintf(vstats_file, "s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s ", - (double)ost->data_size / 1024, ti1, bitrate, avg_bitrate); - fprintf(vstats_file, "type= %c\n", av_get_picture_type_char(ost->pict_type)); +FrameData *packet_data(AVPacket *pkt) +{ + int ret = frame_data_ensure(&pkt->opaque_ref, 1); + return ret < 0 ? NULL : (FrameData*)pkt->opaque_ref->data; } -static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame) +const FrameData *packet_data_c(AVPacket *pkt) { - AVCodecContext *enc = ost->enc_ctx; - AVPacket *pkt = ost->pkt; - const char *type_desc = av_get_media_type_string(enc->codec_type); - const char *action = frame ? "encode" : "flush"; - int ret; + int ret = frame_data_ensure(&pkt->opaque_ref, 0); + return ret < 0 ? NULL : (const FrameData*)pkt->opaque_ref->data; +} - if (frame) { - ost->frames_encoded++; +int check_avoptions_used(const AVDictionary *opts, const AVDictionary *opts_used, + void *logctx, int decode) +{ + const AVClass *class = avcodec_get_class(); + const AVClass *fclass = avformat_get_class(); - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "encoder <- type:%s " - "frame_pts:%s frame_pts_time:%s time_base:%d/%d\n", - type_desc, - av_ts2str(frame->pts), av_ts2timestr(frame->pts, &enc->time_base), - enc->time_base.num, enc->time_base.den); - } - } + const int flag = decode ? AV_OPT_FLAG_DECODING_PARAM : + AV_OPT_FLAG_ENCODING_PARAM; + const AVDictionaryEntry *e = NULL; - update_benchmark(NULL); + while ((e = av_dict_iterate(opts, e))) { + const AVOption *option, *foption; + char *optname, *p; - ret = avcodec_send_frame(enc, frame); - if (ret < 0 && !(ret == AVERROR_EOF && !frame)) { - av_log(NULL, AV_LOG_ERROR, "Error submitting %s frame to the encoder\n", - type_desc); - return ret; - } + if (av_dict_get(opts_used, e->key, NULL, 0)) + continue; - while (1) { - ret = avcodec_receive_packet(enc, pkt); - update_benchmark("%s_%s %d.%d", action, type_desc, - ost->file_index, ost->index); + optname = av_strdup(e->key); + if (!optname) + return AVERROR(ENOMEM); - /* if two pass, output log on success and EOF */ - if ((ret >= 0 || ret == AVERROR_EOF) && ost->logfile && enc->stats_out) - fprintf(ost->logfile, "%s", enc->stats_out); + p = strchr(optname, ':'); + if (p) + *p = 0; - if (ret == AVERROR(EAGAIN)) { - av_assert0(frame); // should never happen during flushing - return 0; - } else if (ret == AVERROR_EOF) { - output_packet(of, pkt, ost, 1); - return ret; - } else if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "%s encoding failed\n", type_desc); - return ret; - } + option = av_opt_find(&class, optname, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ); + foption = av_opt_find(&fclass, optname, NULL, 0, + AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ); + av_freep(&optname); + if (!option || foption) + continue; - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "encoder -> type:%s " - "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s " - "duration:%s duration_time:%s\n", - type_desc, - av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &enc->time_base), - av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &enc->time_base), - av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &enc->time_base)); + if (!(option->flags & flag)) { + av_log(logctx, AV_LOG_ERROR, "Codec AVOption %s (%s) is not a %s " + "option.\n", e->key, option->help ? option->help : "", + decode ? "decoding" : "encoding"); + return AVERROR(EINVAL); } - av_packet_rescale_ts(pkt, enc->time_base, ost->mux_timebase); - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "encoder -> type:%s " - "pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s " - "duration:%s duration_time:%s\n", - type_desc, - av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &enc->time_base), - av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &enc->time_base), - av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &enc->time_base)); - } + av_log(logctx, AV_LOG_WARNING, "Codec AVOption %s (%s) has not been used " + "for any stream. The most likely reason is either wrong type " + "(e.g. a video option with no video streams) or that it is a " + "private option of some decoder which was not actually used " + "for any stream.\n", e->key, option->help ? option->help : ""); + } - if (enc->codec_type == AVMEDIA_TYPE_VIDEO) - update_video_stats(ost, pkt, !!vstats_filename); + return 0; +} - ost->packets_encoded++; +void update_benchmark(const char *fmt, ...) +{ + if (do_benchmark_all) { + BenchmarkTimeStamps t = get_benchmark_time_stamps(); + va_list va; + char buf[1024]; - output_packet(of, pkt, ost, 0); + if (fmt) { + va_start(va, fmt); + vsnprintf(buf, sizeof(buf), fmt, va); + va_end(va); + av_log(NULL, AV_LOG_INFO, + "bench: %8" PRIu64 " user %8" PRIu64 " sys %8" PRIu64 " real %s \n", + t.user_usec - current_time.user_usec, + t.sys_usec - current_time.sys_usec, + t.real_usec - current_time.real_usec, buf); + } + current_time = t; } - - av_assert0(0); } -static void do_audio_out(OutputFile *of, OutputStream *ost, - AVFrame *frame) +static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time, int64_t pts) { + AVBPrint buf, buf_script; + int64_t total_size = of_filesize(output_files[0]); + int vid; + double bitrate; + double speed; + static int64_t last_time = -1; + static int first_report = 1; + uint64_t nb_frames_dup = 0, nb_frames_drop = 0; + int mins, secs, us; + int64_t hours; + const char *hours_sign; int ret; + float t; - adjust_frame_pts_to_encoder_tb(of, ost, frame); - - if (!check_recording_time(ost)) + if (!print_stats && !is_last_report && !progress_avio) return; - if (frame->pts == AV_NOPTS_VALUE || audio_sync_method < 0) - frame->pts = ost->sync_opts; - ost->sync_opts = frame->pts + frame->nb_samples; - ost->samples_encoded += frame->nb_samples; - - ret = encode_frame(of, ost, frame); - if (ret < 0) - exit_program(1); -} - -static void do_subtitle_out(OutputFile *of, - OutputStream *ost, - AVSubtitle *sub) -{ - int subtitle_out_max_size = 1024 * 1024; - int subtitle_out_size, nb, i; - AVCodecContext *enc; - AVPacket *pkt = ost->pkt; - int64_t pts; - - if (sub->pts == AV_NOPTS_VALUE) { - av_log(NULL, AV_LOG_ERROR, "Subtitle packets must have a pts\n"); - if (exit_on_error) - exit_program(1); - return; + if (!is_last_report) { + if (last_time == -1) { + last_time = cur_time; + } + if (((cur_time - last_time) < stats_period && !first_report) || + (first_report && atomic_load(&nb_output_dumped) < nb_output_files)) + return; + last_time = cur_time; } - enc = ost->enc_ctx; + t = (cur_time-timer_start) / 1000000.0; + + vid = 0; + av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); + av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); + for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) { + const float q = ost->enc ? atomic_load(&ost->quality) / (float) FF_QP2LAMBDA : -1; - if (!subtitle_out) { - subtitle_out = av_malloc(subtitle_out_max_size); - if (!subtitle_out) { - av_log(NULL, AV_LOG_FATAL, "Failed to allocate subtitle_out\n"); - exit_program(1); + if (vid && ost->type == AVMEDIA_TYPE_VIDEO) { + av_bprintf(&buf, "q=%2.1f ", q); + av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", + ost->file->index, ost->index, q); } - } + if (!vid && ost->type == AVMEDIA_TYPE_VIDEO) { + float fps; + uint64_t frame_number = atomic_load(&ost->packets_written); - /* Note: DVB subtitle need one packet to draw them and one other - packet to clear them */ - /* XXX: signal it in the codec context ? */ - if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) - nb = 2; - else - nb = 1; - - /* shift timestamp to honor -ss and make check_recording_time() work with -t */ - pts = sub->pts; - if (output_files[ost->file_index]->start_time != AV_NOPTS_VALUE) - pts -= output_files[ost->file_index]->start_time; - for (i = 0; i < nb; i++) { - unsigned save_num_rects = sub->num_rects; - - ost->sync_opts = av_rescale_q(pts, AV_TIME_BASE_Q, enc->time_base); - if (!check_recording_time(ost)) - return; + fps = t > 1 ? frame_number / t : 0; + av_bprintf(&buf, "frame=%5"PRId64" fps=%3.*f q=%3.1f ", + frame_number, fps < 9.95, fps, q); + av_bprintf(&buf_script, "frame=%"PRId64"\n", frame_number); + av_bprintf(&buf_script, "fps=%.2f\n", fps); + av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", + ost->file->index, ost->index, q); + if (is_last_report) + av_bprintf(&buf, "L"); - sub->pts = pts; - // start_display_time is required to be 0 - sub->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, AV_TIME_BASE_Q); - sub->end_display_time -= sub->start_display_time; - sub->start_display_time = 0; - if (i == 1) - sub->num_rects = 0; - - ost->frames_encoded++; - - subtitle_out_size = avcodec_encode_subtitle(enc, subtitle_out, - subtitle_out_max_size, sub); - if (i == 1) - sub->num_rects = save_num_rects; - if (subtitle_out_size < 0) { - av_log(NULL, AV_LOG_FATAL, "Subtitle encoding failed\n"); - exit_program(1); - } + if (ost->filter) { + nb_frames_dup = atomic_load(&ost->filter->nb_frames_dup); + nb_frames_drop = atomic_load(&ost->filter->nb_frames_drop); + } - av_packet_unref(pkt); - pkt->data = subtitle_out; - pkt->size = subtitle_out_size; - pkt->pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->mux_timebase); - pkt->duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); - if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) { - /* XXX: the pts correction is handled here. Maybe handling - it in the codec would be better */ - if (i == 0) - pkt->pts += av_rescale_q(sub->start_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); - else - pkt->pts += av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase); + vid = 1; } - pkt->dts = pkt->pts; - output_packet(of, pkt, ost, 0); } -} -/* May modify/reset next_picture */ -static void do_video_out(OutputFile *of, - OutputStream *ost, - AVFrame *next_picture) -{ - int ret; - AVCodecContext *enc = ost->enc_ctx; - AVRational frame_rate; - int64_t nb_frames, nb0_frames, i; - double delta, delta0; - double duration = 0; - double sync_ipts = AV_NOPTS_VALUE; - InputStream *ist = NULL; - AVFilterContext *filter = ost->filter->filter; - - init_output_stream_wrapper(ost, next_picture, 1); - sync_ipts = adjust_frame_pts_to_encoder_tb(of, ost, next_picture); - - if (ost->source_index >= 0) - ist = input_streams[ost->source_index]; - - frame_rate = av_buffersink_get_frame_rate(filter); - if (frame_rate.num > 0 && frame_rate.den > 0) - duration = 1/(av_q2d(frame_rate) * av_q2d(enc->time_base)); - - if(ist && ist->st->start_time != AV_NOPTS_VALUE && ist->first_dts != AV_NOPTS_VALUE && ost->frame_rate.num) - duration = FFMIN(duration, 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base))); - - if (!ost->filters_script && - !ost->filters && - (nb_filtergraphs == 0 || !filtergraphs[0]->graph_desc) && - next_picture && - ist && - lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)) > 0) { - duration = lrintf(next_picture->pkt_duration * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)); + if (copy_ts) { + if (copy_ts_first_pts == AV_NOPTS_VALUE && pts > 1) + copy_ts_first_pts = pts; + if (copy_ts_first_pts != AV_NOPTS_VALUE) + pts -= copy_ts_first_pts; } - if (!next_picture) { - //end, flushing - nb0_frames = nb_frames = mid_pred(ost->last_nb0_frames[0], - ost->last_nb0_frames[1], - ost->last_nb0_frames[2]); - } else { - delta0 = sync_ipts - ost->sync_opts; // delta0 is the "drift" between the input frame (next_picture) and where it would fall in the output. - delta = delta0 + duration; - - /* by default, we output a single frame */ - nb0_frames = 0; // tracks the number of times the PREVIOUS frame should be duplicated, mostly for variable framerate (VFR) - nb_frames = 1; - - if (delta0 < 0 && - delta > 0 && - ost->vsync_method != VSYNC_PASSTHROUGH && - ost->vsync_method != VSYNC_DROP) { - if (delta0 < -0.6) { - av_log(NULL, AV_LOG_VERBOSE, "Past duration %f too large\n", -delta0); - } else - av_log(NULL, AV_LOG_DEBUG, "Clipping frame in rate conversion by %f\n", -delta0); - sync_ipts = ost->sync_opts; - duration += delta0; - delta0 = 0; - } - - switch (ost->vsync_method) { - case VSYNC_VSCFR: - if (ost->frame_number == 0 && delta0 >= 0.5) { - av_log(NULL, AV_LOG_DEBUG, "Not duplicating %d initial frames\n", (int)lrintf(delta0)); - delta = duration; - delta0 = 0; - ost->sync_opts = llrint(sync_ipts); - } - case VSYNC_CFR: - // FIXME set to 0.5 after we fix some dts/pts bugs like in avidec.c - if (frame_drop_threshold && delta < frame_drop_threshold && ost->frame_number) { - nb_frames = 0; - } else if (delta < -1.1) - nb_frames = 0; - else if (delta > 1.1) { - nb_frames = llrintf(delta); - if (delta0 > 1.1) - nb0_frames = llrintf(delta0 - 0.6); - } - break; - case VSYNC_VFR: - if (delta <= -0.6) - nb_frames = 0; - else if (delta > 0.6) - ost->sync_opts = llrint(sync_ipts); - break; - case VSYNC_DROP: - case VSYNC_PASSTHROUGH: - ost->sync_opts = llrint(sync_ipts); - break; - default: - av_assert0(0); - } - } - - /* - * For video, number of frames in == number of packets out. - * But there may be reordering, so we can't throw away frames on encoder - * flush, we need to limit them here, before they go into encoder. - */ - nb_frames = FFMIN(nb_frames, ost->max_frames - ost->frame_number); - nb0_frames = FFMIN(nb0_frames, nb_frames); - - memmove(ost->last_nb0_frames + 1, - ost->last_nb0_frames, - sizeof(ost->last_nb0_frames[0]) * (FF_ARRAY_ELEMS(ost->last_nb0_frames) - 1)); - ost->last_nb0_frames[0] = nb0_frames; - - if (nb0_frames == 0 && ost->last_dropped) { - nb_frames_drop++; - av_log(NULL, AV_LOG_VERBOSE, - "*** dropping frame %"PRId64" from stream %d at ts %"PRId64"\n", - ost->frame_number, ost->st->index, ost->last_frame->pts); - } - if (nb_frames > (nb0_frames && ost->last_dropped) + (nb_frames > nb0_frames)) { - if (nb_frames > dts_error_threshold * 30) { - av_log(NULL, AV_LOG_ERROR, "%"PRId64" frame duplication too large, skipping\n", nb_frames - 1); - nb_frames_drop++; - return; - } - nb_frames_dup += nb_frames - (nb0_frames && ost->last_dropped) - (nb_frames > nb0_frames); - av_log(NULL, AV_LOG_VERBOSE, "*** %"PRId64" dup!\n", nb_frames - 1); - if (nb_frames_dup > dup_warning) { - av_log(NULL, AV_LOG_WARNING, "More than %"PRIu64" frames duplicated\n", dup_warning); - dup_warning *= 10; - } - } - ost->last_dropped = nb_frames == nb0_frames && next_picture; - ost->dropped_keyframe = ost->last_dropped && next_picture && next_picture->key_frame; - - /* duplicates frame if needed */ - for (i = 0; i < nb_frames; i++) { - AVFrame *in_picture; - int forced_keyframe = 0; - double pts_time; - - if (i < nb0_frames && ost->last_frame->buf[0]) { - in_picture = ost->last_frame; - } else - in_picture = next_picture; - - if (!in_picture) - return; - - in_picture->pts = ost->sync_opts; - - if (!check_recording_time(ost)) - return; - - in_picture->quality = enc->global_quality; - in_picture->pict_type = 0; - - if (ost->forced_kf_ref_pts == AV_NOPTS_VALUE && - in_picture->pts != AV_NOPTS_VALUE) - ost->forced_kf_ref_pts = in_picture->pts; - - pts_time = in_picture->pts != AV_NOPTS_VALUE ? - (in_picture->pts - ost->forced_kf_ref_pts) * av_q2d(enc->time_base) : NAN; - if (ost->forced_kf_index < ost->forced_kf_count && - in_picture->pts >= ost->forced_kf_pts[ost->forced_kf_index]) { - ost->forced_kf_index++; - forced_keyframe = 1; - } else if (ost->forced_keyframes_pexpr) { - double res; - ost->forced_keyframes_expr_const_values[FKF_T] = pts_time; - res = av_expr_eval(ost->forced_keyframes_pexpr, - ost->forced_keyframes_expr_const_values, NULL); - ff_dlog(NULL, "force_key_frame: n:%f n_forced:%f prev_forced_n:%f t:%f prev_forced_t:%f -> res:%f\n", - ost->forced_keyframes_expr_const_values[FKF_N], - ost->forced_keyframes_expr_const_values[FKF_N_FORCED], - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N], - ost->forced_keyframes_expr_const_values[FKF_T], - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T], - res); - if (res) { - forced_keyframe = 1; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = - ost->forced_keyframes_expr_const_values[FKF_N]; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = - ost->forced_keyframes_expr_const_values[FKF_T]; - ost->forced_keyframes_expr_const_values[FKF_N_FORCED] += 1; - } - - ost->forced_keyframes_expr_const_values[FKF_N] += 1; - } else if ( ost->forced_keyframes - && !strncmp(ost->forced_keyframes, "source", 6) - && in_picture->key_frame==1 - && !i) { - forced_keyframe = 1; - } else if ( ost->forced_keyframes - && !strncmp(ost->forced_keyframes, "source_no_drop", 14) - && !i) { - forced_keyframe = (in_picture->key_frame == 1) || ost->dropped_keyframe; - ost->dropped_keyframe = 0; - } - - if (forced_keyframe) { - in_picture->pict_type = AV_PICTURE_TYPE_I; - av_log(NULL, AV_LOG_DEBUG, "Forced keyframe at time %f\n", pts_time); - } - - ret = encode_frame(of, ost, in_picture); - if (ret < 0) - exit_program(1); - - ost->sync_opts++; - ost->frame_number++; - } - - av_frame_unref(ost->last_frame); - if (next_picture) - av_frame_move_ref(ost->last_frame, next_picture); -} - -static void finish_output_stream(OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - AVRational time_base = ost->stream_copy ? ost->mux_timebase : ost->enc_ctx->time_base; - - ost->finished = ENCODER_FINISHED | MUXER_FINISHED; - - if (of->shortest) { - int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, time_base, AV_TIME_BASE_Q); - of->recording_time = FFMIN(of->recording_time, end); - } -} - -/** - * Get and encode new output from any of the filtergraphs, without causing - * activity. - * - * @return 0 for success, <0 for severe errors - */ -static int reap_filters(int flush) -{ - AVFrame *filtered_frame = NULL; - int i; - - /* Reap all buffers present in the buffer sinks */ - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - OutputFile *of = output_files[ost->file_index]; - AVFilterContext *filter; - AVCodecContext *enc = ost->enc_ctx; - int ret = 0; - - if (!ost->filter || !ost->filter->graph->graph) - continue; - filter = ost->filter->filter; - - /* - * Unlike video, with audio the audio frame size matters. - * Currently we are fully reliant on the lavfi filter chain to - * do the buffering deed for us, and thus the frame size parameter - * needs to be set accordingly. Where does one get the required - * frame size? From the initialized AVCodecContext of an audio - * encoder. Thus, if we have gotten to an audio stream, initialize - * the encoder earlier than receiving the first AVFrame. - */ - if (av_buffersink_get_type(filter) == AVMEDIA_TYPE_AUDIO) - init_output_stream_wrapper(ost, NULL, 1); - - filtered_frame = ost->filtered_frame; - - while (1) { - ret = av_buffersink_get_frame_flags(filter, filtered_frame, - AV_BUFFERSINK_FLAG_NO_REQUEST); - if (ret < 0) { - if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) { - av_log(NULL, AV_LOG_WARNING, - "Error in av_buffersink_get_frame_flags(): %s\n", av_err2str(ret)); - } else if (flush && ret == AVERROR_EOF) { - if (av_buffersink_get_type(filter) == AVMEDIA_TYPE_VIDEO) - do_video_out(of, ost, NULL); - } - break; - } - if (ost->finished) { - av_frame_unref(filtered_frame); - continue; - } - - switch (av_buffersink_get_type(filter)) { - case AVMEDIA_TYPE_VIDEO: - if (!ost->frame_aspect_ratio.num) - enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio; - - do_video_out(of, ost, filtered_frame); - break; - case AVMEDIA_TYPE_AUDIO: - if (!(enc->codec->capabilities & AV_CODEC_CAP_PARAM_CHANGE) && - enc->ch_layout.nb_channels != filtered_frame->ch_layout.nb_channels) { - av_log(NULL, AV_LOG_ERROR, - "Audio filter graph output is not normalized and encoder does not support parameter changes\n"); - break; - } - do_audio_out(of, ost, filtered_frame); - break; - default: - // TODO support subtitle filters - av_assert0(0); - } - - av_frame_unref(filtered_frame); - } - } - - return 0; -} - -static void print_final_stats(int64_t total_size) -{ - uint64_t video_size = 0, audio_size = 0, extra_size = 0, other_size = 0; - uint64_t subtitle_size = 0; - uint64_t data_size = 0; - float percent = -1.0; - int i, j; - int pass1_used = 1; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - switch (ost->enc_ctx->codec_type) { - case AVMEDIA_TYPE_VIDEO: video_size += ost->data_size; break; - case AVMEDIA_TYPE_AUDIO: audio_size += ost->data_size; break; - case AVMEDIA_TYPE_SUBTITLE: subtitle_size += ost->data_size; break; - default: other_size += ost->data_size; break; - } - extra_size += ost->enc_ctx->extradata_size; - data_size += ost->data_size; - if ( (ost->enc_ctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) - != AV_CODEC_FLAG_PASS1) - pass1_used = 0; - } - - if (data_size && total_size>0 && total_size >= data_size) - percent = 100.0 * (total_size - data_size) / data_size; - - av_log(NULL, AV_LOG_INFO, "video:%1.0fkB audio:%1.0fkB subtitle:%1.0fkB other streams:%1.0fkB global headers:%1.0fkB muxing overhead: ", - video_size / 1024.0, - audio_size / 1024.0, - subtitle_size / 1024.0, - other_size / 1024.0, - extra_size / 1024.0); - if (percent >= 0.0) - av_log(NULL, AV_LOG_INFO, "%f%%", percent); - else - av_log(NULL, AV_LOG_INFO, "unknown"); - av_log(NULL, AV_LOG_INFO, "\n"); - - /* print verbose per-stream stats */ - for (i = 0; i < nb_input_files; i++) { - InputFile *f = input_files[i]; - uint64_t total_packets = 0, total_size = 0; - - av_log(NULL, AV_LOG_VERBOSE, "Input file #%d (%s):\n", - i, f->ctx->url); - - for (j = 0; j < f->nb_streams; j++) { - InputStream *ist = input_streams[f->ist_index + j]; - enum AVMediaType type = ist->dec_ctx->codec_type; - - total_size += ist->data_size; - total_packets += ist->nb_packets; - - av_log(NULL, AV_LOG_VERBOSE, " Input stream #%d:%d (%s): ", - i, j, av_get_media_type_string(type)); - av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" packets read (%"PRIu64" bytes); ", - ist->nb_packets, ist->data_size); - - if (ist->decoding_needed) { - av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames decoded", - ist->frames_decoded); - if (type == AVMEDIA_TYPE_AUDIO) - av_log(NULL, AV_LOG_VERBOSE, " (%"PRIu64" samples)", ist->samples_decoded); - av_log(NULL, AV_LOG_VERBOSE, "; "); - } - - av_log(NULL, AV_LOG_VERBOSE, "\n"); - } - - av_log(NULL, AV_LOG_VERBOSE, " Total: %"PRIu64" packets (%"PRIu64" bytes) demuxed\n", - total_packets, total_size); - } - - for (i = 0; i < nb_output_files; i++) { - OutputFile *of = output_files[i]; - uint64_t total_packets = 0, total_size = 0; - - av_log(NULL, AV_LOG_VERBOSE, "Output file #%d (%s):\n", - i, of->ctx->url); - - for (j = 0; j < of->ctx->nb_streams; j++) { - OutputStream *ost = output_streams[of->ost_index + j]; - enum AVMediaType type = ost->enc_ctx->codec_type; - - total_size += ost->data_size; - total_packets += ost->packets_written; - - av_log(NULL, AV_LOG_VERBOSE, " Output stream #%d:%d (%s): ", - i, j, av_get_media_type_string(type)); - if (ost->encoding_needed) { - av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames encoded", - ost->frames_encoded); - if (type == AVMEDIA_TYPE_AUDIO) - av_log(NULL, AV_LOG_VERBOSE, " (%"PRIu64" samples)", ost->samples_encoded); - av_log(NULL, AV_LOG_VERBOSE, "; "); - } - - av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" packets muxed (%"PRIu64" bytes); ", - ost->packets_written, ost->data_size); - - av_log(NULL, AV_LOG_VERBOSE, "\n"); - } - - av_log(NULL, AV_LOG_VERBOSE, " Total: %"PRIu64" packets (%"PRIu64" bytes) muxed\n", - total_packets, total_size); - } - if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){ - av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded "); - if (pass1_used) { - av_log(NULL, AV_LOG_WARNING, "\n"); - } else { - av_log(NULL, AV_LOG_WARNING, "(check -ss / -t / -frames parameters if used)\n"); - } - } -} - -static void print_report(int is_last_report, int64_t timer_start, int64_t cur_time) -{ - AVBPrint buf, buf_script; - OutputStream *ost; - AVFormatContext *oc; - int64_t total_size; - AVCodecContext *enc; - int vid, i; - double bitrate; - double speed; - int64_t pts = INT64_MIN + 1; - static int64_t last_time = -1; - static int first_report = 1; - static int qp_histogram[52]; - int hours, mins, secs, us; - const char *hours_sign; - int ret; - float t; - - if (!print_stats && !is_last_report && !progress_avio) - return; - - if (!is_last_report) { - if (last_time == -1) { - last_time = cur_time; - } - if (((cur_time - last_time) < stats_period && !first_report) || - (first_report && nb_output_dumped < nb_output_files)) - return; - last_time = cur_time; - } - - t = (cur_time-timer_start) / 1000000.0; - - - oc = output_files[0]->ctx; - - total_size = avio_size(oc->pb); - if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too - total_size = avio_tell(oc->pb); - - vid = 0; - av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC); - av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC); - for (i = 0; i < nb_output_streams; i++) { - float q = -1; - ost = output_streams[i]; - enc = ost->enc_ctx; - if (!ost->stream_copy) - q = ost->quality / (float) FF_QP2LAMBDA; - - if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { - av_bprintf(&buf, "q=%2.1f ", q); - av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", - ost->file_index, ost->index, q); - } - if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) { - float fps; - int64_t frame_number = ost->frame_number; - - fps = t > 1 ? frame_number / t : 0; - av_bprintf(&buf, "frame=%5"PRId64" fps=%3.*f q=%3.1f ", - frame_number, fps < 9.95, fps, q); - av_bprintf(&buf_script, "frame=%"PRId64"\n", frame_number); - av_bprintf(&buf_script, "fps=%.2f\n", fps); - av_bprintf(&buf_script, "stream_%d_%d_q=%.1f\n", - ost->file_index, ost->index, q); - if (is_last_report) - av_bprintf(&buf, "L"); - if (qp_hist) { - int j; - int qp = lrintf(q); - if (qp >= 0 && qp < FF_ARRAY_ELEMS(qp_histogram)) - qp_histogram[qp]++; - for (j = 0; j < 32; j++) - av_bprintf(&buf, "%X", av_log2(qp_histogram[j] + 1)); - } - - if ((enc->flags & AV_CODEC_FLAG_PSNR) && (ost->pict_type != AV_PICTURE_TYPE_NONE || is_last_report)) { - int j; - double error, error_sum = 0; - double scale, scale_sum = 0; - double p; - char type[3] = { 'Y','U','V' }; - av_bprintf(&buf, "PSNR="); - for (j = 0; j < 3; j++) { - if (is_last_report) { - error = enc->error[j]; - scale = enc->width * enc->height * 255.0 * 255.0 * frame_number; - } else { - error = ost->error[j]; - scale = enc->width * enc->height * 255.0 * 255.0; - } - if (j) - scale /= 4; - error_sum += error; - scale_sum += scale; - p = psnr(error / scale); - av_bprintf(&buf, "%c:%2.2f ", type[j], p); - av_bprintf(&buf_script, "stream_%d_%d_psnr_%c=%2.2f\n", - ost->file_index, ost->index, type[j] | 32, p); - } - p = psnr(error_sum / scale_sum); - av_bprintf(&buf, "*:%2.2f ", psnr(error_sum / scale_sum)); - av_bprintf(&buf_script, "stream_%d_%d_psnr_all=%2.2f\n", - ost->file_index, ost->index, p); - } - vid = 1; - } - /* compute min output value */ - if (av_stream_get_end_pts(ost->st) != AV_NOPTS_VALUE) { - pts = FFMAX(pts, av_rescale_q(av_stream_get_end_pts(ost->st), - ost->st->time_base, AV_TIME_BASE_Q)); - if (copy_ts) { - if (copy_ts_first_pts == AV_NOPTS_VALUE && pts > 1) - copy_ts_first_pts = pts; - if (copy_ts_first_pts != AV_NOPTS_VALUE) - pts -= copy_ts_first_pts; - } - } - - if (is_last_report) - nb_frames_drop += ost->last_dropped; - } - - secs = FFABS(pts) / AV_TIME_BASE; - us = FFABS(pts) % AV_TIME_BASE; - mins = secs / 60; - secs %= 60; - hours = mins / 60; - mins %= 60; + us = FFABS64U(pts) % AV_TIME_BASE; + secs = FFABS64U(pts) / AV_TIME_BASE % 60; + mins = FFABS64U(pts) / AV_TIME_BASE / 60 % 60; + hours = FFABS64U(pts) / AV_TIME_BASE / 3600; hours_sign = (pts < 0) ? "-" : ""; - bitrate = pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1; - speed = t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1; + bitrate = pts != AV_NOPTS_VALUE && pts && total_size >= 0 ? total_size * 8 / (pts / 1000.0) : -1; + speed = pts != AV_NOPTS_VALUE && t != 0.0 ? (double)pts / AV_TIME_BASE / t : -1; if (total_size < 0) av_bprintf(&buf, "size=N/A time="); - else av_bprintf(&buf, "size=%8.0fkB time=", total_size / 1024.0); + else av_bprintf(&buf, "size=%8.0fKiB time=", total_size / 1024.0); if (pts == AV_NOPTS_VALUE) { av_bprintf(&buf, "N/A "); } else { - av_bprintf(&buf, "%s%02d:%02d:%02d.%02d ", + av_bprintf(&buf, "%s%02"PRId64":%02d:%02d.%02d ", hours_sign, hours, mins, secs, (100 * us) / AV_TIME_BASE); } @@ -1663,2679 +649,221 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti av_bprintf(&buf_script, "out_time_us=N/A\n"); av_bprintf(&buf_script, "out_time_ms=N/A\n"); av_bprintf(&buf_script, "out_time=N/A\n"); - } else { - av_bprintf(&buf_script, "out_time_us=%"PRId64"\n", pts); - av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts); - av_bprintf(&buf_script, "out_time=%s%02d:%02d:%02d.%06d\n", - hours_sign, hours, mins, secs, us); - } - - if (nb_frames_dup || nb_frames_drop) - av_bprintf(&buf, " dup=%"PRId64" drop=%"PRId64, nb_frames_dup, nb_frames_drop); - av_bprintf(&buf_script, "dup_frames=%"PRId64"\n", nb_frames_dup); - av_bprintf(&buf_script, "drop_frames=%"PRId64"\n", nb_frames_drop); - - if (speed < 0) { - av_bprintf(&buf, " speed=N/A"); - av_bprintf(&buf_script, "speed=N/A\n"); - } else { - av_bprintf(&buf, " speed=%4.3gx", speed); - av_bprintf(&buf_script, "speed=%4.3gx\n", speed); - } - - if (print_stats || is_last_report) { - const char end = is_last_report ? '\n' : '\r'; - if (print_stats==1 && AV_LOG_INFO > av_log_get_level()) { - fprintf(stderr, "%s %c", buf.str, end); - } else - av_log(NULL, AV_LOG_INFO, "%s %c", buf.str, end); - - fflush(stderr); - } - av_bprint_finalize(&buf, NULL); - - if (progress_avio) { - av_bprintf(&buf_script, "progress=%s\n", - is_last_report ? "end" : "continue"); - avio_write(progress_avio, buf_script.str, - FFMIN(buf_script.len, buf_script.size - 1)); - avio_flush(progress_avio); - av_bprint_finalize(&buf_script, NULL); - if (is_last_report) { - if ((ret = avio_closep(&progress_avio)) < 0) - av_log(NULL, AV_LOG_ERROR, - "Error closing progress log, loss of information possible: %s\n", av_err2str(ret)); - } - } - - first_report = 0; - - if (is_last_report) - print_final_stats(total_size); -} - -static int ifilter_parameters_from_codecpar(InputFilter *ifilter, AVCodecParameters *par) -{ - int ret; - - // We never got any input. Set a fake format, which will - // come from libavformat. - ifilter->format = par->format; - ifilter->sample_rate = par->sample_rate; - ifilter->width = par->width; - ifilter->height = par->height; - ifilter->sample_aspect_ratio = par->sample_aspect_ratio; - ret = av_channel_layout_copy(&ifilter->ch_layout, &par->ch_layout); - if (ret < 0) - return ret; - - return 0; -} - -static void flush_encoders(void) -{ - int i, ret; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - AVCodecContext *enc = ost->enc_ctx; - OutputFile *of = output_files[ost->file_index]; - - if (!ost->encoding_needed) - continue; - - // Try to enable encoding with no input frames. - // Maybe we should just let encoding fail instead. - if (!ost->initialized) { - FilterGraph *fg = ost->filter->graph; - - av_log(NULL, AV_LOG_WARNING, - "Finishing stream %d:%d without any data written to it.\n", - ost->file_index, ost->st->index); - - if (ost->filter && !fg->graph) { - int x; - for (x = 0; x < fg->nb_inputs; x++) { - InputFilter *ifilter = fg->inputs[x]; - if (ifilter->format < 0 && - ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar) < 0) { - av_log(NULL, AV_LOG_ERROR, "Error copying paramerets from input stream\n"); - exit_program(1); - } - } - - if (!ifilter_has_all_input_formats(fg)) - continue; - - ret = configure_filtergraph(fg); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error configuring filter graph\n"); - exit_program(1); - } - - finish_output_stream(ost); - } - - init_output_stream_wrapper(ost, NULL, 1); - } - - if (enc->codec_type != AVMEDIA_TYPE_VIDEO && enc->codec_type != AVMEDIA_TYPE_AUDIO) - continue; - - ret = encode_frame(of, ost, NULL); - if (ret != AVERROR_EOF) - exit_program(1); - } -} - -/* - * Check whether a packet from ist should be written into ost at this time - */ -static int check_output_constraints(InputStream *ist, OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - int ist_index = input_files[ist->file_index]->ist_index + ist->st->index; - - if (ost->source_index != ist_index) - return 0; - - if (ost->finished & MUXER_FINISHED) - return 0; - - if (of->start_time != AV_NOPTS_VALUE && ist->pts < of->start_time) - return 0; - - return 1; -} - -static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *pkt) -{ - OutputFile *of = output_files[ost->file_index]; - InputFile *f = input_files [ist->file_index]; - int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; - int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->mux_timebase); - AVPacket *opkt = ost->pkt; - - av_packet_unref(opkt); - // EOF: flush output bitstream filters. - if (!pkt) { - output_packet(of, opkt, ost, 1); - return; - } - - if (!ost->streamcopy_started && !(pkt->flags & AV_PKT_FLAG_KEY) && - !ost->copy_initial_nonkeyframes) - return; - - if (!ost->streamcopy_started && !ost->copy_prior_start) { - int64_t comp_start = start_time; - if (copy_ts && f->start_time != AV_NOPTS_VALUE) - comp_start = FFMAX(start_time, f->start_time + f->ts_offset); - if (pkt->pts == AV_NOPTS_VALUE ? - ist->pts < comp_start : - pkt->pts < av_rescale_q(comp_start, AV_TIME_BASE_Q, ist->st->time_base)) - return; - } - - if (of->recording_time != INT64_MAX && - ist->pts >= of->recording_time + start_time) { - close_output_stream(ost); - return; - } - - if (f->recording_time != INT64_MAX) { - start_time = 0; - if (copy_ts) { - start_time += f->start_time != AV_NOPTS_VALUE ? f->start_time : 0; - start_time += start_at_zero ? 0 : f->ctx->start_time; - } - if (ist->pts >= f->recording_time + start_time) { - close_output_stream(ost); - return; - } - } - - if (av_packet_ref(opkt, pkt) < 0) - exit_program(1); - - if (pkt->pts != AV_NOPTS_VALUE) - opkt->pts = av_rescale_q(pkt->pts, ist->st->time_base, ost->mux_timebase) - ost_tb_start_time; - - if (pkt->dts == AV_NOPTS_VALUE) { - opkt->dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ost->mux_timebase); - } else if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) { - int duration = av_get_audio_frame_duration(ist->dec_ctx, pkt->size); - if(!duration) - duration = ist->dec_ctx->frame_size; - opkt->dts = av_rescale_delta(ist->st->time_base, pkt->dts, - (AVRational){1, ist->dec_ctx->sample_rate}, duration, - &ist->filter_in_rescale_delta_last, ost->mux_timebase); - /* dts will be set immediately afterwards to what pts is now */ - opkt->pts = opkt->dts - ost_tb_start_time; - } else - opkt->dts = av_rescale_q(pkt->dts, ist->st->time_base, ost->mux_timebase); - opkt->dts -= ost_tb_start_time; - - opkt->duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->mux_timebase); - - ost->sync_opts += opkt->duration; - - output_packet(of, opkt, ost, 0); - - ost->streamcopy_started = 1; -} - -int guess_input_channel_layout(InputStream *ist) -{ - AVCodecContext *dec = ist->dec_ctx; - - if (dec->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) { - char layout_name[256]; - - if (dec->ch_layout.nb_channels > ist->guess_layout_max) - return 0; - av_channel_layout_default(&dec->ch_layout, dec->ch_layout.nb_channels); - if (dec->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC) - return 0; - av_channel_layout_describe(&dec->ch_layout, layout_name, sizeof(layout_name)); - av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream " - "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name); - } - return 1; -} - -static void check_decode_result(InputStream *ist, int *got_output, int ret) -{ - if (*got_output || ret<0) - decode_error_stat[ret<0] ++; - - if (ret < 0 && exit_on_error) - exit_program(1); - - if (*got_output && ist) { - if (ist->decoded_frame->decode_error_flags || (ist->decoded_frame->flags & AV_FRAME_FLAG_CORRUPT)) { - av_log(NULL, exit_on_error ? AV_LOG_FATAL : AV_LOG_WARNING, - "%s: corrupt decoded frame in stream %d\n", input_files[ist->file_index]->ctx->url, ist->st->index); - if (exit_on_error) - exit_program(1); - } - } -} - -// Filters can be configured only if the formats of all inputs are known. -static int ifilter_has_all_input_formats(FilterGraph *fg) -{ - int i; - for (i = 0; i < fg->nb_inputs; i++) { - if (fg->inputs[i]->format < 0 && (fg->inputs[i]->type == AVMEDIA_TYPE_AUDIO || - fg->inputs[i]->type == AVMEDIA_TYPE_VIDEO)) - return 0; - } - return 1; -} - -static int ifilter_send_frame(InputFilter *ifilter, AVFrame *frame, int keep_reference) -{ - FilterGraph *fg = ifilter->graph; - AVFrameSideData *sd; - int need_reinit, ret; - int buffersrc_flags = AV_BUFFERSRC_FLAG_PUSH; - - if (keep_reference) - buffersrc_flags |= AV_BUFFERSRC_FLAG_KEEP_REF; - - /* determine if the parameters for this input changed */ - need_reinit = ifilter->format != frame->format; - - switch (ifilter->ist->st->codecpar->codec_type) { - case AVMEDIA_TYPE_AUDIO: - need_reinit |= ifilter->sample_rate != frame->sample_rate || - av_channel_layout_compare(&ifilter->ch_layout, &frame->ch_layout); - break; - case AVMEDIA_TYPE_VIDEO: - need_reinit |= ifilter->width != frame->width || - ifilter->height != frame->height; - break; - } - - if (!ifilter->ist->reinit_filters && fg->graph) - need_reinit = 0; - - if (!!ifilter->hw_frames_ctx != !!frame->hw_frames_ctx || - (ifilter->hw_frames_ctx && ifilter->hw_frames_ctx->data != frame->hw_frames_ctx->data)) - need_reinit = 1; - - if (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) { - if (!ifilter->displaymatrix || memcmp(sd->data, ifilter->displaymatrix, sizeof(int32_t) * 9)) - need_reinit = 1; - } else if (ifilter->displaymatrix) - need_reinit = 1; - - if (need_reinit) { - ret = ifilter_parameters_from_frame(ifilter, frame); - if (ret < 0) - return ret; - } - - /* (re)init the graph if possible, otherwise buffer the frame and return */ - if (need_reinit || !fg->graph) { - if (!ifilter_has_all_input_formats(fg)) { - AVFrame *tmp = av_frame_clone(frame); - if (!tmp) - return AVERROR(ENOMEM); - - ret = av_fifo_write(ifilter->frame_queue, &tmp, 1); - if (ret < 0) - av_frame_free(&tmp); - - return ret; - } - - ret = reap_filters(1); - if (ret < 0 && ret != AVERROR_EOF) { - av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); - return ret; - } - - ret = configure_filtergraph(fg); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error reinitializing filters!\n"); - return ret; - } - } - - ret = av_buffersrc_add_frame_flags(ifilter->filter, frame, buffersrc_flags); - if (ret < 0) { - if (ret != AVERROR_EOF) - av_log(NULL, AV_LOG_ERROR, "Error while filtering: %s\n", av_err2str(ret)); - return ret; - } - - return 0; -} - -static int ifilter_send_eof(InputFilter *ifilter, int64_t pts) -{ - int ret; - - ifilter->eof = 1; - - if (ifilter->filter) { - ret = av_buffersrc_close(ifilter->filter, pts, AV_BUFFERSRC_FLAG_PUSH); - if (ret < 0) - return ret; - } else { - // the filtergraph was never configured - if (ifilter->format < 0) { - ret = ifilter_parameters_from_codecpar(ifilter, ifilter->ist->st->codecpar); - if (ret < 0) - return ret; - } - if (ifilter->format < 0 && (ifilter->type == AVMEDIA_TYPE_AUDIO || ifilter->type == AVMEDIA_TYPE_VIDEO)) { - av_log(NULL, AV_LOG_ERROR, "Cannot determine format of input stream %d:%d after EOF\n", ifilter->ist->file_index, ifilter->ist->st->index); - return AVERROR_INVALIDDATA; - } - } - - return 0; -} - -// This does not quite work like avcodec_decode_audio4/avcodec_decode_video2. -// There is the following difference: if you got a frame, you must call -// it again with pkt=NULL. pkt==NULL is treated differently from pkt->size==0 -// (pkt==NULL means get more output, pkt->size==0 is a flush/drain packet) -static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt) -{ - int ret; - - *got_frame = 0; - - if (pkt) { - ret = avcodec_send_packet(avctx, pkt); - // In particular, we don't expect AVERROR(EAGAIN), because we read all - // decoded frames with avcodec_receive_frame() until done. - if (ret < 0 && ret != AVERROR_EOF) - return ret; - } - - ret = avcodec_receive_frame(avctx, frame); - if (ret < 0 && ret != AVERROR(EAGAIN)) - return ret; - if (ret >= 0) - *got_frame = 1; - - return 0; -} - -static int send_frame_to_filters(InputStream *ist, AVFrame *decoded_frame) -{ - int i, ret; - - av_assert1(ist->nb_filters > 0); /* ensure ret is initialized */ - for (i = 0; i < ist->nb_filters; i++) { - ret = ifilter_send_frame(ist->filters[i], decoded_frame, i < ist->nb_filters - 1); - if (ret == AVERROR_EOF) - ret = 0; /* ignore */ - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, - "Failed to inject frame into filter network: %s\n", av_err2str(ret)); - break; - } - } - return ret; -} - -static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output, - int *decode_failed) -{ - AVFrame *decoded_frame = ist->decoded_frame; - AVCodecContext *avctx = ist->dec_ctx; - int ret, err = 0; - AVRational decoded_frame_tb; - - update_benchmark(NULL); - ret = decode(avctx, decoded_frame, got_output, pkt); - update_benchmark("decode_audio %d.%d", ist->file_index, ist->st->index); - if (ret < 0) - *decode_failed = 1; - - if (ret >= 0 && avctx->sample_rate <= 0) { - av_log(avctx, AV_LOG_ERROR, "Sample rate %d invalid\n", avctx->sample_rate); - ret = AVERROR_INVALIDDATA; - } - - if (ret != AVERROR_EOF) - check_decode_result(ist, got_output, ret); - - if (!*got_output || ret < 0) - return ret; - - ist->samples_decoded += decoded_frame->nb_samples; - ist->frames_decoded++; - - /* increment next_dts to use for the case where the input stream does not - have timestamps or there are multiple frames in the packet */ - ist->next_pts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / - avctx->sample_rate; - ist->next_dts += ((int64_t)AV_TIME_BASE * decoded_frame->nb_samples) / - avctx->sample_rate; - - if (decoded_frame->pts != AV_NOPTS_VALUE) { - decoded_frame_tb = ist->st->time_base; - } else if (pkt && pkt->pts != AV_NOPTS_VALUE) { - decoded_frame->pts = pkt->pts; - decoded_frame_tb = ist->st->time_base; - }else { - decoded_frame->pts = ist->dts; - decoded_frame_tb = AV_TIME_BASE_Q; - } - if (pkt && pkt->duration && ist->prev_pkt_pts != AV_NOPTS_VALUE && - pkt->pts != AV_NOPTS_VALUE && pkt->pts - ist->prev_pkt_pts > pkt->duration) - ist->filter_in_rescale_delta_last = AV_NOPTS_VALUE; - if (pkt) - ist->prev_pkt_pts = pkt->pts; - if (decoded_frame->pts != AV_NOPTS_VALUE) - decoded_frame->pts = av_rescale_delta(decoded_frame_tb, decoded_frame->pts, - (AVRational){1, avctx->sample_rate}, decoded_frame->nb_samples, &ist->filter_in_rescale_delta_last, - (AVRational){1, avctx->sample_rate}); - ist->nb_samples = decoded_frame->nb_samples; - err = send_frame_to_filters(ist, decoded_frame); - - av_frame_unref(decoded_frame); - return err < 0 ? err : ret; -} - -static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_t *duration_pts, int eof, - int *decode_failed) -{ - AVFrame *decoded_frame = ist->decoded_frame; - int i, ret = 0, err = 0; - int64_t best_effort_timestamp; - int64_t dts = AV_NOPTS_VALUE; - - // With fate-indeo3-2, we're getting 0-sized packets before EOF for some - // reason. This seems like a semi-critical bug. Don't trigger EOF, and - // skip the packet. - if (!eof && pkt && pkt->size == 0) - return 0; - - if (ist->dts != AV_NOPTS_VALUE) - dts = av_rescale_q(ist->dts, AV_TIME_BASE_Q, ist->st->time_base); - if (pkt) { - pkt->dts = dts; // ffmpeg.c probably shouldn't do this - } - - // The old code used to set dts on the drain packet, which does not work - // with the new API anymore. - if (eof) { - void *new = av_realloc_array(ist->dts_buffer, ist->nb_dts_buffer + 1, sizeof(ist->dts_buffer[0])); - if (!new) - return AVERROR(ENOMEM); - ist->dts_buffer = new; - ist->dts_buffer[ist->nb_dts_buffer++] = dts; - } - - update_benchmark(NULL); - ret = decode(ist->dec_ctx, decoded_frame, got_output, pkt); - update_benchmark("decode_video %d.%d", ist->file_index, ist->st->index); - if (ret < 0) - *decode_failed = 1; - - // The following line may be required in some cases where there is no parser - // or the parser does not has_b_frames correctly - if (ist->st->codecpar->video_delay < ist->dec_ctx->has_b_frames) { - if (ist->dec_ctx->codec_id == AV_CODEC_ID_H264) { - ist->st->codecpar->video_delay = ist->dec_ctx->has_b_frames; - } else - av_log(ist->dec_ctx, AV_LOG_WARNING, - "video_delay is larger in decoder than demuxer %d > %d.\n" - "If you want to help, upload a sample " - "of this file to https://streams.videolan.org/upload/ " - "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)\n", - ist->dec_ctx->has_b_frames, - ist->st->codecpar->video_delay); - } - - if (ret != AVERROR_EOF) - check_decode_result(ist, got_output, ret); - - if (*got_output && ret >= 0) { - if (ist->dec_ctx->width != decoded_frame->width || - ist->dec_ctx->height != decoded_frame->height || - ist->dec_ctx->pix_fmt != decoded_frame->format) { - av_log(NULL, AV_LOG_DEBUG, "Frame parameters mismatch context %d,%d,%d != %d,%d,%d\n", - decoded_frame->width, - decoded_frame->height, - decoded_frame->format, - ist->dec_ctx->width, - ist->dec_ctx->height, - ist->dec_ctx->pix_fmt); - } - } - - if (!*got_output || ret < 0) - return ret; - - if(ist->top_field_first>=0) - decoded_frame->top_field_first = ist->top_field_first; - - ist->frames_decoded++; - - if (ist->hwaccel_retrieve_data && decoded_frame->format == ist->hwaccel_pix_fmt) { - err = ist->hwaccel_retrieve_data(ist->dec_ctx, decoded_frame); - if (err < 0) - goto fail; - } - ist->hwaccel_retrieved_pix_fmt = decoded_frame->format; - - best_effort_timestamp= decoded_frame->best_effort_timestamp; - *duration_pts = decoded_frame->pkt_duration; - - if (ist->framerate.num) - best_effort_timestamp = ist->cfr_next_pts++; - - if (eof && best_effort_timestamp == AV_NOPTS_VALUE && ist->nb_dts_buffer > 0) { - best_effort_timestamp = ist->dts_buffer[0]; - - for (i = 0; i < ist->nb_dts_buffer - 1; i++) - ist->dts_buffer[i] = ist->dts_buffer[i + 1]; - ist->nb_dts_buffer--; - } - - if(best_effort_timestamp != AV_NOPTS_VALUE) { - int64_t ts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q); - - if (ts != AV_NOPTS_VALUE) - ist->next_pts = ist->pts = ts; - } - - if (debug_ts) { - av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video " - "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d time_base:%d/%d\n", - ist->st->index, av_ts2str(decoded_frame->pts), - av_ts2timestr(decoded_frame->pts, &ist->st->time_base), - best_effort_timestamp, - av_ts2timestr(best_effort_timestamp, &ist->st->time_base), - decoded_frame->key_frame, decoded_frame->pict_type, - ist->st->time_base.num, ist->st->time_base.den); - } - - if (ist->st->sample_aspect_ratio.num) - decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; - - err = send_frame_to_filters(ist, decoded_frame); - -fail: - av_frame_unref(decoded_frame); - return err < 0 ? err : ret; -} - -static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output, - int *decode_failed) -{ - AVSubtitle subtitle; - int free_sub = 1; - int i, ret = avcodec_decode_subtitle2(ist->dec_ctx, - &subtitle, got_output, pkt); - - check_decode_result(NULL, got_output, ret); - - if (ret < 0 || !*got_output) { - *decode_failed = 1; - if (!pkt->size) - sub2video_flush(ist); - return ret; - } - - if (ist->fix_sub_duration) { - int end = 1; - if (ist->prev_sub.got_output) { - end = av_rescale(subtitle.pts - ist->prev_sub.subtitle.pts, - 1000, AV_TIME_BASE); - if (end < ist->prev_sub.subtitle.end_display_time) { - av_log(ist->dec_ctx, AV_LOG_DEBUG, - "Subtitle duration reduced from %"PRId32" to %d%s\n", - ist->prev_sub.subtitle.end_display_time, end, - end <= 0 ? ", dropping it" : ""); - ist->prev_sub.subtitle.end_display_time = end; - } - } - FFSWAP(int, *got_output, ist->prev_sub.got_output); - FFSWAP(int, ret, ist->prev_sub.ret); - FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle); - if (end <= 0) - goto out; - } - - if (!*got_output) - return ret; - - if (ist->sub2video.frame) { - sub2video_update(ist, INT64_MIN, &subtitle); - } else if (ist->nb_filters) { - if (!ist->sub2video.sub_queue) - ist->sub2video.sub_queue = av_fifo_alloc2(8, sizeof(AVSubtitle), AV_FIFO_FLAG_AUTO_GROW); - if (!ist->sub2video.sub_queue) - exit_program(1); - - ret = av_fifo_write(ist->sub2video.sub_queue, &subtitle, 1); - if (ret < 0) - exit_program(1); - free_sub = 0; - } - - if (!subtitle.num_rects) - goto out; - - ist->frames_decoded++; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - - if (!check_output_constraints(ist, ost) || !ost->encoding_needed - || ost->enc->type != AVMEDIA_TYPE_SUBTITLE) - continue; - - do_subtitle_out(output_files[ost->file_index], ost, &subtitle); - } - -out: - if (free_sub) - avsubtitle_free(&subtitle); - return ret; -} - -static int send_filter_eof(InputStream *ist) -{ - int i, ret; - /* TODO keep pts also in stream time base to avoid converting back */ - int64_t pts = av_rescale_q_rnd(ist->pts, AV_TIME_BASE_Q, ist->st->time_base, - AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX); - - for (i = 0; i < ist->nb_filters; i++) { - ret = ifilter_send_eof(ist->filters[i], pts); - if (ret < 0) - return ret; - } - return 0; -} - -/* pkt = NULL means EOF (needed to flush decoder buffers) */ -static int process_input_packet(InputStream *ist, const AVPacket *pkt, int no_eof) -{ - int ret = 0, i; - int repeating = 0; - int eof_reached = 0; - - AVPacket *avpkt = ist->pkt; - - if (!ist->saw_first_ts) { - ist->first_dts = - ist->dts = ist->st->avg_frame_rate.num ? - ist->dec_ctx->has_b_frames * AV_TIME_BASE / av_q2d(ist->st->avg_frame_rate) : 0; - ist->pts = 0; - if (pkt && pkt->pts != AV_NOPTS_VALUE && !ist->decoding_needed) { - ist->first_dts = - ist->dts += av_rescale_q(pkt->pts, ist->st->time_base, AV_TIME_BASE_Q); - ist->pts = ist->dts; //unused but better to set it to a value thats not totally wrong - } - ist->saw_first_ts = 1; - } - - if (ist->next_dts == AV_NOPTS_VALUE) - ist->next_dts = ist->dts; - if (ist->next_pts == AV_NOPTS_VALUE) - ist->next_pts = ist->pts; - - if (pkt) { - av_packet_unref(avpkt); - ret = av_packet_ref(avpkt, pkt); - if (ret < 0) - return ret; - } - - if (pkt && pkt->dts != AV_NOPTS_VALUE) { - ist->next_dts = ist->dts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q); - if (ist->dec_ctx->codec_type != AVMEDIA_TYPE_VIDEO || !ist->decoding_needed) - ist->next_pts = ist->pts = ist->dts; - } - - // while we have more to decode or while the decoder did output something on EOF - while (ist->decoding_needed) { - int64_t duration_dts = 0; - int64_t duration_pts = 0; - int got_output = 0; - int decode_failed = 0; - - ist->pts = ist->next_pts; - ist->dts = ist->next_dts; - - switch (ist->dec_ctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - ret = decode_audio (ist, repeating ? NULL : avpkt, &got_output, - &decode_failed); - av_packet_unref(avpkt); - break; - case AVMEDIA_TYPE_VIDEO: - ret = decode_video (ist, repeating ? NULL : avpkt, &got_output, &duration_pts, !pkt, - &decode_failed); - if (!repeating || !pkt || got_output) { - if (pkt && pkt->duration) { - duration_dts = av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); - } else if(ist->dec_ctx->framerate.num != 0 && ist->dec_ctx->framerate.den != 0) { - int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict+1 : ist->dec_ctx->ticks_per_frame; - duration_dts = ((int64_t)AV_TIME_BASE * - ist->dec_ctx->framerate.den * ticks) / - ist->dec_ctx->framerate.num / ist->dec_ctx->ticks_per_frame; - } - - if(ist->dts != AV_NOPTS_VALUE && duration_dts) { - ist->next_dts += duration_dts; - }else - ist->next_dts = AV_NOPTS_VALUE; - } - - if (got_output) { - if (duration_pts > 0) { - ist->next_pts += av_rescale_q(duration_pts, ist->st->time_base, AV_TIME_BASE_Q); - } else { - ist->next_pts += duration_dts; - } - } - av_packet_unref(avpkt); - break; - case AVMEDIA_TYPE_SUBTITLE: - if (repeating) - break; - ret = transcode_subtitles(ist, avpkt, &got_output, &decode_failed); - if (!pkt && ret >= 0) - ret = AVERROR_EOF; - av_packet_unref(avpkt); - break; - default: - return -1; - } - - if (ret == AVERROR_EOF) { - eof_reached = 1; - break; - } - - if (ret < 0) { - if (decode_failed) { - av_log(NULL, AV_LOG_ERROR, "Error while decoding stream #%d:%d: %s\n", - ist->file_index, ist->st->index, av_err2str(ret)); - } else { - av_log(NULL, AV_LOG_FATAL, "Error while processing the decoded " - "data for stream #%d:%d\n", ist->file_index, ist->st->index); - } - if (!decode_failed || exit_on_error) - exit_program(1); - break; - } - - if (got_output) - ist->got_output = 1; - - if (!got_output) - break; - - // During draining, we might get multiple output frames in this loop. - // ffmpeg.c does not drain the filter chain on configuration changes, - // which means if we send multiple frames at once to the filters, and - // one of those frames changes configuration, the buffered frames will - // be lost. This can upset certain FATE tests. - // Decode only 1 frame per call on EOF to appease these FATE tests. - // The ideal solution would be to rewrite decoding to use the new - // decoding API in a better way. - if (!pkt) - break; - - repeating = 1; - } - - /* after flushing, send an EOF on all the filter inputs attached to the stream */ - /* except when looping we need to flush but not to send an EOF */ - if (!pkt && ist->decoding_needed && eof_reached && !no_eof) { - int ret = send_filter_eof(ist); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, "Error marking filters as finished\n"); - exit_program(1); - } - } - - /* handle stream copy */ - if (!ist->decoding_needed && pkt) { - ist->dts = ist->next_dts; - switch (ist->dec_ctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - av_assert1(pkt->duration >= 0); - if (ist->dec_ctx->sample_rate) { - ist->next_dts += ((int64_t)AV_TIME_BASE * ist->dec_ctx->frame_size) / - ist->dec_ctx->sample_rate; - } else { - ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); - } - break; - case AVMEDIA_TYPE_VIDEO: - if (ist->framerate.num) { - // TODO: Remove work-around for c99-to-c89 issue 7 - AVRational time_base_q = AV_TIME_BASE_Q; - int64_t next_dts = av_rescale_q(ist->next_dts, time_base_q, av_inv_q(ist->framerate)); - ist->next_dts = av_rescale_q(next_dts + 1, av_inv_q(ist->framerate), time_base_q); - } else if (pkt->duration) { - ist->next_dts += av_rescale_q(pkt->duration, ist->st->time_base, AV_TIME_BASE_Q); - } else if(ist->dec_ctx->framerate.num != 0) { - int ticks= av_stream_get_parser(ist->st) ? av_stream_get_parser(ist->st)->repeat_pict + 1 : ist->dec_ctx->ticks_per_frame; - ist->next_dts += ((int64_t)AV_TIME_BASE * - ist->dec_ctx->framerate.den * ticks) / - ist->dec_ctx->framerate.num / ist->dec_ctx->ticks_per_frame; - } - break; - } - ist->pts = ist->dts; - ist->next_pts = ist->next_dts; - } else if (!ist->decoding_needed) - eof_reached = 1; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - - if (!check_output_constraints(ist, ost) || ost->encoding_needed) - continue; - - do_streamcopy(ist, ost, pkt); - } - - return !eof_reached; -} - -static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts) -{ - InputStream *ist = s->opaque; - const enum AVPixelFormat *p; - int ret; - - for (p = pix_fmts; *p != AV_PIX_FMT_NONE; p++) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p); - const AVCodecHWConfig *config = NULL; - int i; - - if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) - break; - - if (ist->hwaccel_id == HWACCEL_GENERIC || - ist->hwaccel_id == HWACCEL_AUTO) { - for (i = 0;; i++) { - config = avcodec_get_hw_config(s->codec, i); - if (!config) - break; - if (!(config->methods & - AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX)) - continue; - if (config->pix_fmt == *p) - break; - } - } - if (config && config->device_type == ist->hwaccel_device_type) { - ret = hwaccel_decode_init(s); - if (ret < 0) { - if (ist->hwaccel_id == HWACCEL_GENERIC) { - av_log(NULL, AV_LOG_FATAL, - "%s hwaccel requested for input stream #%d:%d, " - "but cannot be initialized.\n", - av_hwdevice_get_type_name(config->device_type), - ist->file_index, ist->st->index); - return AV_PIX_FMT_NONE; - } - continue; - } - - ist->hwaccel_pix_fmt = *p; - break; - } - } - - return *p; -} - -static int init_input_stream(int ist_index, char *error, int error_len) -{ - int ret; - InputStream *ist = input_streams[ist_index]; - - if (ist->decoding_needed) { - const AVCodec *codec = ist->dec; - if (!codec) { - snprintf(error, error_len, "Decoder (codec %s) not found for input stream #%d:%d", - avcodec_get_name(ist->dec_ctx->codec_id), ist->file_index, ist->st->index); - return AVERROR(EINVAL); - } - - ist->dec_ctx->opaque = ist; - ist->dec_ctx->get_format = get_format; -#if LIBAVCODEC_VERSION_MAJOR < 60 - AV_NOWARN_DEPRECATED({ - ist->dec_ctx->thread_safe_callbacks = 1; - }) -#endif - - if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE && - (ist->decoding_needed & DECODING_FOR_OST)) { - av_dict_set(&ist->decoder_opts, "compute_edt", "1", AV_DICT_DONT_OVERWRITE); - if (ist->decoding_needed & DECODING_FOR_FILTER) - av_log(NULL, AV_LOG_WARNING, "Warning using DVB subtitles for filtering and output at the same time is not fully supported, also see -compute_edt [0|1]\n"); - } - - /* Useful for subtitles retiming by lavf (FIXME), skipping samples in - * audio, and video decoders such as cuvid or mediacodec */ - ist->dec_ctx->pkt_timebase = ist->st->time_base; - - if (!av_dict_get(ist->decoder_opts, "threads", NULL, 0)) - av_dict_set(&ist->decoder_opts, "threads", "auto", 0); - /* Attached pics are sparse, therefore we would not want to delay their decoding till EOF. */ - if (ist->st->disposition & AV_DISPOSITION_ATTACHED_PIC) - av_dict_set(&ist->decoder_opts, "threads", "1", 0); - - ret = hw_device_setup_for_decode(ist); - if (ret < 0) { - snprintf(error, error_len, "Device setup failed for " - "decoder on input stream #%d:%d : %s", - ist->file_index, ist->st->index, av_err2str(ret)); - return ret; - } - - if ((ret = avcodec_open2(ist->dec_ctx, codec, &ist->decoder_opts)) < 0) { - if (ret == AVERROR_EXPERIMENTAL) - abort_codec_experimental(codec, 0); - - snprintf(error, error_len, - "Error while opening decoder for input stream " - "#%d:%d : %s", - ist->file_index, ist->st->index, av_err2str(ret)); - return ret; - } - assert_avoptions(ist->decoder_opts); - } - - ist->next_pts = AV_NOPTS_VALUE; - ist->next_dts = AV_NOPTS_VALUE; - - return 0; -} - -static InputStream *get_input_stream(OutputStream *ost) -{ - if (ost->source_index >= 0) - return input_streams[ost->source_index]; - return NULL; -} - -static int compare_int64(const void *a, const void *b) -{ - return FFDIFFSIGN(*(const int64_t *)a, *(const int64_t *)b); -} - -static int init_output_bsfs(OutputStream *ost) -{ - AVBSFContext *ctx = ost->bsf_ctx; - int ret; - - if (!ctx) - return 0; - - ret = avcodec_parameters_copy(ctx->par_in, ost->st->codecpar); - if (ret < 0) - return ret; - - ctx->time_base_in = ost->st->time_base; - - ret = av_bsf_init(ctx); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n", - ctx->filter->name); - return ret; - } - - ret = avcodec_parameters_copy(ost->st->codecpar, ctx->par_out); - if (ret < 0) - return ret; - ost->st->time_base = ctx->time_base_out; - - return 0; -} - -static int init_output_stream_streamcopy(OutputStream *ost) -{ - OutputFile *of = output_files[ost->file_index]; - InputStream *ist = get_input_stream(ost); - AVCodecParameters *par_dst = ost->st->codecpar; - AVCodecParameters *par_src = ost->ref_par; - AVRational sar; - int i, ret; - uint32_t codec_tag = par_dst->codec_tag; - - av_assert0(ist && !ost->filter); - - ret = avcodec_parameters_to_context(ost->enc_ctx, ist->st->codecpar); - if (ret >= 0) - ret = av_opt_set_dict(ost->enc_ctx, &ost->encoder_opts); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, - "Error setting up codec context options.\n"); - return ret; - } - - ret = avcodec_parameters_from_context(par_src, ost->enc_ctx); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, - "Error getting reference codec parameters.\n"); - return ret; - } - - if (!codec_tag) { - unsigned int codec_tag_tmp; - if (!of->format->codec_tag || - av_codec_get_id (of->format->codec_tag, par_src->codec_tag) == par_src->codec_id || - !av_codec_get_tag2(of->format->codec_tag, par_src->codec_id, &codec_tag_tmp)) - codec_tag = par_src->codec_tag; - } - - ret = avcodec_parameters_copy(par_dst, par_src); - if (ret < 0) - return ret; - - par_dst->codec_tag = codec_tag; - - if (!ost->frame_rate.num) - ost->frame_rate = ist->framerate; - - if (ost->frame_rate.num) - ost->st->avg_frame_rate = ost->frame_rate; - else - ost->st->avg_frame_rate = ist->st->avg_frame_rate; - - ret = avformat_transfer_internal_stream_timing_info(of->format, ost->st, ist->st, copy_tb); - if (ret < 0) - return ret; - - // copy timebase while removing common factors - if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) { - if (ost->frame_rate.num) - ost->st->time_base = av_inv_q(ost->frame_rate); - else - ost->st->time_base = av_add_q(av_stream_get_codec_timebase(ost->st), (AVRational){0, 1}); - } - - // copy estimated duration as a hint to the muxer - if (ost->st->duration <= 0 && ist->st->duration > 0) - ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); - - if (ist->st->nb_side_data) { - for (i = 0; i < ist->st->nb_side_data; i++) { - const AVPacketSideData *sd_src = &ist->st->side_data[i]; - uint8_t *dst_data; - - dst_data = av_stream_new_side_data(ost->st, sd_src->type, sd_src->size); - if (!dst_data) - return AVERROR(ENOMEM); - memcpy(dst_data, sd_src->data, sd_src->size); - } - } - - if (ost->rotate_overridden) { - uint8_t *sd = av_stream_new_side_data(ost->st, AV_PKT_DATA_DISPLAYMATRIX, - sizeof(int32_t) * 9); - if (sd) - av_display_rotation_set((int32_t *)sd, -ost->rotate_override_value); - } - - switch (par_dst->codec_type) { - case AVMEDIA_TYPE_AUDIO: - if (audio_volume != 256) { - av_log(NULL, AV_LOG_FATAL, "-acodec copy and -vol are incompatible (frames are not decoded)\n"); - exit_program(1); - } - if((par_dst->block_align == 1 || par_dst->block_align == 1152 || par_dst->block_align == 576) && par_dst->codec_id == AV_CODEC_ID_MP3) - par_dst->block_align= 0; - if(par_dst->codec_id == AV_CODEC_ID_AC3) - par_dst->block_align= 0; - break; - case AVMEDIA_TYPE_VIDEO: - if (ost->frame_aspect_ratio.num) { // overridden by the -aspect cli option - sar = - av_mul_q(ost->frame_aspect_ratio, - (AVRational){ par_dst->height, par_dst->width }); - av_log(NULL, AV_LOG_WARNING, "Overriding aspect ratio " - "with stream copy may produce invalid files\n"); - } - else if (ist->st->sample_aspect_ratio.num) - sar = ist->st->sample_aspect_ratio; - else - sar = par_src->sample_aspect_ratio; - ost->st->sample_aspect_ratio = par_dst->sample_aspect_ratio = sar; - ost->st->avg_frame_rate = ist->st->avg_frame_rate; - ost->st->r_frame_rate = ist->st->r_frame_rate; - break; - } - - ost->mux_timebase = ist->st->time_base; - - return 0; -} - -static void set_encoder_id(OutputFile *of, OutputStream *ost) -{ - const AVDictionaryEntry *e; - - uint8_t *encoder_string; - int encoder_string_len; - int format_flags = 0; - int codec_flags = ost->enc_ctx->flags; - - if (av_dict_get(ost->st->metadata, "encoder", NULL, 0)) - return; - - e = av_dict_get(of->opts, "fflags", NULL, 0); - if (e) { - const AVOption *o = av_opt_find(of->ctx, "fflags", NULL, 0, 0); - if (!o) - return; - av_opt_eval_flags(of->ctx, o, e->value, &format_flags); - } - e = av_dict_get(ost->encoder_opts, "flags", NULL, 0); - if (e) { - const AVOption *o = av_opt_find(ost->enc_ctx, "flags", NULL, 0, 0); - if (!o) - return; - av_opt_eval_flags(ost->enc_ctx, o, e->value, &codec_flags); - } - - encoder_string_len = sizeof(LIBAVCODEC_IDENT) + strlen(ost->enc->name) + 2; - encoder_string = av_mallocz(encoder_string_len); - if (!encoder_string) - exit_program(1); - - if (!(format_flags & AVFMT_FLAG_BITEXACT) && !(codec_flags & AV_CODEC_FLAG_BITEXACT)) - av_strlcpy(encoder_string, LIBAVCODEC_IDENT " ", encoder_string_len); - else - av_strlcpy(encoder_string, "Lavc ", encoder_string_len); - av_strlcat(encoder_string, ost->enc->name, encoder_string_len); - av_dict_set(&ost->st->metadata, "encoder", encoder_string, - AV_DICT_DONT_STRDUP_VAL | AV_DICT_DONT_OVERWRITE); -} - -static void parse_forced_key_frames(char *kf, OutputStream *ost, - AVCodecContext *avctx) -{ - char *p; - int n = 1, i, size, index = 0; - int64_t t, *pts; - - for (p = kf; *p; p++) - if (*p == ',') - n++; - size = n; - pts = av_malloc_array(size, sizeof(*pts)); - if (!pts) { - av_log(NULL, AV_LOG_FATAL, "Could not allocate forced key frames array.\n"); - exit_program(1); - } - - p = kf; - for (i = 0; i < n; i++) { - char *next = strchr(p, ','); - - if (next) - *next++ = 0; - - if (!memcmp(p, "chapters", 8)) { - - AVFormatContext *avf = output_files[ost->file_index]->ctx; - int j; - - if (avf->nb_chapters > INT_MAX - size || - !(pts = av_realloc_f(pts, size += avf->nb_chapters - 1, - sizeof(*pts)))) { - av_log(NULL, AV_LOG_FATAL, - "Could not allocate forced key frames array.\n"); - exit_program(1); - } - t = p[8] ? parse_time_or_die("force_key_frames", p + 8, 1) : 0; - t = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); - - for (j = 0; j < avf->nb_chapters; j++) { - AVChapter *c = avf->chapters[j]; - av_assert1(index < size); - pts[index++] = av_rescale_q(c->start, c->time_base, - avctx->time_base) + t; - } - - } else { - - t = parse_time_or_die("force_key_frames", p, 1); - av_assert1(index < size); - pts[index++] = av_rescale_q(t, AV_TIME_BASE_Q, avctx->time_base); - - } - - p = next; - } - - av_assert0(index == size); - qsort(pts, size, sizeof(*pts), compare_int64); - ost->forced_kf_count = size; - ost->forced_kf_pts = pts; -} - -static void init_encoder_time_base(OutputStream *ost, AVRational default_time_base) -{ - InputStream *ist = get_input_stream(ost); - AVCodecContext *enc_ctx = ost->enc_ctx; - AVFormatContext *oc; - - if (ost->enc_timebase.num > 0) { - enc_ctx->time_base = ost->enc_timebase; - return; - } - - if (ost->enc_timebase.num < 0) { - if (ist) { - enc_ctx->time_base = ist->st->time_base; - return; - } - - oc = output_files[ost->file_index]->ctx; - av_log(oc, AV_LOG_WARNING, "Input stream data not available, using default time base\n"); - } - - enc_ctx->time_base = default_time_base; -} - -static int init_output_stream_encode(OutputStream *ost, AVFrame *frame) -{ - InputStream *ist = get_input_stream(ost); - AVCodecContext *enc_ctx = ost->enc_ctx; - AVCodecContext *dec_ctx = NULL; - OutputFile *of = output_files[ost->file_index]; - AVFormatContext *oc = of->ctx; - int ret; - - set_encoder_id(output_files[ost->file_index], ost); - - if (ist) { - dec_ctx = ist->dec_ctx; - } - - if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) { - if (!ost->frame_rate.num) - ost->frame_rate = av_buffersink_get_frame_rate(ost->filter->filter); - if (ist && !ost->frame_rate.num && !ost->max_frame_rate.num) { - ost->frame_rate = (AVRational){25, 1}; - av_log(NULL, AV_LOG_WARNING, - "No information " - "about the input framerate is available. Falling " - "back to a default value of 25fps for output stream #%d:%d. Use the -r option " - "if you want a different framerate.\n", - ost->file_index, ost->index); - } - - if (ost->max_frame_rate.num && - (av_q2d(ost->frame_rate) > av_q2d(ost->max_frame_rate) || - !ost->frame_rate.den)) - ost->frame_rate = ost->max_frame_rate; - - if (ost->enc->supported_framerates && !ost->force_fps) { - int idx = av_find_nearest_q_idx(ost->frame_rate, ost->enc->supported_framerates); - ost->frame_rate = ost->enc->supported_framerates[idx]; - } - // reduce frame rate for mpeg4 to be within the spec limits - if (enc_ctx->codec_id == AV_CODEC_ID_MPEG4) { - av_reduce(&ost->frame_rate.num, &ost->frame_rate.den, - ost->frame_rate.num, ost->frame_rate.den, 65535); - } - } - - switch (enc_ctx->codec_type) { - case AVMEDIA_TYPE_AUDIO: - enc_ctx->sample_fmt = av_buffersink_get_format(ost->filter->filter); - enc_ctx->sample_rate = av_buffersink_get_sample_rate(ost->filter->filter); - ret = av_buffersink_get_ch_layout(ost->filter->filter, &enc_ctx->ch_layout); - if (ret < 0) - return ret; - - if (ost->bits_per_raw_sample) - enc_ctx->bits_per_raw_sample = ost->bits_per_raw_sample; - else if (dec_ctx && ost->filter->graph->is_meta) - enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample, - av_get_bytes_per_sample(enc_ctx->sample_fmt) << 3); - - init_encoder_time_base(ost, av_make_q(1, enc_ctx->sample_rate)); - break; - - case AVMEDIA_TYPE_VIDEO: - init_encoder_time_base(ost, av_inv_q(ost->frame_rate)); - - if (!(enc_ctx->time_base.num && enc_ctx->time_base.den)) - enc_ctx->time_base = av_buffersink_get_time_base(ost->filter->filter); - if ( av_q2d(enc_ctx->time_base) < 0.001 && ost->vsync_method != VSYNC_PASSTHROUGH - && (ost->vsync_method == VSYNC_CFR || ost->vsync_method == VSYNC_VSCFR || - (ost->vsync_method == VSYNC_AUTO && !(of->format->flags & AVFMT_VARIABLE_FPS)))){ - av_log(oc, AV_LOG_WARNING, "Frame rate very high for a muxer not efficiently supporting it.\n" - "Please consider specifying a lower framerate, a different muxer or " - "setting vsync/fps_mode to vfr\n"); - } - - enc_ctx->width = av_buffersink_get_w(ost->filter->filter); - enc_ctx->height = av_buffersink_get_h(ost->filter->filter); - enc_ctx->sample_aspect_ratio = ost->st->sample_aspect_ratio = - ost->frame_aspect_ratio.num ? // overridden by the -aspect cli option - av_mul_q(ost->frame_aspect_ratio, (AVRational){ enc_ctx->height, enc_ctx->width }) : - av_buffersink_get_sample_aspect_ratio(ost->filter->filter); - - enc_ctx->pix_fmt = av_buffersink_get_format(ost->filter->filter); - - if (ost->bits_per_raw_sample) - enc_ctx->bits_per_raw_sample = ost->bits_per_raw_sample; - else if (dec_ctx && ost->filter->graph->is_meta) - enc_ctx->bits_per_raw_sample = FFMIN(dec_ctx->bits_per_raw_sample, - av_pix_fmt_desc_get(enc_ctx->pix_fmt)->comp[0].depth); - - if (frame) { - enc_ctx->color_range = frame->color_range; - enc_ctx->color_primaries = frame->color_primaries; - enc_ctx->color_trc = frame->color_trc; - enc_ctx->colorspace = frame->colorspace; - enc_ctx->chroma_sample_location = frame->chroma_location; - } - - enc_ctx->framerate = ost->frame_rate; - - ost->st->avg_frame_rate = ost->frame_rate; - - // Field order: autodetection - if (frame) { - if (enc_ctx->flags & (AV_CODEC_FLAG_INTERLACED_DCT | AV_CODEC_FLAG_INTERLACED_ME) && - ost->top_field_first >= 0) - frame->top_field_first = !!ost->top_field_first; - - if (frame->interlaced_frame) { - if (enc_ctx->codec->id == AV_CODEC_ID_MJPEG) - enc_ctx->field_order = frame->top_field_first ? AV_FIELD_TT:AV_FIELD_BB; - else - enc_ctx->field_order = frame->top_field_first ? AV_FIELD_TB:AV_FIELD_BT; - } else - enc_ctx->field_order = AV_FIELD_PROGRESSIVE; - } - - // Field order: override - if (ost->top_field_first == 0) { - enc_ctx->field_order = AV_FIELD_BB; - } else if (ost->top_field_first == 1) { - enc_ctx->field_order = AV_FIELD_TT; - } - - if (ost->forced_keyframes) { - if (!strncmp(ost->forced_keyframes, "expr:", 5)) { - ret = av_expr_parse(&ost->forced_keyframes_pexpr, ost->forced_keyframes+5, - forced_keyframes_const_names, NULL, NULL, NULL, NULL, 0, NULL); - if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, - "Invalid force_key_frames expression '%s'\n", ost->forced_keyframes+5); - return ret; - } - ost->forced_keyframes_expr_const_values[FKF_N] = 0; - ost->forced_keyframes_expr_const_values[FKF_N_FORCED] = 0; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_N] = NAN; - ost->forced_keyframes_expr_const_values[FKF_PREV_FORCED_T] = NAN; - - // Don't parse the 'forced_keyframes' in case of 'keep-source-keyframes', - // parse it only for static kf timings - } else if(strncmp(ost->forced_keyframes, "source", 6)) { - parse_forced_key_frames(ost->forced_keyframes, ost, ost->enc_ctx); - } - } - break; - case AVMEDIA_TYPE_SUBTITLE: - enc_ctx->time_base = AV_TIME_BASE_Q; - if (!enc_ctx->width) { - enc_ctx->width = input_streams[ost->source_index]->st->codecpar->width; - enc_ctx->height = input_streams[ost->source_index]->st->codecpar->height; - } - break; - case AVMEDIA_TYPE_DATA: - break; - default: - abort(); - break; - } - - ost->mux_timebase = enc_ctx->time_base; - - return 0; -} - -static int init_output_stream(OutputStream *ost, AVFrame *frame, - char *error, int error_len) -{ - int ret = 0; - - if (ost->encoding_needed) { - const AVCodec *codec = ost->enc; - AVCodecContext *dec = NULL; - InputStream *ist; - - ret = init_output_stream_encode(ost, frame); - if (ret < 0) - return ret; - - if ((ist = get_input_stream(ost))) - dec = ist->dec_ctx; - if (dec && dec->subtitle_header) { - /* ASS code assumes this buffer is null terminated so add extra byte. */ - ost->enc_ctx->subtitle_header = av_mallocz(dec->subtitle_header_size + 1); - if (!ost->enc_ctx->subtitle_header) - return AVERROR(ENOMEM); - memcpy(ost->enc_ctx->subtitle_header, dec->subtitle_header, dec->subtitle_header_size); - ost->enc_ctx->subtitle_header_size = dec->subtitle_header_size; - } - if (!av_dict_get(ost->encoder_opts, "threads", NULL, 0)) - av_dict_set(&ost->encoder_opts, "threads", "auto", 0); - - ret = hw_device_setup_for_encode(ost); - if (ret < 0) { - snprintf(error, error_len, "Device setup failed for " - "encoder on output stream #%d:%d : %s", - ost->file_index, ost->index, av_err2str(ret)); - return ret; - } - - if (ist && ist->dec->type == AVMEDIA_TYPE_SUBTITLE && ost->enc->type == AVMEDIA_TYPE_SUBTITLE) { - int input_props = 0, output_props = 0; - AVCodecDescriptor const *input_descriptor = - avcodec_descriptor_get(dec->codec_id); - AVCodecDescriptor const *output_descriptor = - avcodec_descriptor_get(ost->enc_ctx->codec_id); - if (input_descriptor) - input_props = input_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB); - if (output_descriptor) - output_props = output_descriptor->props & (AV_CODEC_PROP_TEXT_SUB | AV_CODEC_PROP_BITMAP_SUB); - if (input_props && output_props && input_props != output_props) { - snprintf(error, error_len, - "Subtitle encoding currently only possible from text to text " - "or bitmap to bitmap"); - return AVERROR_INVALIDDATA; - } - } - - if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) < 0) { - if (ret == AVERROR_EXPERIMENTAL) - abort_codec_experimental(codec, 1); - snprintf(error, error_len, - "Error while opening encoder for output stream #%d:%d - " - "maybe incorrect parameters such as bit_rate, rate, width or height", - ost->file_index, ost->index); - return ret; - } - if (ost->enc->type == AVMEDIA_TYPE_AUDIO && - !(ost->enc->capabilities & AV_CODEC_CAP_VARIABLE_FRAME_SIZE)) - av_buffersink_set_frame_size(ost->filter->filter, - ost->enc_ctx->frame_size); - assert_avoptions(ost->encoder_opts); - if (ost->enc_ctx->bit_rate && ost->enc_ctx->bit_rate < 1000 && - ost->enc_ctx->codec_id != AV_CODEC_ID_CODEC2 /* don't complain about 700 bit/s modes */) - av_log(NULL, AV_LOG_WARNING, "The bitrate parameter is set too low." - " It takes bits/s as argument, not kbits/s\n"); - - ret = avcodec_parameters_from_context(ost->st->codecpar, ost->enc_ctx); - if (ret < 0) { - av_log(NULL, AV_LOG_FATAL, - "Error initializing the output stream codec context.\n"); - exit_program(1); - } - - if (ost->enc_ctx->nb_coded_side_data) { - int i; - - for (i = 0; i < ost->enc_ctx->nb_coded_side_data; i++) { - const AVPacketSideData *sd_src = &ost->enc_ctx->coded_side_data[i]; - uint8_t *dst_data; - - dst_data = av_stream_new_side_data(ost->st, sd_src->type, sd_src->size); - if (!dst_data) - return AVERROR(ENOMEM); - memcpy(dst_data, sd_src->data, sd_src->size); - } - } - - /* - * Add global input side data. For now this is naive, and copies it - * from the input stream's global side data. All side data should - * really be funneled over AVFrame and libavfilter, then added back to - * packet side data, and then potentially using the first packet for - * global side data. - */ - if (ist) { - int i; - for (i = 0; i < ist->st->nb_side_data; i++) { - AVPacketSideData *sd = &ist->st->side_data[i]; - if (sd->type != AV_PKT_DATA_CPB_PROPERTIES) { - uint8_t *dst = av_stream_new_side_data(ost->st, sd->type, sd->size); - if (!dst) - return AVERROR(ENOMEM); - memcpy(dst, sd->data, sd->size); - if (ist->autorotate && sd->type == AV_PKT_DATA_DISPLAYMATRIX) - av_display_rotation_set((uint32_t *)dst, 0); - } - } - } - - // copy timebase while removing common factors - if (ost->st->time_base.num <= 0 || ost->st->time_base.den <= 0) - ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0, 1}); - - // copy estimated duration as a hint to the muxer - if (ost->st->duration <= 0 && ist && ist->st->duration > 0) - ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base); - } else if (ost->stream_copy) { - ret = init_output_stream_streamcopy(ost); - if (ret < 0) - return ret; - } - - /* initialize bitstream filters for the output stream - * needs to be done here, because the codec id for streamcopy is not - * known until now */ - ret = init_output_bsfs(ost); - if (ret < 0) - return ret; - - ost->initialized = 1; - - ret = of_check_init(output_files[ost->file_index]); - if (ret < 0) - return ret; - - return ret; -} - -static void report_new_stream(int input_index, AVPacket *pkt) -{ - InputFile *file = input_files[input_index]; - AVStream *st = file->ctx->streams[pkt->stream_index]; - - if (pkt->stream_index < file->nb_streams_warn) - return; - av_log(file->ctx, AV_LOG_WARNING, - "New %s stream %d:%d at pos:%"PRId64" and DTS:%ss\n", - av_get_media_type_string(st->codecpar->codec_type), - input_index, pkt->stream_index, - pkt->pos, av_ts2timestr(pkt->dts, &st->time_base)); - file->nb_streams_warn = pkt->stream_index + 1; -} - -static int transcode_init(void) -{ - int ret = 0, i, j, k; - AVFormatContext *oc; - OutputStream *ost; - InputStream *ist; - char error[1024] = {0}; - - for (i = 0; i < nb_filtergraphs; i++) { - FilterGraph *fg = filtergraphs[i]; - for (j = 0; j < fg->nb_outputs; j++) { - OutputFilter *ofilter = fg->outputs[j]; - if (!ofilter->ost || ofilter->ost->source_index >= 0) - continue; - if (fg->nb_inputs != 1) - continue; - for (k = nb_input_streams-1; k >= 0 ; k--) - if (fg->inputs[0]->ist == input_streams[k]) - break; - ofilter->ost->source_index = k; - } - } - - /* init framerate emulation */ - for (i = 0; i < nb_input_files; i++) { - InputFile *ifile = input_files[i]; - if (ifile->readrate || ifile->rate_emu) - for (j = 0; j < ifile->nb_streams; j++) - input_streams[j + ifile->ist_index]->start = av_gettime_relative(); - } - - /* init input streams */ - for (i = 0; i < nb_input_streams; i++) - if ((ret = init_input_stream(i, error, sizeof(error))) < 0) { - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - avcodec_close(ost->enc_ctx); - } - goto dump_format; - } - - /* - * initialize stream copy and subtitle/data streams. - * Encoded AVFrame based streams will get initialized as follows: - * - when the first AVFrame is received in do_video_out - * - just before the first AVFrame is received in either transcode_step - * or reap_filters due to us requiring the filter chain buffer sink - * to be configured with the correct audio frame size, which is only - * known after the encoder is initialized. - */ - for (i = 0; i < nb_output_streams; i++) { - if (!output_streams[i]->stream_copy && - (output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO || - output_streams[i]->enc_ctx->codec_type == AVMEDIA_TYPE_AUDIO)) - continue; - - ret = init_output_stream_wrapper(output_streams[i], NULL, 0); - if (ret < 0) - goto dump_format; - } - - /* discard unused programs */ - for (i = 0; i < nb_input_files; i++) { - InputFile *ifile = input_files[i]; - for (j = 0; j < ifile->ctx->nb_programs; j++) { - AVProgram *p = ifile->ctx->programs[j]; - int discard = AVDISCARD_ALL; - - for (k = 0; k < p->nb_stream_indexes; k++) - if (!input_streams[ifile->ist_index + p->stream_index[k]]->discard) { - discard = AVDISCARD_DEFAULT; - break; - } - p->discard = discard; - } - } - - /* write headers for files with no streams */ - for (i = 0; i < nb_output_files; i++) { - oc = output_files[i]->ctx; - if (output_files[i]->format->flags & AVFMT_NOSTREAMS && oc->nb_streams == 0) { - ret = of_check_init(output_files[i]); - if (ret < 0) - goto dump_format; - } - } - - dump_format: - /* dump the stream mapping */ - av_log(NULL, AV_LOG_INFO, "Stream mapping:\n"); - for (i = 0; i < nb_input_streams; i++) { - ist = input_streams[i]; - - for (j = 0; j < ist->nb_filters; j++) { - if (!filtergraph_is_simple(ist->filters[j]->graph)) { - av_log(NULL, AV_LOG_INFO, " Stream #%d:%d (%s) -> %s", - ist->file_index, ist->st->index, ist->dec ? ist->dec->name : "?", - ist->filters[j]->name); - if (nb_filtergraphs > 1) - av_log(NULL, AV_LOG_INFO, " (graph %d)", ist->filters[j]->graph->index); - av_log(NULL, AV_LOG_INFO, "\n"); - } - } - } - - for (i = 0; i < nb_output_streams; i++) { - ost = output_streams[i]; - - if (ost->attachment_filename) { - /* an attached file */ - av_log(NULL, AV_LOG_INFO, " File %s -> Stream #%d:%d\n", - ost->attachment_filename, ost->file_index, ost->index); - continue; - } - - if (ost->filter && !filtergraph_is_simple(ost->filter->graph)) { - /* output from a complex graph */ - av_log(NULL, AV_LOG_INFO, " %s", ost->filter->name); - if (nb_filtergraphs > 1) - av_log(NULL, AV_LOG_INFO, " (graph %d)", ost->filter->graph->index); - - av_log(NULL, AV_LOG_INFO, " -> Stream #%d:%d (%s)\n", ost->file_index, - ost->index, ost->enc ? ost->enc->name : "?"); - continue; - } - - av_log(NULL, AV_LOG_INFO, " Stream #%d:%d -> #%d:%d", - input_streams[ost->source_index]->file_index, - input_streams[ost->source_index]->st->index, - ost->file_index, - ost->index); - if (ost->sync_ist != input_streams[ost->source_index]) - av_log(NULL, AV_LOG_INFO, " [sync #%d:%d]", - ost->sync_ist->file_index, - ost->sync_ist->st->index); - if (ost->stream_copy) - av_log(NULL, AV_LOG_INFO, " (copy)"); - else { - const AVCodec *in_codec = input_streams[ost->source_index]->dec; - const AVCodec *out_codec = ost->enc; - const char *decoder_name = "?"; - const char *in_codec_name = "?"; - const char *encoder_name = "?"; - const char *out_codec_name = "?"; - const AVCodecDescriptor *desc; - - if (in_codec) { - decoder_name = in_codec->name; - desc = avcodec_descriptor_get(in_codec->id); - if (desc) - in_codec_name = desc->name; - if (!strcmp(decoder_name, in_codec_name)) - decoder_name = "native"; - } - - if (out_codec) { - encoder_name = out_codec->name; - desc = avcodec_descriptor_get(out_codec->id); - if (desc) - out_codec_name = desc->name; - if (!strcmp(encoder_name, out_codec_name)) - encoder_name = "native"; - } - - av_log(NULL, AV_LOG_INFO, " (%s (%s) -> %s (%s))", - in_codec_name, decoder_name, - out_codec_name, encoder_name); - } - av_log(NULL, AV_LOG_INFO, "\n"); - } - - if (ret) { - av_log(NULL, AV_LOG_ERROR, "%s\n", error); - return ret; - } - - atomic_store(&transcode_init_done, 1); - - return 0; -} - -/* Return 1 if there remain streams where more output is wanted, 0 otherwise. */ -static int need_output(void) -{ - int i; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - OutputFile *of = output_files[ost->file_index]; - AVFormatContext *os = output_files[ost->file_index]->ctx; - - if (ost->finished || - (os->pb && avio_tell(os->pb) >= of->limit_filesize)) - continue; - if (ost->frame_number >= ost->max_frames) { - int j; - for (j = 0; j < of->ctx->nb_streams; j++) - close_output_stream(output_streams[of->ost_index + j]); - continue; - } - - return 1; - } - - return 0; -} - -/** - * Select the output stream to process. - * - * @return selected output stream, or NULL if none available - */ -static OutputStream *choose_output(void) -{ - int i; - int64_t opts_min = INT64_MAX; - OutputStream *ost_min = NULL; - - for (i = 0; i < nb_output_streams; i++) { - OutputStream *ost = output_streams[i]; - int64_t opts = ost->last_mux_dts == AV_NOPTS_VALUE ? INT64_MIN : - av_rescale_q(ost->last_mux_dts, ost->st->time_base, - AV_TIME_BASE_Q); - if (ost->last_mux_dts == AV_NOPTS_VALUE) - av_log(NULL, AV_LOG_DEBUG, - "cur_dts is invalid st:%d (%d) [init:%d i_done:%d finish:%d] (this is harmless if it occurs once at the start per stream)\n", - ost->st->index, ost->st->id, ost->initialized, ost->inputs_done, ost->finished); - - if (!ost->initialized && !ost->inputs_done) - return ost->unavailable ? NULL : ost; - - if (!ost->finished && opts < opts_min) { - opts_min = opts; - ost_min = ost->unavailable ? NULL : ost; - } - } - return ost_min; -} - -static void set_tty_echo(int on) -{ -#if HAVE_TERMIOS_H - struct termios tty; - if (tcgetattr(0, &tty) == 0) { - if (on) tty.c_lflag |= ECHO; - else tty.c_lflag &= ~ECHO; - tcsetattr(0, TCSANOW, &tty); - } -#endif -} - -static int check_keyboard_interaction(int64_t cur_time) -{ - int i, ret, key; - static int64_t last_time; - if (received_nb_signals) - return AVERROR_EXIT; - /* read_key() returns 0 on EOF */ - if (cur_time - last_time >= 100000) { - key = read_key(); - last_time = cur_time; - }else - key = -1; - if (key == 'q') { - av_log(NULL, AV_LOG_INFO, "\n\n[q] command received. Exiting.\n\n"); - return AVERROR_EXIT; - } - if (key == '+') av_log_set_level(av_log_get_level()+10); - if (key == '-') av_log_set_level(av_log_get_level()-10); - if (key == 's') qp_hist ^= 1; - if (key == 'h'){ - if (do_hex_dump){ - do_hex_dump = do_pkt_dump = 0; - } else if(do_pkt_dump){ - do_hex_dump = 1; - } else - do_pkt_dump = 1; - av_log_set_level(AV_LOG_DEBUG); - } - if (key == 'c' || key == 'C'){ - char buf[4096], target[64], command[256], arg[256] = {0}; - double time; - int k, n = 0; - fprintf(stderr, "\nEnter command: |all