From: Timo Rothenpieler <timo@rothenpieler.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] swscale/input: add rgbaf16 input support
Date: Mon, 8 Aug 2022 22:59:22 +0200
Message-ID: <7a75c699-5050-534f-d7e9-127207b66d59@rothenpieler.org> (raw)
In-Reply-To: <CA+anCRmwy6C-SS+ynM593y8nMgditqRd61J6XEHa86m8fqhaYg@mail.gmail.com>
On 08.08.2022 21:39, Mark Reid wrote:
> On Mon, Aug 8, 2022 at 11:24 AM Timo Rothenpieler <timo@rothenpieler.org>
> wrote:
>
>> This is by no means perfect, since at least ddagrab will return scRGB
>> data with values outside of 0.0f to 1.0f for HDR values.
>> Its primary purpose is to be able to work with the format at all.
>>
>> _Float16 support was available on arm/aarch64 for a while, and with gcc
>> 12 was enabled on x86 as long as SSE2 is supported.
>>
>> If the target arch supports f16c, gcc emits fairly efficient assembly,
>> taking advantage of it. This is the case on x86-64-v3 or higher.
>> Without f16c, it emulates it in software using sse2 instructions.
>> ---
>>
>> I am by no means certain this is the correct way to implement this.
>> Tested it with ddagrab output in that format, and it looks like what I'd
>> expect.
>>
>> Specially the order of arguments is a bit of a mystery. I'd have
>> expected them to be in order of the planes, so for packed formats, only
>> the first one would matter.
>> But a bunch of other packed formats left the first src unused, and so I
>> followed along, and it ended up working fine.
>>
>>
> Have you looked at the exr decoder half2float.h? It already has f16 to f32
> decoding functions.
>
For performance, using the compilers native, and potentially hardware
accelerated, support is probably preferable.
Though as a no-float16-fallback it's probably not too horrible.
Just not sure if it's worth the extra effort, given that by the time
this sees any use at all, gcc 12 will be very common.
Might even think about _Float16 support for exr in that case.
Would be an interesting benchmark.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-08-08 20:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-08 18:23 Timo Rothenpieler
2022-08-08 19:39 ` Mark Reid
2022-08-08 20:59 ` Timo Rothenpieler [this message]
2022-08-08 22:07 ` Mark Reid
2022-08-08 22:37 ` Timo Rothenpieler
2022-08-08 22:59 ` Timo Rothenpieler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7a75c699-5050-534f-d7e9-127207b66d59@rothenpieler.org \
--to=timo@rothenpieler.org \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git