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. |
![]() |
#61 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,272
|
Thanks. Now it's fast!
But now it seems that probably the VS integration would be better (compiler optimization?), surely it's not an MT issue, even the single-threaded case is slower a bit. Provided my two scripts are comparable, please note if it's not the case. (Win10, i7-7700) Avs+ r2636 Avsmeter64: 264 fps (was: 41fps with r1c) Avsmeter64: (thread=1, no prefetch): 90 fps VapourSynth r43 VSEdit r18 Benchmark: 217 fps VSEdit r18 Benchmark: (threads=1): 83 fps VirtualDub2 r41462 (Direct Stream Copy, switched off input/output preview): avs+: 172 fps (37fps with r1c) vs r43: 150 fps Passing a YUV420P16 clip to Virtualdub2 runs through a P016 conversion - both at VapourSynth and Avisynth+ -, and possibly VDub2 makes further copy/conversions which are extra overhead. I was using this script to find the slowness before your r1d patch: Code:
BlankClip(10000,1920,1080,"YUV420P8") z_ConvertFormat(resample_filter="bicubic", pixel_type="RGBPS",colorspace_op="709:709:709:l=>rgb:linear:2020:l", dither_type="none") # r1c: slooooow, r1d: faaast z_ConvertFormat(resample_filter="bicubic", pixel_type="YUV420P16",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered") prefetch(4) Code:
import vapoursynth as vs core = vs.get_core(threads=4) clip = core.std.BlankClip(width=1920, height=1080, length=10000, color=[0, 128, 128], format=vs.YUV420P8) clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_s="rgb", transfer_s="linear", primaries_s="2020", matrix_in_s="709", transfer_in_s="709", primaries_in_s="709", dither_type="none") clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P16, matrix_in_s="rgb", transfer_in_s="linear", primaries_in_s="2020", matrix_s="709", transfer_s="709", primaries_s="709", dither_type="ordered") clip.set_output() Last edited by pinterf; 22nd March 2018 at 16:33. Reason: scream->stream |
![]() |
![]() |
![]() |
#62 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,262
|
What is the difference between
Code:
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none") Is it related to the formula in REC-BT.2100 page 4 and 5 ? Or is it something found only in SMTPE 2084 ?
__________________
My github. |
![]() |
![]() |
![]() |
#63 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
zimg does support HLG too, but under the name ARIB B67, see zimg/colorspace/gamma.cpp line 154 and on. Last edited by TheFluff; 22nd March 2018 at 11:40. |
|
![]() |
![]() |
![]() |
#66 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,272
|
Quote:
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx Similarly Y416 is used for passing a YUV444P16 clip through the VfW interface, VirtualDub is using. |
|
![]() |
![]() |
![]() |
#67 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
I see, thank you. If there are spurious conversions inside Avisynth+ or Windows due to VfW maybe that is another reason to prefer Vapoursynth and native Vapoursynth filters. It seems insane to me to convert to an intermediate semi-packed format.
And thank you for your test results. Hopefully, Myrsloik will comment on your performance numbers. Last edited by videoh; 22nd March 2018 at 14:32. |
![]() |
![]() |
![]() |
#68 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,272
|
As at 8 bits, 10-16 bit formats are also negotiated through the Vfw interface, here. For YUV420P16 the fourcc code P016 is reported, this is what VirtualDub2 understands. This format is semi-packed one, Y "plane" is followed immediately wih UVUVUVUV.. data, so that pitch is the same as of the Y data. For YUV422P10 the P210 is used, but you have 2 more choices, such as V210 and Y3[10][10] fourcc codes. These other options can be set thought Avisynth+ OPT_xxx variables, which should appear at the beginning of the scripts.
EDIT: this conversion is done once in the outputting stage, because VirtualDub2 works through VfW. The same interface and method is used by VapourSynth Last edited by pinterf; 22nd March 2018 at 14:24. |
![]() |
![]() |
![]() |
#69 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Yeah, for VfW you need the packing unfortunately. VS also uses P016 for YUV420P16 when outputting through the VfW interface. If you're outputting through e.g. vspipe though, you can output whatever format you want.
Last edited by TheFluff; 22nd March 2018 at 15:13. |
![]() |
![]() |
![]() |
#70 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
You shouldn't be using vfw, it's <current year>. It mostly exists for convenience, previews and backward compatibility. You're sacrificing a lot of threading by using vfw, do the right thing and use vspipe. Or avspipe or whatever...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#71 | Link |
Useful n00b
Join Date: Jul 2014
Posts: 1,667
|
Questions for Myrsloik:
1) I have made a version of DGDecodeNV that supports both native Avisynth and native Vapoursynth. Will we have to remove DGSource from your avscompat layer, or will Vapoursynth see the native version and use it even if the avscompat layer still has DGSource given as a source filter? 2) Any comment on pinterf's benchmarking showing Vapoursynth a bit slower? Last edited by videoh; 22nd March 2018 at 15:19. |
![]() |
![]() |
![]() |
#72 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
It doesn't need to be removed, you can have (and use) both. VS plugins get their own namespaces so the same function name can exist in several different plugins that are loaded at the same time. That is, you can have both core.avs.DGSource() and core.dg.DGSource() in the same script, no problem. The AVS compat stuff is only used when loading plugins with core.avs.LoadPlugin.
You can't have two functions with the same name in the same plugin namespace though, so IIRC if you load an Avisynth plugin that uses overloaded functions (exports the same function more than once but with different argument signatures) in VS, the compat layer will de-conflict by renaming the functions, so you get e.g. func(), func_2(), func_3() etc. Last edited by TheFluff; 22nd March 2018 at 15:34. |
![]() |
![]() |
![]() |
#73 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
Quote:
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#75 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
Add keep=1 as an argument to vs blankclip to speed it up a lot. If you don't it creates a new frame every getframe call to avoid extreme memory bloat in some corner cases. Most people never notice the difference anyway until the benchmarks come out...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
![]() |
![]() |
![]() |
#77 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
Quote:
Code:
vsapi->createFilter(in, out, "DGSomething", init, getframe, free, fmUnordered, nfMakeLinear, data, core);
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
#78 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,285
|
Quote:
![]() I think it might have to do with avsmeter64. If you send avs to a "real" encoding application , ffmpeg , vdub, x264, etc... you don't get those "instant" speeds when outputting null This is why I suggested looking at other testing methodologies earlier - there are discrepancies between the methods and numbers, sometimes large I like ffmpeg since it accepts both avs and vspipe. There still is a discrepancy with blankclip between avs and vpy . Avs is about 20% faster |
|
![]() |
![]() |
![]() |
#80 | Link | |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,530
|
Quote:
Code:
vspipe script.vpy .
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|