FFmpeg
Data Structures | Macros | Functions | Variables
prores_metadata_bsf.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "bsf.h"

Go to the source code of this file.

Data Structures

struct  ProresMetadataContext
 

Macros

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

Functions

static int prores_metadata (AVBSFContext *bsf, AVPacket *pkt)
 
static int prores_metadata_init (AVBSFContext *bsf)
 

Variables

static enum AVCodecID codec_ids []
 
static const AVOption options []
 
static const AVClass prores_metadata_class
 
const AVBitStreamFilter ff_prores_metadata_bsf
 

Detailed Description

Prores Metadata bitstream filter set frame colorspace property

Definition in file prores_metadata_bsf.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 130 of file prores_metadata_bsf.c.

◆ FLAGS

Definition at line 131 of file prores_metadata_bsf.c.

Function Documentation

◆ prores_metadata()

static int prores_metadata ( AVBSFContext bsf,
AVPacket pkt 
)
static

Definition at line 41 of file prores_metadata_bsf.c.

◆ prores_metadata_init()

static int prores_metadata_init ( AVBSFContext bsf)
static

check options

Definition at line 96 of file prores_metadata_bsf.c.

Variable Documentation

◆ codec_ids

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 92 of file prores_metadata_bsf.c.

◆ options

const AVOption options[]
static
Initial value:
= {
{"color_primaries", "select color primaries", OFFSET(color_primaries), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_PRI_SMPTE432, FLAGS, "color_primaries"},
{"auto", "keep the same color primaries", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"bt709", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_BT709}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"bt470bg", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_BT470BG}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"smpte170m", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_SMPTE170M}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"bt2020", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_BT2020}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"smpte431", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_SMPTE431}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"smpte432", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_PRI_SMPTE432}, INT_MIN, INT_MAX, FLAGS, "color_primaries"},
{"color_trc", "select color transfer", OFFSET(transfer_characteristics), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_TRC_BT709, FLAGS, "color_trc"},
{"auto", "keep the same color transfer", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, FLAGS, "color_trc"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, INT_MIN, INT_MAX, FLAGS, "color_trc"},
{"bt709", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_BT709}, INT_MIN, INT_MAX, FLAGS, "color_trc"},
{"colorspace", "select colorspace", OFFSET(matrix_coefficients), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_SPC_BT2020_NCL, FLAGS, "colorspace"},
{"auto", "keep the same colorspace", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, FLAGS, "colorspace"},
{"unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, INT_MIN, INT_MAX, FLAGS, "colorspace"},
{"bt709", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT709}, INT_MIN, INT_MAX, FLAGS, "colorspace"},
{"smpte170m", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_SMPTE170M}, INT_MIN, INT_MAX, FLAGS, "colorspace"},
{"bt2020nc", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_SPC_BT2020_NCL}, INT_MIN, INT_MAX, FLAGS, "colorspace"},
{ NULL },
}

Definition at line 132 of file prores_metadata_bsf.c.

◆ prores_metadata_class

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

Definition at line 158 of file prores_metadata_bsf.c.

◆ ff_prores_metadata_bsf

const AVBitStreamFilter ff_prores_metadata_bsf
Initial value:
= {
.name = "prores_metadata",
.filter = prores_metadata,
.priv_data_size = sizeof(ProresMetadataContext),
.priv_class = &prores_metadata_class,
}

Definition at line 165 of file prores_metadata_bsf.c.

prores_metadata_class
static const AVClass prores_metadata_class
Definition: prores_metadata_bsf.c:158
options
static const AVOption options[]
Definition: prores_metadata_bsf.c:132
prores_metadata_init
static int prores_metadata_init(AVBSFContext *bsf)
Definition: prores_metadata_bsf.c:96
ProresMetadataContext
Definition: prores_metadata_bsf.c:33
AVCOL_SPC_SMPTE170M
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:503
AVCOL_PRI_BT470BG
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:450
AVCOL_PRI_SMPTE170M
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:451
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AVCOL_PRI_BT709
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Definition: pixfmt.h:445
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
AVCOL_PRI_BT2020
@ AVCOL_PRI_BT2020
ITU-R BT2020.
Definition: pixfmt.h:454
AVCOL_PRI_SMPTE431
@ AVCOL_PRI_SMPTE431
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:457
OFFSET
#define OFFSET(x)
Definition: prores_metadata_bsf.c:130
transfer_characteristics
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
Definition: vf_colorspace.c:176
AVCOL_TRC_BT709
@ AVCOL_TRC_BT709
also ITU-R BT1361
Definition: pixfmt.h:469
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: avcodec.h:216
AVCOL_SPC_BT2020_NCL
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:507
codec_ids
static enum AVCodecID codec_ids[]
Definition: prores_metadata_bsf.c:92
FLAGS
#define FLAGS
Definition: prores_metadata_bsf.c:131
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVCOL_PRI_SMPTE432
@ AVCOL_PRI_SMPTE432
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition: pixfmt.h:458
prores_metadata
static int prores_metadata(AVBSFContext *bsf, AVPacket *pkt)
Definition: prores_metadata_bsf.c:41
AVCOL_SPC_BT709
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: pixfmt.h:498
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232
color_primaries
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
Definition: vf_colorspace.c:209
AV_CODEC_ID_PRORES
@ AV_CODEC_ID_PRORES
Definition: avcodec.h:366