|
FFmpeg
|
#include "libavutil/mem.h"#include "libavutil/refstruct.h"#include "bytestream.h"#include "cbs.h"#include "cbs_internal.h"#include "cbs_h2645.h"#include "cbs_lcevc.h"#include "cbs_sei.h"#include "get_bits.h"#include "cbs_lcevc_syntax_template.c"Go to the source code of this file.
Macros | |
| #define | HEADER(name) |
| #define | CHECK(call) |
| #define | FUNC_NAME2(rw, codec, name) cbs_ ## codec ## _ ## rw ## _ ## name |
| #define | FUNC_NAME1(rw, codec, name) FUNC_NAME2(rw, codec, name) |
| #define | FUNC_LCEVC(name) FUNC_NAME1(READWRITE, lcevc, name) |
| #define | FUNC_NAME2_EXPORT(rw, codec, name) ff_cbs_ ## codec ## _ ## rw ## _ ## name |
| #define | FUNC_NAME1_EXPORT(rw, codec, name) FUNC_NAME2_EXPORT(rw, codec, name) |
| #define | FUNC_SEI(name) FUNC_NAME1_EXPORT(READWRITE, sei, name) |
| #define | SEI_FUNC(name, args) |
| #define | LCEVC_BLOCK_FUNC(name, args) |
| #define | SUBSCRIPTS(subs, ...) (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL) |
| #define | u(width, name, range_min, range_max) xu(width, name, current->name, range_min, range_max, 0, ) |
| #define | flag(name) ub(1, name) |
| #define | ue(name, range_min, range_max) xue(name, current->name, range_min, range_max, 0, ) |
| #define | i(width, name, range_min, range_max) xi(width, name, current->name, range_min, range_max, 0, ) |
| #define | ib(width, name) xi(width, name, current->name, MIN_INT_BITS(width), MAX_INT_BITS(width), 0, ) |
| #define | se(name, range_min, range_max) xse(name, current->name, range_min, range_max, 0, ) |
| #define | us(width, name, range_min, range_max, subs, ...) xu(width, name, current->name, range_min, range_max, subs, __VA_ARGS__) |
| #define | ubs(width, name, subs, ...) xu(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__) |
| #define | flags(name, subs, ...) xu(1, name, current->name, 0, 1, subs, __VA_ARGS__) |
| #define | ues(name, range_min, range_max, subs, ...) xue(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
| #define | is(width, name, range_min, range_max, subs, ...) xi(width, name, current->name, range_min, range_max, subs, __VA_ARGS__) |
| #define | ibs(width, name, subs, ...) xi(width, name, current->name, MIN_INT_BITS(width), MAX_INT_BITS(width), subs, __VA_ARGS__) |
| #define | ses(name, range_min, range_max, subs, ...) xse(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
| #define | mb(name) xmb(name, current->name) |
| #define | fixed(width, name, value) |
| #define | READ |
| #define | READWRITE read |
| #define | RWContext GetBitContext |
| #define | ub(width, name) |
| #define | xu(width, name, var, range_min, range_max, subs, ...) |
| #define | xue(name, var, range_min, range_max, subs, ...) |
| #define | xi(width, name, var, range_min, range_max, subs, ...) |
| #define | xse(name, var, range_min, range_max, subs, ...) |
| #define | xmb(name, var) |
| #define | infer(name, value) |
| #define | more_rbsp_data(var) ((var) = ff_cbs_h2645_read_more_rbsp_data(rw)) |
| #define | bit_position(rw) (get_bits_count(rw)) |
| #define | byte_alignment(rw) (get_bits_count(rw) % 8) |
| #define | allocate(name, size) |
| #define | FUNC(name) FUNC_LCEVC(name) |
| #define | WRITE |
| #define | READWRITE write |
| #define | RWContext PutBitContext |
| #define | ub(width, name) |
| #define | xu(width, name, var, range_min, range_max, subs, ...) |
| #define | xue(name, var, range_min, range_max, subs, ...) |
| #define | xi(width, name, var, range_min, range_max, subs, ...) |
| #define | xse(name, var, range_min, range_max, subs, ...) |
| #define | xmb(name, var) |
| #define | infer(name, value) |
| #define | more_rbsp_data(var) (var) |
| #define | bit_position(rw) (put_bits_count(rw)) |
| #define | byte_alignment(rw) (put_bits_count(rw) % 8) |
| #define | allocate(name, size) |
| #define | FUNC(name) FUNC_LCEVC(name) |
| #define | LCEVC_PROCESS_BLOCK_RW(codec, name) |
Variables | |
| static CodedBitstreamUnitTypeDescriptor | cbs_lcevc_unit_types [] |
| static const LCEVCProcessBlockTypeDescriptor | cbs_lcevc_process_block_types [] |
| const CodedBitstreamType | ff_cbs_type_lcevc |
| #define HEADER | ( | name | ) |
Definition at line 29 of file cbs_lcevc.c.
| #define CHECK | ( | call | ) |
Definition at line 33 of file cbs_lcevc.c.
Definition at line 39 of file cbs_lcevc.c.
| #define FUNC_NAME1 | ( | rw, | |
| codec, | |||
| name | |||
| ) | FUNC_NAME2(rw, codec, name) |
Definition at line 40 of file cbs_lcevc.c.
| #define FUNC_LCEVC | ( | name | ) | FUNC_NAME1(READWRITE, lcevc, name) |
Definition at line 41 of file cbs_lcevc.c.
Definition at line 42 of file cbs_lcevc.c.
| #define FUNC_NAME1_EXPORT | ( | rw, | |
| codec, | |||
| name | |||
| ) | FUNC_NAME2_EXPORT(rw, codec, name) |
Definition at line 43 of file cbs_lcevc.c.
| #define FUNC_SEI | ( | name | ) | FUNC_NAME1_EXPORT(READWRITE, sei, name) |
Definition at line 44 of file cbs_lcevc.c.
| #define SEI_FUNC | ( | name, | |
| args | |||
| ) |
Definition at line 46 of file cbs_lcevc.c.
| #define LCEVC_BLOCK_FUNC | ( | name, | |
| args | |||
| ) |
Definition at line 56 of file cbs_lcevc.c.
| #define SUBSCRIPTS | ( | subs, | |
| ... | |||
| ) | (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL) |
Definition at line 67 of file cbs_lcevc.c.
| #define u | ( | width, | |
| name, | |||
| range_min, | |||
| range_max | |||
| ) | xu(width, name, current->name, range_min, range_max, 0, ) |
Definition at line 69 of file cbs_lcevc.c.
Definition at line 71 of file cbs_lcevc.c.
Definition at line 72 of file cbs_lcevc.c.
| #define i | ( | width, | |
| name, | |||
| range_min, | |||
| range_max | |||
| ) | xi(width, name, current->name, range_min, range_max, 0, ) |
Definition at line 74 of file cbs_lcevc.c.
| #define ib | ( | width, | |
| name | |||
| ) | xi(width, name, current->name, MIN_INT_BITS(width), MAX_INT_BITS(width), 0, ) |
Definition at line 76 of file cbs_lcevc.c.
Definition at line 78 of file cbs_lcevc.c.
| #define us | ( | width, | |
| name, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) | xu(width, name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 81 of file cbs_lcevc.c.
| #define ubs | ( | width, | |
| name, | |||
| subs, | |||
| ... | |||
| ) | xu(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__) |
Definition at line 83 of file cbs_lcevc.c.
Definition at line 85 of file cbs_lcevc.c.
| #define ues | ( | name, | |
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) | xue(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 87 of file cbs_lcevc.c.
| #define is | ( | width, | |
| name, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) | xi(width, name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 89 of file cbs_lcevc.c.
| #define ibs | ( | width, | |
| name, | |||
| subs, | |||
| ... | |||
| ) | xi(width, name, current->name, MIN_INT_BITS(width), MAX_INT_BITS(width), subs, __VA_ARGS__) |
Definition at line 91 of file cbs_lcevc.c.
| #define ses | ( | name, | |
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) | xse(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 93 of file cbs_lcevc.c.
| #define READ |
Definition at line 135 of file cbs_lcevc.c.
| #define READWRITE read |
Definition at line 245 of file cbs_lcevc.c.
| #define RWContext GetBitContext |
Definition at line 246 of file cbs_lcevc.c.
Definition at line 253 of file cbs_lcevc.c.
| #define xue | ( | name, | |
| var, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) |
Definition at line 259 of file cbs_lcevc.c.
Definition at line 265 of file cbs_lcevc.c.
| #define xse | ( | name, | |
| var, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) |
Definition at line 271 of file cbs_lcevc.c.
| #define xmb | ( | name, | |
| var | |||
| ) |
Definition at line 277 of file cbs_lcevc.c.
Definition at line 282 of file cbs_lcevc.c.
| #define more_rbsp_data | ( | var | ) | ((var) = ff_cbs_h2645_read_more_rbsp_data(rw)) |
Definition at line 292 of file cbs_lcevc.c.
| #define bit_position | ( | rw | ) | (get_bits_count(rw)) |
Definition at line 294 of file cbs_lcevc.c.
| #define byte_alignment | ( | rw | ) | (get_bits_count(rw) % 8) |
Definition at line 295 of file cbs_lcevc.c.
Definition at line 297 of file cbs_lcevc.c.
| #define FUNC | ( | name | ) | FUNC_LCEVC(name) |
Definition at line 305 of file cbs_lcevc.c.
| #define WRITE |
Definition at line 244 of file cbs_lcevc.c.
| #define READWRITE write |
Definition at line 245 of file cbs_lcevc.c.
| #define RWContext PutBitContext |
Definition at line 246 of file cbs_lcevc.c.
Definition at line 253 of file cbs_lcevc.c.
| #define xue | ( | name, | |
| var, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) |
Definition at line 259 of file cbs_lcevc.c.
Definition at line 265 of file cbs_lcevc.c.
| #define xse | ( | name, | |
| var, | |||
| range_min, | |||
| range_max, | |||
| subs, | |||
| ... | |||
| ) |
Definition at line 271 of file cbs_lcevc.c.
| #define xmb | ( | name, | |
| var | |||
| ) |
Definition at line 277 of file cbs_lcevc.c.
Definition at line 282 of file cbs_lcevc.c.
| #define more_rbsp_data | ( | var | ) | (var) |
Definition at line 292 of file cbs_lcevc.c.
| #define bit_position | ( | rw | ) | (put_bits_count(rw)) |
Definition at line 294 of file cbs_lcevc.c.
| #define byte_alignment | ( | rw | ) | (put_bits_count(rw) % 8) |
Definition at line 295 of file cbs_lcevc.c.
Definition at line 297 of file cbs_lcevc.c.
| #define FUNC | ( | name | ) | FUNC_LCEVC(name) |
Definition at line 305 of file cbs_lcevc.c.
| #define LCEVC_PROCESS_BLOCK_RW | ( | codec, | |
| name | |||
| ) |
Definition at line 772 of file cbs_lcevc.c.
|
static |
Definition at line 104 of file cbs_lcevc.c.
|
static |
Definition at line 218 of file cbs_lcevc.c.
|
static |
Definition at line 330 of file cbs_lcevc.c.
|
static |
Definition at line 418 of file cbs_lcevc.c.
|
static |
Definition at line 470 of file cbs_lcevc.c.
|
static |
Definition at line 495 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_alloc_process_block_payload().
|
static |
Definition at line 502 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_alloc_process_block_payload().
|
static |
Definition at line 513 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_alloc_process_block_payload().
| int ff_cbs_lcevc_alloc_process_block_payload | ( | LCEVCRawProcessBlock * | block, |
| const LCEVCProcessBlockTypeDescriptor * | desc | ||
| ) |
Allocate a new payload for the given Process Block.
Definition at line 525 of file cbs_lcevc.c.
Referenced by process_block().
| int ff_cbs_lcevc_list_add | ( | LCEVCRawProcessBlockList * | list, |
| int | position | ||
| ) |
Allocate a new empty Process Block in a block list at a given position.
Definition at line 552 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_add_process_block(), and process_block_list().
| void ff_cbs_lcevc_free_process_block_list | ( | LCEVCRawProcessBlockList * | list | ) |
Free all Process Block in a block list.
Definition at line 591 of file cbs_lcevc.c.
Referenced by cbs_lcevc_free_nal().
|
static |
Definition at line 601 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_add_process_block(), ff_cbs_lcevc_delete_process_block_type(), and ff_cbs_lcevc_find_process_block().
| int ff_cbs_lcevc_add_process_block | ( | CodedBitstreamContext * | ctx, |
| CodedBitstreamFragment * | au, | ||
| int | position, | ||
| uint32_t | payload_type, | ||
| void * | payload_data, | ||
| void * | payload_ref | ||
| ) |
Add a process block to an access unit.
An existing NAL unit of type IDR or NON_IDR are required.
If set, payload_ref must be a RefStruct reference backing payload_data. This function creates a new reference to payload_ref in this case. If payload_ref is NULL, the new message will not be reference counted.
Definition at line 613 of file cbs_lcevc.c.
Referenced by lcevc_metadata_handle_vui().
| int ff_cbs_lcevc_find_process_block | ( | CodedBitstreamContext * | ctx, |
| CodedBitstreamFragment * | au, | ||
| uint32_t | payload_type, | ||
| LCEVCRawProcessBlock ** | block | ||
| ) |
Iterate over blocks with the given payload type in an access unit.
Set block to NULL in the first call. Returns 0 while more blocks are available, AVERROR(ENOENT) when all blocks have been found.
Definition at line 665 of file cbs_lcevc.c.
Referenced by ff_lcevc_parse_frame(), and lcevc_metadata_handle_vui().
|
static |
Definition at line 701 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_delete_process_block_type().
| void ff_cbs_lcevc_delete_process_block_type | ( | CodedBitstreamContext * | ctx, |
| CodedBitstreamFragment * | au, | ||
| uint32_t | payload_type | ||
| ) |
Delete all blocks with the given payload type from an access unit.
Definition at line 720 of file cbs_lcevc.c.
Referenced by lcevc_metadata_update_fragment().
|
static |
Definition at line 741 of file cbs_lcevc.c.
Referenced by cbs_lcevc_close().
|
static |
Definition at line 750 of file cbs_lcevc.c.
|
static |
Definition at line 758 of file cbs_lcevc.c.
| const LCEVCProcessBlockTypeDescriptor* ff_cbs_lcevc_process_block_find_type | ( | CodedBitstreamContext * | ctx, |
| int | payload_type | ||
| ) |
Find the type descriptor for the given payload type.
Returns NULL if the payload type is not known.
Definition at line 811 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_add_process_block(), and process_block().
|
static |
Definition at line 764 of file cbs_lcevc.c.
|
static |
Definition at line 776 of file cbs_lcevc.c.
Referenced by ff_cbs_lcevc_process_block_find_type().
| const CodedBitstreamType ff_cbs_type_lcevc |
Definition at line 822 of file cbs_lcevc.c.
1.8.17