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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 12th July 2016, 03:55   #2081  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 596
Quote:
Originally Posted by MysteryX View Post
- How do I know a clip has UINT16 or FLOAT formats?
bool is_uint16 = (vi.pixel_type & VideoInfo::CS_Sample_Bits_16) != 0;
bool is_float = (vi.pixel_type & VideoInfo::CS_Sample_Bits_32) != 0;

Quote:
- What about Dithering?
Currently, nothing.
__________________
my repositories

Last edited by Chikuzen; 12th July 2016 at 04:05.
Chikuzen is offline  
Old 12th July 2016, 11:26   #2082  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
Quote:
Originally Posted by Chikuzen View Post
bool is_uint16 = (vi.pixel_type & VideoInfo::CS_Sample_Bits_16) != 0;
bool is_float = (vi.pixel_type & VideoInfo::CS_Sample_Bits_32) != 0;
Or easier, but AvsPlus-specific:
bool is_uint16 = vi.ComponentSize() == 2;
bool is_float = vi.ComponentSize() == 4;

Btw, there is a another new function vi.NumComponents(), which is 1 for greyscale, 3 for yuv/rgb, 4 for rgba etc.

Unlike IScriptEnv2, these can be considered stable.
__________________
AviSynth+
ultim is offline  
Old 12th July 2016, 12:10   #2083  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
@ultim, pinterf
Did you guys get a chance to look at this one? Not high priority I guess but still...
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 12th July 2016, 12:45   #2084  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,190
Quote:
Originally Posted by ultim View Post
Or easier, but AvsPlus-specific:
bool is_uint16 = vi.ComponentSize() == 2;
bool is_float = vi.ComponentSize() == 4;

Btw, there is a another new function vi.NumComponents(), which is 1 for greyscale, 3 for yuv/rgb, 4 for rgba etc.

Unlike IScriptEnv2, these can be considered stable.
Is there a way to define macros that allow using the simpler new syntax while remaining compatible with AviSynth 2.6?
MysteryX is offline  
Old 12th July 2016, 12:55   #2085  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 596
Quote:
Originally Posted by Groucho2004 View Post
@ultim, pinterf
Did you guys get a chance to look at this one? Not high priority I guess but still...
from avisynth.cpp line 1686
Code:
  int size = pitchY * height + 2 * pitchUV * heightUV;
  size = size + align -1;

  VideoFrame *res = GetNewFrame(size);
1920*30*1080*30 + 2*960*30*540*30 = 2799360000
max of int32_t is 2^31 - 1= 2147483647
i don't know whether this is bug or spec.
__________________
my repositories

Last edited by Chikuzen; 12th July 2016 at 13:08.
Chikuzen is offline  
Old 12th July 2016, 13:12   #2086  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,190
Quote:
Originally Posted by Chikuzen View Post
1920*30*1080*30 + 2*960*30*540*30 = 2799360000
max of int32_t is 2^31 - 1= 2147483647
i don't know whether this is bug or spec.
Why the *30?

There was discussion recently regarding x64 and whether the frame size should be INT(32-bit) like Ultim implemented or 64-bit. Changing that would require recompiling every x64 plugin.
MysteryX is offline  
Old 12th July 2016, 13:40   #2087  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 596
Quote:
Originally Posted by MysteryX View Post
Why the *30?
see groucho's post.

