These
LiveView Crop Registers and
Screen/LiveView/HDMI resolutions threads don't fit the info I will discuss, I want to draw the full image of the complex LiveView (with your help), How things related to each other, It's difficult to do it myself alone So any help from you is needed.
for
Users: the
main goal for me is to achieve
real-time correct framing preview.
Today I am
Discussing :
1-
LiveView Crop Registers2-
YUV Resolution3-
HDMI Black BarsLet's start investigating:
LiveView Crop Registers
From
LiveView Crop Registers thread:
"By locking the registers between x5 and x10 you can bring x10 real-time preview into x5 vice versa in Canon 700D, here is the registers between the two:"
Google spreadsheet LinkA couple of days ago I succeed to reduce the cropped preview area but only in x10 mode for both width and height, actually I got the full width of x5 mode in x10 mode, but the things get different for these registers in x5 mode, it will not work in the same way, I noticed 3 types of registers:
1-
Stretching Registers2-
Limit Registers Registers control the Limits of other Registers (Has no visual effect)
3-
Preview Region Registers control the region of cropped area, its values are a resolution values
1- Stretching Registers
There are specialized registers for
Vertical stretching and other registers specialized for
Horizontal stretching, let's take a look for
Horizontal registers first:
1-C0F11B8C
2-C0F11A8C
3-C0F11A88 (Has two values 0x0 or 0x1, Reverts C0F11B8C effect)
These
first two registers have a ratio between the left part and right part values, it changes at different modes depending on other factors Like YUV resolution and the preview area, Examples in x5 Mode:
C0F11B8C = 0x0*
C0F11A8C = 0x1E002B
With default value, a normal view in x5:

Tweaked C0F11A8C to 0x1E003B, It seems it's trying to show a new part of LiveView but there is no Data to show it, it seems like signal loss in this area:

Tweaked C0F11A8C to 0x1E001B, You lose part of LiveView by stretching it, Simply this the trick which Canon uses to make a Digital lossy Zoom like in x10 Mode:

C0F11B8C has the same effect, its value in *Idle mv1080 (Without H.264 Recording) = 0x50009, Tweaking it to 0x5000a gives the
lost signal, Tweaking it to 0x50008 gives a
Horizontal Zoom.
These registers have limitations, You can't decrease/ increase too much, the limitations are coming from the ratio between the two parts in the same register e.g in C0F11A8C between 0x
1E00
2B, or other registers depending on the mode, not sure what are they exactly.
Note: C0F11A88 gives same result as above two registers, the differences are it has two values 0x0 or 0x1, in x5 mode it's 0x0 , tweaking it to 0x1 gives massive Horizontal stretching (Zoom) in one step, and it reverts C0F11A8C effect, normally in x5 mode C0F11A8C = 0x1E00
2B, tweaking it to 0x1E00
3B will show the signal loss, but after tweaking C0F11A88 from 0x0 to 0x1 in x5 Mode, Now tweaking C0F11A8C to 0x1E00
3B will increase the Horizontal stretching (Zoom) instead of giving the signal loss or compressing LiveView Horizontally, its effect has been reverted by C0F11A88.
in x10 Mode C0F11A88 = 0x1, tweaking it to 0x0 gives massive signal loss area in one step.
Second, the
Vertical registers in x5 Mode:
1-C0F11BCC = 0x0*
2-C0F11ACC = 0x1E002B (Yes same value as Horizontal one)
3-C0F11AC8 (Has two values 0x0 or 0x1, Reverts C0F11ACC effect)
Vertical registers are more aggressive, for C0F11ACC in x5 mode if you attempted to increase it value from 0x1E002B to 0x1E003B to get signal loss as the Horizontal register, it will stuck the LiveView maybe because there no data to show, figure out how to Control it without frozen LiveView, tweaking it to 0x1E001B gives a vertical Zoom stretching.
Default C0F11ACC value in x5 Mode:

Tweaking C0F11ACC to 0x1E001B in x5 Mode:

Also C0F11BCC has same value as C0F11B8C, its value in *Idle mv1080 (Without H.264 Recording) = 0x50009, Tweaking it to 0x5000a gives the a
frozen LiveView, Tweaking it to 0x50008 gives a
Vertical Zoom stretching.
2- Limit Registers and & 3- Preview Region Registers
Let's start with the Experiment:
Reducing the Cropped area in x10 Mode:
Link:
youtu.be/cK_A-4tvskY
Results:
Default x10 Mode:

Default x5 Mode:

