[FFmpeg-devel] FFV1 slicecrc: "hashxx" instead of "CRC" for speed?

Leo Izen leo.izen at gmail.com
Thu Nov 3 15:01:32 EET 2022


On 10/26/22 15:13, Michael Niedermayer wrote:
> 
> 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

I'm a bit confused here, aren't there only 255 one-byte changes in the 
first place? The 256th is when the byte remains unchanged.

That aside I don't believe xxhash is designed to be an error-correcting 
hash, but rather one that's used for fast database lookup.

- Leo Izen (thebombzen)


More information about the ffmpeg-devel mailing list