47 #define ZIMG_ALIGNMENT 64
48 #define MIN_TILESIZE 64
49 #define MAX_THREADS 64
141 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
142 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
143 zimg_image_format_default(&
s->src_format_tmp, ZIMG_API_VERSION);
144 zimg_image_format_default(&
s->dst_format_tmp, ZIMG_API_VERSION);
146 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
147 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
148 zimg_image_format_default(&
s->alpha_src_format_tmp, ZIMG_API_VERSION);
149 zimg_image_format_default(&
s->alpha_dst_format_tmp, ZIMG_API_VERSION);
151 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
152 zimg_graph_builder_params_default(&
s->params_tmp, ZIMG_API_VERSION);
153 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
154 zimg_graph_builder_params_default(&
s->alpha_params_tmp, ZIMG_API_VERSION);
156 if (
s->size_str && (
s->w_expr ||
s->h_expr)) {
158 "Size and width/height expressions cannot be set at the same time.\n");
162 if (
s->w_expr && !
s->h_expr)
163 FFSWAP(
char *,
s->w_expr,
s->size_str);
169 "Invalid size '%s'\n",
s->size_str);
172 snprintf(buf,
sizeof(buf)-1,
"%d",
s->w);
174 snprintf(buf,
sizeof(buf)-1,
"%d",
s->h);
231 formats =
s->colorspace != ZIMG_MATRIX_UNSPECIFIED &&
s->colorspace > 0
248 s->out_slice_start[0] = 0;
249 for (
int i = 1;
i <
s->nb_threads;
i++) {
253 s->out_slice_end[
s->nb_threads - 1] = out_h;
255 for (
int i = 0;
i <
s->nb_threads;
i++) {
256 s->in_slice_start[
i] =
s->out_slice_start[
i] * in_h / (
double)out_h;
257 s->in_slice_end[
i] =
s->out_slice_end[
i] * in_h / (
double)out_h;
269 double var_values[
VARS_NB], res;
272 int factor_w, factor_h;
280 (
double)
inlink->sample_aspect_ratio.num /
inlink->sample_aspect_ratio.den : 1;
336 if (
s->force_original_aspect_ratio) {
340 if (
s->force_original_aspect_ratio == 1) {
349 if (
w > INT_MAX ||
h > INT_MAX ||
359 if (
inlink->sample_aspect_ratio.num){
364 av_log(
ctx,
AV_LOG_DEBUG,
"w:%d h:%d fmt:%s csp:%s range:%s sar:%d/%d -> w:%d h:%d fmt:%s csp:%s range:%s sar:%d/%d\n",
367 inlink->sample_aspect_ratio.num,
inlink->sample_aspect_ratio.den,
375 "Error when evaluating the expression '%s'.\n"
376 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
377 expr,
s->w_expr,
s->h_expr);
384 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
393 switch (chroma_location) {
396 return ZIMG_CHROMA_LEFT;
398 return ZIMG_CHROMA_CENTER;
400 return ZIMG_CHROMA_TOP_LEFT;
402 return ZIMG_CHROMA_TOP;
404 return ZIMG_CHROMA_BOTTOM_LEFT;
406 return ZIMG_CHROMA_BOTTOM;
408 return ZIMG_CHROMA_LEFT;
413 switch (colorspace) {
415 return ZIMG_MATRIX_RGB;
417 return ZIMG_MATRIX_709;
419 return ZIMG_MATRIX_UNSPECIFIED;
421 return ZIMG_MATRIX_FCC;
423 return ZIMG_MATRIX_470BG;
425 return ZIMG_MATRIX_170M;
427 return ZIMG_MATRIX_240M;
429 return ZIMG_MATRIX_YCGCO;
431 return ZIMG_MATRIX_2020_NCL;
433 return ZIMG_MATRIX_2020_CL;
435 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
437 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
439 return ZIMG_MATRIX_ICTCP;
441 return ZIMG_MATRIX_UNSPECIFIED;
448 return ZIMG_TRANSFER_UNSPECIFIED;
450 return ZIMG_TRANSFER_709;
452 return ZIMG_TRANSFER_470_M;
454 return ZIMG_TRANSFER_470_BG;
456 return ZIMG_TRANSFER_601;
458 return ZIMG_TRANSFER_240M;
460 return ZIMG_TRANSFER_LINEAR;
462 return ZIMG_TRANSFER_LOG_100;
464 return ZIMG_TRANSFER_LOG_316;
466 return ZIMG_TRANSFER_IEC_61966_2_4;
468 return ZIMG_TRANSFER_2020_10;
470 return ZIMG_TRANSFER_2020_12;
472 return ZIMG_TRANSFER_ST2084;
474 return ZIMG_TRANSFER_ARIB_B67;
476 return ZIMG_TRANSFER_IEC_61966_2_1;
478 return ZIMG_TRANSFER_UNSPECIFIED;
485 return ZIMG_PRIMARIES_UNSPECIFIED;
487 return ZIMG_PRIMARIES_709;
489 return ZIMG_PRIMARIES_470_M;
491 return ZIMG_PRIMARIES_470_BG;
493 return ZIMG_PRIMARIES_170M;
495 return ZIMG_PRIMARIES_240M;
497 return ZIMG_PRIMARIES_FILM;
499 return ZIMG_PRIMARIES_2020;
501 return ZIMG_PRIMARIES_ST428;
503 return ZIMG_PRIMARIES_ST431_2;
505 return ZIMG_PRIMARIES_ST432_1;
507 return ZIMG_PRIMARIES_EBU3213_E;
509 return ZIMG_PRIMARIES_UNSPECIFIED;
517 return ZIMG_RANGE_LIMITED;
519 return ZIMG_RANGE_FULL;
521 return ZIMG_RANGE_LIMITED;
527 case ZIMG_RANGE_LIMITED:
529 case ZIMG_RANGE_FULL:
538 return ((img_fmt0->chroma_location != img_fmt1->chroma_location) ||
539 #
if ZIMG_API_VERSION >= 0x204
540 (img_fmt0->alpha != img_fmt1->alpha) ||
542 (img_fmt0->color_family != img_fmt1->color_family) ||
543 (img_fmt0->color_primaries != img_fmt1->color_primaries) ||
544 (img_fmt0->depth != img_fmt1->depth) ||
545 (img_fmt0->field_parity != img_fmt1->field_parity) ||
546 (img_fmt0->height != img_fmt1->height) ||
547 (img_fmt0->matrix_coefficients != img_fmt1->matrix_coefficients) ||
548 (img_fmt0->pixel_range != img_fmt1->pixel_range) ||
549 (img_fmt0->pixel_type != img_fmt1->pixel_type) ||
550 (img_fmt0->subsample_h != img_fmt1->subsample_h) ||
551 (img_fmt0->subsample_w != img_fmt1->subsample_w) ||
552 (img_fmt0->transfer_characteristics != img_fmt1->transfer_characteristics) ||
553 (img_fmt0->width != img_fmt1->width));
561 int ret = (parm0->allow_approximate_gamma != parm1->allow_approximate_gamma) ||
562 (parm0->dither_type != parm1->dither_type) ||
563 (parm0->resample_filter != parm1->resample_filter) ||
564 (parm0->resample_filter_uv != parm1->resample_filter_uv);
566 if ((
isnan(parm0->nominal_peak_luminance) == 0) || (
isnan(parm1->nominal_peak_luminance) == 0))
567 ret =
ret || (parm0->nominal_peak_luminance != parm1->nominal_peak_luminance);
568 if ((
isnan(parm0->filter_param_a) == 0) || (
isnan(parm1->filter_param_a) == 0))
569 ret =
ret || (parm0->filter_param_a != parm1->filter_param_a);
570 if ((
isnan(parm0->filter_param_a_uv) == 0) || (
isnan(parm1->filter_param_a_uv) == 0))
571 ret =
ret || (parm0->filter_param_a_uv != parm1->filter_param_a_uv);
572 if ((
isnan(parm0->filter_param_b) == 0) || (
isnan(parm1->filter_param_b) == 0))
573 ret =
ret || (parm0->filter_param_b != parm1->filter_param_b);
574 if ((
isnan(parm0->filter_param_b_uv) == 0) || (
isnan(parm1->filter_param_b_uv) == 0))
575 ret =
ret || (parm0->filter_param_b_uv != parm1->filter_param_b_uv);
589 : (
desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE);
591 : (
desc->nb_components > 1 ? ZIMG_COLOR_YUV : ZIMG_COLOR_GREY);
605 zimg_image_format src_format;
606 zimg_image_format dst_format;
607 zimg_image_format alpha_src_format;
608 zimg_image_format alpha_dst_format;
609 const double in_slice_start =
s->in_slice_start[job_nr];
610 const double in_slice_end =
s->in_slice_end[job_nr];
611 const int out_slice_start =
s->out_slice_start[job_nr];
612 const int out_slice_end =
s->out_slice_end[job_nr];
614 src_format =
s->src_format;
615 dst_format =
s->dst_format;
619 src_format.active_region.width = in->
width;
620 src_format.active_region.height = in_slice_end - in_slice_start;
621 src_format.active_region.left = 0;
622 src_format.active_region.top = in_slice_start;
624 dst_format.width =
out->width;
625 dst_format.height = out_slice_end - out_slice_start;
627 if (
s->graph[job_nr]) {
628 zimg_filter_graph_free(
s->graph[job_nr]);
630 s->graph[job_nr] = zimg_filter_graph_build(&src_format, &dst_format, &
s->params);
631 if (!
s->graph[job_nr])
634 ret = zimg_filter_graph_get_tmp_size(
s->graph[job_nr], &
size);
648 alpha_src_format =
s->alpha_src_format;
649 alpha_dst_format =
s->alpha_dst_format;
652 alpha_src_format.active_region.width = in->
width;
653 alpha_src_format.active_region.height = in_slice_end - in_slice_start;
654 alpha_src_format.active_region.left = 0;
655 alpha_src_format.active_region.top = in_slice_start;
657 alpha_dst_format.width =
out->width;
658 alpha_dst_format.height = out_slice_end - out_slice_start;
660 if (
s->alpha_graph[job_nr]) {
661 zimg_filter_graph_free(
s->alpha_graph[job_nr]);
663 s->alpha_graph[job_nr] = zimg_filter_graph_build(&alpha_src_format, &alpha_dst_format, &
s->alpha_params);
664 if (!
s->alpha_graph[job_nr])
677 for (plane = 0; plane <
planes; plane++) {
678 int p =
desc->comp[plane].plane;
703 if (
s->primaries != -1)
704 frame->color_primaries = (int)
s->dst_format.color_primaries;
707 frame->color_trc = (int)
s->dst_format.transfer_characteristics;
709 if (
s->chromal != -1)
710 frame->chroma_location = (int)
s->dst_format.chroma_location + 1;
720 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
721 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
722 const int out_slice_start =
s->out_slice_start[job_nr];
739 for (
int i = 0;
i < 3;
i++) {
744 if (i < td->
desc->nb_components) {
745 src_buf.plane[
i].data = td->
in->
data[p];
747 src_buf.plane[
i].mask = -1;
751 if (i < td->odesc->nb_components) {
752 dst_buf.plane[
i].data = td->
out->
data[p] + td->
out->
linesize[p] * (out_slice_start >> vsamp);
754 dst_buf.plane[
i].mask = -1;
757 if (!
s->graph[job_nr])
759 ret = zimg_filter_graph_process(
s->graph[job_nr], &src_buf, &dst_buf,
766 src_buf.plane[0].data = td->
in->
data[3];
767 src_buf.plane[0].stride = td->
in->
linesize[3];
768 src_buf.plane[0].mask = -1;
772 dst_buf.plane[0].mask = -1;
774 if (!
s->alpha_graph[job_nr])
776 ret = zimg_filter_graph_process(
s->alpha_graph[job_nr], &src_buf, &dst_buf,
793 int ret = 0, changed = 0;
800 (
link->w != outlink->
w) ||
801 (
link->h != outlink->
h) ||
805 (
s->src_format.chroma_location !=
s->dst_format.chroma_location) ||
806 (
s->src_format.color_family !=
s->dst_format.color_family) ||
807 (
s->src_format.color_primaries !=
s->dst_format.color_primaries) ||
808 (
s->src_format.depth !=
s->dst_format.depth) ||
809 (
s->src_format.matrix_coefficients !=
s->dst_format.matrix_coefficients) ||
810 (
s->src_format.field_parity !=
s->dst_format.field_parity) ||
811 (
s->src_format.pixel_range !=
s->dst_format.pixel_range) ||
812 (
s->src_format.pixel_type !=
s->dst_format.pixel_type) ||
813 (
s->src_format.transfer_characteristics !=
s->dst_format.transfer_characteristics)
828 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
830 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
842 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
843 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
844 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
847 s->primaries_in,
s->trc_in,
s->range_in,
s->chromal_in);
849 s->primaries,
s->trc,
s->range,
s->chromal);
852 s->params.dither_type =
s->dither;
853 s->params.cpu_type = ZIMG_CPU_AUTO_64B;
854 s->params.resample_filter =
s->filter;
855 s->params.resample_filter_uv =
s->filter;
856 s->params.nominal_peak_luminance =
s->nominal_peak_luminance;
857 s->params.allow_approximate_gamma =
s->approximate_gamma;
858 s->params.filter_param_a =
s->params.filter_param_a_uv =
s->param_a;
859 s->params.filter_param_b =
s->params.filter_param_b_uv =
s->param_b;
862 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
863 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
864 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
866 s->alpha_params.dither_type =
s->dither;
867 s->alpha_params.cpu_type = ZIMG_CPU_AUTO_64B;
868 s->alpha_params.resample_filter =
s->filter;
870 s->alpha_src_format.width = in->
width;
871 s->alpha_src_format.height = in->
height;
872 s->alpha_src_format.depth =
desc->comp[0].depth;
874 : (
desc->comp[0].depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE);
875 s->alpha_src_format.color_family = ZIMG_COLOR_GREY;
877 s->alpha_dst_format.depth = odesc->
comp[0].
depth;
879 : (odesc->
comp[0].
depth > 8 ? ZIMG_PIXEL_WORD : ZIMG_PIXEL_BYTE);
880 s->alpha_dst_format.color_family = ZIMG_COLOR_GREY;
884 av_reduce(&
out->sample_aspect_ratio.num, &
out->sample_aspect_ratio.den,
900 memset(
s->jobs_ret, 0,
s->nb_threads *
sizeof(*
s->jobs_ret));
902 for (
int i = 0;
ret >= 0 &&
i <
s->nb_threads;
i++)
903 if (
s->jobs_ret[
i] < 0)
904 ret =
s->jobs_ret[
i];
911 s->src_format_tmp =
s->src_format;
912 s->dst_format_tmp =
s->dst_format;
913 s->params_tmp =
s->params;
915 s->alpha_src_format_tmp =
s->alpha_src_format;
916 s->alpha_dst_format_tmp =
s->alpha_dst_format;
917 s->alpha_params_tmp =
s->alpha_params;
923 const uint16_t h_one = 0x3C00;
924 for (y = 0; y <
out->height; y++) {
925 const ptrdiff_t row = y *
out->linesize[3];
927 for (x = 0; x <
out->width; x++) {
931 for (x = 0; x <
out->width; x++) {
936 }
else if (
s->dst_format.depth == 8) {
937 for (y = 0; y < outlink->
h; y++)
938 memset(
out->data[3] + y *
out->linesize[3], 0xff, outlink->
w);
940 const uint16_t
max = (1 <<
s->dst_format.depth) - 1;
941 for (y = 0; y < outlink->
h; y++) {
942 const ptrdiff_t row = y *
out->linesize[3];
943 for (x = 0; x <
out->width; x++)
966 for (
int i = 0;
i <
s->nb_threads;
i++) {
969 zimg_filter_graph_free(
s->graph[
i]);
972 if (
s->alpha_graph[
i]) {
973 zimg_filter_graph_free(
s->alpha_graph[
i]);
980 char *res,
int res_len,
int flags)
985 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
986 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
1003 #define OFFSET(x) offsetof(ZScaleContext, x)
1004 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
1005 #define TFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
1019 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS, .unit =
"dither" },
1041 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1045 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1048 {
"bt470bg", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_470_BG}, 0, 0,
FLAGS, .unit =
"primaries" },
1049 {
"smpte170m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_170M}, 0, 0,
FLAGS, .unit =
"primaries" },
1050 {
"smpte240m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_240M}, 0, 0,
FLAGS, .unit =
"primaries" },
1053 {
"smpte428", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST428}, 0, 0,
FLAGS, .unit =
"primaries" },
1054 {
"smpte431", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST431_2}, 0, 0,
FLAGS, .unit =
"primaries" },
1055 {
"smpte432", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST432_1}, 0, 0,
FLAGS, .unit =
"primaries" },
1056 {
"jedec-p22", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1057 {
"ebu3213", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1058 {
"transfer",
"set transfer characteristic",
OFFSET(trc),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1062 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1067 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1076 {
"bt2020-10", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_10}, 0, 0,
FLAGS, .unit =
"transfer" },
1077 {
"bt2020-12", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_12}, 0, 0,
FLAGS, .unit =
"transfer" },
1078 {
"smpte2084", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ST2084}, 0, 0,
FLAGS, .unit =
"transfer" },
1079 {
"iec61966-2-4", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0,
FLAGS, .unit =
"transfer" },
1080 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS, .unit =
"transfer" },
1081 {
"arib-std-b67", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ARIB_B67}, 0, 0,
FLAGS, .unit =
"transfer" },
1082 {
"matrix",
"set colorspace matrix",
OFFSET(colorspace),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1086 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"matrix" },
1101 {
"chroma-derived-nc",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0,
FLAGS, .unit =
"matrix" },
1102 {
"chroma-derived-c", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0,
FLAGS, .unit =
"matrix" },
1104 {
"in_range",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1105 {
"rangein",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1106 {
"rin",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1107 {
"primariesin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1108 {
"pin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1109 {
"transferin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1110 {
"tin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1111 {
"matrixin",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1112 {
"min",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1113 {
"chromal",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1114 {
"c",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1120 {
"bottomleft",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_CHROMA_BOTTOM_LEFT}, 0, 0,
FLAGS, .unit =
"chroma" },
1122 {
"chromalin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1123 {
"cin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1126 {
"param_a",
"parameter A, which is parameter \"b\" for bicubic, "
1153 .p.priv_class = &zscale_class,