25 int is_nalff,
int nal_length_size,
void *logctx)
36 for (i = 0; i < pkt.
nb_nals; i++) {
73 int *is_nalff,
int *nal_length_size,
74 int err_recognition,
void *logctx)
81 if (size > 3 && (data[0] || data[1] || data[2] > 1)) {
86 int i, j, num_arrays, nal_len_size;
91 nal_len_size = (bytestream2_get_byte(&gb) & 3) + 1;
92 num_arrays = bytestream2_get_byte(&gb);
99 for (i = 0; i < num_arrays; i++) {
100 int type = bytestream2_get_byte(&gb) & 0x3f;
101 int cnt = bytestream2_get_be16(&gb);
103 for (j = 0; j < cnt; j++) {
105 int nalsize = bytestream2_peek_be16(&gb) + 2;
108 "Invalid NAL unit size in extradata.\n");
115 "Decoding nal unit %d %d from hvcC failed\n",
125 *nal_length_size = nal_len_size;
int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length, void *logctx, int is_nalff, int nal_length_size, enum AVCodecID codec_id, int small_padding)
Split an input packet into NAL units.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
ptrdiff_t const GLvoid * data
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
void ff_h2645_packet_uninit(H2645Packet *pkt)
Free all the allocated memory in the packet.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static av_always_inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, int *is_nalff, int *nal_length_size, int err_recognition, void *logctx)
static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets *ps, int is_nalff, int nal_length_size, void *logctx)
int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps, int apply_defdispwin)