25 HEVCSEI *
sei,
int is_nalff,
int nal_length_size,
26 int err_recognition,
int apply_defdispwin,
void *logctx)
39 for (
i = 0;
i <
pkt.nb_nals;
i++) {
50 nal->nuh_layer_id, apply_defdispwin);
80 HEVCSEI *
sei,
int *is_nalff,
int *nal_length_size,
81 int err_recognition,
int apply_defdispwin,
void *logctx)
90 int i, j, num_arrays, nal_len_size;
95 nal_len_size = (bytestream2_get_byte(&gb) & 3) + 1;
96 num_arrays = bytestream2_get_byte(&gb);
100 *nal_length_size = 2;
103 for (
i = 0;
i < num_arrays;
i++) {
104 int type = bytestream2_get_byte(&gb) & 0x3f;
105 int cnt = bytestream2_get_be16(&gb);
107 for (j = 0; j < cnt; j++) {
109 int nalsize = bytestream2_peek_be16(&gb) + 2;
112 "Invalid NAL unit size in extradata.\n");
117 *nal_length_size, err_recognition, apply_defdispwin,
121 "Decoding nal unit %d %d from hvcC failed\n",
131 *nal_length_size = nal_len_size;
135 err_recognition, apply_defdispwin, logctx);
static av_always_inline int bytestream2_get_bytes_left(const GetByteContext *g)
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
static int FUNC sei(CodedBitstreamContext *ctx, RWContext *rw, H264RawSEI *current)
static int FUNC nal(CodedBitstreamContext *ctx, RWContext *rw, LCEVCRawNAL *current, int nal_unit_type)
#define AV_EF_EXPLODE
abort decoding on minor error detection
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ H2645_FLAG_SMALL_PADDING
int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, HEVCSEI *sei, int *is_nalff, int *nal_length_size, int err_recognition, int apply_defdispwin, void *logctx)
static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets *ps, HEVCSEI *sei, int is_nalff, int nal_length_size, int err_recognition, int apply_defdispwin, void *logctx)
int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps, unsigned nuh_layer_id, int apply_defdispwin)
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, enum HEVCNALUnitType type)
void ff_h2645_packet_uninit(H2645Packet *pkt)
Free all the allocated memory in the packet.
int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, void *logctx, int nal_length_size, enum AVCodecID codec_id, int flags)
Split an input packet into NAL units.
static int ff_hevc_is_hvcc(const uint8_t *data, int size)
Tell whether extradata is an HEVCDecoderConfigurationRecord (ISO/IEC 14496-15) rather than Annex B.