47 #define ZIMG_ALIGNMENT 64
48 #define MIN_TILESIZE 64
49 #define MAX_THREADS 64
146 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
147 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
148 zimg_image_format_default(&
s->src_format_tmp, ZIMG_API_VERSION);
149 zimg_image_format_default(&
s->dst_format_tmp, ZIMG_API_VERSION);
151 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
152 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
153 zimg_image_format_default(&
s->alpha_src_format_tmp, ZIMG_API_VERSION);
154 zimg_image_format_default(&
s->alpha_dst_format_tmp, ZIMG_API_VERSION);
156 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
157 zimg_graph_builder_params_default(&
s->params_tmp, ZIMG_API_VERSION);
158 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
159 zimg_graph_builder_params_default(&
s->alpha_params_tmp, ZIMG_API_VERSION);
161 if (
s->size_str && (
s->w_expr ||
s->h_expr)) {
163 "Size and width/height expressions cannot be set at the same time.\n");
167 if (
s->w_expr && !
s->h_expr)
168 FFSWAP(
char *,
s->w_expr,
s->size_str);
174 "Invalid size '%s'\n",
s->size_str);
177 snprintf(buf,
sizeof(buf)-1,
"%d",
s->w);
179 snprintf(buf,
sizeof(buf)-1,
"%d",
s->h);
232 formats =
s->colorspace != ZIMG_MATRIX_UNSPECIFIED &&
s->colorspace > 0
249 s->out_slice_start[0] = 0;
250 for (
int i = 1;
i <
s->nb_threads;
i++) {
254 s->out_slice_end[
s->nb_threads - 1] = out_h;
256 for (
int i = 0;
i <
s->nb_threads;
i++) {
257 s->in_slice_start[
i] =
s->out_slice_start[
i] * in_h / (
double)out_h;
258 s->in_slice_end[
i] =
s->out_slice_end[
i] * in_h / (
double)out_h;
270 double var_values[
VARS_NB], res;
273 int factor_w, factor_h;
281 (
double)
inlink->sample_aspect_ratio.num /
inlink->sample_aspect_ratio.den : 1;
337 if (
s->force_original_aspect_ratio) {
341 if (
s->force_original_aspect_ratio == 1) {
350 if (
w > INT_MAX ||
h > INT_MAX ||
360 if (
inlink->sample_aspect_ratio.num){
367 inlink->sample_aspect_ratio.num,
inlink->sample_aspect_ratio.den,
374 "Error when evaluating the expression '%s'.\n"
375 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
376 expr,
s->w_expr,
s->h_expr);
383 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
392 switch (chroma_location) {
395 return ZIMG_CHROMA_LEFT;
397 return ZIMG_CHROMA_CENTER;
399 return ZIMG_CHROMA_TOP_LEFT;
401 return ZIMG_CHROMA_TOP;
403 return ZIMG_CHROMA_BOTTOM_LEFT;
405 return ZIMG_CHROMA_BOTTOM;
407 return ZIMG_CHROMA_LEFT;
412 switch (colorspace) {
414 return ZIMG_MATRIX_RGB;
416 return ZIMG_MATRIX_709;
418 return ZIMG_MATRIX_UNSPECIFIED;
420 return ZIMG_MATRIX_FCC;
422 return ZIMG_MATRIX_470BG;
424 return ZIMG_MATRIX_170M;
426 return ZIMG_MATRIX_240M;
428 return ZIMG_MATRIX_YCGCO;
430 return ZIMG_MATRIX_2020_NCL;
432 return ZIMG_MATRIX_2020_CL;
434 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
436 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
438 return ZIMG_MATRIX_ICTCP;
440 return ZIMG_MATRIX_UNSPECIFIED;
447 return ZIMG_TRANSFER_UNSPECIFIED;
449 return ZIMG_TRANSFER_709;
451 return ZIMG_TRANSFER_470_M;
453 return ZIMG_TRANSFER_470_BG;
455 return ZIMG_TRANSFER_601;
457 return ZIMG_TRANSFER_240M;
459 return ZIMG_TRANSFER_LINEAR;
461 return ZIMG_TRANSFER_LOG_100;
463 return ZIMG_TRANSFER_LOG_316;
465 return ZIMG_TRANSFER_IEC_61966_2_4;
467 return ZIMG_TRANSFER_2020_10;
469 return ZIMG_TRANSFER_2020_12;
471 return ZIMG_TRANSFER_ST2084;
473 return ZIMG_TRANSFER_ARIB_B67;
475 return ZIMG_TRANSFER_IEC_61966_2_1;
477 return ZIMG_TRANSFER_UNSPECIFIED;
484 return ZIMG_PRIMARIES_UNSPECIFIED;
486 return ZIMG_PRIMARIES_709;
488 return ZIMG_PRIMARIES_470_M;
490 return ZIMG_PRIMARIES_470_BG;
492 return ZIMG_PRIMARIES_170M;
494 return ZIMG_PRIMARIES_240M;
496 return ZIMG_PRIMARIES_FILM;
498 return ZIMG_PRIMARIES_2020;
500 return ZIMG_PRIMARIES_ST428;
502 return ZIMG_PRIMARIES_ST431_2;
504 return ZIMG_PRIMARIES_ST432_1;
506 return ZIMG_PRIMARIES_EBU3213_E;
508 return ZIMG_PRIMARIES_UNSPECIFIED;
516 return ZIMG_RANGE_LIMITED;
518 return ZIMG_RANGE_FULL;
520 return ZIMG_RANGE_LIMITED;
526 case ZIMG_RANGE_LIMITED:
528 case ZIMG_RANGE_FULL:
537 return ((img_fmt0->chroma_location != img_fmt1->chroma_location) ||
538 #
if ZIMG_API_VERSION >= 0x204
539 (img_fmt0->alpha != img_fmt1->alpha) ||
541 (img_fmt0->color_family != img_fmt1->color_family) ||
542 (img_fmt0->color_primaries != img_fmt1->color_primaries) ||
543 (img_fmt0->depth != img_fmt1->depth) ||
544 (img_fmt0->field_parity != img_fmt1->field_parity) ||
545 (img_fmt0->height != img_fmt1->height) ||
546 (img_fmt0->matrix_coefficients != img_fmt1->matrix_coefficients) ||
547 (img_fmt0->pixel_range != img_fmt1->pixel_range) ||
548 (img_fmt0->pixel_type != img_fmt1->pixel_type) ||
549 (img_fmt0->subsample_h != img_fmt1->subsample_h) ||
550 (img_fmt0->subsample_w != img_fmt1->subsample_w) ||
551 (img_fmt0->transfer_characteristics != img_fmt1->transfer_characteristics) ||
552 (img_fmt0->width != img_fmt1->width));
560 int ret = (parm0->allow_approximate_gamma != parm1->allow_approximate_gamma) ||
561 (parm0->dither_type != parm1->dither_type) ||
562 (parm0->resample_filter != parm1->resample_filter) ||
563 (parm0->resample_filter_uv != parm1->resample_filter_uv);
565 if ((
isnan(parm0->nominal_peak_luminance) == 0) || (
isnan(parm1->nominal_peak_luminance) == 0))
566 ret =
ret || (parm0->nominal_peak_luminance != parm1->nominal_peak_luminance);
567 if ((
isnan(parm0->filter_param_a) == 0) || (
isnan(parm1->filter_param_a) == 0))
568 ret =
ret || (parm0->filter_param_a != parm1->filter_param_a);
569 if ((
isnan(parm0->filter_param_a_uv) == 0) || (
isnan(parm1->filter_param_a_uv) == 0))
570 ret =
ret || (parm0->filter_param_a_uv != parm1->filter_param_a_uv);
571 if ((
isnan(parm0->filter_param_b) == 0) || (
isnan(parm1->filter_param_b) == 0))
572 ret =
ret || (parm0->filter_param_b != parm1->filter_param_b);
573 if ((
isnan(parm0->filter_param_b_uv) == 0) || (
isnan(parm1->filter_param_b_uv) == 0))
574 ret =
ret || (parm0->filter_param_b_uv != parm1->filter_param_b_uv);
602 zimg_image_format src_format;
603 zimg_image_format dst_format;
604 zimg_image_format alpha_src_format;
605 zimg_image_format alpha_dst_format;
606 const double in_slice_start =
s->in_slice_start[job_nr];
607 const double in_slice_end =
s->in_slice_end[job_nr];
608 const int out_slice_start =
s->out_slice_start[job_nr];
609 const int out_slice_end =
s->out_slice_end[job_nr];
611 src_format =
s->src_format;
612 dst_format =
s->dst_format;
616 src_format.active_region.width = in->
width;
617 src_format.active_region.height = in_slice_end - in_slice_start;
618 src_format.active_region.left = 0;
619 src_format.active_region.top = in_slice_start;
621 dst_format.width =
out->width;
622 dst_format.height = out_slice_end - out_slice_start;
624 if (
s->graph[job_nr]) {
625 zimg_filter_graph_free(
s->graph[job_nr]);
627 s->graph[job_nr] = zimg_filter_graph_build(&src_format, &dst_format, &
s->params);
628 if (!
s->graph[job_nr])
631 ret = zimg_filter_graph_get_tmp_size(
s->graph[job_nr], &
size);
642 alpha_src_format =
s->alpha_src_format;
643 alpha_dst_format =
s->alpha_dst_format;
646 alpha_src_format.active_region.width = in->
width;
647 alpha_src_format.active_region.height = in_slice_end - in_slice_start;
648 alpha_src_format.active_region.left = 0;
649 alpha_src_format.active_region.top = in_slice_start;
651 alpha_dst_format.width =
out->width;
652 alpha_dst_format.height = out_slice_end - out_slice_start;
654 if (
s->alpha_graph[job_nr]) {
655 zimg_filter_graph_free(
s->alpha_graph[job_nr]);
657 s->alpha_graph[job_nr] = zimg_filter_graph_build(&alpha_src_format, &alpha_dst_format, &
s->alpha_params);
658 if (!
s->alpha_graph[job_nr])
671 for (plane = 0; plane <
planes; plane++) {
672 int p =
desc->comp[plane].plane;
679 aligned->format = (*frame)->format;
680 aligned->width = (*frame)->width;
681 aligned->height = (*frame)->height;
705 if (
s->primaries != -1)
711 if (
s->chromal != -1)
722 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
723 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
724 const int out_slice_start =
s->out_slice_start[job_nr];
741 for (
int i = 0;
i < 3;
i++) {
742 const int vsamp =
i >= 1 ?
td->odesc->log2_chroma_h : 0;
744 p =
td->desc->comp[
i].plane;
746 src_buf.plane[
i].data =
td->in->data[p];
747 src_buf.plane[
i].stride =
td->in->linesize[p];
748 src_buf.plane[
i].mask = -1;
750 p =
td->odesc->comp[
i].plane;
751 dst_buf.plane[
i].data =
td->out->data[p] +
td->out->linesize[p] * (out_slice_start >> vsamp);
752 dst_buf.plane[
i].stride =
td->out->linesize[p];
753 dst_buf.plane[
i].mask = -1;
755 if (!
s->graph[job_nr])
757 ret = zimg_filter_graph_process(
s->graph[job_nr], &src_buf, &dst_buf,
s->tmp[job_nr], 0, 0, 0, 0);
762 src_buf.plane[0].data =
td->in->data[3];
763 src_buf.plane[0].stride =
td->in->linesize[3];
764 src_buf.plane[0].mask = -1;
766 dst_buf.plane[0].data =
td->out->data[3] +
td->out->linesize[3] * out_slice_start;
767 dst_buf.plane[0].stride =
td->out->linesize[3];
768 dst_buf.plane[0].mask = -1;
770 if (!
s->alpha_graph[job_nr])
772 ret = zimg_filter_graph_process(
s->alpha_graph[job_nr], &src_buf, &dst_buf,
s->tmp[job_nr], 0, 0, 0, 0);
794 (
link->w != outlink->
w) ||
795 (
link->h != outlink->
h) ||
799 (
s->src_format.chroma_location !=
s->dst_format.chroma_location) ||
800 (
s->src_format.color_family !=
s->dst_format.color_family) ||
801 (
s->src_format.color_primaries !=
s->dst_format.color_primaries) ||
802 (
s->src_format.depth !=
s->dst_format.depth) ||
803 (
s->src_format.matrix_coefficients !=
s->dst_format.matrix_coefficients) ||
804 (
s->src_format.field_parity !=
s->dst_format.field_parity) ||
805 (
s->src_format.pixel_range !=
s->dst_format.pixel_range) ||
806 (
s->src_format.pixel_type !=
s->dst_format.pixel_type) ||
807 (
s->src_format.transfer_characteristics !=
s->dst_format.transfer_characteristics)
825 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
827 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
839 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
840 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
841 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
844 s->primaries_in,
s->trc_in,
s->range_in,
s->chromal_in);
846 s->primaries,
s->trc,
s->range,
s->chromal);
849 s->params.dither_type =
s->dither;
850 s->params.cpu_type = ZIMG_CPU_AUTO_64B;
851 s->params.resample_filter =
s->filter;
852 s->params.resample_filter_uv =
s->filter;
853 s->params.nominal_peak_luminance =
s->nominal_peak_luminance;
854 s->params.allow_approximate_gamma =
s->approximate_gamma;
855 s->params.filter_param_a =
s->params.filter_param_a_uv =
s->param_a;
856 s->params.filter_param_b =
s->params.filter_param_b_uv =
s->param_b;
859 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
860 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
861 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
863 s->alpha_params.dither_type =
s->dither;
864 s->alpha_params.cpu_type = ZIMG_CPU_AUTO_64B;
865 s->alpha_params.resample_filter =
s->filter;
867 s->alpha_src_format.width = in->
width;
868 s->alpha_src_format.height = in->
height;
869 s->alpha_src_format.depth =
desc->comp[0].depth;
870 s->alpha_src_format.pixel_type = (
desc->flags &
AV_PIX_FMT_FLAG_FLOAT) ? ZIMG_PIXEL_FLOAT :
desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE;
871 s->alpha_src_format.color_family = ZIMG_COLOR_GREY;
873 s->alpha_dst_format.depth = odesc->
comp[0].
depth;
875 s->alpha_dst_format.color_family = ZIMG_COLOR_GREY;
879 av_reduce(&
out->sample_aspect_ratio.num, &
out->sample_aspect_ratio.den,
889 memset(
s->jobs_ret, 0,
s->nb_threads *
sizeof(*
s->jobs_ret));
891 for (
int i = 0;
ret >= 0 &&
i <
s->nb_threads;
i++)
892 if (
s->jobs_ret[
i] < 0)
893 ret =
s->jobs_ret[
i];
900 s->src_format_tmp =
s->src_format;
901 s->dst_format_tmp =
s->dst_format;
902 s->params_tmp =
s->params;
904 s->alpha_src_format_tmp =
s->alpha_src_format;
905 s->alpha_dst_format_tmp =
s->alpha_dst_format;
906 s->alpha_params_tmp =
s->alpha_params;
912 for (y = 0; y <
out->height; y++) {
913 const ptrdiff_t row = y *
out->linesize[3];
914 for (x = 0; x <
out->width; x++) {
919 }
else if (
s->dst_format.depth == 8) {
920 for (y = 0; y < outlink->
h; y++)
921 memset(
out->data[3] + y *
out->linesize[3], 0xff, outlink->
w);
923 const uint16_t
max = (1 <<
s->dst_format.depth) - 1;
924 for (y = 0; y < outlink->
h; y++) {
925 const ptrdiff_t row = y *
out->linesize[3];
926 for (x = 0; x <
out->width; x++)
949 for (
int i = 0;
i <
s->nb_threads;
i++) {
952 zimg_filter_graph_free(
s->graph[
i]);
955 if (
s->alpha_graph[
i]) {
956 zimg_filter_graph_free(
s->alpha_graph[
i]);
963 char *res,
int res_len,
int flags)
968 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
969 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
986 #define OFFSET(x) offsetof(ZScaleContext, x)
987 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
988 #define TFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
1002 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS, .unit =
"dither" },
1024 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1028 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1031 {
"bt470bg", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_470_BG}, 0, 0,
FLAGS, .unit =
"primaries" },
1032 {
"smpte170m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_170M}, 0, 0,
FLAGS, .unit =
"primaries" },
1033 {
"smpte240m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_240M}, 0, 0,
FLAGS, .unit =
"primaries" },
1036 {
"smpte428", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST428}, 0, 0,
FLAGS, .unit =
"primaries" },
1037 {
"smpte431", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST431_2}, 0, 0,
FLAGS, .unit =
"primaries" },
1038 {
"smpte432", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST432_1}, 0, 0,
FLAGS, .unit =
"primaries" },
1039 {
"jedec-p22", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1040 {
"ebu3213", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1041 {
"transfer",
"set transfer characteristic",
OFFSET(trc),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1045 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1050 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1059 {
"bt2020-10", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_10}, 0, 0,
FLAGS, .unit =
"transfer" },
1060 {
"bt2020-12", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_12}, 0, 0,
FLAGS, .unit =
"transfer" },
1061 {
"smpte2084", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ST2084}, 0, 0,
FLAGS, .unit =
"transfer" },
1062 {
"iec61966-2-4", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0,
FLAGS, .unit =
"transfer" },
1063 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS, .unit =
"transfer" },
1064 {
"arib-std-b67", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ARIB_B67}, 0, 0,
FLAGS, .unit =
"transfer" },
1065 {
"matrix",
"set colorspace matrix",
OFFSET(colorspace),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1069 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"matrix" },
1084 {
"chroma-derived-nc",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0,
FLAGS, .unit =
"matrix" },
1085 {
"chroma-derived-c", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0,
FLAGS, .unit =
"matrix" },
1087 {
"in_range",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1088 {
"rangein",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1089 {
"rin",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1090 {
"primariesin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1091 {
"pin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1092 {
"transferin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1093 {
"tin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1094 {
"matrixin",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1095 {
"min",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1096 {
"chromal",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1097 {
"c",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1103 {
"bottomleft",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_CHROMA_BOTTOM_LEFT}, 0, 0,
FLAGS, .unit =
"chroma" },
1105 {
"chromalin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1106 {
"cin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1109 {
"param_a",
"parameter A, which is parameter \"b\" for bicubic, "
1138 .priv_class = &zscale_class,