Page 1 of 1

duplicating images

PostPosted: Apr 10, 2008 @ 11:02am
by Nic-Gun

PostPosted: Apr 10, 2008 @ 7:05pm
by edge

PostPosted: Apr 11, 2008 @ 10:59am
by Nic-Gun
i tried the sample but i got an error at line :
ClassEMemory::Copy(dst, src, info.realheight * info.realpitch * info.realwidth * (info.bitwidth / 8));

where it lead to MEMCPY.asm at line :
;
; Copy down to avoid propogation in overlapping buffers.
;
align @WordSize
CopyDown:
lea esi,[esi+ecx-4] ;U - point to 4 bytes before src buffer end
lea edi,[edi+ecx-4] ;V - point to 4 bytes before dest buffer end
;
; See if the destination start is dword aligned
;

test edi,11b ;U - test if dword aligned
jnz short CopyLeadDown ;V - if not, jump

shr ecx,2 ;U - shift down to dword count
and edx,11b ;V - trailing byte count

cmp ecx,8 ;U - test if small enough for unwind copy
jb short CopyUnwindDown ;V - if so, then jump

std ;N - set direction flag
rep movsd ;N - move all of our dwords
cld ;N - clear direction flag back

jmp dword ptr TrailDownVec[edx*4] ;N - process trailing bytes

align @WordSize


any suggestion?

PostPosted: Apr 11, 2008 @ 9:10pm
by edge
Hi Nic-Gun,

Sorry, I was lazy :p

I've modified the sample in the original post. It was copying too many bytes.

PostPosted: Apr 14, 2008 @ 5:04am
by Nic-Gun