| @@ -60,6 +60,7 @@ struct vf_format_opts { · 59 unmodified lines |
| 60 | 60 | bool convert; |
| 61 | 61 | int force_scaler; |
| 62 | 62 | bool dovi; |
| 63 | + bool hdr10plus; |
| 63 | 64 | bool film_grain; |
| 64 | 65 | }; |
| 65 | 66 | |
| @@ -178,6 +179,13 @@ static void vf_format_process(struct mp_filter *f) · 112 unmodified lines |
| 178 | 179 | }); |
| 179 | 180 | } |
| 180 | 181 | |
| 182 | + if (!priv->opts->hdr10plus) { |
| 183 | + memset(img->params.color.hdr.scene_max, 0, |
| 184 | + sizeof(img->params.color.hdr.scene_max)); |
| 185 | + img->params.color.hdr.scene_avg = 0; |
| 186 | + img->params.color.hdr.ootf = (struct pl_hdr_bezier){0}; |
| 187 | + } |
| 188 | + |
| 181 | 189 | if (!priv->opts->film_grain) |
| 182 | 190 | av_buffer_unref(&img->film_grain); |
| 183 | 191 | |
| @@ -240,6 +248,7 @@ static const m_option_t vf_opts_fields[] = { · 56 unmodified lines |
| 240 | 248 | {"dar", OPT_DOUBLE(dar)}, |
| 241 | 249 | {"convert", OPT_BOOL(convert)}, |
| 242 | 250 | {"dolbyvision", OPT_BOOL(dovi)}, |
| 251 | + {"hdr10plus", OPT_BOOL(hdr10plus)}, |
| 243 | 252 | {"film-grain", OPT_BOOL(film_grain)}, |
| 244 | 253 | {"force-scaler", OPT_CHOICE(force_scaler, |
| 245 | 254 | {"auto", MP_SWS_AUTO}, |
| @@ -256,6 +265,7 @@ const struct mp_user_filter_entry vf_format = { · 10 unmodified lines |
| 256 | 265 | .priv_defaults = &(const OPT_BASE_STRUCT){ |
| 257 | 266 | .rotate = -1, |
| 258 | 267 | .dovi = true, |
| 268 | + .hdr10plus = true, |
| 259 | 269 | .film_grain = true, |
| 260 | 270 | }, |
| 261 | 271 | .options = vf_opts_fields, |