EOS M3 porting - page 43 - DryOS Development - CHDK Forum  

EOS M3 porting

  • 594 Replies
  • 194856 Views
*

Offline lapser

  • *****
  • 1093
Re: EOS M3 porting
« Reply #420 on: 08 / September / 2017, 13:56:49 »
Advertisements
Where did you found fw200f ?
The latest version I know is 120f.

M3 has no bootflag (excepting "gaonisoy" signature) because there is powershot-like firmware inside it, not EOS.
Sorry, I meant 120f.

By "bootflag", I meant the option in the CHDK menu:
Miscellaneous/SD Card/Make Card Bootable
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline Ant

  • ****
  • 431
Re: EOS M3 porting
« Reply #421 on: 08 / September / 2017, 14:29:05 »
Sorry, I meant 120f.

For 120f try this one. I did not test it on a real camera.

*

Offline lapser

  • *****
  • 1093
Re: EOS M3 porting
« Reply #422 on: 08 / September / 2017, 15:19:15 »
For 120f try this one. I did not test it on a real camera.
Thanks! It worked, and I was able to "Make Card Bootable."
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline lapser

  • *****
  • 1093
M3 raw dimensions (was Re: Lapser Script Development)
« Reply #423 on: 08 / September / 2017, 18:28:52 »
I figured out the problem (I think). The JPEG area on the M3 is set to go all the way to the bottom right corner of the active area. My TestRwop.lua script then went a few pixels out of the active area, so I didn't get any meter values.

I'm not sure the JPEG area is accurate on the M3, but I fixed the script so there's no chance of going outside the JPEG area (hopefully). So when you get the chance to test the attached new script on your M3, I'd be interested to hear the results.

Maybe someone can double check the sensor values for the M3? Here's the values I got from platform_camera.h
Code: [Select]
************** G1X ******************
 // Sensor size, DNG image size & cropping
    #define CAM_RAW_ROWPIX                      4496    // Found @0xff190c98
    #define CAM_RAW_ROWS                        3366    // Found @0xff190ca4
    #define CAM_CROP_ORIGIN_X                   28      // Override calculated JPEG Crop position (26)
    #define CAM_JPEG_WIDTH                      4352
    #define CAM_JPEG_HEIGHT                     3264
    #define CAM_ACTIVE_AREA_X1                  80
    #define CAM_ACTIVE_AREA_Y1                  52
    #define CAM_ACTIVE_AREA_X2                  4484
    #define CAM_ACTIVE_AREA_Y2                  3364


************** M3 ******************
    #define CAM_RAW_ROWPIX                      6112 //6096
    #define CAM_RAW_ROWS                        4060 //4056
...
    #define CAM_JPEG_WIDTH                      6000
    #define CAM_JPEG_HEIGHT                     4000

    #define CAM_ACTIVE_AREA_X1                  84
    #define CAM_ACTIVE_AREA_Y1                  46
    #define CAM_ACTIVE_AREA_X2                  6084
    #define CAM_ACTIVE_AREA_Y2                  4046
« Last Edit: 09 / September / 2017, 17:46:23 by reyalp »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


*

Offline Ant

  • ****
  • 431
Re: Re: Lapser Script Development
« Reply #424 on: 08 / September / 2017, 20:36:09 »
Maybe someone can double check the sensor values for the M3?
Try to use CAM_RAW_ROWS 4059
Canon firmware contains both values, but 4059 doesn't look beautiful...

*

Offline reyalp

  • ******
  • 11924
Re: Re: Lapser Script Development
« Reply #425 on: 09 / September / 2017, 15:37:09 »
Maybe someone can double check the sensor values for the M3?
Try to use CAM_RAW_ROWS 4059
Canon firmware contains both values, but 4059 doesn't look beautiful...
CAM_RAW_ROWS should reflect the actual number of rows in the raw buffer. Running exiftool should report this as Sensor height. The active area should also be reported.
Don't forget what the H stands for.

*

Offline Ant

  • ****
  • 431
Re: Re: Lapser Script Development
« Reply #426 on: 09 / September / 2017, 16:31:47 »
There is a mismatch:

Exiftool:
Code: [Select]
Sensor Width                    : 6096
Sensor Height                   : 4056
Sensor Left Border              : 84
Sensor Top Border               : 46
Sensor Right Border             : 6083
Sensor Bottom Border            : 4045
Black Mask Left Border          : 0
Black Mask Top Border           : 0
Black Mask Right Border         : 0
Black Mask Bottom Border        : 0

Info from firmware intertnals:
Code: [Select]
DoUnpackedCaptureFordccd RecMode = 104

***AttachdccdImageData Start***

CcdDataSizeH = 6112
CcdDataSizeV = 4059

***AttachdccdImageData End***

some EDMAC channels are configured for 4059 rows, some - for 4060 rows:
« Last Edit: 09 / September / 2017, 16:38:27 by Ant »

*

Offline reyalp

  • ******
  • 11924
Re: Re: Lapser Script Development
« Reply #427 on: 09 / September / 2017, 16:48:39 »
There is a mismatch:
Do CHDK DNG render correctly using the 6112 width?
Don't forget what the H stands for.


*

Offline Ant

  • ****
  • 431
Re: Re: Lapser Script Development
« Reply #428 on: 09 / September / 2017, 17:06:32 »
Of course. There is no problem with columns: 6112*14/8 = 10696.

*

Offline reyalp

  • ******
  • 11924
Re: EOS M3 porting
« Reply #429 on: 09 / September / 2017, 18:16:58 »
Moved from lapser's script thread: https://chdk.setepontos.com/index.php?topic=13194.msg134620

Looking at this a bit more, I don't think the error lapser saw was due to incorrect definition in CHDK, the script just has to ensure it doesn't go outside the active area.

If you can upload a CHDK DNG somewhere, I can double check.

The vertical size doesn't actually matter too much as long as it includes all the image data, and does not include memory that is used for something else.

The raw size and active area should be even to avoid ambiguity about dealing with half a CFA repetition. This is enforced for active area, but not currently for RAW_ROWS.

The M3 jpeg area is exactly the same as the active area. This will generate warnings in dng_validate because there are no pixels to interpolate at the edges, but seems to work OK in practice (it happens on any port if you change the default crop option to active or sensor.) If there are more valid image pixels outside the current active area, it could be expanded.

Don't forget what the H stands for.

 

Related Topics