You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avfilter/vf_zscale: export approximate gamma option and enable it by default
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -97,6 +97,7 @@ typedef struct ZScaleContext {
|
|||||||
int chromal_in;
|
int chromal_in;
|
||||||
char *size_str;
|
char *size_str;
|
||||||
double nominal_peak_luminance;
|
double nominal_peak_luminance;
|
||||||
|
int approximate_gamma;
|
||||||
|
|
||||||
char *w_expr; ///< width expression string
|
char *w_expr; ///< width expression string
|
||||||
char *h_expr; ///< height expression string
|
char *h_expr; ///< height expression string
|
||||||
@@ -480,6 +481,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
|
|||||||
s->params.resample_filter = s->filter;
|
s->params.resample_filter = s->filter;
|
||||||
s->params.resample_filter_uv = s->filter;
|
s->params.resample_filter_uv = s->filter;
|
||||||
s->params.nominal_peak_luminance = s->nominal_peak_luminance;
|
s->params.nominal_peak_luminance = s->nominal_peak_luminance;
|
||||||
|
s->params.allow_approximate_gamma = s->approximate_gamma;
|
||||||
|
|
||||||
s->src_format.width = in->width;
|
s->src_format.width = in->width;
|
||||||
s->src_format.height = in->height;
|
s->src_format.height = in->height;
|
||||||
@@ -762,6 +764,7 @@ static const AVOption zscale_options[] = {
|
|||||||
{ "chromalin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" },
|
{ "chromalin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" },
|
||||||
{ "cin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" },
|
{ "cin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" },
|
||||||
{ "npl", "set nominal peak luminance", OFFSET(nominal_peak_luminance), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, 0, DBL_MAX, FLAGS },
|
{ "npl", "set nominal peak luminance", OFFSET(nominal_peak_luminance), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, 0, DBL_MAX, FLAGS },
|
||||||
|
{ "agamma", "allow approximate gamma", OFFSET(approximate_gamma), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user