I got 2 hdr rgb textures/signals. When fetched one gets bicubicly interpolated and the other bilinearly. So I was thinking I can store as YUV and store Y from each texture in the bicubic one and the distribution of the rest of the channels are not as important.

Well another restriction is that the hdr output only accept pos float values.

So what I'm wondering are there some other colour space transform similar to standard YUV but which range is positive only?



1 Answer 1


Why don't you use YUV with a shift?

To make my example simpler, let's use the Color Space YCoCg.
So the channels Co, Cg are in the range [-0.5, 0.5].

When you encode them, make sure you encode Co', Cg' where Co' = Co + 0.5 and Cg' = cG + 0.5.

  • $\begingroup$ I could do that. However the original input is hdr, i.e. unbound and goes above 1. So in that case I would need to come up with some max offset and saturate in case U or V goes negative. I was mainly looking for if there's a more elegant solution, preferably without arbitrary limits :) $\endgroup$ Commented Mar 24, 2019 at 9:47
  • $\begingroup$ Do you have the Sensor Data? As even in HDR sensor the data is in some data class (UINT32) hence you can easily infer the maximum required offset. $\endgroup$
    – Royi
    Commented Mar 24, 2019 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.