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_FCC;
359 return ZIMG_MATRIX_470BG;
361 return ZIMG_MATRIX_170M;
363 return ZIMG_MATRIX_240M;
365 return ZIMG_MATRIX_YCGCO;
367 return ZIMG_MATRIX_2020_NCL;
369 return ZIMG_MATRIX_2020_CL;
371 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
373 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
375 return ZIMG_MATRIX_ICTCP;
377 return ZIMG_MATRIX_UNSPECIFIED;
384 return ZIMG_TRANSFER_UNSPECIFIED;
386 return ZIMG_TRANSFER_709;
388 return ZIMG_TRANSFER_470_M;
390 return ZIMG_TRANSFER_470_BG;
392 return ZIMG_TRANSFER_601;
394 return ZIMG_TRANSFER_240M;
396 return ZIMG_TRANSFER_LINEAR;
398 return ZIMG_TRANSFER_LOG_100;
400 return ZIMG_TRANSFER_LOG_316;
402 return ZIMG_TRANSFER_IEC_61966_2_4;
404 return ZIMG_TRANSFER_2020_10;
406 return ZIMG_TRANSFER_2020_12;
408 return ZIMG_TRANSFER_ST2084;
410 return ZIMG_TRANSFER_ARIB_B67;
412 return ZIMG_TRANSFER_IEC_61966_2_1;
414 return ZIMG_TRANSFER_UNSPECIFIED;
419 switch (color_primaries) {
421 return ZIMG_PRIMARIES_UNSPECIFIED;
423 return ZIMG_PRIMARIES_709;
425 return ZIMG_PRIMARIES_470_M;
427 return ZIMG_PRIMARIES_470_BG;
429 return ZIMG_PRIMARIES_170M;
431 return ZIMG_PRIMARIES_240M;
433 return ZIMG_PRIMARIES_FILM;
435 return ZIMG_PRIMARIES_2020;
437 return ZIMG_PRIMARIES_ST428;
439 return ZIMG_PRIMARIES_ST431_2;
441 return ZIMG_PRIMARIES_ST432_1;
443 return ZIMG_PRIMARIES_EBU3213_E;
445 return ZIMG_PRIMARIES_UNSPECIFIED;
450 switch (color_range) {
453 return ZIMG_RANGE_LIMITED;
455 return ZIMG_RANGE_FULL;
457 return ZIMG_RANGE_LIMITED;
461 int colorspace,
int primaries,
int transfer,
int range,
int location)
463 format->width = frame->
width;
464 format->height = frame->
height;
478 zimg_image_format *src_format, zimg_image_format *dst_format,
479 void **
tmp,
size_t *tmp_size)
484 zimg_filter_graph_free(*graph);
485 *graph = zimg_filter_graph_build(src_format, dst_format, params);
489 ret = zimg_filter_graph_get_tmp_size(*graph, &size);
493 if (size > *tmp_size) {
511 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
512 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
540 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
542 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
555 zimg_image_format_default(&s->
src_format, ZIMG_API_VERSION);
556 zimg_image_format_default(&s->
dst_format, ZIMG_API_VERSION);
557 zimg_graph_builder_params_default(&s->
params, ZIMG_API_VERSION);
560 s->
params.cpu_type = ZIMG_CPU_AUTO;
603 zimg_graph_builder_params_default(&s->
alpha_params, ZIMG_API_VERSION);
651 src_buf.plane[
plane].mask = -1;
654 dst_buf.plane[
plane].data = out->
data[p];
656 dst_buf.plane[
plane].mask = -1;
659 ret = zimg_filter_graph_process(s->
graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
666 src_buf.plane[0].data = in->
data[3];
667 src_buf.plane[0].stride = in->
linesize[3];
668 src_buf.plane[0].mask = -1;
670 dst_buf.plane[0].data = out->
data[3];
671 dst_buf.plane[0].stride = out->
linesize[3];
672 dst_buf.plane[0].mask = -1;
674 ret = zimg_filter_graph_process(s->
alpha_graph, &src_buf, &dst_buf, s->
tmp, 0, 0, 0, 0);
683 for (y = 0; y < out->
height; y++) {
684 for (x = 0; x < out->
width; x++) {
690 for (y = 0; y < outlink->
h; y++)
691 memset(out->
data[3] + y * out->
linesize[3], 0xff, outlink->
w);
709 zimg_filter_graph_free(s->
graph);
716 char *res,
int res_len,
int flags)
721 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
722 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
739 #define OFFSET(x) offsetof(ZScaleContext, x)
740 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
754 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS,
"dither" },
776 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS,
"primaries" },
812 {
"iec61966-2-4", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0,
FLAGS,
"transfer" },
813 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS,
"transfer" },
834 {
"chroma-derived-nc",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0,
FLAGS,
"matrix" },
835 {
"chroma-derived-c", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0,
FLAGS,
"matrix" },
840 {
"primariesin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS,
"primaries" },
842 {
"transferin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS,
"transfer" },
844 {
"matrixin",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS,
"matrix" },
846 {
"chromal",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
847 {
"c",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
855 {
"chromalin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
856 {
"cin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS,
"chroma" },
894 .priv_class = &zscale_class,
896 .
inputs = avfilter_vf_zscale_inputs,
897 .
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)
#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
const char * av_default_item_name(void *ptr)
Return the context name.
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.
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)
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, int clip)
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.
also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
#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)
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. ...
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().
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
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
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.
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,(*(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
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
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.
#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)"