<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 9:31 AM, Roozbeh Fazl <span dir="ltr"><<a href="mailto:roozyfx@gmail.com" target="_blank">roozyfx@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:0in"></p><p style="margin-bottom:0in">I want to use HEVC to compress a set of
openEXR files I have. OpenEXR is a high dynamic range (HDR) image
file format. These files are 32bit, 30 channels, i.e. an image has 30
different spectral(color) channels and a pixel in each channel is
stored by 32bits.</p>
<p style="margin-bottom:0in">I want to consider these images as frames in a
'video' and then encode this video using HEVC, to
benefit from high compression ratio. Next I want to have random
access to this openEXR-HEVC-coded “video”, so that I can quickly
and easily read any pixel of any image in my original dataset.<br>Obviously
 pixels' bit depth and
color-space of my images are different from what is supported by HEVC
by default, and I know HEVC is designed for something else. Still, do 
you guys think this is possible or say there's a theoretical barrier or 
sth like that to it? <br></p><p style="margin-bottom:0in">I'm in 
computer graphics and don't have an in depth knowledge of video coding, 
so I cannot see beforehand if there is a theoretical barrier
to what I want to do or not. <br></p><p style="margin-bottom:0in">Preferably
I want to do this as simple as possible: add support for reading my
input format and some tweaks and change of values here and there, and
tearing x265 implementation inside-out and rewrite everything from scratch.</p></div>
</blockquote></div><div class="gmail_extra"><br></div>Hello Roozbeh,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm not entirely sure how to respond, but in general I can say that HEVC is pretty closely related to H.264 in the way it deals with pixels.  The spec only supports pixel samples of 8, 10 (and 12 once the Range Extension work is finalized).  There's no support for anything close to 32bits, and even with the ongoing REXT work they are only adding 4:4:4 and 4:2:2, the same as H.264.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">So to encode your video with HEVC the input pixels must be down-sampled to 3-channel 10/12bit 4:4:4.  x265's support for 4:4:4 is not quite yet in the public tree but will be soon.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Modifying the encoder to deal directly with the 32bit 30 channel raw pixels would be counter-productive for the most part, since they must be coded as 10/12bits.<br>
<div><br></div>-- <br>Steve Borho
</div></div>