lavfi/vf_libplacebo: deprecate hybrid_mix option
Deprecated upstream in libplacebo v6.292.
This commit is contained in:
		
							parent
							
								
									13ef5025e3
								
							
						
					
					
						commit
						2e83ba001d
					
				@ -16664,12 +16664,6 @@ output color volumes. Disabled by default.
 | 
			
		||||
Size of the tone-mapping LUT, between @code{2} and @code{1024}. Defaults to
 | 
			
		||||
@code{256}. Note that this figure is squared when combined with
 | 
			
		||||
@code{peak_detect}.
 | 
			
		||||
 | 
			
		||||
@item hybrid_mix
 | 
			
		||||
If nonzero, this much of the upper range of the tone-mapped result is smoothly
 | 
			
		||||
mixed with a per-channel (LMS) tone-mapped version. Helps avoid unnatural
 | 
			
		||||
blown-out highlights when tone-mapping very bright, strongly saturated colors.
 | 
			
		||||
Defaults to @code{0.2}.
 | 
			
		||||
@end table
 | 
			
		||||
 | 
			
		||||
@subsubsection Dithering
 | 
			
		||||
 | 
			
		||||
@ -219,7 +219,6 @@ typedef struct LibplaceboContext {
 | 
			
		||||
    float tonemapping_param;
 | 
			
		||||
    int inverse_tonemapping;
 | 
			
		||||
    int tonemapping_lut_size;
 | 
			
		||||
    float hybrid_mix;
 | 
			
		||||
 | 
			
		||||
#if FF_API_LIBPLACEBO_OPTS
 | 
			
		||||
    /* for backwards compatibility */
 | 
			
		||||
@ -232,6 +231,7 @@ typedef struct LibplaceboContext {
 | 
			
		||||
    int tonemapping_mode;
 | 
			
		||||
    float crosstalk;
 | 
			
		||||
    float overshoot;
 | 
			
		||||
    float hybrid_mix;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* pl_dither_params */
 | 
			
		||||
@ -360,12 +360,10 @@ static int update_settings(AVFilterContext *ctx)
 | 
			
		||||
    int err = 0;
 | 
			
		||||
    LibplaceboContext *s = ctx->priv;
 | 
			
		||||
    int gamut_mode = s->gamut_mode;
 | 
			
		||||
    float hybrid_mix = s->hybrid_mix;
 | 
			
		||||
    uint8_t color_rgba[4];
 | 
			
		||||
 | 
			
		||||
    RET(av_parse_color(color_rgba, s->fillcolor, -1, s));
 | 
			
		||||
 | 
			
		||||
#if FF_API_LIBPLACEBO_OPTS
 | 
			
		||||
    float hybrid_mix = s->hybrid_mix;
 | 
			
		||||
    /* backwards compatibility with older API */
 | 
			
		||||
    switch (s->tonemapping_mode) {
 | 
			
		||||
    case 0: /*PL_TONE_MAP_AUTO*/
 | 
			
		||||
@ -390,6 +388,8 @@ static int update_settings(AVFilterContext *ctx)
 | 
			
		||||
        gamut_mode = GAMUT_MAP_DESATURATE;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    RET(av_parse_color(color_rgba, s->fillcolor, -1, s));
 | 
			
		||||
 | 
			
		||||
    s->deband_params = *pl_deband_params(
 | 
			
		||||
        .iterations = s->deband_iterations,
 | 
			
		||||
        .threshold = s->deband_threshold,
 | 
			
		||||
@ -419,11 +419,13 @@ static int update_settings(AVFilterContext *ctx)
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    s->color_map_params = *pl_color_map_params(
 | 
			
		||||
#if PL_API_VER >= 269
 | 
			
		||||
#if FF_API_LIBPLACEBO_OPTS
 | 
			
		||||
# if PL_API_VER >= 269
 | 
			
		||||
        .hybrid_mix = hybrid_mix,
 | 
			
		||||
#elif FF_API_LIBPLACEBO_OPTS
 | 
			
		||||
# else
 | 
			
		||||
        .tone_mapping_mode = s->tonemapping_mode,
 | 
			
		||||
        .tone_mapping_crosstalk = s->crosstalk,
 | 
			
		||||
# endif
 | 
			
		||||
#endif
 | 
			
		||||
        .tone_mapping_function = get_tonemapping_func(s->tonemapping),
 | 
			
		||||
        .tone_mapping_param = s->tonemapping_param,
 | 
			
		||||
@ -1396,7 +1398,6 @@ static const AVOption libplacebo_options[] = {
 | 
			
		||||
    { "tonemapping_param", "Tunable parameter for some tone-mapping functions", OFFSET(tonemapping_param), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 100.0, .flags = DYNAMIC },
 | 
			
		||||
    { "inverse_tonemapping", "Inverse tone mapping (range expansion)", OFFSET(inverse_tonemapping), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC },
 | 
			
		||||
    { "tonemapping_lut_size", "Tone-mapping LUT size", OFFSET(tonemapping_lut_size), AV_OPT_TYPE_INT, {.i64 = 256}, 2, 1024, DYNAMIC },
 | 
			
		||||
    { "hybrid_mix", "Tone-mapping hybrid LMS mixing coefficient", OFFSET(hybrid_mix), AV_OPT_TYPE_FLOAT, {.dbl = 0.20}, 0.0, 1.00, DYNAMIC },
 | 
			
		||||
 | 
			
		||||
#if FF_API_LIBPLACEBO_OPTS
 | 
			
		||||
    /* deprecated options for backwards compatibility, defaulting to -1 to not override the new defaults */
 | 
			
		||||
@ -1417,6 +1418,7 @@ static const AVOption libplacebo_options[] = {
 | 
			
		||||
        { "luma", "Luminance", 0, AV_OPT_TYPE_CONST, {.i64 = 4}, 0, 0, STATIC, "tonemap_mode" },
 | 
			
		||||
    { "tonemapping_crosstalk", "Crosstalk factor for tone-mapping", OFFSET(crosstalk), AV_OPT_TYPE_FLOAT, {.dbl = 0.04}, 0.0, 0.30, DYNAMIC | AV_OPT_FLAG_DEPRECATED },
 | 
			
		||||
    { "overshoot", "Tone-mapping overshoot margin", OFFSET(overshoot), AV_OPT_TYPE_FLOAT, {.dbl = 0.05}, 0.0, 1.0, DYNAMIC | AV_OPT_FLAG_DEPRECATED },
 | 
			
		||||
    { "hybrid_mix", "Tone-mapping hybrid LMS mixing coefficient", OFFSET(hybrid_mix), AV_OPT_TYPE_FLOAT, {.dbl = 0.20}, 0.0, 1.00, DYNAMIC },
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    { "dithering", "Dither method to use", OFFSET(dithering), AV_OPT_TYPE_INT, {.i64 = PL_DITHER_BLUE_NOISE}, -1, PL_DITHER_METHOD_COUNT - 1, DYNAMIC, "dither" },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user