[FFmpeg-devel] [RFC] [PATCH] huffyuvenc, multithread and context=1

Christophe Gisquet christophe.gisquet at gmail.com
Wed Jun 11 22:33:07 CEST 2014

>> The last result, for a Laplace distribution (0,0.8), shows how
>> important adaption needs to be. On the other hand, using a probability
>> of 1/d² seems to perform better than the default one.
> maybe we should chnage the default ...

Here's a patch to use the 1/d^2 distribution. For noiseless, rather
smooth content, a Laplace distribution may be better, and could be
selected with the proper context value. But at this point, it seems
more fruitful to allow multithreading with context=1.

> maybe some combination of:
> or an entirely new -context mode

Regarding -context, that would work for huffyuv, but you'd need
another value for another codec. Remembering which value is valid for
which codec is kind of difficult and having an explicit parameter
sounds better.

CODEC_FLAG2_FAST seems another interesting approach, but I would had
CODEC_FLAG2_NON_DETERMINISTIC instead. What about it? Does it require
an API bump? Value of 2 seems unused, would that be ok?

But one way or another, it kind of remains an obscure option, not
overly user-friendly, but we can't help it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-huffyuv-change-statistics-initialization.patch
Type: text/x-patch
Size: 1729 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140611/d000adc7/attachment.bin>

More information about the ffmpeg-devel mailing list