Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Lynne <dev@lynne.ee>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [RFC] FFV1 float support
Date: Thu, 6 Mar 2025 03:14:49 +0100
Message-ID: <a8ae9ffa-5ca2-45f9-b33d-f7eebaa7de96@lynne.ee> (raw)
In-Reply-To: <20250306001552.GV4991@pb2>


[-- Attachment #1.1.1.1: Type: text/plain, Size: 1903 bytes --]

On 06/03/2025 01:15, Michael Niedermayer wrote:
> Hi everyone
> 
> Current FFv1 code with my patchset supports 16bit floats. The implementation
> is quite simple. Which is good
> 
> I have tried improving compression, the gains are incremental, but its not
> large overall. For example 44% space gain on the remapping table is just
> 0.1% overall.
> 
> I have few float samples. Its mainly one high quality slideshow of unrelated
> 16bit float images. These excercise a wide range fo things including negative
> color values.
> I think I have only one single (non slideshow) video of float 16 samples,
> 
> It turns out the most efficient way to store floats that i found, is to remap
> them to integers. Not to store tham as sign, exponent, mantisse, i tried that
> for many hours.
> 
> Storing them using a remapping, has a very nice side effect though, and that is
> it will be easy to add 32bit and 64bit float support (once there is some
> sample data)
> Because a image of 64bit floats, after its split into slices of up to 256x256
> can always be mapped into 16bit integers within each slice.

*how*? Unlike ints, you cannot simply shift and extract bits from floats 
and treat them as floats.

> What about the mapping itself, it uses a rather simple rle coder. ive spend
> most of the day today tuning that and failing to really beat that.
> Using context from the previous image didnt work with the slideshow material
> i have nor that one video i have. I tried using sign and exponent as context,
> tried previous run, relations of runs, low bits and many more, but no or
> insignificant improvments of yesterdays implementation was achieved.

I did mention this once before, but you should look into the Daala/Opus 
way of storing rawbits into a separate chunk at the end of the 
bitstream. It avoids polluting the range context with equiprobable bits.

[-- Attachment #1.1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 637 bytes --]

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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:[~2025-03-06  2:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  0:15 Michael Niedermayer
2025-03-06  2:14 ` Lynne [this message]
2025-03-06 16:37   ` Michael Niedermayer
2025-03-06 18:17     ` Leo Izen
2025-03-06 21:25       ` Jerome Martinez
2025-03-06 21:20     ` Jerome Martinez

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=a8ae9ffa-5ca2-45f9-b33d-f7eebaa7de96@lynne.ee \
    --to=dev@lynne.ee \
    --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