AddGrainC
From Avisynth wiki
(Difference between revisions)
m (add archived link) |
(AddGrainC: new version) |
||
(8 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Effects|Deep_color_tools}} |
{{Filter3 | {{Filter3 | ||
| | | | ||
Line 6: | Line 6: | ||
*{{Author/LaTo}} | *{{Author/LaTo}} | ||
*{{Author/cretindesalpes}} | *{{Author/cretindesalpes}} | ||
− | + | *[https://github.com/HolyWu/ HolyWu] | |
− | + | *StvG | |
+ | *{{Author/pinterf}} | ||
+ | |1.8.3 | ||
+ | |[https://github.com/pinterf/AddGrainC/releases AddGrainC_v1.8.3.7z] | ||
|Effects | |Effects | ||
|[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | |[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2] | ||
Line 14: | Line 17: | ||
Generate [[wikipedia:Film_grain|film-like grain]] or other effects (like rain) by adding random noise to a video clip. This noise may optionally be horizontally or vertically correlated to cause streaking. | Generate [[wikipedia:Film_grain|film-like grain]] or other effects (like rain) by adding random noise to a video clip. This noise may optionally be horizontally or vertically correlated to cause streaking. | ||
− | '''AddGrain''' and '''AddGrainC''' are ''aliases'' for one another; there is no difference in functionality, only in syntax.<br/> | + | '''AddGrain''' and '''AddGrainC''' are ''aliases'' for one another; there is no difference in functionality, only in syntax. <br/> |
+ | |||
+ | '''Note''': self-registers as [[MT_NICE_FILTER]] in AviSynth+. | ||
+ | <br> | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | * AviSynth | + | * [x86]: [[AviSynth+]] or [http://sourceforge.net/projects/avisynth2/ AviSynth 2.6] |
+ | * [x64]: [[AviSynth+]] | ||
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only | * [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only | ||
− | * Supported color formats: [[ | + | * Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]], [[RGB24]], [[RGB32]] |
− | : | + | **AviSynth+: all [[planar]] formats (8/10/12/14/16bit and float, YUV/RGB with or without alpha), plus [[RGB48]] and [[RGB64]] are supported. |
− | + | ||
− | + | ||
− | + | ||
<br> | <br> | ||
Line 52: | Line 56: | ||
<br> | <br> | ||
::{{Par2|sse2|bool|true}} | ::{{Par2|sse2|bool|true}} | ||
− | ::: | + | :::Debug parameter, set to false for C routines |
<br> | <br> | ||
Line 62: | Line 66: | ||
== Changelog == | == Changelog == | ||
Version Date Developer Changes<br> | Version Date Developer Changes<br> | ||
− | [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.1.7z 1.7.1] 2013/11/25 Firesledge Added a 64-bit version. Compiled with MSVC 2012 (requires the 2012 runtime libraries) | + | v1.8.3 2021/03/09 pinterf - Fix: possible crash for packed RGB formats |
− | [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.0.7z 1.7.0] 2012/08/16 Firesledge Supports Y8, YV16, YV24 and YV411 colorspaces. | + | |
− | [http://latoninf.free.fr/d9/AddGrainC-1.6.1.7z 1.6.1] 2011/10/29 LaTo INV. Automatic switch to MMX if SSE2 is not supported by the CPU. | + | v1.8.2 2020/05/20 pinterf - Fix SIMD code: 8/16/32 bits gave different look for the same given fixed seeds. |
− | [http://forum.doom9.org/showpost.php?p=1534699&postcount=55 1.6.0] 2011/10/28 LaTo INV. Added SSE2 code (50% faster than MMX) | + | |
− | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.4.7z 1.5.4] 2011/10/27 Firesledge Fixed bad pixels on the last line in YV12 mode when constant=true, | + | v1.8.1 2020/04/09 pinterf - AddGrain: original parameter order restored (compatibility) |
− | + | - bool sse2 parameter is restored as well. sse2 = false disables simd optimization. | |
− | + | - simd: make internal noise block load unaligned.<br> | |
− | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.3.7z 1.5.3] 2011/10/26 Firesledge Fixed coloring and bluring in RGB24 mode. | + | v1.8 2020/04/09 pinterf - Plugin name changed back to AddGrainC |
− | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.2.7z 1.5.2] 2011/10/26 Firesledge Removed the SSE2 requirement. | + | - Fix output darkening (regression in VS port) |
− | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.1.7z 1.5.1] 2010/05/13 Firesledge The source code compiles on Visual C++ versions older than 2008. | + | - Add back documentation, credits |
− | [http://forum.doom9.org/showpost.php?p=1398231&postcount=36 1.5] 2010/05/07 Foxyshadis Limit the initial seed generation to fix memory issues. | + | - Add back SIMD optimization (SSE2, SSE4) |
− | 1.4 2006/08/11 Foxyshadis | + | - Add back version resource<br> |
− | [http://forum.doom9.org/showpost.php?p=838887&postcount=18 1.3] 2006/06/10 Foxyshadis Crashfix, noisegen optimization. | + | 2020/03/30 StvG - Backport to AviSynth+ |
− | [http://forum.doom9.org/showpost.php?p=837288&postcount=14 1.2] 2006/06/06 Foxyshadis Supports YUY2, RGB. Fix cache mess. | + | - Changes to 1.7.1: |
− | [http://forum.doom9.org/showpost.php?p=835592&postcount=9 1.1] 2006/06/01 Foxyshadis Chroma grain + constant seed. | + | * Support AviSynth+ high bit depth |
− | [http://neuron2.net/trbarry/AddGrain.zip 1.0] 2003/06/18 Tom Barry Initial Release | + | * Register Avisynth+ MT mode as [[MT_MULTI_INSTANCE]] |
+ | * AddGrain parameter order made similar to AddGrainC: | ||
+ | var, uvar, hcorr, vcorr, seed, constant (was: var, hcorr, vcorr, uvar, seed, constant) | ||
+ | * Removed bool "sse2" parameter | ||
+ | * Name is AddGrain | ||
+ | * Removed SIMD optimization<br> | ||
+ | 2014-2018 HolyWu - VapourSynth port<br> | ||
+ | [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.1.7z 1.7.1] 2013/11/25 Firesledge - Added a 64-bit version. Compiled with MSVC 2012 (requires the 2012 runtime libraries) | ||
+ | [http://ldesoras.free.fr/src/avs/AddGrainC-1.7.0.7z 1.7.0] 2012/08/16 Firesledge - Supports Y8, YV16, YV24 and YV411 colorspaces. | ||
+ | [http://latoninf.free.fr/d9/AddGrainC-1.6.1.7z 1.6.1] 2011/10/29 LaTo INV. - Automatic switch to MMX if SSE2 is not supported by the CPU. | ||
+ | [http://forum.doom9.org/showpost.php?p=1534699&postcount=55 1.6.0] 2011/10/28 LaTo INV. - Added SSE2 code (50% faster than MMX) | ||
+ | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.4.7z 1.5.4] 2011/10/27 Firesledge - Fixed bad pixels on the last line in YV12 mode when constant=true, | ||
+ | fixed potential problems with frame width > 4096 pixels | ||
+ | and fixed several other minor things. | ||
+ | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.3.7z 1.5.3] 2011/10/26 Firesledge - Fixed coloring and bluring in RGB24 mode. | ||
+ | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.2.7z 1.5.2] 2011/10/26 Firesledge - Removed the SSE2 requirement. | ||
+ | [http://ldesoras.free.fr/src/avs/old/AddGrainC-1.5.1.7z 1.5.1] 2010/05/13 Firesledge - The source code compiles on Visual C++ versions older than 2008. | ||
+ | [http://forum.doom9.org/showpost.php?p=1398231&postcount=36 1.5] 2010/05/07 Foxyshadis - Limit the initial seed generation to fix memory issues. | ||
+ | 1.4 2006/08/11 Foxyshadis - Constant replaces seed, seed repeatable. | ||
+ | [http://forum.doom9.org/showpost.php?p=838887&postcount=18 1.3] 2006/06/10 Foxyshadis - Crashfix, noisegen optimization. | ||
+ | [http://forum.doom9.org/showpost.php?p=837288&postcount=14 1.2] 2006/06/06 Foxyshadis - Supports YUY2, RGB. Fix cache mess. | ||
+ | [http://forum.doom9.org/showpost.php?p=835592&postcount=9 1.1] 2006/06/01 Foxyshadis - Chroma grain + constant seed. | ||
+ | [http://neuron2.net/trbarry/AddGrain.zip 1.0] 2003/06/18 Tom Barry - Initial Release | ||
+ | |||
==External Links == | ==External Links == | ||
*[http://forum.doom9.org/showthread.php?t=111849 Doom9 Forum] - AddGrainC discussion. | *[http://forum.doom9.org/showthread.php?t=111849 Doom9 Forum] - AddGrainC discussion. | ||
+ | *[https://github.com/pinterf/AddGrainC GitHub] - Source code repository. | ||
<br> | <br> | ||
<br> | <br> | ||
----------------------------------------------- | ----------------------------------------------- | ||
'''Back to [[External_filters#Effects|External Filters]] ←''' | '''Back to [[External_filters#Effects|External Filters]] ←''' |
Latest revision as of 11:36, 9 March 2021
Abstract | |
---|---|
Author | |
Version | 1.8.3 |
Download | AddGrainC_v1.8.3.7z |
Category | Effects |
License | GPLv2 |
Discussion | Doom9 Thread |
Contents |
[edit] Description
Generate film-like grain or other effects (like rain) by adding random noise to a video clip. This noise may optionally be horizontally or vertically correlated to cause streaking.
AddGrain and AddGrainC are aliases for one another; there is no difference in functionality, only in syntax.
Note: self-registers as MT_NICE_FILTER in AviSynth+.
[edit] Requirements
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- Progressive input only
- Supported color formats: Y8, YV12, YV16, YV24, YV411, RGB24, RGB32
[edit] Syntax and Parameters
- AddGrain (clip, float "var", float "hcorr", float "vcorr", float "uvar", int "seed", bool "constant", bool "sse2")
- AddGrainC (clip, float "var", float "uvar", float "hcorr", float "vcorr", int "seed", bool "constant", bool "sse2")
- clip =
- Input clip.
- clip =
- float var = 1.0
- The standard deviation (strength) of the luma noise, 0.0 is disabled.
- float var = 1.0
- float uvar = 0.0
- The standard deviation (strength) of the chroma noise, 0.0 is disabled.
- uvar does nothing in RGB mode.
- float uvar = 0.0
- float hcorr = 0.0
- float vcorr = 0.0
- Horizontal and vertical correlation, which causes a nifty streaking effect.
- Range: 0.0 - 1.0
- Horizontal and vertical correlation, which causes a nifty streaking effect.
- float hcorr = 0.0
- int seed = -1
- Specifies a repeatable grain sequence. Set to at least 0 to use.
- int seed = -1
- bool constant = false
- Specifies a constant grain pattern on every frame.
- bool constant = false
- bool sse2 = true
- Debug parameter, set to false for C routines
- bool sse2 = true
[edit] Examples
AddGrainC with default values:
AviSource("Blah.avi") AddGrainC(var=1.0, uvar=0.0, hcorr=0.0, vcorr=0.0, seed=-1, constant=false, sse2=true)
[edit] Changelog
Version Date Developer Changes
v1.8.3 2021/03/09 pinterf - Fix: possible crash for packed RGB formats v1.8.2 2020/05/20 pinterf - Fix SIMD code: 8/16/32 bits gave different look for the same given fixed seeds. v1.8.1 2020/04/09 pinterf - AddGrain: original parameter order restored (compatibility) - bool sse2 parameter is restored as well. sse2 = false disables simd optimization. - simd: make internal noise block load unaligned.
v1.8 2020/04/09 pinterf - Plugin name changed back to AddGrainC - Fix output darkening (regression in VS port) - Add back documentation, credits - Add back SIMD optimization (SSE2, SSE4) - Add back version resource
2020/03/30 StvG - Backport to AviSynth+ - Changes to 1.7.1: * Support AviSynth+ high bit depth * Register Avisynth+ MT mode as MT_MULTI_INSTANCE * AddGrain parameter order made similar to AddGrainC: var, uvar, hcorr, vcorr, seed, constant (was: var, hcorr, vcorr, uvar, seed, constant) * Removed bool "sse2" parameter * Name is AddGrain * Removed SIMD optimization
2014-2018 HolyWu - VapourSynth port
1.7.1 2013/11/25 Firesledge - Added a 64-bit version. Compiled with MSVC 2012 (requires the 2012 runtime libraries) 1.7.0 2012/08/16 Firesledge - Supports Y8, YV16, YV24 and YV411 colorspaces. 1.6.1 2011/10/29 LaTo INV. - Automatic switch to MMX if SSE2 is not supported by the CPU. 1.6.0 2011/10/28 LaTo INV. - Added SSE2 code (50% faster than MMX) 1.5.4 2011/10/27 Firesledge - Fixed bad pixels on the last line in YV12 mode when constant=true, fixed potential problems with frame width > 4096 pixels and fixed several other minor things. 1.5.3 2011/10/26 Firesledge - Fixed coloring and bluring in RGB24 mode. 1.5.2 2011/10/26 Firesledge - Removed the SSE2 requirement. 1.5.1 2010/05/13 Firesledge - The source code compiles on Visual C++ versions older than 2008. 1.5 2010/05/07 Foxyshadis - Limit the initial seed generation to fix memory issues. 1.4 2006/08/11 Foxyshadis - Constant replaces seed, seed repeatable. 1.3 2006/06/10 Foxyshadis - Crashfix, noisegen optimization. 1.2 2006/06/06 Foxyshadis - Supports YUY2, RGB. Fix cache mess. 1.1 2006/06/01 Foxyshadis - Chroma grain + constant seed. 1.0 2003/06/18 Tom Barry - Initial Release
[edit] External Links
- Doom9 Forum - AddGrainC discussion.
- GitHub - Source code repository.
Back to External Filters ←