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. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,711
|
Resize8 - An updated version of the original resizing function
The Resize8 function linked to below is an updated version of Resize8 1.2 2015.02.23 by mawen1250.
The initial changes compared to the original Resize8 are listed in the next post. Resize8 2023-02-09.zip Changes for Resize8 2023-02-03 A better work-around for the SplineResize plugin not being able to resize Y8. The previous work-around wasn't effective and SplineResize still produced an access violation error message (at least on my PC). ----------------------------- The following applies to YUV formats with subsampled chroma. There's more information in the help file. cplaceD argument added (chroma placement destination/output). The chroma location can now be changed, for example: Resize8(1280,720, cplace="center", cplaceD="left") Added support for "top_left" chroma placement. Resize8 can now read and write the _ChromaLocation frame property. Specifying a chroma placement takes precedence, but if cplace is not used the _ChromaLocation frame property will be used instead, assuming it exists. When no value is specified for cplace and there's no _ChromaLocation frame property, the default chroma placement is "left" (the same as "mpeg2" or "0"). Show=true also displays chroma placement information. ----------------------------- Last edited by hello_hello; 9th February 2023 at 10:44. |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,711
|
Changes compared to the original Resize8.
The default output should be exactly the same as the original. --- There's a help file of sorts. --- All Avisynth+ color spaces and bitdepths are supported. --- Any resizer with the same arguments for cropping as the native Avisynth resizers can be used. --- The Jinc, ResampleMT and SplineResize plugins are added as "known" resizers. The SplineResize plugin kernels are limited to 8 bit video, and don't support all color spaces. For SplineResize the individual planes are converted to YV12 for resizing, so all Avisynth 2.6 colorspaces are supported that way. --- The Resize8_Separate() function has been removed, but it's functionality is retained via an additional Resize8 argument "separate", so Resize8(separate=true) can be used instead. --- New arguments, "RStr" and "RStr_c", for specifying named arguments as strings. They can be used instead of the a1 and a2 arguments for "known" resizers. For example: Resize8(1280,720, kernel="Bicubic", RStr="b=0.5,c=0.5") Resize8(1280,720, kernel="Spline36ResizeMT", RStr="prefetch=4, threads=2") --- New "show" argument show=true bypasses the resizing stage and opens a blank clip to display the full resizing strings as subtitles, as well as some other basic info. It might be useful if there's problems using the "RStr" arguments, or just to confirm the function is behaving as expected. --- Resize8 will attempt to use the the ResampleMT plugin for it's default resizing, but if it's not loaded it will use the native Avisynth resizers instead. --- When specifying a luma resizer with the kernel argument, the same kernel is now automatically used for chroma, unless a different chroma resizer is specified with kernel_c. Likewise, the "_c" arguments now default to the same values as their non "_c" counterparts, but only when the same kernel is used for both luma and chroma (when kernel = kernel_c). --- Adaptive ringing repair now works when downscaling, not just upscaling, but it's disabled for downscaling by default. It's also disabled for all "unknown" resizers by default. --- For RGBA, the luma kernel is applied to the R-G-B-A planes, except when a chroma kernel is specified or the default kernels are used, in which case the chroma kernel is used for the alpha plane. For YUVA, the luma kernel is applied to the Y-U-V-A planes, except when a chroma kernel is specified or the default kernels are used, in which case the chroma kernel is used for the U-V planes. --- The "alpha" argument behaves a little differently. If the source has no alpha plane and alpha=true, one will be added to the output when possible. The defaults for alpha are true when an alpha plane exists, and false when it doesn't. --- Added some simple, one line functions to the end of the Resize8 script. They can easily be modified to change the default resizing kernels and set default resizer strings.The default output should be exactly the same as the original Resize8, but there's quite a few changes. --- There's a help file of sorts. --- All Avisynth+ color spaces and bitdepths are supported. --- Any resizer with the same arguments for cropping as the native Avisynth resizers can be used. --- The Jinc, ResampleMT and SplineResize plugins are added as "known" resizers. The SplineResize plugin kernels are limited to 8 bit video, and don't support all color spaces. For SplineResize the individual planes are converted to YV12 for resizing, so all Avisynth 2.6 colorspaces are supported that way. --- The Resize8_Separate() function has been removed, but it's functionality is retained via an additional Resize8 argument "separate", so Resize8(separate=true) can be used instead. --- New arguments, "RStr" and "RStr_c", for specifying named arguments as strings. They can be used instead of the a1 and a2 arguments for "known" resizers. For example: Resize8(1280,720, kernel="Bicubic", RStr="b=0.5,c=0.5") Resize8(1280,720, kernel="Spline36ResizeMT", RStr="prefetch=4, threads=2") --- New "show" argument show=true bypasses the resizing stage and opens a blank clip to display the full resizing strings as subtitles, as well as some other basic info. It might be useful if there's problems using the "RStr" arguments, or just to confirm the function is behaving as expected. --- Resize8 will attempt to use the the ResampleMT plugin for it's default resizing, but if it's not loaded it will use the native Avisynth resizers instead. --- When specifying a luma resizer with the kernel argument, the same kernel is now automatically used for chroma, unless a different chroma resizer is specified with kernel_c. Likewise, the "_c" arguments now default to the same values as their non "_c" counterparts, but only when the same kernel is used for both luma and chroma (when kernel = kernel_c). --- Adaptive ringing repair now works when downscaling, not just upscaling, but it's disabled for downscaling by default. It's also disabled for all "unknown" resizers by default. --- For RGBA, the luma kernel is applied to the R-G-B-A planes, except when a chroma kernel is specified or the default kernels are used, in which case the chroma kernel is used for the alpha plane. For YUVA, the luma kernel is applied to the Y-U-V-A planes, except when a chroma kernel is specified or the default kernels are used, in which case the chroma kernel is used for the U-V planes. --- The "alpha" argument behaves a little differently. If the source has no alpha plane and alpha=true, one will be added to the output when possible. The defaults for alpha are true when an alpha plane exists, and false when it doesn't. --- Added some simple, one line functions to the end of the Resize8 script. They can easily be modified to change the default resizing kernels and set default resizer strings. Last edited by hello_hello; 3rd February 2023 at 00:52. |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,711
|
Sigh.... I realised a did a silly with rounding for a couple of numbers that display when show=true.
There's a link for the fixed version dated 2021-08-06 in the opening post. Last edited by hello_hello; 6th August 2021 at 07:15. |
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,711
|
I don't know why but it's working now. It's probably just as well as my last fiddle with the way the strings display when show=true caused the right and bottom cropping to display as positive when they should be negative, and the other way around. It's fixed now.
|
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,711
|
New version dated 2021-09-07 in the opening post.
Resize8 is supposed to fall back to using the internal Avisynth resizers for it's default resizing instead of the MT resizers if the ResampleMT plugin isn't loaded. Instead it was producing an error message unless a non-MT resizer was specified manually. That's fixed now. The default resizing methods haven't changed. |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|