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

Michael Niedermayer michaelni at gmx.at
Thu Jun 12 00:18:53 CEST 2014


On Wed, Jun 11, 2014 at 10:33:07PM +0200, Christophe Gisquet wrote:
> Hi,
> >> 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.

trying fate it seems to worsen all compression rates

-10267454 tests/data/fate/vsynth1-ffvhuff420p12.avi
+14205352 tests/data/fate/vsynth1-ffvhuff420p12.avi

-10967556 tests/data/fate/vsynth1-ffvhuff444.avi
+11712338 tests/data/fate/vsynth1-ffvhuff444.avi

-10552692 tests/data/fate/vsynth1-ffvhuff422p10left.avi
+13860680 tests/data/fate/vsynth1-ffvhuff422p10left.avi

-20610414 tests/data/fate/vsynth1-ffvhuff444p16.avi
+24706272 tests/data/fate/vsynth1-ffvhuff444p16.avi


> 
> > maybe some combination of:
> > CODEC_FLAG2_FAST and CODEC_FLAG_BITEXACT could be used
> > 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?

i think adding a codec private option like
-non_deterministic 1
is safer than using the flags in terms of compatibility
it also would produce an error if the option is used with a encoder
which doesnt support it

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140612/0265060c/attachment.asc>


More information about the ffmpeg-devel mailing list