Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 20th September 2025, 15:09   #1  |  Link
Alexkral
Registered User
 
Join Date: Oct 2018
Posts: 152
Some questions about vs-placebo

Hi, I have some questions regarding the use of vs.placebo:

- placebo.Shader "Takes a YUVxxxP16 clip as input and outputs YUV444P16". This implies two YUV<->RGB conversions, but only one matrix can be specified. Does this mean that the same matrix is ​​used for both conversions? This seems like a problem if you want to use it with a gamut mapping shader.

- I don't understand how to use the "dynamic_peak_detection" feature. I would actually like to use it with placebo.Shader if possible (maybe passing PLSceneMax as a parameter?), but understanding how to use it in placebo.Tonemap would be a good starting point.

- Also, regarding this, I see that PLSceneMax is in nits, but max_pq_y is in PQ light.
__________________
AviSynth AiUpscale
Alexkral is offline   Reply With Quote
Old 21st September 2025, 04:31   #2  |  Link
Alexkral
Registered User
 
Join Date: Oct 2018
Posts: 152
As for my first question: Yes, the same matrix is ​​used to convert internally to RGB and then to convert the output to YUV444P16. So, for example, to use a shader that converts from BT.2020 to BT.709, you'd set matrix = 4, set the props of the primaries of the output to BT709, and add something like this:

clip = core.resize.Bicubic(clip, format = vs.YUV420P8, matrix_s = "709")

As for my other questions, I can't think of any simple way to test this, but I'd actually be surprised if it even worked with placebo.Tonemap.
__________________
AviSynth AiUpscale
Alexkral is offline   Reply With Quote
Old 22nd September 2025, 21:05   #3  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 242
https://ffmpeg.org/ffmpeg-filters.html#Output-mode

Quote:
colorspace
Configure the colorspace that output frames will be delivered in. The default value of auto outputs frames in the same format as the input frames, leading to no change. For any other value, conversion will be performed.
https://ffmpeg.org/ffmpeg-filters.html#Peak-detection

Quote:
peak_detect
Enable HDR peak detection. Ignores static MaxCLL/MaxFALL values in favor of dynamic detection from the input. Note that the detected values do not get written back to the output frames, they merely guide the internal tone mapping process. Enabled by default.
takla is offline   Reply With Quote
Old 23rd September 2025, 06:19   #4  |  Link
Alexkral
Registered User
 
Join Date: Oct 2018
Posts: 152
Yes, the color space issue is specific to the placebo.Shader implementation, and for tone mapping it seems the only difference is that with FFmpeg you only need to enable peak_detect.

Anyway, I want to use a custom shader for tone mapping and gamut mapping, so I added a compute shader for peak detection, and it doesn't seem to significantly impact performance.
__________________
AviSynth AiUpscale
Alexkral is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:32.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.