Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug - page 2 - General Discussion and Assistance - CHDK Forum

Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug

  • 20 Replies
  • 8244 Views
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #10 on: 16 / April / 2012, 12:24:20 »
Advertisements
Thanks  philmoz!
   
  Revision 1808 work OK.  But dng GPS TAG a bit bug:

---- ExifTool ----ExifTool Version Number : 8.87----ExifToolgui5.0.9----
-------------TIFF-IFD0-GPS -------------
Warning                         : Bad format (254) for GPS entry 34
Warning                         : Bad format (256) for GPS entry 35
Warning                         : Bad format (257) for GPS entry 36
Warning                         : Bad format (258) for GPS entry 37
Warning                         : Bad format (259) for GPS entry 38
Warning                         : Bad format (262) for GPS entry 39
Warning                         : Bad format (273) for GPS entry 40
Warning                         : Bad format (277) for GPS entry 41
Warning                         : Bad format (278) for GPS entry 42
Warning                         : Bad format (279) for GPS entry 43
Warning                         : Bad format (282) for GPS entry 44
Warning                         : [minor] Too many warnings -- GPS parsing aborted

Hi  philmoz.
 I find a bit bug in dng.c  [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset          
  change it :      #if defined(CAM_HAS_GPS)
                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                      #endif

  then work OK,ExifTool NO 'Warning ' .
« Last Edit: 16 / April / 2012, 12:29:21 by new123456 »

Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #11 on: 16 / April / 2012, 22:12:45 »
chdk_r1808/trunk/core/dng.c  in [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset
                                               ==>  #if defined(CAM_HAS_GPS)
                                                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                                                        #endif
[/i]
then  UniqueCameraModel= ?臯Aビ|筿娽香 ?鸈輷?鎏檝?.瘂.撎.纘傎_8圐潔t3H蒿夘h.Fo?x?筈漮?滩5???T.哽汈?.鷏<."@]P署宮钗'x?乥"H弌狼??.Zi音鵲P?.?..鈉琙.7籤
changed [281]:    case 0x110 :                                                // CameraName
             [282]:    case 0xC614: IFD_LIST[j].entry.count = strlen((char*)IFD_LIST[j].entry.offset) + 1; break;   //                                                                                                        UniqueCameraModel
==>[281]:    case 0x110 : IFD_LIST[j].entry.count =  strlen((char*)IFD_LIST[j].entry.offset) + 1; break;    //                                                                                                           CameraName
       [282]:  case 0xC614: IFD_LIST[j].entry.offset= (int)cam_name; break;   // UniqueCameraModel

it work OK,UniqueCameraModel OK,ExifTool NO 'Warning '
« Last Edit: 16 / April / 2012, 22:22:02 by new123456 »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #12 on: 16 / April / 2012, 22:52:46 »
Hi  philmoz.
 I find a bit bug in dng.c  [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset          
  change it :      #if defined(CAM_HAS_GPS)
                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                      #endif

  then work OK,ExifTool NO 'Warning ' .


In the trunk version DNG code is in a module so it needs to be platform/camera independent. This means we cant use conditionally compiled code in the module.

The current DNG files passes the Adobe dng_validate program so this looks like a problem in ExifTool.
I will see if there is another way to exclude the GPS header record when I have some free time.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #13 on: 16 / April / 2012, 22:55:41 »
chdk_r1808/trunk/core/dng.c  in [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset
                                               ==>  #if defined(CAM_HAS_GPS)
                                                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                                                        #endif
[/i]
then  UniqueCameraModel= ?臯Aビ|筿娽香 ?鸈輷?鎏檝?.瘂.撎.纘傎_8圐潔t3H蒿夘h.Fo?x?筈漮?滩5???T.哽汈?.鷏<."@]P署宮钗'x?乥"H弌狼??.Zi音鵲P?.?..鈉琙.7籤
changed [281]:    case 0x110 :                                                // CameraName
             [282]:    case 0xC614: IFD_LIST[j].entry.count = strlen((char*)IFD_LIST[j].entry.offset) + 1; break;   //                                                                                                        UniqueCameraModel
==>[281]:    case 0x110 : IFD_LIST[j].entry.count =  strlen((char*)IFD_LIST[j].entry.offset) + 1; break;    //                                                                                                           CameraName
       [282]:  case 0xC614: IFD_LIST[j].entry.offset= (int)cam_name; break;   // UniqueCameraModel

it work OK,UniqueCameraModel OK,ExifTool NO 'Warning '

Are you compiling your own version of using the version on the autobuild server?
The existing code works correctly on all my cameras - so I'm wondering if it's something in the way you (or the autobuild server) are compiling it.

It would also help if you upload a sample DNG file (without your change) to a file share and post the link here.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


« Last Edit: 17 / April / 2012, 02:35:16 by new123456 »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #15 on: 17 / April / 2012, 05:26:01 »
philmoz

    Revision 1808 (chdk) no sx210is. I porting sx210is from branches_revision 1806(CHDK release-1.0) ,in revision 1806(CHDK release-1.0) work OK.
  sample DNG file Later upload.

This a sample DNG file: IMG_3635.dng

Dng.c no be changed.


I can't see anything wrong with the CameraName or UniqueCameraModel data in that DNG file.
What program is telling you that something is wrong with UniqueCameraModel?

(dng_validate shows the correct value for both fields and shows no warnings or errors for the GPS data.)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #16 on: 17 / April / 2012, 06:02:29 »
ExiftoolGUI version 5.09(http://u88.n24.queensu.ca/~bogdan/exiftoolgui509.zip) open IMG_3635.dng    CameraName or UniqueCameraMode OK,but ExifToolgui 'Warning ' when open  IMG_3635.dng with ALL :
 ---- ExifTool ----ExifTool Version Number : 8.87----ExifToolgui5.0.9----
-------------TIFF-IFD0-GPS -------------
Warning                         : Bad format (254) for GPS entry 34
Warning                         : Bad format (256) for GPS entry 35
Warning                         : Bad format (257) for GPS entry 36
Warning                         : Bad format (258) for GPS entry 37
Warning                         : Bad format (259) for GPS entry 38
Warning                         : Bad format (262) for GPS entry 39
Warning                         : Bad format (273) for GPS entry 40
Warning                         : Bad format (277) for GPS entry 41
Warning                         : Bad format (278) for GPS entry 42
Warning                         : Bad format (279) for GPS entry 43
Warning                         : Bad format (282) for GPS entry 44
Warning                         : [minor] Too many warnings -- GPS parsing aborted

SX210IS no  GPS, GPS TAG =?, in IMG_3635.dng GPS_TAG no be moved!
I changed dng.c:
In chdk_r1808/trunk/core/dng.c   [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset
                                               ==>  #if defined(CAM_HAS_GPS)
                                                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                                                        #endif
dng tag be moved but then  UniqueCameraModel= ?臯Aビ|筿娽香 ?鸈輷?鎏檝?.瘂.撎.纘傎_8圐潔t3H蒿夘h.Fo?x?筈漮?滩5???T.哽汈?.鷏<."@]P署宮钗'x?乥"H弌狼??.Zi音鵲P?.?..鈉琙.7籤 with ExifToolgui5.0.9 open dng.
Here changed dng.c [116] sample DNG:  IMG_3636_116_change.dng

Here changed dng.c [285][286]:
   [285]:    case 0x110 : IFD_LIST[j].entry.count = strlen((char*)IFD_LIST[j].entry.offset) + 1; break;     
   [286]:    case 0xC614: IFD_LIST[j].entry.offset = (int)cam_name; break;
sample DNG file:  IMG_3637_116_282_good.dng it No problem with ExifToolgui5.0.9 opened.
« Last Edit: 17 / April / 2012, 09:21:13 by new123456 »

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #17 on: 18 / April / 2012, 01:53:04 »
I changed dng.c:
In chdk_r1808/trunk/core/dng.c   [116]:    {0x8825, T_LONG,       1,  0},      //GPS_IFD offset
                                               ==>  #if defined(CAM_HAS_GPS)
                                                          {0x8825, T_LONG,       1,  0},          //GPS_IFD offset
                                                        #endif
dng tag be moved but then  UniqueCameraModel= ?臯Aビ|筿娽香 ?鸈輷?鎏檝?.瘂.撎.纘傎_8圐潔t3H蒿夘h.Fo?x?筈漮?滩5???T.哽汈?.鷏<."@]P署宮钗'x?乥"H弌狼??.Zi音鵲P?.?..鈉琙.7籤 with ExifToolgui5.0.9 open dng.

As I said earlier this is not appropriate code for the trunk version of dng.c
It also appears you missed this warning a few lines earlier in the file:
Code: [Select]
// Index of DNGVersion in IFD0 below.
// *** warning - if entries are added or removed this should be updated ***
#define DNG_VERSION_INDEX   22

Phil.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #18 on: 18 / April / 2012, 06:04:39 »
Revision 1809 in the main SVN trunk should sort out the GPS inclusion/exclusion concern.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Branches_r1798 and chdkde_trunk_r984 in dng.c have a bug
« Reply #19 on: 18 / April / 2012, 13:27:30 »
Revision 1809 in the main SVN trunk should sort out the GPS inclusion/exclusion concern.

Phil.

Thanks  philmoz!
 
  Revision 1809 work good,no problem.


new123456

 

Related Topics