FFmpeg
cbs_apv_syntax_template.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 
20  APVRawPBUHeader *current)
21 {
22  int err;
23 
24  ub(8, pbu_type);
25  ub(16, group_id);
26  u(8, reserved_zero_8bits, 0, 0);
27 
28  return 0;
29 }
30 
32 {
33  int err;
34 
35  while (byte_alignment(rw) != 0)
36  fixed(1, alignment_bit_equal_to_zero, 0);
37 
38  return 0;
39 }
40 
42  APVRawFiller *current)
43 {
44  int err;
45 
46 #ifdef READ
47  current->filler_size = 0;
48  while (show_bits(rw, 8) == 0xff) {
49  fixed(8, ff_byte, 0xff);
50  ++current->filler_size;
51  }
52 #else
53  {
54  uint32_t i;
55  for (i = 0; i < current->filler_size; i++)
56  fixed(8, ff_byte, 0xff);
57  }
58 #endif
59 
60  return 0;
61 }
62 
64  APVRawFrameInfo *current)
65 {
66  int err;
67 
68  ub(8, profile_idc);
69  ub(8, level_idc);
70  ub(3, band_idc);
71 
72  u(5, reserved_zero_5bits, 0, 0);
73 
74  ub(24, frame_width);
75  ub(24, frame_height);
76 
77  u(4, chroma_format_idc, 0, 4);
78  if (current->chroma_format_idc == 1) {
79  av_log(ctx->log_ctx, AV_LOG_ERROR,
80  "chroma_format_idc 1 for 4:2:0 is not allowed in APV.\n");
81  return AVERROR_INVALIDDATA;
82  }
83 
84  u(4, bit_depth_minus8, 2, 8);
85 
86  ub(8, capture_time_distance);
87 
88  u(8, reserved_zero_8bits, 0, 0);
89 
90  return 0;
91 }
92 
94  RWContext *rw,
95  APVRawQuantizationMatrix *current)
96 {
97  const CodedBitstreamAPVContext *priv = ctx->priv_data;
98  int err;
99 
100  for (int c = 0; c < priv->num_comp; c++) {
101  for (int y = 0; y < 8; y++) {
102  for (int x = 0; x < 8 ; x++) {
103  us(8, q_matrix[c][x][y], 1, 255, 3, c, x, y);
104  }
105  }
106  }
107 
108  return 0;
109 }
110 
112  APVRawTileInfo *current,
113  const APVRawFrameHeader *fh)
114 {
116  int err;
117 
118  u(20, tile_width_in_mbs,
120  u(20, tile_height_in_mbs,
122 
123  ub(1, tile_size_present_in_fh_flag);
124 
126 
127  if (current->tile_size_present_in_fh_flag) {
128  for (int t = 0; t < priv->tile_info.num_tiles; t++) {
129  us(32, tile_size_in_fh[t], 10, MAX_UINT_BITS(32), 1, t);
130  }
131  }
132 
133  return 0;
134 }
135 
137  APVRawFrameHeader *current)
138 {
140  int err;
141 
142  CHECK(FUNC(frame_info)(ctx, rw, &current->frame_info));
143 
144  u(8, reserved_zero_8bits, 0, 0);
145 
146  ub(1, color_description_present_flag);
147  if (current->color_description_present_flag) {
148  ub(8, color_primaries);
150  ub(8, matrix_coefficients);
151  ub(1, full_range_flag);
152  } else {
155  infer(matrix_coefficients, 2);
156  infer(full_range_flag, 0);
157  }
158 
159  priv->bit_depth = current->frame_info.bit_depth_minus8 + 8;
160  priv->num_comp = cbs_apv_get_num_comp(current);
161 
162  ub(1, use_q_matrix);
163  if (current->use_q_matrix) {
165  &current->quantization_matrix));
166  } else {
167  for (int c = 0; c < priv->num_comp; c++) {
168  for (int y = 0; y < 8; y++) {
169  for (int x = 0; x < 8 ; x++) {
170  infer(quantization_matrix.q_matrix[c][y][x], 16);
171  }
172  }
173  }
174  }
175 
176  CHECK(FUNC(tile_info)(ctx, rw, &current->tile_info, current));
177 
178  u(8, reserved_zero_8bits_2, 0, 0);
179 
180  CHECK(FUNC(byte_alignment)(ctx, rw));
181 
182  return 0;
183 }
184 
186  APVRawTileHeader *current, int tile_idx)
187 {
188  const CodedBitstreamAPVContext *priv = ctx->priv_data;
189  uint16_t expected_tile_header_size;
190  uint8_t max_qp;
191  int err;
192 
193  expected_tile_header_size = 4 + priv->num_comp * (4 + 1) + 1;
194 
195  u(16, tile_header_size,
196  expected_tile_header_size, expected_tile_header_size);
197 
198  u(16, tile_index, tile_idx, tile_idx);
199 
200  for (int c = 0; c < priv->num_comp; c++) {
201  us(32, tile_data_size[c], 1, MAX_UINT_BITS(32), 1, c);
202  }
203 
204  max_qp = 3 + priv->bit_depth * 6;
205  for (int c = 0; c < priv->num_comp; c++) {
206  us(8, tile_qp[c], 0, max_qp, 1, c);
207  }
208 
209  u(8, reserved_zero_8bits, 0, 0);
210 
211  return 0;
212 }
213 
215  APVRawTile *current, int tile_idx)
216 {
217  const CodedBitstreamAPVContext *priv = ctx->priv_data;
218  int err;
219 
220  CHECK(FUNC(tile_header)(ctx, rw, &current->tile_header, tile_idx));
221 
222  for (int c = 0; c < priv->num_comp; c++) {
223  uint32_t comp_size = current->tile_header.tile_data_size[c];
224 #ifdef READ
225  int pos = get_bits_count(rw);
226  av_assert0(pos % 8 == 0);
227  current->tile_data[c] = (uint8_t*)align_get_bits(rw);
228  skip_bits_long(rw, 8 * comp_size);
229 #else
230  if (put_bytes_left(rw, 0) < comp_size)
231  return AVERROR(ENOSPC);
232  ff_copy_bits(rw, current->tile_data[c], comp_size * 8);
233 #endif
234  }
235 
236  return 0;
237 }
238 
240  APVRawFrame *current)
241 {
242  const CodedBitstreamAPVContext *priv = ctx->priv_data;
243  int err;
244 
245  HEADER("Frame");
246 
247  CHECK(FUNC(pbu_header)(ctx, rw, &current->pbu_header));
248 
249  CHECK(FUNC(frame_header)(ctx, rw, &current->frame_header));
250 
251  for (int t = 0; t < priv->tile_info.num_tiles; t++) {
252  us(32, tile_size[t], 10, MAX_UINT_BITS(32), 1, t);
253 
254  CHECK(FUNC(tile)(ctx, rw, &current->tile[t], t));
255  }
256 
257  CHECK(FUNC(filler)(ctx, rw, &current->filler));
258 
259  return 0;
260 }
261 
263  APVRawAUInfo *current)
264 {
265  int err;
266 
267  HEADER("Access Unit Information");
268 
269  u(16, num_frames, 1, CBS_APV_MAX_AU_FRAMES);
270 
271  for (int i = 0; i < current->num_frames; i++) {
272  ubs(8, pbu_type[i], 1, i);
273  ubs(8, group_id[i], 1, i);
274 
275  us(8, reserved_zero_8bits[i], 0, 0, 1, i);
276 
277  CHECK(FUNC(frame_info)(ctx, rw, &current->frame_info[i]));
278  }
279 
280  u(8, reserved_zero_8bits_2, 0, 0);
281 
282  return 0;
283 }
284 
286  RWContext *rw,
287  APVRawMetadataITUTT35 *current,
288  size_t payload_size)
289 {
290  int err;
291  size_t read_size = payload_size - 1;
292 
293  HEADER("ITU-T T.35 Metadata");
294 
295  ub(8, itu_t_t35_country_code);
296 
297  if (current->itu_t_t35_country_code == 0xff) {
298  ub(8, itu_t_t35_country_code_extension);
299  --read_size;
300  }
301 
302 #ifdef READ
303  current->data_size = read_size;
304  current->data_ref = av_buffer_alloc(current->data_size);
305  if (!current->data_ref)
306  return AVERROR(ENOMEM);
307  current->data = current->data_ref->data;
308 #else
309  if (current->data_size != read_size) {
310  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
311  "payload %zu but expecting %zu\n",
312  current->data_size, read_size);
313  return AVERROR(EINVAL);
314  }
315 #endif
316 
317  for (size_t i = 0; i < current->data_size; i++) {
318  xu(8, itu_t_t35_payload[i],
319  current->data[i], 0x00, 0xff, 1, i);
320  }
321 
322  return 0;
323 }
324 
326  RWContext *rw,
327  APVRawMetadataMDCV *current)
328 {
329  int err, i;
330 
331  HEADER("MDCV Metadata");
332 
333  for (i = 0; i < 3; i++) {
334  ubs(16, primary_chromaticity_x[i], 1, i);
335  ubs(16, primary_chromaticity_y[i], 1, i);
336  }
337 
338  ub(16, white_point_chromaticity_x);
339  ub(16, white_point_chromaticity_y);
340 
341  ub(32, max_mastering_luminance);
342  ub(32, min_mastering_luminance);
343 
344  return 0;
345 }
346 
348  RWContext *rw,
349  APVRawMetadataCLL *current)
350 {
351  int err;
352 
353  HEADER("CLL Metadata");
354 
355  ub(16, max_cll);
356  ub(16, max_fall);
357 
358  return 0;
359 }
360 
362  RWContext *rw,
363  APVRawMetadataFiller *current,
364  size_t payload_size)
365 {
366  int err;
367 
368  HEADER("Filler Metadata");
369 
370  for (size_t i = 0; i < payload_size; i++)
371  fixed(8, ff_byte, 0xff);
372 
373  return 0;
374 }
375 
377  RWContext *rw,
378  APVRawMetadataUserDefined *current,
379  size_t payload_size)
380 {
381  int err;
382 
383  HEADER("User-Defined Metadata");
384 
385  for (int i = 0; i < 16; i++)
386  ubs(8, uuid[i], 1, i);
387 
388 #ifdef READ
389  current->data_size = payload_size - 16;
390  current->data_ref = av_buffer_alloc(current->data_size);
391  if (!current->data_ref)
392  return AVERROR(ENOMEM);
393  current->data = current->data_ref->data;
394 #else
395  if (current->data_size != payload_size - 16) {
396  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
397  "payload %zu but expecting %zu\n",
398  current->data_size, payload_size - 16);
399  return AVERROR(EINVAL);
400  }
401 #endif
402 
403  for (size_t i = 0; i < current->data_size; i++) {
404  xu(8, user_defined_data_payload[i],
405  current->data[i], 0x00, 0xff, 1, i);
406  }
407 
408  return 0;
409 }
410 
412  RWContext *rw,
413  APVRawMetadataUndefined *current,
414  size_t payload_size)
415 {
416  int err;
417 
418  HEADER("Undefined Metadata");
419 
420 #ifdef READ
421  current->data_size = payload_size;
422  current->data_ref = av_buffer_alloc(current->data_size);
423  if (!current->data_ref)
424  return AVERROR(ENOMEM);
425  current->data = current->data_ref->data;
426 #else
427  if (current->data_size != payload_size) {
428  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
429  "payload %zu but expecting %zu\n",
430  current->data_size, payload_size - 16);
431  return AVERROR(EINVAL);
432  }
433 #endif
434 
435  for (size_t i = 0; i < current->data_size; i++) {
436  xu(8, undefined_metadata_payload_byte[i],
437  current->data[i], 0x00, 0xff, 1, i);
438  }
439 
440  return 0;
441 }
442 
444  RWContext *rw,
445  APVRawMetadataPayload *current)
446 {
447  int err;
448 
449  switch (current->payload_type) {
452  &current->itu_t_t35,
453  current->payload_size));
454  break;
455  case APV_METADATA_MDCV:
456  CHECK(FUNC(metadata_mdcv)(ctx, rw, &current->mdcv));
457  break;
458  case APV_METADATA_CLL:
459  CHECK(FUNC(metadata_cll)(ctx, rw, &current->cll));
460  break;
461  case APV_METADATA_FILLER:
463  &current->filler,
464  current->payload_size));
465  break;
468  &current->user_defined,
469  current->payload_size));
470  break;
471  default:
473  &current->undefined,
474  current->payload_size));
475  }
476 
477  return 0;
478 }
479 
481  APVRawMetadata *current)
482 {
483  int err;
484 
485 #ifdef READ
486  uint32_t metadata_bytes_left;
487 #else
488  PutBitContext metadata_start_state;
489  uint32_t metadata_start_position;
490  int trace;
491 #endif
492 
493  HEADER("Metadata");
494 
495  CHECK(FUNC(pbu_header)(ctx, rw, &current->pbu_header));
496 
497 #ifdef READ
498  ub(32, metadata_size);
499 
500  metadata_bytes_left = current->metadata_size;
501 
502  for (int p = 0; p < CBS_APV_MAX_METADATA_PAYLOADS; p++) {
503  APVRawMetadataPayload *pl = &current->payloads[p];
504  uint32_t tmp;
505 
506  pl->payload_type = 0;
507  while (show_bits(rw, 8) == 0xff) {
508  fixed(8, ff_byte, 0xff);
509  pl->payload_type += 255;
510  --metadata_bytes_left;
511  }
512  xu(8, metadata_payload_type, tmp, 0, 254, 0);
513  pl->payload_type += tmp;
514  --metadata_bytes_left;
515 
516  pl->payload_size = 0;
517  while (show_bits(rw, 8) == 0xff) {
518  fixed(8, ff_byte, 0xff);
519  pl->payload_size += 255;
520  --metadata_bytes_left;
521  }
522  xu(8, metadata_payload_size, tmp, 0, 254, 0);
523  pl->payload_size += tmp;
524  --metadata_bytes_left;
525 
526  if (pl->payload_size > metadata_bytes_left) {
527  av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid metadata: "
528  "payload_size larger than remaining metadata size "
529  "(%"PRIu32" bytes).\n", pl->payload_size);
530  return AVERROR_INVALIDDATA;
531  }
532 
533  CHECK(FUNC(metadata_payload)(ctx, rw, pl));
534 
535  metadata_bytes_left -= pl->payload_size;
536 
537  current->metadata_count = p + 1;
538  if (metadata_bytes_left == 0)
539  break;
540  }
541 #else
542  // Two passes: the first write finds the size (with tracing
543  // disabled), the second write does the real write.
544 
545  metadata_start_state = *rw;
546  metadata_start_position = put_bits_count(rw);
547 
548  trace = ctx->trace_enable;
549  ctx->trace_enable = 0;
550 
551  for (int pass = 1; pass <= 2; pass++) {
552  *rw = metadata_start_state;
553 
554  ub(32, metadata_size);
555 
556  for (int p = 0; p < current->metadata_count; p++) {
557  APVRawMetadataPayload *pl = &current->payloads[p];
558  uint32_t payload_start_position;
559  uint32_t tmp;
560 
561  tmp = pl->payload_type;
562  while (tmp >= 255) {
563  fixed(8, ff_byte, 0xff);
564  tmp -= 255;
565  }
566  xu(8, metadata_payload_type, tmp, 0, 254, 0);
567 
568  tmp = pl->payload_size;
569  while (tmp >= 255) {
570  fixed(8, ff_byte, 0xff);
571  tmp -= 255;
572  }
573  xu(8, metadata_payload_size, tmp, 0, 254, 0);
574 
575  payload_start_position = put_bits_count(rw);
576 
577  err = FUNC(metadata_payload)(ctx, rw, pl);
578  ctx->trace_enable = trace;
579  if (err < 0)
580  return err;
581 
582  if (pass == 1) {
583  pl->payload_size = (put_bits_count(rw) -
584  payload_start_position) / 8;
585  }
586  }
587 
588  if (pass == 1) {
589  current->metadata_size = (put_bits_count(rw) -
590  metadata_start_position) / 8 - 4;
591  ctx->trace_enable = trace;
592  }
593  }
594 #endif
595 
596  CHECK(FUNC(filler)(ctx, rw, &current->filler));
597 
598  return 0;
599 }
APVRawMetadataCLL
Definition: cbs_apv.h:142
frame_info
static int FUNC() frame_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawFrameInfo *current)
Definition: cbs_apv_syntax_template.c:63
skip_bits_long
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
Definition: get_bits.h:261
metadata_user_defined
static int FUNC() metadata_user_defined(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataUserDefined *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:376
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
APVRawMetadataUserDefined
Definition: cbs_apv.h:151
ub
#define ub(width, name)
Definition: cbs_apv.c:85
get_bits_count
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:249
APVRawQuantizationMatrix
Definition: cbs_apv.h:56
byte_alignment
static int FUNC() byte_alignment(CodedBitstreamContext *ctx, RWContext *rw)
Definition: cbs_apv_syntax_template.c:31
APVRawAUInfo
Definition: cbs_apv.h:111
CodedBitstreamContext
Context structure for coded bitstream operations.
Definition: cbs.h:226
level_idc
int level_idc
Definition: h264_levels.c:29
APVRawMetadataUndefined
Definition: cbs_apv.h:159
quantization_matrix
static int FUNC() quantization_matrix(CodedBitstreamContext *ctx, RWContext *rw, APVRawQuantizationMatrix *current)
Definition: cbs_apv_syntax_template.c:93
metadata_mdcv
static int FUNC() metadata_mdcv(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataMDCV *current)
Definition: cbs_apv_syntax_template.c:325
ff_copy_bits
void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length)
Copy the content of src to the bitstream.
Definition: bitstream.c:49
CodedBitstreamAPVContext::num_comp
int num_comp
Definition: cbs_apv.h:202
CHECK
CHECK(-1) CHECK(-2) }} }} CHECK(1) CHECK(2) }} }} } if(diff0+diff1 > 0) temp -
u
#define u(width, name, range_min, range_max)
Definition: cbs_apv.c:83
tile_info
static int FUNC() tile_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawTileInfo *current, const APVRawFrameHeader *fh)
Definition: cbs_apv_syntax_template.c:111
xu
#define xu(width, name, var, range_min, range_max, subs,...)
Definition: cbs_apv.c:132
put_bytes_left
static int put_bytes_left(const PutBitContext *s, int round_up)
Definition: put_bits.h:135
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
APVRawFrameInfo
Definition: cbs_apv.h:43
tile_header
static int FUNC() tile_header(CodedBitstreamContext *ctx, RWContext *rw, APVRawTileHeader *current, int tile_idx)
Definition: cbs_apv_syntax_template.c:185
metadata_itu_t_t35
static int FUNC() metadata_itu_t_t35(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataITUTT35 *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:285
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:40
APVRawPBUHeader
Definition: cbs_apv.h:33
ctx
AVFormatContext * ctx
Definition: movenc.c:49
APVRawTileHeader
Definition: cbs_apv.h:85
RWContext
#define RWContext
Definition: cbs_apv.c:129
MAX_UINT_BITS
#define MAX_UINT_BITS(length)
Definition: cbs_internal.h:235
PutBitContext
Definition: put_bits.h:50
APVRawMetadata
Definition: cbs_apv.h:178
fixed
#define fixed(width, name, value)
Definition: cbs_apv.c:92
APV_MIN_TILE_WIDTH_IN_MBS
@ APV_MIN_TILE_WIDTH_IN_MBS
Definition: apv.h:73
cbs_apv_derive_tile_info
static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti, const APVRawFrameHeader *fh)
Definition: cbs_apv.c:40
tmp
static uint8_t tmp[20]
Definition: aes_ctr.c:47
profile_idc
int profile_idc
Definition: h264_levels.c:53
APV_METADATA_CLL
@ APV_METADATA_CLL
Definition: apv.h:84
CodedBitstreamAPVContext::bit_depth
int bit_depth
Definition: cbs_apv.h:201
cbs_apv_get_num_comp
static int cbs_apv_get_num_comp(const APVRawFrameHeader *fh)
Definition: cbs_apv.c:25
APVRawTileInfo
Definition: cbs_apv.h:60
APVRawFrame
Definition: cbs_apv.h:101
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
color_primaries
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
Definition: csp.c:76
APVRawMetadataPayload
Definition: cbs_apv.h:165
pbu_header
static int FUNC() pbu_header(CodedBitstreamContext *ctx, RWContext *rw, APVRawPBUHeader *current)
Definition: cbs_apv_syntax_template.c:19
ubs
#define ubs(width, name, subs,...)
Definition: cbs_apv.c:89
HEADER
#define HEADER(name)
Definition: cbs_apv.c:70
infer
#define infer(name, value)
Definition: cbs_apv.c:139
APVRawFrameHeader
Definition: cbs_apv.h:67
transfer_characteristics
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
Definition: vf_colorspace.c:167
APVRawMetadataPayload::payload_type
uint32_t payload_type
Definition: cbs_apv.h:166
CodedBitstreamAPVContext
Definition: cbs_apv.h:200
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_apv.c:87
av_buffer_alloc
AVBufferRef * av_buffer_alloc(size_t size)
Allocate an AVBuffer of the given size using av_malloc().
Definition: buffer.c:77
APVRawMetadataPayload::payload_size
uint32_t payload_size
Definition: cbs_apv.h:167
metadata_undefined
static int FUNC() metadata_undefined(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataUndefined *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:411
APV_METADATA_USER_DEFINED
@ APV_METADATA_USER_DEFINED
Definition: apv.h:86
CBS_APV_MAX_AU_FRAMES
#define CBS_APV_MAX_AU_FRAMES
Definition: cbs_apv.h:29
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
put_bits_count
static int put_bits_count(PutBitContext *s)
Definition: put_bits.h:80
show_bits
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
Definition: get_bits.h:354
APVRawMetadataFiller
Definition: cbs_apv.h:147
filler
static int FUNC() filler(CodedBitstreamContext *ctx, RWContext *rw, APVRawFiller *current)
Definition: cbs_apv_syntax_template.c:41
frame
static int FUNC() frame(CodedBitstreamContext *ctx, RWContext *rw, APVRawFrame *current)
Definition: cbs_apv_syntax_template.c:239
CBS_APV_MAX_METADATA_PAYLOADS
#define CBS_APV_MAX_METADATA_PAYLOADS
Definition: cbs_apv.h:30
CodedBitstreamAPVContext::tile_info
APVDerivedTileInfo tile_info
Definition: cbs_apv.h:204
align_get_bits
static const uint8_t * align_get_bits(GetBitContext *s)
Definition: get_bits.h:544
pos
unsigned int pos
Definition: spdifenc.c:414
frame_header
Definition: truemotion1.c:88
FUNC
#define FUNC(a)
Definition: bit_depth_template.c:101
APV_MIN_TILE_HEIGHT_IN_MBS
@ APV_MIN_TILE_HEIGHT_IN_MBS
Definition: apv.h:74
tile
static int FUNC() tile(CodedBitstreamContext *ctx, RWContext *rw, APVRawTile *current, int tile_idx)
Definition: cbs_apv_syntax_template.c:214
APVRawMetadataMDCV
Definition: cbs_apv.h:133
APV_METADATA_MDCV
@ APV_METADATA_MDCV
Definition: apv.h:83
au_info
static int FUNC() au_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawAUInfo *current)
Definition: cbs_apv_syntax_template.c:262
APVRawMetadataITUTT35
Definition: cbs_apv.h:124
metadata
static int FUNC() metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
Definition: cbs_apv_syntax_template.c:480
APV_METADATA_FILLER
@ APV_METADATA_FILLER
Definition: apv.h:85
metadata_filler
static int FUNC() metadata_filler(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataFiller *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:361
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
APVDerivedTileInfo::num_tiles
uint16_t num_tiles
Definition: cbs_apv.h:193
metadata_payload
static int FUNC() metadata_payload(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataPayload *current)
Definition: cbs_apv_syntax_template.c:443
metadata_cll
static int FUNC() metadata_cll(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataCLL *current)
Definition: cbs_apv_syntax_template.c:347
APVRawTile
Definition: cbs_apv.h:93
APVRawFiller
Definition: cbs_apv.h:39
APV_METADATA_ITU_T_T35
@ APV_METADATA_ITU_T_T35
Definition: apv.h:82
AVFormatContext::priv_data
void * priv_data
Format private data.
Definition: avformat.h:1293