[Ffmpeg-devel] Bug in snow revision 1.50 - broken lossless mode

Yartrebo yartrebo
Thu Apr 14 02:05:20 CEST 2005

On Wed, 2005-04-13 at 20:52 +0200, Michael Niedermayer wrote:
> Hi
> > In that case, it would be nice to make 5/3 the default for lossless. It
> > really doesn't make snow look good to have the default mode (9/7,
> > lossless) look so ugly.
> the default of option A should not depend on option B, its confusing and 
> problematic, there should be a check for this and the encoder should die with 
> an error if 9/7 is used in lossless mode (patch welcome)
> [...]
I've been testing reducing the levels of decomposition for lossless mode
(5/3 wavelet) (eliminating dwt/idwt completely would require a little
more hacking) and I've got some interesting results:

temp_speak_up is a 512x384 encode (cartoon).
temp is a 512x384 transcode of a high quality xvid (CG animation).
temp_gummi is a 320x240 transcode of a low quality divx (cartoon).
All are 3 seconds long.

temp1 has 5 decomposition levels.
temp2 has 4 decomposition levels.
temp5 has 1 decomposition level.

size    name
5808338 temp_speak_up_1.avi
5806786 temp_speak_up_2.avi
5802532 temp_speak_up_3.avi
5802568 temp_speak_up_4.avi
5800562 temp_speak_up_5.avi

3567262 temp1.avip1.avi
3565508 temp2.avi
3563214 temp3.avi
3557608 temp4.avi
3532662 temp5.avi

2619304 temp_gummi_1.avi
2619496 temp_gummi_2.avi
2620204 temp_gummi_3.avi
2617298 temp_gummi_4.avi
2553554 temp_gummi_5.avi

This indicates that lossless compression is better without dwt/idwt than
with it. It would also make lossless compression substantially faster to
remove dwt/idwt.

So I suggest not doing dwt/idwt for lossless mode. We'd even get two
birds with one stone, since the rescaled coefficients wouldn't be
causing any more troubles. Any comments or ideas about this?


More information about the ffmpeg-devel mailing list