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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 8th May 2020, 12:37   #1  |  Link
Sakura
Registered User
 
Sakura's Avatar
 
Join Date: Feb 2020
Posts: 6
JincResize - Jinc (EWA Lanczos) Resampler

Port jinc-resize to VapourSynth (cpu optimizations only have AVX2), some codes references to EWA-Resampling-VS.

Github: https://github.com/Kiyamou/VapourSynth-JincResize

Usage
Code:
core.jinc.JincResize(clip clip, int width, int height[, int tap, float src_left, float src_top,
                     float src_width, float src_height, int quant_x, int quant_y, float blur])
My test

720p -> 1080p tap=3
Code:
16bit (i5-4260U 1.4Ghz 2 Core)
GCC  pure c  10.328 FPS
GCC  avx2    9.949 FPS

32bit (i5-4260U 1.4Ghz 2 Core)
GCC  pure c  10.998 FPS
GCC  avx2    10.499 FPS

16bit (2700x 3.7Ghz 8 Core)
GCC  pure c  72.287 FPS
GCC  avx2    69.891 FPS
Thanks to everyone who helped me!
__________________
a C++ beginner | My Github

Last edited by Sakura; 24th June 2020 at 09:05.
Sakura is offline   Reply With Quote
Old 8th May 2020, 13:19   #2  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,821
Added to vsrepo: vsrepo install jinc
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 8th May 2020, 14:31   #3  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,595
1. Why do you even bother with an avx2 version if it's slower? Just let the compiler optimize things.

2. This line looks very suspicious:
https://github.com/Kiyamou/VapourSyn...sizer.hpp#L327

You're loading integer types as float if I'm not mistaken. Didn't actually try it to verify.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 8th May 2020, 15:38   #4  |  Link
Sakura
Registered User
 
Sakura's Avatar
 
Join Date: Feb 2020
Posts: 6
Quote:
Originally Posted by Myrsloik View Post
1. Why do you even bother with an avx2 version if it's slower? Just let the compiler optimize things.

2. This line looks very suspicious:
https://github.com/Kiyamou/VapourSyn...sizer.hpp#L327

You're loading integer types as float if I'm not mistaken. Didn't actually try it to verify.
1. At the beginning, I use avx2 to calculate Lut (https://github.com/Kiyamou/VapourSyn...de/Lut.hpp#L37), which is faster a little (for old version). So I try to use avx2 for convolution, too. I agree it is not a good idea.
I cancel the macro definition for using avx2. Do not use avx2 by default.

2. There is indeed a problem with this line. I give up this function now, until I come up with a suitable method.

Thanks.
__________________
a C++ beginner | My Github

Last edited by Sakura; 8th May 2020 at 16:01.
Sakura is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 22:52.


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