[MPlayer-users] lavc vs. xvid (and improving lavc quality)

Michael Niedermayer michaelni at gmx.at
Mon Jun 7 16:20:47 CEST 2004


Hi

On Monday 07 June 2004 08:09, D Richard Felker III wrote:
[...]
> > > another solution is to get _latest_ libavcodec cvs and use
> > > cmp=10:subcmp=10:mbcmp=10:dia=3 but this is very new and so might not
> > > work as expected yet, theres also a coefficient in the code which still
> > > needs to be finetuned or exported
> >
> > Wow.  WOW.  Did I mention: _WOW_!  This is an _amazing_ improvement.
> >
> > You're my new deity for this week. :)
>
> WOW! What I'm impressed at is that Michael was able to please the
> "block whiners" so fast! :)
>
> BTW, could we have an explanation of why the "noise preserving" sse
> function is better?
sure

first ill explain what nsse is, nsse is simple the sse comparisson function 
with an additional term added which is the difference amount of the high freq 
noise between the compared blocks
so when the source material is noisy the motion estimation / macroblock 
decision will favor noisy blocks, the trick here is that its much cheaper 
bitrate wise to find some noisy block instead of a using a lower quantizer 
and actually storing the exact noise

so why does keeping the images slightly noisy help? there are at least 2 
relatively obvious reasons 
1. the noise masks the blocking artefacts, just try to add some noise during 
decoding, the blocks should be less visible
2. when compressing some area of nearly constant color u end up with areas of 
exactly constant color and somewhat blocky edges between colors n and n+1, 
the motion compensation for the next frame is now limited to only a few 
possible blocks as many motion vectors will result in the same constant color 
or same 2 with an edge in the middle, OTOH if the image is noisy then there 
are many more different choices for the motion compensation so the image can 
be represented more accurately

[...]
-- 
Michael
level[i]= get_vlc(); i+=get_vlc();		(violates patent EP0266049)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]);	(violates patent #5,905,535)
buf[i]= qp - buf[i-1];				(violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en




More information about the MPlayer-users mailing list