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. |
23rd February 2020, 07:51 | #1 | Link |
Registered User
Join Date: Feb 2020
Posts: 6
|
AreaResize
Hello! I port AreaResize to VapourSynth, based on the original AviSynth verison by Chikuzen and the modified AviSynth version by Aktan.
AreaResize is an area average downscale resizer:
Usage Code:
core.area.AreaResize(clip clip, int width, int height[, float gamma=2.2]) # Parameter "gamma" is for gamma corrected, only using for 8-16 bit RGB input Download: https://github.com/Kiyamou/VapourSyn...esize/releases There is known bug for special target size, such as 1920x1080 -> 1200x700 for 8~16bit YUV and 8bit RGB.
__________________
a C++ beginner | My Github Last edited by Sakura; 21st March 2020 at 09:04. |
25th February 2020, 15:05 | #3 | Link | |
Registered User
Join Date: Feb 2020
Posts: 6
|
Quote:
This algorithm is simple, just calculating the average of pixel. (So it is fast.) For example, 1080p->720p, greatest common divisor: (1920,1280)=640, 1920/640=3, 1280/640=2. So calculate the value of dst like this: Code:
y_dst[0] = (y_src[0] + y_src[0] + y_src[1]) / 3 y_dst[1] = (y_src[1] + y_src[2] + y_src[2]) / 3 ... Compared other conventional convolution-based resizers, firstly it can be only used to downscale. From the aspect of effect, I think AreaResize is better than Bicubic, while Spline and Lanczos is better than AreaResize.
__________________
a C++ beginner | My Github Last edited by Sakura; 21st March 2020 at 09:04. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|