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. |
29th October 2016, 21:23 | #1 | Link |
Registered User
Join Date: Nov 2009
Posts: 327
|
z.lib resizers for AviSynth+
Code:
z_ConvertFormat( clip clip, int "width", int "height", str "pixel_type", str "colorspace_op", str "chromaloc_op", bool "interlaced", float "src_left", float "src_top", float "src_width", float "src_height", str "resample_filter", float "filter_param_a", float "filter_param_b", str "resample_filter_uv", float "filter_param_a_uv", float "filter_param_b_uv", str "dither_type") width: output width in pixels height: output height in pixels pixel_type: output pixel type ("YV12", "YUV420P16", etc.) colorspace_op: colorspace operation description Format is "matS[:transS[:primS[:rangeS]]]=>matD[:transD[:primD[:rangeD]]]" Example JPEG to MPEG: "170m:709:709:f=>709:709:709:l" chromaloc_op: chroma location operation description Format is "[locS]=>[locD]" Example JPEG to MPEG2: "center=>left" interlaced: whether to use interlaced mode (default: false) resample_filter: resampling mode filter_param_a: first parameter to resampler filter_param_b: second parameter to resampler Example Bicubic (Mitchell-Netravali): resample_filter="bicubic", filter_param_a=0.333, filter_param_b=0.333 Example 4-tap Lanczos: resample_filter="lanczos", filter_param_a=4 resample_filter_uv: resampling mode for chroma filter_param_a_uv: first parameter to chroma resampler filter_param_b_uv: second parameter to chroma resampler dither_type: dithering type See VapourSynth documentation for valid string constants. Download: r2 Last edited by Stephen R. Savage; 7th July 2022 at 15:59. |
4th November 2016, 10:44 | #3 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,349
|
Thanks, I will look try it later it when I have time, just looked at the source.
A remark: Planar RGB plane order is PLANAR_G, PLANAR_B, PLANAR_R Question: AVS+ default alignment is 32. Is the 64 byte alignment is a requirement for zimg? |
6th November 2016, 01:46 | #5 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,672
|
Quote:
|
|
29th December 2017, 09:23 | #10 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
I wouldn't know if it needs updating or not, so I was asking.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
14th January 2018, 21:04 | #11 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
Does any of this have to do with Zimg?
Zimg is getting a lot of updates. And the documentation for this is lazy. I find things better looking at source code. ZIMG is getting a lot of updates. This isn't getting anything. https://github.com/sekrit-twc/zimg Would it be better to ask Pinterf to make a port? Or even cretindesalpes? Open source is nice. But only for those who know what it means. Why is ZIMG getting more updates than this very small port? The doc really says nothing. I only learn from looking at the source code and guessing. Does the AVS+ port mean nothing? I'll stick to Dither_tools until AVS+ really improves on these functions.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
14th January 2018, 21:20 | #12 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
It's an Avisynth plugin that uses the zimg resizers, yes, but since nobody seemed interested in it I doubt it'll ever get updated again. Just use the Vapoursynth version instead; there's no reason to use Avisynth anymore since the new avsproxy plugin lets you load even ancient no-source 32-bit Avisynth plugins in a 64-bit Vapoursynth process, or run Avisynth scripts if that's a thing you need.
|
16th January 2018, 02:39 | #13 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,599
|
Quote:
__________________
See My Avisynth Stuff |
|
31st January 2018, 10:57 | #17 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,349
|
Something strange happens.
When resizing vertically performance suddenly drops at delta=256. Using avsresize r1b, x64, Intel i7-7700, current dev avs+ x64 Code:
w = 1920 h = 1920 BlankClip(width=w, height=h, length=8000, pixel_type = "YUV444P8") #z_Spline64Resize(w,h+255) # 192.5 fps z_Spline64Resize(w,h+256) #30 fps |
19th March 2018, 16:35 | #19 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,666
|
These conversions seem extremely slow compared to the Vapoursynth core equivalents. Really, it is too slow to be usable. Here is the script:
dgsource("THE GREAT WALL.dgi",fulldepth=true) z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none") #tonemap() z_ConvertFormat(pixel_type="YUV420P16",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered") prefetch(8) For a typical clip, this takes 45 seconds while the corresponding Vapoursynth script takes 13 seconds. Is there any way to speed things up or do we have to declare Avisynth+ dead for things like this? MAGA (Make Avisynth Great Again) Last edited by videoh; 19th March 2018 at 16:51. |
19th March 2018, 16:53 | #20 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,349
|
Quote:
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|