How to set pic quality to raw (FEATURE_PICQ_DANGEROUS)?

Started by Marsu42, January 05, 2015, 07:04:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marsu42

Yo, after managing to set my 6d to m-raw for some important shots (I didn't notice the warning, even though it was enabled) I'd like to add the option to *lock* the camera to raw mode, i.e. extent the feature in tweaks.c

Problem is: setting PROP_PIC_QUALITY seems like a premiere way to brick the camera, I guess thus the feature name "FEATURE_PICQ_DANGEROUS". I don't know if a "C" mode is a foolproof safeguard at least for testing: http://www.magiclantern.fm/forum/index.php?topic=5100.0

The ML code contains the function to read the prop and figure out if raw is enabled, but how do I *set* raw - or is this not possible in a reliable way at all? Did anyone succeed at least on the current gen bodies (6d,5d3), how did you do it?

a1ex

With set_pic_quality (it's commented out).

The danger in this feature is because some picture quality values valid on one camera may soft-brick another (or result in corrupted files or corrupted Canon GUI). However, I consider this type of bricking as relatively easy to recover (on 550D it's enough to call set_pic_quality(PICQ_RAW), on 60D... disable asserts and clear camera settings).

So, I'd say go ahead and try it.

Marsu42

Thanks for the quick reply! Before I go ahead (and report back):

1. Do I have to set all three props (yes, I know, all are included in set_pic_quality) or just the one that is read when looking what mode is set?

2. Does a C mode safeguard against soft-bricking with changing this prop? I wouldn't like to have to unbrick my 6d esp. as there are no active devs around who can help me out if it doesn't work as the other/older models.

a1ex

1. That's what I thought back then. I took a closer look in Canon code - it appears to set all 3 of them, and from GUI_SetImgComposition, the first property seems to be for drive A (CF), second for drive B (SD), and third for drive C (WFT maybe).

2. If you change the setting in Canon menu, and it's not remembered at reboot, it's probably safe. I can try some invalid values in C mode on 5D3 in the coming days (most likely in weekend), or try it yourself on 60D first (I unbricked tens of those with this error).

Marsu42

Quote from: a1ex on January 05, 2015, 09:38:01 PM
1. That's what I thought back then. I took a closer look in Canon code - it appears to set all 3 of them, and from GUI_SetImgComposition, the first property seems to be for drive A (CF), second for drive B (SD), and third for drive C (WFT maybe).

Good idea, I'll use my 60d for further experiments (the shutter is near failure due to >150k anyway).

I just tried on my 6d, and that's the result:
* if setting only the first prop, it resets just the ML gui display value (raw/jpeg/...) but the actual Canon value remains unchanged.
* if setting all three props, it complains about wrong len - probably only 1+3 exist on 6d since it's missing the cf slot? Thank the maker for these safeguards because these are just the messages I *don't* want to see on my precious 6d :-\


ML ASSERT:
PROP_LEN(80000030) correct:0 called:4
at ../../src/property.c:342 (prop_request_change), task tweak_task
lv:0 mode:1

Magic Lantern version : v2.x.M42.2015Jan05.6D113
Mercurial changeset   : caa55c6fce2c+ (unified) tip
Built on 2015-01-05 20:54:22 UTC by USER@CYGWIN.
Free Memory  : 381K + 1864K


a1ex

Ah, add a dummy prop handler somewhere. Without it, ML doesn't know the correct length of the property, and refuses to change it.

Marsu42

Quote from: a1ex on January 05, 2015, 10:09:30 PM
Ah, add a dummy prop handler somewhere. Without it, ML doesn't know the correct length of the property, and refuses to change it.

Right, now I understand how ML checks these in the first place. Pity we don't get this information from the sdk our favorite imaging company gladly supplies to their users :-p. Will do, but this time really on my 60d after I dig it out somewhere.


volatile PROP_INT(PROP_PIC_QUALITY, pic_quality);
volatile PROP_INT(PROP_PIC_QUALITY2, pic_quality);
volatile PROP_INT(PROP_PIC_QUALITY3, pic_quality);


Edit: Btw: Compiled these with gcc 4.9.3 (from launchpad), work fine & smaller file size for what it's worth.