MosquitoNR

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Description)
(v0.2 update)
 
(13 intermediate revisions by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Deringing & Mosquito Noise}}
+
{{FilterCat5|External_filters|Plugins|Plugins_x64|Restoration_filters|Deringing & Mosquito Noise}}
{{Filter
+
{{Filter3
|{{Author/b_inary}}
+
|1={{Author/b_inary}}, {{Author/pinterf}}
|v0.10
+
|2=v0.2
|[http://web.archive.org/web/20131028144351/http://www.geocities.jp/w_bean17/files/mosquito_nr_avisynth.zip MosquitoNR]
+
|3=[https://github.com/pinterf/MosquitoNR/releases/ MosquitoNR_v0.2.7z]
|Deringing & Mosquito Noise
+
|4=Deringing & Mosquito Noise
|
+
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
* AviSynth 2.5.8 or later
+
|6=[http://forum.doom9.org/showthread.php?t=167582 Doom9 Thread]}}
* CPU with SSE2 support
+
* Supported color formats:
+
:[[YUY2]], [[YV12]], [[YV16]],
+
:[[YV24]], [[YV411]], [[Y8]]
+
* Progressive input only
+
|GPL
+
|}}
+
 
+
 
== Description ==
 
== Description ==
:MosquitoNR is a noise reduction filter designed for mosquito noise, which is often caused by lossy compression such as MPEG.  
+
MosquitoNR is a noise reduction filter designed for mosquito noise, which is often caused by lossy compression such as MPEG.<br>
:This filter works as follows:
+
This filter works as follows:
  
::1. Compute low frequency components of the image.
+
:1. Compute low frequency components of the image.
::2. Apply direction-aware blur (smoothing). This blur effectively reduces compression artifacts, but also breaks detail.
+
: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.
+
:3. Restore the low frequency components to the blurred image.
  
:MosquitoNR processes luma only, to correctly process chroma take a look at the [[MosquitoNR#Examples|example]] below.
+
MosquitoNR processes luma only, to correctly process chroma take a look at the [[MosquitoNR#Examples|example]] below.<br>
 
<br>
 
<br>
===== Requirements: =====
+
== Requirements ==
:- AviSynth 2.5.8 or later
+
* [x86] [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]
:- CPU with SSE2 support
+
* [x64] [[AviSynth+]]
:- Supported color formats: [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Y8]]
+
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only
:- Progressive input only
+
* Supported color formats: [[YUY2]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[Y8]]
 +
 
 +
* CPU with [[SSE2]] support
 
<br>
 
<br>
  
== Syntax and Parameters ==
+
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|MosquitoNR(clip, int "strength", int "restore", int "radius", int "threads")}}
+
:{{Template:FuncDef|MosquitoNR (''clip'', ''int'' "strength", ''int'' "restore", ''int'' "radius", ''int'' "threads")}}
 +
<br>
 +
::{{Par2| |clip| }}
 +
:::Input clip
 
<br>
 
<br>
::{{Par|strength|int|16}}
+
::{{Par2|strength|int|16}}
 
:::Range: 0 - 32
 
:::Range: 0 - 32
 
::::Sets the strength of the blur.
 
::::Sets the strength of the blur.
:::::Setting this value higher brings stronger noise reduction effect, but side effect will also become stronger.
+
::::Setting this value higher brings stronger noise reduction effect, but side effect will also become stronger.
 
<br>
 
<br>
::{{Par|restore|int|128}}
+
::{{Par2|restore|int|128}}
 
:::Range: 0 - 128
 
:::Range: 0 - 128
 
::::Sets the rate of restoring.  
 
::::Sets the rate of restoring.  
:::::If set to 0, no restoring is performed.  
+
::::If set to 0, no restoring is performed.  
:::::If set to 128, low frequency components of the blurred image is completely replaced with those of the original image, and runs slightly faster.
+
::::If set to 128, low frequency components of the blurred image is completely replaced with those of the original image, and runs slightly faster.
 
<br>
 
<br>
::{{Par|radius|int|2}}
+
::{{Par2|radius|int|2}}
 
:::Range: 1 - 2
 
:::Range: 1 - 2
 
::::Sets the radius of the blur.  
 
::::Sets the radius of the blur.  
::::"1 is faster, but will have insufficient effect in some cases.
+
::::1 is faster, but will have insufficient effect in some cases.
 
<br>
 
<br>
::{{Par|threads|int|0}}
+
::{{Par2|threads|int|0}}
 
:::Range: 0 - 32
 
:::Range: 0 - 32
 
::::Controls how many threads are used.
 
::::Controls how many threads are used.
:::::By default, threads is set equal to automatically detected number of processors.
+
::::By default, threads is set equal to automatically detected number of processors.
:::::Since this filter needs a lot of memory access, thread efficiency is not very good. Setting this value lower might improve overall processing speed.
+
::::Since this filter needs a lot of memory access, thread efficiency is not very good. Setting this value lower might improve overall processing speed.
 
<br>
 
<br>
 
== Examples ==
 
== Examples ==
 +
MosquitoNR with default settings:
 
  [[AviSource]]("Blah.avi")
 
  [[AviSource]]("Blah.avi")
  MosquitoNR()
+
  MosquitoNR(strength=16, restore=128, radius=2, threads=0)
 
<br>
 
<br>
 
MosquitoNR processes only luma.
 
MosquitoNR processes only luma.
If you want to process chroma too, you can write script like the following, but there might be no noticeable change.
+
If you want to process chroma too, you can write a script like the following, but there might be no noticeable change.
 +
[[AviSource]]("Blah.avi")
 
  MosquitoNR()
 
  MosquitoNR()
  u = UtoY().MosquitoNR() # In AviSynth 2.6, UtoY8() may be faster
+
  u = UtoY8().MosquitoNR()  
  v = VtoY().MosquitoNR()
+
  v = VtoY8().MosquitoNR()
 
  YtoUV(u, v, last)
 
  YtoUV(u, v, last)
 
<br>
 
<br>
 
== Changelog ==
 
== Changelog ==
  ver 0.10 (2013-03-14)
+
Version      Date            Changes<br>
      - fixed a crash with AviSynth MT
+
v0.20        2022/03/23      - Moved to GitHub: https://github.com/pinterf/MosquitoNR
      - added support for YV16, YV24, Y411, Y8
+
                              - No longer a cpp 2.5 plugin: update to AviSynth v2.6 interface
      - some speed optimizations
+
                              - Preserve frame properties when AviSynth+
      - added English documentation<br>
+
                              - All inline assembly code is converted to SIMD intrinsics: 64 bit build possible
  ver.120210 (2012-02-10)
+
                              - YUY2 support kept but handled as YV16 internally
      - initial release
+
                              - Requires SSSE3 instead of SSE2
 +
                              - Add DLL version resource<br>
 +
v0.10       2013/11/29      - x64 version
 +
                              - Compiled with Intel C++ Compiler XE 14.<br>
 +
v0.10        2013/03/14      - Fixed a crash with AviSynth MT
 +
                              - Added support for YV16, YV24, Y411, Y8
 +
                              - Some speed optimizations
 +
                              - Added English documentation<br>
 +
v120210      2012/02/10     - Initial release
 
<br>
 
<br>
== Acknowledgments ==
+
== Archived Downloads ==
:This filter is a combination of flash3kyuu's AviUtl plugin "smoothing filter" and nilpo's AviUtl plugin "low frequency components protection filter".
+
{| class="wikitable" border="1"; width="500px"
:This combination was proposed by POP@4bit. I thank all of them very much.
+
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Mirror
 +
|-
 +
!v0.10
 +
|x86: [https://web.archive.org/web/20131028144351/http://www.geocities.jp/w_bean17/files/mosquito_nr_avisynth.zip mosquito_nr_avisynth.zip]
 +
----------
 +
x64: [https://www.dropbox.com/s/0dgrruxne80izus/MosquitoNR_0.10_x64.zip?dl=1 MosquitoNR_0.10_x64.zip]
 +
|x86: [https://web.archive.org/web/20200521023440if_/https://files.videohelp.com/u/223002/mosquito_nr_avisynth.zip mosquito_nr_avisynth.zip]
 +
--------
 +
x64: [https://web.archive.org/web/20200521023320if_/https://files.videohelp.com/u/223002/MosquitoNR_0.10_x64.zip MosquitoNR_0.10_x64.zip]
 +
|}
  
::*flash3kyuu's web page (Japanese):  http://www.geocities.jp/flash3kyuu/
+
* v0.10 x64 version compiled with Intel C++ Compiler XE 14.  
::*nilpo's web page (Japanese):      http://nilposoft.info/aviutl-plugin/
+
::*POP@4bit's web page (Japanese):    http://pop.4-bit.jp/?p=3362
+
  
 +
<br>
 +
==Extenal Links ==
 +
=== Acknowledgments ===
 +
This filter is a combination of flash3kyuu's AviUtl plugin [[Smoothing|"smoothing filter"]] and nilpo's AviUtl plugin waveletAF - "low frequency components protection filter".<br>
 +
This combination was proposed by POP@4bit. I thank all of them very much.
  
== Links ==
+
:*flash3kyuu's web page (Japanese):  [https://web.archive.org/web/20190327173248/http://www.geocities.jp/w_bean17/ http://www.geocities.jp/flash3kyuu/]
- [http://forum.doom9.org/showthread.php?t=167582 Doom9 Forum] - MosquitoNR discussion.
+
:*nilpo's web page (Japanese):      http://nilposoft.info/aviutl-plugin/
 +
:*POP@4bit's web page (Japanese):    http://pop.4-bit.jp/?p=3362
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Deringing_.26_Mosquito_Noise|External Filters]] &larr;'''

Latest revision as of 15:08, 23 March 2022

Abstract
Author b_inary, pinterf
Version v0.2
Download MosquitoNR_v0.2.7z
Category Deringing & Mosquito Noise
License GPLv2
Discussion Doom9 Thread

Contents

[edit] 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.

MosquitoNR processes luma only, to correctly process chroma take a look at the example below.

[edit] Requirements

  • CPU with SSE2 support


[edit] Syntax and Parameters

MosquitoNR (clip, int "strength", int "restore", int "radius", int "threads")


clip   =
Input clip


int  strength = 16
Range: 0 - 32
Sets the strength of the blur.
Setting this value higher brings stronger noise reduction effect, but side effect will also become stronger.


int  restore = 128
Range: 0 - 128
Sets the rate of restoring.
If set to 0, no restoring is performed.
If set to 128, low frequency components of the blurred image is completely replaced with those of the original image, and runs slightly faster.


int  radius = 2
Range: 1 - 2
Sets the radius of the blur.
1 is faster, but will have insufficient effect in some cases.


int  threads = 0
Range: 0 - 32
Controls how many threads are used.
By default, threads is set equal to automatically detected number of processors.
Since this filter needs a lot of memory access, thread efficiency is not very good. Setting this value lower might improve overall processing speed.


[edit] Examples

MosquitoNR with default settings:

AviSource("Blah.avi")
MosquitoNR(strength=16, restore=128, radius=2, threads=0)


MosquitoNR processes only luma. If you want to process chroma too, you can write a script like the following, but there might be no noticeable change.

AviSource("Blah.avi")
MosquitoNR()
u = UtoY8().MosquitoNR() 
v = VtoY8().MosquitoNR()
YtoUV(u, v, last)


[edit] Changelog

Version      Date            Changes
v0.20 2022/03/23 - 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
v0.10 2013/11/29 - x64 version - Compiled with Intel C++ Compiler XE 14.
v0.10 2013/03/14 - Fixed a crash with AviSynth MT - Added support for YV16, YV24, Y411, Y8 - Some speed optimizations - Added English documentation
v120210 2012/02/10 - Initial release


[edit] Archived Downloads

Version Download Mirror
v0.10 x86: mosquito_nr_avisynth.zip

x64: MosquitoNR_0.10_x64.zip

x86: mosquito_nr_avisynth.zip

x64: MosquitoNR_0.10_x64.zip

  • v0.10 x64 version compiled with Intel C++ Compiler XE 14.


[edit] Extenal Links

[edit] Acknowledgments

This filter is a combination of flash3kyuu's AviUtl plugin "smoothing filter" and nilpo's AviUtl plugin waveletAF - "low frequency components protection filter".
This combination was proposed by POP@4bit. I thank all of them very much.




Back to External Filters

Personal tools