41 if (((
ctx->texture == 0)&&((section_type & 0x0F) == 0x0F)) ||
42 ((
ctx->texture == 1)&&((section_type & 0x0F) == 0x01)))
56 int start_section_size;
57 int target_packet_size = 0;
69 if ((section_type & 0x0F) != 0x0D) {
70 av_log(bsf,
AV_LOG_ERROR,
"Invalid section type for HAPQA %#04x.\n", section_type & 0x0F);
75 start_section_size = 4;
83 target_packet_size = section_size + 4;
86 start_section_size += 4 + section_size;
92 target_packet_size = section_size + 4;
101 pkt->data += start_section_size;
102 pkt->size = target_packet_size;
114#define OFFSET(x) offsetof(HapqaExtractContext, x)
115#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_BSF_PARAM)
119 {
"alpha",
"keep HapAlphaOnly texture", 0,
AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0,
FLAGS, .unit =
"texture" },
124 .class_name =
"hapqa_extract_bsf",
131 .p.name =
"hapqa_extract",
static enum AVCodecID codec_ids[]
static AVFormatContext * ctx
const FFBitStreamFilter ff_hapqa_extract_bsf
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
AVCodecID
Identify the syntax and semantics of the bitstream.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
int ff_hap_parse_section_header(GetByteContext *gbc, int *section_size, enum HapSectionType *section_type)
The bitstream filter state.
void * priv_data
Opaque filter-specific private data.
Describe the class of an AVClass context structure.
This structure stores compressed data.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)