FFmpeg
Data Structures | Macros | Functions | Variables
hapqa_extract.c File Reference
#include "bsf.h"
#include "bsf_internal.h"
#include "bytestream.h"
#include "hap.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  HapqaExtractContext
 

Macros

#define OFFSET(x)   offsetof(HapqaExtractContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_BSF_PARAM)
 

Functions

static int check_texture (HapqaExtractContext *ctx, int section_type)
 
static int hapqa_extract (AVBSFContext *bsf, AVPacket *pkt)
 

Variables

static enum AVCodecID codec_ids []
 
static const AVOption options []
 
static const AVClass hapqa_extract_class
 
const FFBitStreamFilter ff_hapqa_extract_bsf
 

Detailed Description

HAPQA extract bitstream filter extract one of the two textures of the HAQA

Definition in file hapqa_extract.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(HapqaExtractContext, x)

Definition at line 114 of file hapqa_extract.c.

◆ FLAGS

Definition at line 115 of file hapqa_extract.c.

Function Documentation

◆ check_texture()

static int check_texture ( HapqaExtractContext ctx,
int  section_type 
)
static

Definition at line 40 of file hapqa_extract.c.

Referenced by hapqa_extract().

◆ hapqa_extract()

static int hapqa_extract ( AVBSFContext bsf,
AVPacket pkt 
)
static

Definition at line 50 of file hapqa_extract.c.

Variable Documentation

◆ codec_ids

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 110 of file hapqa_extract.c.

◆ options

const AVOption options[]
static
Initial value:
= {
{ "texture", "texture to keep", OFFSET(texture), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS, .unit = "texture" },
{ "color", "keep HapQ texture", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FLAGS, .unit = "texture" },
{ "alpha", "keep HapAlphaOnly texture", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, FLAGS, .unit = "texture" },
{ NULL },
}

Definition at line 116 of file hapqa_extract.c.

◆ hapqa_extract_class

const AVClass hapqa_extract_class
static
Initial value:
= {
.class_name = "hapqa_extract_bsf",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 123 of file hapqa_extract.c.

◆ ff_hapqa_extract_bsf

const FFBitStreamFilter ff_hapqa_extract_bsf
Initial value:
= {
.p.name = "hapqa_extract",
.p.codec_ids = codec_ids,
.p.priv_class = &hapqa_extract_class,
.priv_data_size = sizeof(HapqaExtractContext),
}

Definition at line 130 of file hapqa_extract.c.

hapqa_extract
static int hapqa_extract(AVBSFContext *bsf, AVPacket *pkt)
Definition: hapqa_extract.c:50
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
FLAGS
#define FLAGS
Definition: hapqa_extract.c:115
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
OFFSET
#define OFFSET(x)
Definition: hapqa_extract.c:114
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
codec_ids
static enum AVCodecID codec_ids[]
Definition: hapqa_extract.c:110
AV_CODEC_ID_HAP
@ AV_CODEC_ID_HAP
Definition: codec_id.h:243
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
hapqa_extract_class
static const AVClass hapqa_extract_class
Definition: hapqa_extract.c:123
options
static const AVOption options[]
Definition: hapqa_extract.c:116
HapqaExtractContext
Definition: hapqa_extract.c:35
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299