FFmpeg
|
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "bytestream.h"
#include "cbs.h"
#include "cbs_internal.h"
#include "cbs_h264.h"
#include "cbs_h265.h"
#include "cbs_h266.h"
#include "h264.h"
#include "h2645_parse.h"
#include "refstruct.h"
#include "vvc.h"
#include "hevc/hevc.h"
#include "cbs_sei_syntax_template.c"
#include "cbs_h264_syntax_template.c"
#include "cbs_h265_syntax_template.c"
#include "cbs_h266_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_H264(name) FUNC_NAME1(READWRITE, h264, name) |
#define | FUNC_H265(name) FUNC_NAME1(READWRITE, h265, name) |
#define | FUNC_H266(name) FUNC_NAME1(READWRITE, h266, name) |
#define | FUNC_SEI(name) FUNC_NAME1(READWRITE, sei, name) |
#define | SEI_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 | 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 | infer(name, value) |
#define | more_rbsp_data(var) ((var) = 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_SEI(name) |
#define | allocate(name, size) |
#define | FUNC(name) FUNC_H264(name) |
#define | FUNC(name) FUNC_H265(name) |
#define | FUNC(name) FUNC_H266(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 | 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_SEI(name) |
#define | FUNC(name) FUNC_H264(name) |
#define | FUNC(name) FUNC_H265(name) |
#define | FUNC(name) FUNC_H266(name) |
#define | cbs_h2645_replace_ps(h26n, ps_name, ps_var, id_element) |
#define | cbs_h266_replace_ps(h26n, ps_name, ps_var, id_element) |
#define | SEI_MESSAGE_RW(codec, name) |
Variables | |
static const CodedBitstreamUnitTypeDescriptor | cbs_h264_unit_types [] |
static const CodedBitstreamUnitTypeDescriptor | cbs_h265_unit_types [] |
static const CodedBitstreamUnitTypeDescriptor | cbs_h266_unit_types [] |
const CodedBitstreamType | ff_cbs_type_h264 |
const CodedBitstreamType | ff_cbs_type_h265 |
const CodedBitstreamType | ff_cbs_type_h266 |
static const SEIMessageTypeDescriptor | cbs_sei_common_types [] |
static const SEIMessageTypeDescriptor | cbs_sei_h264_types [] |
static const SEIMessageTypeDescriptor | cbs_sei_h265_types [] |
static const SEIMessageTypeDescriptor | cbs_sei_h266_types [] |
#define HEADER | ( | name | ) |
Definition at line 222 of file cbs_h2645.c.
#define CHECK | ( | call | ) |
Definition at line 226 of file cbs_h2645.c.
Definition at line 232 of file cbs_h2645.c.
#define FUNC_NAME1 | ( | rw, | |
codec, | |||
name | |||
) | FUNC_NAME2(rw, codec, name) |
Definition at line 233 of file cbs_h2645.c.
#define FUNC_H264 | ( | name | ) | FUNC_NAME1(READWRITE, h264, name) |
Definition at line 234 of file cbs_h2645.c.
#define FUNC_H265 | ( | name | ) | FUNC_NAME1(READWRITE, h265, name) |
Definition at line 235 of file cbs_h2645.c.
#define FUNC_H266 | ( | name | ) | FUNC_NAME1(READWRITE, h266, name) |
Definition at line 236 of file cbs_h2645.c.
#define FUNC_SEI | ( | name | ) | FUNC_NAME1(READWRITE, sei, name) |
Definition at line 237 of file cbs_h2645.c.
#define SEI_FUNC | ( | name, | |
args | |||
) |
#define SUBSCRIPTS | ( | subs, | |
... | |||
) | (subs > 0 ? ((int[subs + 1]){ subs, __VA_ARGS__ }) : NULL) |
Definition at line 249 of file cbs_h2645.c.
#define u | ( | width, | |
name, | |||
range_min, | |||
range_max | |||
) | xu(width, name, current->name, range_min, range_max, 0, ) |
Definition at line 251 of file cbs_h2645.c.
Definition at line 253 of file cbs_h2645.c.
Definition at line 254 of file cbs_h2645.c.
#define i | ( | width, | |
name, | |||
range_min, | |||
range_max | |||
) | xi(width, name, current->name, range_min, range_max, 0, ) |
Definition at line 256 of file cbs_h2645.c.
#define ib | ( | width, | |
name | |||
) | xi(width, name, current->name, MIN_INT_BITS(width), MAX_INT_BITS(width), 0, ) |
Definition at line 258 of file cbs_h2645.c.
Definition at line 260 of file cbs_h2645.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 263 of file cbs_h2645.c.
#define ubs | ( | width, | |
name, | |||
subs, | |||
... | |||
) | xu(width, name, current->name, 0, MAX_UINT_BITS(width), subs, __VA_ARGS__) |
Definition at line 265 of file cbs_h2645.c.
Definition at line 267 of file cbs_h2645.c.
#define ues | ( | name, | |
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) | xue(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 269 of file cbs_h2645.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 271 of file cbs_h2645.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 273 of file cbs_h2645.c.
#define ses | ( | name, | |
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) | xse(name, current->name, range_min, range_max, subs, __VA_ARGS__) |
Definition at line 275 of file cbs_h2645.c.
#define READ |
Definition at line 284 of file cbs_h2645.c.
#define READWRITE read |
Definition at line 398 of file cbs_h2645.c.
#define RWContext GetBitContext |
Definition at line 399 of file cbs_h2645.c.
Definition at line 401 of file cbs_h2645.c.
Definition at line 406 of file cbs_h2645.c.
#define xue | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 412 of file cbs_h2645.c.
Definition at line 418 of file cbs_h2645.c.
#define xse | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 424 of file cbs_h2645.c.
Definition at line 431 of file cbs_h2645.c.
#define more_rbsp_data | ( | var | ) | ((var) = cbs_h2645_read_more_rbsp_data(rw)) |
Definition at line 441 of file cbs_h2645.c.
#define bit_position | ( | rw | ) | (get_bits_count(rw)) |
Definition at line 443 of file cbs_h2645.c.
#define byte_alignment | ( | rw | ) | (get_bits_count(rw) % 8) |
Definition at line 444 of file cbs_h2645.c.
Definition at line 446 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 446 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
#define WRITE |
Definition at line 397 of file cbs_h2645.c.
#define READWRITE write |
Definition at line 398 of file cbs_h2645.c.
#define RWContext PutBitContext |
Definition at line 399 of file cbs_h2645.c.
Definition at line 401 of file cbs_h2645.c.
Definition at line 406 of file cbs_h2645.c.
#define xue | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 412 of file cbs_h2645.c.
Definition at line 418 of file cbs_h2645.c.
#define xse | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 424 of file cbs_h2645.c.
Definition at line 431 of file cbs_h2645.c.
#define more_rbsp_data | ( | var | ) | (var) |
Definition at line 441 of file cbs_h2645.c.
#define bit_position | ( | rw | ) | (put_bits_count(rw)) |
Definition at line 443 of file cbs_h2645.c.
#define byte_alignment | ( | rw | ) | (put_bits_count(rw) % 8) |
Definition at line 444 of file cbs_h2645.c.
Definition at line 446 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
Definition at line 466 of file cbs_h2645.c.
#define cbs_h2645_replace_ps | ( | h26n, | |
ps_name, | |||
ps_var, | |||
id_element | |||
) |
Definition at line 759 of file cbs_h2645.c.
#define cbs_h266_replace_ps | ( | h26n, | |
ps_name, | |||
ps_var, | |||
id_element | |||
) |
#define SEI_MESSAGE_RW | ( | codec, | |
name | |||
) |
Definition at line 2131 of file cbs_h2645.c.
|
static |
Definition at line 36 of file cbs_h2645.c.
|
static |
Definition at line 85 of file cbs_h2645.c.
|
static |
Definition at line 140 of file cbs_h2645.c.
|
static |
Definition at line 172 of file cbs_h2645.c.
|
static |
Definition at line 214 of file cbs_h2645.c.
Referenced by payload_extension(), and SEI_FUNC().
|
static |
Definition at line 328 of file cbs_h2645.c.
Referenced by cbs_h264_read_nal_unit(), cbs_h265_read_nal_unit(), cbs_h266_read_nal_unit(), extension_data(), and message_list().
|
static |
Definition at line 490 of file cbs_h2645.c.
Referenced by cbs_h2645_split_fragment().
|
static |
Definition at line 526 of file cbs_h2645.c.
cbs_h2645_replace_ps | ( | cbs_h2645_replace_ps( | 4, |
cbs_h2645_replace_ps( | SPS, | ||
cbs_h2645_replace_ps( | sps, | ||
seq_parameter_set_id | |||
) |
Definition at line 776 of file cbs_h2645.c.
|
static |
Definition at line 820 of file cbs_h2645.c.
Referenced by cbs_h266_read_nal_unit(), and cbs_h266_write_nal_unit().
|
static |
Definition at line 836 of file cbs_h2645.c.
|
static |
Definition at line 955 of file cbs_h2645.c.
|
static |
Definition at line 1084 of file cbs_h2645.c.
|
static |
Definition at line 1241 of file cbs_h2645.c.
Referenced by cbs_h264_write_nal_unit(), cbs_h265_write_nal_unit(), and cbs_h266_write_nal_unit().
|
static |
Definition at line 1299 of file cbs_h2645.c.
|
static |
Definition at line 1416 of file cbs_h2645.c.
|
static |
Definition at line 1536 of file cbs_h2645.c.
|
static |
Definition at line 1588 of file cbs_h2645.c.
|
static |
Definition at line 1661 of file cbs_h2645.c.
|
static |
Definition at line 1810 of file cbs_h2645.c.
Referenced by cbs_h2645_assemble_fragment().
|
static |
Definition at line 1828 of file cbs_h2645.c.
|
static |
Definition at line 1908 of file cbs_h2645.c.
|
static |
Definition at line 1922 of file cbs_h2645.c.
|
static |
Definition at line 1935 of file cbs_h2645.c.
|
static |
Definition at line 1951 of file cbs_h2645.c.
|
static |
Definition at line 1966 of file cbs_h2645.c.
Referenced by cbs_h266_close().
|
static |
Definition at line 1979 of file cbs_h2645.c.
|
static |
Definition at line 1987 of file cbs_h2645.c.
|
static |
Definition at line 2013 of file cbs_h2645.c.
|
static |
Definition at line 2040 of file cbs_h2645.c.
const SEIMessageTypeDescriptor* ff_cbs_sei_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 2313 of file cbs_h2645.c.
Referenced by ff_cbs_sei_add_message(), and message().
|
static |
Definition at line 1993 of file cbs_h2645.c.
|
static |
Definition at line 2019 of file cbs_h2645.c.
|
static |
Definition at line 2046 of file cbs_h2645.c.
const CodedBitstreamType ff_cbs_type_h264 |
Definition at line 2080 of file cbs_h2645.c.
const CodedBitstreamType ff_cbs_type_h265 |
Definition at line 2097 of file cbs_h2645.c.
const CodedBitstreamType ff_cbs_type_h266 |
Definition at line 2114 of file cbs_h2645.c.
|
static |
Definition at line 2135 of file cbs_h2645.c.
Referenced by ff_cbs_sei_find_type().
|
static |
Definition at line 2193 of file cbs_h2645.c.
Referenced by ff_cbs_sei_find_type().
|
static |
Definition at line 2239 of file cbs_h2645.c.
Referenced by ff_cbs_sei_find_type().
|
static |
Definition at line 2309 of file cbs_h2645.c.
Referenced by ff_cbs_sei_find_type().