problems with high bit depths and writers

25 views
Skip to first unread message

Esteban Tovagliari

unread,
Apr 8, 2016, 6:27:51 AM4/8/16
to tuttleofx-dev
Hi,

I'm trying to use tuttleofx (latest linux binary release, 0.12.7 from github) to generate proxies from exr and dpx sequences.
I'm getting artifacts when the result image gets written (see attached pic)

here's my command:

sam do reader ~/Pictures/openexr-images-master/ScanLines/MtTamWest.exr // resize width=512 // tuttle.ocio.colorspace output\ space="sRGB" // writer out.png

How can I fix it?

Est.

out.png

Clément Champetier

unread,
Apr 12, 2016, 4:59:26 AM4/12/16
to tuttle...@googlegroups.com
Hello Esteban,

I cannot reproduce your issue. Can you give us one of your asset which is not working?

Did you try to use tuttle.bitdepth plugin ? Something like:
sam do reader ~/Pictures/openexr-images-master/ScanLines/MtTamWest.exr // tuttle.bitdepth outputBitDepth=byte // resize width=512 // tuttle.ocio.colorspace output\ space="sRGB" // writer out.png

Regards,
Clement



Clément Champetier
R&D Software Engineer

1255

Mikros Image /
Digital Post-Production for Video and Film 
 
www.mikrosimage.eu

--

---
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes "tuttleofx-dev".
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse tuttleofx-de...@googlegroups.com.
Pour obtenir davantage d'options, consultez la page https://groups.google.com/d/optout.

Esteban Tovagliari

unread,
Apr 15, 2016, 9:36:53 AM4/15/16
to tuttleofx-dev

Hi,

I cannot reproduce your issue. Can you give us one of your asset which is not working?

You can get the sample Exr images: https://github.com/openexr/openexr-images.git
You can test with any with pixel values higher than 1.

Did you try to use tuttle.bitdepth plugin ? Something like:
sam do reader ~/Pictures/openexr-images-master/ScanLines/MtTamWest.exr // tuttle.bitdepth outputBitDepth=byte // resize width=512 // tuttle.ocio.colorspace output\ space="sRGB" // writer out.png

I think that the problem is in GIL. GIL assumes float channels are in the [0, 1] range.
gil::channel_convert when converting from floats to integers does not do any clamping:

    gil::bits32f c = 1.5f;
    uint8_t x = gil::channel_convert<uint8_t>(c);   // <--- overflow!
    std::cout << "x = " << (int) x << std::endl;         // <--- x is 127 here, not 255!!

I had a quick look at the BitDepth plugin and it seems that it's using gil::copy_and_convert_pixels and has probably the same issue.

I found that if I use the OpenImageIO io plugin instead to output images, it works.
It does not with for example the png writer plugin.

Trying to look around these problem, I didn't find any plugin that would clamp pixel values.
Maybe that's an interesting idea for a new one?

Thanks!

Est.

Clément Champetier

unread,
Apr 15, 2016, 11:52:41 AM4/15/16
to tuttleofx-dev
I think you are right...

Actually I remember now that we've found a similar issue few weeks ago, with the last release (v0.12.7).
Some GIL functions have been overload here. But since several releases, these headers are not used at compile time.
This commit fixed it, but it is on develop branch.

I am going to release v0.13.0 next week. I think your issue will be fixed with these new binaries.

Did you try to write PNG from your EXR from the develop branch?

Clément Champetier

unread,
Apr 26, 2016, 4:56:56 AM4/26/16
to tuttleofx-dev
Hi Esteban,

Can you try and confirm that your process is working with the new tuttle release v0.13.0?
Thanks you for your feedback ;)

Regards,
Clement

Esteban Tovagliari

unread,
May 3, 2016, 11:01:53 AM5/3/16
to tuttleofx-dev
Hi Clement,

Sorry for the delay, I have been quite busy lately.

I tested the package. Some boost libs are missing (thread and regex).
After copying my own inside the package, I could repeat my test.
It seems to be fixed.

Thanks!

Est.

Reply all
Reply to author
Forward
0 new messages