qt: playlist: use item title if available
[vlc.git] / modules / video_output / placebo_utils.h
blob99c3f318b5fd9023398042bdd4b92c610b91bf59
1 /*****************************************************************************
2 * placebo_utils.h: Definition of various libplacebo helpers
3 *****************************************************************************
4 * Copyright (C) 2018 Niklas Haas
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifndef VLC_PLACEBO_UTILS_H
22 #define VLC_PLACEBO_UTILS_H 1
24 #include <vlc_common.h>
25 #include <vlc_picture.h>
27 #include <libplacebo/colorspace.h>
28 #include <libplacebo/shaders/colorspace.h>
29 #include <libplacebo/utils/upload.h>
31 // Create a libplacebo context, hooked up to the log system; or NULL on OOM
32 struct pl_context *vlc_placebo_Create(vlc_object_t *);
34 // Turn a video_format_t into the equivalent libplacebo values
35 struct pl_color_space vlc_placebo_ColorSpace(const video_format_t *);
36 struct pl_color_repr vlc_placebo_ColorRepr(const video_format_t *);
37 enum pl_chroma_location vlc_placebo_ChromaLoc(const video_format_t *);
39 // Fill a pl_plane_data array with various data. Returns the number of planes,
40 // or 0 if the format is unsupported by the libplacebo API. If `buf` is set,
41 // then all addresses of the picture_t must lie within `buf`'s mapped memory.
42 int vlc_placebo_PlaneFormat(const video_format_t *, struct pl_plane_data[4]);
43 int vlc_placebo_PlaneData(const picture_t *, struct pl_plane_data[4],
44 const struct pl_buf *buf);
46 // See if a given FourCC is physically supported by a given GPU
47 bool vlc_placebo_FormatSupported(const struct pl_gpu *, vlc_fourcc_t);
49 // Shared options strings/structs for libplacebo options
51 #define RENDER_INTENT_TEXT "Rendering intent for color conversion"
52 #define RENDER_INTENT_LONGTEXT "The mapping type used to convert between color spaces."
54 static const int intent_values[] = {
55 PL_INTENT_PERCEPTUAL,
56 PL_INTENT_RELATIVE_COLORIMETRIC,
57 PL_INTENT_SATURATION,
58 PL_INTENT_ABSOLUTE_COLORIMETRIC,
61 static const char * const intent_text[] = {
62 "Perceptual",
63 "Relative colorimetric",
64 "Absolute colorimetric",
65 "Saturation",
68 #define PRIM_TEXT "Display primaries"
69 #define PRIM_LONGTEXT "The primaries associated with the output display"
71 static const int prim_values[] = {
72 PL_COLOR_PRIM_UNKNOWN,
73 PL_COLOR_PRIM_BT_601_525,
74 PL_COLOR_PRIM_BT_601_625,
75 PL_COLOR_PRIM_BT_709,
76 PL_COLOR_PRIM_BT_470M,
77 PL_COLOR_PRIM_BT_2020,
78 PL_COLOR_PRIM_APPLE,
79 PL_COLOR_PRIM_ADOBE,
80 PL_COLOR_PRIM_PRO_PHOTO,
81 PL_COLOR_PRIM_CIE_1931,
82 PL_COLOR_PRIM_DCI_P3,
83 PL_COLOR_PRIM_V_GAMUT,
84 PL_COLOR_PRIM_S_GAMUT,
85 PL_COLOR_PRIM_DISPLAY_P3,
88 static const char * const prim_text[] = {
89 "Automatic / Unknown primaries",
90 "ITU-R Rec. BT.601 (525-line = NTSC, SMPTE-C)",
91 "ITU-R Rec. BT.601 (625-line = PAL, SECAM)",
92 "ITU-R Rec. BT.709 (HD), also sRGB",
93 "ITU-R Rec. BT.470 M",
94 "ITU-R Rec. BT.2020 (UltraHD)",
95 "Apple RGB",
96 "Adobe RGB (1998)",
97 "ProPhoto RGB (ROMM)",
98 "CIE 1931 RGB primaries",
99 "DCI-P3 (Digital Cinema)",
100 "Panasonic V-Gamut (VARICAM)",
101 "Sony S-Gamut",
102 "Display-P3 (Digital Cinema with D65)",
105 #define TRC_TEXT "Display gamma / transfer function"
106 #define TRC_LONGTEXT "The gamma/transfer function associated with the output display"
108 static const int trc_values[] = {
109 PL_COLOR_TRC_UNKNOWN,
110 PL_COLOR_TRC_BT_1886,
111 PL_COLOR_TRC_SRGB,
112 PL_COLOR_TRC_LINEAR,
113 PL_COLOR_TRC_GAMMA18,
114 PL_COLOR_TRC_GAMMA22,
115 PL_COLOR_TRC_GAMMA28,
116 PL_COLOR_TRC_PRO_PHOTO,
117 PL_COLOR_TRC_PQ,
118 PL_COLOR_TRC_HLG,
119 PL_COLOR_TRC_V_LOG,
120 PL_COLOR_TRC_S_LOG1,
121 PL_COLOR_TRC_S_LOG2,
124 static const char * const trc_text[] = {
125 "Automatic / Unknown gamma",
126 "ITU-R Rec. BT.1886 (CRT emulation + OOTF)",
127 "IEC 61966-2-4 sRGB (CRT emulation)",
128 "Linear light content",
129 "Pure power gamma 1.8",
130 "Pure power gamma 2.2",
131 "Pure power gamma 2.8",
132 "ProPhoto RGB (ROMM)",
133 "ITU-R BT.2100 PQ (perceptual quantizer), aka SMPTE ST2084",
134 "ITU-R BT.2100 HLG (hybrid log-gamma), aka ARIB STD-B67",
135 "Panasonic V-Log (VARICAM)",
136 "Sony S-Log1",
137 "Sony S-Log2",
141 #define TONEMAPPING_TEXT "Tone-mapping algorithm"
142 #define TONEMAPPING_LONGTEXT "Algorithm to use when converting from wide gamut to standard gamut, or from HDR to SDR."
144 static const int tone_values[] = {
145 PL_TONE_MAPPING_HABLE,
146 PL_TONE_MAPPING_MOBIUS,
147 PL_TONE_MAPPING_REINHARD,
148 PL_TONE_MAPPING_GAMMA,
149 PL_TONE_MAPPING_LINEAR,
150 PL_TONE_MAPPING_CLIP,
153 static const char * const tone_text[] = {
154 "Hable (filmic mapping, recommended)",
155 "Mobius (linear + knee)",
156 "Reinhard (simple non-linear)",
157 "Gamma-Power law",
158 "Linear stretch (peak to peak)",
159 "Hard clip out-of-gamut",
162 #define TONEMAP_PARAM_TEXT "Tone-mapping parameter"
163 #define TONEMAP_PARAM_LONGTEXT "This parameter can be used to tune the tone-mapping curve. Specifics depend on the curve used. If left as 0, the curve's preferred default is used."
165 #define TONEMAP_DESAT_TEXT "Tone-mapping desaturation coefficient"
166 #define TONEMAP_DESAT_LONGTEXT "How strongly to desaturate bright spectral colors towards white. 0.0 disables this behavior."
168 #define DESAT_STRENGTH_TEXT "Desaturation strength"
169 #define DESAT_STRENGTH_LONGTEXT "How strongly to desaturate bright spectral colors towards white. 0.0 disables this behavior, 1.0 enables full desaturation (hollywood-style)"
171 #define DESAT_EXPONENT_TEXT "Desaturation exponent"
172 #define DESAT_EXPONENT_LONGTEXT "Controls the steepness of the desaturation curve. If you set this to 0.0, the curve will be flat, i.e. desaturation always enabled (hollywood-style)."
174 #define DESAT_BASE_TEXT "Desaturation base"
175 #define DESAT_BASE_LONGTEXT "Controls the starting offset of the desaturation curve. Brightness values below this base will always be colorimetrically tone mapped (never desaturated)."
177 #define MAX_BOOST_TEXT "Maximum brightness boost"
178 #define MAX_BOOST_LONGTEXT "Maximum allowed brightness boost to compensate for dark scenes. A value of 1.0 means no brightness boost is allowed."
180 #define GAMUT_WARN_TEXT "Highlight clipped pixels"
181 #define GAMUT_WARN_LONGTEXT "Debugging tool to indicate which pixels were clipped as part of the tone mapping process."
183 #define PEAK_FRAMES_TEXT "HDR peak detection buffer size"
184 #define PEAK_FRAMES_LONGTEXT "How many input frames to consider when determining the brightness of HDR signals. Higher values result in a slower/smoother response to brightness level changes. Setting this to 0 disables peak detection entirely."
186 #define PEAK_PERIOD_TEXT "HDR peak detection period"
187 #define PEAK_PERIOD_LONGTEXT "This option enables peak detection with the specified smoothing period. A value of 0.0 disables peak detection. Higher values result in a larger smoothing period which means the detected values will be stable over a longer number of frames, at the cost of responding more slowly to changes in scene brightness"
189 #define TARGET_AVG_TEXT "Target peak brightness average"
190 #define TARGET_AVG_LONGTEXT "If the source frame has an average brightness exceeding this number, the frame will be automatically darkened to compensate. This feature only works when peak detection is enabled."
192 #define SCENE_THRESHOLD_TEXT "HDR peak scene change threshold"
193 #define SCENE_THRESHOLD_LONGTEXT "When using HDR peak detection, this sets a threshold for sudden brightness changes that should be considered as scene changes. This will result in the detected peak being immediately updated to the new value, rather than gradually being adjusted. Setting this to 0 disables this feature."
195 #define SCENE_THRESHOLD_LOW_TEXT "Scene change lower threshold"
196 #define SCENE_THRESHOLD_LOW_LONGTEXT "When using HDR peak detection, this sets the lower boundary of a brightness change indicating a scene change. Brightness changes between frames that exceed this threshold will begin to be mixed into the detected peak more strongly, bypassing the peak smoothing. Setting this to a negative number disables this logic."
198 #define SCENE_THRESHOLD_HIGH_TEXT "Scene change upper threshold"
199 #define SCENE_THRESHOLD_HIGH_LONGTEXT "This sets the upper boundary of a brightness change indicating a scene change. Brightness changes that exceed this value will instantly replace the detected peak, bypassing all smoothing. Setting this to a negative number disables this logic."
201 #define DITHER_TEXT "Dithering algorithm"
202 #define DITHER_LONGTEXT "The algorithm to use when dithering to a lower bit depth."
204 static const int dither_values[] = {
205 -1, // no dithering
206 PL_DITHER_BLUE_NOISE,
207 PL_DITHER_ORDERED_FIXED,
208 PL_DITHER_ORDERED_LUT,
209 PL_DITHER_WHITE_NOISE,
212 static const char * const dither_text[] = {
213 "Disabled",
214 "Blue noise (high quality)",
215 "Bayer matrix (ordered dither), 16x16 fixed size (fast)",
216 "Bayer matrix (ordered dither), any size",
217 "White noise (fast but low quality)",
220 #define DITHER_SIZE_TEXT "Dither LUT size (log 2)"
221 #define DITHER_SIZE_LONGTEXT "Controls the size of the dither matrix, as a power of two (e.g. the default of 6 corresponds to a 64x64 matrix). Does not affect all algorithms."
223 #define TEMPORAL_DITHER_TEXT "Temporal dithering"
224 #define TEMPORAL_DITHER_LONGTEXT "Enables perturbing the dither matrix across frames. This reduces the persistence of dithering artifacts, but can cause flickering on some (cheap) LCD screens."
226 #define DITHER_DEPTH_TEXT "Dither depth override (0 = auto)"
227 #define DITHER_DEPTH_LONGTEXT "Overrides the detected framebuffer depth. Useful to dither to lower bit depths than otherwise required."
229 enum {
230 SCALE_BUILTIN = 0,
231 SCALE_SPLINE16,
232 SCALE_SPLINE36,
233 SCALE_SPLINE64,
234 SCALE_MITCHELL,
235 SCALE_BICUBIC,
236 SCALE_EWA_LANCZOS,
237 SCALE_NEAREST,
238 SCALE_BILINEAR,
239 SCALE_GAUSSIAN,
240 SCALE_LANCZOS,
241 SCALE_GINSENG,
242 SCALE_EWA_GINSENG,
243 SCALE_EWA_HANN,
244 SCALE_HAASNSOFT,
245 SCALE_CATMULL_ROM,
246 SCALE_ROBIDOUX,
247 SCALE_ROBIDOUXSHARP,
248 SCALE_EWA_ROBIDOUX,
249 SCALE_EWA_ROBIDOUXSHARP,
250 SCALE_SINC,
251 SCALE_EWA_JINC,
252 SCALE_CUSTOM,
255 static const int scale_values[] = {
256 SCALE_BUILTIN,
257 SCALE_SPLINE16,
258 SCALE_SPLINE36,
259 SCALE_SPLINE64,
260 SCALE_MITCHELL,
261 SCALE_BICUBIC,
262 SCALE_EWA_LANCZOS,
263 SCALE_NEAREST,
264 SCALE_BILINEAR,
265 SCALE_GAUSSIAN,
266 SCALE_LANCZOS,
267 SCALE_GINSENG,
268 SCALE_EWA_GINSENG,
269 SCALE_EWA_HANN,
270 SCALE_HAASNSOFT,
271 SCALE_CATMULL_ROM,
272 SCALE_ROBIDOUX,
273 SCALE_ROBIDOUXSHARP,
274 SCALE_EWA_ROBIDOUX,
275 SCALE_EWA_ROBIDOUXSHARP,
276 SCALE_SINC,
277 SCALE_EWA_JINC,
278 SCALE_CUSTOM,
281 static const char * const scale_text[] = {
282 "Built-in / fixed function (fast)",
283 "Spline 2 taps",
284 "Spline 3 taps (recommended upscaler)",
285 "Spline 4 taps",
286 "Mitchell-Netravali (recommended downscaler)",
287 "Bicubic",
288 "Jinc / EWA Lanczos 3 taps (high quality, slow)",
289 "Nearest neighbor",
290 "Bilinear",
291 "Gaussian",
292 "Lanczos 3 taps",
293 "Ginseng 3 taps",
294 "EWA Ginseng",
295 "EWA Hann",
296 "HaasnSoft (blurred EWA Hann)",
297 "Catmull-Rom",
298 "Robidoux",
299 "RobidouxSharp",
300 "EWA Robidoux",
301 "EWA RobidouxSharp",
302 "Unwindowed sinc (clipped)",
303 "Unwindowed EWA Jinc (clipped)",
304 "Custom (see below)",
307 static const struct pl_filter_config *const scale_config[] = {
308 [SCALE_BUILTIN] = NULL,
309 [SCALE_SPLINE16] = &pl_filter_spline16,
310 [SCALE_SPLINE36] = &pl_filter_spline36,
311 [SCALE_SPLINE64] = &pl_filter_spline64,
312 [SCALE_NEAREST] = &pl_filter_box,
313 [SCALE_BILINEAR] = &pl_filter_triangle,
314 [SCALE_GAUSSIAN] = &pl_filter_gaussian,
315 [SCALE_SINC] = &pl_filter_sinc,
316 [SCALE_LANCZOS] = &pl_filter_lanczos,
317 [SCALE_GINSENG] = &pl_filter_ginseng,
318 [SCALE_EWA_JINC] = &pl_filter_ewa_jinc,
319 [SCALE_EWA_LANCZOS] = &pl_filter_ewa_lanczos,
320 [SCALE_EWA_GINSENG] = &pl_filter_ewa_ginseng,
321 [SCALE_EWA_HANN] = &pl_filter_ewa_hann,
322 [SCALE_HAASNSOFT] = &pl_filter_haasnsoft,
323 [SCALE_BICUBIC] = &pl_filter_bicubic,
324 [SCALE_CATMULL_ROM] = &pl_filter_catmull_rom,
325 [SCALE_MITCHELL] = &pl_filter_mitchell,
326 [SCALE_ROBIDOUX] = &pl_filter_robidoux,
327 [SCALE_ROBIDOUXSHARP] = &pl_filter_robidouxsharp,
328 [SCALE_EWA_ROBIDOUX] = &pl_filter_robidoux,
329 [SCALE_EWA_ROBIDOUXSHARP] = &pl_filter_robidouxsharp,
330 [SCALE_CUSTOM] = NULL,
333 #define UPSCALER_PRESET_TEXT "Upscaler preset"
334 #define DOWNSCALER_PRESET_TEXT "Downscaler preset"
335 #define SCALER_PRESET_LONGTEXT "Choose from one of the built-in scaler presets. If set to custom, you can choose your own combination of kernel/window functions."
337 #define LUT_ENTRIES_TEXT "Scaler LUT size"
338 #define LUT_ENTRIES_LONGTEXT "Size of the LUT texture used for up/downscalers that require one. Reducing this may boost performance at the cost of quality."
340 #define ANTIRING_TEXT "Anti-ringing strength"
341 #define ANTIRING_LONGTEXT "Enables anti-ringing for non-polar filters. A value of 1.0 completely removes ringing, a value of 0.0 is a no-op."
343 enum {
344 FILTER_NONE = 0,
345 FILTER_BOX,
346 FILTER_TRIANGLE,
347 FILTER_HANN,
348 FILTER_HAMMING,
349 FILTER_WELCH,
350 FILTER_KAISER,
351 FILTER_BLACKMAN,
352 FILTER_GAUSSIAN,
353 FILTER_SINC,
354 FILTER_JINC,
355 FILTER_SPHINX,
356 FILTER_BCSPLINE,
357 FILTER_CATMULL_ROM,
358 FILTER_MITCHELL,
359 FILTER_ROBIDOUX,
360 FILTER_ROBIDOUXSHARP,
361 FILTER_BICUBIC,
362 FILTER_SPLINE16,
363 FILTER_SPLINE36,
364 FILTER_SPLINE64,
367 static const int filter_values[] = {
368 FILTER_NONE,
369 FILTER_BOX,
370 FILTER_TRIANGLE,
371 FILTER_HANN,
372 FILTER_HAMMING,
373 FILTER_WELCH,
374 FILTER_KAISER,
375 FILTER_BLACKMAN,
376 FILTER_GAUSSIAN,
377 FILTER_SINC,
378 FILTER_JINC,
379 FILTER_SPHINX,
380 FILTER_BCSPLINE,
381 FILTER_CATMULL_ROM,
382 FILTER_MITCHELL,
383 FILTER_ROBIDOUX,
384 FILTER_ROBIDOUXSHARP,
385 FILTER_BICUBIC,
386 FILTER_SPLINE16,
387 FILTER_SPLINE36,
388 FILTER_SPLINE64,
391 static const char * const filter_text[] = {
392 "None",
393 "Box / Nearest",
394 "Triangle / Linear",
395 "Hann",
396 "Hamming",
397 "Welch",
398 "Kaiser",
399 "Blackman",
400 "Gaussian",
401 "Sinc",
402 "Jinc",
403 "Sphinx",
404 "BC spline",
405 "Catmull-Rom",
406 "Mitchell-Netravali",
407 "Robidoux",
408 "RobidouxSharp",
409 "Bicubic",
410 "Spline16",
411 "Spline36",
412 "Spline64",
415 static const struct pl_filter_function *const filter_fun[] = {
416 [FILTER_NONE] = NULL,
417 [FILTER_BOX] = &pl_filter_function_box,
418 [FILTER_TRIANGLE] = &pl_filter_function_triangle,
419 [FILTER_HANN] = &pl_filter_function_hann,
420 [FILTER_HAMMING] = &pl_filter_function_hamming,
421 [FILTER_WELCH] = &pl_filter_function_welch,
422 [FILTER_KAISER] = &pl_filter_function_kaiser,
423 [FILTER_BLACKMAN] = &pl_filter_function_blackman,
424 [FILTER_GAUSSIAN] = &pl_filter_function_gaussian,
425 [FILTER_SINC] = &pl_filter_function_sinc,
426 [FILTER_JINC] = &pl_filter_function_jinc,
427 [FILTER_SPHINX] = &pl_filter_function_sphinx,
428 [FILTER_BCSPLINE] = &pl_filter_function_bcspline,
429 [FILTER_CATMULL_ROM] = &pl_filter_function_catmull_rom,
430 [FILTER_MITCHELL] = &pl_filter_function_mitchell,
431 [FILTER_ROBIDOUX] = &pl_filter_function_robidoux,
432 [FILTER_ROBIDOUXSHARP] = &pl_filter_function_robidouxsharp,
433 [FILTER_BICUBIC] = &pl_filter_function_bicubic,
434 [FILTER_SPLINE16] = &pl_filter_function_spline16,
435 [FILTER_SPLINE36] = &pl_filter_function_spline36,
436 [FILTER_SPLINE64] = &pl_filter_function_spline64,
439 #define KERNEL_TEXT "Kernel function"
440 #define KERNEL_LONGTEXT "Main function defining the filter kernel."
442 #define WINDOW_TEXT "Window function"
443 #define WINDOW_LONGTEXT "Window the kernel by an additional function. (Optional)"
445 #define CLAMP_TEXT "Clamping coefficient"
446 #define CLAMP_LONGTEXT "If 1.0, clamp the kernel to only allow non-negative coefficients. If 0.0, no clamping is performed. Values in between are linear."
448 #define BLUR_TEXT "Blur/Sharpen coefficient"
449 #define BLUR_LONGTEXT "If 1.0, no change is performed. Values below 1.0 sharpen/narrow the kernel, values above 1.0 blur/widen the kernel. Avoid setting too low values!"
451 #define TAPER_TEXT "Taper width"
452 #define TAPER_LONGTEXT "Taper the kernel - all inputs within the range [0, taper] will return 1.0, and the rest of the kernel is squished into (taper, radius]."
454 #define POLAR_TEXT "Use as EWA / Polar filter"
455 #define POLAR_LONGTEXT "EWA/Polar filters are much slower but higher quality. Not all functions are good candidates. It's recommended to use jinc as the kernel."
457 #define DEBAND_TEXT "Enable debanding"
458 #define DEBAND_LONGTEXT "Turns on the debanding step. This algorithm can be further tuned with the iterations and grain options."
460 #define DEBAND_ITER_TEXT "Debanding iterations"
461 #define DEBAND_ITER_LONGTEXT "The number of debanding steps to perform per sample. Each step reduces a bit more banding, but takes time to compute. Note that the strength of each step falls off very quickly, so high numbers (>4) are practically useless. A value of 0 is a no-op."
463 #define DEBAND_THRESH_TEXT "Gradient threshold"
464 #define DEBAND_THRESH_LONGTEXT "The debanding filter's cut-off threshold. Higher numbers increase the debanding strength dramatically, but progressively diminish image details."
466 #define DEBAND_RADIUS_TEXT "Search radius"
467 #define DEBAND_RADIUS_LONGTEXT "The debanding filter's initial radius. The radius increases linearly for each iteration. A higher radius will find more gradients, but a lower radius will smooth more aggressively."
469 #define DEBAND_GRAIN_TEXT "Grain strength"
470 #define DEBAND_GRAIN_LONGTEXT "Add some extra noise to the image. This significantly helps cover up remaining quantization artifacts. Higher numbers add more noise."
472 #define SIGMOID_TEXT "Use sigmoidization when upscaling"
473 #define SIGMOID_LONGTEXT "If true, sigmoidizes the signal before upscaling. This helps prevent ringing artifacts. Not always in effect, even if enabled."
475 #define SIGMOID_CENTER_TEXT "Sigmoid center"
476 #define SIGMOID_CENTER_LONGTEXT "The center (bias) of the sigmoid curve."
478 #define SIGMOID_SLOPE_TEXT "Sigmoid slope"
479 #define SIGMOID_SLOPE_LONGTEXT "The slope (steepness) of the sigmoid curve."
481 #define POLAR_CUTOFF_TEXT "Cut-off value for polar samplers"
482 #define POLAR_CUTOFF_LONGTEXT "As a micro-optimization, all samples with a weight below this value will be ignored. This reduces the need to perform unnecessary work that doesn't noticeably change the resulting image. Setting it to a value of 0.0 disables this optimization."
484 #define SKIP_AA_TEXT "Disable anti-aliasing when downscaling"
485 #define SKIP_AA_LONGTEXT "This will result in moiré artifacts and nasty, jagged pixels when downscaling, except for some very limited special cases (e.g. bilinear downsampling to exactly 0.5x). Significantly speeds up downscaling with high downscaling ratios."
487 #define OVERLAY_DIRECT_TEXT "Force GPU built-in sampling for overlay textures"
488 #define OVERLAY_DIRECT_LONGTEXT "Normally, the configured up/downscalers will be used when overlay textures (such as subtitles) need to be scaled up or down. Enabling this option overrides this behavior and forces overlay textures to go through the GPU's built-in sampling instead (typically bilinear)."
490 #define DISABLE_LINEAR_TEXT "Don't linearize before scaling"
491 #define DISABLE_LINEAR_LONGTEXT "Normally, the image is converted to linear light before scaling (under certain conditions). Enabling this option disables this behavior."
493 #define FORCE_GENERAL_TEXT "Force the use of general-purpose scalers"
494 #define FORCE_GENERAL_LONGTEXT "Normally, certain special scalers will be replaced by faster versions instead of going through the general scaler architecture. Enabling this option disables these optimizations."
496 #define DELAYED_PEAK_TEXT "Allow delaying peak detection by up to one frame"
497 #define DELAYED_PEAK_LONGTEXT "In some cases, peak detection may be more convenient to compute if the results are delayed by a frame. When this option is disabled, libplacebo will use an indirect buffer simply to force peak detection results to be up-to-date. Enabling it allows skipping this indirection in order to improve performance at the cost of some potentially noticeable brightness flickering immediately after a scene change."
499 #endif // VLC_PLACEBO_UTILS_H