FilterFactory - Function "r2y"

Back to function listing

y displacement of the pixel m units away, at an angle of d, from an arbitrary center

Syntax

r2y(d,m)

Original Machine Code (in OPER resource) of Filter Factory 3.0 and 3.0.4 for Photoshop/Win32

58 pop eax (param_m)
5B pop ebx (param_d)
81 EB 00 01 00 00 sub ebx,$00000100 (256)
81 E3 FF 03 00 00 and ebx,$000003ff (1023)
0F BF 9C 5F 78 05 00 00 movsx ebx,[edi+ebx*2+$00000578] (COS_LOOKUP)
F7 EB imul ebx
05 FF 1F 00 00 add eax,$00001fff (8191)
83 D2 00 adc edx,$00 (0)
0F AC D0 0E shrd eax,edx,$0e (14) Shift EAX right by 14 bits
Store lower 14 bits of EDX into the upper 14 bits of EAX
50 push eax

C++ code

int factory_r2y(int d, int m) {
	return factory_r2x(d - 256, m);
}