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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd October 2017, 07:00   #3641  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
i5-4670k + gtx 1080
88 fps CPU, 430 fps CUDA

But script results do differ.
I need to upgrade my QTGMC...

Last edited by vivan; 2nd October 2017 at 07:16.
vivan is offline   Reply With Quote
Old 2nd October 2017, 07:09   #3642  |  Link
tuanden0
Registered User
 
Join Date: Oct 2016
Posts: 82
Quote:
Originally Posted by poisondeathray View Post
@tuanden0 - you have the same card as the developer, but a 3GB model instead of 6GB. He got 83.43fps vs. 27.33fps for QTGMC on "fast" preset

Just try the exact same script for now, to see if there is a speed difference for you
Here you are
Without CUDA: https://i.imgur.com/TuO78nY.png
With CUDA: https://i.imgur.com/TUSWvuO.png
With CUDA 2: https://i.imgur.com/c06mL6c.png

tuanden0 is offline   Reply With Quote
Old 2nd October 2017, 13:08   #3643  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,043
I hope someone port that to use opencl (maybe Khanattila since he has experience in it)

so many people can use it
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 2nd October 2017, 16:46   #3644  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,533
Quote:
Originally Posted by vivan View Post
i5-4670k + gtx 1080
88 fps CPU, 430 fps CUDA

But script results do differ.
I need to upgrade my QTGMC...

differ - did you mean qualitatively different results ?
poisondeathray is offline   Reply With Quote
Old 2nd October 2017, 20:13   #3645  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 649
Quote:
Originally Posted by poisondeathray View Post
differ - did you mean qualitatively different results ?
They are just different, it's hard to say which one is better.
https://i.imgur.com/JRM9vJb.png
https://i.imgur.com/8AsGgNL.png

