Go to the documentation of this file.
86 unsigned sps_seq_parameter_set_id;
132 uint8_t nal_type,
int ps_array_completeness,
136 uint16_t numNalus =
array->numNalus;
146 array->nalUnit [numNalus] = (uint8_t *)nal_buf;
147 array->nalUnitLength[numNalus] = nal_size;
148 array->NAL_unit_type = nal_type;
157 array->array_completeness = ps_array_completeness;
210 if(
array->numNalus == 0)
214 i,
array->array_completeness);
219 for (
unsigned j = 0; j <
array->numNalus; j++)
221 "nalUnitLength[%"PRIu8
"][%"PRIu16
"]: %"PRIu16
"\n",
222 i, j,
array->nalUnitLength[j]);
274 if (!
array->numNalus)
283 array->NAL_unit_type & 0x3f);
288 for (
unsigned j = 0; j <
array->numNalus; j++) {
294 array->nalUnitLength[j]);
302 int size,
int ps_array_completeness)
307 int bytes_to_read =
size;
308 unsigned array_index;
315 }
else if (*
data == 1) {
325 if (nalu_size == 0)
break;
330 if (bytes_to_read < nalu_size)
break;
380 bytes_to_read -= nalu_size;
static void evcc_init(EVCDecoderConfigurationRecord *evcc)
EVCNALUnitArray arrays[NB_ARRAYS]
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
uint8_t bit_depth_luma_minus8
static int evcc_parse_sps(const uint8_t *bs, int bs_size, EVCDecoderConfigurationRecord *evcc)
unsigned nalus_array_size
#define EVC_NALU_HEADER_SIZE
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int evcc_array_add_nal_unit(const uint8_t *nal_buf, uint32_t nal_size, uint8_t nal_type, int ps_array_completeness, EVCNALUnitArray *array)
int ff_isom_write_evcc(AVIOContext *pb, const uint8_t *data, int size, int ps_array_completeness)
Writes EVC sample metadata to the provided AVIOContext.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define FF_ARRAY_ELEMS(a)
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
unsigned nb_nalus
valid entries in nalus
static void evcc_close(EVCDecoderConfigurationRecord *evcc)
void avio_w8(AVIOContext *s, int b)
uint8_t bit_depth_chroma_minus8
Specifies the decoder configuration information for ISO/IEC 23094-1 video content.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void avio_wb32(AVIOContext *s, unsigned int val)
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate an array through a pointer to a pointer.
uint8_t lengthSizeMinusOne
#define EVC_NALU_LENGTH_PREFIX_SIZE
#define i(width, name, range_min, range_max)
uint8_t configurationVersion
uint16_t pic_height_in_luma_samples
uint8_t chroma_format_idc
uint8_t array_completeness
static int array[MAX_W *MAX_W]
static uint32_t evc_read_nal_unit_length(const uint8_t *bits, int bits_size, void *logctx)
uint16_t pic_width_in_luma_samples
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
void avio_wb16(AVIOContext *s, unsigned int val)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int evcc_write(AVIOContext *pb, EVCDecoderConfigurationRecord *evcc)