47 #define ZIMG_ALIGNMENT 32 137 "Size and width/height expressions cannot be set at the same time.\n");
148 "Invalid size '%s'\n", s->
size_str);
151 snprintf(buf,
sizeof(buf)-1,
"%d", s->
w);
153 snprintf(buf,
sizeof(buf)-1,
"%d", s->
h);
204 double var_values[
VARS_NB], res;
207 int factor_w, factor_h;
213 var_values[
VAR_A] = (double) inlink->
w / inlink->
h;
265 w =
av_rescale(h, inlink->
w, inlink->
h * factor_w) * factor_w;
267 h =
av_rescale(w, inlink->
h, inlink->
w * factor_h) * factor_h;
284 if (w > INT_MAX || h > INT_MAX ||
285 (h * inlink->
w) > INT_MAX ||
286 (w * inlink->
h) > INT_MAX)
292 if (inlink->
w == outlink->
w &&
293 inlink->
h == outlink->
h &&
313 "Error when evaluating the expression '%s'.\n" 314 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
322 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
331 switch (chroma_location) {
334 return ZIMG_CHROMA_LEFT;
336 return ZIMG_CHROMA_CENTER;
338 return ZIMG_CHROMA_TOP_LEFT;
340 return ZIMG_CHROMA_TOP;
342 return ZIMG_CHROMA_BOTTOM_LEFT;
344 return ZIMG_CHROMA_BOTTOM;
346 return ZIMG_CHROMA_LEFT;
351 switch (colorspace) {
353 return ZIMG_MATRIX_RGB;
355 return ZIMG_MATRIX_709;
357 return ZIMG_MATRIX_UNSPECIFIED;
359 return ZIMG_MATRIX_FCC;
361 return ZIMG_MATRIX_470BG;
363 return ZIMG_MATRIX_170M;
365 return ZIMG_MATRIX_240M;
367 return ZIMG_MATRIX_YCGCO;
369 return ZIMG_MATRIX_2020_NCL;
371 return ZIMG_MATRIX_2020_CL;
373 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
375 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
377 return ZIMG_MATRIX_ICTCP;
379 return ZIMG_MATRIX_UNSPECIFIED;
386 return ZIMG_TRANSFER_UNSPECIFIED;
388 return ZIMG_TRANSFER_709;
390 return ZIMG_TRANSFER_470_M;
392 return ZIMG_TRANSFER_470_BG;
394 return ZIMG_TRANSFER_601;
396 return ZIMG_TRANSFER_240M;
398 return ZIMG_TRANSFER_LINEAR;
400 return ZIMG_TRANSFER_LOG_100;
402 return ZIMG_TRANSFER_LOG_316;
404 return ZIMG_TRANSFER_IEC_61966_2_4;
406 return ZIMG_TRANSFER_2020_10;
408 return ZIMG_TRANSFER_2020_12;
410 return ZIMG_TRANSFER_ST2084;
412 return ZIMG_TRANSFER_ARIB_B67;
414 return ZIMG_TRANSFER_IEC_61966_2_1;
416 return ZIMG_TRANSFER_UNSPECIFIED;
421 switch (color_primaries) {
423 return ZIMG_PRIMARIES_UNSPECIFIED;
425 return ZIMG_PRIMARIES_709;
427 return ZIMG_PRIMARIES_470_M;
429 return ZIMG_PRIMARIES_470_BG;
431 return ZIMG_PRIMARIES_170M;
433 return ZIMG_PRIMARIES_240M;
435 return ZIMG_PRIMARIES_FILM;
437 return ZIMG_PRIMARIES_2020;
439 return ZIMG_PRIMARIES_ST428;
441 return ZIMG_PRIMARIES_ST431_2;
443 return ZIMG_PRIMARIES_ST432_1;
445 return ZIMG_PRIMARIES_EBU3213_E;
447 return ZIMG_PRIMARIES_UNSPECIFIED;
452 switch (color_range) {
455 return ZIMG_RANGE_LIMITED;
457 return ZIMG_RANGE_FULL;
459 return ZIMG_RANGE_LIMITED;
465 format->width = frame->
width;
466 format->height = frame->
height;
486 zimg_filter_graph_free(*graph);
487 *graph = zimg_filter_graph_build(src_format, dst_format, params);
491 ret = zimg_filter_graph_get_tmp_size(*graph, &size);
495 if (size > *tmp_size) {
513 for (plane = 0; plane < 3; plane++) {
521 aligned->
format = (*frame)->format;
522 aligned->
width = (*frame)->width;
523 aligned->
height = (*frame)->height;
551 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
552 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
582 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
584 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
594 zimg_image_format_default(&s->
src_format, ZIMG_API_VERSION);
595 zimg_image_format_default(&s->
dst_format, ZIMG_API_VERSION);
596 zimg_graph_builder_params_default(&s->
params, ZIMG_API_VERSION);
599 s->
params.cpu_type = ZIMG_CPU_AUTO;
642 zimg_graph_builder_params_default(&s->
alpha_params, ZIMG_API_VERSION);
686 for (plane = 0; plane < 3; plane++) {
688 src_buf.plane[plane].data = in->
data[p];
689 src_buf.plane[plane].stride = in->
linesize[p];
690 src_buf.plane[plane].mask = -1;
693 dst_buf.plane[plane].data = out->
data[p];
694 dst_buf.plane[plane].stride = out->
linesize[p];
695 dst_buf.plane[plane].mask = -1;
698 ret = zimg_filter_graph_process(s->
graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
705 src_buf.plane[0].data = in->
data[3];
706 src_buf.plane[0].stride = in->
linesize[3];
707 src_buf.plane[0].mask = -1;
709 dst_buf.plane[0].data = out->
data[3];
710 dst_buf.plane[0].stride = out->
linesize[3];
711 dst_buf.plane[0].mask = -1;
713 ret = zimg_filter_graph_process(s->
alpha_graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
722 for (y = 0; y < out->
height; y++) {
723 for (x = 0; x < out->
width; x++) {
729 for (y = 0; y < outlink->
h; y++)
730 memset(out->
data[3] + y * out->
linesize[3], 0xff, outlink->
w);
748 zimg_filter_graph_free(s->
graph);
755 char *res,
int res_len,
int flags)
760 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
761 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
778 #define OFFSET(x) offsetof(ZScaleContext, x) 779 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM 780 #define TFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM 794 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS,
"dither" },
816 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS,
"primaries" },
853 {
"iec61966-2-4", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0,
FLAGS,
"transfer" },
854 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS,
"transfer" },
875 {
"chroma-derived-nc",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0,
FLAGS,
"matrix" },
876 {
"chroma-derived-c", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0,
FLAGS,
"matrix" },
929 .priv_class = &zscale_class,
931 .
inputs = avfilter_vf_zscale_inputs,
932 .
outputs = avfilter_vf_zscale_outputs,
ITU-R BT2020 for 12-bit system.
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
static const AVFilterPad avfilter_vf_zscale_outputs[]
int plane
Which of the 4 planes contains the component.
#define AV_PIX_FMT_YUVA422P16
static const char * format[]
#define AV_PIX_FMT_YUVA422P9
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
MPEG-2/4 4:2:0, H.264 default for 4:2:0.
This structure describes decoded (raw) audio or video data.
"Linear transfer characteristics"
#define AV_PIX_FMT_YUVA420P10
int av_parse_video_size(int *width_ptr, int *height_ptr, const char *str)
Parse str and put in width_ptr and height_ptr the detected values.
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUVA422P10
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Main libavfilter public API header.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601 ...
int h
agreed upon image height
SMPTE ST 432-1 (2010) / P3 D65 / Display P3.
#define AV_PIX_FMT_GBRP10
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
zimg_image_format dst_format
SMPTE ST 431-2 (2011) / DCI P3.
#define AV_PIX_FMT_YUV420P12
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
zimg_graph_builder_params alpha_params
enum AVColorSpace in_colorspace out_colorspace
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
AVColorTransferCharacteristic
Color Transfer Characteristic.
char * w_expr
width expression string
functionally identical to above
const char * name
Pad name.
zimg_filter_graph * alpha_graph
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static int print_zimg_error(AVFilterContext *ctx)
enum AVColorPrimaries in_primaries out_primaries
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
zimg_image_format alpha_dst_format
#define AV_PIX_FMT_FLAG_ALPHA
The pixel format has an alpha channel.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
AVColorSpace
YUV colorspace type.
#define AV_PIX_FMT_FLAG_FLOAT
The pixel format contains IEEE-754 floating point values.
Used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16.
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
AVFILTER_DEFINE_CLASS(zscale)
#define AV_PIX_FMT_YUVA420P9
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range...
static int realign_frame(const AVPixFmtDescriptor *desc, AVFrame **frame)
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
#define AV_LOG_VERBOSE
Detailed information.
static const AVFilterPad avfilter_vf_zscale_inputs[]
static int convert_range(enum AVColorRange color_range)
#define AV_PIX_FMT_YUV444P16
AVColorRange
MPEG vs JPEG YUV range.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUVA420P16
AVColorPrimaries
Chromaticity coordinates of the source primaries.
static int convert_matrix(enum AVColorSpace colorspace)
static int query_formats(AVFilterContext *ctx)
A filter pad used for either input or output.
static int aligned(int val)
enum AVColorRange in_range out_range
A link between two filters.
static void format_init(zimg_image_format *format, AVFrame *frame, const AVPixFmtDescriptor *desc, int colorspace, int primaries, int transfer, int range, int location)
also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
int av_expr_parse_and_eval(double *d, const char *s, const char *const *const_names, const double *const_values, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), void *opaque, int log_offset, void *log_ctx)
Parse and evaluate an expression.
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
static av_cold int init_dict(AVFilterContext *ctx, AVDictionary **opts)
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
static int filter_frame(AVFilterLink *link, AVFrame *in)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
enum AVColorRange color_range
MPEG vs JPEG YUV range.
#define AV_PIX_FMT_YUVA444P16
enum AVColorSpace colorspace
YUV colorspace type.
zimg_image_format alpha_src_format
also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP177 Annex B
simple assert() macros that are a bit more flexible than ISO C assert().
SMPTE ST 428-1 (CIE 1931 XYZ)
AVFilterFormats * in_formats
Lists of formats and channel layouts supported by the input and output filters respectively.
#define AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_GBRAP16
int av_frame_copy(AVFrame *dst, const AVFrame *src)
Copy the frame data from src to dst.
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
common internal API header
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
#define AV_PIX_FMT_YUV422P9
SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems.
#define AV_PIX_FMT_GBRP16
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
zimg_filter_graph * graph
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
static int graph_build(zimg_filter_graph **graph, zimg_graph_builder_params *params, zimg_image_format *src_format, zimg_image_format *dst_format, void **tmp, size_t *tmp_size)
colour filters using Illuminant C
ITU-R BT2020 non-constant luminance system.
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
AVFilterContext * src
source filter
#define AV_PIX_FMT_YUVA444P10
static const AVFilterPad inputs[]
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_GBRP14
FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
static const AVFilterPad outputs[]
int format
agreed upon media format
the normal 2^n-1 "JPEG" YUV ranges
#define AV_PIX_FMT_YUV420P16
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
#define AV_PIX_FMT_YUV420P14
zimg_graph_builder_params params
double nominal_peak_luminance
functionally identical to above
enum AVChromaLocation in_chromal out_chromal
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Chromaticity-derived constant luminance system.
static int convert_trc(enum AVColorTransferCharacteristic color_trc)
static const char *const var_names[]
char * h_expr
height expression string
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
zimg_image_format src_format
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
Chromaticity-derived non-constant luminance system.
#define AV_PIX_FMT_YUV420P10
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Describe the class of an AVClass context structure.
static int convert_primaries(enum AVColorPrimaries color_primaries)
Rational number (pair of numerator and denominator).
"Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
const char * name
Filter name.
static int convert_chroma_location(enum AVChromaLocation chroma_location)
#define AV_PIX_FMT_YUV420P9
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
enum AVChromaLocation chroma_location
static av_always_inline uint32_t av_float2int(float f)
Reinterpret a float as a 32-bit integer.
AVFilterLink ** outputs
array of pointers to output links
int av_frame_get_buffer(AVFrame *frame, int align)
Allocate new buffer(s) for audio or video data.
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GBRP12
#define flags(name, subs,...)
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV444P12
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
the normal 219*2^(n-8) "MPEG" YUV ranges
static int config_props(AVFilterLink *outlink)
ITU-R BT2020 constant luminance system.
#define AV_PIX_FMT_GBRPF32
static av_cold void uninit(AVFilterContext *ctx)
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_PIX_FMT_GBRAPF32
IEC 61966-2-1 (sRGB or sYCC)
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_YUVA444P9
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
static const AVOption zscale_options[]
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
int force_original_aspect_ratio
ARIB STD-B67, known as "Hybrid log-gamma".
AVFilterContext * dst
dest filter
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
enum AVColorPrimaries color_primaries
ITU-R BT2020 for 10-bit system.
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
AVChromaLocation
Location of chroma samples.
enum AVColorTransferCharacteristic color_trc
MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0.
#define FFSWAP(type, a, b)
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
int depth
Number of bits in the component.
#define AVERROR_EXTERNAL
Generic error in an external library.
AVPixelFormat
Pixel format.
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
enum AVColorTransferCharacteristic in_trc out_trc
#define AV_PIX_FMT_YUV422P16
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFilterFormats * out_formats
int step
Number of elements between 2 horizontally consecutive pixels.
simple arithmetic expression evaluator
"Logarithmic transfer characteristic (100:1 range)"