Compy 0.2.0
A lightweight RTSP 1.0 server library for embedded systems
Loading...
Searching...
No Matches
h265.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <stdbool.h>
12
13#include <slice99.h>
14
15#include <compy/priv/compiler_attrs.h>
16
20#define COMPY_H265_NAL_HEADER_SIZE sizeof(uint16_t)
21
27#define COMPY_H265_FU_HEADER_SIZE \
28 (/* payload-hdr */ sizeof(uint16_t) + /* fu-header */ sizeof(uint8_t))
29
33typedef struct {
38
42 uint8_t unit_type;
43
47 uint8_t nuh_layer_id;
48
54
58typedef struct {
63
67 U8Slice99 payload;
69
74Compy_H265NalHeader_parse(uint8_t bytes[restrict static 2]) COMPY_PRIV_MUST_USE;
75
79uint16_t
81
85bool Compy_H265NalHeader_is_vps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE;
86
90bool Compy_H265NalHeader_is_sps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE;
91
95bool Compy_H265NalHeader_is_pps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE;
96
101 COMPY_PRIV_MUST_USE;
102
107 COMPY_PRIV_MUST_USE;
108
121 Compy_H265NalHeader self, uint8_t buffer[restrict], bool is_first_fragment,
122 bool is_last_fragment);
123
127#define COMPY_H265_NAL_UNIT_TRAIL_N 0
128
132#define COMPY_H265_NAL_UNIT_TRAIL_R 1
133
137#define COMPY_H265_NAL_UNIT_TSA_N 2
138
142#define COMPY_H265_NAL_UNIT_TSA_R 3
143
147#define COMPY_H265_NAL_UNIT_STSA_N 4
148
152#define COMPY_H265_NAL_UNIT_STSA_R 5
153
157#define COMPY_H265_NAL_UNIT_RADL_N 6
158
162#define COMPY_H265_NAL_UNIT_RADL_R 7
163
167#define COMPY_H265_NAL_UNIT_RASL_N 8
168
172#define COMPY_H265_NAL_UNIT_RASL_R 9
173
177#define COMPY_H265_NAL_UNIT_BLA_W_LP 16
178
182#define COMPY_H265_NAL_UNIT_BLA_W_RADL 17
183
187#define COMPY_H265_NAL_UNIT_BLA_N_LP 18
188
192#define COMPY_H265_NAL_UNIT_IDR_W_RADL 19
193
197#define COMPY_H265_NAL_UNIT_IDR_N_LP 20
198
202#define COMPY_H265_NAL_UNIT_CRA_NUT 21
203
207#define COMPY_H265_NAL_UNIT_VPS_NUT 32
208
212#define COMPY_H265_NAL_UNIT_SPS_NUT 33
213
217#define COMPY_H265_NAL_UNIT_PPS_NUT 34
218
222#define COMPY_H265_NAL_UNIT_AUD_NUT 35
223
227#define COMPY_H265_NAL_UNIT_EOS_NUT 36
228
232#define COMPY_H265_NAL_UNIT_EOB_NUT 37
233
237#define COMPY_H265_NAL_UNIT_FD_NUT 38
238
242#define COMPY_H265_NAL_UNIT_PREFIX_SEI_NUT 39
243
247#define COMPY_H265_NAL_UNIT_SUFFIX_SEI_NUT 40
bool Compy_H265NalHeader_is_sps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Checks whether self is SPS.
Definition h265.c:38
void Compy_H265NalHeader_write_fu_header(Compy_H265NalHeader self, uint8_t buffer[restrict], bool is_first_fragment, bool is_last_fragment)
Writes a FU header of self to buffer.
Definition h265.c:55
bool Compy_H265NalHeader_is_coded_slice_non_idr(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Checks whether self is a coded slice non-IDR.
Definition h265.c:50
uint16_t Compy_H265NalHeader_serialize(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Converts self to a two-octet representation.
Definition h265.c:19
bool Compy_H265NalHeader_is_coded_slice_idr(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Checks whether self is a coded slice IDR.
Definition h265.c:46
Compy_H265NalHeader Compy_H265NalHeader_parse(uint8_t bytes[restrict static 2]) COMPY_PRIV_MUST_USE
Parses an H.265 NAL header from byte_header.
Definition h265.c:9
bool Compy_H265NalHeader_is_pps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Checks whether self is PPS.
Definition h265.c:42
bool Compy_H265NalHeader_is_vps(Compy_H265NalHeader self) COMPY_PRIV_MUST_USE
Checks whether self is VPS.
Definition h265.c:34
An H.265 NAL header.
Definition h265.h:33
uint8_t unit_type
unit_type u(6).
Definition h265.h:42
bool forbidden_zero_bit
forbidden_zero_bit f(1).
Definition h265.h:37
uint8_t nuh_layer_id
nuh_layer_id u(6).
Definition h265.h:47
uint8_t nuh_temporal_id_plus1
nuh_temporal_id_plus1 u(3).
Definition h265.h:52
An H.265 NAL unit.
Definition h265.h:58
U8Slice99 payload
The payload data of this NAL unit (not including the header).
Definition h265.h:67
Compy_H265NalHeader header
The NAL header of this NAL unit.
Definition h265.h:62