DNG4PS-2 Mac OS X build - page 4 - RAW Shooting and Processing - CHDK Forum  

DNG4PS-2 Mac OS X build

  • 53 Replies
  • 23456 Views
Re: DNG4PS-2 Mac OS X build
« Reply #30 on: 28 / April / 2008, 07:35:22 »
Advertisements
hi ArtDen,

i did not check yet if dcraw can convert the resulting dng files, but
i'll try it tonight at home (i assume it will work but will give wrong
images) ... in general the images were somewhat recognizable - so
basic shapes etc. seemed to be there as in the original image, but
the colors were completely off and most probably also the image
content mixed up a bit from the debayering with wrong data or so

best wishes - image13 


*

Offline ArtDen

  • ***
  • 175
    • dng4ps2
Re: DNG4PS-2 Mac OS X build
« Reply #31 on: 28 / April / 2008, 08:15:07 »
image13, try to replace this file in sources: http://dng4ps2.chat.ru/tmp/Utils.cpp and set BIG_ENDIAN define in your makefile

Re: DNG4PS-2 Mac OS X build
« Reply #32 on: 28 / April / 2008, 18:00:03 »
hi ArtDen,

just tried your modified version, but it did not help

i'm right now uploading some sample files and will
write you a personal message as soon as they are
up - i think this way it should be much easier for you
to debug the source of the problem

a lot of thanks in advance and best wishes - image13

*

Offline ArtDen

  • ***
  • 175
    • dng4ps2
Re: DNG4PS-2 Mac OS X build
« Reply #33 on: 28 / April / 2008, 23:10:05 »
Strange... Are there any deferences in images with old program, and new one?

PS: I will look your files later
« Last Edit: 28 / April / 2008, 23:11:51 by ArtDen »


Re: DNG4PS-2 Mac OS X build
« Reply #34 on: 29 / April / 2008, 02:58:07 »
ArtDen: I've modified your byte swapping strategy in Utils.cpp and am getting good results on both intel and powerpc (rosetta emulation). Here's the diff from the version of Utils.cpp referenced in your previous post:

Code: (diff) [Select]
880a881,888
>
> inline unsigned short swap_bytes_uint16(unsigned short src)
> {
>    unsigned char upper = ((src & 0xff00) >> 8);
>    unsigned char lower = (src & 0x00ff);
>    return ((lower << 8) | upper);
> }
>
901,908c909,910
< #ifdef BIG_ENDIAN
<               if (vbits < 10)
<               {
<                       vbits += 16;
<                       const unsigned char *ptr = reinterpret_cast<const unsigned char*>(dp);
<                       buf = (buf << 16) + ((unsigned short)(*(ptr+0)) << 8) + (unsigned short)(*(ptr+1));
<                       dp++;
<               }
---
> #if qDNGBigEndian
>           if (vbits < 10) buf = (vbits += 16, (buf << 16) + swap_bytes_uint16(*dp++));
910c912
<               if (vbits < 10) buf = (vbits += 16, (buf << 16) + *dp++);
---
>           if (vbits < 10) buf = (vbits += 16, (buf << 16) + *dp++);

I reused the qDNGBigEndian define instead of BIG_ENDIAN since it is
automatically setup correctly by the DNG SDK header logic.
I've uploaded the changed version to http://spebbe.googlepages.com/Utils.cpp

I'll publish a universal binary on the main page later today.
As a bonus, this version will also get a nice icon :-)

image13: Would you mind trying this version also, just to make sure that it works
on a real silicon powerpc and not just rosetta?
« Last Edit: 29 / April / 2008, 03:08:30 by spebbe »

Re: DNG4PS-2 Mac OS X build
« Reply #35 on: 29 / April / 2008, 03:09:21 »
coool!

thanks a lot - will try it out tonight on the real powerpc machine :)

to ArtDen (but most probably no longer relevant): your old and
new version resulted in the same images (checked via difference
in photoshop) and i also double checked that i set the define and
that everything got compiled properly

thanks a lot and best wishes - image13

Re: DNG4PS-2 Mac OS X build
« Reply #36 on: 29 / April / 2008, 13:52:37 »
hi spebbe, hi ArtDen,

just tried the fix suggested by spebbe and it works perfectly
on a real powerpc mac as well - so ArtDen it would be great
if you could integrate it into the regular dng4ps2 sources

a lot of thanks and best wishes - image13

*

Offline ArtDen

  • ***
  • 175
    • dng4ps2
Re: DNG4PS-2 Mac OS X build
« Reply #37 on: 29 / April / 2008, 14:36:14 »
spebbe, really thanks! I will upload new sources to web page later, but now it is available from SVN repository: svn://svnhost.homeip.net:4000/dng4ps2/trunk
« Last Edit: 29 / April / 2008, 14:38:08 by ArtDen »


Re: DNG4PS-2 Mac OS X build
« Reply #38 on: 29 / April / 2008, 15:27:36 »
ArtDen: thank you too!

Universal binaries are now available at spebbe - DNG4PS-2 Mac OS X build

Just to clarify: the powerpc and intel versions will _not_ produce bit for bit
identical DNG files when given identical CRW files. However, the produced
DNG container will have correct info about which endianness the embedded
raw data is using, meaning that the produced DNG files should be
"semantically" identical.


*

Offline Pascal S

  • *
  • 2
  • S3 IS
Re: DNG4PS-2 Mac OS X build
« Reply #39 on: 29 / April / 2008, 18:19:14 »
Wonderful work!

Thanks a lot, guys. I suspect I'll be just one among many happy Mac users.  :)

 

Related Topics