Reduced Cropped Area in x10 Mode
Random Notes and Details:
1- There are some registers controls some factors between the stretching registers and region of cropped area registers, and affect how it work together, and by tweaking these registers with other adjustments for the registers showed in the video above we can get the full height of x5 Mode in x10 Mode, I don't understand these scaling routines and how it affect the limits and the cropped area yet, so I don't have accurate answer what is it really doing, Here are Three Example in x5 Mode: (Also Managed to get full width of x5 Mode into x10 by tweaking only three registers)
Link:
https://youtu.be/gmU6_GknchI
2-
Reducing x5 Cropped Area Experiment:

3- Some registers with 0x80
XX00
XX appear to control the preview, some of them can break LiveView also.
-The best way to start is by increasing or trying to fix 1x3 Preview, the required registers are between mv720 and mv1080, I hope there is no other registers should change to fix 1x3 preview, and there is no Horizontal registers to deal with.
YUV Resolution
Without HDMI black bars Experiment and DebugMsg LOG I wouldn't be able to get this, a1ex is a bit evil on this . .
c0f04xnn: EDMAC channel "x", filtered out
He is filtering our registers out of adtg_gui

, commented out these Lines

:
if ((dst == 0xC0F0 && (reg & 0xF000) == 0x4000) || /* EDMAC block 1: 0xC0F04xnn */
(dst == 0xC0F2 && (reg & 0xF000) == 0x6000) || /* EDMAC block 2: 0xC0F26xnn */
(dst == 0xC0F3 && (reg & 0xF000) == 0x0000) || /* EDMAC block 3: 0xC0F30xnn */
0)
{
/* ignore EDMAC activity */
return;
}
Especially this range of registers "0xC0F04xnn" , Now we can get interesting ones . .
-How did I find out what controls YUV resolution properly?
In Idle mv1080 and Idle mv720 Mode YUV resolution is
960x639 A.K.A in ML Menu the Craw buffer size:

When you start H.264 recording it changes to
1728x1151 on
700D, interesting:

