Thanks for that Rui.
When I coded the edge detection in assembler .. I started with a one pixel accurate version of the 2 pixel version in ML.
I didn't like it the Luma was not consistent, and the image was blockly (top crossed out ASM).
I then moved onto using 4 very specific colours (next two). This was based by watching the Peaking video that you linked.
Then moved onto the bottom ASM .. which gives 16 shades of luma, and for the real edge detection changes.
I haven't 'exposed' many people to the Edge detection code (Sobel tranform) that goes before this ... it can leave you feeling a bit radio-active.
On the Plus side .. and I meant to mention this earlier.
Using a '
Fake Tan' (not sure if False Colours has a TM) may be straightforward if you can choose a suitable colour from the overlay palette:
http://magiclantern.wikia.com/wiki/2.0.4_5D2_VRAM_overlay
The Focus_Assist overlay has a startup routine that calculates the complete transform of colour based on
YUV -> RGBThe False colour used by Marshal does a
Y-> RGB (ie much simpler transform!).
Maybe this should be a separate Mode / and Full screen (within cropmarks). I am not going to work on this now (it is pretty straightforward to do).
| EdgeDetectedPix1 - Based on TH |
|
|
|
|
ORR Col,Col,0x70 |
|
|
|
|
|
ADD Col,Col,R14,LSR#23+4 |
Only use top 5 bits for 32 colours |
|
|
EdgeDetectedPix1 - Based on 4 hand
selected colours - Stored in Register R1 |
|
CLZ R14,R14 |
How many leading Zeros. 0,1,2,3 |
|
|
MOV R14,R14,LSL#3 |
= 0,
8, 16 or 24 |
|
|
|
MOV R14,R1,ROR R14 |
=
Rotate colour of 0x5B.55.6F.08 [0x08 is brightest, 0x5B is dim] |
AND R14, R14, #0xFF |
|
|
|
|
|
ORR Col,Col,R14 |
Set to Edge detected bright Red colours or |
|
|
|
|
EdgeDetectedPix1 - Based on 4 hand
selected colours - Calculated on the fly |
|
MOV R2,#0x00.00.00.5B |
Very Dark Red |
|
|
|
TST R14,#0x20.00.00.00 |
|
|
|
|
|
MOVNE R2,#0x00.00.00.55 |
Dark Red |
|
|
|
|
TST R14,#0x40.00.00.00 |
|
|
|
|
|
MOVNE R2,#0x00.00.00.6F |
Light Red |
|
|
|
|
TST R14,#0x80.00.00.00 |
|
|
|
|
|
MOVNE R2,#0x00.00.00.08 |
Bright Red |
|
|
|
|
ORR Col,Col,R2 |
Set to Edge detected bright Red colours or |
|
|
|
|
| EdgeDetectedPix1 - Based on AJ as the VRAM
colours are not Luma order |
|
| MOV R14, R14, LSR#24+4 |
R14 =0..0xF |
|
|
|
|
| RSB R14, R14,#00.00.00.6F |
R14 = a colour from 0x60 .. 0x6F |
|
|
| ORR Col,Col,R2 |
Set to Edge detected to be a red colour (up to white red) |
|
|
|
|
AJ