[MPlayer-dev-eng] [PATCH] soft thresholding spp

Michael Niedermayer michaelni at gmx.at
Fri Feb 20 04:19:06 CET 2004


Hi

On Friday 20 February 2004 03:26, James Crowson wrote:
> The spp filter currently uses hard thresholding (that is, DCT
> coefficients whose absolute value is less than the qp-dependent
> threshold are set to 0 and are unchanged otherwise).  This patch
> modifies spp to use soft thresholding (DCT coefficients whose absolute
> value is less than the qp-dependent threshold are set to 0 and other
> coefficients are reduced by a value equal to the threshold).
>
> I found that soft thresholding makes spp much better at removing ringing
> artifacts.  It is able to remove ringing almost entirely in clips that
> hard thresholding would only somewhat remove ringing in.  Hard
> thresholding would, in fact, sometimes *induce* ringing around sharp
> edges where there was none before (anime rips with high qp, for
> example).  Soft thresholding does not do this.  The image with soft
> thresholding looks somewhat more blurred, though cleaner.  You may or
> may not like this.
rejected
please dont replace optimized code by a abs(x)>t, or if the later is faster 
for u then tell us ur compiler version
soft thresholding should also be optional, and not replace the current code, 
allthough i agree that soft thresholding would be very interresting to add

>
> Note: This patch only changes the C version of spp.  I am not able to
> make the required changes to the MMX version.
ill do that if someone sends a patch to add optional soft-thresholdig to the c 
version ...

>
> Note 2: There is still a problem with the spp filter that I'm not
> knowledgeable enough about MPlayer internals to fix.  If the file being
> played uses B-frames, the qp (and thus the qp-dependent threshold) goes
> up and down quickly between adjacent frames.  This causes a distracting
> effect where details appear to quickly pop in and out (since spp is
> filtering the B-frames more strongly).  Perhaps the qp for B-frames
> could be set to the previous P-frame's qp (or maybe the average of the
> previous and next P-frame's qp). 
known problem, but its not so easy to fix, in some cases using the qp from the 
p frame will look better, in others u will end up with nice flickering 
blocking artefacts in the b frames

> The regular pp filter also does this,
> but it's more noticeable with spp.
the regular pp filter does some tricks to reduce the effect...

-- 
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-dev-eng mailing list