Log in

View Full Version : MosquitoNR [Mosquito Noise Reduction Plugin]


Reel.Deel
5th April 2013, 02:44
A while back it was discovered (http://forum.doom9.org/showthread.php?p=1615870#post1615870) that MosquitoNR did not work well with multi-threaded Avisynth.
I contacted the author, and to say the least, he was very generous and insisted on rewriting MosquitoNR.
Since online translators are often wrong, I kindly asked for English documentation. Well, he outdid himself!
Not only did he provide English documentation, he also used English for all of the comments in the source code.
He was not too interested in joining Doom9 so I told him I would start a MosquitoNR thread in case of any bugs.
Thanks again b_inary!! :)

[Description]

MosquitoNR is a noise reduction filter designed for mosquito noise, which is
often caused by lossy compression such as MPEG. This filter works as follows:

1. Compute low frequency components of the image.
2. Apply direction-aware blur (smoothing). This blur effectively reduces
compression artifacts, but also breaks detail.
3. Restore the low frequency components to the blurred image.

Latest version:

Download: https://github.com/pinterf/MosquitoNR/releases

Wiki: http://avisynth.nl/index.php/MosquitoNR


Notes for old AviSynth MT:
Since this plugin is internally multi-threaded, under MT conditions I get the best performance with MT mode 5.
MT mode 1 does not work, but then again mode 1 is almost never recommended.
I have only tested this plugin with YV12, so if you find something odd with other colorspaces please report it.

Reel.Deel
5th April 2013, 02:55
I was curious about mosquito noise so I did a little bit of research and came across some interesting technical papers.
To be honest I only understand (somewhat) up to the introductions, the rest is way out of my league. :o
Hope someone finds this useful.

Adaptive Deringing And Mosquito Noise Reducer (http://enpub.fulton.asu.edu/resp/vpqm/vpqm10/Proceedings_VPQM2010/vpqm_p39.pdf)
Mosquito Noise In MPEG Compressed Video Test Patterns And Metrics (http://www.itl.nist.gov/iad/894.05/docs/MosquitoNoise2000.pdf)
MPEG Artifact Removal Algorithms (http://tvit.org/GuyCD/Reports/Papers/Survey_of_MPEG_Artifact_Removal_Algorithms2.pdf)
Post-Processing Techniques For Compression Aritifact Removal In Block-Coded Video And Images (http://alexandria.tue.nl/extra1/afstversl/E/606860.pdf)
Suppression Of Mosquito Noise By Recursvie Epsilon-Filters (http://enpub.fulton.asu.edu/resp/Papers/2007/AbbasKaram_ICASSP_Apr07.pdf)
Temporal Mosquito Noise Corrector (http://hal.archives-ouvertes.fr/docs/00/45/01/21/PDF/Mantel_temporal_MN_corrector_Qomex09.pdf)

pinterf
23rd March 2022, 15:23
Update
https://github.com/pinterf/MosquitoNR/releases/tag/v0.2

ver 0.2 (2022-03-23) (pinterf)
- moved to github: https://github.com/pinterf/MosquitoNR
- No longer a cpp 2.5 plugin: update to Avisynth V2.6 interface
- Preserve frame properties when AviSynth+
- All inline assembly code is converted to SIMD intrinsics: 64 bit build possible
- YUY2 support kept but handled as YV16 internally
- Requires SSSE3 instead of SSE2
- Add DLL version resource
- Todo: reverse engineer to have C versions of the algorithms (no intel)
- Todo: non-Windows friendly source

Arx1meD
25th April 2022, 18:38
Pinterf, thanks for updating this filter.
In version 0.2, if you set the restore value more than 0 and less than 128, then an error occurs and the editor program closes with a critical error. When restore = 0 and restore = 128 everything works fine.
Video for test: download (https://mega.nz/file/wSpRXQYT#6mGrphIMVe0PGvX608AncH5VXEEewUeAotqCAiA63Dk)

Reel.Deel
26th April 2022, 14:42
I can confirm the problem with Colorbars(pixel_type="YUV444P8") as the source and loading the script in VDub2. However, some values don't cause an immediate crash for me (it does crash on reload or exit) but the result is corrupted:

https://i.ibb.co/PFNQRhJ/mosquitonr-corrupt.png


- Todo: reverse engineer to have C versions of the algorithms (no intel)

Not sure if it would be any help to you, but MosquitoNR was made from combining 2 aviutl filters together, Smoothing and waveletAF. Smoothing (http://avisynth.nl/index.php/Smoothing)was ported to AviSynth by putin and it does not have any asm (luckily I downloaded the plugin before the link died). waveletAF as far as I know has not been ported to AviSynth and the original source is assembly from what I can tell. Here's the link to that: waveletAF_120203.zip (https://web.archive.org/web/20210725212710if_/https://files.videohelp.com/u/223002/smoothing0005.zip)

Arx1meD
27th April 2022, 10:20
Reel.deel is such a bug as you showed if you use the Avisynth+ R2772 version. In new versions of Avisynth was a critical error.

Reel.Deel
27th April 2022, 12:31
Arx1meD, v0.3 fixes the issue for me: https://github.com/pinterf/MosquitoNR/releases

Arx1meD
28th April 2022, 06:34
In version 0.3 is no error.