[MPlayer-dev-eng] 2d denoise filter

" Michael A Baikov " pacak at bk.ru
Sat Oct 11 17:10:57 CEST 2003


To: A'rpi
                                                                                               
It`s a little difficult for me to upload video source, which I used to remove
noise from (it is a ugly copied DVD) -- to keep noise, i must either upload
MPEG2, either recompress to MPEG4 with large bitrate and I have slow modem
connection.  But there`s a screenshoot (from other video), with description.
It can be found in ftp1.mplayerhq.hu/incoming/hqdnsm.zip


                                                                                              To: Sascha Sommer
                                                                                               
Which one c version of hqdnsm filter you want to see in vf_hqdnsm.c?
I have two versions. except the last, which was written directly in asm.
* single pass -- pretty fast ;) and stupid filter with nice results.
* dualpass -- slower and mutch nicer results
Current version of mmx2 optimized filter has little more complicated algorithm
of first pass.
                                                                                               
PS Keep in mind, that C version of duaplass give ~1 fps on Athon XP 1800+
                                                                                               

PS: While fixing broken ifdef, i found one typo, and also add one improvement.
As result I got ~3x slowdown and some quality increase.
                                                                                                                                   
To: All
                                                                                               
There`s possible to increase quality by postprocessing vf->priv->details
buffer between first and second asm pieces. (At this place currently located
commented out dumb denoiser.) So, if you have noised video, which _must_ be
cleaned, with some kind of noise, which can not be removed by existing tools,
you can always extend features of hqdnsm.
                                                                                               
Little hacking HOWTO
First of all, you should look at contents of vf->priv->details buffer. It can
be done by replacing plane0 -> details in putimage and plane[1],plane[2] to
something, filled with zeroes. At resulting picture, black/dark areas - areas
with a lot of details. That areas will left (almost) untouched. White areas -
areas - areas without details, those areas will be smoothed. For example with
little (2..4) values of threshold, you should see details, which looks like
grid - blocking artifacts. Randomly located pixels, which greatly change their
values from frame to frame is almost defenetly noise. One more example  -- if
mpi->plane[0][offset] have very little numerical value (very dark area), then
you can freely set vf->priv->details[offset] to large values -- this will
compress better, while noone do not notice difference.
                                                                                               
PS Sorry for my English, I`m Russian ;)                                                           




More information about the MPlayer-dev-eng mailing list