Frame properties support for Avisynth+
Frame properties support for Avisynth+
Do you plan to introduce frame property support as per the newest builds of AVS+?
Feature Requests
Yes.
Feature Requests
Please tell me the list of properties in priority of importance for you.
Feature Requests
I think these ones would be generally very useful in any resampling function.
_ChromaLocation
_Primaries
_Transfer
_Matrix
Maybe _ColorRange too even though any regular release should be 'limited'.
_ChromaLocation
_Primaries
_Transfer
_Matrix
Maybe _ColorRange too even though any regular release should be 'limited'.
Feature Requests
Thank you, Boulder!
Feature Requests
Things are working for DGSource(). There is a problem with _ChromaLocation, however. Seems that CUVID does not return the VUI info we need. Still checking but may have to add manual parsing for that. Not a big deal having already done manual parsing for linux dgdecnv. Let's first add properties passthru to the bundled filters.
Feature Requests
Do any of you fine gentlepeople have a sample with a chroma location other than left (0) for a BT709 stream? It would be great to get both AVC and HEVC. I need them to test my implementation for _ChromaLocation. I know that BT2020 uses topleft (2) so need to give one of those. Thank you.
Frame properties support for Avisynth+
Released as build 236.
Example:
DGSource("file.dgi")
propShow()
or
DGSource("file.dgi")
DGDenoise()
DGSharpen()
propShow()
Example:
DGSource("file.dgi")
propShow()
or
DGSource("file.dgi")
DGDenoise()
DGSharpen()
propShow()
Frame properties support for Avisynth+
Will 236 still work with "older " avisynth+ versions?
Am using avisynth+ r2772 and have no real need to update, since it works fine.
renols
Frame properties support for Avisynth+
Hello renols! Should be OK, but you tell me.
We check for interface version 8 or greater. If that is the case, only then will the frame properties be populated.
We check for interface version 8 or greater. If that is the case, only then will the frame properties be populated.
Frame properties support for Avisynth+
Ok.
Guess I will test it then.
Just tested avisynth 3.70 compared to the r2772 with avsmeter 390.
With a 4k source 3.70 is about 4% slower than r2772 (with the same avs file). I know that for 4k, CPU is the bottleneck, but why upgrade to something that is slower than what one is currently using
Since r2772 is interface version 6, I guess it should be fine.
Anyone who can maybe enlighten me on what I would use the frame properties info for in a practical workflow?
Guess I will test it then.
Just tested avisynth 3.70 compared to the r2772 with avsmeter 390.
With a 4k source 3.70 is about 4% slower than r2772 (with the same avs file). I know that for 4k, CPU is the bottleneck, but why upgrade to something that is slower than what one is currently using
Since r2772 is interface version 6, I guess it should be fine.
Anyone who can maybe enlighten me on what I would use the frame properties info for in a practical workflow?
Frame properties support for Avisynth+
There are quite a lot of fixes in the 3.x branch, so it's very highly recommended to upgrade from such an old version. The biggest changes are in caching and multithreading, I think. SetCacheMode(1) should minimize the amount of memory needed and also provide the best possible performance. Prefetch has two arguments, threads and frames. I have a 12-core 3900X and I've discovered that Prefetch(threads=24, frames=12) works best with my base script. I also use SetMemoryMax(20480) to allow 4K video to use as much memory as needed, usually around 10-12 GB.renols wrote: ↑Sun Oct 31, 2021 2:07 pmOk.
Guess I will test it then.
Just tested avisynth 3.70 compared to the r2772 with avsmeter 390.
With a 4k source 3.70 is about 4% slower than r2772 (with the same avs file). I know that for 4k, CPU is the bottleneck, but why upgrade to something that is slower than what one is currently using
Since r2772 is interface version 6, I guess it should be fine.
Anyone who can maybe enlighten me on what I would use the frame properties info for in a practical workflow?
The frame properties are useful in resampling situations, i.e. where you change the colorspace before resizing. For example, I now have this kind of a function which does the resizing part with a bit clunky deduction logic and with the frame properties, I can make it foolproof
Code: Select all
function Resizer(clip clp, int "width", int "height", float "b", float "c", bool "hdr", bool "i", bool "spline", int "color", bool "debug") {
b = default(b, 0)
c = default(c, 0)
hdr = default(hdr, clp.width() > 1920 ? true : false)
i = default(i, false)
spline = default(spline, b == 0 && c == 0 ? true : false)
color = default(color, hdr ? 1 : clp.width() > 720 ? 2 : clp.framerate() == 25 || clp.framerate() == 50 ? 4 : 3)
cs_in = color == 1 ? "2020ncl:st2084=>rgb:linear" : color == 2 ? "709:709:709:limited=>rgb:linear:709:full" : color == 3 ? "470bg:601:170m:limited=>rgb:linear:170m:full" : "470bg:601:170m:limited=>rgb:linear:170m:full"
cs_out = color == 1 ? "rgb:linear=>2020ncl:st2084" : color == 2 ? "rgb:linear:709:full=>709:709:709:limited" : color == 3 ? "rgb:linear:170m:full=>470bg:601:170m:limited" : "rgb:linear:170m:full=>470bg:601:170m:limited"
debug = default(debug, false)
result = clp.z_ConvertFormat(pixel_type="RGBPS", chromaloc_op="auto=>same", colorspace_op=cs_in, approximate_gamma=true, cpu_type="AVX2")
result = !spline ? result.z_ConvertFormat(width, height, chromaloc_op="auto=>same", colorspace_op="auto=>same", resample_filter="Bicubic", resample_filter_uv="Bicubic", filter_param_a=b, filter_param_b=c, approximate_gamma=true, cpu_type="AVX2") : result.z_ConvertFormat(width, height, chromaloc_op="auto=>same", colorspace_op="auto=>same", resample_filter="Bicubic", resample_filter_uv="Bicubic", filter_param_a=0, filter_param_b=0.6, approximate_gamma=true, cpu_type="AVX2")
result = result.z_ConvertFormat(pixel_type="YUV420P16", chromaloc_op="auto=>same", colorspace_op=cs_out, approximate_gamma=true, cpu_type="AVX2")
result = i ? (width == 1920 || width == 3840 || (width == 1280 && (clp.framerate() == 25 || clp.framerate == 50))) ? interleave(clp, result.Lanczos4Resize(clp.width(), clp.height()).Subtitle("Lanczos4")) : interleave(clp, result.BicubicResize(clp.width(), clp.height(), b=0, c=0.5).Subtitle("Bicubic neutral")) : result
result = debug ? result.subtitle("hdr: " + string(hdr), x=0, y=0).subtitle("color: " + string(color), x=0, y=20).subtitle("cs_in: " + string(cs_in), x=0, y=40).subtitle("cs_out: " + string(cs_out), x=0, y=60) : result
return result
}
Frame properties support for Avisynth+
Too many fermented grapes for a Sunday Halloween afternoon. I'll get back to y'all on this. Sherman told me that DG 236 is fine with AVS+ 2772. Don't upgrade AVS+ if you don't want to. We aim to please. Burp.
DG started the fall/winter feeding protocol for the birds and squirrels this morning. They seem very happy. I know all their hiding places!
DG started the fall/winter feeding protocol for the birds and squirrels this morning. They seem very happy. I know all their hiding places!
Frame properties support for Avisynth+
Thanks for info.
Never had any issues with r2772, but I also just use 3-4 lines in my avs files.
DGSource
ConvertBits(10) (only for 4k)
crop
Spline36Resize (if needed)
Most of the time I don't use SetFilterMTMode or Prefetch, since with the few lines I have in my avs file, I find that it slows my fps down. And sometimes quite significantly. I actually only use them in cases where I have to use deinterlace filters, in which case they help quite a bit.
If I have no real gain to use 3.70 in my workflow, which seems to be quite different than your complicated avs file, I will stick with r2772
If it works, don't fix it
renols
Never had any issues with r2772, but I also just use 3-4 lines in my avs files.
DGSource
ConvertBits(10) (only for 4k)
crop
Spline36Resize (if needed)
Most of the time I don't use SetFilterMTMode or Prefetch, since with the few lines I have in my avs file, I find that it slows my fps down. And sometimes quite significantly. I actually only use them in cases where I have to use deinterlace filters, in which case they help quite a bit.
If I have no real gain to use 3.70 in my workflow, which seems to be quite different than your complicated avs file, I will stick with r2772
If it works, don't fix it
renols
Frame properties support for Avisynth+
Yes indeed, Happy Halloween!
Frame properties support for Avisynth+
Happy Halloween!
Frame properties support for Avisynth+
Knocked on DG's door and all he had was boiled eggs and carrots. Loser!
Frame properties support for Avisynth+
That was just for you. I got snickers, reeses pieces, and milky ways. Eat your heart out!
Frame properties support for Avisynth+
Umm, no. But yours? Delicious.Eat your heart out!
Frame properties support for Avisynth+
There is something terribly wrong with you people.
Happy Halloween!
Happy Halloween!
Frame properties support for Avisynth+
Little goblins have started ringing my bell! Not sure if they are more scared of me than I am of them. Can you imagine knocking on a door and being greeted by a squirrel!?
- Bullwinkle
- Posts: 344
- Joined: Thu Sep 05, 2019 6:37 pm
Frame properties support for Avisynth+
How about a moose? Snort!