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);
228 formats =
s->colorspace != ZIMG_MATRIX_UNSPECIFIED &&
s->colorspace > 0
245 s->out_slice_start[0] = 0;
246 for (
int i = 1;
i <
s->nb_threads;
i++) {
250 s->out_slice_end[
s->nb_threads - 1] = out_h;
252 for (
int i = 0;
i <
s->nb_threads;
i++) {
253 s->in_slice_start[
i] =
s->out_slice_start[
i] * in_h / (
double)out_h;
254 s->in_slice_end[
i] =
s->out_slice_end[
i] * in_h / (
double)out_h;
266 double var_values[
VARS_NB], res;
269 int factor_w, factor_h;
277 (
double)
inlink->sample_aspect_ratio.num /
inlink->sample_aspect_ratio.den : 1;
333 if (
s->force_original_aspect_ratio) {
337 if (
s->force_original_aspect_ratio == 1) {
346 if (
w > INT_MAX ||
h > INT_MAX ||
356 if (
inlink->sample_aspect_ratio.num){
361 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",
364 inlink->sample_aspect_ratio.num,
inlink->sample_aspect_ratio.den,
372 "Error when evaluating the expression '%s'.\n"
373 "Maybe the expression for out_w:'%s' or for out_h:'%s' is self-referencing.\n",
374 expr,
s->w_expr,
s->h_expr);
381 int err_code = zimg_get_last_error(err_msg,
sizeof(err_msg));
390 switch (chroma_location) {
393 return ZIMG_CHROMA_LEFT;
395 return ZIMG_CHROMA_CENTER;
397 return ZIMG_CHROMA_TOP_LEFT;
399 return ZIMG_CHROMA_TOP;
401 return ZIMG_CHROMA_BOTTOM_LEFT;
403 return ZIMG_CHROMA_BOTTOM;
405 return ZIMG_CHROMA_LEFT;
410 switch (colorspace) {
412 return ZIMG_MATRIX_RGB;
414 return ZIMG_MATRIX_709;
416 return ZIMG_MATRIX_UNSPECIFIED;
418 return ZIMG_MATRIX_FCC;
420 return ZIMG_MATRIX_470BG;
422 return ZIMG_MATRIX_170M;
424 return ZIMG_MATRIX_240M;
426 return ZIMG_MATRIX_YCGCO;
428 return ZIMG_MATRIX_2020_NCL;
430 return ZIMG_MATRIX_2020_CL;
432 return ZIMG_MATRIX_CHROMATICITY_DERIVED_NCL;
434 return ZIMG_MATRIX_CHROMATICITY_DERIVED_CL;
436 return ZIMG_MATRIX_ICTCP;
438 return ZIMG_MATRIX_UNSPECIFIED;
445 return ZIMG_TRANSFER_UNSPECIFIED;
447 return ZIMG_TRANSFER_709;
449 return ZIMG_TRANSFER_470_M;
451 return ZIMG_TRANSFER_470_BG;
453 return ZIMG_TRANSFER_601;
455 return ZIMG_TRANSFER_240M;
457 return ZIMG_TRANSFER_LINEAR;
459 return ZIMG_TRANSFER_LOG_100;
461 return ZIMG_TRANSFER_LOG_316;
463 return ZIMG_TRANSFER_IEC_61966_2_4;
465 return ZIMG_TRANSFER_2020_10;
467 return ZIMG_TRANSFER_2020_12;
469 return ZIMG_TRANSFER_ST2084;
471 return ZIMG_TRANSFER_ARIB_B67;
473 return ZIMG_TRANSFER_IEC_61966_2_1;
475 return ZIMG_TRANSFER_UNSPECIFIED;
482 return ZIMG_PRIMARIES_UNSPECIFIED;
484 return ZIMG_PRIMARIES_709;
486 return ZIMG_PRIMARIES_470_M;
488 return ZIMG_PRIMARIES_470_BG;
490 return ZIMG_PRIMARIES_170M;
492 return ZIMG_PRIMARIES_240M;
494 return ZIMG_PRIMARIES_FILM;
496 return ZIMG_PRIMARIES_2020;
498 return ZIMG_PRIMARIES_ST428;
500 return ZIMG_PRIMARIES_ST431_2;
502 return ZIMG_PRIMARIES_ST432_1;
504 return ZIMG_PRIMARIES_EBU3213_E;
506 return ZIMG_PRIMARIES_UNSPECIFIED;
514 return ZIMG_RANGE_LIMITED;
516 return ZIMG_RANGE_FULL;
518 return ZIMG_RANGE_LIMITED;
524 case ZIMG_RANGE_LIMITED:
526 case ZIMG_RANGE_FULL:
535 return ((img_fmt0->chroma_location != img_fmt1->chroma_location) ||
536 #
if ZIMG_API_VERSION >= 0x204
537 (img_fmt0->alpha != img_fmt1->alpha) ||
539 (img_fmt0->color_family != img_fmt1->color_family) ||
540 (img_fmt0->color_primaries != img_fmt1->color_primaries) ||
541 (img_fmt0->depth != img_fmt1->depth) ||
542 (img_fmt0->field_parity != img_fmt1->field_parity) ||
543 (img_fmt0->height != img_fmt1->height) ||
544 (img_fmt0->matrix_coefficients != img_fmt1->matrix_coefficients) ||
545 (img_fmt0->pixel_range != img_fmt1->pixel_range) ||
546 (img_fmt0->pixel_type != img_fmt1->pixel_type) ||
547 (img_fmt0->subsample_h != img_fmt1->subsample_h) ||
548 (img_fmt0->subsample_w != img_fmt1->subsample_w) ||
549 (img_fmt0->transfer_characteristics != img_fmt1->transfer_characteristics) ||
550 (img_fmt0->width != img_fmt1->width));
558 int ret = (parm0->allow_approximate_gamma != parm1->allow_approximate_gamma) ||
559 (parm0->dither_type != parm1->dither_type) ||
560 (parm0->resample_filter != parm1->resample_filter) ||
561 (parm0->resample_filter_uv != parm1->resample_filter_uv);
563 if ((
isnan(parm0->nominal_peak_luminance) == 0) || (
isnan(parm1->nominal_peak_luminance) == 0))
564 ret =
ret || (parm0->nominal_peak_luminance != parm1->nominal_peak_luminance);
565 if ((
isnan(parm0->filter_param_a) == 0) || (
isnan(parm1->filter_param_a) == 0))
566 ret =
ret || (parm0->filter_param_a != parm1->filter_param_a);
567 if ((
isnan(parm0->filter_param_a_uv) == 0) || (
isnan(parm1->filter_param_a_uv) == 0))
568 ret =
ret || (parm0->filter_param_a_uv != parm1->filter_param_a_uv);
569 if ((
isnan(parm0->filter_param_b) == 0) || (
isnan(parm1->filter_param_b) == 0))
570 ret =
ret || (parm0->filter_param_b != parm1->filter_param_b);
571 if ((
isnan(parm0->filter_param_b_uv) == 0) || (
isnan(parm1->filter_param_b_uv) == 0))
572 ret =
ret || (parm0->filter_param_b_uv != parm1->filter_param_b_uv);
600 zimg_image_format src_format;
601 zimg_image_format dst_format;
602 zimg_image_format alpha_src_format;
603 zimg_image_format alpha_dst_format;
604 const double in_slice_start =
s->in_slice_start[job_nr];
605 const double in_slice_end =
s->in_slice_end[job_nr];
606 const int out_slice_start =
s->out_slice_start[job_nr];
607 const int out_slice_end =
s->out_slice_end[job_nr];
609 src_format =
s->src_format;
610 dst_format =
s->dst_format;
614 src_format.active_region.width = in->
width;
615 src_format.active_region.height = in_slice_end - in_slice_start;
616 src_format.active_region.left = 0;
617 src_format.active_region.top = in_slice_start;
619 dst_format.width =
out->width;
620 dst_format.height = out_slice_end - out_slice_start;
622 if (
s->graph[job_nr]) {
623 zimg_filter_graph_free(
s->graph[job_nr]);
625 s->graph[job_nr] = zimg_filter_graph_build(&src_format, &dst_format, &
s->params);
626 if (!
s->graph[job_nr])
629 ret = zimg_filter_graph_get_tmp_size(
s->graph[job_nr], &
size);
643 alpha_src_format =
s->alpha_src_format;
644 alpha_dst_format =
s->alpha_dst_format;
647 alpha_src_format.active_region.width = in->
width;
648 alpha_src_format.active_region.height = in_slice_end - in_slice_start;
649 alpha_src_format.active_region.left = 0;
650 alpha_src_format.active_region.top = in_slice_start;
652 alpha_dst_format.width =
out->width;
653 alpha_dst_format.height = out_slice_end - out_slice_start;
655 if (
s->alpha_graph[job_nr]) {
656 zimg_filter_graph_free(
s->alpha_graph[job_nr]);
658 s->alpha_graph[job_nr] = zimg_filter_graph_build(&alpha_src_format, &alpha_dst_format, &
s->alpha_params);
659 if (!
s->alpha_graph[job_nr])
672 for (plane = 0; plane <
planes; plane++) {
673 int p =
desc->comp[plane].plane;
698 if (
s->primaries != -1)
699 frame->color_primaries = (int)
s->dst_format.color_primaries;
702 frame->color_trc = (int)
s->dst_format.transfer_characteristics;
704 if (
s->chromal != -1)
705 frame->chroma_location = (int)
s->dst_format.chroma_location + 1;
715 zimg_image_buffer_const src_buf = { ZIMG_API_VERSION };
716 zimg_image_buffer dst_buf = { ZIMG_API_VERSION };
717 const int out_slice_start =
s->out_slice_start[job_nr];
734 for (
int i = 0;
i < 3;
i++) {
739 src_buf.plane[
i].data = td->
in->
data[p];
741 src_buf.plane[
i].mask = -1;
744 dst_buf.plane[
i].data = td->
out->
data[p] + td->
out->
linesize[p] * (out_slice_start >> vsamp);
746 dst_buf.plane[
i].mask = -1;
748 if (!
s->graph[job_nr])
750 ret = zimg_filter_graph_process(
s->graph[job_nr], &src_buf, &dst_buf,
757 src_buf.plane[0].data = td->
in->
data[3];
758 src_buf.plane[0].stride = td->
in->
linesize[3];
759 src_buf.plane[0].mask = -1;
763 dst_buf.plane[0].mask = -1;
765 if (!
s->alpha_graph[job_nr])
767 ret = zimg_filter_graph_process(
s->alpha_graph[job_nr], &src_buf, &dst_buf,
791 (
link->w != outlink->
w) ||
792 (
link->h != outlink->
h) ||
796 (
s->src_format.chroma_location !=
s->dst_format.chroma_location) ||
797 (
s->src_format.color_family !=
s->dst_format.color_family) ||
798 (
s->src_format.color_primaries !=
s->dst_format.color_primaries) ||
799 (
s->src_format.depth !=
s->dst_format.depth) ||
800 (
s->src_format.matrix_coefficients !=
s->dst_format.matrix_coefficients) ||
801 (
s->src_format.field_parity !=
s->dst_format.field_parity) ||
802 (
s->src_format.pixel_range !=
s->dst_format.pixel_range) ||
803 (
s->src_format.pixel_type !=
s->dst_format.pixel_type) ||
804 (
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,