From ae736692ef8317a784ece5d0dcfdc7db109a1e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 10 Apr 2024 22:10:59 +0200 Subject: [PATCH] Remove atomics stuff, a lot more --- Common/Common.vcxproj | 8 - Common/Common.vcxproj.filters | 24 - ext/at3_standalone/atomic.c | 127 -- ext/at3_standalone/atomic.h | 79 - ext/at3_standalone/av_buffer.c | 94 +- ext/at3_standalone/avcodec.h | 946 --------- ext/at3_standalone/avfft.c | 30 - ext/at3_standalone/avpacket.c | 295 --- ext/at3_standalone/avstring.c | 82 - ext/at3_standalone/avutil.h | 31 - ext/at3_standalone/bitstream.c | 1 - ext/at3_standalone/bprint.c | 379 ---- ext/at3_standalone/bprint.h | 219 --- ext/at3_standalone/codec_desc.c | 2933 ---------------------------- ext/at3_standalone/compat.h | 3 + ext/at3_standalone/dict.c | 114 -- ext/at3_standalone/float_dsp.c | 318 --- ext/at3_standalone/frame.c | 295 --- ext/at3_standalone/frame.h | 222 --- ext/at3_standalone/internal.h | 6 - ext/at3_standalone/intmath.h | 21 - ext/at3_standalone/intreadwrite.h | 65 - ext/at3_standalone/libm.h | 22 - ext/at3_standalone/mathops.c | 26 - ext/at3_standalone/mem.h | 30 +- ext/at3_standalone/opt.c | 4 +- ext/at3_standalone/opt.h | 1 - ext/at3_standalone/options.c | 214 +- ext/at3_standalone/options_table.h | 103 - ext/at3_standalone/pixdesc.h | 394 ---- ext/at3_standalone/pixfmt.h | 473 ----- ext/at3_standalone/rdft.c | 136 -- ext/at3_standalone/rdft.h | 74 - ext/at3_standalone/util_internal.h | 13 +- ext/at3_standalone/utils.c | 364 +--- 35 files changed, 29 insertions(+), 8117 deletions(-) delete mode 100644 ext/at3_standalone/atomic.c delete mode 100644 ext/at3_standalone/atomic.h delete mode 100644 ext/at3_standalone/bprint.c delete mode 100644 ext/at3_standalone/bprint.h delete mode 100644 ext/at3_standalone/codec_desc.c delete mode 100644 ext/at3_standalone/mathops.c delete mode 100644 ext/at3_standalone/pixdesc.h delete mode 100644 ext/at3_standalone/pixfmt.h delete mode 100644 ext/at3_standalone/rdft.c delete mode 100644 ext/at3_standalone/rdft.h diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index 181f4cac39..639a26ce82 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -386,7 +386,6 @@ - @@ -396,7 +395,6 @@ - @@ -424,8 +422,6 @@ - - @@ -630,7 +626,6 @@ - @@ -641,16 +636,13 @@ - - - diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index b6f0c42cc5..0717b7b213 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -590,9 +590,6 @@ ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone @@ -620,9 +617,6 @@ ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone @@ -644,15 +638,9 @@ ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone @@ -1137,9 +1125,6 @@ ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone @@ -1167,9 +1152,6 @@ ext\at3_standalone - - ext\at3_standalone - ext\at3_standalone @@ -1191,12 +1173,6 @@ ext\at3_standalone - - ext\at3_standalone - - - ext\at3_standalone - ext\at3_standalone diff --git a/ext/at3_standalone/atomic.c b/ext/at3_standalone/atomic.c deleted file mode 100644 index b13725d14f..0000000000 --- a/ext/at3_standalone/atomic.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 2012 Ronald S. Bultje - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "atomic.h" - -#if !HAVE_ATOMICS_NATIVE - -#if HAVE_PTHREADS - -#include - -static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER; - -int avpriv_atomic_int_get(volatile int *ptr) -{ - int res; - - pthread_mutex_lock(&atomic_lock); - res = *ptr; - pthread_mutex_unlock(&atomic_lock); - - return res; -} - -void avpriv_atomic_int_set(volatile int *ptr, int val) -{ - pthread_mutex_lock(&atomic_lock); - *ptr = val; - pthread_mutex_unlock(&atomic_lock); -} - -int avpriv_atomic_int_add_and_fetch(volatile int *ptr, int inc) -{ - int res; - - pthread_mutex_lock(&atomic_lock); - *ptr += inc; - res = *ptr; - pthread_mutex_unlock(&atomic_lock); - - return res; -} - -void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval) -{ - void *ret; - pthread_mutex_lock(&atomic_lock); - ret = *ptr; - if (ret == oldval) - *ptr = newval; - pthread_mutex_unlock(&atomic_lock); - return ret; -} - -#elif !HAVE_THREADS - -int avpriv_atomic_int_get(volatile int *ptr) -{ - return *ptr; -} - -void avpriv_atomic_int_set(volatile int *ptr, int val) -{ - *ptr = val; -} - -int avpriv_atomic_int_add_and_fetch(volatile int *ptr, int inc) -{ - *ptr += inc; - return *ptr; -} - -void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval) -{ - if (*ptr == oldval) { - *ptr = newval; - return oldval; - } - return *ptr; -} - -#else /* HAVE_THREADS */ - -/* This should never trigger, unless a new threading implementation - * without correct atomics dependencies in configure or a corresponding - * atomics implementation is added. */ -#error "Threading is enabled, but there is no implementation of atomic operations available" - -#endif /* HAVE_PTHREADS */ - -#endif /* !HAVE_ATOMICS_NATIVE */ - -#ifdef TEST -#include "avassert.h" - -int main(void) -{ - volatile int val = 1; - int res; - - res = avpriv_atomic_int_add_and_fetch(&val, 1); - av_assert0(res == 2); - avpriv_atomic_int_set(&val, 3); - res = avpriv_atomic_int_get(&val); - av_assert0(res == 3); - - return 0; -} -#endif diff --git a/ext/at3_standalone/atomic.h b/ext/at3_standalone/atomic.h deleted file mode 100644 index 15906d24c9..0000000000 --- a/ext/at3_standalone/atomic.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2012 Ronald S. Bultje - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVUTIL_ATOMIC_H -#define AVUTIL_ATOMIC_H - -#include "config.h" - -#if HAVE_ATOMICS_NATIVE - -#if HAVE_ATOMICS_GCC -#include "atomic_gcc.h" -#elif HAVE_ATOMICS_WIN32 -#include "atomic_win32.h" -#elif HAVE_ATOMICS_SUNCC -#include "atomic_suncc.h" -#endif - -#else - -/** - * Load the current value stored in an atomic integer. - * - * @param ptr atomic integer - * @return the current value of the atomic integer - * @note This acts as a memory barrier. - */ -int avpriv_atomic_int_get(volatile int *ptr); - -/** - * Store a new value in an atomic integer. - * - * @param ptr atomic integer - * @param val the value to store in the atomic integer - * @note This acts as a memory barrier. - */ -void avpriv_atomic_int_set(volatile int *ptr, int val); - -/** - * Add a value to an atomic integer. - * - * @param ptr atomic integer - * @param inc the value to add to the atomic integer (may be negative) - * @return the new value of the atomic integer. - * @note This does NOT act as a memory barrier. This is primarily - * intended for reference counting. - */ -int avpriv_atomic_int_add_and_fetch(volatile int *ptr, int inc); - -/** - * Atomic pointer compare and swap. - * - * @param ptr pointer to the pointer to operate on - * @param oldval do the swap if the current value of *ptr equals to oldval - * @param newval value to replace *ptr with - * @return the value of *ptr before comparison - */ -void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval); - -#endif /* HAVE_ATOMICS_NATIVE */ - -#endif /* AVUTIL_ATOMIC_H */ diff --git a/ext/at3_standalone/av_buffer.c b/ext/at3_standalone/av_buffer.c index c311db5ba3..f261aa444d 100644 --- a/ext/at3_standalone/av_buffer.c +++ b/ext/at3_standalone/av_buffer.c @@ -98,7 +98,7 @@ AVBufferRef *av_buffer_ref(AVBufferRef *buf) *ret = *buf; - avpriv_atomic_int_add_and_fetch(&buf->buffer->refcount, 1); + buf->buffer->refcount++; return ret; } @@ -115,10 +115,9 @@ static void buffer_replace(AVBufferRef **dst, AVBufferRef **src) } else av_freep(dst); - if (!avpriv_atomic_int_add_and_fetch(&b->refcount, -1)) { - b->free(b->opaque, b->data); - av_freep(&b); - } + b->refcount--; + b->free(b->opaque, b->data); + av_freep(&b); } void av_buffer_unref(AVBufferRef **buf) @@ -134,7 +133,7 @@ int av_buffer_is_writable(const AVBufferRef *buf) if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY) return 0; - return avpriv_atomic_int_get(&buf->buffer->refcount) == 1; + return buf->buffer->refcount == 1; } void *av_buffer_get_opaque(const AVBufferRef *buf) @@ -223,7 +222,7 @@ AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size)) pool->size = size; pool->alloc = alloc ? alloc : av_buffer_alloc; - avpriv_atomic_int_set(&pool->refcount, 1); + pool->refcount = 1; return pool; } @@ -253,61 +252,21 @@ void av_buffer_pool_uninit(AVBufferPool **ppool) pool = *ppool; *ppool = NULL; - if (!avpriv_atomic_int_add_and_fetch(&pool->refcount, -1)) + pool->refcount--; + if (!pool->refcount) buffer_pool_free(pool); } -#if USE_ATOMICS -/* remove the whole buffer list from the pool and return it */ -static BufferPoolEntry *get_pool(AVBufferPool *pool) -{ - BufferPoolEntry *cur = *(void * volatile *)&pool->pool, *last = NULL; - - while (cur != last) { - last = cur; - cur = avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, last, NULL); - if (!cur) - return NULL; - } - - return cur; -} - -static void add_to_pool(BufferPoolEntry *buf) -{ - AVBufferPool *pool; - BufferPoolEntry *cur, *end = buf; - - if (!buf) - return; - pool = buf->pool; - - while (end->next) - end = end->next; - - while (avpriv_atomic_ptr_cas((void * volatile *)&pool->pool, NULL, buf)) { - /* pool is not empty, retrieve it and append it to our list */ - cur = get_pool(pool); - end->next = cur; - while (end->next) - end = end->next; - } -} -#endif - static void pool_release_buffer(void *opaque, uint8_t *data) { BufferPoolEntry *buf = opaque; AVBufferPool *pool = buf->pool; -#if USE_ATOMICS - add_to_pool(buf); -#else buf->next = pool->pool; pool->pool = buf; -#endif - if (!avpriv_atomic_int_add_and_fetch(&pool->refcount, -1)) + pool->refcount--; + if (!pool->refcount) buffer_pool_free(pool); } @@ -336,11 +295,6 @@ static AVBufferRef *pool_alloc_buffer(AVBufferPool *pool) ret->buffer->opaque = buf; ret->buffer->free = pool_release_buffer; -#if USE_ATOMICS - avpriv_atomic_int_add_and_fetch(&pool->refcount, 1); - avpriv_atomic_int_add_and_fetch(&pool->nb_allocated, 1); -#endif - return ret; } @@ -349,29 +303,6 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool) AVBufferRef *ret; BufferPoolEntry *buf; -#if USE_ATOMICS - /* check whether the pool is empty */ - buf = get_pool(pool); - if (!buf && pool->refcount <= pool->nb_allocated) { - av_log(NULL, AV_LOG_DEBUG, "Pool race dectected, spining to avoid overallocation and eventual OOM\n"); - while (!buf && avpriv_atomic_int_get(&pool->refcount) <= avpriv_atomic_int_get(&pool->nb_allocated)) - buf = get_pool(pool); - } - - if (!buf) - return pool_alloc_buffer(pool); - - /* keep the first entry, return the rest of the list to the pool */ - add_to_pool(buf->next); - buf->next = NULL; - - ret = av_buffer_create(buf->data, pool->size, pool_release_buffer, - buf, 0); - if (!ret) { - add_to_pool(buf); - return NULL; - } -#else buf = pool->pool; if (buf) { ret = av_buffer_create(buf->data, pool->size, pool_release_buffer, @@ -383,10 +314,9 @@ AVBufferRef *av_buffer_pool_get(AVBufferPool *pool) } else { ret = pool_alloc_buffer(pool); } -#endif - if (ret) - avpriv_atomic_int_add_and_fetch(&pool->refcount, 1); + if (ret) + pool->refcount++; return ret; } diff --git a/ext/at3_standalone/avcodec.h b/ext/at3_standalone/avcodec.h index 65c8b39d7e..2ce18c3bd5 100644 --- a/ext/at3_standalone/avcodec.h +++ b/ext/at3_standalone/avcodec.h @@ -943,254 +943,6 @@ typedef struct RcOverride{ */ #define AV_CODEC_CAP_LOSSLESS 0x80000000 - -#if FF_API_WITHOUT_PREFIX -/** - * Allow decoders to produce frames with data planes that are not aligned - * to CPU requirements (e.g. due to cropping). - */ -#define CODEC_FLAG_UNALIGNED AV_CODEC_FLAG_UNALIGNED -#define CODEC_FLAG_QSCALE AV_CODEC_FLAG_QSCALE -#define CODEC_FLAG_4MV AV_CODEC_FLAG_4MV -#define CODEC_FLAG_OUTPUT_CORRUPT AV_CODEC_FLAG_OUTPUT_CORRUPT -#define CODEC_FLAG_QPEL AV_CODEC_FLAG_QPEL -#if FF_API_GMC -/** - * @deprecated use the "gmc" private option of the libxvid encoder - */ -#define CODEC_FLAG_GMC 0x0020 ///< Use GMC. -#endif -#if FF_API_MV0 -/** - * @deprecated use the flag "mv0" in the "mpv_flags" private option of the - * mpegvideo encoders - */ -#define CODEC_FLAG_MV0 0x0040 -#endif -#if FF_API_INPUT_PRESERVED -/** - * @deprecated passing reference-counted frames to the encoders replaces this - * flag - */ -#define CODEC_FLAG_INPUT_PRESERVED 0x0100 -#endif -#define CODEC_FLAG_PASS1 AV_CODEC_FLAG_PASS1 -#define CODEC_FLAG_PASS2 AV_CODEC_FLAG_PASS2 -#define CODEC_FLAG_GRAY AV_CODEC_FLAG_GRAY -#if FF_API_EMU_EDGE -/** - * @deprecated edges are not used/required anymore. I.e. this flag is now always - * set. - */ -#define CODEC_FLAG_EMU_EDGE 0x4000 -#endif -#define CODEC_FLAG_PSNR AV_CODEC_FLAG_PSNR -#define CODEC_FLAG_TRUNCATED AV_CODEC_FLAG_TRUNCATED - -#if FF_API_NORMALIZE_AQP -/** - * @deprecated use the flag "naq" in the "mpv_flags" private option of the - * mpegvideo encoders - */ -#define CODEC_FLAG_NORMALIZE_AQP 0x00020000 -#endif -#define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT -#define CODEC_FLAG_LOW_DELAY AV_CODEC_FLAG_LOW_DELAY -#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER -#define CODEC_FLAG_BITEXACT AV_CODEC_FLAG_BITEXACT -#define CODEC_FLAG_AC_PRED AV_CODEC_FLAG_AC_PRED -#define CODEC_FLAG_LOOP_FILTER AV_CODEC_FLAG_LOOP_FILTER -#define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME -#define CODEC_FLAG_CLOSED_GOP AV_CODEC_FLAG_CLOSED_GOP -#define CODEC_FLAG2_FAST AV_CODEC_FLAG2_FAST -#define CODEC_FLAG2_NO_OUTPUT AV_CODEC_FLAG2_NO_OUTPUT -#define CODEC_FLAG2_LOCAL_HEADER AV_CODEC_FLAG2_LOCAL_HEADER -#define CODEC_FLAG2_DROP_FRAME_TIMECODE AV_CODEC_FLAG2_DROP_FRAME_TIMECODE -#define CODEC_FLAG2_IGNORE_CROP AV_CODEC_FLAG2_IGNORE_CROP - -#define CODEC_FLAG2_CHUNKS AV_CODEC_FLAG2_CHUNKS -#define CODEC_FLAG2_SHOW_ALL AV_CODEC_FLAG2_SHOW_ALL -#define CODEC_FLAG2_EXPORT_MVS AV_CODEC_FLAG2_EXPORT_MVS -#define CODEC_FLAG2_SKIP_MANUAL AV_CODEC_FLAG2_SKIP_MANUAL - -/* Unsupported options : - * Syntax Arithmetic coding (SAC) - * Reference Picture Selection - * Independent Segment Decoding */ -/* /Fx */ -/* codec capabilities */ - -#define CODEC_CAP_DRAW_HORIZ_BAND AV_CODEC_CAP_DRAW_HORIZ_BAND ///< Decoder can use draw_horiz_band callback. -/** - * Codec uses get_buffer() for allocating buffers and supports custom allocators. - * If not set, it might not use get_buffer() at all or use operations that - * assume the buffer was allocated by avcodec_default_get_buffer. - */ -#define CODEC_CAP_DR1 AV_CODEC_CAP_DR1 -#define CODEC_CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED -#if FF_API_XVMC -/* Codec can export data for HW decoding. This flag indicates that - * the codec would call get_format() with list that might contain HW accelerated - * pixel formats (XvMC, VDPAU, VAAPI, etc). The application can pick any of them - * including raw image format. - * The application can use the passed context to determine bitstream version, - * chroma format, resolution etc. - */ -#define CODEC_CAP_HWACCEL 0x0010 -#endif /* FF_API_XVMC */ -/** - * Encoder or decoder requires flushing with NULL input at the end in order to - * give the complete and correct output. - * - * NOTE: If this flag is not set, the codec is guaranteed to never be fed with - * with NULL data. The user can still send NULL data to the public encode - * or decode function, but libavcodec will not pass it along to the codec - * unless this flag is set. - * - * Decoders: - * The decoder has a non-zero delay and needs to be fed with avpkt->data=NULL, - * avpkt->size=0 at the end to get the delayed data until the decoder no longer - * returns frames. - * - * Encoders: - * The encoder needs to be fed with NULL data at the end of encoding until the - * encoder no longer returns data. - * - * NOTE: For encoders implementing the AVCodec.encode2() function, setting this - * flag also means that the encoder must set the pts and duration for - * each output packet. If this flag is not set, the pts and duration will - * be determined by libavcodec from the input frame. - */ -#define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY -/** - * Codec can be fed a final frame with a smaller size. - * This can be used to prevent truncation of the last audio samples. - */ -#define CODEC_CAP_SMALL_LAST_FRAME AV_CODEC_CAP_SMALL_LAST_FRAME -#if FF_API_CAP_VDPAU -/** - * Codec can export data for HW decoding (VDPAU). - */ -#define CODEC_CAP_HWACCEL_VDPAU AV_CODEC_CAP_HWACCEL_VDPAU -#endif -/** - * Codec can output multiple frames per AVPacket - * Normally demuxers return one frame at a time, demuxers which do not do - * are connected to a parser to split what they return into proper frames. - * This flag is reserved to the very rare category of codecs which have a - * bitstream that cannot be split into frames without timeconsuming - * operations like full decoding. Demuxers carring such bitstreams thus - * may return multiple frames in a packet. This has many disadvantages like - * prohibiting stream copy in many cases thus it should only be considered - * as a last resort. - */ -#define CODEC_CAP_SUBFRAMES AV_CODEC_CAP_SUBFRAMES -/** - * Codec is experimental and is thus avoided in favor of non experimental - * encoders - */ -#define CODEC_CAP_EXPERIMENTAL AV_CODEC_CAP_EXPERIMENTAL -/** - * Codec should fill in channel configuration and samplerate instead of container - */ -#define CODEC_CAP_CHANNEL_CONF AV_CODEC_CAP_CHANNEL_CONF -#if FF_API_NEG_LINESIZES -/** - * @deprecated no codecs use this capability - */ -#define CODEC_CAP_NEG_LINESIZES 0x0800 -#endif -/** - * Codec supports frame-level multithreading. - */ -#define CODEC_CAP_FRAME_THREADS AV_CODEC_CAP_FRAME_THREADS -/** - * Codec supports slice-based (or partition-based) multithreading. - */ -#define CODEC_CAP_SLICE_THREADS AV_CODEC_CAP_SLICE_THREADS -/** - * Codec supports changed parameters at any point. - */ -#define CODEC_CAP_PARAM_CHANGE AV_CODEC_CAP_PARAM_CHANGE -/** - * Codec supports avctx->thread_count == 0 (auto). - */ -#define CODEC_CAP_AUTO_THREADS AV_CODEC_CAP_AUTO_THREADS -/** - * Audio encoder supports receiving a different number of samples in each call. - */ -#define CODEC_CAP_VARIABLE_FRAME_SIZE AV_CODEC_CAP_VARIABLE_FRAME_SIZE -/** - * Codec is intra only. - */ -#define CODEC_CAP_INTRA_ONLY AV_CODEC_CAP_INTRA_ONLY -/** - * Codec is lossless. - */ -#define CODEC_CAP_LOSSLESS AV_CODEC_CAP_LOSSLESS - -/** - * HWAccel is experimental and is thus avoided in favor of non experimental - * codecs - */ -#define HWACCEL_CODEC_CAP_EXPERIMENTAL 0x0200 -#endif /* FF_API_WITHOUT_PREFIX */ - -#if FF_API_MB_TYPE -//The following defines may change, don't expect compatibility if you use them. -#define MB_TYPE_INTRA4x4 0x0001 -#define MB_TYPE_INTRA16x16 0x0002 //FIXME H.264-specific -#define MB_TYPE_INTRA_PCM 0x0004 //FIXME H.264-specific -#define MB_TYPE_16x16 0x0008 -#define MB_TYPE_16x8 0x0010 -#define MB_TYPE_8x16 0x0020 -#define MB_TYPE_8x8 0x0040 -#define MB_TYPE_INTERLACED 0x0080 -#define MB_TYPE_DIRECT2 0x0100 //FIXME -#define MB_TYPE_ACPRED 0x0200 -#define MB_TYPE_GMC 0x0400 -#define MB_TYPE_SKIP 0x0800 -#define MB_TYPE_P0L0 0x1000 -#define MB_TYPE_P1L0 0x2000 -#define MB_TYPE_P0L1 0x4000 -#define MB_TYPE_P1L1 0x8000 -#define MB_TYPE_L0 (MB_TYPE_P0L0 | MB_TYPE_P1L0) -#define MB_TYPE_L1 (MB_TYPE_P0L1 | MB_TYPE_P1L1) -#define MB_TYPE_L0L1 (MB_TYPE_L0 | MB_TYPE_L1) -#define MB_TYPE_QUANT 0x00010000 -#define MB_TYPE_CBP 0x00020000 -//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...) -#endif - -/** - * Pan Scan area. - * This specifies the area which should be displayed. - * Note there may be multiple such areas for one frame. - */ -typedef struct AVPanScan{ - /** - * id - * - encoding: Set by user. - * - decoding: Set by libavcodec. - */ - int id; - - /** - * width and height in 1/16 pel - * - encoding: Set by user. - * - decoding: Set by libavcodec. - */ - int width; - int height; - - /** - * position of the top left corner in 1/16 pel for up to 3 fields/frames - * - encoding: Set by user. - * - decoding: Set by libavcodec. - */ - int16_t position[3][2]; -}AVPanScan; - /** * This structure describes the bitrate properties of an encoded bitstream. It * roughly corresponds to a subset the VBV parameters for MPEG-2 or HRD @@ -1241,179 +993,6 @@ typedef struct AVCPBProperties { */ #define AV_GET_BUFFER_FLAG_REF (1 << 0) -/** - * @defgroup lavc_packet AVPacket - * - * Types and functions for working with AVPacket. - * @{ - */ -enum AVPacketSideDataType { - AV_PKT_DATA_PALETTE, - AV_PKT_DATA_NEW_EXTRADATA, - - /** - * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: - * @code - * u32le param_flags - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) - * s32le channel_count - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) - * u64le channel_layout - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) - * s32le sample_rate - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) - * s32le width - * s32le height - * @endcode - */ - AV_PKT_DATA_PARAM_CHANGE, - - /** - * An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of - * structures with info about macroblocks relevant to splitting the - * packet into smaller packets on macroblock edges (e.g. as for RFC 2190). - * That is, it does not necessarily contain info about all macroblocks, - * as long as the distance between macroblocks in the info is smaller - * than the target payload size. - * Each MB info structure is 12 bytes, and is laid out as follows: - * @code - * u32le bit offset from the start of the packet - * u8 current quantizer at the start of the macroblock - * u8 GOB number - * u16le macroblock address within the GOB - * u8 horizontal MV predictor - * u8 vertical MV predictor - * u8 horizontal MV predictor for block number 3 - * u8 vertical MV predictor for block number 3 - * @endcode - */ - AV_PKT_DATA_H263_MB_INFO, - - /** - * This side data should be associated with an audio stream and contains - * ReplayGain information in form of the AVReplayGain struct. - */ - AV_PKT_DATA_REPLAYGAIN, - - /** - * This side data contains a 3x3 transformation matrix describing an affine - * transformation that needs to be applied to the decoded video frames for - * correct presentation. - * - * See libavutil/display.h for a detailed description of the data. - */ - AV_PKT_DATA_DISPLAYMATRIX, - - /** - * This side data should be associated with a video stream and contains - * Stereoscopic 3D information in form of the AVStereo3D struct. - */ - AV_PKT_DATA_STEREO3D, - - /** - * This side data should be associated with an audio stream and corresponds - * to enum AVAudioServiceType. - */ - AV_PKT_DATA_AUDIO_SERVICE_TYPE, - - /** - * This side data contains quality related information from the encoder. - * @code - * u32le quality factor of the compressed frame. Allowed range is between 1 (good) and FF_LAMBDA_MAX (bad). - * u8 picture type - * u8 error count - * u16 reserved - * u64le[error count] sum of squared differences between encoder in and output - * @endcode - */ - AV_PKT_DATA_QUALITY_STATS, - - /** - * This side data contains an integer value representing the stream index - * of a "fallback" track. A fallback track indicates an alternate - * track to use when the current track can not be decoded for some reason. - * e.g. no decoder available for codec. - */ - AV_PKT_DATA_FALLBACK_TRACK, - - /** - * This side data corresponds to the AVCPBProperties struct. - */ - AV_PKT_DATA_CPB_PROPERTIES, - - /** - * Recommmends skipping the specified number of samples - * @code - * u32le number of samples to skip from start of this packet - * u32le number of samples to skip from end of this packet - * u8 reason for start skip - * u8 reason for end skip (0=padding silence, 1=convergence) - * @endcode - */ - AV_PKT_DATA_SKIP_SAMPLES=70, - - /** - * An AV_PKT_DATA_JP_DUALMONO side data packet indicates that - * the packet may contain "dual mono" audio specific to Japanese DTV - * and if it is true, recommends only the selected channel to be used. - * @code - * u8 selected channels (0=mail/left, 1=sub/right, 2=both) - * @endcode - */ - AV_PKT_DATA_JP_DUALMONO, - - /** - * A list of zero terminated key/value strings. There is no end marker for - * the list, so it is required to rely on the side data size to stop. - */ - AV_PKT_DATA_STRINGS_METADATA, - - /** - * Subtitle event position - * @code - * u32le x1 - * u32le y1 - * u32le x2 - * u32le y2 - * @endcode - */ - AV_PKT_DATA_SUBTITLE_POSITION, - - /** - * Data found in BlockAdditional element of matroska container. There is - * no end marker for the data, so it is required to rely on the side data - * size to recognize the end. 8 byte id (as found in BlockAddId) followed - * by data. - */ - AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, - - /** - * The optional first identifier line of a WebVTT cue. - */ - AV_PKT_DATA_WEBVTT_IDENTIFIER, - - /** - * The optional settings (rendering instructions) that immediately - * follow the timestamp specifier of a WebVTT cue. - */ - AV_PKT_DATA_WEBVTT_SETTINGS, - - /** - * A list of zero terminated key/value strings. There is no end marker for - * the list, so it is required to rely on the side data size to stop. This - * side data includes updated metadata which appeared in the stream. - */ - AV_PKT_DATA_METADATA_UPDATE, -}; - -#define AV_PKT_DATA_QUALITY_FACTOR AV_PKT_DATA_QUALITY_STATS //DEPRECATED - -typedef struct AVPacketSideData { - uint8_t *data; - int size; - enum AVPacketSideDataType type; -} AVPacketSideData; - /** * This structure stores compressed data. It is typically exported by demuxers * and then passed as input to decoders, or received as output from encoders and @@ -1475,12 +1054,6 @@ typedef struct AVPacket { * A combination of AV_PKT_FLAG values */ int flags; - /** - * Additional packet data that can be provided by the container. - * Packet can contain several types of side information. - */ - AVPacketSideData *side_data; - int side_data_elems; /** * Duration of this packet in AVStream->time_base units, 0 if unknown. @@ -1503,27 +1076,12 @@ typedef struct AVPacket { #define AV_PKT_FLAG_KEY 0x0001 ///< The packet contains a keyframe #define AV_PKT_FLAG_CORRUPT 0x0002 ///< The packet content is corrupted -enum AVSideDataParamChangeFlags { - AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001, - AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002, - AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004, - AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008, -}; /** * @} */ struct AVCodecInternal; -enum AVFieldOrder { - AV_FIELD_UNKNOWN, - AV_FIELD_PROGRESSIVE, - AV_FIELD_TT, //< Top coded_first, top displayed first - AV_FIELD_BB, //< Bottom coded first, bottom displayed first - AV_FIELD_TB, //< Top coded first, bottom displayed first - AV_FIELD_BT, //< Bottom coded first, top displayed first -}; - /** * main external API structure. * New fields can be added to the end with minor version bumps. @@ -1697,143 +1255,10 @@ typedef struct AVCodecContext { */ int delay; - - /* video only */ - /** - * picture width / height. - * - * @note Those fields may not match the values of the last - * AVFrame outputted by avcodec_decode_video2 due frame - * reordering. - * - * - encoding: MUST be set by user. - * - decoding: May be set by the user before opening the decoder if known e.g. - * from the container. Some decoders will require the dimensions - * to be set by the caller. During decoding, the decoder may - * overwrite those values as required while parsing the data. - */ - int width, height; - - /** - * Bitstream width / height, may be different from width/height e.g. when - * the decoded frame is cropped before being output or lowres is enabled. - * - * @note Those field may not match the value of the last - * AVFrame outputted by avcodec_decode_video2 due frame - * reordering. - * - * - encoding: unused - * - decoding: May be set by the user before opening the decoder if known - * e.g. from the container. During decoding, the decoder may - * overwrite those values as required while parsing the data. - */ - int coded_width, coded_height; - #if FF_API_ASPECT_EXTENDED #define FF_ASPECT_EXTENDED 15 #endif - /** - * the number of pictures in a group of pictures, or 0 for intra_only - * - encoding: Set by user. - * - decoding: unused - */ - int gop_size; - - /** - * Pixel format, see AV_PIX_FMT_xxx. - * May be set by the demuxer if known from headers. - * May be overridden by the decoder if it knows better. - * - * @note This field may not match the value of the last - * AVFrame outputted by avcodec_decode_video2 due frame - * reordering. - * - * - encoding: Set by user. - * - decoding: Set by user if known, overridden by libavcodec while - * parsing the data. - */ - enum AVPixelFormat pix_fmt; - -#if FF_API_MOTION_EST - /** - * This option does nothing - * @deprecated use codec private options instead - */ - attribute_deprecated int me_method; -#endif - - /** - * If non NULL, 'draw_horiz_band' is called by the libavcodec - * decoder to draw a horizontal band. It improves cache usage. Not - * all codecs can do that. You must check the codec capabilities - * beforehand. - * When multithreading is used, it may be called from multiple threads - * at the same time; threads might draw different parts of the same AVFrame, - * or multiple AVFrames, and there is no guarantee that slices will be drawn - * in order. - * The function is also used by hardware acceleration APIs. - * It is called at least once during frame decoding to pass - * the data needed for hardware render. - * In that mode instead of pixel data, AVFrame points to - * a structure specific to the acceleration API. The application - * reads the structure and can change some fields to indicate progress - * or mark state. - * - encoding: unused - * - decoding: Set by user. - * @param height the height of the slice - * @param y the y position of the slice - * @param type 1->top field, 2->bottom field, 3->frame - * @param offset offset into the AVFrame.data from which the slice should be read - */ - void (*draw_horiz_band)(struct AVCodecContext *s, - const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], - int y, int type, int height); - - /** - * callback to negotiate the pixelFormat - * @param fmt is the list of formats which are supported by the codec, - * it is terminated by -1 as 0 is a valid format, the formats are ordered by quality. - * The first is always the native one. - * @note The callback may be called again immediately if initialization for - * the selected (hardware-accelerated) pixel format failed. - * @warning Behavior is undefined if the callback returns a value not - * in the fmt list of formats. - * @return the chosen format - * - encoding: unused - * - decoding: Set by user, if not set the native format will be chosen. - */ - enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt); - - /** - * maximum number of B-frames between non-B-frames - * Note: The output will be delayed by max_b_frames+1 relative to the input. - * - encoding: Set by user. - * - decoding: unused - */ - int max_b_frames; - - /** - * qscale factor between IP and B-frames - * If > 0 then the last P-frame quantizer will be used (q= lastp_q*factor+offset). - * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). - * - encoding: Set by user. - * - decoding: unused - */ - float b_quant_factor; - -#if FF_API_RC_STRATEGY - /** @deprecated use codec private option instead */ - attribute_deprecated int rc_strategy; -#define FF_RC_STRATEGY_XVID 1 -#endif - -#if FF_API_PRIVATE_OPT - /** @deprecated use encoder private options instead */ - attribute_deprecated - int b_frame_strategy; -#endif - /** * qscale offset between IP and B-frames * - encoding: Set by user. @@ -1855,57 +1280,6 @@ typedef struct AVCodecContext { int mpeg_quant; #endif - /** - * qscale factor between P and I-frames - * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset). - * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset). - * - encoding: Set by user. - * - decoding: unused - */ - float i_quant_factor; - - /** - * qscale offset between P and I-frames - * - encoding: Set by user. - * - decoding: unused - */ - float i_quant_offset; - - /** - * luminance masking (0-> disabled) - * - encoding: Set by user. - * - decoding: unused - */ - float lumi_masking; - - /** - * temporary complexity masking (0-> disabled) - * - encoding: Set by user. - * - decoding: unused - */ - float temporal_cplx_masking; - - /** - * spatial complexity masking (0-> disabled) - * - encoding: Set by user. - * - decoding: unused - */ - float spatial_cplx_masking; - - /** - * p block masking (0-> disabled) - * - encoding: Set by user. - * - decoding: unused - */ - float p_masking; - - /** - * darkness masking (0-> disabled) - * - encoding: Set by user. - * - decoding: unused - */ - float dark_masking; - /** * slice count * - encoding: Set by libavcodec. @@ -1929,15 +1303,6 @@ typedef struct AVCodecContext { */ int *slice_offset; - /** - * sample aspect ratio (0 if unknown) - * That is the width of a pixel divided by the height of the pixel. - * Numerator and denominator must be relatively prime and smaller than 256 for some video standards. - * - encoding: Set by user. - * - decoding: Set by libavcodec. - */ - AVRational sample_aspect_ratio; - /** * motion estimation comparison function * - encoding: Set by user. @@ -2830,34 +2195,6 @@ typedef struct AVCodecContext { #define AV_EF_COMPLIANT (1<<17) ///< consider all spec non compliances as errors #define AV_EF_AGGRESSIVE (1<<18) ///< consider things that a sane encoder should not do as an error - - /** - * opaque 64bit number (generally a PTS) that will be reordered and - * output in AVFrame.reordered_opaque - * - encoding: unused - * - decoding: Set by user. - */ - int64_t reordered_opaque; - - /** - * Hardware accelerator in use - * - encoding: unused. - * - decoding: Set by libavcodec - */ - struct AVHWAccel *hwaccel; - - /** - * Hardware accelerator context. - * For some hardware accelerators, a global context needs to be - * provided by the user. In that case, this holds display-dependent - * data FFmpeg cannot instantiate itself. Please refer to the - * FFmpeg HW accelerator documentation to know how to fill this - * is. e.g. for VA API, this is a struct vaapi_context. - * - encoding: unused - * - decoding: Set by user - */ - void *hwaccel_context; - /** * error * - encoding: Set by libavcodec if flags & AV_CODEC_FLAG_PSNR. @@ -3097,22 +2434,6 @@ typedef struct AVCodecContext { #define FF_PROFILE_MPEG4_SIMPLE_STUDIO 14 #define FF_PROFILE_MPEG4_ADVANCED_SIMPLE 15 -#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_0 0 -#define FF_PROFILE_JPEG2000_CSTREAM_RESTRICTION_1 1 -#define FF_PROFILE_JPEG2000_CSTREAM_NO_RESTRICTION 2 -#define FF_PROFILE_JPEG2000_DCINEMA_2K 3 -#define FF_PROFILE_JPEG2000_DCINEMA_4K 4 - -#define FF_PROFILE_VP9_0 0 -#define FF_PROFILE_VP9_1 1 -#define FF_PROFILE_VP9_2 2 -#define FF_PROFILE_VP9_3 3 - -#define FF_PROFILE_HEVC_MAIN 1 -#define FF_PROFILE_HEVC_MAIN_10 2 -#define FF_PROFILE_HEVC_MAIN_STILL_PICTURE 3 -#define FF_PROFILE_HEVC_REXT 4 - /** * level * - encoding: Set by user. @@ -3121,13 +2442,6 @@ typedef struct AVCodecContext { int level; #define FF_LEVEL_UNKNOWN -99 - /** - * Skip loop filtering for selected frames. - * - encoding: unused - * - decoding: Set by user. - */ - enum AVDiscard skip_loop_filter; - /** * Skip IDCT/dequantization for selected frames. * - encoding: unused @@ -3153,43 +2467,6 @@ typedef struct AVCodecContext { uint8_t *subtitle_header; int subtitle_header_size; -#if FF_API_ERROR_RATE - /** - * @deprecated use the 'error_rate' private AVOption of the mpegvideo - * encoders - */ - attribute_deprecated - int error_rate; -#endif - -#if FF_API_VBV_DELAY - /** - * VBV delay coded in the last frame (in periods of a 27 MHz clock). - * Used for compliant TS muxing. - * - encoding: Set by libavcodec. - * - decoding: unused. - * @deprecated this value is now exported as a part of - * AV_PKT_DATA_CPB_PROPERTIES packet side data - */ - attribute_deprecated - uint64_t vbv_delay; -#endif - -#if FF_API_SIDEDATA_ONLY_PKT - /** - * Encoding only and set by default. Allow encoders to output packets - * that do not contain any encoded data, only side data. - * - * Some encoders need to output such packets, e.g. to update some stream - * parameters at the end of encoding. - * - * @deprecated this field disables the default behaviour and - * it is kept only for compatibility. - */ - attribute_deprecated - int side_data_only_packets; -#endif - /** * Audio only. The number of "priming" samples (padding) inserted by the * encoder at the beginning of the audio. I.e. this number of leading @@ -3207,21 +2484,6 @@ typedef struct AVCodecContext { */ int initial_padding; - /** - * - decoding: For codecs that store a framerate value in the compressed - * bitstream, the decoder may export it here. { 0, 1} when - * unknown. - * - encoding: unused - */ - AVRational framerate; - - /** - * Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx. - * - encoding: unused. - * - decoding: Set by libavcodec before calling get_format() - */ - enum AVPixelFormat sw_pix_fmt; - /** * Timebase in which pkt_dts/pts and AVPacket.dts/pts are. * Code outside libavcodec should access this field using: @@ -3231,26 +2493,6 @@ typedef struct AVCodecContext { */ AVRational pkt_timebase; - /** - * AVCodecDescriptor - * Code outside libavcodec should access this field using: - * av_codec_{get,set}_codec_descriptor(avctx) - * - encoding: unused. - * - decoding: set by libavcodec. - */ - const AVCodecDescriptor *codec_descriptor; - -#if !FF_API_LOWRES - /** - * low resolution decoding, 1-> 1/2 size, 2->1/4 size - * - encoding: unused - * - decoding: Set by user. - * Code outside libavcodec should access this field using: - * av_codec_{get,set}_lowres(avctx) - */ - int lowres; -#endif - /** * Current statistics for PTS correction. * - decoding: maintained and used by libavcodec, not intended to be used by user apps @@ -3261,24 +2503,6 @@ typedef struct AVCodecContext { int64_t pts_correction_last_pts; /// PTS of the last frame int64_t pts_correction_last_dts; /// DTS of the last frame - /** - * Character encoding of the input subtitles file. - * - decoding: set by user - * - encoding: unused - */ - char *sub_charenc; - - /** - * Subtitles character encoding mode. Formats or codecs might be adjusting - * this setting (if they are doing the conversion themselves for instance). - * - decoding: set by libavcodec - * - encoding: unused - */ - int sub_charenc_mode; -#define FF_SUB_CHARENC_MODE_DO_NOTHING -1 ///< do nothing (demuxer outputs a stream supposed to be already in UTF-8, or the codec is bitmap for instance) -#define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself -#define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv - /** * Skip processing alpha if supported by codec. * Note that if the format uses pre-multiplied alpha (common with VP6, @@ -3301,45 +2525,6 @@ typedef struct AVCodecContext { */ int seek_preroll; -#if !FF_API_DEBUG_MV - /** - * debug motion vectors - * Code outside libavcodec should access this field using AVOptions - * - encoding: Set by user. - * - decoding: Set by user. - */ - int debug_mv; -#define FF_DEBUG_VIS_MV_P_FOR 0x00000001 //visualize forward predicted MVs of P frames -#define FF_DEBUG_VIS_MV_B_FOR 0x00000002 //visualize forward predicted MVs of B frames -#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames -#endif - - /** - * custom intra quantization matrix - * Code outside libavcodec should access this field using av_codec_g/set_chroma_intra_matrix() - * - encoding: Set by user, can be NULL. - * - decoding: unused. - */ - uint16_t *chroma_intra_matrix; - - /** - * dump format separator. - * can be ", " or "\n " or anything else - * Code outside libavcodec should access this field using AVOptions - * (NO direct access). - * - encoding: Set by user. - * - decoding: Set by user. - */ - uint8_t *dump_separator; - - /** - * ',' separated list of allowed decoders. - * If NULL then all are allowed - * - encoding: unused - * - decoding: set by user through AVOPtions (NO direct access) - */ - char *codec_whitelist; - /* * Properties of the stream that gets decoded * To be accessed through av_codec_get_properties() (NO direct access) @@ -3350,34 +2535,16 @@ typedef struct AVCodecContext { #define FF_CODEC_PROPERTY_LOSSLESS 0x00000001 #define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002 - /** - * Additional data associated with the entire coded stream. - * - * - decoding: unused - * - encoding: may be set by libavcodec after avcodec_open2(). - */ - AVPacketSideData *coded_side_data; - int nb_coded_side_data; - } AVCodecContext; AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val); -const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx); -void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc); - unsigned av_codec_get_codec_properties(const AVCodecContext *avctx); -int av_codec_get_lowres(const AVCodecContext *avctx); -void av_codec_set_lowres(AVCodecContext *avctx, int val); - int av_codec_get_seek_preroll(const AVCodecContext *avctx); void av_codec_set_seek_preroll(AVCodecContext *avctx, int val); -uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx); -void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val); - /** * AVProfile. */ @@ -3979,22 +3146,6 @@ void av_init_packet(AVPacket *pkt); */ int av_new_packet(AVPacket *pkt, int size); -/** - * Reduce packet size, correctly zeroing padding - * - * @param pkt packet - * @param size new size - */ -void av_shrink_packet(AVPacket *pkt, int size); - -/** - * Increase packet size, correctly zeroing padding - * - * @param pkt packet - * @param grow_by number of bytes by which to increase the size of the packet - */ -int av_grow_packet(AVPacket *pkt, int grow_by); - /** * Initialize a reference-counted packet from av_malloc()ed data. * @@ -4043,60 +3194,6 @@ int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src); attribute_deprecated void av_free_packet(AVPacket *pkt); #endif -/** - * Allocate new information of a packet. - * - * @param pkt packet - * @param type side information type - * @param size side information size - * @return pointer to fresh allocated data or NULL otherwise - */ -uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int size); - -/** - * Wrap an existing array as a packet side data. - * - * @param pkt packet - * @param type side information type - * @param data the side data array. It must be allocated with the av_malloc() - * family of functions. The ownership of the data is transferred to - * pkt. - * @param size side information size - * @return a non-negative number on success, a negative AVERROR code on - * failure. On failure, the packet is unchanged and the data remains - * owned by the caller. - */ -int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - uint8_t *data, size_t size); - -/** - * Shrink the already allocated side data buffer - * - * @param pkt packet - * @param type side information type - * @param size new side information size - * @return 0 on success, < 0 on failure - */ -int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int size); - -/** - * Get side information from packet. - * - * @param pkt packet - * @param type desired side information type - * @param size pointer for side information size to store (optional) - * @return pointer to data if present or NULL otherwise - */ -uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int *size); - -int av_packet_merge_side_data(AVPacket *pkt); - -int av_packet_split_side_data(AVPacket *pkt); - -const char *av_packet_side_data_name(enum AVPacketSideDataType type); /** * Pack a dictionary for use in side_data. @@ -4116,15 +3213,6 @@ uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size); */ int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict); - -/** - * Convenience function to free all the side data stored. - * All the other fields stay untouched. - * - * @param pkt packet - */ -void av_packet_free_side_data(AVPacket *pkt); - /** * Setup a new reference to the data described by a given packet * @@ -5038,28 +4126,6 @@ size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_ta void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode); -/** - * Return a name for the specified profile, if available. - * - * @param codec the codec that is searched for the given profile - * @param profile the profile value for which a name is requested - * @return A name for the profile if found, NULL otherwise. - */ -const char *av_get_profile_name(const AVCodec *codec, int profile); - -/** - * Return a name for the specified profile, if available. - * - * @param codec_id the ID of the codec to which the requested profile belongs - * @param profile the profile value for which a name is requested - * @return A name for the profile if found, NULL otherwise. - * - * @note unlike av_get_profile_name(), which searches a list of profiles - * supported by a specific decoder or encoder implementation, this - * function searches the list of profiles from the AVCodecDescriptor - */ -const char *avcodec_profile_name(enum AVCodecID codec_id, int profile); - int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size); int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count); //FIXME func typedef @@ -5293,18 +4359,6 @@ attribute_deprecated void av_log_ask_for_sample(void *avc, const char *msg, ...) av_printf_format(2, 3); #endif /* FF_API_MISSING_SAMPLE */ -/** - * Register the hardware accelerator hwaccel. - */ -void av_register_hwaccel(AVHWAccel *hwaccel); - -/** - * If hwaccel is NULL, returns the first registered hardware accelerator, - * if hwaccel is non-NULL, returns the next registered hardware accelerator - * after hwaccel, or NULL if hwaccel is the last one. - */ -AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel); - /** * Lock operation used by lockmgr diff --git a/ext/at3_standalone/avfft.c b/ext/at3_standalone/avfft.c index 247b063ae8..5ae0b4fd71 100644 --- a/ext/at3_standalone/avfft.c +++ b/ext/at3_standalone/avfft.c @@ -21,36 +21,6 @@ #include "fft.h" #include "mem.h" -/* FFT */ - -FFTContext *av_fft_init(int nbits, int inverse) -{ - FFTContext *s = av_mallocz(sizeof(*s)); - - if (s && ff_fft_init(s, nbits, inverse)) - av_freep(&s); - - return s; -} - -void av_fft_permute(FFTContext *s, FFTComplex *z) -{ - s->fft_permute(s, z); -} - -void av_fft_calc(FFTContext *s, FFTComplex *z) -{ - s->fft_calc(s, z); -} - -av_cold void av_fft_end(FFTContext *s) -{ - if (s) { - ff_fft_end(s); - av_free(s); - } -} - #if CONFIG_MDCT FFTContext *av_mdct_init(int nbits, int inverse, double scale) diff --git a/ext/at3_standalone/avpacket.c b/ext/at3_standalone/avpacket.c index 5d2e3ebf64..c254150f29 100644 --- a/ext/at3_standalone/avpacket.c +++ b/ext/at3_standalone/avpacket.c @@ -43,8 +43,6 @@ FF_ENABLE_DEPRECATION_WARNINGS pkt->flags = 0; pkt->stream_index = 0; pkt->buf = NULL; - pkt->side_data = NULL; - pkt->side_data_elems = 0; } AVPacket *av_packet_alloc(void) @@ -97,42 +95,6 @@ int av_new_packet(AVPacket *pkt, int size) return 0; } -void av_shrink_packet(AVPacket *pkt, int size) -{ - if (pkt->size <= size) - return; - pkt->size = size; - memset(pkt->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE); -} - -int av_grow_packet(AVPacket *pkt, int grow_by) -{ - int new_size; - av_assert0((unsigned)pkt->size <= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE); - if (!pkt->size) - return av_new_packet(pkt, grow_by); - if ((unsigned)grow_by > - INT_MAX - (pkt->size + AV_INPUT_BUFFER_PADDING_SIZE)) - return -1; - - new_size = pkt->size + grow_by + AV_INPUT_BUFFER_PADDING_SIZE; - if (pkt->buf) { - int ret = av_buffer_realloc(&pkt->buf, new_size); - if (ret < 0) - return ret; - } else { - pkt->buf = av_buffer_alloc(new_size); - if (!pkt->buf) - return AVERROR(ENOMEM); - memcpy(pkt->buf->data, pkt->data, FFMIN(pkt->size, pkt->size + grow_by)); - } - pkt->data = pkt->buf->data; - pkt->size += grow_by; - memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE); - - return 0; -} - int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size) { if (size >= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) @@ -182,7 +144,6 @@ do { \ static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup) { pkt->data = NULL; - pkt->side_data = NULL; if (pkt->buf) { AVBufferRef *ref = av_buffer_ref(src->buf); if (!ref) @@ -192,11 +153,6 @@ static int copy_packet_data(AVPacket *pkt, const AVPacket *src, int dup) } else { DUP_DATA(pkt->data, src->data, pkt->size, 1, ALLOC_BUF); } - if (pkt->side_data_elems && dup) - pkt->side_data = src->side_data; - if (pkt->side_data_elems && !dup) { - return av_copy_packet_side_data(pkt, src); - } return 0; failed_alloc: @@ -204,30 +160,6 @@ failed_alloc: return AVERROR(ENOMEM); } -int av_copy_packet_side_data(AVPacket *pkt, const AVPacket *src) -{ - if (src->side_data_elems) { - int i; - DUP_DATA(pkt->side_data, src->side_data, - src->side_data_elems * sizeof(*src->side_data), 0, ALLOC_MALLOC); - if (src != pkt) { - memset(pkt->side_data, 0, - src->side_data_elems * sizeof(*src->side_data)); - } - for (i = 0; i < src->side_data_elems; i++) { - DUP_DATA(pkt->side_data[i].data, src->side_data[i].data, - src->side_data[i].size, 1, ALLOC_MALLOC); - pkt->side_data[i].size = src->side_data[i].size; - pkt->side_data[i].type = src->side_data[i].type; - } - } - pkt->side_data_elems = src->side_data_elems; - return 0; - -failed_alloc: - av_packet_unref(pkt); - return AVERROR(ENOMEM); -} FF_ENABLE_DEPRECATION_WARNINGS #endif @@ -248,15 +180,6 @@ int av_copy_packet(AVPacket *dst, const AVPacket *src) return copy_packet_data(dst, src, 0); } -void av_packet_free_side_data(AVPacket *pkt) -{ - int i; - for (i = 0; i < pkt->side_data_elems; i++) - av_freep(&pkt->side_data[i].data); - av_freep(&pkt->side_data); - pkt->side_data_elems = 0; -} - #if FF_API_AVPACKET_OLD_API FF_DISABLE_DEPRECATION_WARNINGS void av_free_packet(AVPacket *pkt) @@ -266,175 +189,13 @@ void av_free_packet(AVPacket *pkt) av_buffer_unref(&pkt->buf); pkt->data = NULL; pkt->size = 0; - - av_packet_free_side_data(pkt); } } FF_ENABLE_DEPRECATION_WARNINGS #endif -int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - uint8_t *data, size_t size) -{ - int elems = pkt->side_data_elems; - - if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data)) - return AVERROR(ERANGE); - - pkt->side_data = av_realloc(pkt->side_data, - (elems + 1) * sizeof(*pkt->side_data)); - if (!pkt->side_data) - return AVERROR(ENOMEM); - - pkt->side_data[elems].data = data; - pkt->side_data[elems].size = size; - pkt->side_data[elems].type = type; - pkt->side_data_elems++; - - return 0; -} - - -uint8_t *av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int size) -{ - int ret; - uint8_t *data; - - if ((unsigned)size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) - return NULL; - data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!data) - return NULL; - - ret = av_packet_add_side_data(pkt, type, data, size); - if (ret < 0) { - av_freep(&data); - return NULL; - } - - return data; -} - -uint8_t *av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int *size) -{ - int i; - - for (i = 0; i < pkt->side_data_elems; i++) { - if (pkt->side_data[i].type == type) { - if (size) - *size = pkt->side_data[i].size; - return pkt->side_data[i].data; - } - } - return NULL; -} - -const char *av_packet_side_data_name(enum AVPacketSideDataType type) -{ - switch(type) { - case AV_PKT_DATA_PALETTE: return "Palette"; - case AV_PKT_DATA_NEW_EXTRADATA: return "New Extradata"; - case AV_PKT_DATA_PARAM_CHANGE: return "Param Change"; - case AV_PKT_DATA_H263_MB_INFO: return "H263 MB Info"; - case AV_PKT_DATA_REPLAYGAIN: return "Replay Gain"; - case AV_PKT_DATA_DISPLAYMATRIX: return "Display Matrix"; - case AV_PKT_DATA_STEREO3D: return "Stereo 3D"; - case AV_PKT_DATA_AUDIO_SERVICE_TYPE: return "Audio Service Type"; - case AV_PKT_DATA_SKIP_SAMPLES: return "Skip Samples"; - case AV_PKT_DATA_JP_DUALMONO: return "JP Dual Mono"; - case AV_PKT_DATA_STRINGS_METADATA: return "Strings Metadata"; - case AV_PKT_DATA_SUBTITLE_POSITION: return "Subtitle Position"; - case AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL: return "Matroska BlockAdditional"; - case AV_PKT_DATA_WEBVTT_IDENTIFIER: return "WebVTT ID"; - case AV_PKT_DATA_WEBVTT_SETTINGS: return "WebVTT Settings"; - case AV_PKT_DATA_METADATA_UPDATE: return "Metadata Update"; - } - return NULL; -} - #define FF_MERGE_MARKER 0x8c4d9d108e25e9feULL -int av_packet_merge_side_data(AVPacket *pkt){ - if(pkt->side_data_elems){ - AVBufferRef *buf; - int i; - uint8_t *p; - uint64_t size= pkt->size + 8LL + AV_INPUT_BUFFER_PADDING_SIZE; - AVPacket old= *pkt; - for (i=0; i INT_MAX) - return AVERROR(EINVAL); - buf = av_buffer_alloc(size); - if (!buf) - return AVERROR(ENOMEM); - pkt->buf = buf; - pkt->data = p = buf->data; - pkt->size = size - AV_INPUT_BUFFER_PADDING_SIZE; - bytestream_put_buffer(&p, old.data, old.size); - for (i=old.side_data_elems-1; i>=0; i--) { - bytestream_put_buffer(&p, old.side_data[i].data, old.side_data[i].size); - bytestream_put_be32(&p, old.side_data[i].size); - *p++ = old.side_data[i].type | ((i==old.side_data_elems-1)*128); - } - bytestream_put_be64(&p, FF_MERGE_MARKER); - av_assert0(p-pkt->data == pkt->size); - memset(p, 0, AV_INPUT_BUFFER_PADDING_SIZE); - av_packet_unref(&old); - pkt->side_data_elems = 0; - pkt->side_data = NULL; - return 1; - } - return 0; -} - -int av_packet_split_side_data(AVPacket *pkt){ - if (!pkt->side_data_elems && pkt->size >12 && AV_RB64(pkt->data + pkt->size - 8) == FF_MERGE_MARKER){ - int i; - unsigned int size; - uint8_t *p; - - p = pkt->data + pkt->size - 8 - 5; - for (i=1; ; i++){ - size = AV_RB32(p); - if (size>INT_MAX - 5 || p - pkt->data < size) - return 0; - if (p[4]&128) - break; - if (p - pkt->data < size + 5) - return 0; - p-= size+5; - } - - pkt->side_data = av_malloc_array(i, sizeof(*pkt->side_data)); - if (!pkt->side_data) - return AVERROR(ENOMEM); - - p= pkt->data + pkt->size - 8 - 5; - for (i=0; ; i++){ - size= AV_RB32(p); - av_assert0(size<=INT_MAX - 5 && p - pkt->data >= size); - pkt->side_data[i].data = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE); - pkt->side_data[i].size = size; - pkt->side_data[i].type = p[4]&127; - if (!pkt->side_data[i].data) - return AVERROR(ENOMEM); - memcpy(pkt->side_data[i].data, p-size, size); - pkt->size -= size + 5; - if(p[4]&128) - break; - p-= size+5; - } - pkt->size -= 8; - pkt->side_data_elems = i+1; - return 1; - } - return 0; -} - uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size) { AVDictionaryEntry *t = NULL; @@ -495,22 +256,6 @@ int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **di return ret; } -int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type, - int size) -{ - int i; - - for (i = 0; i < pkt->side_data_elems; i++) { - if (pkt->side_data[i].type == type) { - if (size > pkt->side_data[i].size) - return AVERROR(ENOMEM); - pkt->side_data[i].size = size; - return 0; - } - } - return AVERROR(ENOENT); -} - int av_packet_copy_props(AVPacket *dst, const AVPacket *src) { int i; @@ -527,25 +272,11 @@ FF_ENABLE_DEPRECATION_WARNINGS dst->flags = src->flags; dst->stream_index = src->stream_index; - for (i = 0; i < src->side_data_elems; i++) { - enum AVPacketSideDataType type = src->side_data[i].type; - int size = src->side_data[i].size; - uint8_t *src_data = src->side_data[i].data; - uint8_t *dst_data = av_packet_new_side_data(dst, type, size); - - if (!dst_data) { - av_packet_free_side_data(dst); - return AVERROR(ENOMEM); - } - memcpy(dst_data, src_data, size); - } - return 0; } void av_packet_unref(AVPacket *pkt) { - av_packet_free_side_data(pkt); av_buffer_unref(&pkt->buf); av_init_packet(pkt); pkt->data = NULL; @@ -577,7 +308,6 @@ int av_packet_ref(AVPacket *dst, const AVPacket *src) dst->data = dst->buf->data; return 0; fail: - av_packet_free_side_data(dst); return ret; } @@ -615,28 +345,3 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif } - -int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type) -{ - uint8_t *side_data; - int side_data_size; - int i; - - side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, &side_data_size); - if (!side_data) { - side_data_size = 4+4+8*error_count; - side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_QUALITY_STATS, - side_data_size); - } - - if (!side_data || side_data_size < 4+4+8*error_count) - return AVERROR(ENOMEM); - - AV_WL32(side_data , quality ); - side_data[4] = pict_type; - side_data[5] = error_count; - for (i = 0; i |%s|", q); - printf(" + |%s|\n", p); - av_free(q); - } - - printf("Testing av_append_path_component()\n"); - #define TEST_APPEND_PATH_COMPONENT(path, component, expected) \ - fullpath = av_append_path_component((path), (component)); \ - printf("%s = %s\n", fullpath ? fullpath : "(null)", expected); \ - av_free(fullpath); - TEST_APPEND_PATH_COMPONENT(NULL, NULL, "(null)") - TEST_APPEND_PATH_COMPONENT("path", NULL, "path"); - TEST_APPEND_PATH_COMPONENT(NULL, "comp", "comp"); - TEST_APPEND_PATH_COMPONENT("path", "comp", "path/comp"); - TEST_APPEND_PATH_COMPONENT("path/", "comp", "path/comp"); - TEST_APPEND_PATH_COMPONENT("path", "/comp", "path/comp"); - TEST_APPEND_PATH_COMPONENT("path/", "/comp", "path/comp"); - TEST_APPEND_PATH_COMPONENT("path/path2/", "/comp/comp2", "path/path2/comp/comp2"); - return 0; -} - -#endif /* TEST */ diff --git a/ext/at3_standalone/avutil.h b/ext/at3_standalone/avutil.h index 9bcf674126..29f73d3f77 100644 --- a/ext/at3_standalone/avutil.h +++ b/ext/at3_standalone/avutil.h @@ -251,36 +251,6 @@ const char *av_get_media_type_string(enum AVMediaType media_type); #define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE} -/** - * @} - * @} - * @defgroup lavu_picture Image related - * - * AVPicture types, pixel formats and basic image planes manipulation. - * - * @{ - */ - -enum AVPictureType { - AV_PICTURE_TYPE_NONE = 0, ///< Undefined - AV_PICTURE_TYPE_I, ///< Intra - AV_PICTURE_TYPE_P, ///< Predicted - AV_PICTURE_TYPE_B, ///< Bi-dir predicted - AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG4 - AV_PICTURE_TYPE_SI, ///< Switching Intra - AV_PICTURE_TYPE_SP, ///< Switching Predicted - AV_PICTURE_TYPE_BI, ///< BI type -}; - -/** - * Return a single letter to describe the given picture type - * pict_type. - * - * @param[in] pict_type the picture type @return a single character - * representing the picture type, '?' if pict_type is unknown - */ -char av_get_picture_type_char(enum AVPictureType pict_type); - /** * @} */ @@ -292,7 +262,6 @@ char av_get_picture_type_char(enum AVPictureType pict_type); #include "macros.h" #include "mathematics.h" #include "log.h" -#include "pixfmt.h" /** * Return x default pointer in case p is NULL. diff --git a/ext/at3_standalone/bitstream.c b/ext/at3_standalone/bitstream.c index 8f661af1fb..3040c5a63f 100644 --- a/ext/at3_standalone/bitstream.c +++ b/ext/at3_standalone/bitstream.c @@ -28,7 +28,6 @@ * bitstream api. */ -#include "atomic.h" #include "qsort.h" #include "avcodec.h" #include "internal.h" diff --git a/ext/at3_standalone/bprint.c b/ext/at3_standalone/bprint.c deleted file mode 100644 index 1c62d214c1..0000000000 --- a/ext/at3_standalone/bprint.c +++ /dev/null @@ -1,379 +0,0 @@ -/* - * Copyright (c) 2012 Nicolas George - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include "avstring.h" -#include "bprint.h" -#include "common.h" -#include "error.h" -#include "mem.h" - -#define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size)) -#define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer) - -static int av_bprint_alloc(AVBPrint *buf, unsigned room) -{ - char *old_str, *new_str; - unsigned min_size, new_size; - - if (buf->size == buf->size_max) - return AVERROR(EIO); - if (!av_bprint_is_complete(buf)) - return AVERROR_INVALIDDATA; /* it is already truncated anyway */ - min_size = buf->len + 1 + FFMIN(UINT_MAX - buf->len - 1, room); - new_size = buf->size > buf->size_max / 2 ? buf->size_max : buf->size * 2; - if (new_size < min_size) - new_size = FFMIN(buf->size_max, min_size); - old_str = av_bprint_is_allocated(buf) ? buf->str : NULL; - new_str = av_realloc(old_str, new_size); - if (!new_str) - return AVERROR(ENOMEM); - if (!old_str) - memcpy(new_str, buf->str, buf->len + 1); - buf->str = new_str; - buf->size = new_size; - return 0; -} - -static void av_bprint_grow(AVBPrint *buf, unsigned extra_len) -{ - /* arbitrary margin to avoid small overflows */ - extra_len = FFMIN(extra_len, UINT_MAX - 5 - buf->len); - buf->len += extra_len; - if (buf->size) - buf->str[FFMIN(buf->len, buf->size - 1)] = 0; -} - -void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max) -{ - unsigned size_auto = (char *)buf + sizeof(*buf) - - buf->reserved_internal_buffer; - - if (size_max == 1) - size_max = size_auto; - buf->str = buf->reserved_internal_buffer; - buf->len = 0; - buf->size = FFMIN(size_auto, size_max); - buf->size_max = size_max; - *buf->str = 0; - if (size_init > buf->size) - av_bprint_alloc(buf, size_init - 1); -} - -void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size) -{ - buf->str = buffer; - buf->len = 0; - buf->size = size; - buf->size_max = size; - *buf->str = 0; -} - -void av_bprintf(AVBPrint *buf, const char *fmt, ...) -{ - unsigned room; - char *dst; - va_list vl; - int extra_len; - - while (1) { - room = av_bprint_room(buf); - dst = room ? buf->str + buf->len : NULL; - va_start(vl, fmt); - extra_len = vsnprintf(dst, room, fmt, vl); - va_end(vl); - if (extra_len <= 0) - return; - if (extra_len < room) - break; - if (av_bprint_alloc(buf, extra_len)) - break; - } - av_bprint_grow(buf, extra_len); -} - -void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg) -{ - unsigned room; - char *dst; - int extra_len; - va_list vl; - - while (1) { - room = av_bprint_room(buf); - dst = room ? buf->str + buf->len : NULL; - va_copy(vl, vl_arg); - extra_len = vsnprintf(dst, room, fmt, vl); - va_end(vl); - if (extra_len <= 0) - return; - if (extra_len < room) - break; - if (av_bprint_alloc(buf, extra_len)) - break; - } - av_bprint_grow(buf, extra_len); -} - -void av_bprint_chars(AVBPrint *buf, char c, unsigned n) -{ - unsigned room, real_n; - - while (1) { - room = av_bprint_room(buf); - if (n < room) - break; - if (av_bprint_alloc(buf, n)) - break; - } - if (room) { - real_n = FFMIN(n, room - 1); - memset(buf->str + buf->len, c, real_n); - } - av_bprint_grow(buf, n); -} - -void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size) -{ - unsigned room, real_n; - - while (1) { - room = av_bprint_room(buf); - if (size < room) - break; - if (av_bprint_alloc(buf, size)) - break; - } - if (room) { - real_n = FFMIN(size, room - 1); - memcpy(buf->str + buf->len, data, real_n); - } - av_bprint_grow(buf, size); -} - -void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm) -{ - unsigned room; - size_t l; - - if (!*fmt) - return; - while (1) { - room = av_bprint_room(buf); - if (room && (l = strftime(buf->str + buf->len, room, fmt, tm))) - break; - /* strftime does not tell us how much room it would need: let us - retry with twice as much until the buffer is large enough */ - room = !room ? strlen(fmt) + 1 : - room <= INT_MAX / 2 ? room * 2 : INT_MAX; - if (av_bprint_alloc(buf, room)) { - /* impossible to grow, try to manage something useful anyway */ - room = av_bprint_room(buf); - if (room < 1024) { - /* if strftime fails because the buffer has (almost) reached - its maximum size, let us try in a local buffer; 1k should - be enough to format any real date+time string */ - char buf2[1024]; - if ((l = strftime(buf2, sizeof(buf2), fmt, tm))) { - av_bprintf(buf, "%s", buf2); - return; - } - } - if (room) { - /* if anything else failed and the buffer is not already - truncated, let us add a stock string and force truncation */ - static const char txt[] = "[truncated strftime output]"; - memset(buf->str + buf->len, '!', room); - memcpy(buf->str + buf->len, txt, FFMIN(sizeof(txt) - 1, room)); - av_bprint_grow(buf, room); /* force truncation */ - } - return; - } - } - av_bprint_grow(buf, l); -} - -void av_bprint_get_buffer(AVBPrint *buf, unsigned size, - unsigned char **mem, unsigned *actual_size) -{ - if (size > av_bprint_room(buf)) - av_bprint_alloc(buf, size); - *actual_size = av_bprint_room(buf); - *mem = *actual_size ? buf->str + buf->len : NULL; -} - -void av_bprint_clear(AVBPrint *buf) -{ - if (buf->len) { - *buf->str = 0; - buf->len = 0; - } -} - -int av_bprint_finalize(AVBPrint *buf, char **ret_str) -{ - unsigned real_size = FFMIN(buf->len + 1, buf->size); - char *str; - int ret = 0; - - if (ret_str) { - if (av_bprint_is_allocated(buf)) { - str = av_realloc(buf->str, real_size); - if (!str) - str = buf->str; - buf->str = NULL; - } else { - str = av_malloc(real_size); - if (str) - memcpy(str, buf->str, real_size); - else - ret = AVERROR(ENOMEM); - } - *ret_str = str; - } else { - if (av_bprint_is_allocated(buf)) - av_freep(&buf->str); - } - buf->size = real_size; - return ret; -} - -#define WHITESPACES " \n\t" - -void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, - enum AVEscapeMode mode, int flags) -{ - const char *src0 = src; - - if (mode == AV_ESCAPE_MODE_AUTO) - mode = AV_ESCAPE_MODE_BACKSLASH; /* TODO: implement a heuristic */ - - switch (mode) { - case AV_ESCAPE_MODE_QUOTE: - /* enclose the string between '' */ - av_bprint_chars(dstbuf, '\'', 1); - for (; *src; src++) { - if (*src == '\'') - av_bprintf(dstbuf, "'\\''"); - else - av_bprint_chars(dstbuf, *src, 1); - } - av_bprint_chars(dstbuf, '\'', 1); - break; - - /* case AV_ESCAPE_MODE_BACKSLASH or unknown mode */ - default: - /* \-escape characters */ - for (; *src; src++) { - int is_first_last = src == src0 || !*(src+1); - int is_ws = !!strchr(WHITESPACES, *src); - int is_strictly_special = special_chars && strchr(special_chars, *src); - int is_special = - is_strictly_special || strchr("'\\", *src) || - (is_ws && (flags & AV_ESCAPE_FLAG_WHITESPACE)); - - if (is_strictly_special || - (!(flags & AV_ESCAPE_FLAG_STRICT) && - (is_special || (is_ws && is_first_last)))) - av_bprint_chars(dstbuf, '\\', 1); - av_bprint_chars(dstbuf, *src, 1); - } - break; - } -} - -#ifdef TEST - -#undef printf - -static void bprint_pascal(AVBPrint *b, unsigned size) -{ - unsigned i, j; - unsigned p[42]; - - av_assert0(size < FF_ARRAY_ELEMS(p)); - - p[0] = 1; - av_bprintf(b, "%8d\n", 1); - for (i = 1; i <= size; i++) { - p[i] = 1; - for (j = i - 1; j > 0; j--) - p[j] = p[j] + p[j - 1]; - for (j = 0; j <= i; j++) - av_bprintf(b, "%8d", p[j]); - av_bprintf(b, "\n"); - } -} - -int main(void) -{ - AVBPrint b; - char buf[256]; - struct tm testtime = { .tm_year = 100, .tm_mon = 11, .tm_mday = 20 }; - - av_bprint_init(&b, 0, -1); - bprint_pascal(&b, 5); - printf("Short text in unlimited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len); - printf("%s\n", b.str); - av_bprint_finalize(&b, NULL); - - av_bprint_init(&b, 0, -1); - bprint_pascal(&b, 25); - printf("Long text in unlimited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len); - av_bprint_finalize(&b, NULL); - - av_bprint_init(&b, 0, 2048); - bprint_pascal(&b, 25); - printf("Long text in limited buffer: %u/%u\n", (unsigned)strlen(b.str), b.len); - av_bprint_finalize(&b, NULL); - - av_bprint_init(&b, 0, 1); - bprint_pascal(&b, 5); - printf("Short text in automatic buffer: %u/%u\n", (unsigned)strlen(b.str), b.len); - - av_bprint_init(&b, 0, 1); - bprint_pascal(&b, 25); - printf("Long text in automatic buffer: %u/%u\n", (unsigned)strlen(b.str)/8*8, b.len); - /* Note that the size of the automatic buffer is arch-dependent. */ - - av_bprint_init(&b, 0, 0); - bprint_pascal(&b, 25); - printf("Long text count only buffer: %u/%u\n", (unsigned)strlen(b.str), b.len); - - av_bprint_init_for_buffer(&b, buf, sizeof(buf)); - bprint_pascal(&b, 25); - printf("Long text count only buffer: %u/%u\n", (unsigned)strlen(buf), b.len); - - av_bprint_init(&b, 0, -1); - av_bprint_strftime(&b, "%Y-%m-%d", &testtime); - printf("strftime full: %u/%u \"%s\"\n", (unsigned)strlen(buf), b.len, b.str); - av_bprint_finalize(&b, NULL); - - av_bprint_init(&b, 0, 8); - av_bprint_strftime(&b, "%Y-%m-%d", &testtime); - printf("strftime truncated: %u/%u \"%s\"\n", (unsigned)strlen(buf), b.len, b.str); - - return 0; -} - -#endif diff --git a/ext/at3_standalone/bprint.h b/ext/at3_standalone/bprint.h deleted file mode 100644 index c09b1ac1e1..0000000000 --- a/ext/at3_standalone/bprint.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2012 Nicolas George - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVUTIL_BPRINT_H -#define AVUTIL_BPRINT_H - -#include - -#include "attributes.h" -#include "avstring.h" - -/** - * Define a structure with extra padding to a fixed size - * This helps ensuring binary compatibility with future versions. - */ - -#define FF_PAD_STRUCTURE(name, size, ...) \ -struct ff_pad_helper_##name { __VA_ARGS__ }; \ -typedef struct name { \ - __VA_ARGS__ \ - char reserved_padding[size - sizeof(struct ff_pad_helper_##name)]; \ -} name; - -/** - * Buffer to print data progressively - * - * The string buffer grows as necessary and is always 0-terminated. - * The content of the string is never accessed, and thus is - * encoding-agnostic and can even hold binary data. - * - * Small buffers are kept in the structure itself, and thus require no - * memory allocation at all (unless the contents of the buffer is needed - * after the structure goes out of scope). This is almost as lightweight as - * declaring a local "char buf[512]". - * - * The length of the string can go beyond the allocated size: the buffer is - * then truncated, but the functions still keep account of the actual total - * length. - * - * In other words, buf->len can be greater than buf->size and records the - * total length of what would have been to the buffer if there had been - * enough memory. - * - * Append operations do not need to be tested for failure: if a memory - * allocation fails, data stop being appended to the buffer, but the length - * is still updated. This situation can be tested with - * av_bprint_is_complete(). - * - * The size_max field determines several possible behaviours: - * - * size_max = -1 (= UINT_MAX) or any large value will let the buffer be - * reallocated as necessary, with an amortized linear cost. - * - * size_max = 0 prevents writing anything to the buffer: only the total - * length is computed. The write operations can then possibly be repeated in - * a buffer with exactly the necessary size - * (using size_init = size_max = len + 1). - * - * size_max = 1 is automatically replaced by the exact size available in the - * structure itself, thus ensuring no dynamic memory allocation. The - * internal buffer is large enough to hold a reasonable paragraph of text, - * such as the current paragraph. - */ - -FF_PAD_STRUCTURE(AVBPrint, 1024, - char *str; /**< string so far */ - unsigned len; /**< length so far */ - unsigned size; /**< allocated memory */ - unsigned size_max; /**< maximum allocated memory */ - char reserved_internal_buffer[1]; -) - -/** - * Convenience macros for special values for av_bprint_init() size_max - * parameter. - */ -#define AV_BPRINT_SIZE_UNLIMITED ((unsigned)-1) -#define AV_BPRINT_SIZE_AUTOMATIC 1 -#define AV_BPRINT_SIZE_COUNT_ONLY 0 - -/** - * Init a print buffer. - * - * @param buf buffer to init - * @param size_init initial size (including the final 0) - * @param size_max maximum size; - * 0 means do not write anything, just count the length; - * 1 is replaced by the maximum value for automatic storage; - * any large value means that the internal buffer will be - * reallocated as needed up to that limit; -1 is converted to - * UINT_MAX, the largest limit possible. - * Check also AV_BPRINT_SIZE_* macros. - */ -void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max); - -/** - * Init a print buffer using a pre-existing buffer. - * - * The buffer will not be reallocated. - * - * @param buf buffer structure to init - * @param buffer byte buffer to use for the string data - * @param size size of buffer - */ -void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size); - -/** - * Append a formatted string to a print buffer. - */ -void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3); - -/** - * Append a formatted string to a print buffer. - */ -void av_vbprintf(AVBPrint *buf, const char *fmt, va_list vl_arg); - -/** - * Append char c n times to a print buffer. - */ -void av_bprint_chars(AVBPrint *buf, char c, unsigned n); - -/** - * Append data to a print buffer. - * - * param buf bprint buffer to use - * param data pointer to data - * param size size of data - */ -void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size); - -struct tm; -/** - * Append a formatted date and time to a print buffer. - * - * param buf bprint buffer to use - * param fmt date and time format string, see strftime() - * param tm broken-down time structure to translate - * - * @note due to poor design of the standard strftime function, it may - * produce poor results if the format string expands to a very long text and - * the bprint buffer is near the limit stated by the size_max option. - */ -void av_bprint_strftime(AVBPrint *buf, const char *fmt, const struct tm *tm); - -/** - * Allocate bytes in the buffer for external use. - * - * @param[in] buf buffer structure - * @param[in] size required size - * @param[out] mem pointer to the memory area - * @param[out] actual_size size of the memory area after allocation; - * can be larger or smaller than size - */ -void av_bprint_get_buffer(AVBPrint *buf, unsigned size, - unsigned char **mem, unsigned *actual_size); - -/** - * Reset the string to "" but keep internal allocated data. - */ -void av_bprint_clear(AVBPrint *buf); - -/** - * Test if the print buffer is complete (not truncated). - * - * It may have been truncated due to a memory allocation failure - * or the size_max limit (compare size and size_max if necessary). - */ -static inline int av_bprint_is_complete(const AVBPrint *buf) -{ - return buf->len < buf->size; -} - -/** - * Finalize a print buffer. - * - * The print buffer can no longer be used afterwards, - * but the len and size fields are still valid. - * - * @arg[out] ret_str if not NULL, used to return a permanent copy of the - * buffer contents, or NULL if memory allocation fails; - * if NULL, the buffer is discarded and freed - * @return 0 for success or error code (probably AVERROR(ENOMEM)) - */ -int av_bprint_finalize(AVBPrint *buf, char **ret_str); - -/** - * Escape the content in src and append it to dstbuf. - * - * @param dstbuf already inited destination bprint buffer - * @param src string containing the text to escape - * @param special_chars string containing the special characters which - * need to be escaped, can be NULL - * @param mode escape mode to employ, see AV_ESCAPE_MODE_* macros. - * Any unknown value for mode will be considered equivalent to - * AV_ESCAPE_MODE_BACKSLASH, but this behaviour can change without - * notice. - * @param flags flags which control how to escape, see AV_ESCAPE_FLAG_* macros - */ -void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, - enum AVEscapeMode mode, int flags); - -#endif /* AVUTIL_BPRINT_H */ diff --git a/ext/at3_standalone/codec_desc.c b/ext/at3_standalone/codec_desc.c deleted file mode 100644 index 6336770016..0000000000 --- a/ext/at3_standalone/codec_desc.c +++ /dev/null @@ -1,2933 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * This table was generated from the long and short names of AVCodecs - * please see the respective codec sources for authorship - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -#include "common.h" -#include "internal.h" -#include "avcodec.h" -// #include "profiles.h" -#include "version.h" - -#define MT(...) (const char *const[]){ __VA_ARGS__, NULL } - -static const AVCodecDescriptor codec_descriptors[] = { - /* video codecs */ - { - .id = AV_CODEC_ID_MPEG1VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mpeg1video", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_MPEG2VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mpeg2video", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles), - }, -#if FF_API_XVMC - { - .id = AV_CODEC_ID_MPEG2VIDEO_XVMC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mpegvideo_xvmc", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-1/2 video XvMC (X-Video Motion Compensation)"), - .props = AV_CODEC_PROP_LOSSY, - }, -#endif /* FF_API_XVMC */ - { - .id = AV_CODEC_ID_H261, - .type = AVMEDIA_TYPE_VIDEO, - .name = "h261", - .long_name = NULL_IF_CONFIG_SMALL("H.261"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_H263, - .type = AVMEDIA_TYPE_VIDEO, - .name = "h263", - .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_RV10, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rv10", - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_RV20, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rv20", - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_MJPEG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mjpeg", - .long_name = NULL_IF_CONFIG_SMALL("Motion JPEG"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - .mime_types= MT("image/jpeg"), - }, - { - .id = AV_CODEC_ID_MJPEGB, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mjpegb", - .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MPEG4, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mpeg4", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles), - }, - { - .id = AV_CODEC_ID_RAWVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rawvideo", - .long_name = NULL_IF_CONFIG_SMALL("raw video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MSMPEG4V1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msmpeg4v1", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MSMPEG4V2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msmpeg4v2", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MSMPEG4V3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msmpeg4v3", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wmv1", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMV2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wmv2", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_H263P, - .type = AVMEDIA_TYPE_VIDEO, - .name = "h263p", - .long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_H263I, - .type = AVMEDIA_TYPE_VIDEO, - .name = "h263i", - .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_FLV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "flv1", - .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SVQ1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "svq1", - .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SVQ3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "svq3", - .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_DVVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dvvideo", - .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_HUFFYUV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "huffyuv", - .long_name = NULL_IF_CONFIG_SMALL("HuffYUV"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_CYUV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cyuv", - .long_name = NULL_IF_CONFIG_SMALL("Creative YUV (CYUV)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_H264, - .type = AVMEDIA_TYPE_VIDEO, - .name = "h264", - .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_h264_profiles), - }, - { - .id = AV_CODEC_ID_INDEO3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "indeo3", - .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp3", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP3"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_THEORA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "theora", - .long_name = NULL_IF_CONFIG_SMALL("Theora"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ASV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "asv1", - .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ASV2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "asv2", - .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FFV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ffv1", - .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_4XM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "4xm", - .long_name = NULL_IF_CONFIG_SMALL("4X Movie"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VCR1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vcr1", - .long_name = NULL_IF_CONFIG_SMALL("ATI VCR1"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CLJR, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cljr", - .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MDEC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mdec", - .long_name = NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ROQ, - .type = AVMEDIA_TYPE_VIDEO, - .name = "roq", - .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_INTERPLAY_VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "interplayvideo", - .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XAN_WC3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xan_wc3", - .long_name = NULL_IF_CONFIG_SMALL("Wing Commander III / Xan"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XAN_WC4, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xan_wc4", - .long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_RPZA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rpza", - .long_name = NULL_IF_CONFIG_SMALL("QuickTime video (RPZA)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CINEPAK, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cinepak", - .long_name = NULL_IF_CONFIG_SMALL("Cinepak"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WS_VQA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ws_vqa", - .long_name = NULL_IF_CONFIG_SMALL("Westwood Studios VQA (Vector Quantized Animation) video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MSRLE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msrle", - .long_name = NULL_IF_CONFIG_SMALL("Microsoft RLE"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MSVIDEO1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msvideo1", - .long_name = NULL_IF_CONFIG_SMALL("Microsoft Video 1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_IDCIN, - .type = AVMEDIA_TYPE_VIDEO, - .name = "idcin", - .long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_8BPS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "8bps", - .long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_SMC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "smc", - .long_name = NULL_IF_CONFIG_SMALL("QuickTime Graphics (SMC)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FLIC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "flic", - .long_name = NULL_IF_CONFIG_SMALL("Autodesk Animator Flic video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_TRUEMOTION1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "truemotion1", - .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 1.0"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VMDVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vmdvideo", - .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MSZH, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mszh", - .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) MSZH"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ZLIB, - .type = AVMEDIA_TYPE_VIDEO, - .name = "zlib", - .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_QTRLE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "qtrle", - .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_SNOW, - .type = AVMEDIA_TYPE_VIDEO, - .name = "snow", - .long_name = NULL_IF_CONFIG_SMALL("Snow"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_TSCC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tscc", - .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ULTI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ulti", - .long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_QDRAW, - .type = AVMEDIA_TYPE_VIDEO, - .name = "qdraw", - .long_name = NULL_IF_CONFIG_SMALL("Apple QuickDraw"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_VIXL, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vixl", - .long_name = NULL_IF_CONFIG_SMALL("Miro VideoXL"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_QPEG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "qpeg", - .long_name = NULL_IF_CONFIG_SMALL("Q-team QPEG"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FFVHUFF, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ffvhuff", - .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_RV30, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rv30", - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 3.0"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_RV40, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rv40", - .long_name = NULL_IF_CONFIG_SMALL("RealVideo 4.0"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_VC1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vc1", - .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), - }, - { - .id = AV_CODEC_ID_WMV3, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wmv3", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_vc1_profiles), - }, - { - .id = AV_CODEC_ID_LOCO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "loco", - .long_name = NULL_IF_CONFIG_SMALL("LOCO"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_WNV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wnv1", - .long_name = NULL_IF_CONFIG_SMALL("Winnov WNV1"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AASC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "aasc", - .long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_INDEO2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "indeo2", - .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FRAPS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "fraps", - .long_name = NULL_IF_CONFIG_SMALL("Fraps"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_TRUEMOTION2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "truemotion2", - .long_name = NULL_IF_CONFIG_SMALL("Duck TrueMotion 2.0"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BMP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "bmp", - .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/x-ms-bmp"), - }, - { - .id = AV_CODEC_ID_CSCD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cscd", - .long_name = NULL_IF_CONFIG_SMALL("CamStudio"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MMVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mmvideo", - .long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ZMBV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "zmbv", - .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_AVS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "avs", - .long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SMACKVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "smackvideo", - .long_name = NULL_IF_CONFIG_SMALL("Smacker video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_NUV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "nuv", - .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_KMVC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "kmvc", - .long_name = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FLASHSV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "flashsv", - .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_CAVS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cavs", - .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_JPEG2000, - .type = AVMEDIA_TYPE_VIDEO, - .name = "jpeg2000", - .long_name = NULL_IF_CONFIG_SMALL("JPEG 2000"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/jp2"), - .profiles = NULL_IF_CONFIG_SMALL(ff_jpeg2000_profiles), - }, - { - .id = AV_CODEC_ID_VMNC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vmnc", - .long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_VP5, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp5", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP6, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp6", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP6"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP6F, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp6f", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSICINVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dsicinvideo", - .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TIERTEXSEQVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tiertexseqvideo", - .long_name = NULL_IF_CONFIG_SMALL("Tiertex Limited SEQ video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DXA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dxa", - .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DNXHD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dnxhd", - .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_THP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "thp", - .long_name = NULL_IF_CONFIG_SMALL("Nintendo Gamecube THP video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_C93, - .type = AVMEDIA_TYPE_VIDEO, - .name = "c93", - .long_name = NULL_IF_CONFIG_SMALL("Interplay C93"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BETHSOFTVID, - .type = AVMEDIA_TYPE_VIDEO, - .name = "bethsoftvid", - .long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP6A, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp6a", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP6 (Flash version, with alpha channel)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AMV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "amv", - .long_name = NULL_IF_CONFIG_SMALL("AMV Video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VB, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vb", - .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_INDEO4, - .type = AVMEDIA_TYPE_VIDEO, - .name = "indeo4", - .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_INDEO5, - .type = AVMEDIA_TYPE_VIDEO, - .name = "indeo5", - .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MIMIC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mimic", - .long_name = NULL_IF_CONFIG_SMALL("Mimic"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_RL2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rl2", - .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ESCAPE124, - .type = AVMEDIA_TYPE_VIDEO, - .name = "escape124", - .long_name = NULL_IF_CONFIG_SMALL("Escape 124"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DAALA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "daala", - .long_name = NULL_IF_CONFIG_SMALL("Daala"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DIRAC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dirac", - .long_name = NULL_IF_CONFIG_SMALL("Dirac"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS | AV_CODEC_PROP_REORDER, - }, - { - .id = AV_CODEC_ID_BFI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "bfi", - .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CMV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cmv", - .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts CMV video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MOTIONPIXELS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "motionpixels", - .long_name = NULL_IF_CONFIG_SMALL("Motion Pixels video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TGV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tgv", - .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGV video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TGQ, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tgq", - .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TQI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tqi", - .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TQI video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AURA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "aura", - .long_name = NULL_IF_CONFIG_SMALL("Auravision AURA"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AURA2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "aura2", - .long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_V210X, - .type = AVMEDIA_TYPE_VIDEO, - .name = "v210x", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_TMV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tmv", - .long_name = NULL_IF_CONFIG_SMALL("8088flex TMV"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_V210, - .type = AVMEDIA_TYPE_VIDEO, - .name = "v210", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MAD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mad", - .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FRWU, - .type = AVMEDIA_TYPE_VIDEO, - .name = "frwu", - .long_name = NULL_IF_CONFIG_SMALL("Forward Uncompressed"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_FLASHSV2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "flashsv2", - .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CDGRAPHICS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cdgraphics", - .long_name = NULL_IF_CONFIG_SMALL("CD Graphics video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_R210, - .type = AVMEDIA_TYPE_VIDEO, - .name = "r210", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed RGB 10-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ANM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "anm", - .long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BINKVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "binkvideo", - .long_name = NULL_IF_CONFIG_SMALL("Bink video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_IFF_ILBM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "iff_ilbm", - .long_name = NULL_IF_CONFIG_SMALL("IFF ILBM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_KGV1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "kgv1", - .long_name = NULL_IF_CONFIG_SMALL("Kega Game Video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_YOP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "yop", - .long_name = NULL_IF_CONFIG_SMALL("Psygnosis YOP Video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP8, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp8", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP8"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP9, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp9", - .long_name = NULL_IF_CONFIG_SMALL("Google VP9"), - .props = AV_CODEC_PROP_LOSSY, - .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles), - }, - { - .id = AV_CODEC_ID_PICTOR, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pictor", - .long_name = NULL_IF_CONFIG_SMALL("Pictor/PC Paint"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_A64_MULTI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "a64_multi", - .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_A64_MULTI5, - .type = AVMEDIA_TYPE_VIDEO, - .name = "a64_multi5", - .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_R10K, - .type = AVMEDIA_TYPE_VIDEO, - .name = "r10k", - .long_name = NULL_IF_CONFIG_SMALL("AJA Kona 10-bit RGB Codec"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MVC1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mvc1", - .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 1"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MVC2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mvc2", - .long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics Motion Video Compressor 2"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MXPEG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mxpeg", - .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_LAGARITH, - .type = AVMEDIA_TYPE_VIDEO, - .name = "lagarith", - .long_name = NULL_IF_CONFIG_SMALL("Lagarith lossless"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PRORES, - .type = AVMEDIA_TYPE_VIDEO, - .name = "prores", - .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_JV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "jv", - .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DFA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dfa", - .long_name = NULL_IF_CONFIG_SMALL("Chronomaster DFA"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_UTVIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "utvideo", - .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_BMV_VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "bmv_video", - .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_VBLE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vble", - .long_name = NULL_IF_CONFIG_SMALL("VBLE Lossless Codec"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DXTORY, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dxtory", - .long_name = NULL_IF_CONFIG_SMALL("Dxtory"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_V410, - .type = AVMEDIA_TYPE_VIDEO, - .name = "v410", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_CDXL, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cdxl", - .long_name = NULL_IF_CONFIG_SMALL("Commodore CDXL video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ZEROCODEC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "zerocodec", - .long_name = NULL_IF_CONFIG_SMALL("ZeroCodec Lossless Video"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MSS1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mss1", - .long_name = NULL_IF_CONFIG_SMALL("MS Screen 1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MSA1, - .type = AVMEDIA_TYPE_VIDEO, - .name = "msa1", - .long_name = NULL_IF_CONFIG_SMALL("MS ATC Screen"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TSCC2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tscc2", - .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Codec 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MTS2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mts2", - .long_name = NULL_IF_CONFIG_SMALL("MS Expression Encoder Screen"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CLLC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cllc", - .long_name = NULL_IF_CONFIG_SMALL("Canopus Lossless Codec"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MSS2, - .type = AVMEDIA_TYPE_VIDEO, - .name = "mss2", - .long_name = NULL_IF_CONFIG_SMALL("MS Windows Media Video V9 Screen"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AIC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "aic", - .long_name = NULL_IF_CONFIG_SMALL("Apple Intermediate Codec"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_Y41P, - .type = AVMEDIA_TYPE_VIDEO, - .name = "y41p", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed YUV 4:1:1 12-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_ESCAPE130, - .type = AVMEDIA_TYPE_VIDEO, - .name = "escape130", - .long_name = NULL_IF_CONFIG_SMALL("Escape 130"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AVRP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "avrp", - .long_name = NULL_IF_CONFIG_SMALL("Avid 1:1 10-bit RGB Packer"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_012V, - .type = AVMEDIA_TYPE_VIDEO, - .name = "012v", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_AVUI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "avui", - .long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_AYUV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ayuv", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed MS 4:4:4:4"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_TARGA_Y216, - .type = AVMEDIA_TYPE_VIDEO, - .name = "targa_y216", - .long_name = NULL_IF_CONFIG_SMALL("Pinnacle TARGA CineWave YUV16"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_V308, - .type = AVMEDIA_TYPE_VIDEO, - .name = "v308", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:4:4"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_V408, - .type = AVMEDIA_TYPE_VIDEO, - .name = "v408", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed QT 4:4:4:4"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_YUV4, - .type = AVMEDIA_TYPE_VIDEO, - .name = "yuv4", - .long_name = NULL_IF_CONFIG_SMALL("Uncompressed packed 4:2:0"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_AVRN, - .type = AVMEDIA_TYPE_VIDEO, - .name = "avrn", - .long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"), - }, - { - .id = AV_CODEC_ID_CPIA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cpia", - .long_name = NULL_IF_CONFIG_SMALL("CPiA video format"), - }, - { - .id = AV_CODEC_ID_XFACE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xface", - .long_name = NULL_IF_CONFIG_SMALL("X-face image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SMVJPEG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "smvjpeg", - .long_name = NULL_IF_CONFIG_SMALL("Sigmatel Motion Video"), - }, - - { - .id = AV_CODEC_ID_G2M, - .type = AVMEDIA_TYPE_VIDEO, - .name = "g2m", - .long_name = NULL_IF_CONFIG_SMALL("Go2Meeting"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_HNM4_VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "hnm4video", - .long_name = NULL_IF_CONFIG_SMALL("HNM 4 video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_HEVC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "hevc", - .long_name = NULL_IF_CONFIG_SMALL("H.265 / HEVC (High Efficiency Video Coding)"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER, - .profiles = NULL_IF_CONFIG_SMALL(ff_hevc_profiles), - }, - { - .id = AV_CODEC_ID_FIC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "fic", - .long_name = NULL_IF_CONFIG_SMALL("Mirillis FIC"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_PAF_VIDEO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "paf_video", - .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VP7, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vp7", - .long_name = NULL_IF_CONFIG_SMALL("On2 VP7"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SANM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "sanm", - .long_name = NULL_IF_CONFIG_SMALL("LucasArts SANM/SMUSH video"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SGIRLE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "sgirle", - .long_name = NULL_IF_CONFIG_SMALL("SGI RLE 8-bit"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_HQX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "hqx", - .long_name = NULL_IF_CONFIG_SMALL("Canopus HQX"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_HQ_HQA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "hq_hqa", - .long_name = NULL_IF_CONFIG_SMALL("Canopus HQ/HQA"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_HAP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "hap", - .long_name = NULL_IF_CONFIG_SMALL("Vidvox Hap decoder"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DXV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dxv", - .long_name = NULL_IF_CONFIG_SMALL("Resolume DXV"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SCREENPRESSO, - .type = AVMEDIA_TYPE_VIDEO, - .name = "screenpresso", - .long_name = NULL_IF_CONFIG_SMALL("Screenpresso"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_WRAPPED_AVFRAME, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wrapped_avframe", - .long_name = NULL_IF_CONFIG_SMALL("AVFrame to AVPacket passthrough"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_RSCC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "rscc", - .long_name = NULL_IF_CONFIG_SMALL("innoHeim/Rsupport Screen Capture Codec"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - - /* image codecs */ - { - .id = AV_CODEC_ID_ALIAS_PIX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "alias_pix", - .long_name = NULL_IF_CONFIG_SMALL("Alias/Wavefront PIX image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ANSI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ansi", - .long_name = NULL_IF_CONFIG_SMALL("ASCII/ANSI art"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BRENDER_PIX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "brender_pix", - .long_name = NULL_IF_CONFIG_SMALL("BRender PIX image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DDS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dds", - .long_name = NULL_IF_CONFIG_SMALL("DirectDraw Surface image decoder"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DPX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "dpx", - .long_name = NULL_IF_CONFIG_SMALL("DPX (Digital Picture Exchange) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_EXR, - .type = AVMEDIA_TYPE_VIDEO, - .name = "exr", - .long_name = NULL_IF_CONFIG_SMALL("OpenEXR image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_GIF, - .type = AVMEDIA_TYPE_VIDEO, - .name = "gif", - .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), - .props = AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/gif"), - }, - { - .id = AV_CODEC_ID_JPEGLS, - .type = AVMEDIA_TYPE_VIDEO, - .name = "jpegls", - .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_LJPEG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ljpeg", - .long_name = NULL_IF_CONFIG_SMALL("Lossless JPEG"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PAM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pam", - .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/x-portable-pixmap"), - }, - { - .id = AV_CODEC_ID_PBM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pbm", - .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pcx", - .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/x-pcx"), - }, - { - .id = AV_CODEC_ID_PGM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pgm", - .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PGMYUV, - .type = AVMEDIA_TYPE_VIDEO, - .name = "pgmyuv", - .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PNG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "png", - .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), - .props = AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/png"), - }, - { - .id = AV_CODEC_ID_PPM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ppm", - .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PTX, - .type = AVMEDIA_TYPE_VIDEO, - .name = "ptx", - .long_name = NULL_IF_CONFIG_SMALL("V.Flash PTX image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SGI, - .type = AVMEDIA_TYPE_VIDEO, - .name = "sgi", - .long_name = NULL_IF_CONFIG_SMALL("SGI image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_SP5X, - .type = AVMEDIA_TYPE_VIDEO, - .name = "sp5x", - .long_name = NULL_IF_CONFIG_SMALL("Sunplus JPEG (SP5X)"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SUNRAST, - .type = AVMEDIA_TYPE_VIDEO, - .name = "sunrast", - .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_TARGA, - .type = AVMEDIA_TYPE_VIDEO, - .name = "targa", - .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/x-targa", "image/x-tga"), - }, - { - .id = AV_CODEC_ID_TDSC, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tdsc", - .long_name = NULL_IF_CONFIG_SMALL("TDSC"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TIFF, - .type = AVMEDIA_TYPE_VIDEO, - .name = "tiff", - .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/tiff"), - }, - { - .id = AV_CODEC_ID_TXD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "txd", - .long_name = NULL_IF_CONFIG_SMALL("Renderware TXD (TeXture Dictionary) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VC1IMAGE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "vc1image", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image v2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WEBP, - .type = AVMEDIA_TYPE_VIDEO, - .name = "webp", - .long_name = NULL_IF_CONFIG_SMALL("WebP"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/webp"), - }, - { - .id = AV_CODEC_ID_WMV3IMAGE, - .type = AVMEDIA_TYPE_VIDEO, - .name = "wmv3image", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 Image"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XBM, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xbm", - .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_XWD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xwd", - .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/x-xwindowdump"), - }, - { - .id = AV_CODEC_ID_APNG, - .type = AVMEDIA_TYPE_VIDEO, - .name = "apng", - .long_name = NULL_IF_CONFIG_SMALL("APNG (Animated Portable Network Graphics) image"), - .props = AV_CODEC_PROP_LOSSLESS, - .mime_types= MT("image/png"), - }, - { - .id = AV_CODEC_ID_CFHD, - .type = AVMEDIA_TYPE_VIDEO, - .name = "cfhd", - .long_name = NULL_IF_CONFIG_SMALL("Cineform HD"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* various PCM "codecs" */ - { - .id = AV_CODEC_ID_PCM_S16LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s16le", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S16BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s16be", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U16LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u16le", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 16-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U16BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u16be", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 16-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S8, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s8", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U8, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u8", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 8-bit"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_MULAW, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_mulaw", - .long_name = NULL_IF_CONFIG_SMALL("PCM mu-law / G.711 mu-law"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_PCM_ALAW, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_alaw", - .long_name = NULL_IF_CONFIG_SMALL("PCM A-law / G.711 A-law"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_PCM_S32LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s32le", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 32-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S32BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s32be", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 32-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U32LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u32le", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 32-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U32BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u32be", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 32-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S24LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s24le", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 24-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S24BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s24be", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 24-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U24LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u24le", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 24-bit little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_U24BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_u24be", - .long_name = NULL_IF_CONFIG_SMALL("PCM unsigned 24-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S24DAUD, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s24daud", - .long_name = NULL_IF_CONFIG_SMALL("PCM D-Cinema audio signed 24-bit"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_ZORK, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_zork", - .long_name = NULL_IF_CONFIG_SMALL("PCM Zork"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_PCM_S16BE_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s16be_planar", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16-bit big-endian planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S16LE_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s16le_planar", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16-bit little-endian planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S24LE_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s24le_planar", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 24-bit little-endian planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S32LE_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s32le_planar", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 32-bit little-endian planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_DVD, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_dvd", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 20|24-bit big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_F32BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_f32be", - .long_name = NULL_IF_CONFIG_SMALL("PCM 32-bit floating point big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_F32LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_f32le", - .long_name = NULL_IF_CONFIG_SMALL("PCM 32-bit floating point little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_F64BE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_f64be", - .long_name = NULL_IF_CONFIG_SMALL("PCM 64-bit floating point big-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_F64LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_f64le", - .long_name = NULL_IF_CONFIG_SMALL("PCM 64-bit floating point little-endian"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_BLURAY, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_bluray", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 16|20|24-bit big-endian for Blu-ray media"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_LXF, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_lxf", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 20-bit little-endian planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_S302M, - .type = AVMEDIA_TYPE_AUDIO, - .name = "s302m", - .long_name = NULL_IF_CONFIG_SMALL("SMPTE 302M"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_PCM_S8_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "pcm_s8_planar", - .long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - - /* various ADPCM codecs */ - { - .id = AV_CODEC_ID_ADPCM_IMA_QT, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_qt", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA QuickTime"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_WAV, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_wav", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA WAV"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_DK3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_dk3", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Duck DK3"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_DK4, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_dk4", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Duck DK4"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_WS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_ws", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Westwood"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_SMJPEG, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_smjpeg", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Loki SDL MJPEG"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_MS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ms", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Microsoft"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_4XM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_4xm", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM 4X Movie"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_XA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_xa", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM CDROM XA"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_ADX, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_adx", - .long_name = NULL_IF_CONFIG_SMALL("SEGA CRI ADX ADPCM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_G726, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_g726", - .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_CT, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ct", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Creative Technology"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_SWF, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_swf", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Shockwave Flash"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_YAMAHA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_yamaha", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Yamaha"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_SBPRO_4, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_sbpro_4", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Sound Blaster Pro 4-bit"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_SBPRO_3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_sbpro_3", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Sound Blaster Pro 2.6-bit"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_SBPRO_2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_sbpro_2", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Sound Blaster Pro 2-bit"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_THP, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_thp", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Nintendo THP"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_THP_LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_thp_le", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Nintendo THP (Little-Endian)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_AMV, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_amv", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA AMV"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA_R1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea_r1", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts R1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA_R3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea_r3", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts R3"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA_R2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea_r2", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts R2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_EA_SEAD, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_ea_sead", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Electronic Arts SEAD"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_EA_EACS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_ea_eacs", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Electronic Arts EACS"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA_XAS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea_xas", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts XAS"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_EA_MAXIS_XA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ea_maxis_xa", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Electronic Arts Maxis CDROM XA"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_ISS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_iss", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Funcom ISS"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_G722, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_g722", - .long_name = NULL_IF_CONFIG_SMALL("G.722 ADPCM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_APC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_apc", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA CRYO APC"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_AFC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_afc", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Nintendo Gamecube AFC"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_OKI, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_oki", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Dialogic OKI"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_DTK, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_dtk", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Nintendo Gamecube DTK"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_IMA_RAD, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_ima_rad", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Radical"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_G726LE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_g726le", - .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM little-endian"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_VIMA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_vima", - .long_name = NULL_IF_CONFIG_SMALL("LucasArts VIMA audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_PSX, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_psx", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Playstation"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ADPCM_AICA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "adpcm_aica", - .long_name = NULL_IF_CONFIG_SMALL("ADPCM Yamaha AICA"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* AMR */ - { - .id = AV_CODEC_ID_AMR_NB, - .type = AVMEDIA_TYPE_AUDIO, - .name = "amr_nb", - .long_name = NULL_IF_CONFIG_SMALL("AMR-NB (Adaptive Multi-Rate NarrowBand)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AMR_WB, - .type = AVMEDIA_TYPE_AUDIO, - .name = "amr_wb", - .long_name = NULL_IF_CONFIG_SMALL("AMR-WB (Adaptive Multi-Rate WideBand)"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* RealAudio codecs*/ - { - .id = AV_CODEC_ID_RA_144, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ra_144", - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 1.0 (14.4K)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_RA_288, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ra_288", - .long_name = NULL_IF_CONFIG_SMALL("RealAudio 2.0 (28.8K)"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* various DPCM codecs */ - { - .id = AV_CODEC_ID_ROQ_DPCM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "roq_dpcm", - .long_name = NULL_IF_CONFIG_SMALL("DPCM id RoQ"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_INTERPLAY_DPCM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "interplay_dpcm", - .long_name = NULL_IF_CONFIG_SMALL("DPCM Interplay"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XAN_DPCM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "xan_dpcm", - .long_name = NULL_IF_CONFIG_SMALL("DPCM Xan"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SOL_DPCM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "sol_dpcm", - .long_name = NULL_IF_CONFIG_SMALL("DPCM Sol"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SDX2_DPCM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "sdx2_dpcm", - .long_name = NULL_IF_CONFIG_SMALL("DPCM Squareroot-Delta-Exact"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* audio codecs */ - { - .id = AV_CODEC_ID_MP2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp2", - .long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MP3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp3", - .long_name = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AAC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "aac", - .long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"), - .props = AV_CODEC_PROP_LOSSY, - .profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles), - }, - { - .id = AV_CODEC_ID_AC3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ac3", - .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DTS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dts", - .long_name = NULL_IF_CONFIG_SMALL("DCA (DTS Coherent Acoustics)"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, - .profiles = NULL_IF_CONFIG_SMALL(ff_dca_profiles), - }, - { - .id = AV_CODEC_ID_VORBIS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "vorbis", - .long_name = NULL_IF_CONFIG_SMALL("Vorbis"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DVAUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dvaudio", - .long_name = NULL_IF_CONFIG_SMALL("DV audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMAV1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wmav1", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMAV2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wmav2", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MACE3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mace3", - .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 3:1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MACE6, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mace6", - .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_VMDAUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "vmdaudio", - .long_name = NULL_IF_CONFIG_SMALL("Sierra VMD audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FLAC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "flac", - .long_name = NULL_IF_CONFIG_SMALL("FLAC (Free Lossless Audio Codec)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MP3ADU, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp3adu", - .long_name = NULL_IF_CONFIG_SMALL("ADU (Application Data Unit) MP3 (MPEG audio layer 3)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MP3ON4, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp3on4", - .long_name = NULL_IF_CONFIG_SMALL("MP3onMP4"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SHORTEN, - .type = AVMEDIA_TYPE_AUDIO, - .name = "shorten", - .long_name = NULL_IF_CONFIG_SMALL("Shorten"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ALAC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "alac", - .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_WESTWOOD_SND1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "westwood_snd1", - .long_name = NULL_IF_CONFIG_SMALL("Westwood Audio (SND1)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_GSM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "gsm", - .long_name = NULL_IF_CONFIG_SMALL("GSM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_QDM2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "qdm2", - .long_name = NULL_IF_CONFIG_SMALL("QDesign Music Codec 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_COOK, - .type = AVMEDIA_TYPE_AUDIO, - .name = "cook", - .long_name = NULL_IF_CONFIG_SMALL("Cook / Cooker / Gecko (RealAudio G2)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TRUESPEECH, - .type = AVMEDIA_TYPE_AUDIO, - .name = "truespeech", - .long_name = NULL_IF_CONFIG_SMALL("DSP Group TrueSpeech"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TTA, - .type = AVMEDIA_TYPE_AUDIO, - .name = "tta", - .long_name = NULL_IF_CONFIG_SMALL("TTA (True Audio)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_SMACKAUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "smackaudio", - .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_QCELP, - .type = AVMEDIA_TYPE_AUDIO, - .name = "qcelp", - .long_name = NULL_IF_CONFIG_SMALL("QCELP / PureVoice"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WAVPACK, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wavpack", - .long_name = NULL_IF_CONFIG_SMALL("WavPack"), - .props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_DSICINAUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dsicinaudio", - .long_name = NULL_IF_CONFIG_SMALL("Delphine Software International CIN audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_IMC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "imc", - .long_name = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MUSEPACK7, - .type = AVMEDIA_TYPE_AUDIO, - .name = "musepack7", - .long_name = NULL_IF_CONFIG_SMALL("Musepack SV7"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MLP, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mlp", - .long_name = NULL_IF_CONFIG_SMALL("MLP (Meridian Lossless Packing)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_GSM_MS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "gsm_ms", - .long_name = NULL_IF_CONFIG_SMALL("GSM Microsoft variant"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ATRAC3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "atrac3", - .long_name = NULL_IF_CONFIG_SMALL("ATRAC3 (Adaptive TRansform Acoustic Coding 3)"), - .props = AV_CODEC_PROP_LOSSY, - }, -#if FF_API_VOXWARE - { - .id = AV_CODEC_ID_VOXWARE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "voxware", - .long_name = NULL_IF_CONFIG_SMALL("Voxware RT29 Metasound"), - .props = AV_CODEC_PROP_LOSSY, - }, -#endif - { - .id = AV_CODEC_ID_APE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ape", - .long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_NELLYMOSER, - .type = AVMEDIA_TYPE_AUDIO, - .name = "nellymoser", - .long_name = NULL_IF_CONFIG_SMALL("Nellymoser Asao"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MUSEPACK8, - .type = AVMEDIA_TYPE_AUDIO, - .name = "musepack8", - .long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SPEEX, - .type = AVMEDIA_TYPE_AUDIO, - .name = "speex", - .long_name = NULL_IF_CONFIG_SMALL("Speex"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMAVOICE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wmavoice", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMAPRO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wmapro", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio 9 Professional"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_WMALOSSLESS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wmalossless", - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Lossless"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ATRAC3P, - .type = AVMEDIA_TYPE_AUDIO, - .name = "atrac3p", - .long_name = NULL_IF_CONFIG_SMALL("ATRAC3+ (Adaptive TRansform Acoustic Coding 3+)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_EAC3, - .type = AVMEDIA_TYPE_AUDIO, - .name = "eac3", - .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SIPR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "sipr", - .long_name = NULL_IF_CONFIG_SMALL("RealAudio SIPR / ACELP.NET"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_MP1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp1", - .long_name = NULL_IF_CONFIG_SMALL("MP1 (MPEG audio layer 1)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TWINVQ, - .type = AVMEDIA_TYPE_AUDIO, - .name = "twinvq", - .long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TRUEHD, - .type = AVMEDIA_TYPE_AUDIO, - .name = "truehd", - .long_name = NULL_IF_CONFIG_SMALL("TrueHD"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_MP4ALS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "mp4als", - .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_ATRAC1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "atrac1", - .long_name = NULL_IF_CONFIG_SMALL("ATRAC1 (Adaptive TRansform Acoustic Coding)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BINKAUDIO_RDFT, - .type = AVMEDIA_TYPE_AUDIO, - .name = "binkaudio_rdft", - .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BINKAUDIO_DCT, - .type = AVMEDIA_TYPE_AUDIO, - .name = "binkaudio_dct", - .long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_AAC_LATM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "aac_latm", - .long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Coding LATM syntax)"), - .props = AV_CODEC_PROP_LOSSY, - .profiles = NULL_IF_CONFIG_SMALL(ff_aac_profiles), - }, - { - .id = AV_CODEC_ID_QDMC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "qdmc", - .long_name = NULL_IF_CONFIG_SMALL("QDesign Music"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_CELT, - .type = AVMEDIA_TYPE_AUDIO, - .name = "celt", - .long_name = NULL_IF_CONFIG_SMALL("Constrained Energy Lapped Transform (CELT)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_G723_1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "g723_1", - .long_name = NULL_IF_CONFIG_SMALL("G.723.1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSS_SP, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dss_sp", - .long_name = NULL_IF_CONFIG_SMALL("Digital Speech Standard - Standard Play mode (DSS SP)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_G729, - .type = AVMEDIA_TYPE_AUDIO, - .name = "g729", - .long_name = NULL_IF_CONFIG_SMALL("G.729"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_8SVX_EXP, - .type = AVMEDIA_TYPE_AUDIO, - .name = "8svx_exp", - .long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_8SVX_FIB, - .type = AVMEDIA_TYPE_AUDIO, - .name = "8svx_fib", - .long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_BMV_AUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "bmv_audio", - .long_name = NULL_IF_CONFIG_SMALL("Discworld II BMV audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_RALF, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ralf", - .long_name = NULL_IF_CONFIG_SMALL("RealAudio Lossless"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_IAC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "iac", - .long_name = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ILBC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "ilbc", - .long_name = NULL_IF_CONFIG_SMALL("iLBC (Internet Low Bitrate Codec)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_FFWAVESYNTH, - .type = AVMEDIA_TYPE_AUDIO, - .name = "wavesynth", - .long_name = NULL_IF_CONFIG_SMALL("Wave synthesis pseudo-codec"), - }, - { - .id = AV_CODEC_ID_SONIC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "sonic", - .long_name = NULL_IF_CONFIG_SMALL("Sonic"), - }, - { - .id = AV_CODEC_ID_SONIC_LS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "sonicls", - .long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"), - }, - { - .id = AV_CODEC_ID_OPUS, - .type = AVMEDIA_TYPE_AUDIO, - .name = "opus", - .long_name = NULL_IF_CONFIG_SMALL("Opus (Opus Interactive Audio Codec)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_COMFORT_NOISE, - .type = AVMEDIA_TYPE_AUDIO, - .name = "comfortnoise", - .long_name = NULL_IF_CONFIG_SMALL("RFC 3389 Comfort Noise"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_TAK, - .type = AVMEDIA_TYPE_AUDIO, - .name = "tak", - .long_name = NULL_IF_CONFIG_SMALL("TAK (Tom's lossless Audio Kompressor)"), - .props = AV_CODEC_PROP_LOSSLESS, - }, - { - .id = AV_CODEC_ID_METASOUND, - .type = AVMEDIA_TYPE_AUDIO, - .name = "metasound", - .long_name = NULL_IF_CONFIG_SMALL("Voxware MetaSound"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_PAF_AUDIO, - .type = AVMEDIA_TYPE_AUDIO, - .name = "paf_audio", - .long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_ON2AVC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "avc", - .long_name = NULL_IF_CONFIG_SMALL("On2 Audio for Video Codec"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_EVRC, - .type = AVMEDIA_TYPE_AUDIO, - .name = "evrc", - .long_name = NULL_IF_CONFIG_SMALL("EVRC (Enhanced Variable Rate Codec)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_SMV, - .type = AVMEDIA_TYPE_AUDIO, - .name = "smv", - .long_name = NULL_IF_CONFIG_SMALL("SMV (Selectable Mode Vocoder)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_4GV, - .type = AVMEDIA_TYPE_AUDIO, - .name = "4gv", - .long_name = NULL_IF_CONFIG_SMALL("4GV (Fourth Generation Vocoder)"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSD_LSBF, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dsd_lsbf", - .long_name = NULL_IF_CONFIG_SMALL("DSD (Direct Stream Digital), least significant bit first"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSD_MSBF, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dsd_msbf", - .long_name = NULL_IF_CONFIG_SMALL("DSD (Direct Stream Digital), most significant bit first"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSD_LSBF_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dsd_lsbf_planar", - .long_name = NULL_IF_CONFIG_SMALL("DSD (Direct Stream Digital), least significant bit first, planar"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_DSD_MSBF_PLANAR, - .type = AVMEDIA_TYPE_AUDIO, - .name = "dsd_msbf_planar", - .long_name = NULL_IF_CONFIG_SMALL("DSD (Direct Stream Digital), most significant bit first, planar"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_INTERPLAY_ACM, - .type = AVMEDIA_TYPE_AUDIO, - .name = "interplayacm", - .long_name = NULL_IF_CONFIG_SMALL("Interplay ACM"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XMA1, - .type = AVMEDIA_TYPE_AUDIO, - .name = "xma1", - .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 1"), - .props = AV_CODEC_PROP_LOSSY, - }, - { - .id = AV_CODEC_ID_XMA2, - .type = AVMEDIA_TYPE_AUDIO, - .name = "xma2", - .long_name = NULL_IF_CONFIG_SMALL("Xbox Media Audio 2"), - .props = AV_CODEC_PROP_LOSSY, - }, - - /* subtitle codecs */ - { - .id = AV_CODEC_ID_DVD_SUBTITLE, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "dvd_subtitle", - .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), - .props = AV_CODEC_PROP_BITMAP_SUB, - }, - { - .id = AV_CODEC_ID_DVB_SUBTITLE, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "dvb_subtitle", - .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), - .props = AV_CODEC_PROP_BITMAP_SUB, - }, - { - .id = AV_CODEC_ID_TEXT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "text", - .long_name = NULL_IF_CONFIG_SMALL("raw UTF-8 text"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_XSUB, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "xsub", - .long_name = NULL_IF_CONFIG_SMALL("XSUB"), - .props = AV_CODEC_PROP_BITMAP_SUB, - }, - { - .id = AV_CODEC_ID_ASS, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "ass", - .long_name = NULL_IF_CONFIG_SMALL("ASS (Advanced SSA) subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_SSA, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "ssa", - .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_MOV_TEXT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "mov_text", - .long_name = NULL_IF_CONFIG_SMALL("MOV text"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_HDMV_PGS_SUBTITLE, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "hdmv_pgs_subtitle", - .long_name = NULL_IF_CONFIG_SMALL("HDMV Presentation Graphic Stream subtitles"), - .props = AV_CODEC_PROP_BITMAP_SUB, - }, - { - .id = AV_CODEC_ID_DVB_TELETEXT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "dvb_teletext", - .long_name = NULL_IF_CONFIG_SMALL("DVB teletext"), - }, - { - .id = AV_CODEC_ID_SRT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "srt", - .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle with embedded timing"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_SUBRIP, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "subrip", - .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_MICRODVD, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "microdvd", - .long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_MPL2, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "mpl2", - .long_name = NULL_IF_CONFIG_SMALL("MPL2 subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_EIA_608, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "eia_608", - .long_name = NULL_IF_CONFIG_SMALL("EIA-608 closed captions"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_JACOSUB, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "jacosub", - .long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_PJS, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "pjs", - .long_name = NULL_IF_CONFIG_SMALL("PJS (Phoenix Japanimation Society) subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_SAMI, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "sami", - .long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_REALTEXT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "realtext", - .long_name = NULL_IF_CONFIG_SMALL("RealText subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_STL, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "stl", - .long_name = NULL_IF_CONFIG_SMALL("Spruce subtitle format"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_SUBVIEWER1, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "subviewer1", - .long_name = NULL_IF_CONFIG_SMALL("SubViewer v1 subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_SUBVIEWER, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "subviewer", - .long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_VPLAYER, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "vplayer", - .long_name = NULL_IF_CONFIG_SMALL("VPlayer subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_WEBVTT, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "webvtt", - .long_name = NULL_IF_CONFIG_SMALL("WebVTT subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - { - .id = AV_CODEC_ID_HDMV_TEXT_SUBTITLE, - .type = AVMEDIA_TYPE_SUBTITLE, - .name = "hdmv_text_subtitle", - .long_name = NULL_IF_CONFIG_SMALL("HDMV Text subtitle"), - .props = AV_CODEC_PROP_TEXT_SUB, - }, - - /* other kind of codecs and pseudo-codecs */ - { - .id = AV_CODEC_ID_TTF, - .type = AVMEDIA_TYPE_DATA, - .name = "ttf", - .long_name = NULL_IF_CONFIG_SMALL("TrueType font"), - .mime_types= MT("application/x-truetype-font", "application/x-font"), - }, - { - .id = AV_CODEC_ID_BINTEXT, - .type = AVMEDIA_TYPE_VIDEO, - .name = "bintext", - .long_name = NULL_IF_CONFIG_SMALL("Binary text"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_XBIN, - .type = AVMEDIA_TYPE_VIDEO, - .name = "xbin", - .long_name = NULL_IF_CONFIG_SMALL("eXtended BINary text"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_IDF, - .type = AVMEDIA_TYPE_VIDEO, - .name = "idf", - .long_name = NULL_IF_CONFIG_SMALL("iCEDraw text"), - .props = AV_CODEC_PROP_INTRA_ONLY, - }, - { - .id = AV_CODEC_ID_OTF, - .type = AVMEDIA_TYPE_DATA, - .name = "otf", - .long_name = NULL_IF_CONFIG_SMALL("OpenType font"), - .mime_types= MT("application/vnd.ms-opentype"), - }, - { - .id = AV_CODEC_ID_SMPTE_KLV, - .type = AVMEDIA_TYPE_DATA, - .name = "klv", - .long_name = NULL_IF_CONFIG_SMALL("SMPTE 336M Key-Length-Value (KLV) metadata"), - }, - { - .id = AV_CODEC_ID_DVD_NAV, - .type = AVMEDIA_TYPE_DATA, - .name = "dvd_nav_packet", - .long_name = NULL_IF_CONFIG_SMALL("DVD Nav packet"), - }, - { - .id = AV_CODEC_ID_TIMED_ID3, - .type = AVMEDIA_TYPE_DATA, - .name = "timed_id3", - .long_name = NULL_IF_CONFIG_SMALL("timed ID3 metadata"), - }, - { - .id = AV_CODEC_ID_BIN_DATA, - .type = AVMEDIA_TYPE_DATA, - .name = "bin_data", - .long_name = NULL_IF_CONFIG_SMALL("binary data"), - .mime_types= MT("application/octet-stream"), - }, - - /* deprecated codec ids */ -}; - -const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id) -{ - int i; - - for (i = 0; i < FF_ARRAY_ELEMS(codec_descriptors); i++) - if (codec_descriptors[i].id == id) - return &codec_descriptors[i]; - return NULL; -} - -const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev) -{ - if (!prev) - return &codec_descriptors[0]; - if (prev - codec_descriptors < FF_ARRAY_ELEMS(codec_descriptors) - 1) - return prev + 1; - return NULL; -} - -const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name) -{ - const AVCodecDescriptor *desc = NULL; - - while ((desc = avcodec_descriptor_next(desc))) - if (!strcmp(desc->name, name)) - return desc; - return NULL; -} - -enum AVMediaType avcodec_get_type(enum AVCodecID codec_id) -{ - const AVCodecDescriptor *desc = avcodec_descriptor_get(codec_id); - return desc ? desc->type : AVMEDIA_TYPE_UNKNOWN; -} diff --git a/ext/at3_standalone/compat.h b/ext/at3_standalone/compat.h index e60185e9a3..8140d5ae16 100644 --- a/ext/at3_standalone/compat.h +++ b/ext/at3_standalone/compat.h @@ -25,4 +25,7 @@ #define CONFIG_MDCT 1 #define CONFIG_FFT 1 +#pragma warning(disable:4305) +#pragma warning(disable:4244) + int ff_fast_malloc(void *ptr, unsigned int *size, size_t min_size, int zero_realloc); diff --git a/ext/at3_standalone/dict.c b/ext/at3_standalone/dict.c index d3133dabe3..e71af2a7cc 100644 --- a/ext/at3_standalone/dict.c +++ b/ext/at3_standalone/dict.c @@ -221,117 +221,3 @@ int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags) return 0; } - -#ifdef TEST -static void print_dict(const AVDictionary *m) -{ - AVDictionaryEntry *t = NULL; - while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX))) - printf("%s %s ", t->key, t->value); - printf("\n"); -} - -static void test_separators(const AVDictionary *m, const char pair, const char val) -{ - AVDictionary *dict = NULL; - char pairs[] = {pair , '\0'}; - char vals[] = {val, '\0'}; - - char *buffer = NULL; - av_dict_copy(&dict, m, 0); - print_dict(dict); - av_dict_get_string(dict, &buffer, val, pair); - printf("%s\n", buffer); - av_dict_free(&dict); - av_dict_parse_string(&dict, buffer, vals, pairs, 0); - av_freep(&buffer); - print_dict(dict); - av_dict_free(&dict); -} - -int main(void) -{ - AVDictionary *dict = NULL; - AVDictionaryEntry *e; - char *buffer = NULL; - - printf("Testing av_dict_get_string() and av_dict_parse_string()\n"); - av_dict_get_string(dict, &buffer, '=', ','); - printf("%s\n", buffer); - av_freep(&buffer); - av_dict_set(&dict, "aaa", "aaa", 0); - av_dict_set(&dict, "b,b", "bbb", 0); - av_dict_set(&dict, "c=c", "ccc", 0); - av_dict_set(&dict, "ddd", "d,d", 0); - av_dict_set(&dict, "eee", "e=e", 0); - av_dict_set(&dict, "f,f", "f=f", 0); - av_dict_set(&dict, "g=g", "g,g", 0); - test_separators(dict, ',', '='); - av_dict_free(&dict); - av_dict_set(&dict, "aaa", "aaa", 0); - av_dict_set(&dict, "bbb", "bbb", 0); - av_dict_set(&dict, "ccc", "ccc", 0); - av_dict_set(&dict, "\\,=\'\"", "\\,=\'\"", 0); - test_separators(dict, '"', '='); - test_separators(dict, '\'', '='); - test_separators(dict, ',', '"'); - test_separators(dict, ',', '\''); - test_separators(dict, '\'', '"'); - test_separators(dict, '"', '\''); - av_dict_free(&dict); - - printf("\nTesting av_dict_set()\n"); - av_dict_set(&dict, "a", "a", 0); - av_dict_set(&dict, "b", av_strdup("b"), AV_DICT_DONT_STRDUP_VAL); - av_dict_set(&dict, av_strdup("c"), "c", AV_DICT_DONT_STRDUP_KEY); - av_dict_set(&dict, av_strdup("d"), av_strdup("d"), AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); - av_dict_set(&dict, "e", "e", AV_DICT_DONT_OVERWRITE); - av_dict_set(&dict, "e", "f", AV_DICT_DONT_OVERWRITE); - av_dict_set(&dict, "f", "f", 0); - av_dict_set(&dict, "f", NULL, 0); - av_dict_set(&dict, "ff", "f", 0); - av_dict_set(&dict, "ff", "f", AV_DICT_APPEND); - e = NULL; - while ((e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX))) - printf("%s %s\n", e->key, e->value); - av_dict_free(&dict); - - av_dict_set(&dict, NULL, "a", 0); - av_dict_set(&dict, NULL, "b", 0); - av_dict_get(dict, NULL, NULL, 0); - e = NULL; - while ((e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX))) - printf("'%s' '%s'\n", e->key, e->value); - av_dict_free(&dict); - - - //valgrind sensible test - printf("\nTesting av_dict_set_int()\n"); - av_dict_set_int(&dict, "1", 1, AV_DICT_DONT_STRDUP_VAL); - av_dict_set_int(&dict, av_strdup("2"), 2, AV_DICT_DONT_STRDUP_KEY); - av_dict_set_int(&dict, av_strdup("3"), 3, AV_DICT_DONT_STRDUP_KEY | AV_DICT_DONT_STRDUP_VAL); - av_dict_set_int(&dict, "4", 4, 0); - av_dict_set_int(&dict, "5", 5, AV_DICT_DONT_OVERWRITE); - av_dict_set_int(&dict, "5", 6, AV_DICT_DONT_OVERWRITE); - av_dict_set_int(&dict, "12", 1, 0); - av_dict_set_int(&dict, "12", 2, AV_DICT_APPEND); - e = NULL; - while ((e = av_dict_get(dict, "", e, AV_DICT_IGNORE_SUFFIX))) - printf("%s %s\n", e->key, e->value); - av_dict_free(&dict); - - //valgrind sensible test - printf("\nTesting av_dict_set() with existing AVDictionaryEntry.key as key\n"); - av_dict_set(&dict, "key", "old", 0); - e = av_dict_get(dict, "key", NULL, 0); - av_dict_set(&dict, e->key, "new val OK", 0); - e = av_dict_get(dict, "key", NULL, 0); - printf("%s\n", e->value); - av_dict_set(&dict, e->key, e->value, 0); - e = av_dict_get(dict, "key", NULL, 0); - printf("%s\n", e->value); - av_dict_free(&dict); - - return 0; -} -#endif diff --git a/ext/at3_standalone/float_dsp.c b/ext/at3_standalone/float_dsp.c index 2a2d36d6c3..e169762405 100644 --- a/ext/at3_standalone/float_dsp.c +++ b/ext/at3_standalone/float_dsp.c @@ -146,321 +146,3 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact) */ return fdsp; } - - -#ifdef TEST - -#include -#include -#include -#include -#include -#if HAVE_UNISTD_H -#include /* for getopt */ -#endif -#if !HAVE_GETOPT -#include "compat/getopt.c" -#endif - -#include "common.h" -#include "cpu.h" -#include "internal.h" -#include "lfg.h" -#include "log.h" -#include "random_seed.h" - -#define LEN 240 - -static void fill_float_array(AVLFG *lfg, float *a, int len) -{ - int i; - double bmg[2], stddev = 10.0, mean = 0.0; - - for (i = 0; i < len; i += 2) { - av_bmg_get(lfg, bmg); - a[i] = bmg[0] * stddev + mean; - a[i + 1] = bmg[1] * stddev + mean; - } -} -static int compare_floats(const float *a, const float *b, int len, - float max_diff) -{ - int i; - for (i = 0; i < len; i++) { - if (fabsf(a[i] - b[i]) > max_diff) { - av_log(NULL, AV_LOG_ERROR, "%d: %- .12f - %- .12f = % .12g\n", - i, a[i], b[i], a[i] - b[i]); - return -1; - } - } - return 0; -} - -static void fill_double_array(AVLFG *lfg, double *a, int len) -{ - int i; - double bmg[2], stddev = 10.0, mean = 0.0; - - for (i = 0; i < len; i += 2) { - av_bmg_get(lfg, bmg); - a[i] = bmg[0] * stddev + mean; - a[i + 1] = bmg[1] * stddev + mean; - } -} - -static int compare_doubles(const double *a, const double *b, int len, - double max_diff) -{ - int i; - - for (i = 0; i < len; i++) { - if (fabs(a[i] - b[i]) > max_diff) { - av_log(NULL, AV_LOG_ERROR, "%d: %- .12f - %- .12f = % .12g\n", - i, a[i], b[i], a[i] - b[i]); - return -1; - } - } - return 0; -} - -static int test_vector_fmul(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - cdsp->vector_fmul(cdst, v1, v2, LEN); - fdsp->vector_fmul(odst, v1, v2, LEN); - - if (ret = compare_floats(cdst, odst, LEN, FLT_EPSILON)) - av_log(NULL, AV_LOG_ERROR, "vector_fmul failed\n"); - - return ret; -} - -#define ARBITRARY_FMAC_SCALAR_CONST 0.005 -static int test_vector_fmac_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *src0, float scale) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - memcpy(cdst, v1, LEN * sizeof(*v1)); - memcpy(odst, v1, LEN * sizeof(*v1)); - - cdsp->vector_fmac_scalar(cdst, src0, scale, LEN); - fdsp->vector_fmac_scalar(odst, src0, scale, LEN); - - if (ret = compare_floats(cdst, odst, LEN, ARBITRARY_FMAC_SCALAR_CONST)) - av_log(NULL, AV_LOG_ERROR, "vector_fmac_scalar failed\n"); - - return ret; -} - -static int test_vector_fmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, float scale) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - cdsp->vector_fmul_scalar(cdst, v1, scale, LEN); - fdsp->vector_fmul_scalar(odst, v1, scale, LEN); - - if (ret = compare_floats(cdst, odst, LEN, FLT_EPSILON)) - av_log(NULL, AV_LOG_ERROR, "vector_fmul_scalar failed\n"); - - return ret; -} - -static int test_vector_dmul_scalar(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const double *v1, double scale) -{ - LOCAL_ALIGNED(32, double, cdst, [LEN]); - LOCAL_ALIGNED(32, double, odst, [LEN]); - int ret; - - cdsp->vector_dmul_scalar(cdst, v1, scale, LEN); - fdsp->vector_dmul_scalar(odst, v1, scale, LEN); - - if (ret = compare_doubles(cdst, odst, LEN, DBL_EPSILON)) - av_log(NULL, AV_LOG_ERROR, "vector_dmul_scalar failed\n"); - - return ret; -} - -#define ARBITRARY_FMUL_WINDOW_CONST 0.008 -static int test_vector_fmul_window(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2, const float *v3) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - cdsp->vector_fmul_window(cdst, v1, v2, v3, LEN / 2); - fdsp->vector_fmul_window(odst, v1, v2, v3, LEN / 2); - - if (ret = compare_floats(cdst, odst, LEN, ARBITRARY_FMUL_WINDOW_CONST)) - av_log(NULL, AV_LOG_ERROR, "vector_fmul_window failed\n"); - - return ret; -} - -#define ARBITRARY_FMUL_ADD_CONST 0.005 -static int test_vector_fmul_add(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2, const float *v3) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - cdsp->vector_fmul_add(cdst, v1, v2, v3, LEN); - fdsp->vector_fmul_add(odst, v1, v2, v3, LEN); - - if (ret = compare_floats(cdst, odst, LEN, ARBITRARY_FMUL_ADD_CONST)) - av_log(NULL, AV_LOG_ERROR, "vector_fmul_add failed\n"); - - return ret; -} - -static int test_vector_fmul_reverse(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2) -{ - LOCAL_ALIGNED(32, float, cdst, [LEN]); - LOCAL_ALIGNED(32, float, odst, [LEN]); - int ret; - - cdsp->vector_fmul_reverse(cdst, v1, v2, LEN); - fdsp->vector_fmul_reverse(odst, v1, v2, LEN); - - if (ret = compare_floats(cdst, odst, LEN, FLT_EPSILON)) - av_log(NULL, AV_LOG_ERROR, "vector_fmul_reverse failed\n"); - - return ret; -} - -static int test_butterflies_float(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2) -{ - LOCAL_ALIGNED(32, float, cv1, [LEN]); - LOCAL_ALIGNED(32, float, cv2, [LEN]); - LOCAL_ALIGNED(32, float, ov1, [LEN]); - LOCAL_ALIGNED(32, float, ov2, [LEN]); - int ret; - - memcpy(cv1, v1, LEN * sizeof(*v1)); - memcpy(cv2, v2, LEN * sizeof(*v2)); - memcpy(ov1, v1, LEN * sizeof(*v1)); - memcpy(ov2, v2, LEN * sizeof(*v2)); - - cdsp->butterflies_float(cv1, cv2, LEN); - fdsp->butterflies_float(ov1, ov2, LEN); - - if ((ret = compare_floats(cv1, ov1, LEN, FLT_EPSILON)) || - (ret = compare_floats(cv2, ov2, LEN, FLT_EPSILON))) - av_log(NULL, AV_LOG_ERROR, "butterflies_float failed\n"); - - return ret; -} - -#define ARBITRARY_SCALARPRODUCT_CONST 0.2 -static int test_scalarproduct_float(AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, - const float *v1, const float *v2) -{ - float cprod, oprod; - int ret; - - cprod = cdsp->scalarproduct_float(v1, v2, LEN); - oprod = fdsp->scalarproduct_float(v1, v2, LEN); - - if (ret = compare_floats(&cprod, &oprod, 1, ARBITRARY_SCALARPRODUCT_CONST)) - av_log(NULL, AV_LOG_ERROR, "scalarproduct_float failed\n"); - - return ret; -} - -int main(int argc, char **argv) -{ - int ret = 0, seeded = 0; - uint32_t seed; - AVFloatDSPContext *fdsp, *cdsp; - AVLFG lfg; - - LOCAL_ALIGNED(32, float, src0, [LEN]); - LOCAL_ALIGNED(32, float, src1, [LEN]); - LOCAL_ALIGNED(32, float, src2, [LEN]); - LOCAL_ALIGNED(32, double, dbl_src0, [LEN]); - LOCAL_ALIGNED(32, double, dbl_src1, [LEN]); - - for (;;) { - int arg = getopt(argc, argv, "s:c:"); - if (arg == -1) - break; - switch (arg) { - case 's': - seed = strtoul(optarg, NULL, 10); - seeded = 1; - break; - case 'c': - { - int cpuflags = av_get_cpu_flags(); - - if (av_parse_cpu_caps(&cpuflags, optarg) < 0) - return 1; - - av_force_cpu_flags(cpuflags); - break; - } - } - } - if (!seeded) - seed = av_get_random_seed(); - - av_log(NULL, AV_LOG_INFO, "float_dsp-test: %s %u\n", seeded ? "seed" : "random seed", seed); - - fdsp = avpriv_float_dsp_alloc(1); - av_force_cpu_flags(0); - cdsp = avpriv_float_dsp_alloc(1); - - if (!fdsp || !cdsp) { - ret = 1; - goto end; - } - - av_lfg_init(&lfg, seed); - - fill_float_array(&lfg, src0, LEN); - fill_float_array(&lfg, src1, LEN); - fill_float_array(&lfg, src2, LEN); - - fill_double_array(&lfg, dbl_src0, LEN); - fill_double_array(&lfg, dbl_src1, LEN); - - if (test_vector_fmul(fdsp, cdsp, src0, src1)) - ret -= 1 << 0; - if (test_vector_fmac_scalar(fdsp, cdsp, src2, src0, src1[0])) - ret -= 1 << 1; - if (test_vector_fmul_scalar(fdsp, cdsp, src0, src1[0])) - ret -= 1 << 2; - if (test_vector_fmul_window(fdsp, cdsp, src0, src1, src2)) - ret -= 1 << 3; - if (test_vector_fmul_add(fdsp, cdsp, src0, src1, src2)) - ret -= 1 << 4; - if (test_vector_fmul_reverse(fdsp, cdsp, src0, src1)) - ret -= 1 << 5; - if (test_butterflies_float(fdsp, cdsp, src0, src1)) - ret -= 1 << 6; - if (test_scalarproduct_float(fdsp, cdsp, src0, src1)) - ret -= 1 << 7; - if (test_vector_dmul_scalar(fdsp, cdsp, dbl_src0, dbl_src1[0])) - ret -= 1 << 8; - -end: - av_freep(&fdsp); - av_freep(&cdsp); - return ret; -} - -#endif /* TEST */ diff --git a/ext/at3_standalone/frame.c b/ext/at3_standalone/frame.c index 3b51a7da92..61ecfef609 100644 --- a/ext/at3_standalone/frame.c +++ b/ext/at3_standalone/frame.c @@ -18,13 +18,10 @@ */ #include "channel_layout.h" -// #include "avassert.h" #include "buffer.h" #include "common.h" #include "dict.h" #include "frame.h" -//#include "imgutils.h" -#include "pixdesc.h" #include "util_internal.h" #include "mem.h" #include "samplefmt.h" @@ -35,65 +32,14 @@ MAKE_ACCESSORS(AVFrame, frame, int64_t, pkt_pos) MAKE_ACCESSORS(AVFrame, frame, int64_t, channel_layout) MAKE_ACCESSORS(AVFrame, frame, int, channels) MAKE_ACCESSORS(AVFrame, frame, int, sample_rate) -MAKE_ACCESSORS(AVFrame, frame, AVDictionary *, metadata) MAKE_ACCESSORS(AVFrame, frame, int, decode_error_flags) MAKE_ACCESSORS(AVFrame, frame, int, pkt_size) -MAKE_ACCESSORS(AVFrame, frame, enum AVColorSpace, colorspace) -MAKE_ACCESSORS(AVFrame, frame, enum AVColorRange, color_range) #define CHECK_CHANNELS_CONSISTENCY(frame) \ av_assert2(!(frame)->channel_layout || \ (frame)->channels == \ av_get_channel_layout_nb_channels((frame)->channel_layout)) -AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame) {return &frame->metadata;}; - -#if FF_API_FRAME_QP -int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int qp_type) -{ - av_buffer_unref(&f->qp_table_buf); - - f->qp_table_buf = buf; - -FF_DISABLE_DEPRECATION_WARNINGS - f->qscale_table = buf->data; - f->qstride = stride; - f->qscale_type = qp_type; -FF_ENABLE_DEPRECATION_WARNINGS - - return 0; -} - -int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type) -{ -FF_DISABLE_DEPRECATION_WARNINGS - *stride = f->qstride; - *type = f->qscale_type; -FF_ENABLE_DEPRECATION_WARNINGS - - if (!f->qp_table_buf) - return NULL; - - return f->qp_table_buf->data; -} -#endif - -const char *av_get_colorspace_name(enum AVColorSpace val) -{ - static const char * const name[] = { - [AVCOL_SPC_RGB] = "GBR", - [AVCOL_SPC_BT709] = "bt709", - [AVCOL_SPC_FCC] = "fcc", - [AVCOL_SPC_BT470BG] = "bt470bg", - [AVCOL_SPC_SMPTE170M] = "smpte170m", - [AVCOL_SPC_SMPTE240M] = "smpte240m", - [AVCOL_SPC_YCOCG] = "YCgCo", - }; - if ((unsigned)val >= FF_ARRAY_ELEMS(name)) - return NULL; - return name[val]; -} - static void get_frame_defaults(AVFrame *frame) { if (frame->extended_data != frame->data) @@ -101,43 +47,12 @@ static void get_frame_defaults(AVFrame *frame) memset(frame, 0, sizeof(*frame)); - frame->pts = - frame->pkt_dts = - frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_best_effort_timestamp(frame, AV_NOPTS_VALUE); av_frame_set_pkt_duration (frame, 0); av_frame_set_pkt_pos (frame, -1); av_frame_set_pkt_size (frame, -1); - frame->key_frame = 1; - frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ frame->extended_data = frame->data; - frame->color_primaries = AVCOL_PRI_UNSPECIFIED; - frame->color_trc = AVCOL_TRC_UNSPECIFIED; - frame->colorspace = AVCOL_SPC_UNSPECIFIED; - frame->color_range = AVCOL_RANGE_UNSPECIFIED; - frame->chroma_location = AVCHROMA_LOC_UNSPECIFIED; -} - -static void free_side_data(AVFrameSideData **ptr_sd) -{ - AVFrameSideData *sd = *ptr_sd; - - av_buffer_unref(&sd->buf); - av_dict_free(&sd->metadata); - av_freep(ptr_sd); -} - -static void wipe_side_data(AVFrame *frame) -{ - int i; - - for (i = 0; i < frame->nb_side_data; i++) { - free_side_data(&frame->side_data[i]); - } - frame->nb_side_data = 0; - - av_freep(&frame->side_data); } AVFrame *av_frame_alloc(void) @@ -223,8 +138,6 @@ int av_frame_get_buffer(AVFrame *frame, int align) if (frame->format < 0) return AVERROR(EINVAL); - if (frame->width > 0 && frame->height > 0) - return AVERROR(EINVAL); else if (frame->nb_samples > 0 && (frame->channel_layout || frame->channels > 0)) return get_audio_buffer(frame, align); @@ -233,90 +146,19 @@ int av_frame_get_buffer(AVFrame *frame, int align) static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) { - int i; - - dst->key_frame = src->key_frame; - dst->pict_type = src->pict_type; - dst->sample_aspect_ratio = src->sample_aspect_ratio; - dst->pts = src->pts; - dst->repeat_pict = src->repeat_pict; - dst->interlaced_frame = src->interlaced_frame; - dst->top_field_first = src->top_field_first; - dst->palette_has_changed = src->palette_has_changed; dst->sample_rate = src->sample_rate; - dst->opaque = src->opaque; - dst->pkt_pts = src->pkt_pts; - dst->pkt_dts = src->pkt_dts; dst->pkt_pos = src->pkt_pos; dst->pkt_size = src->pkt_size; dst->pkt_duration = src->pkt_duration; - dst->reordered_opaque = src->reordered_opaque; dst->quality = src->quality; dst->best_effort_timestamp = src->best_effort_timestamp; - dst->coded_picture_number = src->coded_picture_number; - dst->display_picture_number = src->display_picture_number; dst->flags = src->flags; dst->decode_error_flags = src->decode_error_flags; - dst->color_primaries = src->color_primaries; - dst->color_trc = src->color_trc; - dst->colorspace = src->colorspace; - dst->color_range = src->color_range; - dst->chroma_location = src->chroma_location; - - av_dict_copy(&dst->metadata, src->metadata, 0); #if FF_API_ERROR_FRAME FF_DISABLE_DEPRECATION_WARNINGS memcpy(dst->error, src->error, sizeof(dst->error)); FF_ENABLE_DEPRECATION_WARNINGS -#endif - - for (i = 0; i < src->nb_side_data; i++) { - const AVFrameSideData *sd_src = src->side_data[i]; - AVFrameSideData *sd_dst; - if ( sd_src->type == AV_FRAME_DATA_PANSCAN - && (src->width != dst->width || src->height != dst->height)) - continue; - if (force_copy) { - sd_dst = av_frame_new_side_data(dst, sd_src->type, - sd_src->size); - if (!sd_dst) { - wipe_side_data(dst); - return AVERROR(ENOMEM); - } - memcpy(sd_dst->data, sd_src->data, sd_src->size); - } else { - sd_dst = av_frame_new_side_data(dst, sd_src->type, 0); - if (!sd_dst) { - wipe_side_data(dst); - return AVERROR(ENOMEM); - } - sd_dst->buf = av_buffer_ref(sd_src->buf); - if (!sd_dst->buf) { - wipe_side_data(dst); - return AVERROR(ENOMEM); - } - sd_dst->data = sd_dst->buf->data; - sd_dst->size = sd_dst->buf->size; - } - av_dict_copy(&sd_dst->metadata, sd_src->metadata, 0); - } - -#if FF_API_FRAME_QP -FF_DISABLE_DEPRECATION_WARNINGS - dst->qscale_table = NULL; - dst->qstride = 0; - dst->qscale_type = 0; - av_buffer_unref(&dst->qp_table_buf); - if (src->qp_table_buf) { - dst->qp_table_buf = av_buffer_ref(src->qp_table_buf); - if (dst->qp_table_buf) { - dst->qscale_table = dst->qp_table_buf->data; - dst->qstride = src->qstride; - dst->qscale_type = src->qscale_type; - } - } -FF_ENABLE_DEPRECATION_WARNINGS #endif return 0; @@ -327,8 +169,6 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src) int i, ret = 0; dst->format = src->format; - dst->width = src->width; - dst->height = src->height; dst->channels = src->channels; dst->channel_layout = src->channel_layout; dst->nb_samples = src->nb_samples; @@ -428,17 +268,11 @@ void av_frame_unref(AVFrame *frame) if (!frame) return; - wipe_side_data(frame); - for (i = 0; i < FF_ARRAY_ELEMS(frame->buf); i++) av_buffer_unref(&frame->buf[i]); for (i = 0; i < frame->nb_extended_buf; i++) av_buffer_unref(&frame->extended_buf[i]); av_freep(&frame->extended_buf); - av_dict_free(&frame->metadata); -#if FF_API_FRAME_QP - av_buffer_unref(&frame->qp_table_buf); -#endif get_frame_defaults(frame); } @@ -469,49 +303,6 @@ int av_frame_is_writable(AVFrame *frame) return ret; } -int av_frame_make_writable(AVFrame *frame) -{ - AVFrame tmp; - int ret; - - if (!frame->buf[0]) - return AVERROR(EINVAL); - - if (av_frame_is_writable(frame)) - return 0; - - memset(&tmp, 0, sizeof(tmp)); - tmp.format = frame->format; - tmp.width = frame->width; - tmp.height = frame->height; - tmp.channels = frame->channels; - tmp.channel_layout = frame->channel_layout; - tmp.nb_samples = frame->nb_samples; - ret = av_frame_get_buffer(&tmp, 32); - if (ret < 0) - return ret; - - ret = av_frame_copy(&tmp, frame); - if (ret < 0) { - av_frame_unref(&tmp); - return ret; - } - - ret = av_frame_copy_props(&tmp, frame); - if (ret < 0) { - av_frame_unref(&tmp); - return ret; - } - - av_frame_unref(frame); - - *frame = tmp; - if (tmp.data == tmp.extended_data) - frame->extended_data = frame->data; - - return 0; -} - int av_frame_copy_props(AVFrame *dst, const AVFrame *src) { return frame_copy_props(dst, src, 1); @@ -548,54 +339,6 @@ AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane) return NULL; } -AVFrameSideData *av_frame_new_side_data(AVFrame *frame, - enum AVFrameSideDataType type, - int size) -{ - AVFrameSideData *ret, **tmp; - - if (frame->nb_side_data > INT_MAX / sizeof(*frame->side_data) - 1) - return NULL; - - tmp = av_realloc(frame->side_data, - (frame->nb_side_data + 1) * sizeof(*frame->side_data)); - if (!tmp) - return NULL; - frame->side_data = tmp; - - ret = av_mallocz(sizeof(*ret)); - if (!ret) - return NULL; - - if (size > 0) { - ret->buf = av_buffer_alloc(size); - if (!ret->buf) { - av_freep(&ret); - return NULL; - } - - ret->data = ret->buf->data; - ret->size = size; - } - ret->type = type; - - frame->side_data[frame->nb_side_data++] = ret; - - return ret; -} - -AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, - enum AVFrameSideDataType type) -{ - int i; - - for (i = 0; i < frame->nb_side_data; i++) { - if (frame->side_data[i]->type == type) - return frame->side_data[i]; - } - return NULL; -} - static int frame_copy_audio(AVFrame *dst, const AVFrame *src) { int planar = av_sample_fmt_is_planar(dst->format); @@ -624,45 +367,7 @@ int av_frame_copy(AVFrame *dst, const AVFrame *src) { if (dst->format != src->format || dst->format < 0) return AVERROR(EINVAL); - - if (dst->width > 0 && dst->height > 0) - return AVERROR(EINVAL); else if (dst->nb_samples > 0 && dst->channel_layout) return frame_copy_audio(dst, src); - return AVERROR(EINVAL); } - -void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type) -{ - int i; - - for (i = 0; i < frame->nb_side_data; i++) { - AVFrameSideData *sd = frame->side_data[i]; - if (sd->type == type) { - free_side_data(&frame->side_data[i]); - frame->side_data[i] = frame->side_data[frame->nb_side_data - 1]; - frame->nb_side_data--; - } - } -} - -const char *av_frame_side_data_name(enum AVFrameSideDataType type) -{ - switch(type) { - case AV_FRAME_DATA_PANSCAN: return "AVPanScan"; - case AV_FRAME_DATA_A53_CC: return "ATSC A53 Part 4 Closed Captions"; - case AV_FRAME_DATA_STEREO3D: return "Stereoscopic 3d metadata"; - case AV_FRAME_DATA_MATRIXENCODING: return "AVMatrixEncoding"; - case AV_FRAME_DATA_DOWNMIX_INFO: return "Metadata relevant to a downmix procedure"; - case AV_FRAME_DATA_REPLAYGAIN: return "AVReplayGain"; - case AV_FRAME_DATA_DISPLAYMATRIX: return "3x3 displaymatrix"; - case AV_FRAME_DATA_AFD: return "Active format description"; - case AV_FRAME_DATA_MOTION_VECTORS: return "Motion vectors"; - case AV_FRAME_DATA_SKIP_SAMPLES: return "Skip samples"; - case AV_FRAME_DATA_AUDIO_SERVICE_TYPE: return "Audio service type"; - case AV_FRAME_DATA_MASTERING_DISPLAY_METADATA: return "Mastering display metadata"; - case AV_FRAME_DATA_GOP_TIMECODE: return "GOP timecode"; - } - return NULL; -} diff --git a/ext/at3_standalone/frame.h b/ext/at3_standalone/frame.h index 8dc4049072..bced2e9404 100644 --- a/ext/at3_standalone/frame.h +++ b/ext/at3_standalone/frame.h @@ -33,7 +33,6 @@ #include "dict.h" #include "rational.h" #include "samplefmt.h" -#include "pixfmt.h" #include "version.h" @@ -124,31 +123,6 @@ enum AVFrameSideDataType { AV_FRAME_DATA_GOP_TIMECODE }; -enum AVActiveFormatDescription { - AV_AFD_SAME = 8, - AV_AFD_4_3 = 9, - AV_AFD_16_9 = 10, - AV_AFD_14_9 = 11, - AV_AFD_4_3_SP_14_9 = 13, - AV_AFD_16_9_SP_14_9 = 14, - AV_AFD_SP_4_3 = 15, -}; - - -/** - * Structure to hold side data for an AVFrame. - * - * sizeof(AVFrameSideData) is not a part of the public ABI, so new fields may be added - * to the end with a minor bump. - */ -typedef struct AVFrameSideData { - enum AVFrameSideDataType type; - uint8_t *data; - int size; - AVDictionary *metadata; - AVBufferRef *buf; -} AVFrameSideData; - /** * This structure describes decoded (raw) audio or video data. * @@ -224,11 +198,6 @@ typedef struct AVFrame { */ uint8_t **extended_data; - /** - * width and height of the video frame - */ - int width, height; - /** * number of audio samples (per channel) described by this frame */ @@ -241,57 +210,11 @@ typedef struct AVFrame { */ int format; - /** - * 1 -> keyframe, 0-> not - */ - int key_frame; - - /** - * Picture type of the frame. - */ - enum AVPictureType pict_type; - - /** - * Sample aspect ratio for the video frame, 0/1 if unknown/unspecified. - */ - AVRational sample_aspect_ratio; - - /** - * Presentation timestamp in time_base units (time when frame should be shown to user). - */ - int64_t pts; - - /** - * PTS copied from the AVPacket that was decoded to produce this frame. - */ - int64_t pkt_pts; - - /** - * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used) - * This is also the Presentation time of this AVFrame calculated from - * only AVPacket.dts values without pts values. - */ - int64_t pkt_dts; - - /** - * picture number in bitstream order - */ - int coded_picture_number; - /** - * picture number in display order - */ - int display_picture_number; - /** * quality (between 1 (good) and FF_LAMBDA_MAX (bad)) */ int quality; - /** - * for some private data of the user - */ - void *opaque; - #if FF_API_ERROR_FRAME /** * @deprecated unused @@ -300,38 +223,6 @@ typedef struct AVFrame { uint64_t error[AV_NUM_DATA_POINTERS]; #endif - /** - * When decoding, this signals how much the picture must be delayed. - * extra_delay = repeat_pict / (2*fps) - */ - int repeat_pict; - - /** - * The content of the picture is interlaced. - */ - int interlaced_frame; - - /** - * If the content is interlaced, is top field displayed first. - */ - int top_field_first; - - /** - * Tell user application that palette has changed from previous frame. - */ - int palette_has_changed; - - /** - * reordered opaque 64bit (generally an integer or a double precision float - * PTS but can be anything). - * The user sets AVCodecContext.reordered_opaque to represent the input at - * that time, - * the decoder reorders values as needed and sets AVFrame.reordered_opaque - * to exactly one of the values provided by the user through AVCodecContext.reordered_opaque - * @deprecated in favor of pkt_pts - */ - int64_t reordered_opaque; - /** * Sample rate of the audio data. */ @@ -374,9 +265,6 @@ typedef struct AVFrame { */ int nb_extended_buf; - AVFrameSideData **side_data; - int nb_side_data; - /** * @defgroup lavu_frame_flags AV_FRAME_FLAGS * Flags describing additional frame properties. @@ -397,30 +285,6 @@ typedef struct AVFrame { */ int flags; - /** - * MPEG vs JPEG YUV range. - * It must be accessed using av_frame_get_color_range() and - * av_frame_set_color_range(). - * - encoding: Set by user - * - decoding: Set by libavcodec - */ - enum AVColorRange color_range; - - enum AVColorPrimaries color_primaries; - - enum AVColorTransferCharacteristic color_trc; - - /** - * YUV colorspace type. - * It must be accessed using av_frame_get_colorspace() and - * av_frame_set_colorspace(). - * - encoding: Set by user - * - decoding: Set by libavcodec - */ - enum AVColorSpace colorspace; - - enum AVChromaLocation chroma_location; - /** * frame timestamp estimated using various heuristics, in stream time base * Code outside libavutil should access this field using: @@ -449,15 +313,6 @@ typedef struct AVFrame { */ int64_t pkt_duration; - /** - * metadata. - * Code outside libavutil should access this field using: - * av_frame_get_metadata(frame) - * - encoding: Set by user. - * - decoding: Set by libavcodec. - */ - AVDictionary *metadata; - /** * decode error flags of the frame, set to a combination of * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there @@ -489,29 +344,6 @@ typedef struct AVFrame { * - decoding: set by libavcodec, read by user. */ int pkt_size; - -#if FF_API_FRAME_QP - /** - * QP table - * Not to be accessed directly from outside libavutil - */ - attribute_deprecated - int8_t *qscale_table; - /** - * QP store stride - * Not to be accessed directly from outside libavutil - */ - attribute_deprecated - int qstride; - - attribute_deprecated - int qscale_type; - - /** - * Not to be accessed directly from outside libavutil - */ - AVBufferRef *qp_table_buf; -#endif } AVFrame; /** @@ -531,21 +363,11 @@ int av_frame_get_channels (const AVFrame *frame); void av_frame_set_channels (AVFrame *frame, int val); int av_frame_get_sample_rate (const AVFrame *frame); void av_frame_set_sample_rate (AVFrame *frame, int val); -AVDictionary *av_frame_get_metadata (const AVFrame *frame); -void av_frame_set_metadata (AVFrame *frame, AVDictionary *val); int av_frame_get_decode_error_flags (const AVFrame *frame); void av_frame_set_decode_error_flags (AVFrame *frame, int val); int av_frame_get_pkt_size(const AVFrame *frame); void av_frame_set_pkt_size(AVFrame *frame, int val); AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame); -#if FF_API_FRAME_QP -int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type); -int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type); -#endif -enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame); -void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val); -enum AVColorRange av_frame_get_color_range(const AVFrame *frame); -void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val); /** * Get the name of a colorspace. @@ -639,19 +461,6 @@ int av_frame_get_buffer(AVFrame *frame, int align); */ int av_frame_is_writable(AVFrame *frame); -/** - * Ensure that the frame data is writable, avoiding data copy if possible. - * - * Do nothing if the frame is writable, allocate new buffers and copy the data - * if it is not. - * - * @return 0 on success, a negative AVERROR on error. - * - * @see av_frame_is_writable(), av_buffer_is_writable(), - * av_buffer_make_writable() - */ -int av_frame_make_writable(AVFrame *frame); - /** * Copy the frame data from src to dst. * @@ -685,37 +494,6 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src); */ AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane); -/** - * Add a new side data to a frame. - * - * @param frame a frame to which the side data should be added - * @param type type of the added side data - * @param size size of the side data - * - * @return newly added side data on success, NULL on error - */ -AVFrameSideData *av_frame_new_side_data(AVFrame *frame, - enum AVFrameSideDataType type, - int size); - -/** - * @return a pointer to the side data of a given type on success, NULL if there - * is no side data with such type in this frame. - */ -AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, - enum AVFrameSideDataType type); - -/** - * If side data of the supplied type exists in the frame, free it and remove it - * from the frame. - */ -void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type); - -/** - * @return a string identifying the side data type - */ -const char *av_frame_side_data_name(enum AVFrameSideDataType type); - /** * @} */ diff --git a/ext/at3_standalone/internal.h b/ext/at3_standalone/internal.h index 326abe73ed..e3e2c1017e 100644 --- a/ext/at3_standalone/internal.h +++ b/ext/at3_standalone/internal.h @@ -29,7 +29,6 @@ #include "buffer.h" #include "channel_layout.h" #include "mathematics.h" -#include "pixfmt.h" #include "avcodec.h" #include "config.h" @@ -155,11 +154,6 @@ typedef struct AVCodecInternal { * Number of audio samples to skip at the start of the next decoded frame */ int skip_samples; - - /** - * hwaccel-specific private data - */ - void *hwaccel_priv_data; } AVCodecInternal; struct AVCodecDefault { diff --git a/ext/at3_standalone/intmath.h b/ext/at3_standalone/intmath.h index 9573109e9d..e42581000f 100644 --- a/ext/at3_standalone/intmath.h +++ b/ext/at3_standalone/intmath.h @@ -138,27 +138,6 @@ static av_always_inline av_const int ff_ctzll_c(long long v) } #endif -#ifndef ff_clz -#define ff_clz ff_clz_c -static av_always_inline av_const unsigned ff_clz_c(unsigned x) -{ - unsigned i = sizeof(x) * 8; - - while (x) { - x >>= 1; - i--; - } - - return i; -} -#endif - -#if AV_GCC_VERSION_AT_LEAST(3,4) -#ifndef av_parity -#define av_parity __builtin_parity -#endif -#endif - /** * @} */ diff --git a/ext/at3_standalone/intreadwrite.h b/ext/at3_standalone/intreadwrite.h index 5139d15b2d..8c9ec106ac 100644 --- a/ext/at3_standalone/intreadwrite.h +++ b/ext/at3_standalone/intreadwrite.h @@ -84,69 +84,6 @@ typedef union { * Map AV_RNXX <-> AV_R[BL]XX for all variants provided by per-arch headers. */ -#if AV_HAVE_BIGENDIAN - -# if defined(AV_RN16) && !defined(AV_RB16) -# define AV_RB16(p) AV_RN16(p) -# elif !defined(AV_RN16) && defined(AV_RB16) -# define AV_RN16(p) AV_RB16(p) -# endif - -# if defined(AV_WN16) && !defined(AV_WB16) -# define AV_WB16(p, v) AV_WN16(p, v) -# elif !defined(AV_WN16) && defined(AV_WB16) -# define AV_WN16(p, v) AV_WB16(p, v) -# endif - -# if defined(AV_RN24) && !defined(AV_RB24) -# define AV_RB24(p) AV_RN24(p) -# elif !defined(AV_RN24) && defined(AV_RB24) -# define AV_RN24(p) AV_RB24(p) -# endif - -# if defined(AV_WN24) && !defined(AV_WB24) -# define AV_WB24(p, v) AV_WN24(p, v) -# elif !defined(AV_WN24) && defined(AV_WB24) -# define AV_WN24(p, v) AV_WB24(p, v) -# endif - -# if defined(AV_RN32) && !defined(AV_RB32) -# define AV_RB32(p) AV_RN32(p) -# elif !defined(AV_RN32) && defined(AV_RB32) -# define AV_RN32(p) AV_RB32(p) -# endif - -# if defined(AV_WN32) && !defined(AV_WB32) -# define AV_WB32(p, v) AV_WN32(p, v) -# elif !defined(AV_WN32) && defined(AV_WB32) -# define AV_WN32(p, v) AV_WB32(p, v) -# endif - -# if defined(AV_RN48) && !defined(AV_RB48) -# define AV_RB48(p) AV_RN48(p) -# elif !defined(AV_RN48) && defined(AV_RB48) -# define AV_RN48(p) AV_RB48(p) -# endif - -# if defined(AV_WN48) && !defined(AV_WB48) -# define AV_WB48(p, v) AV_WN48(p, v) -# elif !defined(AV_WN48) && defined(AV_WB48) -# define AV_WN48(p, v) AV_WB48(p, v) -# endif - -# if defined(AV_RN64) && !defined(AV_RB64) -# define AV_RB64(p) AV_RN64(p) -# elif !defined(AV_RN64) && defined(AV_RB64) -# define AV_RN64(p) AV_RB64(p) -# endif - -# if defined(AV_WN64) && !defined(AV_WB64) -# define AV_WB64(p, v) AV_WN64(p, v) -# elif !defined(AV_WN64) && defined(AV_WB64) -# define AV_WN64(p, v) AV_WB64(p, v) -# endif - -#else /* AV_HAVE_BIGENDIAN */ # if defined(AV_RN16) && !defined(AV_RL16) # define AV_RL16(p) AV_RN16(p) @@ -208,8 +145,6 @@ typedef union { # define AV_WN64(p, v) AV_WL64(p, v) # endif -#endif /* !AV_HAVE_BIGENDIAN */ - /* * Define AV_[RW]N helper macros to simplify definitions not provided * by per-arch headers. diff --git a/ext/at3_standalone/libm.h b/ext/at3_standalone/libm.h index a819962391..71d3672eb8 100644 --- a/ext/at3_standalone/libm.h +++ b/ext/at3_standalone/libm.h @@ -362,28 +362,6 @@ static av_always_inline av_const int avpriv_isfinite(double x) : avpriv_isfinite(x)) #endif /* HAVE_ISFINITE */ -#if !HAVE_HYPOT -static inline av_const double hypot(double x, double y) -{ - double ret, temp; - x = fabs(x); - y = fabs(y); - - if (isinf(x) || isinf(y)) - return av_int2double(0x7ff0000000000000); - if (x == 0 || y == 0) - return x + y; - if (x < y) { - temp = x; - x = y; - y = temp; - } - - y = y/x; - return x*sqrt(1 + y*y); -} -#endif /* HAVE_HYPOT */ - #if !HAVE_LDEXPF #undef ldexpf #define ldexpf(x, exp) ((float)ldexp(x, exp)) diff --git a/ext/at3_standalone/mathops.c b/ext/at3_standalone/mathops.c deleted file mode 100644 index 31c8e69e61..0000000000 --- a/ext/at3_standalone/mathops.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "mathops.h" - -#ifdef TEST - -#include - -int main(void) -{ - unsigned u; - - for(u=0; u<65536; u++) { - unsigned s = u*u; - unsigned root = ff_sqrt(s); - unsigned root_m1 = ff_sqrt(s-1); - if (s && root != u) { - fprintf(stderr, "ff_sqrt failed at %u with %u\n", s, root); - return 1; - } - if (u && root_m1 != u - 1) { - fprintf(stderr, "ff_sqrt failed at %u with %u\n", s, root); - return 1; - } - } - return 0; -} -#endif /* TEST */ diff --git a/ext/at3_standalone/mem.h b/ext/at3_standalone/mem.h index 376fd2e07c..1558fe8f0b 100644 --- a/ext/at3_standalone/mem.h +++ b/ext/at3_standalone/mem.h @@ -60,18 +60,6 @@ #define DECLARE_ASM_CONST(n,t,v) static const t v #endif -#if AV_GCC_VERSION_AT_LEAST(3,1) - #define av_malloc_attrib __attribute__((__malloc__)) -#else - #define av_malloc_attrib -#endif - -#if AV_GCC_VERSION_AT_LEAST(4,3) - #define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) -#else - #define av_alloc_size(...) -#endif - /** * Allocate a block of size bytes with alignment suitable for all * memory accesses (including vectors if available on the CPU). @@ -80,7 +68,7 @@ * be allocated. * @see av_mallocz() */ -void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1); +void *av_malloc(size_t size); /** * Allocate a block of size * nmemb bytes with av_malloc(). @@ -90,7 +78,7 @@ void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1); * be allocated. * @see av_malloc() */ -av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t size) +static inline void *av_malloc_array(size_t nmemb, size_t size) { if (!size || nmemb >= INT_MAX / size) return NULL; @@ -115,7 +103,7 @@ av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t siz * some libc implementations. * @see av_fast_realloc() */ -void *av_realloc(void *ptr, size_t size) av_alloc_size(2); +void *av_realloc(void *ptr, size_t size); /** * Allocate or reallocate a block of memory. @@ -164,7 +152,7 @@ int av_reallocp(void *ptr, size_t size); * The situation is undefined according to POSIX and may crash with * some libc implementations. */ -av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size); +void *av_realloc_array(void *ptr, size_t nmemb, size_t size); /** * Allocate or reallocate an array through a pointer to a pointer. @@ -203,7 +191,7 @@ void av_free(void *ptr); * @return Pointer to the allocated block, NULL if it cannot be allocated. * @see av_malloc() */ -void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1); +void *av_mallocz(size_t size); /** * Allocate a block of nmemb * size bytes with alignment suitable for all @@ -215,7 +203,7 @@ void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1); * @param size * @return Pointer to the allocated block, NULL if it cannot be allocated. */ -void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib; +void *av_calloc(size_t nmemb, size_t size); /** * Allocate a block of size * nmemb bytes with av_mallocz(). @@ -226,7 +214,7 @@ void *av_calloc(size_t nmemb, size_t size) av_malloc_attrib; * @see av_mallocz() * @see av_malloc_array() */ -av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t size) +static inline void *av_mallocz_array(size_t nmemb, size_t size) { if (!size || nmemb >= INT_MAX / size) return NULL; @@ -239,7 +227,7 @@ av_alloc_size(1, 2) static inline void *av_mallocz_array(size_t nmemb, size_t si * @return Pointer to a newly-allocated string containing a * copy of s or NULL if the string cannot be allocated. */ -char *av_strdup(const char *s) av_malloc_attrib; +char *av_strdup(const char *s); /** * Duplicate a substring of the string s. @@ -249,7 +237,7 @@ char *av_strdup(const char *s) av_malloc_attrib; * @return Pointer to a newly-allocated string containing a * copy of s or NULL if the string cannot be allocated. */ -char *av_strndup(const char *s, size_t len) av_malloc_attrib; +char *av_strndup(const char *s, size_t len); /** * Duplicate the buffer p. diff --git a/ext/at3_standalone/opt.c b/ext/at3_standalone/opt.c index 6411239e61..173310df38 100644 --- a/ext/at3_standalone/opt.c +++ b/ext/at3_standalone/opt.c @@ -32,7 +32,6 @@ #include "dict.h" #include "avstring.h" #include "log.h" -#include "pixdesc.h" #include "mathematics.h" #include "samplefmt.h" @@ -1223,7 +1222,7 @@ int av_opt_is_set_to_default(void *obj, const AVOption *o) double d, d2; float f; AVRational q; - int ret, w, h; + int ret; char *str; void *dst; @@ -1408,7 +1407,6 @@ int main(void) printf("rational=%d/%d\n", test_ctx.rational.num, test_ctx.rational.den); printf("video_rate=%d/%d\n", test_ctx.video_rate.num, test_ctx.video_rate.den); printf("width=%d height=%d\n", test_ctx.w, test_ctx.h); - printf("pix_fmt=%s\n", av_get_pix_fmt_name(test_ctx.pix_fmt)); printf("sample_fmt=%s\n", av_get_sample_fmt_name(test_ctx.sample_fmt)); printf("duration=%"PRId64"\n", test_ctx.duration); printf("color=%d %d %d %d\n", test_ctx.color[0], test_ctx.color[1], test_ctx.color[2], test_ctx.color[3]); diff --git a/ext/at3_standalone/opt.h b/ext/at3_standalone/opt.h index 753434d628..9e15aaa131 100644 --- a/ext/at3_standalone/opt.h +++ b/ext/at3_standalone/opt.h @@ -31,7 +31,6 @@ #include "avutil.h" #include "dict.h" #include "log.h" -#include "pixfmt.h" #include "samplefmt.h" #include "version.h" diff --git a/ext/at3_standalone/options.c b/ext/at3_standalone/options.c index 4419193544..6fc3894f07 100644 --- a/ext/at3_standalone/options.c +++ b/ext/at3_standalone/options.c @@ -79,7 +79,7 @@ static AVClassCategory get_category(void *ptr) static const AVClass av_codec_context_class = { .class_name = "AVCodecContext", .item_name = context_to_name, - .option = avcodec_options, + .option = NULL, .version = LIBAVUTIL_VERSION_INT, .log_level_offset_offset = offsetof(AVCodecContext, log_level_offset), .child_next = codec_child_next, @@ -110,17 +110,12 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) av_opt_set_defaults2(s, flags, flags); s->time_base = (AVRational){0,1}; - s->framerate = (AVRational){ 0, 1 }; s->pkt_timebase = (AVRational){ 0, 1 }; s->get_buffer2 = avcodec_default_get_buffer2; - s->get_format = avcodec_default_get_format; s->execute = avcodec_default_execute; s->execute2 = avcodec_default_execute2; - s->sample_aspect_ratio = (AVRational){0,1}; - s->pix_fmt = AV_PIX_FMT_NONE; s->sample_fmt = AV_SAMPLE_FMT_NONE; - s->reordered_opaque = AV_NOPTS_VALUE; if(codec && codec->priv_data_size){ if(!s->priv_data){ s->priv_data= av_mallocz(codec->priv_data_size); @@ -133,17 +128,6 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) av_opt_set_defaults(s->priv_data); } } - if (codec && codec->defaults) { - int ret; - const AVCodecDefault *d = codec->defaults; - /* - while (d->key) { - ret = av_opt_set(s, d->key, d->value, 0); - av_assert0(ret >= 0); - d++; - } - */ - } return 0; } @@ -212,7 +196,6 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) /* set values specific to opened codecs back to their default state */ dest->slice_offset = NULL; - dest->hwaccel = NULL; dest->internal = NULL; #if FF_API_CODED_FRAME FF_DISABLE_DEPRECATION_WARNINGS @@ -271,9 +254,6 @@ static const AVOption frame_options[]={ {"best_effort_timestamp", "", FOFFSET(best_effort_timestamp), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, 0}, {"pkt_pos", "", FOFFSET(pkt_pos), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0}, {"pkt_size", "", FOFFSET(pkt_size), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0}, -{"sample_aspect_ratio", "", FOFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0}, -{"width", "", FOFFSET(width), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"height", "", FOFFSET(height), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, {"format", "", FOFFSET(format), AV_OPT_TYPE_INT, {.i64 = -1 }, 0, INT_MAX, 0}, {"channel_layout", "", FOFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, 0}, {"sample_rate", "", FOFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, @@ -293,195 +273,3 @@ const AVClass *avcodec_get_frame_class(void) } #define SROFFSET(x) offsetof(AVSubtitleRect,x) - -static const AVOption subtitle_rect_options[]={ -{"x", "", SROFFSET(x), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"y", "", SROFFSET(y), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"w", "", SROFFSET(w), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"h", "", SROFFSET(h), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"type", "", SROFFSET(type), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0}, -{"flags", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0, "flags"}, -{"forced", "", SROFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, 1, 0}, -{NULL}, -}; - -static const AVClass av_subtitle_rect_class = { - .class_name = "AVSubtitleRect", - .item_name = NULL, - .option = subtitle_rect_options, - .version = LIBAVUTIL_VERSION_INT, -}; - -const AVClass *avcodec_get_subtitle_rect_class(void) -{ - return &av_subtitle_rect_class; -} - -#ifdef TEST -static int dummy_init(AVCodecContext *ctx) -{ - //TODO: this code should set every possible pointer that could be set by codec and is not an option; - ctx->extradata_size = 8; - ctx->extradata = av_malloc(ctx->extradata_size); - return 0; -} - -static int dummy_close(AVCodecContext *ctx) -{ - av_freep(&ctx->extradata); - ctx->extradata_size = 0; - return 0; -} - -static int dummy_encode(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) -{ - return AVERROR(ENOSYS); -} - -typedef struct Dummy12Context { - AVClass *av_class; - int num; - char* str; -} Dummy12Context; - -typedef struct Dummy3Context { - void *fake_av_class; - int num; - char* str; -} Dummy3Context; - -#define OFFSET(x) offsetof(Dummy12Context, x) -#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM -static const AVOption dummy_options[] = { - { "str", "set str", OFFSET(str), AV_OPT_TYPE_STRING, { .str = "i'm src default value" }, 0, 0, VE}, - { "num", "set num", OFFSET(num), AV_OPT_TYPE_INT, { .i64 = 1500100900 }, 0, INT_MAX, VE}, - { NULL }, -}; - -static const AVClass dummy_v1_class = { - .class_name = "dummy_v1_class", - .item_name = av_default_item_name, - .option = dummy_options, - .version = LIBAVUTIL_VERSION_INT, -}; - -static const AVClass dummy_v2_class = { - .class_name = "dummy_v2_class", - .item_name = av_default_item_name, - .option = dummy_options, - .version = LIBAVUTIL_VERSION_INT, -}; - -/* codec with options */ -static AVCodec dummy_v1_encoder = { - .name = "dummy_v1_codec", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_NONE - 1, - .encode2 = dummy_encode, - .init = dummy_init, - .close = dummy_close, - .priv_class = &dummy_v1_class, - .priv_data_size = sizeof(Dummy12Context), -}; - -/* codec with options, different class */ -static AVCodec dummy_v2_encoder = { - .name = "dummy_v2_codec", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_NONE - 2, - .encode2 = dummy_encode, - .init = dummy_init, - .close = dummy_close, - .priv_class = &dummy_v2_class, - .priv_data_size = sizeof(Dummy12Context), -}; - -/* codec with priv data, but no class */ -static AVCodec dummy_v3_encoder = { - .name = "dummy_v3_codec", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_NONE - 3, - .encode2 = dummy_encode, - .init = dummy_init, - .close = dummy_close, - .priv_data_size = sizeof(Dummy3Context), -}; - -/* codec without priv data */ -static AVCodec dummy_v4_encoder = { - .name = "dummy_v4_codec", - .type = AVMEDIA_TYPE_VIDEO, - .id = AV_CODEC_ID_NONE - 4, - .encode2 = dummy_encode, - .init = dummy_init, - .close = dummy_close, -}; - -static void test_copy_print_codec(const AVCodecContext *ctx) -{ - printf("%-14s: %dx%d prv: %s", - ctx->codec ? ctx->codec->name : "NULL", - ctx->width, ctx->height, - ctx->priv_data ? "set" : "null"); - if (ctx->codec && ctx->codec->priv_class && ctx->codec->priv_data_size) { - int64_t i64; - char *str = NULL; - av_opt_get_int(ctx->priv_data, "num", 0, &i64); - av_opt_get(ctx->priv_data, "str", 0, (uint8_t**)&str); - printf(" opts: %"PRId64" %s", i64, str); - av_free(str); - } - printf("\n"); -} - -static void test_copy(const AVCodec *c1, const AVCodec *c2) -{ - AVCodecContext *ctx1, *ctx2; - printf("%s -> %s\nclosed:\n", c1 ? c1->name : "NULL", c2 ? c2->name : "NULL"); - ctx1 = avcodec_alloc_context3(c1); - ctx2 = avcodec_alloc_context3(c2); - ctx1->width = ctx1->height = 128; - if (ctx2->codec && ctx2->codec->priv_class && ctx2->codec->priv_data_size) { - av_opt_set(ctx2->priv_data, "num", "667", 0); - av_opt_set(ctx2->priv_data, "str", "i'm dest value before copy", 0); - } - avcodec_copy_context(ctx2, ctx1); - test_copy_print_codec(ctx1); - test_copy_print_codec(ctx2); - if (ctx1->codec) { - printf("opened:\n"); - avcodec_open2(ctx1, ctx1->codec, NULL); - if (ctx2->codec && ctx2->codec->priv_class && ctx2->codec->priv_data_size) { - av_opt_set(ctx2->priv_data, "num", "667", 0); - av_opt_set(ctx2->priv_data, "str", "i'm dest value before copy", 0); - } - avcodec_copy_context(ctx2, ctx1); - test_copy_print_codec(ctx1); - test_copy_print_codec(ctx2); - avcodec_close(ctx1); - } - avcodec_free_context(&ctx1); - avcodec_free_context(&ctx2); -} - -int main(void) -{ - AVCodec *dummy_codec[] = { - &dummy_v1_encoder, - &dummy_v2_encoder, - &dummy_v3_encoder, - &dummy_v4_encoder, - NULL, - }; - int i, j; - - for (i = 0; dummy_codec[i]; i++) - avcodec_register(dummy_codec[i]); - - printf("testing avcodec_copy_context()\n"); - for (i = 0; i < FF_ARRAY_ELEMS(dummy_codec); i++) - for (j = 0; j < FF_ARRAY_ELEMS(dummy_codec); j++) - test_copy(dummy_codec[i], dummy_codec[j]); - return 0; -} -#endif diff --git a/ext/at3_standalone/options_table.h b/ext/at3_standalone/options_table.h index 4188081ed5..13b4219136 100644 --- a/ext/at3_standalone/options_table.h +++ b/ext/at3_standalone/options_table.h @@ -106,7 +106,6 @@ static const AVOption avcodec_options[] = { {"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" }, #endif {"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX}, -{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, {"ac", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|E}, @@ -120,8 +119,6 @@ static const AVOption avcodec_options[] = { {"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E}, {"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 1024, V|E}, {"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E}, -{"bf", "set maximum number of B frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E}, -{"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E}, #if FF_API_RC_STRATEGY {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, #endif @@ -199,11 +196,6 @@ static const AVOption avcodec_options[] = { #if FF_API_MPV_OPT {"rc_buf_aggressivity", "deprecated, use encoder private options instead", OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E}, #endif -{"i_qfactor", "QP factor between P- and I-frames", OFFSET(i_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = -0.8 }, -FLT_MAX, FLT_MAX, V|E}, -{"i_qoffset", "QP offset between P- and I-frames", OFFSET(i_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 0.0 }, -FLT_MAX, FLT_MAX, V|E}, -#if FF_API_MPV_OPT -{"rc_init_cplx", "deprecated, use encoder private options instead", OFFSET(rc_initial_cplx), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, -#endif {"dct", "DCT algorithm", OFFSET(dct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E, "dct"}, {"auto", "autoselect a good one", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_AUTO }, INT_MIN, INT_MAX, V|E, "dct"}, {"fastint", "fast integer", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FASTINT }, INT_MIN, INT_MAX, V|E, "dct"}, @@ -211,11 +203,6 @@ static const AVOption avcodec_options[] = { {"mmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, "dct"}, {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, "dct"}, {"faan", "floating point AAN DCT", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, "dct"}, -{"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"tcplx_mask", "temporal complexity masking", OFFSET(temporal_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"p_mask", "inter masking", OFFSET(p_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, -{"dark_mask", "compresses dark areas stronger than medium ones", OFFSET(dark_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, {"idct", "select IDCT implementation", OFFSET(idct_algo), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|E|D, "idct"}, {"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_AUTO }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"int", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"}, @@ -252,7 +239,6 @@ static const AVOption avcodec_options[] = { {"plane", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_PLANE }, INT_MIN, INT_MAX, V|E, "pred"}, {"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, #endif -{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, {"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, {"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, {"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, @@ -395,22 +381,8 @@ static const AVOption avcodec_options[] = { {"mpeg4_asp", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PROFILE_MPEG4_ADVANCED_SIMPLE }, INT_MIN, INT_MAX, V|E, "profile"}, {"level", NULL, OFFSET(level), AV_OPT_TYPE_INT, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, {"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_LEVEL_UNKNOWN }, INT_MIN, INT_MAX, V|A|E, "level"}, -{"lowres", "decode at 1= 1/2, 2=1/4, 3=1/8 resolutions", OFFSET(lowres), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|A|D}, -#if FF_API_PRIVATE_OPT -{"skip_threshold", "frame skip threshold", OFFSET(frame_skip_threshold), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_factor", "frame skip factor", OFFSET(frame_skip_factor), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skip_exp", "frame skip exponent", OFFSET(frame_skip_exp), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -{"skipcmp", "frame skip compare function", OFFSET(frame_skip_cmp), AV_OPT_TYPE_INT, {.i64 = FF_CMP_DCTMAX }, INT_MIN, INT_MAX, V|E, "cmp_func"}, -#endif -#if FF_API_MPV_OPT -{"border_mask", "deprecated, use encoder private options instead", OFFSET(border_masking), AV_OPT_TYPE_FLOAT, {.dbl = DEFAULT }, -FLT_MAX, FLT_MAX, V|E}, -#endif {"mblmin", "minimum macroblock Lagrange factor (VBR)", OFFSET(mb_lmin), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 2 }, 1, FF_LAMBDA_MAX, V|E}, {"mblmax", "maximum macroblock Lagrange factor (VBR)", OFFSET(mb_lmax), AV_OPT_TYPE_INT, {.i64 = FF_QP2LAMBDA * 31 }, 1, FF_LAMBDA_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"mepc", "motion estimation bitrate penalty compensation (1.0 = 256)", OFFSET(me_penalty_compensation), AV_OPT_TYPE_INT, {.i64 = 256 }, INT_MIN, INT_MAX, V|E}, -#endif -{"skip_loop_filter", "skip loop filtering process for the selected frames", OFFSET(skip_loop_filter), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"skip_idct" , "skip IDCT/dequantization for the selected frames", OFFSET(skip_idct), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"skip_frame" , "skip decoding for the selected frames", OFFSET(skip_frame), AV_OPT_TYPE_INT, {.i64 = AVDISCARD_DEFAULT }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"none" , "discard no frame", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONE }, INT_MIN, INT_MAX, V|D, "avdiscard"}, @@ -421,18 +393,9 @@ static const AVOption avcodec_options[] = { {"nointra" , "discard all frames except I frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_NONINTRA}, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"all" , "discard all frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVDISCARD_ALL }, INT_MIN, INT_MAX, V|D, "avdiscard"}, {"bidir_refine", "refine the two motion vectors used in bidirectional macroblocks", OFFSET(bidir_refine), AV_OPT_TYPE_INT, {.i64 = 1 }, 0, 4, V|E}, -#if FF_API_PRIVATE_OPT -{"brd_scale", "downscale frames for dynamic B-frame decision", OFFSET(brd_scale), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, 10, V|E}, -#endif {"keyint_min", "minimum interval between IDR-frames", OFFSET(keyint_min), AV_OPT_TYPE_INT, {.i64 = 25 }, INT_MIN, INT_MAX, V|E}, {"refs", "reference frames to consider for motion compensation", OFFSET(refs), AV_OPT_TYPE_INT, {.i64 = 1 }, INT_MIN, INT_MAX, V|E}, -#if FF_API_PRIVATE_OPT -{"chromaoffset", "chroma QP offset from luma", OFFSET(chromaoffset), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E}, -#endif {"trellis", "rate-distortion optimal quantization", OFFSET(trellis), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, -#if FF_API_UNUSED_MEMBERS -{"sc_factor", "multiplied by qscale for each frame and added to scene_change_score", OFFSET(scenechange_factor), AV_OPT_TYPE_INT, {.i64 = 6 }, 0, INT_MAX, V|E}, -#endif /* FF_API_UNUSED_MEMBERS */ {"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.i64 = 256 }, 0, INT_MAX, V|E}, #if FF_API_PRIVATE_OPT {"b_sensitivity", "adjust sensitivity of b_frame_strategy 1", OFFSET(b_sensitivity), AV_OPT_TYPE_INT, {.i64 = 40 }, 1, INT_MAX, V|E}, @@ -449,56 +412,6 @@ static const AVOption avcodec_options[] = { {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, -{"color_primaries", "color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64 = AVCOL_PRI_UNSPECIFIED }, 1, AVCOL_PRI_NB-1, V|E|D, "color_primaries_type"}, -{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"bt470m", "BT.470 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT470M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"bt470bg", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT470BG }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"film", "Film", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_FILM }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"bt2020", "BT.2020", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_BT2020 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"smpte428_1", "SMPTE ST 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_PRI_SMPTEST428_1 }, INT_MIN, INT_MAX, V|E|D, "color_primaries_type"}, -{"color_trc", "color transfer characteristics", OFFSET(color_trc), AV_OPT_TYPE_INT, {.i64 = AVCOL_TRC_UNSPECIFIED }, 1, AVCOL_TRC_NB-1, V|E|D, "color_trc_type"}, -{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT709 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"gamma22", "BT.470 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_GAMMA22 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"gamma28", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_GAMMA28 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"linear", "Linear", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LINEAR }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"log", "Log", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"log_sqrt", "Log square root", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_LOG_SQRT }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"iec61966_2_4", "IEC 61966-2-4", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_4 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"bt1361", "BT.1361", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT1361_ECG }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"iec61966_2_1", "IEC 61966-2-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_IEC61966_2_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"bt2020_10bit", "BT.2020 - 10 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_10 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"bt2020_12bit", "BT.2020 - 12 bit", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_BT2020_12 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"smpte2084", "SMPTE ST 2084", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTEST2084 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"smpte428_1", "SMPTE ST 428-1", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_TRC_SMPTEST428_1 }, INT_MIN, INT_MAX, V|E|D, "color_trc_type"}, -{"colorspace", "color space", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64 = AVCOL_SPC_UNSPECIFIED }, 0, AVCOL_SPC_NB-1, V|E|D, "colorspace_type"}, -{"rgb", "RGB", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_RGB }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"bt709", "BT.709", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT709 }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"fcc", "FCC", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_FCC }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"bt470bg", "BT.470 BG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT470BG }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"smpte170m", "SMPTE 170 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_SMPTE170M }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"smpte240m", "SMPTE 240 M", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_SMPTE240M }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"ycocg", "YCOCG", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_YCOCG }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"bt2020_ncl", "BT.2020 NCL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_NCL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"bt2020_cl", "BT.2020 CL", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_SPC_BT2020_CL }, INT_MIN, INT_MAX, V|E|D, "colorspace_type"}, -{"color_range", "color range", OFFSET(color_range), AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, AVCOL_RANGE_NB-1, V|E|D, "color_range_type"}, -{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, -{"mpeg", "MPEG (219*2^(n-8))", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, -{"jpeg", "JPEG (2^n-1)", 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG }, INT_MIN, INT_MAX, V|E|D, "color_range_type"}, -{"chroma_sample_location", "chroma sample location", OFFSET(chroma_sample_location), AV_OPT_TYPE_INT, {.i64 = AVCHROMA_LOC_UNSPECIFIED }, 0, AVCHROMA_LOC_NB-1, V|E|D, "chroma_sample_location_type"}, -{"unspecified", "Unspecified", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_UNSPECIFIED }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"left", "Left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_LEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"center", "Center", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_CENTER }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"topleft", "Top-left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_TOPLEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"top", "Top", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_TOP }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"bottomleft", "Bottom-left", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_BOTTOMLEFT }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, -{"bottom", "Bottom", 0, AV_OPT_TYPE_CONST, {.i64 = AVCHROMA_LOC_BOTTOM }, INT_MIN, INT_MAX, V|E|D, "chroma_sample_location_type"}, {"log_level_offset", "set the log level offset", OFFSET(log_level_offset), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX }, {"slices", "set the number of slices, used in parallelized encoding", OFFSET(slices), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, V|E}, {"thread_type", "select multithreading type", OFFSET(thread_type), AV_OPT_TYPE_FLAGS, {.i64 = FF_THREAD_SLICE|FF_THREAD_FRAME }, 0, INT_MAX, V|A|E|D, "thread_type"}, @@ -516,26 +429,10 @@ static const AVOption avcodec_options[] = { {"ka", "Karaoke", 0, AV_OPT_TYPE_CONST, {.i64 = AV_AUDIO_SERVICE_TYPE_KARAOKE }, INT_MIN, INT_MAX, A|E, "audio_service_type"}, {"request_sample_fmt", "sample format audio decoders should prefer", OFFSET(request_sample_fmt), AV_OPT_TYPE_SAMPLE_FMT, {.i64=AV_SAMPLE_FMT_NONE}, -1, INT_MAX, A|D, "request_sample_fmt"}, {"pkt_timebase", NULL, OFFSET(pkt_timebase), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0}, -{"sub_charenc", "set input text subtitles character encoding", OFFSET(sub_charenc), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, S|D}, -{"sub_charenc_mode", "set input text subtitles character encoding mode", OFFSET(sub_charenc_mode), AV_OPT_TYPE_FLAGS, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, -1, INT_MAX, S|D, "sub_charenc_mode"}, -{"do_nothing", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_DO_NOTHING}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, -{"auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_AUTOMATIC}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, -{"pre_decoder", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_SUB_CHARENC_MODE_PRE_DECODER}, INT_MIN, INT_MAX, S|D, "sub_charenc_mode"}, {"refcounted_frames", NULL, OFFSET(refcounted_frames), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, A|V|D }, #if FF_API_SIDEDATA_ONLY_PKT {"side_data_only_packets", NULL, OFFSET(side_data_only_packets), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, A|V|E }, #endif -{"skip_alpha", "Skip processing alpha", OFFSET(skip_alpha), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, V|D }, -{"field_order", "Field order", OFFSET(field_order), AV_OPT_TYPE_INT, {.i64 = AV_FIELD_UNKNOWN }, 0, 5, V|D|E, "field_order" }, -{"progressive", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_PROGRESSIVE }, 0, 0, V|D|E, "field_order" }, -{"tt", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_TT }, 0, 0, V|D|E, "field_order" }, -{"bb", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_BB }, 0, 0, V|D|E, "field_order" }, -{"tb", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_TB }, 0, 0, V|D|E, "field_order" }, -{"bt", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_FIELD_BT }, 0, 0, V|D|E, "field_order" }, -{"dump_separator", "set information dump field separator", OFFSET(dump_separator), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, A|V|S|D|E}, -{"codec_whitelist", "List of decoders that are allowed to be used", OFFSET(codec_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, A|V|S|D }, -{"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 }, -{"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str=NULL}, 0, INT_MAX, 0 }, {NULL}, }; diff --git a/ext/at3_standalone/pixdesc.h b/ext/at3_standalone/pixdesc.h deleted file mode 100644 index b1d218db48..0000000000 --- a/ext/at3_standalone/pixdesc.h +++ /dev/null @@ -1,394 +0,0 @@ -/* - * pixel format descriptor - * Copyright (c) 2009 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVUTIL_PIXDESC_H -#define AVUTIL_PIXDESC_H - -#include - -#include "attributes.h" -#include "pixfmt.h" -#include "version.h" - -typedef struct AVComponentDescriptor { - /** - * Which of the 4 planes contains the component. - */ - int plane; - - /** - * Number of elements between 2 horizontally consecutive pixels. - * Elements are bits for bitstream formats, bytes otherwise. - */ - int step; - - /** - * Number of elements before the component of the first pixel. - * Elements are bits for bitstream formats, bytes otherwise. - */ - int offset; - - /** - * Number of least significant bits that must be shifted away - * to get the value. - */ - int shift; - - /** - * Number of bits in the component. - */ - int depth; - -#if FF_API_PLUS1_MINUS1 - /** deprecated, use step instead */ - attribute_deprecated int step_minus1; - - /** deprecated, use depth instead */ - attribute_deprecated int depth_minus1; - - /** deprecated, use offset instead */ - attribute_deprecated int offset_plus1; -#endif -} AVComponentDescriptor; - -/** - * Descriptor that unambiguously describes how the bits of a pixel are - * stored in the up to 4 data planes of an image. It also stores the - * subsampling factors and number of components. - * - * @note This is separate of the colorspace (RGB, YCbCr, YPbPr, JPEG-style YUV - * and all the YUV variants) AVPixFmtDescriptor just stores how values - * are stored not what these values represent. - */ -typedef struct AVPixFmtDescriptor { - const char *name; - uint8_t nb_components; ///< The number of components each pixel has, (1-4) - - /** - * Amount to shift the luma width right to find the chroma width. - * For YV12 this is 1 for example. - * chroma_width = -((-luma_width) >> log2_chroma_w) - * The note above is needed to ensure rounding up. - * This value only refers to the chroma components. - */ - uint8_t log2_chroma_w; ///< chroma_width = -((-luma_width )>>log2_chroma_w) - - /** - * Amount to shift the luma height right to find the chroma height. - * For YV12 this is 1 for example. - * chroma_height= -((-luma_height) >> log2_chroma_h) - * The note above is needed to ensure rounding up. - * This value only refers to the chroma components. - */ - uint8_t log2_chroma_h; - - /** - * Combination of AV_PIX_FMT_FLAG_... flags. - */ - uint64_t flags; - - /** - * Parameters that describe how pixels are packed. - * If the format has 1 or 2 components, then luma is 0. - * If the format has 3 or 4 components: - * if the RGB flag is set then 0 is red, 1 is green and 2 is blue; - * otherwise 0 is luma, 1 is chroma-U and 2 is chroma-V. - * - * If present, the Alpha channel is always the last component. - */ - AVComponentDescriptor comp[4]; - - /** - * Alternative comma-separated names. - */ - const char *alias; -} AVPixFmtDescriptor; - -/** - * Pixel format is big-endian. - */ -#define AV_PIX_FMT_FLAG_BE (1 << 0) -/** - * Pixel format has a palette in data[1], values are indexes in this palette. - */ -#define AV_PIX_FMT_FLAG_PAL (1 << 1) -/** - * All values of a component are bit-wise packed end to end. - */ -#define AV_PIX_FMT_FLAG_BITSTREAM (1 << 2) -/** - * Pixel format is an HW accelerated format. - */ -#define AV_PIX_FMT_FLAG_HWACCEL (1 << 3) -/** - * At least one pixel component is not in the first data plane. - */ -#define AV_PIX_FMT_FLAG_PLANAR (1 << 4) -/** - * The pixel format contains RGB-like data (as opposed to YUV/grayscale). - */ -#define AV_PIX_FMT_FLAG_RGB (1 << 5) - -/** - * The pixel format is "pseudo-paletted". This means that it contains a - * fixed palette in the 2nd plane but the palette is fixed/constant for each - * PIX_FMT. This allows interpreting the data as if it was PAL8, which can - * in some cases be simpler. Or the data can be interpreted purely based on - * the pixel format without using the palette. - * An example of a pseudo-paletted format is AV_PIX_FMT_GRAY8 - */ -#define AV_PIX_FMT_FLAG_PSEUDOPAL (1 << 6) - -/** - * The pixel format has an alpha channel. This is set on all formats that - * support alpha in some way. The exception is AV_PIX_FMT_PAL8, which can - * carry alpha as part of the palette. Details are explained in the - * AVPixelFormat enum, and are also encoded in the corresponding - * AVPixFmtDescriptor. - * - * The alpha is always straight, never pre-multiplied. - * - * If a codec or a filter does not support alpha, it should set all alpha to - * opaque, or use the equivalent pixel formats without alpha component, e.g. - * AV_PIX_FMT_RGB0 (or AV_PIX_FMT_RGB24 etc.) instead of AV_PIX_FMT_RGBA. - */ -#define AV_PIX_FMT_FLAG_ALPHA (1 << 7) - -/** - * Read a line from an image, and write the values of the - * pixel format component c to dst. - * - * @param data the array containing the pointers to the planes of the image - * @param linesize the array containing the linesizes of the image - * @param desc the pixel format descriptor for the image - * @param x the horizontal coordinate of the first pixel to read - * @param y the vertical coordinate of the first pixel to read - * @param w the width of the line to read, that is the number of - * values to write to dst - * @param read_pal_component if not zero and the format is a paletted - * format writes the values corresponding to the palette - * component c in data[1] to dst, rather than the palette indexes in - * data[0]. The behavior is undefined if the format is not paletted. - */ -void av_read_image_line(uint16_t *dst, const uint8_t *data[4], - const int linesize[4], const AVPixFmtDescriptor *desc, - int x, int y, int c, int w, int read_pal_component); - -/** - * Write the values from src to the pixel format component c of an - * image line. - * - * @param src array containing the values to write - * @param data the array containing the pointers to the planes of the - * image to write into. It is supposed to be zeroed. - * @param linesize the array containing the linesizes of the image - * @param desc the pixel format descriptor for the image - * @param x the horizontal coordinate of the first pixel to write - * @param y the vertical coordinate of the first pixel to write - * @param w the width of the line to write, that is the number of - * values to write to the image line - */ -void av_write_image_line(const uint16_t *src, uint8_t *data[4], - const int linesize[4], const AVPixFmtDescriptor *desc, - int x, int y, int c, int w); - -/** - * Return the pixel format corresponding to name. - * - * If there is no pixel format with name name, then looks for a - * pixel format with the name corresponding to the native endian - * format of name. - * For example in a little-endian system, first looks for "gray16", - * then for "gray16le". - * - * Finally if no pixel format has been found, returns AV_PIX_FMT_NONE. - */ -enum AVPixelFormat av_get_pix_fmt(const char *name); - -/** - * Return the short name for a pixel format, NULL in case pix_fmt is - * unknown. - * - * @see av_get_pix_fmt(), av_get_pix_fmt_string() - */ -const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt); - -/** - * Print in buf the string corresponding to the pixel format with - * number pix_fmt, or a header if pix_fmt is negative. - * - * @param buf the buffer where to write the string - * @param buf_size the size of buf - * @param pix_fmt the number of the pixel format to print the - * corresponding info string, or a negative value to print the - * corresponding header. - */ -char *av_get_pix_fmt_string(char *buf, int buf_size, - enum AVPixelFormat pix_fmt); - -/** - * Return the number of bits per pixel used by the pixel format - * described by pixdesc. Note that this is not the same as the number - * of bits per sample. - * - * The returned number of bits refers to the number of bits actually - * used for storing the pixel information, that is padding bits are - * not counted. - */ -int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc); - -/** - * Return the number of bits per pixel for the pixel format - * described by pixdesc, including any padding or unused bits. - */ -int av_get_padded_bits_per_pixel(const AVPixFmtDescriptor *pixdesc); - -/** - * @return a pixel format descriptor for provided pixel format or NULL if - * this pixel format is unknown. - */ -const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt); - -/** - * Iterate over all pixel format descriptors known to libavutil. - * - * @param prev previous descriptor. NULL to get the first descriptor. - * - * @return next descriptor or NULL after the last descriptor - */ -const AVPixFmtDescriptor *av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev); - -/** - * @return an AVPixelFormat id described by desc, or AV_PIX_FMT_NONE if desc - * is not a valid pointer to a pixel format descriptor. - */ -enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc); - -/** - * Utility function to access log2_chroma_w log2_chroma_h from - * the pixel format AVPixFmtDescriptor. - * - * See av_get_chroma_sub_sample() for a function that asserts a - * valid pixel format instead of returning an error code. - * Its recommended that you use avcodec_get_chroma_sub_sample unless - * you do check the return code! - * - * @param[in] pix_fmt the pixel format - * @param[out] h_shift store log2_chroma_w (horizontal/width shift) - * @param[out] v_shift store log2_chroma_h (vertical/height shift) - * - * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format - */ -int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, - int *h_shift, int *v_shift); - -/** - * @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a - * valid pixel format. - */ -int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt); - -/** - * Utility function to swap the endianness of a pixel format. - * - * @param[in] pix_fmt the pixel format - * - * @return pixel format with swapped endianness if it exists, - * otherwise AV_PIX_FMT_NONE - */ -enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt); - -#define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ -#define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ -#define FF_LOSS_COLORSPACE 0x0004 /**< loss due to color space conversion */ -#define FF_LOSS_ALPHA 0x0008 /**< loss of alpha bits */ -#define FF_LOSS_COLORQUANT 0x0010 /**< loss due to color quantization */ -#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */ - -/** - * Compute what kind of losses will occur when converting from one specific - * pixel format to another. - * When converting from one pixel format to another, information loss may occur. - * For example, when converting from RGB24 to GRAY, the color information will - * be lost. Similarly, other losses occur when converting from some formats to - * other formats. These losses can involve loss of chroma, but also loss of - * resolution, loss of color depth, loss due to the color space conversion, loss - * of the alpha bits or loss due to color quantization. - * av_get_fix_fmt_loss() informs you about the various types of losses - * which will occur when converting from one pixel format to another. - * - * @param[in] dst_pix_fmt destination pixel format - * @param[in] src_pix_fmt source pixel format - * @param[in] has_alpha Whether the source pixel format alpha channel is used. - * @return Combination of flags informing you what kind of losses will occur - * (maximum loss for an invalid dst_pix_fmt). - */ -int av_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, - enum AVPixelFormat src_pix_fmt, - int has_alpha); - -/** - * Compute what kind of losses will occur when converting from one specific - * pixel format to another. - * When converting from one pixel format to another, information loss may occur. - * For example, when converting from RGB24 to GRAY, the color information will - * be lost. Similarly, other losses occur when converting from some formats to - * other formats. These losses can involve loss of chroma, but also loss of - * resolution, loss of color depth, loss due to the color space conversion, loss - * of the alpha bits or loss due to color quantization. - * av_get_fix_fmt_loss() informs you about the various types of losses - * which will occur when converting from one pixel format to another. - * - * @param[in] dst_pix_fmt destination pixel format - * @param[in] src_pix_fmt source pixel format - * @param[in] has_alpha Whether the source pixel format alpha channel is used. - * @return Combination of flags informing you what kind of losses will occur - * (maximum loss for an invalid dst_pix_fmt). - */ -enum AVPixelFormat av_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2, - enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr); - -/** - * @return the name for provided color range or NULL if unknown. - */ -const char *av_color_range_name(enum AVColorRange range); - -/** - * @return the name for provided color primaries or NULL if unknown. - */ -const char *av_color_primaries_name(enum AVColorPrimaries primaries); - -/** - * @return the name for provided color transfer or NULL if unknown. - */ -const char *av_color_transfer_name(enum AVColorTransferCharacteristic transfer); - -/** - * @return the name for provided color space or NULL if unknown. - */ -const char *av_color_space_name(enum AVColorSpace space); - -/** - * @return the name for provided chroma location or NULL if unknown. - */ -const char *av_chroma_location_name(enum AVChromaLocation location); - -#endif /* AVUTIL_PIXDESC_H */ diff --git a/ext/at3_standalone/pixfmt.h b/ext/at3_standalone/pixfmt.h deleted file mode 100644 index 0a4fa6681f..0000000000 --- a/ext/at3_standalone/pixfmt.h +++ /dev/null @@ -1,473 +0,0 @@ -/* - * copyright (c) 2006 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVUTIL_PIXFMT_H -#define AVUTIL_PIXFMT_H - -/** - * @file - * pixel format definitions - * - */ - -// #include "libavutil/avconfig.h" -#include "version.h" - -#define AVPALETTE_SIZE 1024 -#define AVPALETTE_COUNT 256 - -/** - * Pixel format. - * - * @note - * AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA - * color is put together as: - * (A << 24) | (R << 16) | (G << 8) | B - * This is stored as BGRA on little-endian CPU architectures and ARGB on - * big-endian CPUs. - * - * @par - * When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized - * image data is stored in AVFrame.data[0]. The palette is transported in - * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is - * formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is - * also endian-specific). Note also that the individual RGB32 palette - * components stored in AVFrame.data[1] should be in the range 0..255. - * This is important as many custom PAL8 video codecs that were designed - * to run on the IBM VGA graphics adapter use 6-bit palette components. - * - * @par - * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like - * for pal8. This palette is filled in automatically by the function - * allocating the picture. - */ -enum AVPixelFormat { - AV_PIX_FMT_NONE = -1, - AV_PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples) - AV_PIX_FMT_YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr - AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB... - AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR... - AV_PIX_FMT_YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) - AV_PIX_FMT_YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples) - AV_PIX_FMT_YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples) - AV_PIX_FMT_YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) - AV_PIX_FMT_GRAY8, ///< Y , 8bpp - AV_PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb - AV_PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb - AV_PIX_FMT_PAL8, ///< 8 bit with AV_PIX_FMT_RGB32 palette - AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range - AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range - AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range -#if FF_API_XVMC - AV_PIX_FMT_XVMC_MPEG2_MC,///< XVideo Motion Acceleration via common packet passing - AV_PIX_FMT_XVMC_MPEG2_IDCT, -#define AV_PIX_FMT_XVMC AV_PIX_FMT_XVMC_MPEG2_IDCT -#endif /* FF_API_XVMC */ - AV_PIX_FMT_UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1 - AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3 - AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) - AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits - AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb) - AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb) - AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits - AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb) - AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V) - AV_PIX_FMT_NV21, ///< as above, but U and V bytes are swapped - - AV_PIX_FMT_ARGB, ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB... - AV_PIX_FMT_RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA... - AV_PIX_FMT_ABGR, ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR... - AV_PIX_FMT_BGRA, ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA... - - AV_PIX_FMT_GRAY16BE, ///< Y , 16bpp, big-endian - AV_PIX_FMT_GRAY16LE, ///< Y , 16bpp, little-endian - AV_PIX_FMT_YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples) - AV_PIX_FMT_YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range - AV_PIX_FMT_YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples) -#if FF_API_VDPAU - AV_PIX_FMT_VDPAU_H264,///< H.264 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - AV_PIX_FMT_VDPAU_MPEG1,///< MPEG-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - AV_PIX_FMT_VDPAU_MPEG2,///< MPEG-2 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - AV_PIX_FMT_VDPAU_WMV3,///< WMV3 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - AV_PIX_FMT_VDPAU_VC1, ///< VC-1 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers -#endif - AV_PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian - AV_PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian - - AV_PIX_FMT_RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian - AV_PIX_FMT_RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian - AV_PIX_FMT_RGB555BE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined - AV_PIX_FMT_RGB555LE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined - - AV_PIX_FMT_BGR565BE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian - AV_PIX_FMT_BGR565LE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian - AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined - AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined - -#if FF_API_VAAPI - /** @name Deprecated pixel formats */ - /**@{*/ - AV_PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers - AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers - AV_PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers - /**@}*/ - AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, -#else - /** - * Hardware acceleration through VA-API, data[3] contains a - * VASurfaceID. - */ - AV_PIX_FMT_VAAPI, -#endif - - AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian - AV_PIX_FMT_YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian -#if FF_API_VDPAU - AV_PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers -#endif - AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer - - AV_PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined - AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined - AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined - AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined - AV_PIX_FMT_YA8, ///< 8bit gray, 8bit alpha - - AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 - AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8 - - AV_PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian - AV_PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian - - /** - * The following 12 formats have the disadvantage of needing 1 format for each bit depth. - * Notice that each 9/10 bits sample is stored in 16 bits with extra padding. - * If you want to support multiple bit depths, then using AV_PIX_FMT_YUV420P16* with the bpp stored separately is better. - */ - AV_PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian - AV_PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - AV_PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian - AV_PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - AV_PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - AV_PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian - AV_PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - AV_PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian - AV_PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_VDA_VLD, ///< hardware decoding through VDA - AV_PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp - AV_PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big-endian - AV_PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little-endian - AV_PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big-endian - AV_PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little-endian - AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big-endian - AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little-endian - AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples) - AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples) - AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian - AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian - AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian - AV_PIX_FMT_YUVA422P9LE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian - AV_PIX_FMT_YUVA444P9BE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian - AV_PIX_FMT_YUVA444P9LE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian - AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian) - AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian) - AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian) - AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian) - AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian) - AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian) - AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian) - AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian) - AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian) - AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian) - AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian) - AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian) - - AV_PIX_FMT_VDPAU, ///< HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface - - AV_PIX_FMT_XYZ12LE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0 - AV_PIX_FMT_XYZ12BE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0 - AV_PIX_FMT_NV16, ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) - AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - - AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian - AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian - AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian - AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian - - AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb - - AV_PIX_FMT_VDA, ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef - - AV_PIX_FMT_YA16BE, ///< 16bit gray, 16bit alpha (big-endian) - AV_PIX_FMT_YA16LE, ///< 16bit gray, 16bit alpha (little-endian) - - AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp - AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian - AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian - /** - * HW acceleration through QSV, data[3] contains a pointer to the - * mfxFrameSurface1 structure. - */ - AV_PIX_FMT_QSV, - /** - * HW acceleration though MMAL, data[3] contains a pointer to the - * MMAL_BUFFER_HEADER_T structure. - */ - AV_PIX_FMT_MMAL, - - AV_PIX_FMT_D3D11VA_VLD, ///< HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer - - AV_PIX_FMT_0RGB=0x123+4,///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined - AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined - AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined - AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined - - AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian - AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - AV_PIX_FMT_YUV420P14BE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian - AV_PIX_FMT_YUV420P14LE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian - AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_YUV422P14BE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian - AV_PIX_FMT_YUV422P14LE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian - AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian - AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - AV_PIX_FMT_YUV444P14BE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian - AV_PIX_FMT_YUV444P14LE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian - AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian - AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian - AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian - AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian - AV_PIX_FMT_YUVJ411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range - - AV_PIX_FMT_BAYER_BGGR8, ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples */ - AV_PIX_FMT_BAYER_RGGB8, ///< bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples */ - AV_PIX_FMT_BAYER_GBRG8, ///< bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples */ - AV_PIX_FMT_BAYER_GRBG8, ///< bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples */ - AV_PIX_FMT_BAYER_BGGR16LE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian */ - AV_PIX_FMT_BAYER_BGGR16BE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian */ - AV_PIX_FMT_BAYER_RGGB16LE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian */ - AV_PIX_FMT_BAYER_RGGB16BE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian */ - AV_PIX_FMT_BAYER_GBRG16LE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian */ - AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian */ - AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian */ - AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian */ -#if !FF_API_XVMC - AV_PIX_FMT_XVMC,///< XVideo Motion Acceleration via common packet passing -#endif /* !FF_API_XVMC */ - AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian - AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian - AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian - AV_PIX_FMT_YUV440P12BE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian - AV_PIX_FMT_AYUV64LE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian - AV_PIX_FMT_AYUV64BE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian - - AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox - - AV_PIX_FMT_P010LE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian - AV_PIX_FMT_P010BE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian - - AV_PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions -}; - -#define AV_PIX_FMT_Y400A AV_PIX_FMT_GRAY8A -#define AV_PIX_FMT_GBR24P AV_PIX_FMT_GBRP - -#if AV_HAVE_BIGENDIAN -# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##be -#else -# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le -#endif - -#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA) -#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR) -#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA) -#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB) -#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0) -#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0) - -#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE) -#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE) -#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE) -#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE) -#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE) -#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE) -#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE) -#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE) -#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE) -#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE) -#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE) -#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE) - -#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE) -#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE) -#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE) -#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE) -#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE) -#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE) -#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE) -#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE) -#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE) -#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE) -#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE) -#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE) -#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE) -#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE) -#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE) -#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE) -#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE) - -#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE) -#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE) -#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE) -#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE) -#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE) -#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE) - -#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE) -#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE) -#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE) -#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE) - - -#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE) -#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE) -#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE) -#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE) -#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE) -#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE) -#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE) -#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE) -#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE) - -#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE) -#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE) -#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE) -#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE) - -/** - * Chromaticity coordinates of the source primaries. - */ -enum AVColorPrimaries { - AVCOL_PRI_RESERVED0 = 0, - AVCOL_PRI_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B - AVCOL_PRI_UNSPECIFIED = 2, - AVCOL_PRI_RESERVED = 3, - AVCOL_PRI_BT470M = 4, ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20) - - AVCOL_PRI_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM - AVCOL_PRI_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC - AVCOL_PRI_SMPTE240M = 7, ///< functionally identical to above - AVCOL_PRI_FILM = 8, ///< colour filters using Illuminant C - AVCOL_PRI_BT2020 = 9, ///< ITU-R BT2020 - AVCOL_PRI_SMPTEST428_1= 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ) - AVCOL_PRI_NB, ///< Not part of ABI -}; - -/** - * Color Transfer Characteristic. - */ -enum AVColorTransferCharacteristic { - AVCOL_TRC_RESERVED0 = 0, - AVCOL_TRC_BT709 = 1, ///< also ITU-R BT1361 - AVCOL_TRC_UNSPECIFIED = 2, - AVCOL_TRC_RESERVED = 3, - AVCOL_TRC_GAMMA22 = 4, ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM - AVCOL_TRC_GAMMA28 = 5, ///< also ITU-R BT470BG - AVCOL_TRC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC - AVCOL_TRC_SMPTE240M = 7, - AVCOL_TRC_LINEAR = 8, ///< "Linear transfer characteristics" - AVCOL_TRC_LOG = 9, ///< "Logarithmic transfer characteristic (100:1 range)" - AVCOL_TRC_LOG_SQRT = 10, ///< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)" - AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4 - AVCOL_TRC_BT1361_ECG = 12, ///< ITU-R BT1361 Extended Colour Gamut - AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC) - AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10 bit system - AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12 bit system - AVCOL_TRC_SMPTEST2084 = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems - AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1 - AVCOL_TRC_NB, ///< Not part of ABI -}; - -/** - * YUV colorspace type. - */ -enum AVColorSpace { - AVCOL_SPC_RGB = 0, ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB) - AVCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B - AVCOL_SPC_UNSPECIFIED = 2, - AVCOL_SPC_RESERVED = 3, - AVCOL_SPC_FCC = 4, ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20) - AVCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 - AVCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above - AVCOL_SPC_SMPTE240M = 7, - AVCOL_SPC_YCOCG = 8, ///< Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16 - AVCOL_SPC_BT2020_NCL = 9, ///< ITU-R BT2020 non-constant luminance system - AVCOL_SPC_BT2020_CL = 10, ///< ITU-R BT2020 constant luminance system - AVCOL_SPC_NB, ///< Not part of ABI -}; -#define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG - - -/** - * MPEG vs JPEG YUV range. - */ -enum AVColorRange { - AVCOL_RANGE_UNSPECIFIED = 0, - AVCOL_RANGE_MPEG = 1, ///< the normal 219*2^(n-8) "MPEG" YUV ranges - AVCOL_RANGE_JPEG = 2, ///< the normal 2^n-1 "JPEG" YUV ranges - AVCOL_RANGE_NB, ///< Not part of ABI -}; - -/** - * Location of chroma samples. - * - * Illustration showing the location of the first (top left) chroma sample of the - * image, the left shows only luma, the right - * shows the location of the chroma sample, the 2 could be imagined to overlay - * each other but are drawn separately due to limitations of ASCII - * - * 1st 2nd 1st 2nd horizontal luma sample positions - * v v v v - * ______ ______ - *1st luma line > |X X ... |3 4 X ... X are luma samples, - * | |1 2 1-6 are possible chroma positions - *2nd luma line > |X X ... |5 6 X ... 0 is undefined/unknown position - */ -enum AVChromaLocation { - AVCHROMA_LOC_UNSPECIFIED = 0, - AVCHROMA_LOC_LEFT = 1, ///< mpeg2/4 4:2:0, h264 default for 4:2:0 - AVCHROMA_LOC_CENTER = 2, ///< mpeg1 4:2:0, jpeg 4:2:0, h263 4:2:0 - AVCHROMA_LOC_TOPLEFT = 3, ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2 - AVCHROMA_LOC_TOP = 4, - AVCHROMA_LOC_BOTTOMLEFT = 5, - AVCHROMA_LOC_BOTTOM = 6, - AVCHROMA_LOC_NB, ///< Not part of ABI -}; - -#endif /* AVUTIL_PIXFMT_H */ diff --git a/ext/at3_standalone/rdft.c b/ext/at3_standalone/rdft.c deleted file mode 100644 index 1e1fe96bef..0000000000 --- a/ext/at3_standalone/rdft.c +++ /dev/null @@ -1,136 +0,0 @@ -/* - * (I)RDFT transforms - * Copyright (c) 2009 Alex Converse - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include -#include - -#include "mathematics.h" -#include "rdft.h" - -/** - * @file - * (Inverse) Real Discrete Fourier Transforms. - */ - -/* sin(2*pi*x/n) for 0<=xnbits; - const float k1 = 0.5; - const float k2 = 0.5 - s->inverse; - const FFTSample *tcos = s->tcos; - const FFTSample *tsin = s->tsin; - - if (!s->inverse) { - s->fft.fft_permute(&s->fft, (FFTComplex*)data); - s->fft.fft_calc(&s->fft, (FFTComplex*)data); - } - /* i=0 is a special case because of packing, the DC term is real, so we - are going to throw the N/2 term (also real) in with it. */ - ev.re = data[0]; - data[0] = ev.re+data[1]; - data[1] = ev.re-data[1]; - for (i = 1; i < (n>>2); i++) { - i1 = 2*i; - i2 = n-i1; - /* Separate even and odd FFTs */ - ev.re = k1*(data[i1 ]+data[i2 ]); - od.im = -k2*(data[i1 ]-data[i2 ]); - ev.im = k1*(data[i1+1]-data[i2+1]); - od.re = k2*(data[i1+1]+data[i2+1]); - /* Apply twiddle factors to the odd FFT and add to the even FFT */ - data[i1 ] = ev.re + od.re*tcos[i] - od.im*tsin[i]; - data[i1+1] = ev.im + od.im*tcos[i] + od.re*tsin[i]; - data[i2 ] = ev.re - od.re*tcos[i] + od.im*tsin[i]; - data[i2+1] = -ev.im + od.im*tcos[i] + od.re*tsin[i]; - } - data[2*i+1]=s->sign_convention*data[2*i+1]; - if (s->inverse) { - data[0] *= k1; - data[1] *= k1; - s->fft.fft_permute(&s->fft, (FFTComplex*)data); - s->fft.fft_calc(&s->fft, (FFTComplex*)data); - } -} - -av_cold int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans) -{ - int n = 1 << nbits; - int ret; - - s->nbits = nbits; - s->inverse = trans == IDFT_C2R || trans == DFT_C2R; - s->sign_convention = trans == IDFT_R2C || trans == DFT_C2R ? 1 : -1; - - if (nbits < 4 || nbits > 16) - return AVERROR(EINVAL); - - if ((ret = ff_fft_init(&s->fft, nbits-1, trans == IDFT_C2R || trans == IDFT_R2C)) < 0) - return ret; - - ff_init_ff_cos_tabs(nbits); - s->tcos = ff_cos_tabs[nbits]; - s->tsin = ff_sin_tabs[nbits]+(trans == DFT_R2C || trans == DFT_C2R)*(n>>2); -#if !CONFIG_HARDCODED_TABLES - { - int i; - const double theta = (trans == DFT_R2C || trans == DFT_C2R ? -1 : 1) * 2 * M_PI / n; - for (i = 0; i < (n >> 2); i++) - s->tsin[i] = sin(i * theta); - } -#endif - s->rdft_calc = rdft_calc_c; - - if (ARCH_ARM) ff_rdft_init_arm(s); - - return 0; -} - -av_cold void ff_rdft_end(RDFTContext *s) -{ - ff_fft_end(&s->fft); -} diff --git a/ext/at3_standalone/rdft.h b/ext/at3_standalone/rdft.h deleted file mode 100644 index 37c40e7c80..0000000000 --- a/ext/at3_standalone/rdft.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * (I)RDFT transforms - * Copyright (c) 2009 Alex Converse - * - * 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 - */ - -#if !defined(AVCODEC_RDFT_H) && (!defined(FFT_FLOAT) || FFT_FLOAT) -#define AVCODEC_RDFT_H - -#include "config.h" -#include "fft.h" - -#if CONFIG_HARDCODED_TABLES -# define SINTABLE_CONST const -#else -# define SINTABLE_CONST -#endif - -#define SINTABLE(size) \ - SINTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_sin_##size)[size/2] - -extern SINTABLE(16); -extern SINTABLE(32); -extern SINTABLE(64); -extern SINTABLE(128); -extern SINTABLE(256); -extern SINTABLE(512); -extern SINTABLE(1024); -extern SINTABLE(2048); -extern SINTABLE(4096); -extern SINTABLE(8192); -extern SINTABLE(16384); -extern SINTABLE(32768); -extern SINTABLE(65536); - -struct RDFTContext { - int nbits; - int inverse; - int sign_convention; - - /* pre/post rotation tables */ - const FFTSample *tcos; - SINTABLE_CONST FFTSample *tsin; - FFTContext fft; - void (*rdft_calc)(struct RDFTContext *s, FFTSample *z); -}; - -/** - * Set up a real FFT. - * @param nbits log2 of the length of the input array - * @param trans the type of transform - */ -int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans); -void ff_rdft_end(RDFTContext *s); - -void ff_rdft_init_arm(RDFTContext *s); - - -#endif /* AVCODEC_RDFT_H */ diff --git a/ext/at3_standalone/util_internal.h b/ext/at3_standalone/util_internal.h index 3a69614c65..5fe851381e 100644 --- a/ext/at3_standalone/util_internal.h +++ b/ext/at3_standalone/util_internal.h @@ -38,7 +38,6 @@ #include "attributes.h" #include "dict.h" #include "macros.h" -#include "pixfmt.h" #include "version.h" #if ARCH_X86 @@ -213,16 +212,6 @@ # define ONLY_IF_THREADS_ENABLED(x) NULL #endif -/** - * Log a generic warning message about a missing feature. - * - * @param[in] avc a pointer to an arbitrary struct of which the first - * field is a pointer to an AVClass struct - * @param[in] msg string containing the name of the missing feature - */ -void avpriv_report_missing_feature(void *avc, - const char *msg, ...) av_printf_format(2, 3); - /** * Log a generic warning message about a missing feature. * Additionally request that a sample showcasing the feature be uploaded. @@ -232,7 +221,7 @@ void avpriv_report_missing_feature(void *avc, * @param[in] msg string containing the name of the missing feature */ void avpriv_request_sample(void *avc, - const char *msg, ...) av_printf_format(2, 3); + const char *msg, ...); #if HAVE_LIBC_MSVCRT #include diff --git a/ext/at3_standalone/utils.c b/ext/at3_standalone/utils.c index 6ed989c988..8189d35a64 100644 --- a/ext/at3_standalone/utils.c +++ b/ext/at3_standalone/utils.c @@ -27,14 +27,12 @@ #include "util_internal.h" #include "config.h" -#include "atomic.h" #include "avcodec.h" #include "attributes.h" #include "channel_layout.h" #include "frame.h" #include "internal.h" #include "mathematics.h" -#include "pixdesc.h" #include "avstring.h" #include "samplefmt.h" #include "dict.h" @@ -47,56 +45,8 @@ #include #include #include -#if CONFIG_ICONV -# include -#endif -#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS -static int default_lockmgr_cb(void **arg, enum AVLockOp op) -{ - void * volatile * mutex = arg; - int err; - - switch (op) { - case AV_LOCK_CREATE: - return 0; - case AV_LOCK_OBTAIN: - if (!*mutex) { - pthread_mutex_t *tmp = av_malloc(sizeof(pthread_mutex_t)); - if (!tmp) - return AVERROR(ENOMEM); - if ((err = pthread_mutex_init(tmp, NULL))) { - av_free(tmp); - return AVERROR(err); - } - if (avpriv_atomic_ptr_cas(mutex, NULL, tmp)) { - pthread_mutex_destroy(tmp); - av_free(tmp); - } - } - - if ((err = pthread_mutex_lock(*mutex))) - return AVERROR(err); - - return 0; - case AV_LOCK_RELEASE: - if ((err = pthread_mutex_unlock(*mutex))) - return AVERROR(err); - - return 0; - case AV_LOCK_DESTROY: - if (*mutex) - pthread_mutex_destroy(*mutex); - av_free(*mutex); - avpriv_atomic_ptr_cas(mutex, *mutex, NULL); - return 0; - } - return 1; -} -static int (*lockmgr_cb)(void **mutex, enum AVLockOp op) = default_lockmgr_cb; -#else static int (*lockmgr_cb)(void **mutex, enum AVLockOp op) = NULL; -#endif volatile int ff_avcodec_locked; @@ -159,21 +109,6 @@ int av_codec_is_decoder(const AVCodec *codec) return codec && codec->decode; } -av_cold void avcodec_register(AVCodec *codec) -{ - AVCodec **p; - avcodec_init(); - p = last_avcodec; - codec->next = NULL; - - while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, codec)) - p = &(*p)->next; - last_avcodec = &codec->next; - - if (codec->init_static_data) - codec->init_static_data(codec); -} - #if FF_API_EMU_EDGE unsigned avcodec_get_edge_width(void) { @@ -181,26 +116,6 @@ unsigned avcodec_get_edge_width(void) } #endif -int ff_side_data_update_matrix_encoding(AVFrame *frame, - enum AVMatrixEncoding matrix_encoding) -{ - AVFrameSideData *side_data; - enum AVMatrixEncoding *data; - - side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_MATRIXENCODING); - if (!side_data) - side_data = av_frame_new_side_data(frame, AV_FRAME_DATA_MATRIXENCODING, - sizeof(enum AVMatrixEncoding)); - - if (!side_data) - return AVERROR(ENOMEM); - - data = (enum AVMatrixEncoding*)side_data->data; - *data = matrix_encoding; - - return 0; -} - int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf, int buf_size, int align) @@ -344,70 +259,20 @@ int avcodec_default_get_buffer2(AVCodecContext *avctx, AVFrame *frame, int flags } } -static int add_metadata_from_side_data(AVPacket *avpkt, AVFrame *frame) -{ - int size; - const uint8_t *side_metadata; - - AVDictionary **frame_md = avpriv_frame_get_metadatap(frame); - - side_metadata = av_packet_get_side_data(avpkt, - AV_PKT_DATA_STRINGS_METADATA, &size); - return av_packet_unpack_dictionary(side_metadata, size, frame_md); -} - int ff_init_buffer_info(AVCodecContext *avctx, AVFrame *frame) { AVPacket *pkt = avctx->internal->pkt; int i; - static const struct { - enum AVPacketSideDataType packet; - enum AVFrameSideDataType frame; - } sd[] = { - { AV_PKT_DATA_REPLAYGAIN , AV_FRAME_DATA_REPLAYGAIN }, - { AV_PKT_DATA_DISPLAYMATRIX, AV_FRAME_DATA_DISPLAYMATRIX }, - { AV_PKT_DATA_STEREO3D, AV_FRAME_DATA_STEREO3D }, - { AV_PKT_DATA_AUDIO_SERVICE_TYPE, AV_FRAME_DATA_AUDIO_SERVICE_TYPE }, - }; - + if (pkt) { - frame->pkt_pts = pkt->pts; av_frame_set_pkt_pos (frame, pkt->pos); av_frame_set_pkt_duration(frame, pkt->duration); av_frame_set_pkt_size (frame, pkt->size); - - for (i = 0; i < FF_ARRAY_ELEMS(sd); i++) { - int size; - uint8_t *packet_sd = av_packet_get_side_data(pkt, sd[i].packet, &size); - if (packet_sd) { - AVFrameSideData *frame_sd = av_frame_new_side_data(frame, - sd[i].frame, - size); - if (!frame_sd) - return AVERROR(ENOMEM); - - memcpy(frame_sd->data, packet_sd, size); - } - } - add_metadata_from_side_data(pkt, frame); } else { - frame->pkt_pts = AV_NOPTS_VALUE; av_frame_set_pkt_pos (frame, -1); av_frame_set_pkt_duration(frame, 0); av_frame_set_pkt_size (frame, -1); } - frame->reordered_opaque = avctx->reordered_opaque; - - if (frame->color_primaries == AVCOL_PRI_UNSPECIFIED) - frame->color_primaries = avctx->color_primaries; - if (frame->color_trc == AVCOL_TRC_UNSPECIFIED) - frame->color_trc = avctx->color_trc; - if (av_frame_get_colorspace(frame) == AVCOL_SPC_UNSPECIFIED) - av_frame_set_colorspace(frame, avctx->colorspace); - if (av_frame_get_color_range(frame) == AVCOL_RANGE_UNSPECIFIED) - av_frame_set_color_range(frame, avctx->color_range); - if (frame->chroma_location == AVCHROMA_LOC_UNSPECIFIED) - frame->chroma_location = avctx->chroma_sample_location; switch (avctx->codec->type) { case AVMEDIA_TYPE_VIDEO: @@ -448,7 +313,6 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame) static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags) { - const AVHWAccel *hwaccel = avctx->hwaccel; int override_dimensions = 1; int ret; @@ -456,14 +320,6 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags) if (ret < 0) return ret; - if (hwaccel) { - if (hwaccel->alloc_frame) { - ret = hwaccel->alloc_frame(avctx, frame); - goto end; - } - } else - avctx->sw_pix_fmt = avctx->pix_fmt; - ret = avctx->get_buffer2(avctx, frame, flags); end: @@ -472,12 +328,7 @@ end: int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags) { - int ret = get_buffer_internal(avctx, frame, flags); - if (ret < 0) { - av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); - frame->width = frame->height = 0; - } - return ret; + return get_buffer_internal(avctx, frame, flags); } int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2), void *arg, int *ret, int count, int size) @@ -504,92 +355,14 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, return 0; } -enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt) -{ - while (*fmt != AV_PIX_FMT_NONE) - ++fmt; - return fmt[0]; -} - -static AVHWAccel *find_hwaccel(enum AVCodecID codec_id, - enum AVPixelFormat pix_fmt) -{ - AVHWAccel *hwaccel = NULL; - - while ((hwaccel = av_hwaccel_next(hwaccel))) - if (hwaccel->id == codec_id - && hwaccel->pix_fmt == pix_fmt) - return hwaccel; - return NULL; -} - -static int setup_hwaccel(AVCodecContext *avctx, - const enum AVPixelFormat fmt, - const char *name) -{ - AVHWAccel *hwa = find_hwaccel(avctx->codec_id, fmt); - int ret = 0; - - if (avctx->active_thread_type & FF_THREAD_FRAME) { - av_log(avctx, AV_LOG_WARNING, - "Hardware accelerated decoding with frame threading is known to be unstable and its use is discouraged.\n"); - } - - if (!hwa) { - av_log(avctx, AV_LOG_ERROR, - "Could not find an AVHWAccel for the pixel format: %s", - name); - return AVERROR(ENOENT); - } - - if (hwa->capabilities & HWACCEL_CODEC_CAP_EXPERIMENTAL && - avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { - av_log(avctx, AV_LOG_WARNING, "Ignoring experimental hwaccel: %s\n", - hwa->name); - return AVERROR_PATCHWELCOME; - } - - if (hwa->priv_data_size) { - avctx->internal->hwaccel_priv_data = av_mallocz(hwa->priv_data_size); - if (!avctx->internal->hwaccel_priv_data) - return AVERROR(ENOMEM); - } - - if (hwa->init) { - ret = hwa->init(avctx); - if (ret < 0) { - av_freep(&avctx->internal->hwaccel_priv_data); - return ret; - } - } - - avctx->hwaccel = hwa; - - return 0; -} - MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase) -MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor) -MAKE_ACCESSORS(AVCodecContext, codec, int, lowres) MAKE_ACCESSORS(AVCodecContext, codec, int, seek_preroll) -MAKE_ACCESSORS(AVCodecContext, codec, uint16_t*, chroma_intra_matrix) unsigned av_codec_get_codec_properties(const AVCodecContext *codec) { return codec->properties; } -int av_codec_get_max_lowres(const AVCodec *codec) -{ - return codec->max_lowres; -} - -static void get_subtitle_defaults(AVSubtitle *sub) -{ - memset(sub, 0, sizeof(*sub)); - sub->pts = AV_NOPTS_VALUE; -} - static int64_t get_bit_rate(AVCodecContext *ctx) { int64_t bit_rate; @@ -628,15 +401,10 @@ int attribute_align_arg ff_codec_open2_recursive(AVCodecContext *avctx, const AV int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options) { int ret = 0; - const AVPixFmtDescriptor *pixdesc; if (avcodec_is_open(avctx)) return 0; - if ((!codec && !avctx->codec)) { - av_log(avctx, AV_LOG_ERROR, "No codec provided to avcodec_open2()\n"); - return AVERROR(EINVAL); - } if ((codec && avctx->codec && codec != avctx->codec)) { av_log(avctx, AV_LOG_ERROR, "This AVCodecContext was allocated for %s, " "but %s passed to avcodec_open2()\n", avctx->codec->name, codec->name); @@ -709,7 +477,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code goto free_and_end; } avctx->frame_number = 0; - avctx->codec_descriptor = avcodec_descriptor_get(avctx->codec_id); if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { @@ -733,19 +500,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code avctx->time_base.den = avctx->sample_rate; } - if (!HAVE_THREADS) - av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n"); - if (!HAVE_THREADS && !(codec->capabilities & AV_CODEC_CAP_AUTO_THREADS)) avctx->thread_count = 1; - if (avctx->codec->max_lowres < avctx->lowres || avctx->lowres < 0) { - av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", - avctx->codec->max_lowres); - ret = AVERROR(EINVAL); - goto free_and_end; - } - #if FF_API_VISMV if (avctx->debug_mv) av_log(avctx, AV_LOG_WARNING, "The 'vismv' option is deprecated, " @@ -758,11 +515,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code avctx->pts_correction_last_pts = avctx->pts_correction_last_dts = INT64_MIN; - if ( !CONFIG_GRAY && avctx->flags & AV_CODEC_FLAG_GRAY - && avctx->codec_descriptor->type == AVMEDIA_TYPE_VIDEO) - av_log(avctx, AV_LOG_WARNING, - "gray decoding requested but not enabled at configuration time\n"); - if ( avctx->codec->init && (!(avctx->active_thread_type&FF_THREAD_FRAME) || avctx->internal->frame_thread_encoder)) { ret = avctx->codec->init(avctx); @@ -902,19 +654,9 @@ av_cold int avcodec_close(AVCodecContext *avctx) for (i = 0; i < FF_ARRAY_ELEMS(pool->pools); i++) av_buffer_pool_uninit(&pool->pools[i]); av_freep(&avctx->internal->pool); - - if (avctx->hwaccel && avctx->hwaccel->uninit) - avctx->hwaccel->uninit(avctx); - av_freep(&avctx->internal->hwaccel_priv_data); - av_freep(&avctx->internal); } - for (i = 0; i < avctx->nb_coded_side_data; i++) - av_freep(&avctx->coded_side_data[i].data); - av_freep(&avctx->coded_side_data); - avctx->nb_coded_side_data = 0; - if (avctx->priv_data && avctx->codec && avctx->codec->priv_class) av_opt_free(avctx->priv_data); av_opt_free(avctx); @@ -998,54 +740,6 @@ AVCodec *avcodec_find_decoder_by_name(const char *name) return NULL; } -const char *avcodec_get_name(enum AVCodecID id) -{ - const AVCodecDescriptor *cd; - AVCodec *codec; - - if (id == AV_CODEC_ID_NONE) - return "none"; - cd = avcodec_descriptor_get(id); - if (cd) - return cd->name; - av_log(NULL, AV_LOG_WARNING, "Codec 0x%x is not in the full list.\n", id); - codec = avcodec_find_decoder(id); - if (codec) - return codec->name; - codec = avcodec_find_encoder(id); - if (codec) - return codec->name; - return "unknown_codec"; -} - -const char *av_get_profile_name(const AVCodec *codec, int profile) -{ - const AVProfile *p; - if (profile == FF_PROFILE_UNKNOWN || !codec->profiles) - return NULL; - - for (p = codec->profiles; p->profile != FF_PROFILE_UNKNOWN; p++) - if (p->profile == profile) - return p->name; - - return NULL; -} - -const char *avcodec_profile_name(enum AVCodecID codec_id, int profile) -{ - const AVCodecDescriptor *desc = avcodec_descriptor_get(codec_id); - const AVProfile *p; - - if (profile == FF_PROFILE_UNKNOWN || !desc || !desc->profiles) - return NULL; - - for (p = desc->profiles; p->profile != FF_PROFILE_UNKNOWN; p++) - if (p->profile == profile) - return p->name; - - return NULL; -} - void avcodec_flush_buffers(AVCodecContext *avctx) { if (avctx->codec->flush) @@ -1394,22 +1088,6 @@ void av_log_ask_for_sample(void *avc, const char *msg, ...) FF_ENABLE_DEPRECATION_WARNINGS #endif /* FF_API_MISSING_SAMPLE */ -static AVHWAccel *first_hwaccel = NULL; -static AVHWAccel **last_hwaccel = &first_hwaccel; - -void av_register_hwaccel(AVHWAccel *hwaccel) -{ - AVHWAccel **p = last_hwaccel; - hwaccel->next = NULL; - while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, hwaccel)) - p = &(*p)->next; - last_hwaccel = &hwaccel->next; -} - -AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel) -{ - return hwaccel ? hwaccel->next : first_hwaccel; -} int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) { @@ -1453,17 +1131,6 @@ int ff_lock_avcodec(AVCodecContext *log_ctx, const AVCodec *codec) return -1; } - if (avpriv_atomic_int_add_and_fetch(&entangled_thread_counter, 1) != 1) { - av_log(log_ctx, AV_LOG_ERROR, - "Insufficient thread locking. At least %d threads are " - "calling avcodec_open2() at the same time right now.\n", - entangled_thread_counter); - if (!lockmgr_cb) - av_log(log_ctx, AV_LOG_ERROR, "No lock manager is set, please see av_lockmgr_register()\n"); - ff_avcodec_locked = 1; - ff_unlock_avcodec(codec); - return AVERROR(EINVAL); - } av_assert0(!ff_avcodec_locked); ff_avcodec_locked = 1; return 0; @@ -1476,7 +1143,6 @@ int ff_unlock_avcodec(const AVCodec *codec) av_assert0(ff_avcodec_locked); ff_avcodec_locked = 0; - avpriv_atomic_int_add_and_fetch(&entangled_thread_counter, -1); if (lockmgr_cb) { if ((*lockmgr_cb)(&codec_mutex, AV_LOCK_RELEASE)) return -1; @@ -1562,29 +1228,3 @@ AVCPBProperties *av_cpb_properties_alloc(size_t *size) return props; } - -AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx) -{ - AVPacketSideData *tmp; - AVCPBProperties *props; - size_t size; - - props = av_cpb_properties_alloc(&size); - if (!props) - return NULL; - - tmp = av_realloc_array(avctx->coded_side_data, avctx->nb_coded_side_data + 1, sizeof(*tmp)); - if (!tmp) { - av_freep(&props); - return NULL; - } - - avctx->coded_side_data = tmp; - avctx->nb_coded_side_data++; - - avctx->coded_side_data[avctx->nb_coded_side_data - 1].type = AV_PKT_DATA_CPB_PROPERTIES; - avctx->coded_side_data[avctx->nb_coded_side_data - 1].data = (uint8_t*)props; - avctx->coded_side_data[avctx->nb_coded_side_data - 1].size = size; - - return props; -}