Malow
26th July 2016, 15:23
hi, I'm trying to compile this excellent wrapper for avisynth, (it create a fake AVI pointing to the script, and use a codec do serve to programs)
it was developed a while ago by Eugene Bujak, and looks like was abandoned.
it worked great in all my tests (better than any other) but there's no x64 codec for decoding the AVI file (video editing and encoders i have are now x64)
here are the files/sources:
https://hmage.net/files.html
the problem is, there an include "codecinst.h" that uses "__asm", and while trying to compile for x64, the compiler says __asm is not supported (using Microsoft Visual C++ Build Tools)
extern "C" {
LRESULT PASCAL DriverProc(DWORD dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2);
inline void mem2(void *dst, void *src, int nbytes)
{
#ifdef _MSC_VER
__asm {
mov esi, src
mov edi, dst
mov ecx, nbytes
shr ecx, 6 // 64 bytes per iteration
loop1:
movq mm1, 0[ESI] // Read in source data
movq mm2, 8[ESI]
movq mm3, 16[ESI]
movq mm4, 24[ESI]
movq mm5, 32[ESI]
movq mm6, 40[ESI]
movq mm7, 48[ESI]
movq mm0, 56[ESI]
movntq 0[EDI], mm1 // Non-temporal stores
movntq 8[EDI], mm2
movntq 16[EDI], mm3
movntq 24[EDI], mm4
movntq 32[EDI], mm5
movntq 40[EDI], mm6
movntq 48[EDI], mm7
movntq 56[EDI], mm0
add esi, 64
add edi, 64
dec ecx
jnz loop1
emms
}
#else
memcpy(dst,src,nbytes);
#endif
}
}
apparently, the codec is based on Huffyuv code.
as i am no programmer, any help appreciated. :o
it was developed a while ago by Eugene Bujak, and looks like was abandoned.
it worked great in all my tests (better than any other) but there's no x64 codec for decoding the AVI file (video editing and encoders i have are now x64)
here are the files/sources:
https://hmage.net/files.html
the problem is, there an include "codecinst.h" that uses "__asm", and while trying to compile for x64, the compiler says __asm is not supported (using Microsoft Visual C++ Build Tools)
extern "C" {
LRESULT PASCAL DriverProc(DWORD dwDriverID, HDRVR hDriver, UINT uiMessage, LPARAM lParam1, LPARAM lParam2);
inline void mem2(void *dst, void *src, int nbytes)
{
#ifdef _MSC_VER
__asm {
mov esi, src
mov edi, dst
mov ecx, nbytes
shr ecx, 6 // 64 bytes per iteration
loop1:
movq mm1, 0[ESI] // Read in source data
movq mm2, 8[ESI]
movq mm3, 16[ESI]
movq mm4, 24[ESI]
movq mm5, 32[ESI]
movq mm6, 40[ESI]
movq mm7, 48[ESI]
movq mm0, 56[ESI]
movntq 0[EDI], mm1 // Non-temporal stores
movntq 8[EDI], mm2
movntq 16[EDI], mm3
movntq 24[EDI], mm4
movntq 32[EDI], mm5
movntq 40[EDI], mm6
movntq 48[EDI], mm7
movntq 56[EDI], mm0
add esi, 64
add edi, 64
dec ecx
jnz loop1
emms
}
#else
memcpy(dst,src,nbytes);
#endif
}
}
apparently, the codec is based on Huffyuv code.
as i am no programmer, any help appreciated. :o