FFmpeg
cbs_h2645.h
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 
19 #ifndef AVCODEC_CBS_H2645_H
20 #define AVCODEC_CBS_H2645_H
21 
22 #include "cbs.h"
23 #include "h2645_parse.h"
24 
25 
27  // If set, the stream being read is in MP4 (AVCC/HVCC) format. If not
28  // set, the stream is assumed to be in annex B format.
29  int mp4;
30  // Size in bytes of the NAL length field for MP4 format.
32  // Packet reader.
35 
36 struct GetBitContext;
37 struct PutBitContext;
38 
40  const char *name, const int *subscripts,
41  uint32_t *write_to,
42  uint32_t range_min, uint32_t range_max);
44  const char *name, const int *subscripts,
45  int32_t *write_to,
46  int32_t range_min, int32_t range_max);
48  const char *name, const int *subscripts,
49  uint32_t value,
50  uint32_t range_min, uint32_t range_max);
52  const char *name, const int *subscripts,
53  int32_t value,
54  int32_t range_min, int32_t range_max);
55 
57 
60  const H2645Packet *packet);
61 
63  struct PutBitContext *pbc, const uint8_t *data,
64  size_t data_size, int data_bit_start);
65 
68  int nal_unit_index);
69 
72 
73 /**
74  * payload_extension_present() - true if we are before the last 1-bit
75  * in the payload structure, which must be in the last byte.
76  */
77 int ff_cbs_h2645_payload_extension_present(struct GetBitContext *gbc, uint32_t payload_size,
78  int cur_pos);
79 
80 #endif /* AVCODEC_CBS_H2645_H */
cbs.h
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
h2645_parse.h
CodedBitstreamContext
Context structure for coded bitstream operations.
Definition: cbs.h:226
data
const char data[16]
Definition: mxf.c:149
ff_cbs_write_ue_golomb
int ff_cbs_write_ue_golomb(CodedBitstreamContext *ctx, struct PutBitContext *pbc, const char *name, const int *subscripts, uint32_t value, uint32_t range_min, uint32_t range_max)
Definition: cbs_h2645.c:145
GetBitContext
Definition: get_bits.h:109
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
ff_cbs_read_se_golomb
int ff_cbs_read_se_golomb(CodedBitstreamContext *ctx, struct GetBitContext *gbc, const char *name, const int *subscripts, int32_t *write_to, int32_t range_min, int32_t range_max)
Definition: cbs_h2645.c:90
ff_cbs_h2645_read_more_rbsp_data
int ff_cbs_h2645_read_more_rbsp_data(struct GetBitContext *gbc)
Definition: cbs_h2645.c:217
CodedBitstreamH2645Context
Definition: cbs_h2645.h:26
CodedBitstreamH2645Context::nal_length_size
int nal_length_size
Definition: cbs_h2645.h:31
ff_cbs_h2645_assemble_fragment
int ff_cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag)
Definition: cbs_h2645.c:341
CodedBitstreamFragment
Coded bitstream fragment structure, combining one or more units.
Definition: cbs.h:129
CodedBitstreamUnitType
uint32_t CodedBitstreamUnitType
The codec-specific type of a bitstream unit.
Definition: cbs.h:54
ctx
static AVFormatContext * ctx
Definition: movenc.c:49
CodedBitstreamH2645Context::mp4
int mp4
Definition: cbs_h2645.h:29
codec_id
enum AVCodecID codec_id
Definition: vaapi_decode.c:410
PutBitContext
Definition: put_bits.h:50
CodedBitstreamH2645Context::read_packet
H2645Packet read_packet
Definition: cbs_h2645.h:33
ff_cbs_h2645_payload_extension_present
int ff_cbs_h2645_payload_extension_present(struct GetBitContext *gbc, uint32_t payload_size, int cur_pos)
payload_extension_present() - true if we are before the last 1-bit in the payload structure,...
Definition: cbs_h2645.c:33
AVCodecID
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: codec_id.h:49
ff_cbs_h2645_unit_requires_zero_byte
int ff_cbs_h2645_unit_requires_zero_byte(enum AVCodecID codec_id, CodedBitstreamUnitType type, int nal_unit_index)
Definition: cbs_h2645.c:323
value
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
Definition: writing_filters.txt:86
ff_cbs_h2645_write_slice_data
int ff_cbs_h2645_write_slice_data(CodedBitstreamContext *ctx, struct PutBitContext *pbc, const uint8_t *data, size_t data_size, int data_bit_start)
Definition: cbs_h2645.c:265
ff_cbs_write_se_golomb
int ff_cbs_write_se_golomb(CodedBitstreamContext *ctx, struct PutBitContext *pbc, const char *name, const int *subscripts, int32_t value, int32_t range_min, int32_t range_max)
Definition: cbs_h2645.c:177
int32_t
int32_t
Definition: audioconvert.c:56
ff_cbs_h2645_fragment_add_nals
int ff_cbs_h2645_fragment_add_nals(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const H2645Packet *packet)
Definition: cbs_h2645.c:229
ff_cbs_read_ue_golomb
int ff_cbs_read_ue_golomb(CodedBitstreamContext *ctx, struct GetBitContext *gbc, const char *name, const int *subscripts, uint32_t *write_to, uint32_t range_min, uint32_t range_max)
Definition: cbs_h2645.c:41
H2645Packet
Definition: h2645_parse.h:82