FFmpeg
cbs_apv.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/mem.h"
20 #include "cbs.h"
21 #include "cbs_internal.h"
22 #include "cbs_apv.h"
23 
24 
26 {
27  switch (fh->frame_info.chroma_format_idc) {
29  return 1;
32  return 3;
34  return 4;
35  default:
36  av_assert0(0 && "Invalid chroma_format_idc");
37  }
38 }
39 
41  const APVRawFrameHeader *fh)
42 {
44  int frame_width_in_mbs = (fh->frame_info.frame_width + 15) / 16;
45  int frame_height_in_mbs = (fh->frame_info.frame_height + 15) / 16;
46  int tile_cols = (frame_width_in_mbs + fh->tile_info.tile_width_in_mbs - 1) / fh->tile_info.tile_width_in_mbs;
47  int tile_rows = (frame_height_in_mbs + fh->tile_info.tile_height_in_mbs - 1) / fh->tile_info.tile_height_in_mbs;
48 
50 
51  priv->num_tiles = tile_cols * tile_rows;
52 }
53 
54 
55 #define HEADER(name) do { \
56  CBS_FUNC(trace_header)(ctx, name); \
57  } while (0)
58 
59 #define CHECK(call) do { \
60  err = (call); \
61  if (err < 0) \
62  return err; \
63  } while (0)
64 
65 #define SUBSCRIPTS(subs, ...) (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL)
66 
67 
68 #define u(width, name, range_min, range_max) \
69  xu(width, name, current->name, range_min, range_max, 0, )
70 #define ub(width, name) \
71  xu(width, name, current->name, 0, MAX_UINT_BITS(width), 0, )
72 #define us(width, name, range_min, range_max, subs, ...) \
73  xu(width, name, current->name, range_min, range_max, subs, __VA_ARGS__)
74 #define ubs(width, name, subs, ...) \
75  xu(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__)
76 
77 #define fixed(width, name, value) do { \
78  av_unused uint32_t fixed_value = value; \
79  xu(width, name, fixed_value, value, value, 0, ); \
80  } while (0)
81 
82 
83 #if CBS_READ
84 #define READ
85 #define READWRITE read
86 #define RWContext GetBitContext
87 #define FUNC(name) cbs_apv_read_ ## name
88 
89 #define xu(width, name, var, range_min, range_max, subs, ...) do { \
90  uint32_t value; \
91  CHECK(CBS_FUNC(read_unsigned)(ctx, rw, width, #name, \
92  SUBSCRIPTS(subs, __VA_ARGS__), \
93  &value, range_min, range_max)); \
94  var = value; \
95  } while (0)
96 
97 #define infer(name, value) do { \
98  current->name = value; \
99  } while (0)
100 
101 #define byte_alignment(rw) (get_bits_count(rw) % 8)
102 
103 #include "cbs_apv_syntax_template.c"
104 
105 #undef READ
106 #undef READWRITE
107 #undef RWContext
108 #undef FUNC
109 #undef xu
110 #undef infer
111 #undef byte_alignment
112 #endif // CBS_READ
113 
114 #if CBS_WRITE
115 #define WRITE
116 #define READWRITE write
117 #define RWContext PutBitContext
118 #define FUNC(name) cbs_apv_write_ ## name
119 
120 #define xu(width, name, var, range_min, range_max, subs, ...) do { \
121  uint32_t value = var; \
122  CHECK(CBS_FUNC(write_unsigned)(ctx, rw, width, #name, \
123  SUBSCRIPTS(subs, __VA_ARGS__), \
124  value, range_min, range_max)); \
125  } while (0)
126 
127 #define infer(name, value) do { \
128  if (current->name != (value)) { \
129  av_log(ctx->log_ctx, AV_LOG_ERROR, \
130  "%s does not match inferred value: " \
131  "%"PRId64", but should be %"PRId64".\n", \
132  #name, (int64_t)current->name, (int64_t)(value)); \
133  return AVERROR_INVALIDDATA; \
134  } \
135  } while (0)
136 
137 #define byte_alignment(rw) (put_bits_count(rw) % 8)
138 
139 #include "cbs_apv_syntax_template.c"
140 
141 #undef WRITE
142 #undef READWRITE
143 #undef RWContext
144 #undef FUNC
145 #undef xu
146 #undef infer
147 #undef byte_alignment
148 #endif // CBS_WRITE
149 
150 
153  int header)
154 {
155 #if CBS_READ
156  uint8_t *data = frag->data;
157  size_t size = frag->data_size;
158  uint32_t signature;
159  int err, trace;
160 
161  if (header || !frag->data_size) {
162  // Ignore empty or extradata fragments.
163  return 0;
164  }
165 
166  if (frag->data_size < 4) {
167  // Too small to be a valid fragment.
168  return AVERROR_INVALIDDATA;
169  }
170 
171  // Don't include parsing here in trace output.
172  trace = ctx->trace_enable;
173  ctx->trace_enable = 0;
174 
176  if (signature != APV_SIGNATURE) {
177  av_log(ctx->log_ctx, AV_LOG_ERROR,
178  "Invalid APV access unit: bad signature %08x.\n",
179  signature);
180  err = AVERROR_INVALIDDATA;
181  goto fail;
182  }
183  data += 4;
184  size -= 4;
185 
186  while (size > 0) {
187  GetBitContext gbc;
188  uint32_t pbu_size;
190 
191  if (size < 8) {
192  av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid PBU: "
193  "fragment too short (%"SIZE_SPECIFIER" bytes).\n",
194  size);
195  err = AVERROR_INVALIDDATA;
196  goto fail;
197  }
198 
199  pbu_size = AV_RB32(data);
200  if (pbu_size < 8) {
201  av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid PBU: "
202  "pbu_size too small (%"PRIu32" bytes).\n",
203  pbu_size);
204  err = AVERROR_INVALIDDATA;
205  goto fail;
206  }
207 
208  data += 4;
209  size -= 4;
210 
211  if (pbu_size > size) {
212  av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid PBU: "
213  "pbu_size too large (%"PRIu32" bytes).\n",
214  pbu_size);
215  err = AVERROR_INVALIDDATA;
216  goto fail;
217  }
218 
219  init_get_bits(&gbc, data, 8 * pbu_size);
220 
221  err = cbs_apv_read_pbu_header(ctx, &gbc, &pbu_header);
222  if (err < 0)
223  goto fail;
224 
225  // Could select/skip frames based on type/group_id here.
226 
227  err = CBS_FUNC(append_unit_data)(frag, pbu_header.pbu_type,
228  data, pbu_size, frag->data_ref);
229  if (err < 0)
230  goto fail;
231 
232  data += pbu_size;
233  size -= pbu_size;
234  }
235 
236  err = 0;
237 fail:
238  ctx->trace_enable = trace;
239  return err;
240 #else
241  return AVERROR(ENOSYS);
242 #endif
243 }
244 
246  CodedBitstreamUnit *unit)
247 {
248 #if CBS_READ
249  GetBitContext gbc;
250  int err;
251 
252  err = init_get_bits(&gbc, unit->data, 8 * unit->data_size);
253  if (err < 0)
254  return err;
255 
256  err = CBS_FUNC(alloc_unit_content)(ctx, unit);
257  if (err < 0)
258  return err;
259 
260  switch (unit->type) {
264  case APV_PBU_DEPTH_FRAME:
265  case APV_PBU_ALPHA_FRAME:
266  {
267  APVRawFrame *frame = unit->content;
268 
269  err = cbs_apv_read_frame(ctx, &gbc, frame);
270  if (err < 0)
271  return err;
272 
273  // Each tile inside the frame has pointers into the unit
274  // data buffer; make a single reference here for all of
275  // them together.
276  frame->tile_data_ref = av_buffer_ref(unit->data_ref);
277  if (!frame->tile_data_ref)
278  return AVERROR(ENOMEM);
279  }
280  break;
282  {
283  err = cbs_apv_read_au_info(ctx, &gbc, unit->content);
284  if (err < 0)
285  return err;
286  }
287  break;
288  case APV_PBU_METADATA:
289  {
290  err = cbs_apv_read_metadata(ctx, &gbc, unit->content);
291  if (err < 0)
292  return err;
293  }
294  break;
295  case APV_PBU_FILLER:
296  {
297  err = cbs_apv_read_filler(ctx, &gbc, unit->content);
298  if (err < 0)
299  return err;
300  }
301  break;
302  default:
303  return AVERROR(ENOSYS);
304  }
305 
306  return 0;
307 #else
308  return AVERROR(ENOSYS);
309 #endif
310 }
311 
313  CodedBitstreamUnit *unit,
314  PutBitContext *pbc)
315 {
316 #if CBS_WRITE
317  int err;
318 
319  switch (unit->type) {
323  case APV_PBU_DEPTH_FRAME:
324  case APV_PBU_ALPHA_FRAME:
325  {
326  APVRawFrame *frame = unit->content;
327 
328  err = cbs_apv_write_frame(ctx, pbc, frame);
329  if (err < 0)
330  return err;
331  }
332  break;
334  {
335  err = cbs_apv_write_au_info(ctx, pbc, unit->content);
336  if (err < 0)
337  return err;
338  }
339  break;
340  case APV_PBU_METADATA:
341  {
342  err = cbs_apv_write_metadata(ctx, pbc, unit->content);
343  if (err < 0)
344  return err;
345  }
346  break;
347  case APV_PBU_FILLER:
348  {
349  err = cbs_apv_write_filler(ctx, pbc, unit->content);
350  if (err < 0)
351  return err;
352  }
353  break;
354  default:
355  return AVERROR(ENOSYS);
356  }
357 
358  return 0;
359 #else
360  return AVERROR(ENOSYS);
361 #endif
362 }
363 
366 {
367 #if CBS_WRITE
368  size_t size = 4, pos;
369 
370  for (int i = 0; i < frag->nb_units; i++)
371  size += frag->units[i].data_size + 4;
372 
374  if (!frag->data_ref)
375  return AVERROR(ENOMEM);
376  frag->data = frag->data_ref->data;
377  memset(frag->data + size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
378 
379  AV_WB32(frag->data, APV_SIGNATURE);
380  pos = 4;
381  for (int i = 0; i < frag->nb_units; i++) {
382  AV_WB32(frag->data + pos, frag->units[i].data_size);
383  pos += 4;
384 
385  memcpy(frag->data + pos, frag->units[i].data,
386  frag->units[i].data_size);
387  pos += frag->units[i].data_size;
388  }
389  av_assert0(pos == size);
390  frag->data_size = size;
391 
392  return 0;
393 #else
394  return AVERROR(ENOSYS);
395 #endif
396 }
397 
398 
399 static void cbs_apv_free_metadata(AVRefStructOpaque unused, void *content)
400 {
401  APVRawMetadata *md = content;
402  av_assert0(md->pbu_header.pbu_type == APV_PBU_METADATA);
403 
404  for (int i = 0; i < md->metadata_count; i++) {
405  APVRawMetadataPayload *pl = &md->payloads[i];
406 
407  switch (pl->payload_type) {
408  case APV_METADATA_MDCV:
409  case APV_METADATA_CLL:
410  case APV_METADATA_FILLER:
411  break;
414  break;
417  break;
418  default:
420  }
421  }
422 }
423 
425  {
427  .unit_type.range = {
428  .start = APV_PBU_PRIMARY_FRAME,
429  .end = APV_PBU_ALPHA_FRAME,
430  },
431  .content_type = CBS_CONTENT_TYPE_INTERNAL_REFS,
432  .content_size = sizeof(APVRawFrame),
433  .type.ref = {
434  .nb_offsets = 1,
435  .offsets = { offsetof(APVRawFrame, tile_data_ref) -
436  sizeof(void*) },
437  },
438  },
439 
442 
445 
447 };
448 
449 const CodedBitstreamType CBS_FUNC(type_apv) = {
451 
452  .priv_data_size = sizeof(CodedBitstreamAPVContext),
453 
454  .unit_types = cbs_apv_unit_types,
455 
456  .split_fragment = &cbs_apv_split_fragment,
457  .read_unit = &cbs_apv_read_unit,
458  .write_unit = &cbs_apv_write_unit,
459  .assemble_fragment = &cbs_apv_assemble_fragment,
460 };
cbs.h
CBS_UNIT_TYPE_RANGE
@ CBS_UNIT_TYPE_RANGE
Definition: cbs_internal.h:92
cbs_apv_derive_tile_info
static void cbs_apv_derive_tile_info(CodedBitstreamContext *ctx, const APVRawFrameHeader *fh)
Definition: cbs_apv.c:40
CBS_UNIT_TYPE_COMPLEX
#define CBS_UNIT_TYPE_COMPLEX(type, structure, free_func)
Definition: cbs_internal.h:383
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
APV_PBU_NON_PRIMARY_FRAME
@ APV_PBU_NON_PRIMARY_FRAME
Definition: apv.h:28
AVBufferRef::data
uint8_t * data
The data buffer.
Definition: buffer.h:90
cbs_apv_read_unit
static int cbs_apv_read_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Definition: cbs_apv.c:245
AVRefStructOpaque
RefStruct is an API for creating reference-counted objects with minimal overhead.
Definition: refstruct.h:58
CodedBitstreamUnit::content
void * content
Pointer to the decomposed form of this unit.
Definition: cbs.h:114
md
#define md
Definition: vf_colormatrix.c:101
append_unit_data
int CBS_FUNC() append_unit_data(CodedBitstreamFragment *frag, CodedBitstreamUnitType type, uint8_t *data, size_t data_size, AVBufferRef *data_buf)
Add a new unit to a fragment with the given data bitstream.
Definition: cbs.c:865
cbs_apv_free_metadata
static void cbs_apv_free_metadata(AVRefStructOpaque unused, void *content)
Definition: cbs_apv.c:399
APV_CHROMA_FORMAT_4444
@ APV_CHROMA_FORMAT_4444
Definition: apv.h:50
APVRawAUInfo
Definition: cbs_apv.h:111
CodedBitstreamContext
Context structure for coded bitstream operations.
Definition: cbs.h:226
APVRawFrameInfo::frame_width
uint32_t frame_width
Definition: cbs_apv.h:48
data
const char data[16]
Definition: mxf.c:149
CodedBitstreamUnit::type
CodedBitstreamUnitType type
Codec-specific type of this unit.
Definition: cbs.h:81
av_buffer_ref
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
Definition: buffer.c:103
APVRawTileInfo::tile_width_in_mbs
uint32_t tile_width_in_mbs
Definition: cbs_apv.h:61
APV_MAX_TILE_COLS
@ APV_MAX_TILE_COLS
Definition: apv.h:75
APV_SIGNATURE
#define APV_SIGNATURE
Definition: apv.h:23
init_get_bits
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition: get_bits.h:512
CodedBitstreamUnit
Coded bitstream unit structure.
Definition: cbs.h:77
CBS_FUNC
const CodedBitstreamType CBS_FUNC(type_apv)
fail
#define fail()
Definition: checkasm.h:199
GetBitContext
Definition: get_bits.h:109
APVRawMetadataUndefined::data_ref
AVBufferRef * data_ref
Definition: cbs_apv.h:161
CBS_CONTENT_TYPE_INTERNAL_REFS
@ CBS_CONTENT_TYPE_INTERNAL_REFS
Definition: cbs_internal.h:77
cbs_apv_syntax_template.c
APV_METADATA_FILLER
@ APV_METADATA_FILLER
Definition: apv.h:85
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
alloc_unit_content
int CBS_FUNC() alloc_unit_content(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit)
Allocate a new internal content buffer matching the type of the unit.
Definition: cbs.c:938
CodedBitstreamUnit::data
uint8_t * data
Pointer to the directly-parsable bitstream form of this unit.
Definition: cbs.h:88
APVRawFrameHeader::frame_info
APVRawFrameInfo frame_info
Definition: cbs_apv.h:68
signature
static const char signature[]
Definition: ipmovie.c:592
CodedBitstreamFragment::units
CodedBitstreamUnit * units
Pointer to an array of units of length nb_units_allocated.
Definition: cbs.h:175
CodedBitstreamUnitTypeDescriptor
Definition: cbs_internal.h:95
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
CodedBitstreamFragment
Coded bitstream fragment structure, combining one or more units.
Definition: cbs.h:129
CodedBitstreamUnitTypeDescriptor::nb_unit_types
int nb_unit_types
Definition: cbs_internal.h:99
APV_PBU_ACCESS_UNIT_INFORMATION
@ APV_PBU_ACCESS_UNIT_INFORMATION
Definition: apv.h:32
CodedBitstreamFragment::data_size
size_t data_size
The number of bytes in the bitstream.
Definition: cbs.h:142
tile_rows
int tile_rows
Definition: h265_levels.c:217
cbs_apv_unit_types
static const CodedBitstreamUnitTypeDescriptor cbs_apv_unit_types[]
Definition: cbs_apv.c:424
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:41
APVRawTileInfo::tile_height_in_mbs
uint32_t tile_height_in_mbs
Definition: cbs_apv.h:62
tile_cols
int tile_cols
Definition: av1_levels.c:73
APVRawPBUHeader
Definition: cbs_apv.h:33
APV_METADATA_ITU_T_T35
@ APV_METADATA_ITU_T_T35
Definition: apv.h:82
ctx
AVFormatContext * ctx
Definition: movenc.c:49
cbs_internal.h
CodedBitstreamType::codec_id
enum AVCodecID codec_id
Definition: cbs_internal.h:142
PutBitContext
Definition: put_bits.h:50
APV_CHROMA_FORMAT_444
@ APV_CHROMA_FORMAT_444
Definition: apv.h:49
APV_PBU_DEPTH_FRAME
@ APV_PBU_DEPTH_FRAME
Definition: apv.h:30
APVRawMetadata
Definition: cbs_apv.h:178
av_buffer_unref
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
Definition: buffer.c:139
CodedBitstreamUnit::data_size
size_t data_size
The number of bytes in the bitstream (including any padding bits in the final byte).
Definition: cbs.h:93
CodedBitstreamAPVContext::num_tiles
uint16_t num_tiles
Definition: cbs_apv.h:194
cbs_apv_split_fragment
static int cbs_apv_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header)
Definition: cbs_apv.c:151
APV_METADATA_CLL
@ APV_METADATA_CLL
Definition: apv.h:84
APVRawFrame
Definition: cbs_apv.h:101
AV_WB32
#define AV_WB32(p, v)
Definition: intreadwrite.h:415
APV_PBU_PRIMARY_FRAME
@ APV_PBU_PRIMARY_FRAME
Definition: apv.h:27
APVRawMetadataPayload
Definition: cbs_apv.h:165
APVRawFrameInfo::frame_height
uint32_t frame_height
Definition: cbs_apv.h:49
APV_PBU_FILLER
@ APV_PBU_FILLER
Definition: apv.h:34
pbu_header
static int FUNC() pbu_header(CodedBitstreamContext *ctx, RWContext *rw, APVRawPBUHeader *current)
Definition: cbs_apv_syntax_template.c:19
APVRawFrameHeader
Definition: cbs_apv.h:67
size
int size
Definition: twinvq_data.h:10344
CodedBitstreamFragment::data
uint8_t * data
Pointer to the bitstream form of this fragment.
Definition: cbs.h:135
AV_RB32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:96
APVRawMetadataPayload::user_defined
APVRawMetadataUserDefined user_defined
Definition: cbs_apv.h:173
APVRawMetadataPayload::payload_type
uint32_t payload_type
Definition: cbs_apv.h:166
APVRawFrameInfo::chroma_format_idc
uint8_t chroma_format_idc
Definition: cbs_apv.h:50
header
static const uint8_t header[24]
Definition: sdr2.c:68
CodedBitstreamAPVContext
Definition: cbs_apv.h:190
APVRawMetadataUserDefined::data_ref
AVBufferRef * data_ref
Definition: cbs_apv.h:155
APVRawMetadataPayload::itu_t_t35
APVRawMetadataITUTT35 itu_t_t35
Definition: cbs_apv.h:169
CBS_UNIT_TYPE_POD
#define CBS_UNIT_TYPE_POD(type_, structure)
Definition: cbs_internal.h:339
APVRawFrameHeader::tile_info
APVRawTileInfo tile_info
Definition: cbs_apv.h:80
CodedBitstreamType
Definition: cbs_internal.h:141
av_buffer_alloc
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
Definition: buffer.c:77
APV_PBU_METADATA
@ APV_PBU_METADATA
Definition: apv.h:33
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
CodedBitstreamUnit::data_ref
AVBufferRef * data_ref
A reference to the buffer containing data.
Definition: cbs.h:105
cbs_apv_get_num_comp
static int cbs_apv_get_num_comp(const APVRawFrameHeader *fh)
Definition: cbs_apv.c:25
cbs_apv_assemble_fragment
static int cbs_apv_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_apv.c:364
CBS_UNIT_TYPE_END_OF_LIST
#define CBS_UNIT_TYPE_END_OF_LIST
Definition: cbs_internal.h:386
AV_CODEC_ID_APV
@ AV_CODEC_ID_APV
Definition: codec_id.h:332
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:265
pos
unsigned int pos
Definition: spdifenc.c:414
AV_INPUT_BUFFER_PADDING_SIZE
#define AV_INPUT_BUFFER_PADDING_SIZE
Definition: defs.h:40
SIZE_SPECIFIER
#define SIZE_SPECIFIER
Definition: internal.h:129
APV_MAX_TILE_ROWS
@ APV_MAX_TILE_ROWS
Definition: apv.h:76
APV_CHROMA_FORMAT_422
@ APV_CHROMA_FORMAT_422
Definition: apv.h:48
APV_METADATA_USER_DEFINED
@ APV_METADATA_USER_DEFINED
Definition: apv.h:86
mem.h
APV_PBU_ALPHA_FRAME
@ APV_PBU_ALPHA_FRAME
Definition: apv.h:31
APVRawMetadataITUTT35::data_ref
AVBufferRef * data_ref
Definition: cbs_apv.h:129
APV_CHROMA_FORMAT_400
@ APV_CHROMA_FORMAT_400
Definition: apv.h:47
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVERROR_INVALIDDATA
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Definition: error.h:61
APV_PBU_PREVIEW_FRAME
@ APV_PBU_PREVIEW_FRAME
Definition: apv.h:29
CodedBitstreamFragment::data_ref
AVBufferRef * data_ref
A reference to the buffer containing data.
Definition: cbs.h:152
APVRawFiller
Definition: cbs_apv.h:39
cbs_apv.h
AVFormatContext::priv_data
void * priv_data
Format private data.
Definition: avformat.h:1292
APVRawMetadataPayload::undefined
APVRawMetadataUndefined undefined
Definition: cbs_apv.h:174
CodedBitstreamFragment::nb_units
int nb_units
Number of units in this fragment.
Definition: cbs.h:160
APV_METADATA_MDCV
@ APV_METADATA_MDCV
Definition: apv.h:83
cbs_apv_write_unit
static int cbs_apv_write_unit(CodedBitstreamContext *ctx, CodedBitstreamUnit *unit, PutBitContext *pbc)
Definition: cbs_apv.c:312