[MPlayer-dev-eng] [PATCH] soft thresholding spp
James Crowson
jbcrowso at ncsu.edu
Fri Feb 20 03:26:12 CET 2004
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.
Note: This patch only changes the C version of spp. I am not able to
make the required changes to the MMX 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). The regular pp filter also does this,
but it's more noticeable with spp.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soft-thresholding-spp.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040219/c8d758e9/attachment.bin>
More information about the MPlayer-dev-eng
mailing list