Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
23rd July 2011, 08:45 | #222 | Link | |||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
Quote:
Quote:
What do you mean "v&c"? SilaSurfer & mandarinka: thank you for your kind words.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|||
23rd July 2011, 16:45 | #223 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Void & Cluster algo. I also recall reading something related to it a few months ago, but I can't talk since I have no idea on dither algorithms. Did you test it?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
23rd July 2011, 17:21 | #224 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
OK. No, I haven't tested it yet.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
24th July 2011, 17:16 | #225 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
I had some time to look at making work nnedi with dither. I also wanted to contrasharp after dfttest and before nnedi so I mixed both workarounds. Can you confirm it is correct?
I also added a mask for nnedi because it was introducing some banding/artifacts at flat/gradient areas... This is ultimately going to be processed by smdegrain(lsb=true) so I dither it down to mode=6. Is this ok, or should I use mode=-1? Code:
raw=last predf=dfttest(sigma=10,tbsize=1,lsb=true) post=predf.ditherpost(mode=-1) contr=Contrasharpening(post,raw).LSFmod(defaults="slow",strength=30,edgemode=1,soothe=true,ss_x=1.0,ss_y=1.0) spl=contr.Spline36Resize(640,360) nn=contr.nnedi3_rpow2(rfactor=2,cshift="spline64resize",nns=4,qual=2,pscrn=4) hop=mt_edge (mode="prewitt", thY1=10, thY2=30).mt_expand.BilinearResize(640,360) nn=mt_merge(spl,nn,hop, luma=true, y=3) mask=DitherBuildMask(contr, post) sharped=Dither_merge16_8(predf,contr.Dither_convert_8_to_16,mask).Dither_resize16(640,360,kernel="spline36") mask2=DitherBuildMask(nn,spl) Dither_merge16_8(sharped,nn.Dither_convert_8_to_16,mask2) DitherPost(mode=6,prot=true)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
24th July 2011, 18:14 | #226 | Link |
Registered User
Join Date: Oct 2009
Posts: 212
|
Error diffusion modes (6,7,8) are awasome when using high bitrates, otherwise mode (0) 8-bit ordered dither + noise (Bayer matrix) accept that I don't use ampn setting but rather ampo (~0.5) when using higher compression.
|
25th July 2011, 03:22 | #228 | Link |
Registered User
Join Date: Jul 2011
Posts: 32
|
I'm testing some images from here:
http://www.4p8.com/eric.brasseur/gamma.html Code:
ImageReader("C:\gamma_colors.jpg") Dither_convert_rgb_to_yuv(matrix="601",tv_range=false,lsb=false) Dither_convert_8_to_16() Dither_y_gamma_to_linear(false,false) Dither_resize16(128,192) Dither_y_linear_to_gamma(false,false) DitherPost(mode=-1) I modified the linear to gamma function to process chroma but that didn't change anything. Is chroma on the power scale too? Is this plugin built just for yv12 or should it work for rgb the same way? It could be something I don't know about because I haven't read much about it. |
25th July 2011, 08:12 | #229 | Link | |||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Yes at the first glance it looks correct, but this becomes a bit complicated to follow... Anyway, I would have extracted the "hop" edge mask from the nnedi result rather than from the original picture, although I don't know if it makes a significant difference.
Quote:
Quote:
Code:
ImageReader ("gamma_colors.jpg") Interleave (ShowRed ("YV12"), ShowGreen ("YV12"), ShowBlue ("YV12")) Dither_convert_8_to_16() Dither_y_gamma_to_linear(false,false) # u=1, v=1 Dither_resize16(128, 192, u=1, v=1) Dither_y_linear_to_gamma(false,false) # u=1, v=1 DitherPost(mode=-1, u=1, v=1) MergeRGB (SelectEvery (3, 0), SelectEvery (3, 1), SelectEvery (3, 2)) Quote:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding Last edited by cretindesalpes; 27th July 2011 at 09:21. Reason: Removed u=1, v=1 in the gamma conversion, only available in the development version at the moment! |
|||
27th July 2011, 07:39 | #232 | Link | ||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
Quote:
Code:
bits = 4 # Valid range: 0 - 8 mul = String (Pow (2, 8 - bits)) Dither_convert_8_to_16() Dither_lut16 (expr="x "+mul+" /") DitherPost () mt_lut ("x "+mul+" *", y=3, u=3, v=3)
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
||
28th July 2011, 18:31 | #233 | Link |
Registered User
Join Date: Oct 2009
Posts: 212
|
Hello guys
cretindesalpes what would be better in your opinion. I'm doing some heavyweigth filtering Mvtools style on 1080p Bluray source that is going to be encoded to x264. But my processor wont handle that kind of stress (time to get I7 I guess ). I was thinking of doing a lossless pass and then going to x264 but should I use your dithering before the lossless pass or later on lossless source before feeding it to x264? Thanks in advance |
29th July 2011, 11:56 | #234 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
I think it doesn't matter much. DitherPost() is quite light on resource, compared with 1080p MC filtering. But if the output of your first lossless pass has a 16-bit depth, the generated file will be huge (compression of the LSB part is inefficient).
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
29th July 2011, 13:34 | #235 | Link | |
Registered User
Join Date: Oct 2009
Posts: 212
|
Quote:
Dither_convert_8_to_16 () Smoothgrad if needed DitherPost() |
|
30th July 2011, 01:43 | #236 | Link | |
Registered User
Join Date: Jul 2011
Posts: 32
|
Quote:
I am using it to smooth horrible compression artifacts, bands of blocks for flat animation colors and nothing removes it so completely as gradfun3 .66 strength and I tried a lot of filters and pp settings. For non-animation I have found that smoothd works wonders at removing lots of noise but blurs the picture, set adaptive mode to 1. Seems promising if someone used that principle for another filter let me know. (Edit: sorry, should have tried mdegrain2, it is great but slow and one of the mod16 filters.) Now I have to figure out where or if levels or regular denoisers can be done on linear gamma for most accurate results? Last edited by atra dies; 31st July 2011 at 03:03. |
|
31st July 2011, 10:47 | #237 | Link | |
Registered User
Join Date: Nov 2009
Posts: 2,361
|
Quote:
Anyway this is about the easy way. I guess I can do something like, process motion analysis over mode=6 dummy, and degrain over mode=0, implement this inside the smdegrain function as a "fake" lsb_in. In my last post I also wanted to tell you about something I observed. I didn't fully test so I was unsure to comment, but maybe you may want to check the fh and fv parameters of Dither_resize16 for next version. I think that in some occasions I couldn't get sharper results, maybe with small sources, downsizing or upsizing, can't remember. Can I assume >1.0 = sharper is always true? @atra dies: Lately I discovered how effective dfttest can be at deblocking, this is a known fact, but the tricky thing I found is that deblocking works more effective when tbsize=1 (no temporal). try dfttest(tbsize=1,sigma=10,lsb=true).ditherpost. Im very surprised (using it every day). It blurs a little but this is unavoidable, although you can (contra)sharpen afterwards. sigma=10 looks like a fixed value, you won't likely deblock more with higher values.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 31st July 2011 at 10:57. |
|
31st July 2011, 21:23 | #239 | Link | |
Oz of the zOo
Join Date: May 2005
Posts: 208
|
Quote:
Adding of grain should be performed only in areas altered by DitherPost, and proportionally of course, so that there wouldn't be any abrupt grain density changes. Currently I do so by using a motion-mask, so that moving areas get moving grain applied and still areas get constant grain, with the final result applied only to areas altered by GradFun3. Last edited by wOxxOm; 31st July 2011 at 21:26. |
|
1st August 2011, 13:40 | #240 | Link | |
Registered User
Join Date: Oct 2009
Posts: 212
|
Quote:
|
|
Tags |
color banding, deblocking, noise reduction |
|
|