[FFmpeg-devel] [PATCH] lavu/pixfmt: add packed RGBA float16 format
Thomas Volkert
silvo at gmx.net
Mon Aug 8 01:32:44 EEST 2022
Am 08.08.2022 um 00:26 schrieb Timo Rothenpieler:
> On 08.08.2022 00:25, Thomas Volkert wrote:
>> Hi Timo,
>>
>>
>> Am 07.08.2022 um 22:14 schrieb Timo Rothenpieler:
>>> This is the default format of the Windows compositor and what DXGI
>>> Desktop Duplication will give you for any kind of HDR output.
>>> ---
>>> libavutil/pixdesc.c | 28 ++++++++++++++++++++++++++++
>>> libavutil/pixfmt.h | 5 +++++
>>> libavutil/version.h | 4 ++--
>>> tests/ref/fate/imgutils | 2 ++
>>> tests/ref/fate/sws-pixdesc-query | 13 +++++++++++++
>>> 5 files changed, 50 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
>>> index e078fd5320..f7558ff8b9 100644
>>> --- a/libavutil/pixdesc.c
>>> +++ b/libavutil/pixdesc.c
>>> @@ -2504,6 +2504,34 @@ static const AVPixFmtDescriptor
>>> av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
>>> },
>>> .flags = AV_PIX_FMT_FLAG_ALPHA,
>>> },
>>> + [AV_PIX_FMT_RGBAF16BE] = {
>>> + .name = "rgbaf16be",
>>> + .nb_components = 4,
>>> + .log2_chroma_w = 0,
>>> + .log2_chroma_h = 0,
>>> + .comp = {
>>> + { 0, 8, 0, 0, 16 }, /* R */
>>> + { 0, 8, 2, 0, 16 }, /* G */
>>> + { 0, 8, 4, 0, 16 }, /* B */
>>> + { 0, 8, 6, 0, 16 }, /* A */
>>> + },
>>> + .flags = AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_RGB |
>>> + AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_FLOAT,
>>> + },
>>> + [AV_PIX_FMT_RGBAF16LE] = {
>>> + .name = "rgbaf16le",
>>> + .nb_components = 4,
>>> + .log2_chroma_w = 0,
>>> + .log2_chroma_h = 0,
>>> + .comp = {
>>> + { 0, 8, 0, 0, 16 }, /* R */
>>> + { 0, 8, 2, 0, 16 }, /* G */
>>> + { 0, 8, 4, 0, 16 }, /* B */
>>> + { 0, 8, 6, 0, 16 }, /* A */
>>> + },
>>> + .flags = AV_PIX_FMT_FLAG_RGB | AV_PIX_FMT_FLAG_ALPHA |
>>> + AV_PIX_FMT_FLAG_FLOAT,
>>> + },
>>> };
>>
>> [..]
>>
>>
>> maybe I have missed something, but I wonder how this is different to
>> AV_PIX_FMT_RGBA64LE and AV_PIX_FMT_RGBA64BE?
>>
>> BR, Thomas.
>
> It's Float.
Yep, it seems that I have completely ignored this part when I read this
the first time. My bad.
BR.
More information about the ffmpeg-devel
mailing list