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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th July 2021, 18:15   #1  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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 2024-01-18.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; 18th January 2024 at 13:12.
hello_hello is offline   Reply With Quote
Old 3rd August 2021, 04:47   #2  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.

--- 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; 18th January 2024 at 13:27.
hello_hello is offline   Reply With Quote
Old 4th August 2021, 07:04   #3  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.
hello_hello is offline   Reply With Quote
Old 4th August 2021, 09:06   #4  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,156
I click linked and it's open post again
kedautinh12 is offline   Reply With Quote
Old 6th August 2021, 07:14   #5  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.
hello_hello is offline   Reply With Quote
Old 7th September 2021, 13:58   #6  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
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.
hello_hello is offline   Reply With Quote
Old 30th December 2021, 10:50   #7  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
New version dated 2021-12-30 in the opening post.
hello_hello is offline   Reply With Quote
Old 25th September 2022, 07:27   #8  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
New version dated 2022-09-23 in the opening post with a minor bug fix.

An alpha plane wasn't always being added when it should have been.
hello_hello is offline   Reply With Quote
Old 3rd February 2023, 00:47   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
New version dated 2023-02-03 in the opening post. See the opening post for details.
hello_hello is offline   Reply With Quote
Old 9th February 2023, 10:47   #10  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
New version dated 2023-02-09 in the opening post. See the changelog (just some minor tweaks).
hello_hello is offline   Reply With Quote
Old 18th January 2024, 13:15   #11  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,829
New version dated 2024-01-18 in the opening post. See the "changes" text file in the zip file for details.
hello_hello is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.