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. |
19th December 2013, 23:19 | #441 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
Typical could be :
In .cpp file : Code:
extern "C" void fn(void *ptr,ptrdiff_t pitch); Code:
fn proc ptr:dword,pitch:dword public fn push ebx mov ebx,ptr mov ecx,pitch. mov eax,dword ptr[ebx+ecx] ..... Code:
fn proc public frame push rbx .pushreg rbx .endprolog mov rbx,rcx mov rcx,rdx mov eax,dword ptr[rbx+rcx] .... Will work without issue for positive and negative pitch in both x86 and x64. If you have this instead : In .cpp file : Code:
extern "C" void fn(void *ptr,int pitch); Code:
fn proc ptr:dword,pitch:dword public fn push ebx mov ebx,ptr mov ecx,pitch. mov eax,dword ptr[ebx+ecx] ..... x64 asm file : Code:
fn proc public frame push rbx .pushreg rbx .endprolog mov rbx,rcx xor rcx,rcx mov ecx,edx mov eax,dword ptr[rbx+rcx] .... Issue can be with negative value in asm functions. If you pass in x64 mode to an asm function a pointer (on 64 bits) and a pitch but on 32 bits for it, it will work only on positive value. In VDub pitch can be negative. If in avisynth pitch is always positive, issues may not occurs. |
19th December 2013, 23:41 | #443 | Link | |
Registered User
Join Date: Jan 2010
Posts: 270
|
Quote:
But whatever works for you, I guess. |
|
20th December 2013, 01:02 | #444 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Some x64 asm can definitely benefit from the extra registers, but so few that the maintenance cost of two asm functions usually outweighs it. Even more so when you start optimizing for various architectures (SSE2, SSSE3, AVX) and 16-bit depth. x86inc is SO useful, and x86util does handy work papering over some more differences. You really should consider using them, you might be surprised.
|
20th December 2013, 08:45 | #445 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
Could you make so imagesource returns the original colorspace, e.g. jpeg images encoded in 4:2:0 or 4:4:4, instead of converting them to RGB?
Perhaps with the argument pixel_type="original", if you want to keep it compatible with old scripts that assume RGB. |
20th December 2013, 10:47 | #446 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
Code:
fn proc public frame push rbx .pushreg rbx .endprolog mov rbx,rcx movsxd rcx,edx mov eax,dword ptr[rbx+rcx] ....
__________________
AviSynth+ |
|
20th December 2013, 11:09 | #447 | Link |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
The current image library (DevIL) in use by AviSynth doesn't allow that, so no. Neither it is possible with many other generic image decoder libraries, as still images are usually composed on RGB surfaces. If anybody knows a still image library that can do that, I'd be happy to have a closer look at it. On the other hand, if it is only possible with format-specific decoders, then I'd only have it as a separate external plugin.
__________________
AviSynth+ |
20th December 2013, 11:49 | #450 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
https://github.com/dubhater/vapoursynth-nnedi3
__________________
Buy me a "coffee" and/or hire me to write code! |
|
20th December 2013, 12:21 | #451 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
__________________
AviSynth+ Last edited by ultim; 20th December 2013 at 12:30. |
|
20th December 2013, 12:33 | #452 | Link | |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,666
|
Quote:
|
|
20th December 2013, 12:44 | #453 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
__________________
AviSynth+ |
|
21st December 2013, 15:32 | #456 | Link |
Registered User
Join Date: Aug 2007
Posts: 374
|
Actually I have working very nice JPEG decoder that can be ported to Avisynth. It not just keeps original chroma subsampling, but also supports "reconstruction" that accurately suppresses typical JPEG artifacts and can be done only as part of the decoding stage. Won't be open-source though.
It's currently implemented as plugin (http://plugring.farmanager.com/plugin.php?pid=693) for Far Manager (http://www.farmanager.com/download.php?l=en). It has some documentation, but only in Russian. |
24th December 2013, 11:07 | #457 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,316
|
I think i may have discoverd an issue with x64 version, when trying to port the nnedi3 to x64.
When investigating, i've disable the use of ASM function, and fixed number of cpu (or threads) to 1. I've the following result, code is around lines 1168. With this : Code:
else if (vi.IsYV12()) { for (int i=0; i<ct; ++i) { v = new nnedi3(v.AsClip(),i==0?1:0,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); env->ThrowError("Ok"); v = env->Invoke("TurnRight",v).AsClip(); // always use field=1 to keep chroma/luma horizontal alignment v = new nnedi3(v.AsClip(),1,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); v = env->Invoke("TurnLeft",v).AsClip(); } With this : Code:
else if (vi.IsYV12()) { for (int i=0; i<ct; ++i) { v = new nnedi3(v.AsClip(),i==0?1:0,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); v = env->Invoke("TurnRight",v).AsClip(); env->ThrowError("Ok"); // always use field=1 to keep chroma/luma horizontal alignment v = new nnedi3(v.AsClip(),1,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); v = env->Invoke("TurnLeft",v).AsClip(); } With this : Code:
else if (vi.IsYV12()) { for (int i=0; i<ct; ++i) { v = new nnedi3(v.AsClip(),i==0?1:0,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); //v = env->Invoke("TurnRight",v).AsClip(); // always use field=1 to keep chroma/luma horizontal alignment v = new nnedi3(v.AsClip(),1,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); env->ThrowError("Ok"); v = env->Invoke("TurnLeft",v).AsClip(); } With this : Code:
else if (vi.IsYV12()) { for (int i=0; i<ct; ++i) { v = new nnedi3(v.AsClip(),i==0?1:0,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); //v = env->Invoke("TurnRight",v).AsClip(); // always use field=1 to keep chroma/luma horizontal alignment v = new nnedi3(v.AsClip(),1,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); v = env->Invoke("TurnLeft",v).AsClip(); env->ThrowError("Ok"); } and with this : Code:
else if (vi.IsYV12()) { for (int i=0; i<ct; ++i) { v = new nnedi3(v.AsClip(),i==0?1:0,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); //v = env->Invoke("TurnRight",v).AsClip(); // always use field=1 to keep chroma/luma horizontal alignment v = new nnedi3(v.AsClip(),1,true,true,true,true,nsize,nns,qual,etype,pscrn,threads,opt,fapprox,env); //v = env->Invoke("TurnLeft",v).AsClip(); } env->ThrowError("Ok"); So, according the results, i have the feeling it's something related to the x64 version of avisynth, as crash seems to occur during call of internal avisynth functions. |
25th December 2013, 12:34 | #458 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
since there is no avs 2.6 x64 around, and 2.6 x64 filters is just a few, actually the existing is:- mask tools 2 and TP7 filters and last is LaTo filters, it can be update so, 2.6 in x64 can be change alone? or it can't? Last edited by real.finder; 25th December 2013 at 13:02. Reason: Spelling error |
|
30th December 2013, 12:16 | #459 | Link |
Registered User
Join Date: Mar 2003
Location: UK
Posts: 360
|
I'm trying to work out how to use the updated RGTools.dll in place of the RemoveGrain package, but unsure if its just a case of replacing all calls in the removegrain package with rgtools.dll or if the syntax is different
At its most basic, calling for example RemoveGrain(17) or RemoveGrain(2) would this simply now be RGTools(17) or RGTools(2), and loading RGTools.dll instead of RemoveGrain.dll via the 'loadplugin' command The docs for the updated plugins for avisynth+ are a bit sparse, and don't really suggest if they are direct drop in replacement or if a bit more work may be needed if the original plugins are called within scripts Scripts that call various parts of the removegrain package, such as RemoveDirtMC, RemoveNoiseMC or RemoveNoiseMC_SE scripts are giving me a headache trying to update them to use RGTool. These all call different parts of the RemoveGrain package, such as the clense function for temporal noise/grain removal Thanks |
30th December 2013, 12:21 | #460 | Link |
Registered User
Join Date: Jan 2010
Posts: 270
|
First of all, you're posting in a wrong thread. This is the right one.
First 24 modes of RGTools should be drop-in replacement of the old removegrain plugin. Same goes for repair (24 modes), verticalcleaner (3 modes) an clense (normal, backward, forward). RGTools doesn't have some of the parameters in Clense so you'll have to drop those if you want to use it. |
|
|