39#define START_CODE 0x000001
46static int av1_split(
const uint8_t *buf,
int buf_size,
void *logctx)
49 const uint8_t *ptr = buf, *end = buf + buf_size;
69 const uint8_t *ptr = buf, *end = buf + buf_size;
77 if ((
state & 0xFFFFFF00) != 0x100)
79 nalu_type =
state & 0x1F;
93 while (ptr - 4 > buf && ptr[-5] == 0)
106 const uint8_t *ptr = buf, *end = buf + buf_size;
117 nut = (
state >> 1) & 0x3F;
126 if (has_vps && has_sps) {
127 while (ptr - 4 > buf && ptr[-5] == 0)
129 return ptr - 4 - buf;
141 for (
int i = 0;
i < buf_size;
i++) {
143 if (
state == 0x1B3) {
153 const uint8_t *ptr = buf, *end = buf + buf_size;
159 return ptr - 4 - buf;
167 const uint8_t *ptr = buf, *end = buf + buf_size;
176 return ptr - 4 - buf;
197 switch (
ctx->par_in->codec_id) {
231#define OFFSET(x) offsetof(RemoveExtradataContext, x)
232#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
243 .class_name =
"remove_extradata",
250 .p.name =
"remove_extra",
static AVFormatContext * ctx
int ff_av1_extract_obu(AV1OBU *obu, const uint8_t *buf, int length, void *logctx)
Extract an OBU from a raw bitstream.
const FFBitStreamFilter ff_remove_extradata_bsf
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define i(width, name, range_min, range_max)
static struct @346255127015250356166251341105367306144006377143 state
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
H.264 common definitions.
Accelerated start code search function for start codes common to MPEG-1/2/4 video,...
const uint8_t * avpriv_find_start_code(const uint8_t *p, const uint8_t *end, uint32_t *state)
The bitstream filter state.
Describe the class of an AVClass context structure.
This structure stores compressed data.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)