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. |
19th August 2011, 05:14 | #261 | Link |
Registered User
Join Date: Jul 2011
Posts: 32
|
How do you do the pfclip? I want to use blur() but any other examples are welcome. I finally saw this in the dither doc and it looks pretty good. It says invalid arguments to function blur. I also tried it x 4 and as a variable.
Code:
o = last Dither2Pre ("TTempSmoothf(maxr=2,lthresh=40,cthresh=40,strength=2,scthresh=32,pfclip=last.blur())", overlap=0, tvopt=true) Last edited by atra dies; 19th August 2011 at 05:16. |
19th August 2011, 05:41 | #262 | Link | ||
Registered User
Join Date: Nov 2007
Posts: 54
|
Quote:
Script Code:
gradfun3 #modified version where (result = last) instead of DitherPost() Interleave (Dither_get_lsb (), Dither_get_msb ()) TurnRight () AssumeFieldBased ().AssumeTFF () Weave () TurnLeft () Quote:
Theoretically, which one do you think is better? I hope the bug get solved soon. |
||
19th August 2011, 08:55 | #263 | Link | |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
If your 8-bit source is untouched (no use of GradFun3), both methods are (should be) equivalent. If you use GradFun3, direct 16->10 bits encoding should give better results than 16->8->10 via DitherPost().
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|
22nd August 2011, 03:28 | #264 | Link |
Registered User
Join Date: Jul 2011
Posts: 32
|
Nevermind, I'm going with mdegrain sharp=2 if anything (and maybe pel=4).
I assume the output of dither 8 to 16 is supposed to have a plain green LSB(should be black?)? Can 8 bit filters be used on msb and lsb separately (I remember you said something about processing luma separately) or is the lsb too sensitive (you mentioned protecting it with unsharp mask)? Or is it better to sharpen outside in 8 bit cause of artifacts. I'm thinking of limitedsharpenfaster here. By the way for anyone wandering in and you don't know like me a few seconds ago, this is how you generate 16 bit with mdegrain, add lsb=true at the end. Does this process it in 16 bits or just output 16 bits? <-May be a stupid question like most of them. Code:
super = MSuper(pel=4, sharp=2) backward_vec2 = MAnalyse(super, blksize=4,isb = true, delta = 1, overlap=0,temporal=true) forward_vec2 = MAnalyse(super, blksize=4,isb = false, delta = 1, overlap=0,temporal=true) MDegrain1(super, backward_vec2,forward_vec2,thSAD=400,lsb=true) or super = MSuper(pel=4, sharp=2) backward_vec2 = MAnalyse(super, isb = true, blksize=4,delta = 2, overlap=0,temporal=true) backward_vec1 = MAnalyse(super, isb = true, blksize=4,delta = 1, overlap=0,temporal=true) forward_vec1 = MAnalyse(super, isb = false, blksize=4,delta = 1, overlap=0,temporal=true) forward_vec2 = MAnalyse(super, isb = false, blksize=4,delta = 2, overlap=0,temporal=true) MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,lsb=true) Can ditherpost or some other step convert to yuy2 or is it fine for avisynth to do that. I thought I saw that there was a bug with that command or was that just for interlaced true? Also I'm seeking opinions on whether users remove 16mm grain mpeg2 blocking or leave as is since it is considered resolution by some. Last edited by atra dies; 23rd August 2011 at 05:08. |
24th August 2011, 00:24 | #265 | Link | ||||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
Quote:
Quote:
Quote:
・ ・ ・ ・・・————◇◆◇————・・・ ・ ・ ・ Dither 1.10.0 released:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
||||
24th August 2011, 22:54 | #266 | Link | |
Registered User
Join Date: Sep 2009
Posts: 378
|
cretindesalpes, excellent update. :-)
I have a bit of a query regarding spiking luma using Dither_y_gamma_to_linear function and conversion to RGB. :-) I have two test video's, ones a h264 AVC off a Canon HDSLR and the other off a HDV camera both sources converted with Dither 1.10 and piped through avs2yuv to ImageMagick Q16 hdri build. Writing 16bit tifs & exr's. Using a 709 curve with the h264AVC (BT601 Color Matrix, full range luma, 709 transfer curve) gives me spiked luma histogram, using the srgb curve doesn't. But with the HDV video source (BT709 Color Matrix, full range luma, BT709 transfer curve) whether I use srgb or 709 curve both give smooth luma histogram and definite variation in 'exposure' which I anticipated. The basis of the scripts is: Quote:
What could be causing the spiking luma with the h264? I thought the problem lay with Imagemagick colorspace handling but that appears to be ok, considering HDV source works fine. Thanks again for a great update. Last edited by Yellow_; 24th August 2011 at 22:57. |
|
25th August 2011, 10:41 | #267 | Link | |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|
25th August 2011, 13:34 | #268 | Link | |
Registered User
Join Date: Sep 2009
Posts: 378
|
Quote:
I wonder why I'm seeing this spikes when using rec709 inverse curve with h264 but not HDV, could this be more to do with compression type HDV vs h264, I don't see spikes with HDV so could this be luma deadzone quantisation in the h264 maybe? The h264 bitrate is about 44Mbps compared to 20Mbps for the HDV, both consumer 4:2:0. |
|
25th August 2011, 19:42 | #270 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
In static mode, the noise will remain the same and depends only on the frame size. The seed of random number generator is reset at the same value at the beginning of each plane. Therefore setting the seed explicitly is not needed.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
25th August 2011, 20:28 | #272 | Link | |
Registered User
Join Date: Sep 2009
Posts: 378
|
Quote:
Once I apply gamma correction (rec709 or srgb) after compositing (32bit float), histogram smooths again. :-) I guess some sort of levels smoothing would happen using other Dither functions, a denoiser or such? |
|
26th August 2011, 19:55 | #274 | Link | ||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
Quote:
Code:
ShowRed ("YV12") # Or ConvertToYV12(matrix="PC.709") StackVertical (last.BlankClip (color_yuv=0), last) DitherPost (mode=7, u=1, v=1) mt_binarize (threshold=0, u=-128, v=-128) EDIT: For much more accurate results, dither in linear light by replacing the StackVertical() with: Code:
Dither_convert_8_to_16 () Dither_y_gamma_to_linear (tv_range_in=false, tv_range_out=false, curve="srgb", u=1, v=1) Dither_lut16 ("x 256 /", u=1, v=1)
__________________
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; 26th August 2011 at 20:21. |
||
26th August 2011, 20:42 | #275 | Link |
Registered User
Join Date: Nov 2006
Posts: 90
|
Thanx! I thought about StackVertical-DitherPost-mt_binarize(or mt_lut) too.
Oh my god, i missed this - Dither_lut8, Dither_lutxy8, Dither_lutxyz8, Dither_lut16! cretindesalpes may be possible made full 16bit (MSB/LSB) mod of masktools? |
27th August 2011, 17:23 | #276 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Hello cretindesalpes, Im having problems with a source. Im trying to convert yuv to rgb32 skipping chroma planes all along, (output is greyscale). The code Im more confident with is the next but I tried many variations with no success:
Code:
SmoothGrad (thr=0.25, radius=16, stacked=true,u=1,v=1) Dither_convert_yuv_to_rgb(lsb_in=true,tv_range=true,output="rgb48y") ditherpost(mode=6,ampn=0.5,y=3,u=-128,v=-128) MergeRGB(SelectEvery(3,0),SelectEvery(3,1),SelectEvery(3,2))
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 27th August 2011 at 21:19. |
28th August 2011, 07:51 | #277 | Link |
SIEGE
Join Date: Jan 2011
Posts: 3
|
I am getting a ghosting problem that I do not remember seeing before. I am just using the basic
Code:
dfttest (lsb=true) DitherPost () |
28th August 2011, 09:44 | #278 | Link | |||
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
Quote:
I don't think so. It's a huge amount of work. Moreover, straight multi-dimension 16-bit look-up tables wouldn't work because their size would be squared (hundreds of terabytes for a single lut_xyz16). Quote:
Quote:
Code:
SmoothGrad (thr=0.25, radius=16, stacked=true,u=1,v=1) Dither_lut16 ("x 4096 - 219 / 255 *", u=1, v=1) # TV range -> Full range ditherpost(mode=6,ampn=0.5,y=3,u=1,v=1) MergeRGB (last, last, last)
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|||
28th August 2011, 16:07 | #279 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Yeah, that was the problem, I couldn't use greyscale to LSB, besides LSB also stores chroma modification values. I also tried with u and v = -128 but output was also green. Also tried copying luma to the r,g,b channels but I missed the tv range thing, so THANKS a lot, this is something I already asked in the smoothadjust thread (equation of range conversion).
Im also interested in your opinion on my previous post The main problem was floyd dithering on non mdegrain'ed areas (where there is motion) EX01. I came up with the EX04 workaround so ordered dithering is always used, does the logic work or you see any flaws in the code? I have in sight modifying my smdegrain mod upon your observations...
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread Last edited by Dogway; 28th August 2011 at 22:43. |
29th August 2011, 18:29 | #280 | Link | |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
If the output clip is 16 bits, filling values have to be 16 bits too, so it's u and v = -128*256
Quote:
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
|
Tags |
color banding, deblocking, noise reduction |
Thread Tools | Search this Thread |
Display Modes | |
|
|