Changeset 1867
- Timestamp:
- 05/27/12 07:03:05 (12 months ago)
- File:
-
- 1 edited
-
trunk/core/shooting.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/shooting.c
r1830 r1867 491 491 { 492 492 if (iso_table[1-iso_table[0].id].prop_id == 50) iso_market_base=50; 493 #if defined(CAMERA_sx40hs) 493 #if defined(CAMERA_sx40hs) || defined(CAMERA_g1x) 494 494 else iso_market_base=200; 495 495 #else … … 506 506 if ((iso_mode < 50) || (conf.iso_override_koef && conf.iso_override_value) || (conf.iso_bracket_koef && conf.iso_bracket_value)) 507 507 { 508 short iso_b = shooting_get_iso_base(); 509 if (iso_b) 510 return (short)((shooting_get_iso_market_base()*shooting_get_iso_real())/iso_b); 508 // Original code 509 // short iso_b = shooting_get_iso_base(); 510 // if (iso_b) 511 // return (short)((shooting_get_iso_market_base()*shooting_get_iso_real())/iso_b); 512 513 // Above code translates to: 514 // shooting_get_iso_market_base() * pow(2,((PROPCASE_SV+168)/96)) / pow(2,(((PROPCASE_SV-PROPCASE_DELTA_SV)+168)/96)) 515 // code has rounding errors due to return values from pow() being cast to short before multiplication and division 516 // formula can be simplified to: 517 // shooting_get_iso_market_base() * pow(2,(PROPCASE_DELTA_SV/96)) 518 short dsv; 519 get_property_case(PROPCASE_DELTA_SV, &dsv, sizeof(dsv)); 520 return (short)((double)shooting_get_iso_market_base() * pow(2, (double)dsv/96.0)); 511 521 } 512 522 return iso_mode;
Note: See TracChangeset
for help on using the changeset viewer.