FFmpeg
Data Structures | Macros | Functions | Variables
vp9_metadata.c File Reference
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "bsf_internal.h"
#include "cbs.h"
#include "cbs_bsf.h"
#include "cbs_vp9.h"

Go to the source code of this file.

Data Structures

struct  VP9MetadataContext
 

Macros

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

Functions

static int vp9_metadata_update_fragment (AVBSFContext *bsf, AVPacket *pkt, CodedBitstreamFragment *frag)
 
static int vp9_metadata_init (AVBSFContext *bsf)
 

Variables

static const CBSBSFType vp9_metadata_type
 
static const AVOption vp9_metadata_options []
 
static const AVClass vp9_metadata_class
 
static enum AVCodecID vp9_metadata_codec_ids []
 
const FFBitStreamFilter ff_vp9_metadata_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 95 of file vp9_metadata.c.

◆ FLAGS

Definition at line 96 of file vp9_metadata.c.

Function Documentation

◆ vp9_metadata_update_fragment()

static int vp9_metadata_update_fragment ( AVBSFContext bsf,
AVPacket pkt,
CodedBitstreamFragment frag 
)
static

Definition at line 38 of file vp9_metadata.c.

◆ vp9_metadata_init()

static int vp9_metadata_init ( AVBSFContext bsf)
static

Definition at line 90 of file vp9_metadata.c.

Variable Documentation

◆ vp9_metadata_type

const CBSBSFType vp9_metadata_type
static
Initial value:
= {
.codec_id = AV_CODEC_ID_VP9,
.fragment_name = "superframe",
.unit_name = "frame",
.update_fragment = &vp9_metadata_update_fragment,
}

Definition at line 83 of file vp9_metadata.c.

Referenced by vp9_metadata_init().

◆ vp9_metadata_options

const AVOption vp9_metadata_options[]
static
Initial value:
= {
{ "color_space", "Set colour space (section 7.2.2)",
OFFSET(color_space), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, VP9_CS_RGB, FLAGS, .unit = "cs" },
{ "unknown", "Unknown/unspecified", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_UNKNOWN }, .flags = FLAGS, .unit = "cs" },
{ "bt601", "ITU-R BT.601-7", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_BT_601 }, .flags = FLAGS, .unit = "cs" },
{ "bt709", "ITU-R BT.709-6", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_BT_709 }, .flags = FLAGS, .unit = "cs" },
{ "smpte170", "SMPTE-170", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_SMPTE_170 }, .flags = FLAGS, .unit = "cs" },
{ "smpte240", "SMPTE-240", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_SMPTE_240 }, .flags = FLAGS, .unit = "cs" },
{ "bt2020", "ITU-R BT.2020-2", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_BT_2020 }, .flags = FLAGS, .unit = "cs" },
{ "rgb", "sRGB / IEC 61966-2-1", 0, AV_OPT_TYPE_CONST,
{ .i64 = VP9_CS_RGB }, .flags = FLAGS, .unit = "cs" },
{ "color_range", "Set colour range (section 7.2.2)",
{ .i64 = -1 }, -1, 1, FLAGS, .unit = "cr" },
{ "tv", "TV (limited) range", 0, AV_OPT_TYPE_CONST,
{ .i64 = 0 }, .flags = FLAGS, .unit = "cr" },
{ "pc", "PC (full) range", 0, AV_OPT_TYPE_CONST,
{ .i64 = 1 }, .flags = FLAGS, .unit = "cr" },
{ NULL }
}

Definition at line 97 of file vp9_metadata.c.

◆ vp9_metadata_class

const AVClass vp9_metadata_class
static
Initial value:
= {
.class_name = "vp9_metadata_bsf",
.item_name = av_default_item_name,
}

Definition at line 127 of file vp9_metadata.c.

◆ vp9_metadata_codec_ids

enum AVCodecID vp9_metadata_codec_ids[]
static
Initial value:

Definition at line 134 of file vp9_metadata.c.

◆ ff_vp9_metadata_bsf

const FFBitStreamFilter ff_vp9_metadata_bsf
Initial value:
= {
.p.name = "vp9_metadata",
.p.codec_ids = vp9_metadata_codec_ids,
.p.priv_class = &vp9_metadata_class,
.priv_data_size = sizeof(VP9MetadataContext),
}

Definition at line 138 of file vp9_metadata.c.

vp9_metadata_options
static const AVOption vp9_metadata_options[]
Definition: vp9_metadata.c:97
vp9_metadata_codec_ids
static enum AVCodecID vp9_metadata_codec_ids[]
Definition: vp9_metadata.c:134
VP9_CS_RGB
@ VP9_CS_RGB
Definition: cbs_vp9.h:64
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
VP9_CS_BT_601
@ VP9_CS_BT_601
Definition: cbs_vp9.h:58
VP9MetadataContext
Definition: vp9_metadata.c:28
vp9_metadata_init
static int vp9_metadata_init(AVBSFContext *bsf)
Definition: vp9_metadata.c:90
VP9_CS_BT_709
@ VP9_CS_BT_709
Definition: cbs_vp9.h:59
AV_CODEC_ID_VP9
@ AV_CODEC_ID_VP9
Definition: codec_id.h:222
VP9_CS_UNKNOWN
@ VP9_CS_UNKNOWN
Definition: cbs_vp9.h:57
color_range
color_range
Definition: vf_selectivecolor.c:43
VP9_CS_BT_2020
@ VP9_CS_BT_2020
Definition: cbs_vp9.h:62
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
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
VP9_CS_SMPTE_240
@ VP9_CS_SMPTE_240
Definition: cbs_vp9.h:61
ff_cbs_bsf_generic_close
void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
Close a generic CBS BSF instance.
Definition: cbs_bsf.c:155
vp9_metadata_class
static const AVClass vp9_metadata_class
Definition: vp9_metadata.c:127
FLAGS
#define FLAGS
Definition: vp9_metadata.c:96
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
ff_cbs_bsf_generic_filter
int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
Filter operation for CBS BSF.
Definition: cbs_bsf.c:61
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
vp9_metadata_update_fragment
static int vp9_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt, CodedBitstreamFragment *frag)
Definition: vp9_metadata.c:38
OFFSET
#define OFFSET(x)
Definition: vp9_metadata.c:95
VP9_CS_SMPTE_170
@ VP9_CS_SMPTE_170
Definition: cbs_vp9.h:60
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299