134 fps on 1920x1080 video ("Fast" Preset)
vivan is offline   Reply With Quote
Old 5th October 2017, 14:42   #3646  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,636
The following line works in standard avisynth but not in avs+ x64.
Code:
black = BlankClip(last, width=64, height=32, Color_yuv=color_black)
and probably the next (forgot to test, and i'm under standard avisynth without avs+ access while writing these lines).
Code:
white = BlankClip(last, width=64, height=32, Color_yuv=color_white)
jpsdr is offline   Reply With Quote
Old 5th October 2017, 15:12   #3647  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,602
In which way does it "not work"? Do you have any error messages?

I suppose it doesn't know color constants?

Code:
---------------------------
VirtualDub Error
---------------------------
Avisynth open failure:
I don't know what 'color_black' means.
(H:\Video\black-white.avs, line 1)
---------------------------
OK   
---------------------------
That should be fixable by providing a color names import scriptlet (colors_rgb.avsi in plugins+ / plugins64+).

My former AviSynth 2.56 installation seems to have provided this file in AviSynth 2.5\plugins already.

But the color constants known in legacy AviSynth 2.55+ are RGB colors, not YUV.
__

Actually, nope ... sorry. The file "colors_rgb.avsi" does exist in all my plugin directories for all AviSynth flavours, but is not auto-loaded. I have to Import() it explicitly to make it work.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 5th October 2017 at 15:28.
LigH is offline   Reply With Quote
Old 5th October 2017, 20:20   #3648  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 250
Already had similar issues with avs+ x64

blankclip(color=color_black) # doesn't work, " I don't know what color_black means "
blankclip(color=$000000) #works

Switched for Hex values when i needed it but did not suspected this could be a bug
Yanak is offline   Reply With Quote
Old 5th October 2017, 20:39   #3649  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,602
Well, if you explicitly
Code:
Import("colors_rgb.avsi")
it works as well; it's just strange that auto-importing from the plugins auto-load directory doesn't work ... anymore? I thought it did, once.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th October 2017, 21:07   #3650  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Posts: 3,878
Quote:
Originally Posted by LigH View Post
Well, if you explicitly
Code:
Import("colors_rgb.avsi")
it works as well; it's just strange that auto-importing from the plugins auto-load directory doesn't work ... anymore? I thought it did, once.
See here.
Groucho2004 is offline   Reply With Quote
Old 5th October 2017, 21:25   #3651  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,602
Oh, that one is quite old (2015).

Of course, "loading plugins" is not the same as "importing scripts". Still, some automation would be appreciated here.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 6th October 2017, 10:48   #3652  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 993
Yes, the autoload issue is registered but not fixed yet.
pinterf is offline   Reply With Quote
Old 7th October 2017, 08:53   #3653  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Hello
I'm stabilizing shaky video with deshaker.
Converting it to 16-bit so I could reduce rounding errors.
Like this
Code:
Function YV12toRGB32(clip c)
{
  c.convertTo16bit()
  converttorgb64(matrix="Rec709")
  convertto8bit()
}

Function RGB32toYV24(clip c)
{
  c.ConvertTo16bit()
  ConvertToYUV444(matrix="Rec709")
  convertto8bit()
}

s = source()
s.yv12torgb32().dehsaker().RGB32toYV24()
I noticed bit difference on brightness.
It was clear it's caused by color convertion.
So I just typed
Code:
s.yv12torgb32().RGB32toYV24().yv12torgb32().RGB32toYV24().yv12torgb32().RGB32toYV24().yv12torgb32().RGB32toYV24()
Then this is the result
source - https://i.imgur.com/V3aioqT.png
converted - https://i.imgur.com/kddpb3i.png
Is it a bug or something? (Pictures are resized since it doesn't matter for what we're talking anyway.)

Last edited by bxyhxyh; 7th October 2017 at 10:23.
bxyhxyh is offline   Reply With Quote
Old 7th October 2017, 11:49   #3654  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
Quote:
Originally Posted by bxyhxyh View Post
Then this is the result ...is it a bug or something?
It does look like a bug. The problem seems to be in ConvertTo8bit; its output is aprox. 1 step darker after each pass, probably a rounding issue. Using dither seems to fix it:
Code:
Function YV12toRGB32(clip c)
{
  c.convertTo16bit()
  converttorgb64(matrix="Rec709")
  convertto8bit(dither=0)
}

Function RGB32toYV24(clip c)
{
  c.ConvertTo16bit()
  ConvertToYUV444(matrix="Rec709")
  convertto8bit(dither=0)
}
however this does add a dither pattern, invisible in normal footage but apparent in Colorbars etc. Adding a fixed offset also seems to work:
Code:
Function YV12toRGB32(clip c)
{
  c.convertTo16bit()
  converttorgb64(matrix="Rec709")
  RGBAdjust(rb=127, gb=127, bb=127)
  convertto8bit()
}

Function RGB32toYV24(clip c)
{
  c.ConvertTo16bit()
  RGBAdjust(rb=127, gb=127, bb=127)
  ConvertToYUV444(matrix="Rec709")
  convertto8bit()
}
Offset set to 127 because 0.5 (8bit) ≈ 127 (16bit).

Last edited by raffriff42; 7th October 2017 at 12:06.
raffriff42 is offline   Reply With Quote
Old 7th October 2017, 16:33   #3655  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 349
Ah, so this might be also yet another "256 or 257" thing.

Last edited by bxyhxyh; 7th October 2017 at 17:53.
bxyhxyh is offline   Reply With Quote
Old 8th October 2017, 18:14   #3656  |  Link
Weirdo
Registered User
 
Join Date: Aug 2005
Posts: 225
Probably trivial but can't find the workaround. My little script gives There is no function named 'SetMTMode' (line 3), while it works with the older Avisynth 2.6 MT from SEt. Using Avisynth+ r2508, QTGMC 3.357s with its updated plugins, W10 x64. Thanks for any tips.

Code:
global MeGUI_darx = 143
global MeGUI_dary = 80
SetMTMode(5, 4)
SetMemoryMax(1000)
LoadPlugin("F:\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("G:\source.d2v")
SetMTMode(2)
QTGMC( Preset="Slow", EdiThreads=2 )
Distributor()
crop(14, 4, -10, -4)
__________________
Win 10 Pro x64
Weirdo is offline   Reply With Quote
Old 8th October 2017, 18:25   #3657  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,085
Quote:
Originally Posted by Weirdo View Post
Probably trivial but can't find the workaround. My little script gives There is no function named 'SetMTMode' (line 3), while it works with the older Avisynth 2.6 MT from SEt. Using Avisynth+ r2508, QTGMC 3.357s with its updated plugins, W10 x64. Thanks for any tips.
Multi-threading syntax in AviSynth+ is different, see wiki pages for more information: http://avisynth.nl/index.php/AviSynth%2B#MT_Notes
Reel.Deel is offline   Reply With Quote
Old 8th October 2017, 18:26   #3658  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,602
There is indeed no function named "SetMTMode" in AviSynth+.

See AviSynth Wiki: AviSynth+ – 4. MT notes

Furthermore, use Distributor() only when you are really sure you know why. If not, it may multiply threads unexpectedly.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 8th October 2017, 21:48   #3659  |  Link
Weirdo
Registered User
 
Join Date: Aug 2005
Posts: 225
Thank you both, I made the corrections and it works fine.
__________________
Win 10 Pro x64
Weirdo is offline   Reply With Quote
Old 10th October 2017, 16:08   #3660  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,508
Can someone give me a dumbed-down summary of the different MT modes? I've read this:

http://avisynth.nl/index.php/AviSynt...orrect_MT_mode

But it's not very clear to me. It doesn't really state how the modes work, and especially the bit for MT_NICE_FILTER isn't clear at all on when it should be used, instead focusing on when it shouldn't.

I'm guessing that MT_NICE_FILTER requests multiple frames in multiple threads, but only one instance of the filter, and that MT_MULTI_INSTANCE makes multiple instances, so it's a bit like calling the same plugin multiple times on trimmed/selecteveryed subclips and then joining or interleaving them? Or does it crop frames up into smaller frames then stack them back together, or something? (probably not) And that MT_SERIALIZED is the same as plain old single-threaded AviSynth?
__________________
My AviSynth filters / I'm the Doctor
davidhorman 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 21:21.


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