When you start H.264 recording in mv720 it changes to
1280x689 
Now using adtg_gui between Idle and H.264 recording we can Identify these registers:
Craw Buffer ChangingIncreasing YUV resolution Experiment in mv720Link:
https://youtu.be/ESKSDLcywzU
Download Dumped YUV files Also included
422ToImage 1.9.2, the Repository is down.
-Does YUV resolution control or related to cropped area in x5 Mode? YUV resolution in 700D in x5 Mode is 1032x687, matches 1032x687 of RAW data without up-scaling (you can align YUV dump and RAW DNG dump without re-sizing unlike idle mv1080 on 700D), also Movie Crop Mode has 1728x971 YUV resolution out of the box, I will do an Experiment to decrease YUV resolution from 1728x971 to 960x539 to see if LiveView will be cropped more.
-Didn't play with Vertical resolution registers, I can override mv1080 H.264 registers in Idle mv1080 and LiveView still working with increased YUV resolution, increasing Vertical resolution is possible, might be simpler.
-This might lower the overhead when using HDMI, maybe if we decrease YUV resolution? using HDMI on 700D in mv1080 YUV resolution is 1620x639.
-I have tried to record H.264 @ 1728x689 instead of 1280x689 in mv720 to force H.264 Encoder to down scale 1728 to 1280 instead of YUV path, however I got stuck video in H.264 file.
HDMI Black Bars
By pressing Info button you can toggle between two Canon default previews which are Canon global DRAW with a small Canon Preview with black bars in the Left and Right, also in the bottom, and the second Preview by Canon without Canon global draw and with bigger size LiveView, I captured a LOG using DebugMsg in x5 Mode (Because YUV resolution are not changing in x5 mode), I narrowed down to this part of the LOG:
4.441.384 **INT-6Dh*:ff37cf1c:ad:03: RamClear_StartPath
4.441.394 **INT-6Dh*:ff37d084:ad:03: RamClear_LV_RAMCLEAR_COLOR_BLACK
4.441.467 **INT-6Dh*:ff37c334:ad:03: LV_StartTripleRamClearPassLR Width:600, Height:440, VW:3840
4.441.482 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11004] <- 0x00000000
4.441.484 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11440] <- 0x00000001
4.441.485 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11444] <- 0x00000000
4.441.487 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F1108C] <- 0x00000002
4.441.488 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11144] <- 0x00000001
4.441.490 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11448] <- 0x00001000
4.441.491 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F1144C] <- 0x00000001
4.441.493 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11450] <- 0x01B70257
4.441.494 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11454] <- 0x00000257
4.441.553 **INT-6Dh*:ff37c3f0:00:00: *** RegisterEDmacCompleteCBR(0x5, 0xff37bfdc "WriteEDmac1CompleteCBR[%x]", 0x777c4)
4.441.574 **INT-6Dh*:ff0c7ba4:MMIO : [0xC0201010] <- 0x0000006D
4.441.575 **INT-6Dh*:ff0c7ba8:MMIO : [0xC0201200] -> 0x00000001
4.441.636 **INT-6Dh*:ff37c404:00:00: *** SetEDmac(0x5, 0x4b9ee000, 0x24bf14, 0x60000000)
4.441.714 **INT-6Dh*:000c76ec:00:00: size (600, skip 3240) x 439, 600, skip -1683120,
(600, skip 3240) x 440
4.441.733 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0450C] <- 0x00000001
4.441.737 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04510] <- 0x01B70258
4.441.741 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04514] <- 0x00000258
4.441.743 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04518] <- 0x00000CA8
4.441.745 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0451C] <- 0xFFE65150
4.441.747 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04520] <- 0x00000CA8
4.441.748 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04524] <- 0x00000000
4.441.750 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04528] <- 0x00000000
4.441.756 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04504] <- 0x60000000
4.441.757 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04508] <- 0x0B9EE000
4.441.781 **INT-6Dh*:ff37c410:00:00: *** ConnectWriteEDmac(0x5, 0x6)
4.441.787 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F05014] <- 0x00000006
4.441.808 **INT-6Dh*:ff37c424:ad:03: SetEDmac1 addr:0x4b9ee000
4.441.866 **INT-6Dh*:ff37c4a0:00:00: *** RegisterEDmacCompleteCBR(0x1, 0xff37c05c "WriteEDmac3CompleteCBR[%x]", 0x777c4)
4.441.880 **INT-6Dh*:ff0c7ba4:MMIO : [0xC0201010] <- 0x00000059
4.441.882 **INT-6Dh*:ff0c7ba8:MMIO : [0xC0201200] -> 0x00000001
4.441.935 **INT-6Dh*:ff37c4b4:00:00: *** SetEDmac(0x1, 0x4c20e000, 0x24bf14, 0x20000000)
4.442.011 **INT-6Dh*:000c76ec:00:00: size (600, skip 3240) x 439, 600, skip -1683120,
(600, skip 3240) x 440
4.442.028 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0410C] <- 0x00000001
4.442.031 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04110] <- 0x01B70258
4.442.032 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04114] <- 0x00000258
4.442.034 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04118] <- 0x00000CA8
4.442.036 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0411C] <- 0xFFE65150
4.442.038 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04120] <- 0x00000CA8
4.442.039 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04124] <- 0x00000000
4.442.041 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04128] <- 0x00000000
4.442.045 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04104] <- 0x20000000
4.442.047 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04108] <- 0x0C20E000
4.442.070 **INT-6Dh*:ff37c4c0:00:00: *** ConnectWriteEDmac(0x1, 0x4)
4.442.076 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F05004] <- 0x00000004
4.442.093 **INT-6Dh*:ff37c4d4:ad:03: SetEDmac3 addr:0x4c20e000
4.442.148 **INT-6Dh*:ff37c4f8:00:00: *** RegisterEDmacCompleteCBR(0x9, 0xff37c09c "ReadEDmac1CompleteCBR[%x]", 0x777c4)
4.442.163 **INT-6Dh*:ff0c7ba4:MMIO : [0xC0201010] <- 0x0000005E
4.442.164 **INT-6Dh*:ff0c7ba8:MMIO : [0xC0201200] -> 0x00000001
4.442.220 **INT-6Dh*:ff37c50c:00:00: *** SetEDmac(0x9, 0x4074e100, 0x24bf40, 0x40000001)
4.442.255 **INT-6Dh*:000c76ec:00:00: size ((600, skip -600) x 440) x 2
4.442.271 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0490C] <- 0x00000001
4.442.273 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04910] <- 0x01B70258
4.442.274 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04914] <- 0x00000258
4.442.276 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04918] <- 0x0007FDA8
4.442.278 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0491C] <- 0xFFFFFDA8
4.442.279 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04920] <- 0x0007FDA8
4.442.281 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04924] <- 0x00000000
4.442.283 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04928] <- 0x00000000
4.442.287 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04904] <- 0x40000001
4.442.288 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04908] <- 0x0074E100
4.442.311 **INT-6Dh*:ff37c518:00:00: *** ConnectReadEDmac(0x9, 0x6)
4.442.317 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F05038] <- 0x00000001
4.442.339 **INT-6Dh*:ff37c524:00:00: *** ConnectReadEDmac(0x9, 0x7)
4.442.344 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F0503C] <- 0x00000001
4.442.401 **INT-6Dh*:ff37c548:00:00: *** RegisterEDmacCompleteCBR(0x8, 0xff37c0dc "ReadEDmac2CompleteCBR[%x]", 0x777c4)
4.442.415 **INT-6Dh*:ff0c7ba4:MMIO : [0xC0201010] <- 0x0000005D
4.442.417 **INT-6Dh*:ff0c7ba8:MMIO : [0xC0201200] -> 0x00000001
4.442.462 **INT-6Dh*:ff37c560:00:00: *** SetEDmac(0x8, 0x4074e100, 0x24bf40, 0x1)
4.442.496 **INT-6Dh*:000c76ec:00:00: size ((600, skip -600) x 440) x 2
4.442.511 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0480C] <- 0x00000001
4.442.514 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04810] <- 0x01B70258
4.442.517 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04814] <- 0x00000258
4.442.519 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04818] <- 0x0007FDA8
4.442.521 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F0481C] <- 0xFFFFFDA8
4.442.523 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04820] <- 0x0007FDA8
4.442.525 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04824] <- 0x00000000
4.442.526 **INT-6Dh*:ff2c2b88:MMIO : [0xC0F04828] <- 0x00000000
4.442.530 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04804] <- 0x00000001
4.442.532 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F04808] <- 0x0074E100
4.442.551 **INT-6Dh*:ff37c56c:00:00: *** ConnectReadEDmac(0x8, 0x3)
4.442.556 **INT-6Dh*:ff2c29e8:MMIO : [0xC0F0502C] <- 0x00000000
4.442.570 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11004] <- 0x00000001
4.442.571 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11440] <- 0x00000000
4.442.572 **INT-6Dh*:ff2c2d14:MMIO : [0xC0F11444] <- 0x00000001
4.442.593 **INT-6Dh*:ff37c590:00:00: *** StartEDmac(0x5, 0x0)
4.442.699 **INT-6Dh*:ff37c590:00:00: addr b9ee000, ptr b9ee000, size (600, skip 3240) x 439, 600, skip -1683120,
(600, skip 3240) x 440
.....
Look at
LV_StartTripleRamClearPassLR Width:600, Height:440, VW:3840
and
size (600, skip 3240) x 439, 600, skip -1683120,
(600, skip 3240) x 440
These numbers are changing when toggling the Preview by using Info button, also some of 0xC0F04xnn registers have same values, then immediately I remembered a post in the past from a1ex, these kind of registers are filtered in adtg_gui, before capturing DebugMsg LOG I was trying to reduce black bars with no success, and no success mean something is missing, now the missing guys are shown in adtg_gui:
C0F04210
C0F04218
These two registers are related to each other, to shift box preview around and get different sizes of preview, when increase C0F04210 value you should decrease C0F04218 to get the correct preview size, e.g: on 700D in mv1080:
C0F04210 = 0x1b70a50
C0F04218 = 0x4b0
If you want to decrease preview size you should decrease C0F04210 e.g from 0x1b70a50 to 0x1b70950, now to fix the box preview you should increase C0F04218 from 0x4b0 to 0x5b0, Now LiveView are broken, you need to do other adjustments for the other registers (showed in the next experiment)
Registers between Canon Previews when pressing Info button in Movie Crop Mode:
Canon Previews HDMI in Movie Crop ModeFrom above link Notice in full preview in Movie Crop Mode, C0F04210 = 1C70
870 and C0F11590 = 0x1C70
4370x870 = 2160
0x437 = 1079
I noticed many times Canon are using doubled resolution size values in some of their resolution registers, if you want to tweak above registers you know now how to calculate it right, didn't play much with Vertical resolution values.
in mv1080 on Canon 700D toggling between the two preview using Info button also changes YUV resolution, to narrow the registers down I used Movie Crop Mode, this only changes Black Bars and the size of LiveView on HDMI without changing YUV resolution, I couldn't get a HDMI to USB capture card unfortunately there no capture card like that in my country, will get one from Ali Express but it will take months to arrive, so I used my smartphone for that, sorry and here is the Experiment:
HDMI Black Bars Experiment in Movie Crop ModeNote: I put White tall papers on TV bezels to show HDMI black bars better.
Link:
https://youtu.be/PxDMVM48lDE
Results:
Movie Crop Mode full size Canon Preview:

Movie Crop Mode full size Canon Preview with tweaked registers:

Movie Crop Mode small size Canon Preview with tweaked registers:

Notice the offset between the last two images.
General note: You can also do some calculations for these values instead of trial and error method.
@reddeercity
Your turn on 5D2

Wondering how it would be on DIGIC 4 cameras.
Unfortunately I couldn't do it in mv1080 mode, the preview will still broken after tweaking same registers, there are a missing ones, didn't try too hard to find them.
Furthermore, please
push it further and further
