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. |
4th January 2017, 23:28 | #2782 | Link | |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Quote:
and similarly IsPlanar(clip) and IsRGB(clip) / IsYUV(clip). ----- With respect to this post: http://forum.doom9.org/showthread.ph...46#post1791946 I think it would be great if (at least) the formats RGB64, YUV422P10 and YUV422P16 would be exposed through the VfW interface. Then we can open such scripts in Virtualdub and encode straight to MagicYUV (without any color conversion). |
|
6th January 2017, 12:47 | #2783 | Link | ||
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Quote:
https://github.com/pinterf/AviSynthP...c6ee125243c82c |
||
6th January 2017, 14:10 | #2784 | Link | |
Registered User
Join Date: Mar 2015
Posts: 775
|
Quote:
__________________
VirtualDub2 |
|
6th January 2017, 14:23 | #2785 | Link |
Registered User
Join Date: Apr 2016
Posts: 27
|
Error msg with x86 builds
Hello all,
When trying to encode a clip I get the following error: avs [info]: AviSynth+ 0.1 (r2359, MT, i386) avs [info]: Video colorspace: YV12 avs [info]: Video resolution: 988x720 avs [info]: Video framerate: 24000/1001 avs [info]: Video framecount: 121878 avs4x26x [info]: "C:\MKVideo Encoder\EXEs\x264_x64.exe" - --preset medium --tune film --crf 18 --profile high --level 4.1 --open-gop --quiet --threads 0 --threa d-input -o Output_Video_File.h264 --frames 121878 --fps 24000/1001 --input-res 988x720 --input-csp i420 avs [error]: Filter Error: Filter attempted to break alignment of VideoFrame. occurred while reading frame 0 I've tried earlier builds, only r1858 works for me. The script follows: Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2) SetFilterMTMode("DGDecodeNV", 3) LoadPlugin("C:\MKVideo Encoder\FFMS2\ffms2.dll") Import("C:\MKVideo Encoder\AVS Scripts\LoadPlugins.avs") FFVideoSource(source = "C:\MKVideo Files\Input_Video_File.mkv") Spline144Resize(1280, 720) RoboCrop(Laced=False) LSFmod(defaults="slow", preblur="DeGrainMedian(limitY=4, limitUV=6, mode=1, interlaced=false)") Prefetch(3) |
6th January 2017, 14:36 | #2787 | Link | |
Registered User
Join Date: Jan 2015
Posts: 47
|
Quote:
Verstuurd vanaf mijn SM-A500FU met Tapatalk |
|
6th January 2017, 14:57 | #2788 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
I suspect the RoboCrop function in the script, try to use it with align=true Internally Avisynth+'s Crop is alignment-safe. It checks whether alignment is o.k. for the fast SubFrame. If not, it creates a new frame instead (guaranteed to have proper alignment) and copies the cropped area there. Last edited by pinterf; 9th January 2017 at 11:38. Reason: word avs->avs+ |
|
6th January 2017, 16:08 | #2789 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Hey folks, I haven't been around for a while (been busy with other things), and I'm glad the development has progressed.
Converting my auto-generated scripts to native 16-bit is something I'd like to do (and adapting AviSynthShader to support conversion to/from native 16-bit), but where I have hesitation is in compromising quality in doing so. Is there now a way of performing these 2 operations without DitherTools? - Dithering with Floyd-Steinberg - Resizing with NoRinging (Dither_resize16nr) Actually, as I'm writing this, I'm remembering that NoRinging resize is simply a script-based wrapper around the standard resizer so it probably can be used just the same (would have to try to confirm). Still that leaves dithering which requires custom coding. Have I missed any other major update that either impact quality of performance since I last interacted here, or was it mostly new features? |
6th January 2017, 16:55 | #2790 | Link |
Registered User
Join Date: Jan 2010
Posts: 709
|
dithering is possible with convertto8bits or convertbits, but IIRC there is only dither or not dither (truncate, round?)
as you can see from the wrapper function nr resize it's just a repair between the chosen one and gauss Code:
Function Dither_resize16nr (clip src, int width, int height, \ float "src_left", \ float "src_top", \ float "src_width", \ float "src_height", \ string "kernel", \ float "fh", \ float "fv", \ int "taps", \ float "a1", \ float "a2", \ float "a3", \ int "kovrspl", \ bool "cnorm", \ bool "center", \ string "cplace", \ int "y", \ int "u", \ int "v", \ string "kernelh", \ string "kernelv", \ float "totalh", \ float "totalv", \ bool "invks", \ bool "invksh", \ bool "invksv", \ int "invkstaps", \ string "cplaces", \ string "cplaced", \ string "csp", \ bool "noring") { noring = Default (noring, true) Assert (width > 0 && height > 0, "Dither_resize16nr: width and height must be > 0.") sr_h = Float (width ) / Float (src.width () ) sr_v = Float (height) / Float (src.height ()) sr_up = Dither_max (sr_h, sr_v) sr_dw = 1.0 / Dither_min (sr_h, sr_v) sr = Dither_max (sr_up, sr_dw) Assert (sr >= 1.0) # Depending on the scale ratio, we may blend or totally disable # the ringing cancellation thr = 2.5 nrb = (sr > thr) nrf = (sr < thr + 1.0 && noring) nrr = (nrb) ? Dither_min (sr - thr, 1.0) : 1.0 nrv = (nrb) ? Round ((1.0 - nrr) * 255) * $010101 : 0 main = src.Dither_resize16 (width, height, \ src_left =src_left, \ src_top =src_top, \ src_width =src_width, \ src_height=src_height, \ kernel =kernel, \ fh =fh, \ fv =fv, \ taps =taps, \ a1 =a1, \ a2 =a2, \ a3 =a3, \ kovrspl =kovrspl, \ cnorm =cnorm, \ center =center, \ cplace =cplace, \ y =y, \ u =u, \ v =v, \ kernelh =kernelh, \ kernelv =kernelv, \ totalh =totalh, \ totalv =totalv, \ invks =invks, \ invksh =invksh, \ invksv =invksv, \ invkstaps =invkstaps, \ cplaces =cplaces, \ cplaced =cplaced, \ csp =csp \ ) nrng = (nrf) ? src.Dither_resize16 (width, height, \ src_left =src_left, \ src_top =src_top, \ src_width =src_width, \ src_height=src_height, \ kernel ="gauss", \ a1 =100, \ center =center, \ cplace =cplace, \ cplaces =cplaces, \ cplaced =cplaced, \ csp =csp, \ y =y, \ u =u, \ v =v \ ) : main nrm = (nrb && nrf) ? main.BlankClip (color_yuv=nrv, height=main.Height()/2) : main # To do: use a simple frame blending instead of Dither_merge16 rgm = 1 rgc = (nrb) ? -1 : 0 rgy = Defined (y) ? ((y == 3) ? rgm : rgc) : rgm rgu = Defined (u) ? ((u == 3) ? rgm : rgc) : rgm rgv = Defined (v) ? ((v == 3) ? rgm : rgc) : rgm rguv = Dither_max (rgu, rgv) (nrf ) ? main.Dither_repair16 (nrng, rgy, rguv) : main (nrf && nrb) ? Dither_merge16_8 (main, last, nrm, y=y, u=u, v=v) : last }Function Dither_resize16nr (clip src, int width, int height, \ float "src_left", \ float "src_top", \ float "src_width", \ float "src_height", \ string "kernel", \ float "fh", \ float "fv", \ int "taps", \ float "a1", \ float "a2", \ float "a3", \ int "kovrspl", \ bool "cnorm", \ bool "center", \ string "cplace", \ int "y", \ int "u", \ int "v", \ string "kernelh", \ string "kernelv", \ float "totalh", \ float "totalv", \ bool "invks", \ bool "invksh", \ bool "invksv", \ int "invkstaps", \ string "cplaces", \ string "cplaced", \ string "csp", \ bool "noring") { noring = Default (noring, true) Assert (width > 0 && height > 0, "Dither_resize16nr: width and height must be > 0.") sr_h = Float (width ) / Float (src.width () ) sr_v = Float (height) / Float (src.height ()) sr_up = Dither_max (sr_h, sr_v) sr_dw = 1.0 / Dither_min (sr_h, sr_v) sr = Dither_max (sr_up, sr_dw) Assert (sr >= 1.0) # Depending on the scale ratio, we may blend or totally disable # the ringing cancellation thr = 2.5 nrb = (sr > thr) nrf = (sr < thr + 1.0 && noring) nrr = (nrb) ? Dither_min (sr - thr, 1.0) : 1.0 nrv = (nrb) ? Round ((1.0 - nrr) * 255) * $010101 : 0 main = src.Dither_resize16 (width, height, \ src_left =src_left, \ src_top =src_top, \ src_width =src_width, \ src_height=src_height, \ kernel =kernel, \ fh =fh, \ fv =fv, \ taps =taps, \ a1 =a1, \ a2 =a2, \ a3 =a3, \ kovrspl =kovrspl, \ cnorm =cnorm, \ center =center, \ cplace =cplace, \ y =y, \ u =u, \ v =v, \ kernelh =kernelh, \ kernelv =kernelv, \ totalh =totalh, \ totalv =totalv, \ invks =invks, \ invksh =invksh, \ invksv =invksv, \ invkstaps =invkstaps, \ cplaces =cplaces, \ cplaced =cplaced, \ csp =csp \ ) nrng = (nrf) ? src.Dither_resize16 (width, height, \ src_left =src_left, \ src_top =src_top, \ src_width =src_width, \ src_height=src_height, \ kernel ="gauss", \ a1 =100, \ center =center, \ cplace =cplace, \ cplaces =cplaces, \ cplaced =cplaced, \ csp =csp, \ y =y, \ u =u, \ v =v \ ) : main nrm = (nrb && nrf) ? main.BlankClip (color_yuv=nrv, height=main.Height()/2) : main # To do: use a simple frame blending instead of Dither_merge16 rgm = 1 rgc = (nrb) ? -1 : 0 rgy = Defined (y) ? ((y == 3) ? rgm : rgc) : rgm rgu = Defined (u) ? ((u == 3) ? rgm : rgc) : rgm rgv = Defined (v) ? ((v == 3) ? rgm : rgc) : rgm rguv = Dither_max (rgu, rgv) (nrf ) ? main.Dither_repair16 (nrng, rgy, rguv) : main (nrf && nrb) ? Dither_merge16_8 (main, last, nrm, y=y, u=u, v=v) : last }
__________________
powered by Google Translator |
6th January 2017, 18:00 | #2792 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
and if someone add it to rgtools I wish that he/she add the others mode of RemoveGrain too (more than 24) as there are some scripts use them, and there are RemoveGrainHD and RemoveGrainT too
__________________
See My Avisynth Stuff Last edited by real.finder; 19th January 2017 at 03:09. |
|
6th January 2017, 21:27 | #2794 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
I'd also like to be able to do linear-light resizing in 16-bit. Dither tools has "Dither_y_gamma_to_linear" and "Dither_y_linear_to_gamma". But for these to work you need to convert to and from stacked as well. And also use "dither_resize16" unless you really want to go to and from stacked a lot of times.
Is there another way to convert between linear and gamma light? mt_lut could do it if it worked in 16 bits. |
7th January 2017, 00:30 | #2795 | Link |
Moderator
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
|
Was asking about the output. Apperantly the code is in main.cpp (*), but i don't know that part well enough to tell what and how it should be updated.
(*) see CAVIStreamSynth::Info, CAVIFileSynth::ImageSize, CAVIStreamSynth::ReadFrame and CAVIStreamSynth::ReadFormat. Last edited by Wilbert; 7th January 2017 at 00:35. |
8th January 2017, 14:59 | #2796 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
the problem arises. Also might be related:- I wrote a plugin a few weeks/months ago with optional clip which produced some kind of access Violation when NULL clip, (with avs+ I think), I suspect that the code that causes/detects above SubFrame error in avs+ was accessing the NULL clip at some point and causing the access violation, (I'm not sure about that being the cause, but if internal avs+ is gonna mess with clips it should make sure not to mess with optional NULL ones, I think that problem only appeared in avs+ and not avs standard, but am not completely sure). Also, can you tell me how to reliably detect Avs+ in most recent versions (at least), without basing it on Version or VersionString, I'll have a go at doing modified RoboCrop behaviour only for avs+ and the default avs+ cropping alignment of 32. Thanx very much
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 8th January 2017 at 15:07. |
|
8th January 2017, 16:29 | #2797 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
8th January 2017, 17:00 | #2798 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanx G2K4, think i'll use "AddAutoloadDir()".
Any body aware of bulletproof way to call GScript() code in both avs+ and avs standard ? (GScript does not appear in list of builtin functions in avs+, nor does eg GImport, GEval, for, if, else, etc.) EDIT: I guess that easiest way is to still use GScript plugin even in avs+. GScript() really should have been incorporated into avs many moons ago, then we would not have current nonsense. EDIT: Maybe have to force Eval/GEval into use with some kind of string replace to select plus or standard.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 8th January 2017 at 17:27. |
9th January 2017, 11:43 | #2800 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
or just update dither tools to read all avs+ features
__________________
See My Avisynth Stuff |
Thread Tools | Search this Thread |
Display Modes | |
|
|