Log in

View Full Version : What are the RGBH, RGBS format constants ?


poisondeathray
20th February 2017, 23:24
http://www.vapoursynth.com/doc/pythonreference.html

Under "format constants" , most of the naming convention makes sense, but what are the RGBH, RGBS ? and GRAYH, GRAHS ?

I guess what do the "H" and "S" stand for ?

jackoneill
20th February 2017, 23:43
H stands for half precision. Pixels are stored as 16 bit floating point numbers.

S stands for single precision. Pixels are stored as 32 bit floating point numbers.

https://en.wikipedia.org/wiki/IEEE_floating_point

poisondeathray
21st February 2017, 00:10
Thanks . That makes sense too

poisondeathray
21st February 2017, 01:14
Ok, sort of related, but is there a reliable way to load exr , either half or full float into vapoursynth yet ?

There are many exr variants, but the imagemagick plugin, lsmash, ffms2 all crash on the common ones

But djv_view and FFMpeg can successfully process them - So is it a compiling issue , just not including the libraries , or something else ?

Myrsloik
21st February 2017, 01:19
Ok, sort of related, but is there a reliable way to load exr , either half or full float into vapoursynth yet ?

There are many exr variants, but the imagemagick plugin, lsmash, ffms2 all crash on the common ones

But djv_view and FFMpeg can successfully process them - So is it a compiling issue , just not including the libraries , or something else ?

If ffnoeg can do then ffms2 should be able to do it as well. Open a ffms2 and post a sample file and I'll take a look.

poisondeathray
21st February 2017, 01:38
If ffnoeg can do then ffms2 should be able to do it as well. Open a ffms2 and post a sample file and I'll take a look.

This is a half float piz compression EXR
https://www.mediafire.com/?3426c7o3c7w5gfh

and for completeness here is a full float zip compression EXR
https://www.mediafire.com/?hkhq77v6m2c760c


djv can correctly identify them as F16 and F32 respectively , but ffmpeg reports both as rgb48le

djv is sort of the open source standard for viewing exr (but I thought it was based on the same libraries as ffmpeg), but ffmpeg recently could process them too now with -apply trc options for proper linear EXR handling

I should have been more precise with the description: imagemagick crashes, but ffms2 2.23.1 error message is "no video track found" , not a crash per se



import vapoursynth as vs
core = vs.get_core()
core.std.LoadPlugin(r'C:\Program Files (x86)\AviSynth\plugins\ffms2-2.23.1-msvc\x64\ffms2.dll')
clip = core.ffms2.Source(r'F:\test\half.piz.exr')
clip.set_output()



The ffms2 build here works fine for "normal" videos like youtube etc...

dipje
21st February 2017, 10:04
My piz exr files work fine with the image reader / image writer plugin (imwri). They are always 16bit full RGB though. I never tried 32bit (it's a bit of a weird extension to the exr format ) and I never tried chroma subsampling.

Somewhere along the line you will probably loose floating point and go to integer though, because imagemagick is most often 16bit at its output

poisondeathray
21st February 2017, 16:27
My piz exr files work fine with the image reader / image writer plugin (imwri). They are always 16bit full RGB though. I never tried 32bit (it's a bit of a weird extension to the exr format ) and I never tried chroma subsampling.

Somewhere along the line you will probably loose floating point and go to integer though, because imagemagick is most often 16bit at its output


Which imagemagick version / plugin and OS are you using ?

I'm using jackoneil's with the wildcard support. I see exr crashing was already reported by sneaker in that thread. It works fine with other formats like 16bit PNG, TIFF etc..

That IM plugin opens up 16bit PNG as RGBS too (that's actually what prompted me to start this thread - I would have expected RGB48)

There are dozens if not hundreds of different variants and combinations with multichannel, multilayer, views, compression schemes. Full float piz(32 scanline) or zip16(16 scanline) would be the most common, followed by half float piz(32 scanline) or zip16(16 scanline) . I obviously didn't test them all, just a few common ones. Those samples were just 1 layer - I don't expect this type of plugin to be able to parse a multichannel/multilayer exr, but I couldn't open any of them. All the common variants are supported by djv and ffmpeg