FFmpeg: libavcodec/tests/avcodec.c Source File

FFmpeg
avcodec.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include "libavutil/opt.h"
20 #include "libavutil/pixdesc.h"
21 #include "libavcodec/codec.h"
22 #include "libavcodec/codec_desc.h"
23 #include "libavcodec/codec_internal.h"
24 
25  static const char *get_type_string(enum AVMediaType type)
26 {
27  const char *ret = av_get_media_type_string(type);
28  return ret ? ret : "unknown";
29 }
30 
31  #define AV_LOG(...) av_log(NULL, AV_LOG_FATAL, __VA_ARGS__)
32  #define ERR_INTERNAL(msg, ...) \
33 do { \
34  AV_LOG(msg, codec->name __VA_ARGS__); \
35  ret = 1; \
36 } while (0)
37  #define ERR(msg) ERR_INTERNAL(msg, )
38  #define ERR_EXT(msg, ...) ERR_INTERNAL(msg, , __VA_ARGS__)
39 
40  static int priv_data_size_wrong(const FFCodec *codec)
41 {
42  if (codec->priv_data_size < 0 ||
43  codec->p.priv_class && codec->priv_data_size < sizeof(AVClass*))
44  return 1;
45  if (!codec->p.priv_class || !codec->p.priv_class->option)
46  return 0;
47  for (const AVOption *opt = codec->p.priv_class->option; opt->name; opt++) {
48  if (opt->offset >= codec->priv_data_size ||
49  opt->type == AV_OPT_TYPE_CONST && opt->offset != 0 ||
50  opt->type != AV_OPT_TYPE_CONST && (opt->offset < sizeof(AVClass*) || opt->offset < 0)) {
51  AV_LOG("Option %s offset %d nonsensical\n",
52  opt->name, opt->offset);
53  return 1;
54  }
55  }
56  return 0;
57 }
58 
59  #define ARRAY_CHECK(field, var, type, is_sentinel, check, sentinel_check) \
60 do { \
61  const type *ptr = codec->field; \
62  if (!ptr) \
63  break; \
64  type var = *ptr; \
65  if (is_sentinel) { \
66  ERR("Codec %s sets " #field ", but without valid elements.\n"); \
67  break; \
68  } \
69  do { \
70  if (!(check)) { \
71  ERR("Codec's %s " #field " array contains invalid element\n");\
72  break; \
73  } \
74  ++ptr; \
75  var = *ptr; \
76  } while (!(is_sentinel)); \
77  if (!(sentinel_check)) { \
78  ERR("Codec's %s " #field " array has malformed sentinel\n"); \
79  break; \
80  } \
81 } while (0)
82 
83  int main(void){
84  void *iter = NULL;
85  const AVCodec *codec = NULL;
86  int ret = 0;
87 
88  while (codec = av_codec_iterate(&iter)) {
89  const FFCodec *const codec2 = ffcodec(codec);
90  const AVCodecDescriptor *desc;
91  int is_decoder = 0, is_encoder = 0;
92 
93  if (!codec->name) {
94  AV_LOG("Codec for format %s has no name\n",
95  avcodec_get_name(codec->id));
96  ret = 1;
97  continue;
98  }
99  if (codec->type != AVMEDIA_TYPE_VIDEO &&
100  codec->type != AVMEDIA_TYPE_AUDIO &&
101  codec->type != AVMEDIA_TYPE_SUBTITLE)
102  ERR_EXT("Codec %s has unsupported type %s\n",
103  get_type_string(codec->type));
104  if (codec->type != AVMEDIA_TYPE_AUDIO) {
105 FF_DISABLE_DEPRECATION_WARNINGS
106  if (codec->ch_layouts || codec->sample_fmts ||
107  codec->supported_samplerates)
108  ERR("Non-audio codec %s has audio-only fields set\n");
109 FF_ENABLE_DEPRECATION_WARNINGS
110  if (codec->capabilities & (AV_CODEC_CAP_SMALL_LAST_FRAME |
111  AV_CODEC_CAP_CHANNEL_CONF |
112  AV_CODEC_CAP_VARIABLE_FRAME_SIZE))
113  ERR("Non-audio codec %s has audio-only capabilities set\n");
114  } else {
115 FF_DISABLE_DEPRECATION_WARNINGS
116  ARRAY_CHECK(supported_samplerates, sample_rate, int, sample_rate == 0,
117  sample_rate > 0, 1);
118  ARRAY_CHECK(sample_fmts, sample_fmt, enum AVSampleFormat, sample_fmt == AV_SAMPLE_FMT_NONE,
119  (unsigned)sample_fmt < AV_SAMPLE_FMT_NB, 1);
120  static const AVChannelLayout zero_channel_layout = { 0 };
121  ARRAY_CHECK(ch_layouts, ch_layout, AVChannelLayout, ch_layout.nb_channels == 0,
122  av_channel_layout_check(&ch_layout), !memcmp(ptr, &zero_channel_layout, sizeof(ch_layout)));
123 FF_ENABLE_DEPRECATION_WARNINGS
124  }
125  if (codec->type != AVMEDIA_TYPE_VIDEO) {
126 FF_DISABLE_DEPRECATION_WARNINGS
127  if (codec->pix_fmts || codec->supported_framerates ||
128  codec2->color_ranges || codec2->alpha_modes)
129  ERR("Non-video codec %s has video-only fields set\n");
130 FF_ENABLE_DEPRECATION_WARNINGS
131  if (codec2->caps_internal & FF_CODEC_CAP_EXPORTS_CROPPING)
132  ERR("Non-video codec %s exports cropping\n");
133  }
134  if (codec2->caps_internal & FF_CODEC_CAP_SLICE_THREAD_HAS_MF &&
135  !(codec->capabilities & AV_CODEC_CAP_SLICE_THREADS))
136  ERR("Codec %s wants mainfunction despite not being "
137  "slice-threading capable");
138  if (codec2->caps_internal & FF_CODEC_CAP_AUTO_THREADS &&
139  !(codec->capabilities & (AV_CODEC_CAP_FRAME_THREADS |
140  AV_CODEC_CAP_SLICE_THREADS |
141  AV_CODEC_CAP_OTHER_THREADS)))
142  ERR("Codec %s has private-only threading support\n");
143 
144  switch (codec2->cb_type) {
145  case FF_CODEC_CB_TYPE_DECODE:
146  case FF_CODEC_CB_TYPE_DECODE_SUB:
147  case FF_CODEC_CB_TYPE_RECEIVE_FRAME:
148  is_decoder = 1;
149  break;
150  case FF_CODEC_CB_TYPE_ENCODE:
151  case FF_CODEC_CB_TYPE_ENCODE_SUB:
152  case FF_CODEC_CB_TYPE_RECEIVE_PACKET:
153  is_encoder = 1;
154  break;
155  default:
156  ERR("Codec %s has unknown cb_type\n");
157  continue;
158  }
159  if (is_decoder != av_codec_is_decoder(codec) ||
160  is_encoder != av_codec_is_encoder(codec)) {
161  ERR("Codec %s cb_type and av_codec_is_(de|en)coder inconsistent.\n");
162  continue;
163  }
164 #define CHECK(TYPE, type) (codec2->cb_type == FF_CODEC_CB_TYPE_ ## TYPE && !codec2->cb.type)
165  if (CHECK(DECODE, decode) || CHECK(DECODE_SUB, decode_sub) ||
166  CHECK(RECEIVE_PACKET, receive_packet) ||
167  CHECK(ENCODE, encode) || CHECK(ENCODE_SUB, encode_sub) ||
168  CHECK(RECEIVE_FRAME, receive_frame)) {
169  ERR_EXT("Codec %s does not implement its %s callback.\n",
170  is_decoder ? "decoding" : "encoding");
171  }
172 #undef CHECK
173  if (is_encoder) {
174  if ((codec->type == AVMEDIA_TYPE_SUBTITLE) != (codec2->cb_type == FF_CODEC_CB_TYPE_ENCODE_SUB))
175  ERR("Encoder %s is both subtitle encoder and not subtitle encoder.");
176  if (codec2->update_thread_context || codec2->update_thread_context_for_user || codec2->bsfs)
177  ERR("Encoder %s has decoder-only thread functions or bsf.\n");
178  if (codec->type == AVMEDIA_TYPE_AUDIO) {
179 FF_DISABLE_DEPRECATION_WARNINGS
180  if (!codec->sample_fmts) {
181  av_log(NULL, AV_LOG_FATAL, "Encoder %s is missing the sample_fmts field\n", codec->name);
182  ret = 1;
183  }
184  } else if (codec->type == AVMEDIA_TYPE_VIDEO) {
185  ARRAY_CHECK(pix_fmts, pix_fmt, enum AVPixelFormat, pix_fmt == AV_PIX_FMT_NONE,
186  av_pix_fmt_desc_get(pix_fmt), 1);
187  ARRAY_CHECK(supported_framerates, framerate, AVRational, framerate.num == 0,
188  framerate.num > 0 && framerate.den > 0, framerate.den == 0);
189 FF_ENABLE_DEPRECATION_WARNINGS
190  }
191  if (codec2->caps_internal & (FF_CODEC_CAP_USES_PROGRESSFRAMES |
192  FF_CODEC_CAP_SETS_PKT_DTS |
193  FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM |
194  FF_CODEC_CAP_EXPORTS_CROPPING |
195  FF_CODEC_CAP_SETS_FRAME_PROPS) ||
196  codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING |
197  AV_CODEC_CAP_CHANNEL_CONF |
198  AV_CODEC_CAP_DRAW_HORIZ_BAND))
199  ERR("Encoder %s has decoder-only capabilities set\n");
200  if (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS &&
201  codec->capabilities & AV_CODEC_CAP_ENCODER_FLUSH)
202  ERR("Frame-threaded encoder %s claims to support flushing\n");
203  if (codec->capabilities & AV_CODEC_CAP_FRAME_THREADS &&
204  codec->capabilities & AV_CODEC_CAP_DELAY)
205  ERR("Frame-threaded encoder %s claims to have delay\n");
206 
207  if (codec2->caps_internal & FF_CODEC_CAP_EOF_FLUSH &&
208  !(codec->capabilities & AV_CODEC_CAP_DELAY))
209  ERR("EOF_FLUSH encoder %s is not marked as having delay\n");
210  } else {
211  if ((codec2->update_thread_context || codec2->update_thread_context_for_user) &&
212  !(codec->capabilities & AV_CODEC_CAP_FRAME_THREADS))
213  ERR("Non-frame-threaded decoder %s has update_thread_context set");
214  if ((codec->type == AVMEDIA_TYPE_SUBTITLE) != (codec2->cb_type == FF_CODEC_CB_TYPE_DECODE_SUB))
215  ERR("Subtitle decoder %s does not implement decode_sub callback\n");
216  if (codec->type == AVMEDIA_TYPE_SUBTITLE && codec2->bsfs)
217  ERR("Automatic bitstream filtering unsupported for subtitles; "
218  "yet decoder %s has it set\n");
219  if (codec->capabilities & (AV_CODEC_CAP_SMALL_LAST_FRAME |
220  AV_CODEC_CAP_VARIABLE_FRAME_SIZE |
221  AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE |
222  AV_CODEC_CAP_ENCODER_FLUSH))
223  ERR("Decoder %s has encoder-only capabilities\n");
224  if (codec2->cb_type != FF_CODEC_CB_TYPE_DECODE &&
225  codec2->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS)
226  ERR("Decoder %s is marked as setting pkt_dts when it doesn't have"
227  "any effect\n");
228 FF_DISABLE_DEPRECATION_WARNINGS
229  if (codec->type == AVMEDIA_TYPE_VIDEO && (codec->pix_fmts || codec->supported_framerates))
230  ERR("Decoder %s sets pix_fmts or supported_framerates.\n");
231 FF_ENABLE_DEPRECATION_WARNINGS
232  }
233  if (priv_data_size_wrong(codec2))
234  ERR_EXT("Private context of codec %s is impossibly-sized (size %d).",
235  codec2->priv_data_size);
236  if (!(desc = avcodec_descriptor_get(codec->id))) {
237  ERR("Codec %s lacks a corresponding descriptor\n");
238  } else if (desc->type != codec->type)
239  ERR_EXT("The type of AVCodec %s and its AVCodecDescriptor differ: "
240  "%s vs %s\n",
241  get_type_string(codec->type), get_type_string(desc->type));
242  }
243  return ret;
244 }
ERR
#define ERR(msg)
Definition: avcodec.c:37
FFCodec::update_thread_context
int(* update_thread_context)(struct AVCodecContext *dst, const struct AVCodecContext *src)
Copy necessary context variables from a previous thread context to the current one.
Definition: codec_internal.h:174
AVCodec
AVCodec.
Definition: codec.h:172
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:73
AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:203
FF_CODEC_CAP_SLICE_THREAD_HAS_MF
#define FF_CODEC_CAP_SLICE_THREAD_HAS_MF
Codec initializes slice-based threading with a main function.
Definition: codec_internal.h:64
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
opt.h
ENCODE
#define ENCODE(type, endian, src, dst, n, shift, offset)
Write PCM samples macro.
Definition: pcm.c:89
FF_CODEC_CB_TYPE_RECEIVE_PACKET
@ FF_CODEC_CB_TYPE_RECEIVE_PACKET
Definition: codec_internal.h:124
AVCodec::priv_class
const AVClass * priv_class
AVClass for the private context.
Definition: codec.h:206
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
av_pix_fmt_desc_get
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Definition: pixdesc.c:3456
FF_CODEC_CAP_EOF_FLUSH
#define FF_CODEC_CAP_EOF_FLUSH
The encoder has AV_CODEC_CAP_DELAY set, but does not actually have delay - it only wants to be flushe...
Definition: codec_internal.h:89
pixdesc.h
AVCodec::capabilities
int capabilities
Codec capabilities.
Definition: codec.h:191
AVOption
AVOption.
Definition: opt.h:429
FFCodec
Definition: codec_internal.h:127
FF_CODEC_CB_TYPE_ENCODE_SUB
@ FF_CODEC_CB_TYPE_ENCODE_SUB
Definition: codec_internal.h:121
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:329
AVCodec::supported_framerates
const attribute_deprecated AVRational * supported_framerates
Deprecated codec capabilities.
Definition: codec.h:198
FFCodec::priv_data_size
int priv_data_size
Definition: codec_internal.h:162
FFCodec::p
AVCodec p
The public AVCodec.
Definition: codec_internal.h:131
AVCodec::supported_samplerates
const attribute_deprecated int * supported_samplerates
Definition: codec.h:202
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
AV_CODEC_CAP_ENCODER_FLUSH
#define AV_CODEC_CAP_ENCODER_FLUSH
This encoder can be flushed using avcodec_flush_buffers().
Definition: codec.h:151
codec.h
FF_CODEC_CB_TYPE_DECODE
@ FF_CODEC_CB_TYPE_DECODE
Definition: codec_internal.h:109
FF_CODEC_CAP_USES_PROGRESSFRAMES
#define FF_CODEC_CAP_USES_PROGRESSFRAMES
The decoder might make use of the ProgressFrame API.
Definition: codec_internal.h:68
FFCodec::update_thread_context_for_user
int(* update_thread_context_for_user)(struct AVCodecContext *dst, const struct AVCodecContext *src)
Copy variables back to the user-facing context.
Definition: codec_internal.h:179
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:72
AVCodecDescriptor
This struct describes the properties of a single codec described by an AVCodecID.
Definition: codec_desc.h:38
priv_data_size_wrong
static int priv_data_size_wrong(const FFCodec *codec)
Definition: avcodec.c:40
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demux_decode.c:41
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:201
AV_CODEC_CAP_OTHER_THREADS
#define AV_CODEC_CAP_OTHER_THREADS
Codec supports multithreading through a method other than slice- or frame-level multithreading.
Definition: codec.h:109
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:144
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:296
FF_CODEC_CB_TYPE_ENCODE
@ FF_CODEC_CB_TYPE_ENCODE
Definition: codec_internal.h:118
receive_frame
static int receive_frame(AVFilterLink *inlink, AVFrame *out)
Definition: vf_lcevc.c:248
ARRAY_CHECK
#define ARRAY_CHECK(field, var, type, is_sentinel, check, sentinel_check)
Definition: avcodec.c:59
AV_CODEC_CAP_FRAME_THREADS
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: codec.h:95
framerate
float framerate
Definition: av1_levels.c:29
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:76
NULL
#define NULL
Definition: coverity.c:32
FFCodec::color_ranges
unsigned color_ranges
This field determines the video color ranges supported by an encoder.
Definition: codec_internal.h:147
AVCodec::type
enum AVMediaType type
Definition: codec.h:185
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
get_type_string
static const char * get_type_string(enum AVMediaType type)
Definition: avcodec.c:25
FF_CODEC_CB_TYPE_DECODE_SUB
@ FF_CODEC_CB_TYPE_DECODE_SUB
Definition: codec_internal.h:112
AV_CODEC_CAP_VARIABLE_FRAME_SIZE
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE
Audio encoder supports receiving a different number of samples in each call.
Definition: codec.h:113
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:91
av_codec_is_decoder
int av_codec_is_decoder(const AVCodec *codec)
Definition: utils.c:85
main
int main(void)
Definition: avcodec.c:83
AV_SAMPLE_FMT_NB
@ AV_SAMPLE_FMT_NB
Number of sample formats. DO NOT USE if linking dynamically.
Definition: samplefmt.h:71
AVMediaType
AVMediaType
Definition: avutil.h:198
AVCodec::ch_layouts
const attribute_deprecated AVChannelLayout * ch_layouts
Array of supported channel layouts, terminated with a zeroed layout.
Definition: codec.h:226
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:319
codec_internal.h
AVCodec::pix_fmts
attribute_deprecated enum AVPixelFormat * pix_fmts
Definition: codec.h:200
FF_CODEC_CAP_SETS_FRAME_PROPS
#define FF_CODEC_CAP_SETS_FRAME_PROPS
Codec handles output frame properties internally instead of letting the internal logic derive them fr...
Definition: codec_internal.h:77
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
FF_CODEC_CAP_EXPORTS_CROPPING
#define FF_CODEC_CAP_EXPORTS_CROPPING
The decoder sets the cropping fields in the output frames manually.
Definition: codec_internal.h:60
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
#define FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM
The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame sett...
Definition: codec_internal.h:54
ffcodec
static const av_always_inline FFCodec * ffcodec(const AVCodec *codec)
Definition: codec_internal.h:290
DECODE
#define DECODE(size, endian, src, dst, n, shift, offset)
Read PCM samples macro.
Definition: pcm.c:385
AVOption::name
const char * name
Definition: opt.h:430
ERR_EXT
#define ERR_EXT(msg,...)
Definition: avcodec.c:38
AV_LOG
#define AV_LOG(...)
Definition: avcodec.c:31
encode
static void encode(AVCodecContext *ctx, AVFrame *frame, AVPacket *pkt, FILE *output)
Definition: encode_audio.c:94
AV_CODEC_CAP_SLICE_THREADS
#define AV_CODEC_CAP_SLICE_THREADS
Codec supports slice-based (or partition-based) multithreading.
Definition: codec.h:99
AVCodec::id
enum AVCodecID id
Definition: codec.h:186
av_codec_is_encoder
int av_codec_is_encoder(const AVCodec *codec)
Definition: utils.c:79
avcodec_get_name
const char * avcodec_get_name(enum AVCodecID id)
Get the name of a codec.
Definition: utils.c:406
FFCodec::caps_internal
unsigned caps_internal
Internal codec capabilities FF_CODEC_CAP_*.
Definition: codec_internal.h:136
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
ch_layouts
static const AVChannelLayout ch_layouts[]
Definition: adpcmenc.c:956
AVCodec::name
const char * name
Name of the codec implementation.
Definition: codec.h:179
FF_CODEC_CAP_SETS_PKT_DTS
#define FF_CODEC_CAP_SETS_PKT_DTS
Decoders marked with FF_CODEC_CAP_SETS_PKT_DTS want to set AVFrame.pkt_dts manually.
Definition: codec_internal.h:49
AVCodec::sample_fmts
attribute_deprecated enum AVSampleFormat * sample_fmts
Definition: codec.h:204
av_codec_iterate
const AVCodec * av_codec_iterate(void **opaque)
Iterate over all registered codecs.
Definition: allcodecs.c:989
ret
ret
Definition: filter_design.txt:187
AV_LOG_FATAL
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
Definition: log.h:204
av_channel_layout_check
int av_channel_layout_check(const AVChannelLayout *channel_layout)
Check whether a channel layout is valid, i.e.
Definition: channel_layout.c:783
av_get_media_type_string
const char * av_get_media_type_string(enum AVMediaType media_type)
Return a string describing the media_type enum, NULL if media_type is unknown.
Definition: utils.c:28
AVClass::option
const struct AVOption * option
An array of options for the structure or NULL.
Definition: log.h:96
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:76
FF_CODEC_CB_TYPE_RECEIVE_FRAME
@ FF_CODEC_CB_TYPE_RECEIVE_FRAME
Definition: codec_internal.h:115
FFCodec::cb_type
unsigned cb_type
This field determines the type of the codec (decoder/encoder) and also the exact callback cb implemen...
Definition: codec_internal.h:160
FFCodec::bsfs
const char * bsfs
Decoding only, a comma-separated list of bitstream filters to apply to packets before decoding.
Definition: codec_internal.h:261
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:72
desc
const char * desc
Definition: libsvtav1.c:78
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:200
FF_CODEC_CAP_AUTO_THREADS
#define FF_CODEC_CAP_AUTO_THREADS
Codec handles avctx->thread_count == 0 (auto) internally.
Definition: codec_internal.h:72
FFCodec::alpha_modes
unsigned alpha_modes
This field determines the alpha modes supported by an encoder.
Definition: codec_internal.h:153
CHECK
#define CHECK(TYPE, type)
AV_CODEC_CAP_DRAW_HORIZ_BAND
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: codec.h:44
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AV_CODEC_CAP_AVOID_PROBING
#define AV_CODEC_CAP_AVOID_PROBING
Decoder is not a preferred choice for probing.
Definition: codec.h:123
avcodec_descriptor_get
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:3878
AV_CODEC_CAP_SMALL_LAST_FRAME
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
Definition: codec.h:81
codec_desc.h
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299

Generated on Tue Nov 18 2025 19:22:01 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /