V value of the YUV color space.
Syntax
v
Synonyms
v0
v1
Formula
v=(78*r-65*g-13*b)/256 (the output range would be v=[-77;77] )
Formula corrected in my patch:
v=614777*r-514799*g-99978*b)/2000000 (the output range would be v=[-78;78] )
Original Machine Code (in OPER resource) of Filter Factory 3.0 and 3.0.4 for Photoshop/Win32
8B 17 | mov edx,[edi+$0000] (r) | |
8D 14 52 | lea edx,[edx+edx*2] | |
03 D2 | add edx,edx | |
8B 4F 04 | mov ecx,[edi+$04] (g) | |
8D 0C 89 | lea ecx,[ecx+ecx*4] | |
2B D1 | sub edx,ecx | |
2B 57 08 | sub edx,[edi+$08] (b) | |
8B C2 | mov eax,edx | |
8D 14 52 | lea edx,[edx+edx*2] | |
8D 04 90 | lea eax,[eax+edx*4] | |
99 | cdq | |
81 E2 FF 00 00 00 | and edx,$000000ff (255) | |
03 C2 | add eax,edx | |
C1 F8 08 | sar eax,$08 (8) | |
50 | push eax |