View Full Version : SansGrip: LegalClip
MattO
19th January 2003, 11:56
Sansgrip,
I am trying to compile your LegalClip 0.2 AVISynth filter with Visual C++ 6.0 Enterprise, but I get the following errors:
error C2420: 'luma_lookup' : illegal symbol in second operand
error C2420: 'chroma_lookup' : illegal symbol in second operand
in this code:
xloop:
movzx esi, byte ptr [eax] // dl = luma
mov dl, [ebx + esi + luma_lookup] // dl = clamped value
mov [eax], dl // Store
inc eax
movzx esi, byte ptr [eax] // dl = chroma
mov dl, [ebx + esi + chroma_lookup] // dl = clamped value
mov [eax], dl // Store
inc eax
I have had no trouble compiling any other AVISynth filters, just this one :( , is there something I am missing or is the source code wrong.
thanks for any help
Matto
trbarry
19th January 2003, 18:45
Some of Sansgrips's filters compile only in VS7. This is because vs6 inline assemble can't directly access the objects vars. If you were to first copy those 2 vars to local storage it would probably work.
- Tom
sh0dan
19th January 2003, 19:40
If it's a matter of making it work under AviSynth 2.5, just use the Limiter function instead.
MattO
19th January 2003, 20:11
Tom,
How would I do that?
thanks
MattO
trbarry
19th January 2003, 23:07
Dunno. It's probably one of those lookup vars.
But I haven't looked at the source, just your post.
- Tom
SansGrip
19th January 2003, 23:37
Originally posted by trbarry
Some of Sansgrips's filters compile only in VS7. This is because vs6 inline assemble can't directly access the objects vars. If you were to first copy those 2 vars to local storage it would probably work. Yep, that'll be the problem. Just make a copy of the variables causing the problem like this:
// Top of function
unsigned char* luma_l = luma_lookup, *chroma_l = chroma_lookup;
Then change the asm to refer to the local copies instead.
onesoul
20th January 2003, 04:28
Mind my ignorance, but why the need to compile? Are you modifying the source?
MattO
20th January 2003, 20:03
Sansgrip,
thanks I'll give it a go.
onesoul,
no, I'm not modifying the sources :(
I am just trying to understand them and compile them, thats all.
onesoul
20th January 2003, 21:45
Good luck, maybe one day you will be creating your plugins :)
I wish I could understand them too... :)
SansGrip
21st January 2003, 00:23
Originally posted by MattO
I am just trying to understand them and compile them, thats all. I can't remember if that release of LegalClip includes the C version, but if not grab an old release from my site -- it might help to compare the C code with the asm. LegalClip was my first stab at assembler, so it's probably not very well-written ;).
sh0dan
21st January 2003, 10:01
Originally posted by SansGrip
I can't remember if that release of LegalClip includes the C version, but if not grab an old release from my site -- it might help to compare the C code with the asm. LegalClip was my first stab at assembler, so it's probably not very well-written ;).
I think it's about the same code as Limiter, but it also includes C-code for fallback, when ISSE isn't supported. (here) (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/avisynth2/avisynth/levels.cpp?rev=1.1.1.1.2.7&only_with_tag=avisynth_2_1&sortby=date&content-type=text/vnd.viewcvs-markup) if you're interested.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.