Go to the source code of this file.
|
#define | supported_depth(d) ((d) == 8 || (d) == 10 || (d) == 12) |
|
#define | supported_subsampling(lcw, lch) (((lcw) == 0 && (lch) == 0) || ((lcw) == 1 && (lch) == 0) || ((lcw) == 1 && (lch) == 1)) |
|
#define | supported_format(d) |
|
#define | OFFSET(x) offsetof(ColorSpaceContext, x) |
|
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM |
|
#define | ENUM(x, y, z) { x, "", 0, AV_OPT_TYPE_CONST, { .i64 = y }, INT_MIN, INT_MAX, FLAGS, .unit = z } |
|
|
enum | DitherMode { DITHER_NONE,
DITHER_FSB,
DITHER_NB
} |
|
enum | Colorspace {
CS_UNSPECIFIED,
CS_BT470M,
CS_BT470BG,
CS_BT601_6_525,
CS_BT601_6_625,
CS_BT709,
CS_SMPTE170M,
CS_SMPTE240M,
CS_BT2020,
CS_NB
} |
|
enum | WhitepointAdaptation {
WP_ADAPT_BRADFORD,
WP_ADAPT_VON_KRIES,
NB_WP_ADAPT_NON_IDENTITY,
WP_ADAPT_IDENTITY = NB_WP_ADAPT_NON_IDENTITY,
NB_WP_ADAPT
} |
|
|
static const struct TransferCharacteristics * | get_transfer_characteristics (enum AVColorTransferCharacteristic trc) |
|
static int | fill_gamma_table (ColorSpaceContext *s) |
|
static void | fill_whitepoint_conv_table (double out[3][3], enum WhitepointAdaptation wp_adapt, const AVWhitepointCoefficients *wp_src, const AVWhitepointCoefficients *wp_dst) |
|
static void | apply_lut (int16_t *buf[3], ptrdiff_t stride, int w, int h, const int16_t *lut) |
|
static int | convert (AVFilterContext *ctx, void *data, int job_nr, int n_jobs) |
|
static int | get_range_off (AVFilterContext *ctx, int *off, int *y_rng, int *uv_rng, enum AVColorRange rng, int depth) |
|
static int | create_filtergraph (AVFilterContext *ctx, const AVFrame *in, const AVFrame *out) |
|
static av_cold int | init (AVFilterContext *ctx) |
|
static void | uninit (AVFilterContext *ctx) |
|
static int | filter_frame (AVFilterLink *link, AVFrame *in) |
|
static int | query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out) |
|
static int | config_props (AVFilterLink *outlink) |
|
| AVFILTER_DEFINE_CLASS (colorspace) |
|
◆ supported_depth
#define supported_depth |
( |
|
d | ) |
((d) == 8 || (d) == 10 || (d) == 12) |
◆ supported_subsampling
#define supported_subsampling |
( |
|
lcw, |
|
|
|
lch |
|
) |
| (((lcw) == 0 && (lch) == 0) || ((lcw) == 1 && (lch) == 0) || ((lcw) == 1 && (lch) == 1)) |
◆ supported_format
#define supported_format |
( |
|
d | ) |
|
Value: ((d) !=
NULL && (d)->nb_components == 3 && \
supported_depth((d)->
comp[0].depth) && \
supported_subsampling((d)->log2_chroma_w, (d)->log2_chroma_h))
◆ OFFSET
◆ FLAGS
◆ ENUM
#define ENUM |
( |
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| { x, "", 0, AV_OPT_TYPE_CONST, { .i64 = y }, INT_MIN, INT_MAX, FLAGS, .unit = z } |
◆ DitherMode
Enumerator |
---|
DITHER_NONE | |
DITHER_FSB | |
DITHER_NB | |
Definition at line 41 of file vf_colorspace.c.
◆ Colorspace
Enumerator |
---|
CS_UNSPECIFIED | |
CS_BT470M | |
CS_BT470BG | |
CS_BT601_6_525 | |
CS_BT601_6_625 | |
CS_BT709 | |
CS_SMPTE170M | |
CS_SMPTE240M | |
CS_BT2020 | |
CS_NB | |
Definition at line 47 of file vf_colorspace.c.
◆ WhitepointAdaptation
Enumerator |
---|
WP_ADAPT_BRADFORD | |
WP_ADAPT_VON_KRIES | |
NB_WP_ADAPT_NON_IDENTITY | |
WP_ADAPT_IDENTITY | |
NB_WP_ADAPT | |
Definition at line 60 of file vf_colorspace.c.
◆ get_transfer_characteristics()
◆ fill_gamma_table()
◆ fill_whitepoint_conv_table()
◆ apply_lut()
static void apply_lut |
( |
int16_t * |
buf[3], |
|
|
ptrdiff_t |
stride, |
|
|
int |
w, |
|
|
int |
h, |
|
|
const int16_t * |
lut |
|
) |
| |
|
static |
◆ convert()
static int convert |
( |
AVFilterContext * |
ctx, |
|
|
void * |
data, |
|
|
int |
job_nr, |
|
|
int |
n_jobs |
|
) |
| |
|
static |
◆ get_range_off()
◆ create_filtergraph()
◆ init()
◆ uninit()
◆ filter_frame()
◆ query_formats()
◆ config_props()
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
colorspace |
| ) |
|
◆ default_trc
◆ default_prm
◆ default_csp
◆ transfer_characteristics
◆ colorspace_options
◆ inputs
◆ outputs
◆ ff_vf_colorspace
Initial value:= {
.name = "colorspace",
.priv_class = &colorspace_class,
}
Definition at line 1033 of file vf_colorspace.c.
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
@ AVCOL_TRC_LINEAR
"Linear transfer characteristics"
#define FILTER_INPUTS(array)
@ AVCOL_TRC_BT2020_12
ITU-R BT2020 for 12-bit system.
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
@ AVCOL_TRC_IEC61966_2_1
IEC 61966-2-1 (sRGB or sYCC)
@ AVCOL_TRC_GAMMA28
also ITU-R BT470BG
@ AVCOL_TRC_GAMMA22
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
static int filter_frame(AVFilterLink *link, AVFrame *in)
@ AVCOL_PRI_SMPTE240M
identical to above, also called "SMPTE C" even though it uses D65
#define FILTER_OUTPUTS(array)
@ AVCOL_PRI_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
@ AVCOL_PRI_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
static av_cold int init(AVFilterContext *ctx)
static int config_props(AVFilterLink *outlink)
@ AVCOL_TRC_IEC61966_2_4
IEC 61966-2-4.
@ AVCOL_PRI_BT709
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
@ AVCOL_TRC_BT2020_10
ITU-R BT2020 for 10-bit system.
@ AVCOL_PRI_BT2020
ITU-R BT2020.
static void uninit(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
@ AVCOL_TRC_BT709
also ITU-R BT1361
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
@ AVCOL_SPC_SMPTE240M
derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
#define FILTER_QUERY_FUNC2(func)
@ AVCOL_PRI_BT470M
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
static const AVFilterPad outputs[]
@ AVCOL_TRC_SMPTE170M
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
static const AVFilterPad inputs[]
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
#define flags(name, subs,...)
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B