Selur's Little Message Board
[BUG] VapourSynth Levels filter does not work for RGB24 image streams - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [BUG] VapourSynth Levels filter does not work for RGB24 image streams (/thread-1564.html)

Pages: 1 2


RE: VapourSynth Levels filter does not work for RGB24 image streams - Selur - 17.10.2020

I'm not totally sure atm. how to handle 32bit Tiff with Levels properly.

Load a single 32bit TIFF with vsImageReader and applying levels on it returns a black screen the way I assumed it would work.
I assumed that the color space should be RGBS with 32bit precision and thus analog to limiting to 16-235 I used min_in = 16 << (32-8), max_in=235 << (32-8), min_out= 16 << (32-8), max_out = 235 << (32-8).
That gave me a black preview and I'm not sure whether this is due to a limitation of the preview, if I did something wrong or if it's a limitation somewhere else.
So any help is welcome.
# Imports import vapoursynth as vs core = vs.get_core() # source: 'C:/Users/Selur/Desktop/images v2/TIFF 32-bit.tif' # current color space: RGBS, bit depth: 32, resolution: 640x480, fps: 25, color matrix: 709, yuv luminance scale: full, scanorder: progressive # Loading C:\Users\Selur\Desktop\images v2\TIFF 32-bit.tif using vsImageReader clip = core.imwri.Read(["C:/Users/Selur/Desktop/images v2/TIFF 32-bit.tif"]) clip = core.std.Loop(clip=clip, times=100) # Input color space is assumed to be RGBS # making sure frame rate is set to 25 clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1) # Setting color range to PC (full) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0) # Color Adjustment clip = core.std.Levels(clip=clip, min_in=268435456, max_in=18446744073357230080, min_out=268435456, max_out=18446744073357230080) # Output clip.set_output()
-> posted over at doom9s (https://forum.doom9.org/showpost.php?p=1925989) to see whether someone there knows how to do it properly.

Quote: Not sure why it detects JPEG as YUV444P8@8 and same time other image formats as RGB24@8. Maybe JPEG is somehow special...
Hybrid takes the color space from MediaInfo which reports:
Image Format : JPEG Width : 640 pixels Height : 480 pixels Color space : YUV Chroma subsampling : 4:4:4 Bit depth : 8 bits Compression mode : Lossy Stream size : 44.5 KiB (100%) ColorSpace_ICC : RGB
for your 'JPEG 8-bit HQ enabled.jpg' file.
and for the "PNG 8-bit":
Image Format : PNG Format/Info : Portable Network Graphic Format_Compression : Deflate Width : 640 pixels Height : 480 pixels Color space : RGB Bit depth : 8 bits

Cu Selur


RE: VapourSynth Levels filter does not work for RGB24 image streams - shijan - 17.10.2020

As i remember in Vapoursynth FAQ about a Levels it was a notice that they work very different in 32 bit depth http://www.vapoursynth.com/doc/functions/levels.html

In both PhotoLine and Photoshop image editors there is no option to export 32 bit PNG. So i guess it is something very uncommon.


RE: VapourSynth Levels filter does not work for RGB24 image streams - Selur - 17.10.2020

@The_Tinkerer: send you a link to a new dev version via PM for testing,..
Hoping that this properly handles 32bit images.

Cu Selur