FFmpeg
Data Structures | Macros | Functions | Variables
vp9_metadata_bsf.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "cbs.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_filter (AVBSFContext *bsf, AVPacket *pkt)
 
static int vp9_metadata_init (AVBSFContext *bsf)
 
static void vp9_metadata_close (AVBSFContext *bsf)
 

Variables

static const AVOption vp9_metadata_options []
 
static const AVClass vp9_metadata_class
 
static enum AVCodecID vp9_metadata_codec_ids []
 
const AVBitStreamFilter ff_vp9_metadata_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 107 of file vp9_metadata_bsf.c.

◆ FLAGS

Definition at line 108 of file vp9_metadata_bsf.c.

Function Documentation

◆ vp9_metadata_filter()

static int vp9_metadata_filter ( AVBSFContext bsf,
AVPacket pkt 
)
static

Definition at line 40 of file vp9_metadata_bsf.c.

◆ vp9_metadata_init()

static int vp9_metadata_init ( AVBSFContext bsf)
static

Definition at line 92 of file vp9_metadata_bsf.c.

◆ vp9_metadata_close()

static void vp9_metadata_close ( AVBSFContext bsf)
static

Definition at line 99 of file vp9_metadata_bsf.c.

Variable Documentation

◆ 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, "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, "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 109 of file vp9_metadata_bsf.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 139 of file vp9_metadata_bsf.c.

◆ vp9_metadata_codec_ids

enum AVCodecID vp9_metadata_codec_ids[]
static
Initial value:

Definition at line 146 of file vp9_metadata_bsf.c.

◆ ff_vp9_metadata_bsf

const AVBitStreamFilter ff_vp9_metadata_bsf
Initial value:
= {
.name = "vp9_metadata",
.priv_data_size = sizeof(VP9MetadataContext),
.priv_class = &vp9_metadata_class,
.close = &vp9_metadata_close,
}

Definition at line 150 of file vp9_metadata_bsf.c.

VP9_CS_BT_601
@ VP9_CS_BT_601
Definition: cbs_vp9.h:58
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
vp9_metadata_codec_ids
static enum AVCodecID vp9_metadata_codec_ids[]
Definition: vp9_metadata_bsf.c:146
VP9_CS_SMPTE_240
@ VP9_CS_SMPTE_240
Definition: cbs_vp9.h:61
vp9_metadata_filter
static int vp9_metadata_filter(AVBSFContext *bsf, AVPacket *pkt)
Definition: vp9_metadata_bsf.c:40
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
vp9_metadata_close
static void vp9_metadata_close(AVBSFContext *bsf)
Definition: vp9_metadata_bsf.c:99
VP9MetadataContext
Definition: vp9_metadata_bsf.c:27
AV_CODEC_ID_VP9
@ AV_CODEC_ID_VP9
Definition: avcodec.h:386
vp9_metadata_init
static int vp9_metadata_init(AVBSFContext *bsf)
Definition: vp9_metadata_bsf.c:92
color_range
color_range
Definition: vf_selectivecolor.c:44
vp9_metadata_class
static const AVClass vp9_metadata_class
Definition: vp9_metadata_bsf.c:139
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:191
vp9_metadata_options
static const AVOption vp9_metadata_options[]
Definition: vp9_metadata_bsf.c:109
VP9_CS_BT_709
@ VP9_CS_BT_709
Definition: cbs_vp9.h:59
VP9_CS_SMPTE_170
@ VP9_CS_SMPTE_170
Definition: cbs_vp9.h:60
VP9_CS_RGB
@ VP9_CS_RGB
Definition: cbs_vp9.h:64
FLAGS
#define FLAGS
Definition: vp9_metadata_bsf.c:108
VP9_CS_BT_2020
@ VP9_CS_BT_2020
Definition: cbs_vp9.h:62
OFFSET
#define OFFSET(x)
Definition: vp9_metadata_bsf.c:107
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: avcodec.h:216
VP9_CS_UNKNOWN
@ VP9_CS_UNKNOWN
Definition: cbs_vp9.h:57
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
codec_ids
static enum AVCodecID codec_ids[]
Definition: aac_adtstoasc_bsf.c:148
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232