[Jdlraw-discussion] jdlRaw/Sources jdlDcRaw.cpp, 1.20, 1.21 jdlDcRaw.h, 1.13, 1.14 jdlDefines.h, 1.
Status: Beta
Brought to you by:
jdla
|
From: Jos De L. <jd...@us...> - 2010-06-05 09:22:46
|
Update of /cvsroot/jdlraw/jdlRaw/Sources In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv8895/Sources Modified Files: jdlDcRaw.cpp jdlDcRaw.h jdlDefines.h Log Message: *) Corrected (long standing) error in rework of dcraw , impacting canon sraw formats. Index: jdlDefines.h =================================================================== RCS file: /cvsroot/jdlraw/jdlRaw/Sources/jdlDefines.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** jdlDefines.h 1 Jun 2010 20:38:57 -0000 1.11 --- jdlDefines.h 5 Jun 2010 09:22:38 -0000 1.12 *************** *** 156,159 **** --- 156,160 ---- // depth is 3 or 4 (according to buffer layout). + /* #define DROP_IMAGE(w,h,b,depth) { \ char FileName[100]; \ *************** *** 164,167 **** --- 165,183 ---- fclose(DropFile); \ } + */ + + #define DROP_IMAGE(w,h,b,depth) { \ + FILE *DropFile = fopen("ImageDrop.txt","wt"); \ + if (!DropFile) exit(EXIT_FAILURE); \ + int r,c; \ + for (r=h/2; r<h/2+10; r++) \ + for (c=w/2; c<w/2+10; c++) \ + fprintf(DropFile,"%04x %04x %04x %04x\n", \ + b[r*w+c][0], \ + b[r*w+c][1], \ + b[r*w+c][2], \ + b[r*w+c][3]); \ + fclose(DropFile); \ + } #endif Index: jdlDcRaw.h =================================================================== RCS file: /cvsroot/jdlraw/jdlRaw/Sources/jdlDcRaw.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** jdlDcRaw.h 1 Jun 2010 20:38:57 -0000 1.13 --- jdlDcRaw.h 5 Jun 2010 09:22:38 -0000 1.14 *************** *** 137,140 **** --- 137,152 ---- //////////////////////////////////////////////////////////////////////////////// + // + // SET_LOAD_RAW + // + // Macro to try and analyze the m_LoadRawFunction in the dcraw jungle + // + //////////////////////////////////////////////////////////////////////////////// + + #define SET_LOAD_RAW(x) {m_LoadRawFunction = (x); \ + m_LineWhereLoadRawSet = __LINE__; \ + strncpy(m_LoadRawName,#x,sizeof(m_LoadRawName)-1); } + + //////////////////////////////////////////////////////////////////////////////// // // m_UserSetting_* : *************** *** 471,474 **** --- 483,489 ---- void (DcRaw::*m_ThumbLoadRawFunction)(); + int m_LineWhereLoadRawSet; + char m_LoadRawName[128]; + jmp_buf m_Failure; Index: jdlDcRaw.cpp =================================================================== RCS file: /cvsroot/jdlraw/jdlRaw/Sources/jdlDcRaw.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** jdlDcRaw.cpp 1 Jun 2010 20:38:57 -0000 1.20 --- jdlDcRaw.cpp 5 Jun 2010 09:22:37 -0000 1.21 *************** *** 187,191 **** memset (white, 0, sizeof white); m_ThumbOffset = m_ThumbLength = m_ThumbWidth = m_ThumbHeight = 0; ! m_LoadRawFunction = m_ThumbLoadRawFunction = 0; m_WriteThumb = &CLASS jpeg_thumb; m_Data_Offset = m_MetaLength = m_Tiff_bps = m_Tiff_Compress = 0; --- 187,191 ---- memset (white, 0, sizeof white); m_ThumbOffset = m_ThumbLength = m_ThumbWidth = m_ThumbHeight = 0; ! SET_LOAD_RAW( m_ThumbLoadRawFunction = 0); m_WriteThumb = &CLASS jpeg_thumb; [...1146 lines suppressed...] ! m_LoadRawFunction = &CLASS LoadMagick; m_Filters = 0; // No interpolation of course as it is no raw image. --- 8437,8441 ---- m_WhiteLevel = 0xffff; // Per construction XXX JDLA Check. ! SET_LOAD_RAW( &CLASS LoadMagick); m_Filters = 0; // No interpolation of course as it is no raw image. *************** *** 8654,8657 **** --- 8657,8663 ---- // That's the hook into the real workhorse. + TRACEKEYVALS("LoadRawFunction","%s",m_LoadRawName); + TRACEKEYVALS("Set at line","%d",m_LineWhereLoadRawSet); + (*this.*m_LoadRawFunction)(); |