Skip to content

How is a 128-bit floating point image stored? #287

@WindowsNT

Description

@WindowsNT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions