Skip to content

Commit

Permalink
documents
Browse files Browse the repository at this point in the history
  • Loading branch information
SAPikachu committed Oct 30, 2011
1 parent 06d76bc commit 184f0ca
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 37 deletions.
84 changes: 71 additions & 13 deletions ReadMe.txt
@@ -1,7 +1,10 @@
flash3kyuu_deband(clip c, int "range", int "Y", int "Cb", int "Cr",
f3kdb(clip c, int "range", int "Y", int "Cb", int "Cr",
int "ditherY", int "ditherC", int "sample_mode", int "seed",
bool "blur_first", bool "diff_seed", int "opt", bool "mt",
int "precision_mode", bool "keep_tv_range")
bool "blur_first", bool "dynamic_dither_noise", int "opt", bool "mt",
int "precision_mode", bool "keep_tv_range", int "input_mode",
int "input_depth", int "output_mode", int "output_depth",
bool "enable_fast_skip_plane", int "random_algo_ref",
int "random_algo_dither")

Ported from http://www.geocities.jp/flash3kyuu/auf/banding17.zip .
(I'm not the author of the original aviutl plugin, just ported the algorithm to
Expand Down Expand Up @@ -58,15 +61,8 @@ blur_first

Default: true

diff_seed
Use different seed for each frame.

Caveats:
1. Speed may be significantly slower if enabled.
2. The filter will become non-thread-safe if enabled. Avisynth MT mode 1
will work incorrectly or even crash.
Mode 2 should work though, of course appropriate overlap need to be set.
(not tested)
dynamic_dither_noise
Use different noise pattern for each frame.

Default: false

Expand Down Expand Up @@ -132,6 +128,55 @@ keep_tv_range

Default: false

input_mode
Specify source video type.
0: Regular 8 bit video
1: 9 ~ 16 bit high bit-depth video, stacked format
2: 9 ~ 16 bit high bit-depth video, interleaved format

Default: 0

input_depth
Specify bit-depth of source video.

Range: 8 ~ 16
Default: 8 (input_mode = 0) / 16 (input_mode = 1 or 2)

output_mode
Specify output video type. Value meanings are the same as input_mode.

Only valid when precision_mode = 1 / 2 / 3 .

When precision_mode = 0 / 4 / 5, output_mode are set to respective value and
can't be changed.

Default: 0 when precision_mode = 0 ~ 3 and output_depth is not set,
otherwise the most appropriate value will be used.

output_depth
Specify output bit-depth.

Only valid when precision_mode = 1 / 2 / 3 .

Range: 8 ~ 16
Default: The most appropriate value, depends on other parameters

enable_fast_skip_plane
If enabled and Y/Cb/Cr is 0, the respective plane will be directly
copied to destination when possible, regardless of ditherY/ditherC.

Default: true

random_algo_ref / random_algo_dither
Choose random number algorithm for reference positions / dither values.

0: Algorithm in old versions
1: Uniform distribution
2: Gaussian distribution
(StdDev = 1.0, only use values in [-1.0, 1.0] for multiplication)

Default: 1 / 1

--------------------------------------------------------------------------------

f3kdb_dither(clip c, int "mode", bool "stacked", int "input_depth",
Expand Down Expand Up @@ -169,4 +214,17 @@ input_depth
keep_tv_range
See description of keep_tv_range in flash3kyuu_deband

Default: false
Default: false

--------------------------------------------------------------------------------

flash3kyuu_deband 1.4.0

Web:
http://forum.doom9.org/showthread.php?t=161411
http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=239

Source code:
https://github.com/SAPikachu/flash3kyuu_deband

Copyleft 2011 SAPikachu (sapikachu@gmail.com)
99 changes: 75 additions & 24 deletions ReadMe.zh.txt
@@ -1,7 +1,10 @@
flash3kyuu_deband(clip c, int "range", int "Y", int "Cb", int "Cr",
f3kdb(clip c, int "range", int "Y", int "Cb", int "Cr",
int "ditherY", int "ditherC", int "sample_mode", int "seed",
bool "blur_first", bool "diff_seed", int "opt", bool "mt",
int "precision_mode", bool "keep_tv_range")
bool "blur_first", bool "dynamic_dither_noise", int "opt", bool "mt",
int "precision_mode", bool "keep_tv_range", int "input_mode",
int "input_depth", int "output_mode", int "output_depth",
bool "enable_fast_skip_plane", int "random_algo_ref",
int "random_algo_dither")

由 http://www.geocities.jp/flash3kyuu/auf/banding17.zip 移植,此处仅提供简单参数解释,参数详细意义请参考原始aviutl滤镜的文档。
滤镜支持逐行YUY2、YV12、YV16、YV24及YV411。
Expand Down Expand Up @@ -34,8 +37,8 @@ seed
blur_first
当sample_mode为1~2时有效,是否在检测前进行模糊,默认为启用

diff_seed
每帧均使用不同的随机数种子,默认为不使用
dynamic_dither_noise
动态噪声模式,默认为不使用

opt
优化模式
Expand All @@ -53,12 +56,12 @@ mt
如用户机器有多个CPU/核心则默认启用,否则默认为禁用

precision_mode
0: 低精度模式
1: 高精度模式, 无dither处理
2: 高精度模式, Ordered dithering
3: 高精度模式, Floyd-Steinberg dithering
4: 高精度模式, 16bit层叠输出,供dither工具集后续处理(http://forum.doom9.org/showthread.php?p=1386559#post1386559)
5: 高精度模式, 16bit交织输出,供10bit x264编码 (此模式下帧宽度会变成原始的2倍,并且预览时会花屏。正确压制后就会恢复正常。)
0低精度模式
1高精度模式, 无dither处理
2高精度模式, Ordered dithering
3高精度模式, Floyd-Steinberg dithering
4高精度模式, 16bit层叠输出,供dither工具集后续处理(http://forum.doom9.org/showthread.php?p=1386559#post1386559)
5高精度模式, 16bit交织输出,供10bit x264编码 (此模式下帧宽度会变成原始的2倍,并且预览时会花屏。正确压制后就会恢复正常。)

说明:
#1 该参数仅在sample_mode > 0时有效,sample_mode = 0时设置该参数会出错。
Expand All @@ -70,18 +73,66 @@ precision_mode
或使用添加过hack( https://gist.github.com/1117711 )的x264编译版:
x264-10bit --input-depth 16 --output "out.mp4" script.avs

默认值: 0 (sample_mode = 0) / 3 (sample_mode > 0)
默认值0 (sample_mode = 0) / 3 (sample_mode > 0)

keep_tv_range
如设置为true,所有处理后的像素会被裁剪到TV range (luma: 16 ~ 235,
chroma: 16 ~ 240)。
如设置为true,所有处理后的像素会被裁剪到TV range (luma16 ~ 235,
chroma16 ~ 240)。

如果视频源是TV range,推荐设置为true,因为dither后的像素有可能会超出范围。

如果视频源是full-range,*不要*设置此参数为true,否则所有超出TV range的像素会被裁剪。

默认值: false
默认值false


input_mode
指定输入视频模式。

0:标准8bit视频
1:9 ~ 16 bit 高位深视频, 层叠格式
2:9 ~ 16 bit 高位深视频, 交织格式

默认值:0

input_depth
指定源视频位深。

范围:8 ~ 16
默认值:8 (input_mode = 0) / 16 (input_mode = 1 / 2)

output_mode
指定输出视频模式。参数值意义同input_mode。

仅当 precision_mode = 1 / 2 / 3 时可用。

当 precision_mode = 0 / 4 / 5 ,output_mode会自动设定为对应值且不能被更改。

默认值:当precision_mode = 0 ~ 3 且 output_depth 未设置时为0,
否则自动选择为最合适的值。

output_depth
指定输出视频位深。

仅当 precision_mode = 1 / 2 / 3 时可用。

范围:8 ~ 16
默认值:自动选择最合适的值。

enable_fast_skip_plane
启用后,当Y/Cb/Cr为0时,对应的平面会直接被复制到输出,忽略ditherY/ditherC的值。

默认值:true

random_algo_ref / random_algo_dither
选择参考像素位置/dither噪声的随机数生成算法。

0:旧版滤镜算法
1:均匀分布
2:高斯分布 (标准差1.0,只使用[-1.0, 1.0]范围内的值)

默认值:1 / 1

--------------------------------------------------------------------------------

f3kdb_dither(clip c, int "mode", bool "stacked", int "input_depth",
Expand All @@ -94,26 +145,26 @@ f3kdb_dither(clip c, int "mode", bool "stacked", int "input_depth",
需求支持SSE2的CPU (Pentium 4 / AMD K8 或更新)

mode
0: Ordered dithering
1: Floyd-Steinberg dithering
0Ordered dithering
1Floyd-Steinberg dithering

默认值: 1
默认值1

stacked
true: 源数据为层叠格式
true源数据为层叠格式
(即 flash3kyuu_deband precision_mode = 4 的输出格式)
false: 源数据为交织格式
false源数据为交织格式
(即 flash3kyuu_deband precision_mode = 5 的输出格式)

默认值: true
默认值true

input_depth
指定输入数据位深

默认值: 16
有效范围: 9 ~ 16
默认值16
有效范围9 ~ 16

keep_tv_range
请参考flash3kyuu_deband的同名参数

默认值: false
默认值false
13 changes: 13 additions & 0 deletions changelog.txt
@@ -1,3 +1,16 @@
1.4.0 (2011-10-30)
* 9 ~ 16 bit-depth input/output
* Related parameters: input_mode/input_depth/output_mode/output_depth
* New random number generator, reference position and dither noise can be
generated in uniform or gaussian distribution
* Related parameters: random_algo_ref / random_algo_dither
* diff_seed is replaced with dynamic_dither_noise, when enabled, noise pattern
will be different for each frame
* Another new parameter: enable_fast_skip_plane
* Short filter alias: f3kdb
* Now the ICC-compiled DLL should be runnable on pre-SSE2 systems (untested)
* Several bug fixes

1.3.0 (2011-09-07)
* Added x64 version
* Added a downsample filter: f3kdb_dither
Expand Down
11 changes: 11 additions & 0 deletions changelog.zh.txt
@@ -1,3 +1,14 @@
1.4.0 (2011-10-30)
9 ~ 16位深输入/输出
相关参数:input_mode/input_depth/output_mode/output_depth
新的随机数生成器,参考像素位置及噪声可以为均匀分布或高斯分布
相关参数:random_algo_ref / random_algo_dither
diff_seed已被dynamic_dither_noise取代,启用时每帧的噪声模式会变化
另一个新参数:enable_fast_skip_plane
新增滤镜短名:f3kdb
新的ICC编译版理论上可在SSE2前的CPU上运行(未测试)
少量Bug修复

1.3.0 (2011-09-07)
新增x64版本
新增降色深滤镜:f3kdb_dither
Expand Down

0 comments on commit 184f0ca

Please sign in to comment.