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. |
26th May 2010, 15:42 | #201 | Link | |
Registered User
Join Date: Mar 2010
Location: Ukraine
Posts: 50
|
Quote:
that means further improving mvTools alhorithms can make deinterlacers quality significantly better
__________________
blendhater |
|
10th June 2010, 10:57 | #203 | Link |
Registered User
Join Date: Mar 2005
Posts: 65
|
I don't see a post for nnedi3, but I see here there is some questions about nnedi3, so I use this post.
Well, I am noticed in some videos that when I use nnedi3, in the top and in the bottom I see that crop an uncrop one or two pixels, and it is a bit disturb, because It's like the image tremble in the top and int the bottom. The rest of the image it's perfect. I play the video without deinterlacing it, and this effect doesnt happend, so the problem it seems nnedi3. If I use the internal yadif of ffdshow this effect doesnt happend. I use nnedi3 in the following way: nnedi3(field=3, dh=false, Y=true, U=true, V=true, nsize=4, nns=3, qual=1, pscrn=true, threads=0, opt=0) I try with nsize = 0 too and field = 2, although I know the video is top field first. Thanks. Daimroc. |
11th June 2010, 01:10 | #204 | Link | |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
Quote:
mergechroma(spline36resize(w,h,src_left=-.5,src_top=-.5,src_width=w,src_height=h), \ spline36resize(w,h,src_left=-1.0,src_top=-1.0,src_width=w,src_height=h)) Modify the src_ values to do your cropping. w = final width after crop, same for h. Last edited by foxyshadis; 11th June 2010 at 02:48. |
|
11th June 2010, 01:59 | #205 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
spline36resize(w,h,src_left=-.5,src_top=-.5,src_width=w,src_height=h) (And in any case I think the correct shift would be -1.0, not -1.5) |
|
11th June 2010, 02:48 | #206 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
He's not using chromashift, he specifically asked for a way to do it manually so it doesn't need a shift+crop or double shift.
Also, yes, you're correct about the 1.0, I'll fix that. Damn, I've been using -1.5 for weeks now. |
11th June 2010, 10:14 | #208 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
The values you gave (assuming 1.5 is corrected to 1.0) correspond to using field=1 and intermediate TurnRight. |
|
24th June 2010, 12:09 | #209 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,352
|
Any news about eedi3 optimization, at least multithreading? It has been 7 months since last update, I like it because it works great for agressive (animation) aliasing.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
24th June 2010, 19:38 | #210 | Link |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
I put up a new version of eedi3 http://bengal.missouri.edu/~kes25c/eedi3.zip. Source is included. It is multithreaded using openmp. I had made some changes to the defaults (alpha/beta) and reworked the reliability checking (vcheck). From the readme:
Code:
Info: eedi3 works by finding the best non-decreasing (non-crossing) warping between two lines by minimizing a cost functional. The cost is based on neighborhood similarity (favor connecting regions that look similar), the vertical difference created by the interpolated values (favor small differences), the interpolation directions (favor short connections vs long), and the change in interpolation direction from pixel to pixel (favor small changes). Functions: "eedi3", "c[field]i[dh]b[Y]b[U]b[V]b[alpha]f[beta]f[gamma]f[nrad]i [mdis]i[hp]b[ucubic]b[cost3]b[vcheck]i[vthresh0]f[vthresh1]f[vthresh2]f[sclip]c[threads]i" "eedi3_rpow2", "c[rfactor]i[alpha]f[beta]f[gamma]f[nrad]i[mdis]i[hp]b[ucubic]b [cost3]b[vcheck]i[vthresh0]f[vthresh1]f[vthresh2]f[cshift]s[fwidth]i[fheight]i[ep0]f[ep1]f[threads]i" Parameters: field/dh/y/u/v are the same as nnedi2/nnedi3. rfactor/cshift/fwidth/fheight/ep0/ep1 are the same as nnedi2_rpow2/nnedi3_rpow2. alpha/beta/gamma (defaults: 0.2,0.25,20.0): These trade off line/edge connection vs artifacts created. alpha and beta must be in the range [0,1], and the sum alpha+beta must be in the range [0,1]. alpha is the weight given to connecting similar neighborhoods.. the larger it is the more lines/edges should be connected. beta is the weight given to vertical difference created by the interpolation... the larger beta is the less edges/lines will be connected (at 1.0 you get no edge directedness at all). The remaining weight (1.0-alpha-beta) is given to interpolation direction (large directions (away from vertical) cost more)... so the more weight you have here the more shorter connections will be favored. Finally, gamma penalizes changes in interpolation direction, the larger gamma is the smoother the interpolation field between two lines (range is [0,inf]. If lines aren't getting connected than increase alpha and maybe decrease beta/gamma. Go the other way if you are getting unwanted artifacts. nrad/mdis (defaults: 2,20): nrad sets the radius used for computing neighborhood similarity. Valid range is [0,3]. mdis sets the maximum connection radius. Valid range is [1,40]. If mdis=20, then when interpolating pixel (50,10) (x,y), the farthest connections allowed would be between (30,9)/(70,11) and (70,9)/(30,11). Larger mdis will allow connecting lines of smaller slope, but also increases the chance of artifacts. Larger mdis will be slower. Larger nrad will be slower. hp/ucubic/cost3 (defaults: false, true, true): These are speed vs quality options. hp=true, use half pel steps, hp=false, use full pel steps. ucubic=true, use cubic 4 point interpolation, ucubic=false, use 2 point linear interpolation. cost3=true, use 3 neighborhood cost function to define similarity, cost3=false, use 1 neighborhood cost function. vcheck/vthresh0/vthresh1/vthresh2/sclip (defaults: 2, 32.0, 64.0, 4.0, NULL): vcheck settings: 0 - no reliability check 1 - weak reliability check 2 - med reliability check 3 - strong reliability check If vcheck is greater than 0, then the resulting interpolation is checked for reliability/consistency. Assume we interpolated pixel 'fh' below using dir=4 (i.e. averaging pixels bl and cd). aa ab ac ad ae af ag ah ai aj ak al am an ao ap eh el ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp fd fh fl ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp gd gh da db dc dd de df dg dh di dj dk dl dm dn do dp When checking pixel 'fh' the following is computed: d0 = abs((el+fd)/2 - bh) d1 = abs((fl+gd)/2 - ch) q2 = abs(bh-fh)+abs(ch-fh) q3 = abs(el-bl)+abs(fl-bl) q4 = abs(fd-cd)+abs(gd-cd) d2 = abs(q2-q3) d3 = abs(q2-q4) mdiff0 = vcheck == 1 ? min(d0,d1) : vcheck == 2 ? ((d0+d1+1)>>1) : max(d0,d1) mdiff1 = vcheck == 1 ? min(d2,d3) : vcheck == 2 ? ((d2+d3+1)>>1) : max(d2,d3) a0 = mdiff0/vthresh0; a1 = mdiff1/vthresh1; a2 = max((vthresh2-abs(dir))/vthresh2,0.0f) a = min(max(max(a0,a1),a2),1.0f) final_value = (1.0-a)*fh + a*cint ** If sclip is supplied, cint is the corresponding value from sclip. If sclip isn't supplied, then vertical cubic interpolation is used to create it. threads (default: 0): Sets the number of threads used by openmp. 0 = default (environment variable OMP_NUM_THREADS) > 0 = calls omp_set_num_threads(threads) Last edited by tritical; 24th June 2010 at 19:45. |
24th June 2010, 20:11 | #212 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Are we still supposed to use it like this:
Code:
eedi3(sclip=nnedi2())
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
25th June 2010, 02:45 | #213 | Link | |
Architect
Join Date: May 2010
Posts: 57
|
Thanks a lot for the multithreaded EEDI3!
Now I can do fine deinterlacing using supersampling with TGMC (in reasonable time ), like so: Code:
\ : (EdiMode=="EEDI3_SS") ? clp.eedi3(field=-2, sclip=clp.nnedi3(field=-2)).eedi3_rpow2(rfactor=2, cshift="spline64resize").eedi3().spline64resize(clp.width, clp.height) It's as though the supersampled use of eedi3 acted as a "precision denoiser" - reconstructing lines if pixels can connect, else it blurs those "random" pixels - resulting in a rather stable clip. Makes me wonder how to configure eedi3 into a general "edge reconstructor + denoiser". Quote:
Code:
final_value = (1.0-a)*fh + a*cint ** If sclip is supplied, cint is the corresponding value from sclip. If sclip isn't supplied, then vertical cubic interpolation is used to create it. Last edited by Bi11; 25th June 2010 at 02:55. |
|
25th June 2010, 03:52 | #214 | Link | |
Registered User
Join Date: Dec 2003
Location: MO, US
Posts: 999
|
Quote:
a2 = max((vthresh2-abs(dir))/vthresh2,0.0f) a = min(max(max(a0,a1),a2),1.0f) final_value = (1.0-a)*fh + a*cint Here, dir is literally the inverse slope, as detected by eedi3, at the current pixel location. You can also think of it as the direction of interpolation. So if dir=3, eedi3 is going to form the current pixel by connecting the pixel at x+3 from the line above and x-3 from the line below. If dir was -6 it would be formed by connecting x-6 from the line above and x+6 from the line below. So with vthresh2=4.0 (the default), and ignoring a0/a1, eedi3's interpolated value will get all weight for directions >= 4.0. At 0.0 the sclip value will get all weight. For directions in between you get a weighted average. The reason is I trust nnedi2/nnedi3 more for small directions than eedi3 (the reason is most image structures that can't be fit by eedi3's interpolation model will have small directions), but I trust eedi3 more for large directions. If you don't use sclip=nnedi3/nnedi2 then vthresh2 should really be adjusted... for example if sclip isn't given and cubic interpolation is used I would lower it to 3 or 2 probably... maybe 1. Also the other reliability checks determine whether eedi3's detected direction is accurate or not. If it's determined not to be accurate then sclip is the follow over (it does a weighted average between the two based on how inaccurate eedi3 is)... so the more accurate sclip is the more accurate the final output will be. Last edited by tritical; 25th June 2010 at 03:56. |
|
25th June 2010, 08:52 | #215 | Link | |
Registered User
Join Date: Jan 2005
Location: cz
Posts: 704
|
Quote:
eedi3_rpow2: error using env -> invoke (function not found)! |
|
25th June 2010, 10:56 | #216 | Link |
ангел смерти
Join Date: Nov 2004
Location: Lost
Posts: 9,558
|
spline64resize is part of avisynth 2.6 iirc. Use spline36resize if you're still using 2.5, or install newresizers plugin.
|
25th June 2010, 16:41 | #220 | Link | |
Registered User
Join Date: Feb 2005
Location: Ukraine, Lviv
Posts: 121
|
Quote:
But if you hold your breath and wait till it finished you'll be happily surprised about quality. Default TGMC EEDI3_SS with nnedi2 Last edited by Great Dragon; 30th August 2010 at 15:43. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|