Go to the documentation of this file.
83 unsigned sps_seq_parameter_set_id;
129 uint8_t nal_type,
int ps_array_completeness,
133 uint16_t numNalus =
array->numNalus;
143 array->nalUnit [numNalus] = (uint8_t *)nal_buf;
144 array->nalUnitLength[numNalus] = nal_size;
145 array->NAL_unit_type = nal_type;
154 array->array_completeness = ps_array_completeness;
207 if(
array->numNalus == 0)
211 i,
array->array_completeness);
216 for (
unsigned j = 0; j <
array->numNalus; j++)
218 "nalUnitLength[%u][%u]: %"PRIu16
"\n",
219 i, j,
array->nalUnitLength[j]);
271 if (!
array->numNalus)
280 array->NAL_unit_type & 0x3f);
285 for (
unsigned j = 0; j <
array->numNalus; j++) {
291 array->nalUnitLength[j]);
299 int size,
int ps_array_completeness)
304 int bytes_to_read =
size;
305 unsigned array_index;
312 }
else if (*
data == 1) {
322 if (nalu_size == 0)
break;
327 if (bytes_to_read < nalu_size)
break;
377 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)