FFmpeg
|
#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "bytestream.h"
#include "cbs.h"
#include "cbs_internal.h"
#include "cbs_h264.h"
#include "cbs_h265.h"
#include "h264.h"
#include "h264_sei.h"
#include "h2645_parse.h"
#include "hevc.h"
#include "hevc_sei.h"
#include "cbs_h264_syntax_template.c"
#include "cbs_h265_syntax_template.c"
Go to the source code of this file.
Macros | |
#define | HEADER(name) |
#define | CHECK(call) |
#define | FUNC_NAME(rw, codec, name) cbs_ ## codec ## _ ## rw ## _ ## name |
#define | FUNC_H264(rw, name) FUNC_NAME(rw, h264, name) |
#define | FUNC_H265(rw, name) FUNC_NAME(rw, h265, name) |
#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 | ub(width, name) xu(width, name, current->name, 0, MAX_UINT_BITS(width), 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 | 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 | byte_alignment(rw) (get_bits_count(rw) % 8) |
#define | allocate(name, size) |
#define | FUNC(name) FUNC_H264(READWRITE, name) |
#define | FUNC(name) FUNC_H265(READWRITE, name) |
#define | WRITE |
#define | READWRITE write |
#define | RWContext PutBitContext |
#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 | byte_alignment(rw) (put_bits_count(rw) % 8) |
#define | allocate(name, size) |
#define | FUNC(name) FUNC_H264(READWRITE, name) |
#define | FUNC(name) FUNC_H265(READWRITE, name) |
#define | cbs_h2645_replace_ps(h26n, ps_name, ps_var, id_element) |
Variables | |
const CodedBitstreamType | ff_cbs_type_h264 |
const CodedBitstreamType | ff_cbs_type_h265 |
#define HEADER | ( | name | ) |
Definition at line 236 of file cbs_h2645.c.
#define CHECK | ( | call | ) |
Definition at line 240 of file cbs_h2645.c.
Definition at line 246 of file cbs_h2645.c.
Definition at line 247 of file cbs_h2645.c.
Definition at line 248 of file cbs_h2645.c.
Definition at line 250 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 252 of file cbs_h2645.c.
Definition at line 254 of file cbs_h2645.c.
Definition at line 256 of file cbs_h2645.c.
Definition at line 257 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 259 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 261 of file cbs_h2645.c.
Definition at line 263 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 266 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 268 of file cbs_h2645.c.
Definition at line 270 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 272 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 274 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 276 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 278 of file cbs_h2645.c.
#define READ |
Definition at line 287 of file cbs_h2645.c.
#define READWRITE read |
Definition at line 371 of file cbs_h2645.c.
#define RWContext GetBitContext |
Definition at line 372 of file cbs_h2645.c.
Definition at line 374 of file cbs_h2645.c.
#define xue | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 380 of file cbs_h2645.c.
Definition at line 386 of file cbs_h2645.c.
#define xse | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 392 of file cbs_h2645.c.
Definition at line 399 of file cbs_h2645.c.
#define more_rbsp_data | ( | var | ) | ((var) = cbs_h2645_read_more_rbsp_data(rw)) |
Definition at line 408 of file cbs_h2645.c.
#define byte_alignment | ( | rw | ) | (get_bits_count(rw) % 8) |
Definition at line 410 of file cbs_h2645.c.
Definition at line 412 of file cbs_h2645.c.
#define WRITE |
Definition at line 370 of file cbs_h2645.c.
#define READWRITE write |
Definition at line 371 of file cbs_h2645.c.
#define RWContext PutBitContext |
Definition at line 372 of file cbs_h2645.c.
Definition at line 374 of file cbs_h2645.c.
#define xue | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 380 of file cbs_h2645.c.
Definition at line 386 of file cbs_h2645.c.
#define xse | ( | name, | |
var, | |||
range_min, | |||
range_max, | |||
subs, | |||
... | |||
) |
Definition at line 392 of file cbs_h2645.c.
Definition at line 399 of file cbs_h2645.c.
#define more_rbsp_data | ( | var | ) | (var) |
Definition at line 408 of file cbs_h2645.c.
#define byte_alignment | ( | rw | ) | (put_bits_count(rw) % 8) |
Definition at line 410 of file cbs_h2645.c.
Definition at line 412 of file cbs_h2645.c.
#define cbs_h2645_replace_ps | ( | h26n, | |
ps_name, | |||
ps_var, | |||
id_element | |||
) |
Definition at line 747 of file cbs_h2645.c.
|
static |
Definition at line 34 of file cbs_h2645.c.
|
static |
Definition at line 86 of file cbs_h2645.c.
|
static |
Definition at line 142 of file cbs_h2645.c.
|
static |
Definition at line 185 of file cbs_h2645.c.
|
static |
Definition at line 325 of file cbs_h2645.c.
Referenced by cbs_h2645_replace_ps(), cbs_h265_read_nal_unit(), extension_data(), and sei().
|
static |
Definition at line 446 of file cbs_h2645.c.
Referenced by cbs_h2645_replace_ps().
|
static |
Definition at line 453 of file cbs_h2645.c.
Referenced by cbs_h264_free_sei(), and ff_cbs_h264_delete_sei_message().
|
static |
Definition at line 476 of file cbs_h2645.c.
Referenced by cbs_h2645_replace_ps(), and ff_cbs_h264_add_sei_message().
|
static |
Definition at line 485 of file cbs_h2645.c.
Referenced by cbs_h2645_replace_ps().
|
static |
Definition at line 492 of file cbs_h2645.c.
Referenced by cbs_h265_read_nal_unit().
|
static |
Definition at line 499 of file cbs_h2645.c.
Referenced by cbs_h265_read_nal_unit().
|
static |
Definition at line 506 of file cbs_h2645.c.
Referenced by cbs_h265_read_nal_unit().
|
static |
Definition at line 513 of file cbs_h2645.c.
Referenced by cbs_h265_read_nal_unit().
|
static |
Definition at line 520 of file cbs_h2645.c.
Referenced by cbs_h265_free_sei().
|
static |
Definition at line 548 of file cbs_h2645.c.
Referenced by cbs_h265_read_nal_unit().
|
static |
Definition at line 557 of file cbs_h2645.c.
Referenced by cbs_h2645_split_fragment().
|
static |
Definition at line 588 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 774 of file cbs_h2645.c.
|
static |
Definition at line 939 of file cbs_h2645.c.
|
static |
Definition at line 1091 of file cbs_h2645.c.
Referenced by cbs_h264_write_nal_unit(), and cbs_h265_write_nal_unit().
|
static |
Definition at line 1149 of file cbs_h2645.c.
|
static |
Definition at line 1266 of file cbs_h2645.c.
|
static |
Definition at line 1378 of file cbs_h2645.c.
|
static |
Definition at line 1465 of file cbs_h2645.c.
|
static |
Definition at line 1478 of file cbs_h2645.c.
int ff_cbs_h264_add_sei_message | ( | CodedBitstreamContext * | ctx, |
CodedBitstreamFragment * | au, | ||
const H264RawSEIPayload * | payload | ||
) |
Add an SEI message to an access unit.
Definition at line 1519 of file cbs_h2645.c.
Referenced by h264_metadata_filter().
void ff_cbs_h264_delete_sei_message | ( | CodedBitstreamContext * | ctx, |
CodedBitstreamFragment * | access_unit, | ||
CodedBitstreamUnit * | nal_unit, | ||
int | position | ||
) |
Delete an SEI message from an access unit.
Deletes from nal_unit, which must be an SEI NAL unit. If this is the last message in nal_unit, also deletes it from access_unit.
Requires nal_unit to be a unit in access_unit and position to be >= 0 and < the payload count of the SEI nal_unit.
Definition at line 1581 of file cbs_h2645.c.
Referenced by h264_metadata_filter().
const CodedBitstreamType ff_cbs_type_h264 |
Definition at line 1493 of file cbs_h2645.c.
const CodedBitstreamType ff_cbs_type_h265 |
Definition at line 1506 of file cbs_h2645.c.