On 12/7/17, Michael Niedermayer <mich...@niedermayer.cc> wrote: > On Wed, Dec 06, 2017 at 09:10:22PM +0100, Paul B Mahol wrote: > [...] >> diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c >> index 2fd9c90d84..be6dcb9307 100644 >> --- a/libavfilter/vf_scale.c >> +++ b/libavfilter/vf_scale.c >> @@ -578,6 +578,7 @@ static const AVOption scale_options[] = { >> { "in_range", "set input color range", OFFSET( in_range), >> AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, 2, FLAGS, "range" >> }, >> { "out_range", "set output color range", OFFSET(out_range), >> AV_OPT_TYPE_INT, {.i64 = AVCOL_RANGE_UNSPECIFIED }, 0, 2, FLAGS, "range" >> }, >> { "auto", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = >> AVCOL_RANGE_UNSPECIFIED }, 0, 0, FLAGS, "range" }, >> + { "unknown", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = >> AVCOL_RANGE_UNSPECIFIED }, 0, 0, FLAGS, "range" }, >> { "full", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG}, 0, >> 0, FLAGS, "range" }, >> { "jpeg", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_JPEG}, 0, >> 0, FLAGS, "range" }, >> { "mpeg", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AVCOL_RANGE_MPEG}, 0, >> 0, FLAGS, "range" }, >> -- > > The change to libavfilter/vf_scale.c is ok
I cannot grasp how to get color_range set by -color_range as encoder option for mjpeg encoder to pick it up into scale filter insertion as last step in filtergraph. Idea is to have user set color_range as encoding option for jpeg (could be auto added later) and then have scale filter auto inserted at end of filtergraph and before buffersink so it converts from one range to another if required. Please help if you can! _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel