huffyuv: change statistics initialization
authorChristophe Gisquet <christophe.gisquet@gmail.com>
Wed, 11 Jun 2014 20:15:12 +0000 (22:15 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 19 Jun 2014 04:03:51 +0000 (06:03 +0200)
commite7fc5d53a02c07e75a2254839a452e1cbf830d3a
tree0ac6209a91af615223e59fb2b8b49dc87e602ea0
parent042a82ca374b491903036872ebd487c5ceb17a63
huffyuv: change statistics initialization

Normally, a Laplace distribution is more typical of the residuals
encoded, but for noisy input, it's both better and simpler to be
safe and use a 1/d^2 distribution. Second hunk could use some
renormalization but it has effectively little impact.

Output size of ffvhuff on various 4:2:0 sequences:
context=0,1/d:    851974   27226   1137281
context=0,1/d²:   619081   25069   1051500
context=0,1/d³:   501983   30454   1290561
context=0,lapl:   500650   31754   1304082

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
23 files changed:
libavcodec/huffyuvenc.c
tests/ref/seek/vsynth2-huffyuv
tests/ref/vsynth/vsynth1-ffvhuff
tests/ref/vsynth/vsynth1-ffvhuff420p12
tests/ref/vsynth/vsynth1-ffvhuff422p10left
tests/ref/vsynth/vsynth1-ffvhuff444
tests/ref/vsynth/vsynth1-ffvhuff444p16
tests/ref/vsynth/vsynth1-huffyuv
tests/ref/vsynth/vsynth1-huffyuvbgr24
tests/ref/vsynth/vsynth2-ffvhuff
tests/ref/vsynth/vsynth2-ffvhuff420p12
tests/ref/vsynth/vsynth2-ffvhuff422p10left
tests/ref/vsynth/vsynth2-ffvhuff444
tests/ref/vsynth/vsynth2-ffvhuff444p16
tests/ref/vsynth/vsynth2-huffyuv
tests/ref/vsynth/vsynth2-huffyuvbgr24
tests/ref/vsynth/vsynth3-ffvhuff
tests/ref/vsynth/vsynth3-ffvhuff420p12
tests/ref/vsynth/vsynth3-ffvhuff422p10left
tests/ref/vsynth/vsynth3-ffvhuff444
tests/ref/vsynth/vsynth3-ffvhuff444p16
tests/ref/vsynth/vsynth3-huffyuv
tests/ref/vsynth/vsynth3-huffyuvbgr24