135 "Size and width/height expressions cannot be set at the same time.\n");
146 "Invalid size '%s'\n", s->
size_str);
149 snprintf(buf,
sizeof(buf)-1,
"%d", s->
w);
151 snprintf(buf,
sizeof(buf)-1,
"%d", s->
h);
202 double var_values[
VARS_NB], res;
205 int factor_w, factor_h;
211 var_values[
VAR_A] = (double) inlink->
w / inlink->
h;
263 w =
av_rescale(h, inlink->
w, inlink->
h * factor_w) * factor_w;
265 h =
av_rescale(w, inlink->
h, inlink->
w * factor_h) * factor_h;
282 if (w > INT_MAX || h > INT_MAX ||
283 (h * inlink->
w) > INT_MAX ||
284 (w * inlink->
h) > INT_MAX)
290 if (inlink->
w == outlink->
w &&
291 inlink->
h == outlink->
h &&
311 "Error when evaluating the expression '%s'.\n"
312 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
320 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
329 switch (chroma_location) {
332 return ZIMG_CHROMA_LEFT;
334 return ZIMG_CHROMA_CENTER;
336 return ZIMG_CHROMA_TOP_LEFT;
338 return ZIMG_CHROMA_TOP;
340 return ZIMG_CHROMA_BOTTOM_LEFT;
342 return ZIMG_CHROMA_BOTTOM;
344 return ZIMG_CHROMA_LEFT;
349 switch (colorspace) {
351 return ZIMG_MATRIX_RGB;
353 return ZIMG_MATRIX_709;
355 return ZIMG_MATRIX_UNSPECIFIED;
357 return ZIMG_MATRIX_470BG;
359 return ZIMG_MATRIX_170M;
361 return ZIMG_MATRIX_YCGCO;
363 return ZIMG_MATRIX_2020_NCL;
365 return ZIMG_MATRIX_2020_CL;
367 return ZIMG_MATRIX_UNSPECIFIED;
374 return ZIMG_TRANSFER_UNSPECIFIED;
376 return ZIMG_TRANSFER_709;
378 return ZIMG_TRANSFER_601;
380 return ZIMG_TRANSFER_LINEAR;
382 return ZIMG_TRANSFER_2020_10;
384 return ZIMG_TRANSFER_2020_12;
386 return ZIMG_TRANSFER_ST2084;
388 return ZIMG_TRANSFER_ARIB_B67;
390 return ZIMG_TRANSFER_IEC_61966_2_1;
392 return ZIMG_TRANSFER_UNSPECIFIED;
397 switch (color_primaries) {
399 return ZIMG_PRIMARIES_UNSPECIFIED;
401 return ZIMG_PRIMARIES_709;
403 return ZIMG_PRIMARIES_170M;
405 return ZIMG_PRIMARIES_240M;
407 return ZIMG_PRIMARIES_2020;
409 return ZIMG_PRIMARIES_ST432_1;
411 return ZIMG_PRIMARIES_UNSPECIFIED;
416 switch (color_range) {
419 return ZIMG_RANGE_LIMITED;
421 return ZIMG_RANGE_FULL;
423 return ZIMG_RANGE_LIMITED;
427 int colorspace,
int primaries,
int transfer,
int range,
int location)
429 format->width = frame->
width;
430 format->height = frame->
height;
444 zimg_image_format *src_format, zimg_image_format *dst_format,
445 void **
tmp,
size_t *tmp_size)
450 zimg_filter_graph_free(*graph);
451 *graph = zimg_filter_graph_build(src_format, dst_format, params);
455 ret = zimg_filter_graph_get_tmp_size(*graph, &size);
459 if (size > *tmp_size) {
477 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
478 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
506 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
508 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
521 zimg_image_format_default(&s->
src_format, ZIMG_API_VERSION);
522 zimg_image_format_default(&s->
dst_format, ZIMG_API_VERSION);
523 zimg_graph_builder_params_default(&s->
params, ZIMG_API_VERSION);
526 s->
params.cpu_type = ZIMG_CPU_AUTO;
569 zimg_graph_builder_params_default(&s->
alpha_params, ZIMG_API_VERSION);
617 src_buf.plane[
plane].mask = -1;
620 dst_buf.plane[
plane].data = out->
data[p];
622 dst_buf.plane[
plane].mask = -1;
625 ret = zimg_filter_graph_process(s->
graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
632 src_buf.plane[0].data = in->
data[3];
633 src_buf.plane[0].stride = in->
linesize[3];
634 src_buf.plane[0].mask = -1;
636 dst_buf.plane[0].data = out->
data[3];
637 dst_buf.plane[0].stride = out->
linesize[3];
638 dst_buf.plane[0].mask = -1;
640 ret = zimg_filter_graph_process(s->
alpha_graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
649 for (y = 0; y < out->
height; y++) {
650 for (x = 0; x < out->
width; x++) {
656 for (y = 0; y < outlink->
h; y++)
657 memset(out->
data[3] + y * out->
linesize[3], 0xff, outlink->
w);
675 zimg_filter_graph_free(s->
graph);
681 char *res,
int res_len,
int flags)
686 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
687 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
704 #define OFFSET(x) offsetof(ZScaleContext, x)
705 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
719 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS,
"dither" },
737 {
"primaries",
"set color primaries",
OFFSET(primaries),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1,
FLAGS,
"primaries" },
738 {
"p",
"set color primaries",
OFFSET(primaries),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1,
FLAGS,
"primaries" },
741 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS,
"primaries" },
751 {
"transfer",
"set transfer characteristic",
OFFSET(trc),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67,
FLAGS,
"transfer" },
752 {
"t",
"set transfer characteristic",
OFFSET(trc),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67,
FLAGS,
"transfer" },
767 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS,
"transfer" },
769 {
"matrix",
"set colorspace matrix",
OFFSET(colorspace),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_MATRIX_2020_CL,
FLAGS,
"matrix" },
788 {
"primariesin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1,
FLAGS,
"primaries" },
789 {
"pin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_PRIMARIES_ST432_1,
FLAGS,
"primaries" },
790 {
"transferin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67,
FLAGS,
"transfer" },
791 {
"tin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_TRANSFER_ARIB_B67,
FLAGS,
"transfer" },
792 {
"matrixin",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_MATRIX_2020_CL,
FLAGS,
"matrix" },
793 {
"min",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_MATRIX_2020_CL,
FLAGS,
"matrix" },
794 {
"chromal",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
795 {
"c",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
803 {
"chromalin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
804 {
"cin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
842 .priv_class = &zscale_class,
844 .
inputs = avfilter_vf_zscale_inputs,
845 .
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
#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)
#define LIBAVUTIL_VERSION_INT
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
#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
const char * name
Pad name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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.
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.
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, uint8_t clip)
#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...
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.
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)
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. ...
static const uint8_t dither[8][8]
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().
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
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)
static void uninit(AVFilterContext *ctx)
ITU-R BT2020 non-constant luminance system.
ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2.
static const struct ColorPrimaries color_primaries[AVCOL_PRI_NB]
AVFilterContext * src
source filter
#define AV_PIX_FMT_YUVA444P10
static const AVFilterPad outputs[]
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_GBRP14
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...
static const AVFilterPad inputs[]
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...
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,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;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);returnNULL;}returnac;}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;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->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);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> in
#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)
static const char * format
Describe the class of an AVClass context structure.
static int convert_primaries(enum AVColorPrimaries color_primaries)
Rational number (pair of numerator and denominator).
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
static const AVClass zscale_class
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GBRP12
#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
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.
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