Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] FFV1 slicecrc: "hashxx" instead of "CRC" for speed?
Date: Wed, 26 Oct 2022 21:13:02 +0200
Message-ID: <20221026191302.GG4048598@pb2> (raw)
In-Reply-To: <2b7f9605-518a-4cda-6503-7842f22fa620@das-werkstatt.com>


[-- Attachment #1.1: Type: text/plain, Size: 1378 bytes --]

On Tue, Oct 25, 2022 at 10:31:48PM +0200, Peter B. wrote:
> Hi everyone :)
> 
> This is merely a question of interest. Not a request, complaint or trolling
> of any kind :)
> I'm happy about any answer. I'm curious.
> 
> Would it possibly have a significant impact on coding speed of FFV1's
> slicecrc option (Where a CRC is calculated for each frame slice), to use a
> faster algorithm instead (if one exists)?
> I'm wondering if, for example something like "xxHash" may warrant a try?
> (Haven't found CRC vs xxHash benchmarks yet, but I'm still looking)

CRC is not a random pick for error detection, CRC has specfic properties
like for example that whole classes of errors are guranteed to be detected
a random hash will not gurantee that.
for example a properly designed 8bit CRC will detect every single 1 byte change
always. a 8 bit hash like taking 8 bits from SHA256 will detect only 255 out of
256 1 byte changes

also CRC can be done in parallel if you have cores to spare, you can split a
chunk in as many chunks as you want do the CRC for each and combine them with a
bit of math

and CRC is in the specification so using somehing else would require
changing the spec 

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 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".

  parent reply	other threads:[~2022-10-26 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 20:31 Peter B.
2022-10-25 20:37 ` Andreas Rheinhardt
2022-10-26  7:25 ` Kieran Kunhya
2022-10-26  7:58   ` Paul B Mahol
2022-10-26 19:13 ` Michael Niedermayer [this message]
2022-11-03 13:01   ` Leo Izen
2022-11-03 13:19     ` Nicolas George
2022-11-03 15:07       ` Leo Izen
2022-11-08  8:17   ` Peter B.

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=20221026191302.GG4048598@pb2 \
    --to=michael@niedermayer.cc \
    --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