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 frame_width_in_mbs = (fh->frame_info.frame_width + 15) / 16;
117  int frame_height_in_mbs = (fh->frame_info.frame_height + 15) / 16;
118  uint32_t min_tile_width = FFMAX(APV_MIN_TILE_WIDTH_IN_MBS,
119  (frame_width_in_mbs + APV_MAX_TILE_COLS - 1) /
121  uint32_t min_tile_height = FFMAX(APV_MIN_TILE_HEIGHT_IN_MBS,
122  (frame_height_in_mbs + APV_MAX_TILE_ROWS - 1) /
124  int err;
125 
126  u(20, tile_width_in_mbs, min_tile_width, MAX_UINT_BITS(20));
127  u(20, tile_height_in_mbs, min_tile_height, MAX_UINT_BITS(20));
128 
129  ub(1, tile_size_present_in_fh_flag);
130 
132 
133  if (current->tile_size_present_in_fh_flag) {
134  for (int t = 0; t < priv->tile_info.num_tiles; t++) {
135  us(32, tile_size_in_fh[t], 10, MAX_UINT_BITS(32), 1, t);
136  }
137  }
138 
139  return 0;
140 }
141 
143  APVRawFrameHeader *current)
144 {
146  int err;
147 
148  CHECK(FUNC(frame_info)(ctx, rw, &current->frame_info));
149 
150  u(8, reserved_zero_8bits, 0, 0);
151 
152  ub(1, color_description_present_flag);
153  if (current->color_description_present_flag) {
154  ub(8, color_primaries);
156  ub(8, matrix_coefficients);
157  ub(1, full_range_flag);
158  } else {
161  infer(matrix_coefficients, 2);
162  infer(full_range_flag, 0);
163  }
164 
165  priv->bit_depth = current->frame_info.bit_depth_minus8 + 8;
166  priv->num_comp = cbs_apv_get_num_comp(current);
167 
168  ub(1, use_q_matrix);
169  if (current->use_q_matrix) {
171  &current->quantization_matrix));
172  } else {
173  for (int c = 0; c < priv->num_comp; c++) {
174  for (int y = 0; y < 8; y++) {
175  for (int x = 0; x < 8 ; x++) {
176  infer(quantization_matrix.q_matrix[c][y][x], 16);
177  }
178  }
179  }
180  }
181 
182  CHECK(FUNC(tile_info)(ctx, rw, &current->tile_info, current));
183 
184  u(8, reserved_zero_8bits_2, 0, 0);
185 
186  CHECK(FUNC(byte_alignment)(ctx, rw));
187 
188  return 0;
189 }
190 
192  APVRawTileHeader *current,
193  int tile_idx, uint32_t tile_size)
194 {
195  const CodedBitstreamAPVContext *priv = ctx->priv_data;
196  uint16_t expected_tile_header_size;
197  uint32_t tile_size_remaining;
198  uint8_t max_qp;
199  int err;
200 
201  expected_tile_header_size = 4 + priv->num_comp * (4 + 1) + 1;
202 
203  u(16, tile_header_size,
204  expected_tile_header_size, expected_tile_header_size);
205 
206  u(16, tile_index, tile_idx, tile_idx);
207 
208  tile_size_remaining = tile_size - current->tile_header_size;
209  for (int c = 0; c < priv->num_comp; c++) {
210  us(32, tile_data_size[c], 1, tile_size_remaining, 1, c);
211  tile_size_remaining -= current->tile_data_size[c];
212  }
213 
214  max_qp = 3 + priv->bit_depth * 6;
215  for (int c = 0; c < priv->num_comp; c++) {
216  us(8, tile_qp[c], 0, max_qp, 1, c);
217  }
218 
219  u(8, reserved_zero_8bits, 0, 0);
220 
221  return 0;
222 }
223 
225  APVRawTile *current,
226  int tile_idx, uint32_t tile_size)
227 {
228  const CodedBitstreamAPVContext *priv = ctx->priv_data;
229  int err;
230 
231  CHECK(FUNC(tile_header)(ctx, rw, &current->tile_header,
232  tile_idx, tile_size));
233 
234  for (int c = 0; c < priv->num_comp; c++) {
235  uint32_t comp_size = current->tile_header.tile_data_size[c];
236 #ifdef READ
237  int pos = get_bits_count(rw);
238  av_assert0(pos % 8 == 0);
239  if (get_bits_left(rw) < 8LL * comp_size)
240  return AVERROR_INVALIDDATA;
241  current->tile_data[c] = (uint8_t*)align_get_bits(rw);
242  skip_bits_long(rw, 8 * comp_size);
243 #else
244  if (put_bytes_left(rw, 0) < comp_size)
245  return AVERROR(ENOSPC);
246  ff_copy_bits(rw, current->tile_data[c], comp_size * 8);
247 #endif
248  }
249 
250  return 0;
251 }
252 
254  APVRawFrame *current)
255 {
256  const CodedBitstreamAPVContext *priv = ctx->priv_data;
257  int err;
258 
259  HEADER("Frame");
260 
261  CHECK(FUNC(pbu_header)(ctx, rw, &current->pbu_header));
262 
263  CHECK(FUNC(frame_header)(ctx, rw, &current->frame_header));
264 
265  for (int t = 0; t < priv->tile_info.num_tiles; t++) {
266  us(32, tile_size[t], 10, MAX_UINT_BITS(32), 1, t);
267 
268  CHECK(FUNC(tile)(ctx, rw, &current->tile[t],
269  t, current->tile_size[t]));
270  }
271 
272  CHECK(FUNC(filler)(ctx, rw, &current->filler));
273 
274  return 0;
275 }
276 
278  APVRawAUInfo *current)
279 {
280  int err;
281 
282  HEADER("Access Unit Information");
283 
284  u(16, num_frames, 1, CBS_APV_MAX_AU_FRAMES);
285 
286  for (int i = 0; i < current->num_frames; i++) {
287  ubs(8, pbu_type[i], 1, i);
288  ubs(8, group_id[i], 1, i);
289 
290  us(8, reserved_zero_8bits[i], 0, 0, 1, i);
291 
292  CHECK(FUNC(frame_info)(ctx, rw, &current->frame_info[i]));
293  }
294 
295  u(8, reserved_zero_8bits_2, 0, 0);
296 
297  return 0;
298 }
299 
301  RWContext *rw,
302  APVRawMetadataITUTT35 *current,
303  size_t payload_size)
304 {
305  int err;
306  size_t read_size = payload_size - 1;
307 
308  HEADER("ITU-T T.35 Metadata");
309 
310  ub(8, itu_t_t35_country_code);
311 
312  if (current->itu_t_t35_country_code == 0xff) {
313  ub(8, itu_t_t35_country_code_extension);
314  --read_size;
315  }
316 
317 #ifdef READ
318  current->data_size = read_size;
319  current->data_ref = av_buffer_alloc(current->data_size);
320  if (!current->data_ref)
321  return AVERROR(ENOMEM);
322  current->data = current->data_ref->data;
323 #else
324  if (current->data_size != read_size) {
325  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
326  "payload %zu but expecting %zu\n",
327  current->data_size, read_size);
328  return AVERROR(EINVAL);
329  }
330 #endif
331 
332  for (size_t i = 0; i < current->data_size; i++) {
333  xu(8, itu_t_t35_payload[i],
334  current->data[i], 0x00, 0xff, 1, i);
335  }
336 
337  return 0;
338 }
339 
341  RWContext *rw,
342  APVRawMetadataMDCV *current)
343 {
344  int err, i;
345 
346  HEADER("MDCV Metadata");
347 
348  for (i = 0; i < 3; i++) {
349  ubs(16, primary_chromaticity_x[i], 1, i);
350  ubs(16, primary_chromaticity_y[i], 1, i);
351  }
352 
353  ub(16, white_point_chromaticity_x);
354  ub(16, white_point_chromaticity_y);
355 
356  ub(32, max_mastering_luminance);
357  ub(32, min_mastering_luminance);
358 
359  return 0;
360 }
361 
363  RWContext *rw,
364  APVRawMetadataCLL *current)
365 {
366  int err;
367 
368  HEADER("CLL Metadata");
369 
370  ub(16, max_cll);
371  ub(16, max_fall);
372 
373  return 0;
374 }
375 
377  RWContext *rw,
378  APVRawMetadataFiller *current,
379  size_t payload_size)
380 {
381  int err;
382 
383  HEADER("Filler Metadata");
384 
385  for (size_t i = 0; i < payload_size; i++)
386  fixed(8, ff_byte, 0xff);
387 
388  return 0;
389 }
390 
392  RWContext *rw,
393  APVRawMetadataUserDefined *current,
394  size_t payload_size)
395 {
396  int err;
397 
398  HEADER("User-Defined Metadata");
399 
400  for (int i = 0; i < 16; i++)
401  ubs(8, uuid[i], 1, i);
402 
403 #ifdef READ
404  current->data_size = payload_size - 16;
405  current->data_ref = av_buffer_alloc(current->data_size);
406  if (!current->data_ref)
407  return AVERROR(ENOMEM);
408  current->data = current->data_ref->data;
409 #else
410  if (current->data_size != payload_size - 16) {
411  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
412  "payload %zu but expecting %zu\n",
413  current->data_size, payload_size - 16);
414  return AVERROR(EINVAL);
415  }
416 #endif
417 
418  for (size_t i = 0; i < current->data_size; i++) {
419  xu(8, user_defined_data_payload[i],
420  current->data[i], 0x00, 0xff, 1, i);
421  }
422 
423  return 0;
424 }
425 
427  RWContext *rw,
428  APVRawMetadataUndefined *current,
429  size_t payload_size)
430 {
431  int err;
432 
433  HEADER("Undefined Metadata");
434 
435 #ifdef READ
436  current->data_size = payload_size;
437  current->data_ref = av_buffer_alloc(current->data_size);
438  if (!current->data_ref)
439  return AVERROR(ENOMEM);
440  current->data = current->data_ref->data;
441 #else
442  if (current->data_size != payload_size) {
443  av_log(ctx->log_ctx, AV_LOG_ERROR, "Write size mismatch: "
444  "payload %zu but expecting %zu\n",
445  current->data_size, payload_size - 16);
446  return AVERROR(EINVAL);
447  }
448 #endif
449 
450  for (size_t i = 0; i < current->data_size; i++) {
451  xu(8, undefined_metadata_payload_byte[i],
452  current->data[i], 0x00, 0xff, 1, i);
453  }
454 
455  return 0;
456 }
457 
459  RWContext *rw,
460  APVRawMetadataPayload *current)
461 {
462  int err;
463 
464  switch (current->payload_type) {
467  &current->itu_t_t35,
468  current->payload_size));
469  break;
470  case APV_METADATA_MDCV:
471  CHECK(FUNC(metadata_mdcv)(ctx, rw, &current->mdcv));
472  break;
473  case APV_METADATA_CLL:
474  CHECK(FUNC(metadata_cll)(ctx, rw, &current->cll));
475  break;
476  case APV_METADATA_FILLER:
478  &current->filler,
479  current->payload_size));
480  break;
483  &current->user_defined,
484  current->payload_size));
485  break;
486  default:
488  &current->undefined,
489  current->payload_size));
490  }
491 
492  return 0;
493 }
494 
496  APVRawMetadata *current)
497 {
498  int err;
499 
500 #ifdef READ
501  uint32_t metadata_bytes_left;
502 #else
503  PutBitContext metadata_start_state;
504  uint32_t metadata_start_position;
505  int trace;
506 #endif
507 
508  HEADER("Metadata");
509 
510  CHECK(FUNC(pbu_header)(ctx, rw, &current->pbu_header));
511 
512 #ifdef READ
513  ub(32, metadata_size);
514 
515  metadata_bytes_left = current->metadata_size;
516 
517  for (int p = 0; p < CBS_APV_MAX_METADATA_PAYLOADS; p++) {
518  APVRawMetadataPayload *pl = &current->payloads[p];
519  uint32_t tmp;
520 
521  pl->payload_type = 0;
522  while (show_bits(rw, 8) == 0xff) {
523  fixed(8, ff_byte, 0xff);
524  pl->payload_type += 255;
525  --metadata_bytes_left;
526  }
527  xu(8, metadata_payload_type, tmp, 0, 254, 0);
528  pl->payload_type += tmp;
529  --metadata_bytes_left;
530 
531  pl->payload_size = 0;
532  while (show_bits(rw, 8) == 0xff) {
533  fixed(8, ff_byte, 0xff);
534  pl->payload_size += 255;
535  --metadata_bytes_left;
536  }
537  xu(8, metadata_payload_size, tmp, 0, 254, 0);
538  pl->payload_size += tmp;
539  --metadata_bytes_left;
540 
541  if (pl->payload_size > metadata_bytes_left) {
542  av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid metadata: "
543  "payload_size larger than remaining metadata size "
544  "(%"PRIu32" bytes).\n", pl->payload_size);
545  return AVERROR_INVALIDDATA;
546  }
547 
548  current->metadata_count = p + 1;
549 
550  CHECK(FUNC(metadata_payload)(ctx, rw, pl));
551 
552  metadata_bytes_left -= pl->payload_size;
553  if (metadata_bytes_left == 0)
554  break;
555  }
556 #else
557  // Two passes: the first write finds the size (with tracing
558  // disabled), the second write does the real write.
559 
560  metadata_start_state = *rw;
561  metadata_start_position = put_bits_count(rw);
562 
563  trace = ctx->trace_enable;
564  ctx->trace_enable = 0;
565 
566  for (int pass = 1; pass <= 2; pass++) {
567  *rw = metadata_start_state;
568 
569  ub(32, metadata_size);
570 
571  for (int p = 0; p < current->metadata_count; p++) {
572  APVRawMetadataPayload *pl = &current->payloads[p];
573  uint32_t payload_start_position;
574  uint32_t tmp;
575 
576  tmp = pl->payload_type;
577  while (tmp >= 255) {
578  fixed(8, ff_byte, 0xff);
579  tmp -= 255;
580  }
581  xu(8, metadata_payload_type, tmp, 0, 254, 0);
582 
583  tmp = pl->payload_size;
584  while (tmp >= 255) {
585  fixed(8, ff_byte, 0xff);
586  tmp -= 255;
587  }
588  xu(8, metadata_payload_size, tmp, 0, 254, 0);
589 
590  payload_start_position = put_bits_count(rw);
591 
592  err = FUNC(metadata_payload)(ctx, rw, pl);
593  ctx->trace_enable = trace;
594  if (err < 0)
595  return err;
596 
597  if (pass == 1) {
598  pl->payload_size = (put_bits_count(rw) -
599  payload_start_position) / 8;
600  }
601  }
602 
603  if (pass == 1) {
604  current->metadata_size = (put_bits_count(rw) -
605  metadata_start_position) / 8 - 4;
606  ctx->trace_enable = trace;
607  }
608  }
609 #endif
610 
611  CHECK(FUNC(filler)(ctx, rw, &current->filler));
612 
613  return 0;
614 }
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:276
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:391
get_bits_left
static int get_bits_left(GetBitContext *gb)
Definition: get_bits.h:689
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
get_bits_count
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:250
APV_MIN_TILE_WIDTH_IN_MBS
@ APV_MIN_TILE_WIDTH_IN_MBS
Definition: apv.h:73
APVRawQuantizationMatrix
Definition: cbs_apv.h:56
u
#define u(width, name, range_min, range_max)
Definition: cbs_apv.c:83
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
infer
#define infer(name, value)
Definition: cbs_apv.c:142
FFMAX
#define FFMAX(a, b)
Definition: macros.h:47
APV_MAX_TILE_COLS
@ APV_MAX_TILE_COLS
Definition: apv.h:75
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:340
ub
#define ub(width, name)
Definition: cbs_apv.c:85
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 -
tile_info
static int FUNC() tile_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawTileInfo *current, const APVRawFrameHeader *fh)
Definition: cbs_apv_syntax_template.c:111
ubs
#define ubs(width, name, subs,...)
Definition: cbs_apv.c:89
APV_METADATA_FILLER
@ APV_METADATA_FILLER
Definition: apv.h:85
xu
#define xu(width, name, var, range_min, range_max, subs,...)
Definition: cbs_apv.c:135
put_bytes_left
static int put_bytes_left(const PutBitContext *s, int round_up)
Definition: put_bits.h:145
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
HEADER
#define HEADER(name)
Definition: cbs_apv.c:70
APVRawFrameInfo
Definition: cbs_apv.h:43
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:300
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:41
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
APVRawTileHeader
Definition: cbs_apv.h:85
tile_header
static int FUNC() tile_header(CodedBitstreamContext *ctx, RWContext *rw, APVRawTileHeader *current, int tile_idx, uint32_t tile_size)
Definition: cbs_apv_syntax_template.c:191
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
tmp
static uint8_t tmp[20]
Definition: aes_ctr.c:47
profile_idc
int profile_idc
Definition: h264_levels.c:53
cbs_apv_derive_tile_info
static void cbs_apv_derive_tile_info(APVDerivedTileInfo *ti, const APVRawFrameHeader *fh)
Definition: cbs_apv.c:40
CodedBitstreamAPVContext::bit_depth
int bit_depth
Definition: cbs_apv.h:201
APVRawTileInfo
Definition: cbs_apv.h:60
APV_METADATA_CLL
@ APV_METADATA_CLL
Definition: apv.h:84
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
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
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
fixed
#define fixed(width, name, value)
Definition: cbs_apv.c:92
metadata_undefined
static int FUNC() metadata_undefined(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataUndefined *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:426
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:90
show_bits
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
Definition: get_bits.h:369
APV_MIN_TILE_HEIGHT_IN_MBS
@ APV_MIN_TILE_HEIGHT_IN_MBS
Definition: apv.h:74
cbs_apv_get_num_comp
static int cbs_apv_get_num_comp(const APVRawFrameHeader *fh)
Definition: cbs_apv.c:25
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:253
CBS_APV_MAX_METADATA_PAYLOADS
#define CBS_APV_MAX_METADATA_PAYLOADS
Definition: cbs_apv.h:30
tile
static int FUNC() tile(CodedBitstreamContext *ctx, RWContext *rw, APVRawTile *current, int tile_idx, uint32_t tile_size)
Definition: cbs_apv_syntax_template.c:224
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:555
pos
unsigned int pos
Definition: spdifenc.c:414
RWContext
#define RWContext
Definition: cbs_apv.c:132
APV_MAX_TILE_ROWS
@ APV_MAX_TILE_ROWS
Definition: apv.h:76
frame_header
Definition: truemotion1.c:88
FUNC
#define FUNC(a)
Definition: bit_depth_template.c:101
APVRawMetadataMDCV
Definition: cbs_apv.h:133
APV_METADATA_USER_DEFINED
@ APV_METADATA_USER_DEFINED
Definition: apv.h:86
au_info
static int FUNC() au_info(CodedBitstreamContext *ctx, RWContext *rw, APVRawAUInfo *current)
Definition: cbs_apv_syntax_template.c:277
APVRawMetadataITUTT35
Definition: cbs_apv.h:124
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_apv.c:87
metadata
static int FUNC() metadata(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadata *current)
Definition: cbs_apv_syntax_template.c:495
metadata_filler
static int FUNC() metadata_filler(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataFiller *current, size_t payload_size)
Definition: cbs_apv_syntax_template.c:376
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:458
metadata_cll
static int FUNC() metadata_cll(CodedBitstreamContext *ctx, RWContext *rw, APVRawMetadataCLL *current)
Definition: cbs_apv_syntax_template.c:362
APVRawTile
Definition: cbs_apv.h:93
APVRawFiller
Definition: cbs_apv.h:39
AVFormatContext::priv_data
void * priv_data
Format private data.
Definition: avformat.h:1292
APV_METADATA_MDCV
@ APV_METADATA_MDCV
Definition: apv.h:83