-
Notifications
You must be signed in to change notification settings - Fork 479
How is a 128-bit floating point image stored? #287
Description
I'm using DirectXTex to load a HDR image all right, I get a DXGI_FORMAT_R32G32B32A32_FLOAT which loads fine into my Direct2D HDR context (GUID_WICPixelFormat128bppPRGBAFloat).
My question is how to interpret these values in order to scale them in order to pass them to the H.265 Nvidia 10- bit HDR encoder :
struct RGBX
{
unsigned int b : 10;
unsigned int g : 10;
unsigned int r : 10;
int a : 2;
} rgbx;
I 've asked also here: https://learn.microsoft.com/en-us/answers/questions/1059131/how-is-guid-wicpixelformat128bppprgbafloat-stored.html#comment-1059908.
Multiplying by 1024 doesn't work because the floats are not in the range of [0,1]. By testing various HDR images I saw that the float range is not specified.
I suspect that the mapping isn't linear because there's no multiplication I 've tried that creates any sort of correct image in the encoder.
Good job, btw.