Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Timo Rothenpieler <timo@rothenpieler.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] swscale/input: add rgbaf16 input support
Date: Tue, 9 Aug 2022 00:59:11 +0200
Message-ID: <659c3391-e8af-e83d-9d6b-ce9b3df0bdc9@rothenpieler.org> (raw)
In-Reply-To: <2dac775f-5076-14c2-8afd-a50bbef5531f@rothenpieler.org>

On 09.08.2022 00:37, Timo Rothenpieler wrote:
> The entire support for the format is removed from swscale in this case, 
> so the function ending up empty doesn't matter.
> 
> I'll see if it can be added to half2float, but I can't even tell if it 
> implements ieee floats, or something else.

Did a very straight forward implementation with unions:

> static uint32_t half2float(uint16_t h, const uint32_t *mantissatable, const uint32_t *exponenttable,
>                            const uint16_t *offsettable)
> {
> #if HAVE_FLOAT16
>     union {
>         uint16_t i;
>         _Float16 f;
>     } u16;
>     union {
>         uint32_t i;
>         float f;
>     } u32;
>     u16.i = h;
>     u32.f = u16.f;
>     return u32.i;
> #else
>     uint32_t f;
> 
>     f = mantissatable[offsettable[h >> 10] + (h & 0x3ff)] + exponenttable[h >> 10];
> 
>     return f;
> #endif
> }

Unfortunately, this makes all exr fate tests fail with differing output 
checksums.
At least the checksums match between f16c SIMD version and fallback sse2 
implementation.
_______________________________________________
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".

      reply	other threads:[~2022-08-08 22: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
2022-08-08 22:07     ` Mark Reid
2022-08-08 22:37       ` Timo Rothenpieler
2022-08-08 22:59         ` Timo Rothenpieler [this message]

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=659c3391-e8af-e83d-9d6b-ce9b3df0bdc9@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