Signed-off-by: Paul B Mahol <onemda@gmail.com>
Paul B Mahol authored on 2016/11/27 19:43:54... | ... |
@@ -97,6 +97,7 @@ typedef struct ZScaleContext { |
97 | 97 |
int chromal_in; |
98 | 98 |
char *size_str; |
99 | 99 |
double nominal_peak_luminance; |
100 |
+ int approximate_gamma; |
|
100 | 101 |
|
101 | 102 |
char *w_expr; ///< width expression string |
102 | 103 |
char *h_expr; ///< height expression string |
... | ... |
@@ -480,6 +481,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) |
480 | 480 |
s->params.resample_filter = s->filter; |
481 | 481 |
s->params.resample_filter_uv = s->filter; |
482 | 482 |
s->params.nominal_peak_luminance = s->nominal_peak_luminance; |
483 |
+ s->params.allow_approximate_gamma = s->approximate_gamma; |
|
483 | 484 |
|
484 | 485 |
s->src_format.width = in->width; |
485 | 486 |
s->src_format.height = in->height; |
... | ... |
@@ -762,6 +764,7 @@ static const AVOption zscale_options[] = { |
762 | 762 |
{ "chromalin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" }, |
763 | 763 |
{ "cin", "set input chroma location", OFFSET(chromal_in), AV_OPT_TYPE_INT, {.i64 = -1}, -1, ZIMG_CHROMA_BOTTOM, FLAGS, "chroma" }, |
764 | 764 |
{ "npl", "set nominal peak luminance", OFFSET(nominal_peak_luminance), AV_OPT_TYPE_DOUBLE, {.dbl = NAN}, 0, DBL_MAX, FLAGS }, |
765 |
+ { "agamma", "allow approximate gamma", OFFSET(approximate_gamma), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS }, |
|
765 | 766 |
{ NULL } |
766 | 767 |
}; |
767 | 768 |
|