FFmpeg
Data Structures | Macros | Functions | Variables
prores_metadata_bsf.c File Reference

Prores Metadata bitstream filter set frame colorspace property. More...

#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "bsf_internal.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

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

Definition at line 132 of file prores_metadata_bsf.c.

Definition at line 133 of file prores_metadata_bsf.c.

Function Documentation

static int prores_metadata ( AVBSFContext bsf,
AVPacket pkt 
)
static

Definition at line 43 of file prores_metadata_bsf.c.

static int prores_metadata_init ( AVBSFContext bsf)
static

check options

Definition at line 98 of file prores_metadata_bsf.c.

Variable Documentation

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 94 of file prores_metadata_bsf.c.

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_NB - 1, 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"},
{"smpte2084", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_SMPTE2084}, INT_MIN, INT_MAX, FLAGS, "color_trc"},
{"arib-std-b67", NULL, 0, AV_OPT_TYPE_CONST, {.i64=AVCOL_TRC_ARIB_STD_B67}, 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 },
}
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
Definition: pixfmt.h:511
#define OFFSET(x)
#define NULL
Definition: coverity.c:32
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
Definition: pixfmt.h:470
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:516
SMPTE ST 431-2 (2011) / DCI P3.
Definition: pixfmt.h:469
#define FLAGS
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
Definition: pixfmt.h:457
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
Definition: pixfmt.h:497
ITU-R BT2020 non-constant luminance system.
Definition: pixfmt.h:520
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
Definition: pixfmt.h:462
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
also ITU-R BT1361
Definition: pixfmt.h:482
Not part of ABI.
Definition: pixfmt.h:502
ARIB STD-B67, known as "Hybrid log-gamma".
Definition: pixfmt.h:501
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
Definition: pixfmt.h:463
ITU-R BT2020.
Definition: pixfmt.h:466

Definition at line 134 of file prores_metadata_bsf.c.

const AVClass prores_metadata_class
static
Initial value:
= {
.class_name = "prores_metadata_bsf",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption options[]

Definition at line 162 of file prores_metadata_bsf.c.

const AVBitStreamFilter ff_prores_metadata_bsf
Initial value:
= {
.name = "prores_metadata",
.filter = prores_metadata,
.priv_data_size = sizeof(ProresMetadataContext),
.priv_class = &prores_metadata_class,
}
static int prores_metadata_init(AVBSFContext *bsf)
static int prores_metadata(AVBSFContext *bsf, AVPacket *pkt)
static const AVClass prores_metadata_class
static enum AVCodecID codec_ids[]

Definition at line 169 of file prores_metadata_bsf.c.