Quote:
There was discussion recently regarding x64 and whether the frame size should be INT(32-bit) like Ultim implemented or 64-bit. Changing that would require recompiling every x64 plugin.
from avisynth.cpp line 1228
Code:
VideoFrame* ScriptEnvironment::AllocateFrame(size_t vfb_size)
{
  if (vfb_size > (size_t)std::numeric_limits<int>::max())
  {
    throw AvisynthError(this->Sprintf("Requested buffer size of %zu is too large", vfb_size));
  }
so, it's a bug.
vfb_size should be calculated on size_t.
error messages should be correct.
__________________
my repositories
Chikuzen is offline  
Old 12th July 2016, 14:39   #2088  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,901
It would be nice if the avisynth header can be kept compatible with VS2010.
jpsdr is offline  
Old 12th July 2016, 15:42   #2089  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
Quote:
Originally Posted by jpsdr View Post
It would be nice if the avisynth header can be kept compatible with VS2010.
ok. it might happen that we accidentially break vs2010 because none of the active developers use it so we don't test it. but if you let us know of problems with vs2010 we'll correct it, as long as it is only the public headers.
__________________
AviSynth+
ultim is offline  
Old 12th July 2016, 16:36   #2090  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,190
Quote:
Originally Posted by ultim View Post
ok. it might happen that we accidentially break vs2010 because none of the active developers use it so we don't test it. but if you let us know of problems with vs2010 we'll correct it, as long as it is only the public headers.
http://forum.doom9.org/showthread.ph...86#post1773786
MysteryX is offline  
Old 12th July 2016, 18:24   #2091  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,901
Quote:
Originally Posted by ultim View Post
ok. it might happen that we accidentially break vs2010 because none of the active developers use it so we don't test it. but if you let us know of problems with vs2010 we'll correct it, as long as it is only the public headers.
Basicaly, functions of C++11 are not supported (only VS2015 begin to allmost fully support it from what i've understood), so delete is not supported.
jpsdr is offline  
Old 12th July 2016, 18:29   #2092  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,268
Lines 443 and 444 in turn.cpp cause compilation errors in VS2013. Is 'constexpr' an intended change, or was it a typo that slipped in there?

EDIT: Okay, apparently it is (why didn't I try looking that up before?). But since it fails, I'm thinking either VS2013 is missing the header to support it, or turn.cpp needs the right header added to its includes.

Last edited by qyot27; 12th July 2016 at 18:31.
qyot27 is offline  
Old 12th July 2016, 18:38   #2093  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 1,901
VS2013 just begin to support a few features of C++11, and so it's probably VS2013 missing the header.
jpsdr is offline  
Old 12th July 2016, 19:01   #2094  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
Quote:
Originally Posted by MysteryX View Post
Ah, ok. I will get rid of "delete" there. Will be in the next push.

Quote:
Originally Posted by qyot27 View Post
Lines 443 and 444 in turn.cpp cause compilation errors in VS2013. Is 'constexpr' an intended change, or was it a typo that slipped in there?

EDIT: Okay, apparently it is (why didn't I try looking that up before?). But since it fails, I'm thinking either VS2013 is missing the header to support it, or turn.cpp needs the right header added to its includes.
constexpr is a core language feature and cannot be added via a header. As is currently, it will not compile on VC2013. Please ask chikuzen if he can do something about it, as he's the author of those lines, and I'm not really an intrinsics expert.
__________________
AviSynth+
ultim is offline  
Old 12th July 2016, 21:48   #2095  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,099
templated intrinsics is the new cool thing to do if you want to write optimized code that supports multiple bitdepths without copypasting shit all over the place, get with the times and upgrade yer compilers

Last edited by TheFluff; 12th July 2016 at 21:51.
TheFluff is offline  
Old 12th July 2016, 21:57   #2096  |  Link
TurboPascal7
Registered User
 
TurboPascal7's Avatar
 
Join Date: Jan 2010
Posts: 270
Does it even have to do anything with the intrinsics there? Looks completely unnecessary (like most of the C++ duhuhu).
__________________
Me on GitHub | AviSynth+ - the (dead) future of AviSynth
TurboPascal7 is offline  
Old 13th July 2016, 00:43   #2097  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 596
Quote:
Originally Posted by ultim View Post
Please ask chikuzen if he can do something about it.
hmm, ok.
I'll send a PR.

btw, when does AVS+ keep supporting VS2013? 22nd century?
__________________
my repositories
Chikuzen is offline  
Old 13th July 2016, 01:08   #2098  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,538
Guess it's probably not a good idea to stay vs2010 or 2013, the latest c++ standard is c++14 so..
And vs2015 community is free anyways, what's the point of getting stuck at square one
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline  
Old 13th July 2016, 04:46   #2099  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,190
I have a question. Let's say I run a script at 8fps, then in the middle of it, I'm running something else. Obviously performance goes down to, say, 4fps. Once the other task is done and the script has all the resources again, however, it stays stuck at 4fps and doesn't go back to 8fps. Has anyone else noticed this? What's causing that?
MysteryX is offline  
Old 13th July 2016, 06:21   #2100  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 756
Quote:
Originally Posted by feisty2 View Post
Guess it's probably not a good idea to stay vs2010 or 2013, the latest c++ standard is c++14 so..
And vs2015 community is free anyways, what's the point of getting stuck at square one
You don't have to use all the cool new features just because you can.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline  
Closed Thread

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:55.


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