FFmpeg  4.4.6
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_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 AVBitStreamFilter ff_vp9_metadata_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 95 of file vp9_metadata_bsf.c.

◆ FLAGS

Definition at line 96 of file vp9_metadata_bsf.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_bsf.c.

◆ vp9_metadata_init()

static int vp9_metadata_init ( AVBSFContext bsf)
static

Definition at line 90 of file vp9_metadata_bsf.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,
}
@ AV_CODEC_ID_VP9
Definition: codec_id.h:217
static int vp9_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt, CodedBitstreamFragment *frag)

Definition at line 83 of file vp9_metadata_bsf.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, "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 }
}
@ VP9_CS_RGB
Definition: cbs_vp9.h:64
@ VP9_CS_BT_2020
Definition: cbs_vp9.h:62
@ VP9_CS_UNKNOWN
Definition: cbs_vp9.h:57
@ VP9_CS_BT_709
Definition: cbs_vp9.h:59
@ VP9_CS_BT_601
Definition: cbs_vp9.h:58
@ VP9_CS_SMPTE_240
Definition: cbs_vp9.h:61
@ VP9_CS_SMPTE_170
Definition: cbs_vp9.h:60
#define NULL
Definition: coverity.c:32
@ AV_OPT_TYPE_CONST
Definition: opt.h:234
@ AV_OPT_TYPE_INT
Definition: opt.h:225
color_range
#define FLAGS
#define OFFSET(x)

Definition at line 97 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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
static const AVOption vp9_metadata_options[]

Definition at line 127 of file vp9_metadata_bsf.c.

◆ vp9_metadata_codec_ids

enum AVCodecID vp9_metadata_codec_ids[]
static
Initial value:
= {
}
@ AV_CODEC_ID_NONE
Definition: codec_id.h:47

Definition at line 127 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,
}
static enum AVCodecID codec_ids[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
int ff_cbs_bsf_generic_filter(AVBSFContext *bsf, AVPacket *pkt)
Filter operation for CBS BSF.
Definition: cbs_bsf.c:63
void ff_cbs_bsf_generic_close(AVBSFContext *bsf)
Close a generic CBS BSF instance.
Definition: cbs_bsf.c:152
static av_always_inline void filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int len, int clip)
Definition: cfhddsp.c:27
static const AVClass vp9_metadata_class
static enum AVCodecID vp9_metadata_codec_ids[]
static int vp9_metadata_init(AVBSFContext *bsf)

Definition at line 138 of file vp9_metadata_bsf.c.