View Full Version : Color banding and noise removal
Motenai Yoda
30th May 2014, 23:16
I wrote a Lutxy12 and a Lutxy16_8, can someone test them?
###############################
########## Yoda_Lutxy12 ##########
###############################
function Yoda_Lutxy12(clip src, clip src2, string "expr", string "yexpr",
\ string "uexpr", string "vexpr", int "y", int "u", int "v")
{
#needed coz if x is (n*256) -8 < x < n*256 it can't be rounded to n*256 with lsb only.
src_quant = src.Yoda_Lutxy12_aux(y=y, u=u, v=v, up= true)
src2_quant = src2.Yoda_Lutxy12_aux(y=y, u=u, v=v, up= false)
s1_msb = src_quant.Dither_get_msb()
s1_lsb = src_quant.Dither_get_lsb()
s2_msb = src2_quant.Dither_get_msb()
s2_lsb = src2_quant.Dither_get_lsb()
ss_lsb = mt_adddiff(s1_lsb, s2_lsb, y=y, u=u, v=v)
clip_msb = Yoda_Lutxy12_get(s1_msb, s2_msb, ss_lsb, expr,
\ yexpr, uexpr, vexpr, y, u, v, True)
clip_lsb = Yoda_Lutxy12_get(s1_msb, s2_msb, ss_lsb, expr,
\ yexpr, uexpr, vexpr, y, u, v, False)
stackvertical(clip_msb, clip_lsb)
#handling chroma planes if y,u or v are 2 or 4
(Defined (y)) ? (y == 2) ? MergeLuma(src) :
\(y == 4) ? MergeLuma(src2) : last : last
(Defined (u)) ? (Defined (v)) ? (u == 2 && v == 2) ? MergeChroma(src) :
\(v == 2) ? ytouv(last.utoy(),src.vtoy()) :
\(u == 2) ? ytouv(src.utoy(),last.vtoy()) : last :
\(u == 2) ? ytouv(src.utoy(),last.vtoy()) : last :
\(Defined (v) && v == 2) ? ytouv(last.utoy(),src.vtoy()) : last
(Defined (u)) ? (Defined (v)) ? (u == 4 && v == 4) ? MergeChroma(src2) :
\(v == 4) ? ytouv(last.utoy(),src2.vtoy()) :
\(u == 4) ? ytouv(src2.utoy(),last.vtoy()) : last :
\(u == 4) ? ytouv(src2.utoy(),last.vtoy()) : last :
\(Defined (v) && v == 4) ? ytouv(last.utoy(),src2.vtoy()) : last
}
function Yoda_Lutxy12_aux(clip src, int "y", int "u", int "v", bool "up")
{
expr = (up) ? "x 247 > 0 x 16 / round 16 * ?" : "x 247 > 0 x 16 / round 128 + ?"
src_lsb=src.Dither_get_lsb()
lsb_l=src_lsb.Mt_lut(expr, y=y , u=u, v=v)
lsb_r=src_lsb.Mt_lut("x 247 > 129 128 ?", y=y , u=u, v=v)
msb_l=src.Dither_get_msb().mt_adddiff(lsb_r, y=y , u=u, v=v)
stackvertical(msb_l,lsb_l)
}
Function Yoda_Lutxy12_get (clip "s1_msb", clip "s2_msb", clip "ss_lsb",
\ string "expr", string "yexpr", string "uexpr", string "vexpr",
\ int "y", int "u", int "v", bool "gmsb")
{
expr = Default (expr, "x")
yexpr = Default (yexpr, expr)
uexpr = Default (uexpr, expr)
vexpr = Default (vexpr, expr)
gmsb = Default(gmsb, False)
expr = Yoda_lut12_expr (expr, gmsb)
yexpr = Yoda_lut12_expr (yexpr, gmsb)
uexpr = Yoda_lut12_expr (uexpr, gmsb)
vexpr = Yoda_lut12_expr (vexpr, gmsb)
y = (Defined (y) && y < 0) ? (gmsb) ? y / 256 : y % 256 : y
u = (Defined (u) && u < 0) ? (gmsb) ? u / 256 : u % 256 : u
v = (Defined (v) && v < 0) ? (gmsb) ? v / 256 : v % 256 : v
mt_lutxyz (s1_msb, s2_msb, ss_lsb, expr=expr, yexpr=yexpr,
\ uexpr=uexpr, vexpr=vexpr, y=y, u=u, v=v)
}
Function Yoda_lut12_expr (string expr, bool gmsb)
{
repstr1 = " x 256 * z z 16 % - + "
repstr2 = " y 256 * z 16 % 16 * + "
expr = Dither_replace_string (" " + expr, " x", repstr1)
expr = Dither_replace_string (" " + expr, " y", repstr2)
part = Dither_expr_part (gmsb)
expr = expr + part
return (expr)
}
#################################
########## Yoda_Lutxy16_8 ##########
#################################
function Yoda_Lutxy16_8(clip src, clip src2, string "expr", string "yexpr",
\ string "uexpr", string "vexpr", int "y", int "u", int "v")
{
s_lsb = src.Dither_get_lsb()
s_msb = src.Dither_get_msb()
s2_c = src2.Dither_convert_8_to_16()
clip_msb = Yoda_Lutxy16_8_get(s_msb, src2, s_lsb, expr,
\ yexpr, uexpr, vexpr, y, u, v, True)
clip_lsb = Yoda_Lutxy16_8_get(s_msb, src2, s_lsb, expr,
\ yexpr, uexpr, vexpr, y, u, v, False)
stackvertical(clip_msb, clip_lsb)
#handling chroma planes if y,u or v are 2 or 4
(Defined (y)) ? (y == 2) ? MergeLuma(src) :
\(y == 4) ? MergeLuma(src2) : last : last
(Defined (u)) ? (Defined (v)) ? (u == 2 && v == 2) ? MergeChroma(src) :
\(v == 2) ? ytouv(last.utoy(),src.vtoy()) :
\(u == 2) ? ytouv(src.utoy(),last.vtoy()) : last :
\(u == 2) ? ytouv(src.utoy(),last.vtoy()) : last :
\(Defined (v) && v == 2) ? ytouv(last.utoy(),src.vtoy()) : last
(Defined (u)) ? (Defined (v)) ? (u == 4 && v == 4) ? MergeChroma(src2) :
\(v == 4) ? ytouv(last.utoy(),src2.vtoy()) :
\(u == 4) ? ytouv(src2.utoy(),last.vtoy()) : last :
\(u == 4) ? ytouv(src2.utoy(),last.vtoy()) : last :
\(Defined (v) && v == 4) ? ytouv(last.utoy(),src2.vtoy()) : last
}
Function Yoda_Lutxy16_8_get (clip "s1_msb", clip "src2", clip "s1_lsb",
\ string "expr", string "yexpr", string "uexpr", string "vexpr",
\ int "y", int "u", int "v", bool "gmsb")
{
expr = Default (expr, "x")
yexpr = Default (yexpr, expr)
uexpr = Default (uexpr, expr)
vexpr = Default (vexpr, expr)
gmsb = Default(gmsb, False)
expr = Yoda_lut16_8_expr (expr, gmsb)
yexpr = Yoda_lut16_8_expr (yexpr, gmsb)
uexpr = Yoda_lut16_8_expr (uexpr, gmsb)
vexpr = Yoda_lut16_8_expr (vexpr, gmsb)
y = (Defined (y) && y < 0) ? (gmsb) ? y / 256 : y % 256 : y
u = (Defined (u) && u < 0) ? (gmsb) ? u / 256 : u % 256 : u
v = (Defined (v) && v < 0) ? (gmsb) ? v / 256 : v % 256 : v
mt_lutxyz (s1_msb, src2, s1_lsb, expr=expr, yexpr=yexpr,
\ uexpr=uexpr, vexpr=vexpr, y=y, u=u, v=v)
}
Function Yoda_lut16_8_expr (string expr, bool gmsb)
{
repstr1 = " x 256 * z + "
repstr2 = " y 256 * "
expr = Dither_replace_string (" " + expr, " x", repstr1)
expr = Dither_replace_string (" " + expr, " y", repstr2)
part = Dither_expr_part (gmsb)
expr = expr + part
return (expr)
}
removed all ">>" "<<" stuff to make them faster.
cretindesalpes
3rd June 2014, 22:58
Dither 1.26.0 (http://forum.doom9.org/showthread.php?p=1386559#post1386559):
Modded versions of dfttest and MVTools2 aren’t bundled with Dither anymore. Get them separately (at the same location).
Added sigmoid curves to Dither_y_gamma_to_linear and Dither_y_linear_to_gamma.
Added Dither_sigmoid_direct and Dither_sigmoid_inverse functions.
Added the sigmoid parameter to Dither_srgb_display.
Dither_y_gamma_to_linear and Dither_y_linear_to_gamma now process data contained in the chroma planes when u or v are set to 3, instead of just copying them.
— * —
Motenai Yoda:
Thanks. I’ll check it later.
Sparktank
9th June 2014, 08:39
Dither 1.26.0
dither-1.26.1
http://i.imgur.com/T5dSeWQ.gif <strike>Is the update a minor thing? I hadn't even noticed it changed versions until I had to update my laptop (low priority udpates).</strike>
EDIT: Ah, the small change doesn't affect my normal work environment.
Here's what the changelog says in the doc for those who are interested:
v1.26.1, 2014.06.05
Fixed a wrong saturation in Dither_sub16 on the last pixels of a clip whose width is not mod-8.
Motenai Yoda
30th June 2014, 20:57
@cretindesalpes can u optimize luts by set uexpr and vexpr?
if expr is set then even with u=1, v=1 or chroma="copy", uexpr and vexpr will be calculated (at least with 06_taro's mod).
ie
yexpr = (Defined (y) && (y != 3)) ? "x" : yexpr
uexpr = (Defined (u) && (u == 3)) ? uexpr : "x"
vexpr = (Defined (v) && (v == 3)) ? vexpr : "x"
colours
1st July 2014, 05:47
Calculating uexpr and vexpr is effectively free since it only happens during initialisation unless you're using Dither_lut16/etc. in ScriptClip (or other runtime filtering scenarios).
In that case, what you should be doing is to figure out how to avoid runtime filtering instead of performing what would be a microoptimisation for normal people doing normal filtering.
Edit: Someone reminded me that tp7's Masktoolsv2 fork (https://github.com/tp7/masktools) doesn't generate unnecessary LUTs, which may be more relevant than what I wrote above.
Motenai Yoda
2nd July 2014, 04:25
Calculating uexpr and vexpr is effectively free since it only happens during initialisation unless you're using Dither_lut16/etc. in ScriptClip (or other runtime filtering scenarios).
yep but for some of my scripts it takes up to 30 mins to initialize (without any ScriptClip).
Edit: Someone reminded me that tp7's Masktoolsv2 fork (https://github.com/tp7/masktools) doesn't generate unnecessary LUTs, which may be more relevant than what I wrote above.
:eek: I definitively will try it!
That guy is making a lot of interesting stuff.
tormento
3rd July 2014, 15:31
:eek: I definitively will try it!
That guy is making a lot of interesting stuff.
Any compiled build around to test?
Reel.Deel
3rd July 2014, 17:33
Any compiled build around to test?
Check under the GitHub release section (https://github.com/tp7/masktools/releases); also for future reference this is the discussion thread: http://forum.doom9.org/showthread.php?t=169832
StainlessS
4th August 2014, 18:51
Just thought I'de point out that FFTW library used by eg FFT3DFilter as fftw3.dll and dftTest as libfftw3f-3.dll (same dll, just different name)
has been updated twice since the one included in dither tools. Last update March 16 2014, v3.3.4. http://www.fftw.org/
TheProfileth
17th August 2014, 02:03
I would like to report a bug regarding Dither_median16 when I use dither_median16 if I set rt=0 and setting rx=1 and ry =1 then the output seems to be broken like it is all black except for about one line, however if I set rx and ry to something higher than 1 and leave rt set to 0 it outputs as expected, the same happens if you simply set rt=1 while rx=1 and ry=1. The weird thing about this behavior is that you can only exhibit it by using the default settings of the function which specifically say
Dither_median16 (
clip src,
int rx (1),
int ry (1),
int rt (0),
int ql (undefined),
int qh (undefined),
int y,
int u,
int v
)
I used this to repeatedly recreate the problem
Dither_convert_8_to_16
Dither_median16()
ditherpost(mode=-1)
asarian
27th August 2014, 08:00
(Original reply replaced by this Dither presentation.)
Download
>>>> dither-1.26.1.zip <<<< (http://ldesoras.free.fr/src/avs/dither-1.26.1.zip)
Main scripts and plug-ins from the Dither package, including avstp.dll.
Is it just me, or has the Dither download site disappeared?!
Sparktank
27th August 2014, 08:13
Is it just me, or has the Dither download site disappeared?!
Yes, it seems down (for now).
http://www.downforeveryoneorjustme.com/http://ldesoras.free.fr
Site Status reports a specific error: 500 (timeout)
http://www.sitestatus.net/
I'm sure it's temporary for now.
EDIT: teh actual domain "free.fr" is up.
http://www.isitdownrightnow.com/free.fr.html
asarian
27th August 2014, 08:17
Yes, it seems down (for now).
http://www.downforeveryoneorjustme.com/http://ldesoras.free.fr
Site Status reports a specific error: 500 (timeout)
http://www.sitestatus.net/
I'm sure it's temporary for now.
EDIT: teh actual domain "free.fr" is up.
http://www.isitdownrightnow.com/free.fr.html
Thx. :)
asarian
27th August 2014, 09:31
(Original reply replaced by this Dither presentation.)
Download
>>>> dither-1.26.1.zip <<<< (http://ldesoras.free.fr/src/avs/dither-1.26.1.zip)
Main scripts and plug-ins from the Dither package, including avstp.dll.
>>>> dfttest 1.9.4 <<<< (http://ldesoras.free.fr/src/avs/dfttest-1.9.4.zip)
Mod16 version of dfttest.
>>>> MVTools 2.6.0.5 <<<< (http://ldesoras.free.fr/src/avs/mvtools-2.6.0.5.zip)
Mod16 version of MVTools 2
Masktools 2 a48 (http://manao4.free.fr/) or above is required. Previous Masktools versions will silently fail and cause the greenish screen of death. Please update your Masktools before installing the Dither script.
Hmm, if I'm to believe my hover-text, my MaskTools are still at 1.15.10 (I could have sworn they were at 2 a48). They're on the same French site, though, which is still down. There used to be an AviSynth filter repository, iirc.
feisty2
27th August 2014, 10:23
@asarian
I copied all those stuff from my plugins folder, hope it helps for now.
https://www.sendspace.com/file/i4atjp
asarian
27th August 2014, 10:36
@asarian
I copied all those stuff from my plugins folder, hope it helps for now.
https://www.sendspace.com/file/i4atjp
Thank you!! Got it! :)
asarian
27th August 2014, 13:31
Dither requires Masktools 2 alpha 48 or later, and asks me to remove mt_masktools.dll, mt_masktools-25.dll and mt_masktools-26.dll. When I do, however, QTGMC throws an error:
"There is no function called mt_makediff."
Is there way to use Masktools 2 a48, Dither, AND mt_masktools-25.dll?!
Thanks.
feisty2
27th August 2014, 13:34
delete mt_masktools-25.dll and update to avisynth 2.6 or avs+
asarian
27th August 2014, 14:57
delete mt_masktools-25.dll and update to avisynth 2.6 or avs+
Upgraded everything to 2.6. Still getting:
"There is no function named mt_makediff."
On using QTGMC. I supposed I could find an older version of mt_masktools-26 again, but Dither specifically says to remove it.
EDIT: French site is up again. :) Found the missing dll and installed it again! :)
feisty2
27th August 2014, 15:11
Upgraded everything to 2.6. Still getting:
"There is no function named mt_makediff."
On using QTGMC. I supposed I could find an older version of mt_masktools-26 again, but Dither specifically says to remove it.
EDIT: French site is up again. :) Found the missing dll and installed it again! :)
how many masktools dll files are placed in your plugins folder, you can only put one in the folder and delete all the rest
asarian
27th August 2014, 15:16
how many masktools dll files are placed in your plugins folder, you can only put one in the folder and delete all the rest
I was able to download the full masktools just now, so I installed just mt_masktools-26 now, and it's working again. :)
I'm getting this error on your script, now, though:
Eedi3 does not have a named clip 'mclip'
I still have an eedi3 0.9.1 (for 2.5, it says); but link to the same version at least is dead too.
feisty2
27th August 2014, 15:18
I was able to download the full masktools just now, so I installed just mt_masktools-26 now, and it's working again. :)
I'm getting this error on your script, now, though:
Eedi3 does not have a named clip 'mclip'
I still have an eedi3 0.9.1 (for 2.5, it says); but link to the same version at least is dead too.
you need eedi3mod like I said in your upscale thread, its way much faster
asarian
27th August 2014, 15:20
you need eedi3mod like I said in your upscale thread, its way much faster
Sorry, my bad, missed that. :o
asarian
27th August 2014, 19:03
Odd. Seems Dither_Convert_8_to_16 () doubles my vertical resolution (not horizontal). Is it supposed to do that?
foxyshadis
28th August 2014, 00:06
16-bit in avisynth is done that way, the first 8 bits of each pixel in one half and the other 8 bits in the other, called stack16.
asarian
28th August 2014, 03:29
16-bit in avisynth is done that way, the first 8 bits of each pixel in one half and the other 8 bits in the other, called stack16.
Huh. That's strange. :) So, if you end your script with Dither_Convert_8_to_16 (), and start to encode it (with, say, x264, like I did), you'll wind up with a doubled vertical resolution?! That can't be right.
Or is Dither_Convert_8_to_16 () just meant as some sort of intermediate (internal) state?
feisty2
28th August 2014, 04:07
Huh. That's strange. :) So, if you end your script with Dither_Convert_8_to_16 (), and start to encode it (with, say, x264, like I did), you'll wind up with a doubled vertical resolution?! That can't be right.
Or is Dither_Convert_8_to_16 () just meant as some sort of intermediate (internal) state?
double height is a hack in avisynth used to convey 16bpc clips on 8bpc colorspaces, the "normal" image on the upper half is called "MSB" (first 8bits of each channel), the crappy look stuff on the lower half is called "LSB" (9-16 bits of each channel) with MSB+LSB stacked together, the clip is actually at 16bpc precision, not common 8bpc precision, "ditherpost" I wrote in your upscale thread will accept 16bpc format image and dither it to 8bpc so you can encode the video directly
foxyshadis
28th August 2014, 04:29
x264-tmod (https://astrataro.wordpress.com/2014/04/24/x264-rev2431-tmod/) and avs4x264mod (https://astrataro.wordpress.com/2013/08/31/avs4x264mod-0-9-1/) can both read 16-bit avisynth scripts without dithering to 8-bit first. (They'll internally dither to either 8 or 10 bit, whichever one you encode with.) Ditherpost should only be used if you have to have 8bit output on the other end.
feisty2
28th August 2014, 04:45
I know, I just don't wanna confuse asarian who seems hasn't used ditherpackage before :)
asarian
28th August 2014, 05:53
x264-tmod (https://astrataro.wordpress.com/2014/04/24/x264-rev2431-tmod/) and avs4x264mod (https://astrataro.wordpress.com/2013/08/31/avs4x264mod-0-9-1/) can both read 16-bit avisynth scripts without dithering to 8-bit first. (They'll internally dither to either 8 or 10 bit, whichever one you encode with.) Ditherpost should only be used if you have to have 8bit output on the other end.
Thank you both for your detailed explanations! :)
Sparktank
28th August 2014, 15:25
avs4x264mod (https://astrataro.wordpress.com/2013/08/31/avs4x264mod-0-9-1/)
Just today, Taro updated it and renamed it.
avs4x26x (https://astrataro.wordpress.com/2014/08/28/avs4x26x-0-10-0/)
It now supports x265, x264 and x262, why the renaming of the tool.
cretindesalpes
29th August 2014, 20:04
I would like to report a bug regarding Dither_median16
Oh! Sorry. Thanks for the report. Fixed in Dither 1.26.2 (http://forum.doom9.org/showthread.php?p=1386559#post1386559).
asarian
31st August 2014, 23:25
May I ask, in
src.DitherPost (mode=6, y=3, u=1, v=1)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
MergeRGB (r, g, b)
}
What is the function of the SelectEvery() here? I thought that was just for interlaced and pulldown stuff.
Thanks.
feisty2
1st September 2014, 00:43
May I ask, in
src.DitherPost (mode=6, y=3, u=1, v=1)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
MergeRGB (r, g, b)
}
What is the function of the SelectEvery() here? I thought that was just for interlaced and pulldown stuff.
Thanks.
it's for rgb48y format, a hacked format to store 16bpc rgb on y8 colorspace, r channel g channel and b channel are interleaved on the y plane of 3 neighbor frames, so need to merge 3 neighbor frames together to restore the correct rgb image
feisty2
1st September 2014, 00:50
rgb48y is a dope hack, with this format, you can convert your clips to rgb colorspace and still use common yuv only filters on them, filtering in rgb can return significantly better results usually
Motenai Yoda
4th September 2014, 10:34
Any alternative to Dither_median16() for mt_inpand or mt_expand at 16bit?
feisty2
4th September 2014, 11:08
are you sure there are mt_inpand and mt_expand tools at 16bpc?
Motenai Yoda
4th September 2014, 11:47
are you sure there are mt_inpand and mt_expand tools at 16bpc?
I mean for something like mt_inpand and mt_expand, actually Dither_Median16 is quite slow.
@cretindesalpes I found some shift/distortion caused by Dither_Resize16 used with Dither_Box_Filter16
ie
imagesource("4.2.03.tiff")
converttoyv12()
StackHorizontal(last,last,last,last)
http://www.imagebam.com/image/3180fd349209628
imagesource("4.2.03.tiff")
converttoyv12()
StackHorizontal(last,last,last,last)
Dither_convert_8_to_16()
orig=last
Dither_resize16(2500,height/2)
Dither_box_filter16(radius=2, y=3, u=3, v=3)
Dither_resize16(orig.width,orig.height/2)
ditherpost()
http://www.imagebam.com/image/577eab349209579
(look at about (2048/2500)*2048)
edit: ok isn't related to Dither_Resize16 anyway, that's something Dither_Box_Filter16 shows about at 2048th column.
I fixed this way for now...
Function Dither_Box_Filter16_Fixed(clip c, int "radius", int "y", int "u", int "v")
{
part1=c.crop(0,0,c.width/2 + 96,0).Dither_box_filter16(radius=radius, y=y, u=u, v=v)
part2=c.crop(c.width/2 - 96,0,0,0).Dither_box_filter16(radius=radius, y=y, u=u, v=v)
return stackhorizontal(part1.crop(0,0,c.width/2,0),part2.crop(96,0,0,0))
}
feisty2
4th September 2014, 12:07
http://forum.doom9.org/showthread.php?t=169832
MedianBlur2 is an 8bpc version of dither_median16, and works very fast
Motenai Yoda
4th September 2014, 12:24
http://forum.doom9.org/showthread.php?t=169832
MedianBlur2 is an 8bpc version of dither_median16, and works very fast
well but I need something that replace the target pixel with the min or max pixel from the 3×3-pixel reference square with 16bpc in/out.
Dither_median16 can do this as
Dither_median16(ql=0,qh=0) or Dither_median16(ql=8,qh=8)
but isn't optimized at all.
tormento
5th September 2014, 09:12
Just thought I'de point out that FFTW library used by eg FFT3DFilter as fftw3.dll and dftTest as libfftw3f-3.dll (same dll, just different name)
has been updated twice since the one included in dither tools. Last update March 16 2014, v3.3.4. http://www.fftw.org/
A bit off topic but can't understand difference between libfftw3-3.dll, libfftw3f-3.dll and libfftw3l-3.dll. Which should I use?
Sparktank
5th September 2014, 09:36
libfftw3-3.dll,
libfftw3f-3.dll,
and libfftw3l-3.dll
The "Readme-Windows" doc (of FFTW) in the source says:
There are three libraries:
single precision (float),
double precision,
and extended precision (long double).
And the header file designates them as:
fftw = double precision
fftwf = single precision (float)
fftwl = extended precision (long double)
The dfttest "Readme" doc (of dfttest) says to use the "f" version.
Requires libfftw3f-3.dll to be in the search path.
fftwf = single precision (float)
Sparktank
5th September 2014, 09:54
There's also this post...
Regarding FFTW3.dll, I found this: http://forum.doom9.org/showthread.php?t=156028 , near the bottom of the first post.
It seems that you can rename libfftw3f-3.dll to fftw3.dll if you want to upgrade.
I don't know how MAnalyse uses fftw3 so it's not certain that there actually are any changes, but I'll see if anything weird happens anyway.
Boulder hasn't reported back any problems, so I assume that works, too.
Boulder
5th September 2014, 10:06
Yep, no problems here. I don't recall which version I have but I'd assume any recent version will work.
cretindesalpes
5th September 2014, 18:55
I found some shift/distortion caused by […] Dither_Box_Filter16
Thanks for the report. Fixed in Dither 1.26.3 (http://forum.doom9.org/showthread.php?p=1386559#post1386559).
colours
6th September 2014, 19:36
http://forum.doom9.org/showthread.php?t=169832
MedianBlur2 is an 8bpc version of dither_median16, and works very fast
The reason it's "very fast" is because it's assembly optimised. Dither_median16 isn't, and also uses a full sort instead of a fast selection algorithm like quickselect.
Motenai Yoda: If you're looking to getting fast 16-bit mt_xxpand equivalents, but don't know how to write code to do this, it wouldn't be difficult to hack something up using CLExpr (assuming you can use OpenCL). Probably something like cl_exprxyz(last,pointresize(width,height,-1),pointresize(width,height,1),"x y z max max",lsb=true).
asarian
11th September 2014, 05:19
Speaking of speed, whilst I love the Dither package, I noticed Dither_resize16() and Dither_resize16nr() are rather slow.
Is there a way to speed them up maybe? (special MT mode, GPU assistence, etc).
Thanks.
feisty2
11th September 2014, 05:38
rather slow? dither_resize16 runs faster than realtime processing on my computer when upscaling 480p to 1080p
asarian
12th September 2014, 00:27
rather slow? dither_resize16 runs faster than realtime processing on my computer when upscaling 480p to 1080p
Probably related to MT mode again, I reckon. in Mode 1 it runs much faster. :)
asarian
12th September 2014, 00:32
On a more serious note, seems SmoothGrad() wreaks havoc a bit on more darker areas:
SmoothGrad() de-GRAD-ation (https://www.dropbox.com/s/2cfcfrtpwy3gmp1/smoothgrad.jpg?dl=0)
Obviously it lessens the amount of banding (already present in the source); but all gets so smudged, that the darker areas almost disappear.
I didn't use it with a vector or anything, just a single SmoothGrad() call over everything.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.