46 #define ZIMG_ALIGNMENT 64
47 #define MIN_TILESIZE 64
48 #define MAX_THREADS 64
140 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
141 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
142 zimg_image_format_default(&
s->src_format_tmp, ZIMG_API_VERSION);
143 zimg_image_format_default(&
s->dst_format_tmp, ZIMG_API_VERSION);
145 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
146 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
147 zimg_image_format_default(&
s->alpha_src_format_tmp, ZIMG_API_VERSION);
148 zimg_image_format_default(&
s->alpha_dst_format_tmp, ZIMG_API_VERSION);
150 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
151 zimg_graph_builder_params_default(&
s->params_tmp, ZIMG_API_VERSION);
152 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
153 zimg_graph_builder_params_default(&
s->alpha_params_tmp, ZIMG_API_VERSION);
155 if (
s->size_str && (
s->w_expr ||
s->h_expr)) {
157 "Size and width/height expressions cannot be set at the same time.\n");
161 if (
s->w_expr && !
s->h_expr)
162 FFSWAP(
char *,
s->w_expr,
s->size_str);
168 "Invalid size '%s'\n",
s->size_str);
171 snprintf(buf,
sizeof(buf)-1,
"%d",
s->w);
173 snprintf(buf,
sizeof(buf)-1,
"%d",
s->h);
226 formats =
s->colorspace != ZIMG_MATRIX_UNSPECIFIED &&
s->colorspace > 0
243 s->out_slice_start[0] = 0;
244 for (
int i = 1;
i <
s->nb_threads;
i++) {
248 s->out_slice_end[
s->nb_threads - 1] = out_h;
250 for (
int i = 0;
i <
s->nb_threads;
i++) {
251 s->in_slice_start[
i] =
s->out_slice_start[
i] * in_h / (
double)out_h;
252 s->in_slice_end[
i] =
s->out_slice_end[
i] * in_h / (
double)out_h;
264 double var_values[
VARS_NB], res;
267 int factor_w, factor_h;
275 (
double)
inlink->sample_aspect_ratio.num /
inlink->sample_aspect_ratio.den : 1;
331 if (
s->force_original_aspect_ratio) {
335 if (
s->force_original_aspect_ratio == 1) {
344 if (
w > INT_MAX ||
h > INT_MAX ||
354 if (
inlink->sample_aspect_ratio.num){
361 inlink->sample_aspect_ratio.num,
inlink->sample_aspect_ratio.den,
368 "Error when evaluating the expression '%s'.\n"
369 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
370 expr,
s->w_expr,
s->h_expr);
377 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
386 switch (chroma_location) {
389 return ZIMG_CHROMA_LEFT;
391 return ZIMG_CHROMA_CENTER;
393 return ZIMG_CHROMA_TOP_LEFT;
395 return ZIMG_CHROMA_TOP;
397 return ZIMG_CHROMA_BOTTOM_LEFT;
399 return ZIMG_CHROMA_BOTTOM;
401 return ZIMG_CHROMA_LEFT;
406 switch (colorspace) {
408 return ZIMG_MATRIX_RGB;
410 return ZIMG_MATRIX_709;
412 return ZIMG_MATRIX_UNSPECIFIED;
414 return ZIMG_MATRIX_FCC;
416 return ZIMG_MATRIX_470BG;
418 return ZIMG_MATRIX_170M;
420 return ZIMG_MATRIX_240M;
422 return ZIMG_MATRIX_YCGCO;
424 return ZIMG_MATRIX_2020_NCL;
426 return ZIMG_MATRIX_2020_CL;
428 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
430 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
432 return ZIMG_MATRIX_ICTCP;
434 return ZIMG_MATRIX_UNSPECIFIED;
441 return ZIMG_TRANSFER_UNSPECIFIED;
443 return ZIMG_TRANSFER_709;
445 return ZIMG_TRANSFER_470_M;
447 return ZIMG_TRANSFER_470_BG;
449 return ZIMG_TRANSFER_601;
451 return ZIMG_TRANSFER_240M;
453 return ZIMG_TRANSFER_LINEAR;
455 return ZIMG_TRANSFER_LOG_100;
457 return ZIMG_TRANSFER_LOG_316;
459 return ZIMG_TRANSFER_IEC_61966_2_4;
461 return ZIMG_TRANSFER_2020_10;
463 return ZIMG_TRANSFER_2020_12;
465 return ZIMG_TRANSFER_ST2084;
467 return ZIMG_TRANSFER_ARIB_B67;
469 return ZIMG_TRANSFER_IEC_61966_2_1;
471 return ZIMG_TRANSFER_UNSPECIFIED;
478 return ZIMG_PRIMARIES_UNSPECIFIED;
480 return ZIMG_PRIMARIES_709;
482 return ZIMG_PRIMARIES_470_M;
484 return ZIMG_PRIMARIES_470_BG;
486 return ZIMG_PRIMARIES_170M;
488 return ZIMG_PRIMARIES_240M;
490 return ZIMG_PRIMARIES_FILM;
492 return ZIMG_PRIMARIES_2020;
494 return ZIMG_PRIMARIES_ST428;
496 return ZIMG_PRIMARIES_ST431_2;
498 return ZIMG_PRIMARIES_ST432_1;
500 return ZIMG_PRIMARIES_EBU3213_E;
502 return ZIMG_PRIMARIES_UNSPECIFIED;
510 return ZIMG_RANGE_LIMITED;
512 return ZIMG_RANGE_FULL;
514 return ZIMG_RANGE_LIMITED;
520 case ZIMG_RANGE_LIMITED:
522 case ZIMG_RANGE_FULL:
531 return ((img_fmt0->chroma_location != img_fmt1->chroma_location) ||
532 #
if ZIMG_API_VERSION >= 0x204
533 (img_fmt0->alpha != img_fmt1->alpha) ||
535 (img_fmt0->color_family != img_fmt1->color_family) ||
536 (img_fmt0->color_primaries != img_fmt1->color_primaries) ||
537 (img_fmt0->depth != img_fmt1->depth) ||
538 (img_fmt0->field_parity != img_fmt1->field_parity) ||
539 (img_fmt0->height != img_fmt1->height) ||
540 (img_fmt0->matrix_coefficients != img_fmt1->matrix_coefficients) ||
541 (img_fmt0->pixel_range != img_fmt1->pixel_range) ||
542 (img_fmt0->pixel_type != img_fmt1->pixel_type) ||
543 (img_fmt0->subsample_h != img_fmt1->subsample_h) ||
544 (img_fmt0->subsample_w != img_fmt1->subsample_w) ||
545 (img_fmt0->transfer_characteristics != img_fmt1->transfer_characteristics) ||
546 (img_fmt0->width != img_fmt1->width));
554 int ret = (parm0->allow_approximate_gamma != parm1->allow_approximate_gamma) ||
555 (parm0->dither_type != parm1->dither_type) ||
556 (parm0->resample_filter != parm1->resample_filter) ||
557 (parm0->resample_filter_uv != parm1->resample_filter_uv);
559 if ((
isnan(parm0->nominal_peak_luminance) == 0) || (
isnan(parm1->nominal_peak_luminance) == 0))
560 ret =
ret || (parm0->nominal_peak_luminance != parm1->nominal_peak_luminance);
561 if ((
isnan(parm0->filter_param_a) == 0) || (
isnan(parm1->filter_param_a) == 0))
562 ret =
ret || (parm0->filter_param_a != parm1->filter_param_a);
563 if ((
isnan(parm0->filter_param_a_uv) == 0) || (
isnan(parm1->filter_param_a_uv) == 0))
564 ret =
ret || (parm0->filter_param_a_uv != parm1->filter_param_a_uv);
565 if ((
isnan(parm0->filter_param_b) == 0) || (
isnan(parm1->filter_param_b) == 0))
566 ret =
ret || (parm0->filter_param_b != parm1->filter_param_b);
567 if ((
isnan(parm0->filter_param_b_uv) == 0) || (
isnan(parm1->filter_param_b_uv) == 0))
568 ret =
ret || (parm0->filter_param_b_uv != parm1->filter_param_b_uv);
596 zimg_image_format src_format;
597 zimg_image_format dst_format;
598 zimg_image_format alpha_src_format;
599 zimg_image_format alpha_dst_format;
600 const double in_slice_start =
s->in_slice_start[job_nr];
601 const double in_slice_end =
s->in_slice_end[job_nr];
602 const int out_slice_start =
s->out_slice_start[job_nr];
603 const int out_slice_end =
s->out_slice_end[job_nr];
605 src_format =
s->src_format;
606 dst_format =
s->dst_format;
610 src_format.active_region.width = in->
width;
611 src_format.active_region.height = in_slice_end - in_slice_start;
612 src_format.active_region.left = 0;
613 src_format.active_region.top = in_slice_start;
615 dst_format.width =
out->width;
616 dst_format.height = out_slice_end - out_slice_start;
618 if (
s->graph[job_nr]) {
619 zimg_filter_graph_free(
s->graph[job_nr]);
621 s->graph[job_nr] = zimg_filter_graph_build(&src_format, &dst_format, &
s->params);
622 if (!
s->graph[job_nr])
625 ret = zimg_filter_graph_get_tmp_size(
s->graph[job_nr], &
size);
636 alpha_src_format =
s->alpha_src_format;
637 alpha_dst_format =
s->alpha_dst_format;
640 alpha_src_format.active_region.width = in->
width;
641 alpha_src_format.active_region.height = in_slice_end - in_slice_start;
642 alpha_src_format.active_region.left = 0;
643 alpha_src_format.active_region.top = in_slice_start;
645 alpha_dst_format.width =
out->width;
646 alpha_dst_format.height = out_slice_end - out_slice_start;
648 if (
s->alpha_graph[job_nr]) {
649 zimg_filter_graph_free(
s->alpha_graph[job_nr]);
651 s->alpha_graph[job_nr] = zimg_filter_graph_build(&alpha_src_format, &alpha_dst_format, &
s->alpha_params);
652 if (!
s->alpha_graph[job_nr])
665 for (plane = 0; plane <
planes; plane++) {
666 int p =
desc->comp[plane].plane;
673 aligned->format = (*frame)->format;
674 aligned->width = (*frame)->width;
675 aligned->height = (*frame)->height;
699 if (
s->primaries != -1)
700 frame->color_primaries = (int)
s->dst_format.color_primaries;
703 frame->color_trc = (int)
s->dst_format.transfer_characteristics;
705 if (
s->chromal != -1)
706 frame->chroma_location = (int)
s->dst_format.chroma_location + 1;
716 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
717 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
718 const int out_slice_start =
s->out_slice_start[job_nr];
735 for (
int i = 0;
i < 3;
i++) {
740 src_buf.plane[
i].data = td->
in->
data[p];
742 src_buf.plane[
i].mask = -1;
745 dst_buf.plane[
i].data = td->
out->
data[p] + td->
out->
linesize[p] * (out_slice_start >> vsamp);
747 dst_buf.plane[
i].mask = -1;
749 if (!
s->graph[job_nr])
751 ret = zimg_filter_graph_process(
s->graph[job_nr], &src_buf, &dst_buf,
s->tmp[job_nr], 0, 0, 0, 0);
756 src_buf.plane[0].data = td->
in->
data[3];
757 src_buf.plane[0].stride = td->
in->
linesize[3];
758 src_buf.plane[0].mask = -1;
762 dst_buf.plane[0].mask = -1;
764 if (!
s->alpha_graph[job_nr])
766 ret = zimg_filter_graph_process(
s->alpha_graph[job_nr], &src_buf, &dst_buf,
s->tmp[job_nr], 0, 0, 0, 0);
788 (
link->w != outlink->
w) ||
789 (
link->h != outlink->
h) ||
793 (
s->src_format.chroma_location !=
s->dst_format.chroma_location) ||
794 (
s->src_format.color_family !=
s->dst_format.color_family) ||
795 (
s->src_format.color_primaries !=
s->dst_format.color_primaries) ||
796 (
s->src_format.depth !=
s->dst_format.depth) ||
797 (
s->src_format.matrix_coefficients !=
s->dst_format.matrix_coefficients) ||
798 (
s->src_format.field_parity !=
s->dst_format.field_parity) ||
799 (
s->src_format.pixel_range !=
s->dst_format.pixel_range) ||
800 (
s->src_format.pixel_type !=
s->dst_format.pixel_type) ||
801 (
s->src_format.transfer_characteristics !=
s->dst_format.transfer_characteristics)
819 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
w);
821 snprintf(buf,
sizeof(buf)-1,
"%d", outlink->
h);
833 zimg_image_format_default(&
s->src_format, ZIMG_API_VERSION);
834 zimg_image_format_default(&
s->dst_format, ZIMG_API_VERSION);
835 zimg_graph_builder_params_default(&
s->params, ZIMG_API_VERSION);
838 s->primaries_in,
s->trc_in,
s->range_in,
s->chromal_in);
840 s->primaries,
s->trc,
s->range,
s->chromal);
843 s->params.dither_type =
s->dither;
844 s->params.cpu_type = ZIMG_CPU_AUTO_64B;
845 s->params.resample_filter =
s->filter;
846 s->params.resample_filter_uv =
s->filter;
847 s->params.nominal_peak_luminance =
s->nominal_peak_luminance;
848 s->params.allow_approximate_gamma =
s->approximate_gamma;
849 s->params.filter_param_a =
s->params.filter_param_a_uv =
s->param_a;
850 s->params.filter_param_b =
s->params.filter_param_b_uv =
s->param_b;
853 zimg_image_format_default(&
s->alpha_src_format, ZIMG_API_VERSION);
854 zimg_image_format_default(&
s->alpha_dst_format, ZIMG_API_VERSION);
855 zimg_graph_builder_params_default(&
s->alpha_params, ZIMG_API_VERSION);
857 s->alpha_params.dither_type =
s->dither;
858 s->alpha_params.cpu_type = ZIMG_CPU_AUTO_64B;
859 s->alpha_params.resample_filter =
s->filter;
861 s->alpha_src_format.width = in->
width;
862 s->alpha_src_format.height = in->
height;
863 s->alpha_src_format.depth =
desc->comp[0].depth;
864 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;
865 s->alpha_src_format.color_family = ZIMG_COLOR_GREY;
867 s->alpha_dst_format.depth = odesc->
comp[0].
depth;
869 s->alpha_dst_format.color_family = ZIMG_COLOR_GREY;
873 av_reduce(&
out->sample_aspect_ratio.num, &
out->sample_aspect_ratio.den,
883 memset(
s->jobs_ret, 0,
s->nb_threads *
sizeof(*
s->jobs_ret));
885 for (
int i = 0;
ret >= 0 &&
i <
s->nb_threads;
i++)
886 if (
s->jobs_ret[
i] < 0)
887 ret =
s->jobs_ret[
i];
894 s->src_format_tmp =
s->src_format;
895 s->dst_format_tmp =
s->dst_format;
896 s->params_tmp =
s->params;
898 s->alpha_src_format_tmp =
s->alpha_src_format;
899 s->alpha_dst_format_tmp =
s->alpha_dst_format;
900 s->alpha_params_tmp =
s->alpha_params;
906 for (y = 0; y <
out->height; y++) {
907 const ptrdiff_t row = y *
out->linesize[3];
908 for (x = 0; x <
out->width; x++) {
913 }
else if (
s->dst_format.depth == 8) {
914 for (y = 0; y < outlink->
h; y++)
915 memset(
out->data[3] + y *
out->linesize[3], 0xff, outlink->
w);
917 const uint16_t
max = (1 <<
s->dst_format.depth) - 1;
918 for (y = 0; y < outlink->
h; y++) {
919 const ptrdiff_t row = y *
out->linesize[3];
920 for (x = 0; x <
out->width; x++)
943 for (
int i = 0;
i <
s->nb_threads;
i++) {
946 zimg_filter_graph_free(
s->graph[
i]);
949 if (
s->alpha_graph[
i]) {
950 zimg_filter_graph_free(
s->alpha_graph[
i]);
957 char *res,
int res_len,
int flags)
962 if ( !strcmp(cmd,
"width") || !strcmp(cmd,
"w")
963 || !strcmp(cmd,
"height") || !strcmp(cmd,
"h")) {
980 #define OFFSET(x) offsetof(ZScaleContext, x)
981 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
982 #define TFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
996 {
"error_diffusion", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_DITHER_ERROR_DIFFUSION}, 0, 0,
FLAGS, .unit =
"dither" },
1018 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1022 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"primaries" },
1025 {
"bt470bg", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_470_BG}, 0, 0,
FLAGS, .unit =
"primaries" },
1026 {
"smpte170m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_170M}, 0, 0,
FLAGS, .unit =
"primaries" },
1027 {
"smpte240m", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_240M}, 0, 0,
FLAGS, .unit =
"primaries" },
1030 {
"smpte428", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST428}, 0, 0,
FLAGS, .unit =
"primaries" },
1031 {
"smpte431", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST431_2}, 0, 0,
FLAGS, .unit =
"primaries" },
1032 {
"smpte432", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_ST432_1}, 0, 0,
FLAGS, .unit =
"primaries" },
1033 {
"jedec-p22", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1034 {
"ebu3213", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_PRIMARIES_EBU3213_E}, 0, 0,
FLAGS, .unit =
"primaries" },
1035 {
"transfer",
"set transfer characteristic",
OFFSET(trc),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1039 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1044 {
"unknown", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"transfer" },
1053 {
"bt2020-10", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_10}, 0, 0,
FLAGS, .unit =
"transfer" },
1054 {
"bt2020-12", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_2020_12}, 0, 0,
FLAGS, .unit =
"transfer" },
1055 {
"smpte2084", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ST2084}, 0, 0,
FLAGS, .unit =
"transfer" },
1056 {
"iec61966-2-4", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_4},0, 0,
FLAGS, .unit =
"transfer" },
1057 {
"iec61966-2-1", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_IEC_61966_2_1},0, 0,
FLAGS, .unit =
"transfer" },
1058 {
"arib-std-b67", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_TRANSFER_ARIB_B67}, 0, 0,
FLAGS, .unit =
"transfer" },
1059 {
"matrix",
"set colorspace matrix",
OFFSET(colorspace),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1063 {
"unspecified", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_UNSPECIFIED}, 0, 0,
FLAGS, .unit =
"matrix" },
1078 {
"chroma-derived-nc",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL}, 0, 0,
FLAGS, .unit =
"matrix" },
1079 {
"chroma-derived-c", 0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_MATRIX_CHROMATICITY_DERIVED_CL}, 0, 0,
FLAGS, .unit =
"matrix" },
1081 {
"in_range",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1082 {
"rangein",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1083 {
"rin",
"set input color range",
OFFSET(range_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_RANGE_FULL,
FLAGS, .unit =
"range" },
1084 {
"primariesin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1085 {
"pin",
"set input color primaries",
OFFSET(primaries_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"primaries" },
1086 {
"transferin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1087 {
"tin",
"set input transfer characteristic",
OFFSET(trc_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"transfer" },
1088 {
"matrixin",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1089 {
"min",
"set input colorspace matrix",
OFFSET(colorspace_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX,
FLAGS, .unit =
"matrix" },
1090 {
"chromal",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1091 {
"c",
"set output chroma location",
OFFSET(chromal),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1097 {
"bottomleft",0, 0,
AV_OPT_TYPE_CONST, {.i64 = ZIMG_CHROMA_BOTTOM_LEFT}, 0, 0,
FLAGS, .unit =
"chroma" },
1099 {
"chromalin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1100 {
"cin",
"set input chroma location",
OFFSET(chromal_in),
AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM,
FLAGS, .unit =
"chroma" },
1103 {
"param_a",
"parameter A, which is parameter \"b\" for bicubic, "
1132 .priv_class = &zscale_class,