DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_bottlenecks.hGo to the documentation of this file.00001 /*****************************************************************************/ 00002 // Copyright 2006-2007 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_bottlenecks.h#13 $ */ 00010 /* $DateTime: 2009/03/18 15:20:27 $ */ 00011 /* $Change: 548456 $ */ 00012 /* $Author: stern $ */ 00013 00019 /*****************************************************************************/ 00020 00021 #ifndef __dng_bottlenecks__ 00022 #define __dng_bottlenecks__ 00023 00024 /*****************************************************************************/ 00025 00026 #include "dng_classes.h" 00027 #include "dng_types.h" 00028 00029 /*****************************************************************************/ 00030 00031 typedef void (ZeroBytesProc) 00032 (void *dPtr, 00033 uint32 count); 00034 00035 typedef void (CopyBytesProc) 00036 (const void *sPtr, 00037 void *dPtr, 00038 uint32 count); 00039 00040 /*****************************************************************************/ 00041 00042 typedef void (SwapBytes16Proc) 00043 (uint16 *dPtr, 00044 uint32 count); 00045 00046 typedef void (SwapBytes32Proc) 00047 (uint32 *dPtr, 00048 uint32 count); 00049 00050 /*****************************************************************************/ 00051 00052 typedef void (SetArea8Proc) 00053 (uint8 *dPtr, 00054 uint8 value, 00055 uint32 rows, 00056 uint32 cols, 00057 uint32 planes, 00058 int32 rowStep, 00059 int32 colStep, 00060 int32 planeStep); 00061 00062 typedef void (SetArea16Proc) 00063 (uint16 *dPtr, 00064 uint16 value, 00065 uint32 rows, 00066 uint32 cols, 00067 uint32 planes, 00068 int32 rowStep, 00069 int32 colStep, 00070 int32 planeStep); 00071 00072 typedef void (SetArea32Proc) 00073 (uint32 *dPtr, 00074 uint32 value, 00075 uint32 rows, 00076 uint32 cols, 00077 uint32 planes, 00078 int32 rowStep, 00079 int32 colStep, 00080 int32 planeStep); 00081 00082 /*****************************************************************************/ 00083 00084 typedef void (CopyArea8Proc) 00085 (const uint8 *sPtr, 00086 uint8 *dPtr, 00087 uint32 rows, 00088 uint32 cols, 00089 uint32 planes, 00090 int32 sRowStep, 00091 int32 sColStep, 00092 int32 sPlaneStep, 00093 int32 dRowStep, 00094 int32 dColStep, 00095 int32 dPlaneStep); 00096 00097 typedef void (CopyArea16Proc) 00098 (const uint16 *sPtr, 00099 uint16 *dPtr, 00100 uint32 rows, 00101 uint32 cols, 00102 uint32 planes, 00103 int32 sRowStep, 00104 int32 sColStep, 00105 int32 sPlaneStep, 00106 int32 dRowStep, 00107 int32 dColStep, 00108 int32 dPlaneStep); 00109 00110 typedef void (CopyArea32Proc) 00111 (const uint32 *sPtr, 00112 uint32 *dPtr, 00113 uint32 rows, 00114 uint32 cols, 00115 uint32 planes, 00116 int32 sRowStep, 00117 int32 sColStep, 00118 int32 sPlaneStep, 00119 int32 dRowStep, 00120 int32 dColStep, 00121 int32 dPlaneStep); 00122 00123 typedef void (CopyArea8_16Proc) 00124 (const uint8 *sPtr, 00125 uint16 *dPtr, 00126 uint32 rows, 00127 uint32 cols, 00128 uint32 planes, 00129 int32 sRowStep, 00130 int32 sColStep, 00131 int32 sPlaneStep, 00132 int32 dRowStep, 00133 int32 dColStep, 00134 int32 dPlaneStep); 00135 00136 typedef void (CopyArea8_S16Proc) 00137 (const uint8 *sPtr, 00138 int16 *dPtr, 00139 uint32 rows, 00140 uint32 cols, 00141 uint32 planes, 00142 int32 sRowStep, 00143 int32 sColStep, 00144 int32 sPlaneStep, 00145 int32 dRowStep, 00146 int32 dColStep, 00147 int32 dPlaneStep); 00148 00149 typedef void (CopyArea8_32Proc) 00150 (const uint8 *sPtr, 00151 uint32 *dPtr, 00152 uint32 rows, 00153 uint32 cols, 00154 uint32 planes, 00155 int32 sRowStep, 00156 int32 sColStep, 00157 int32 sPlaneStep, 00158 int32 dRowStep, 00159 int32 dColStep, 00160 int32 dPlaneStep); 00161 00162 typedef void (CopyArea16_S16Proc) 00163 (const uint16 *sPtr, 00164 int16 *dPtr, 00165 uint32 rows, 00166 uint32 cols, 00167 uint32 planes, 00168 int32 sRowStep, 00169 int32 sColStep, 00170 int32 sPlaneStep, 00171 int32 dRowStep, 00172 int32 dColStep, 00173 int32 dPlaneStep); 00174 00175 typedef void (CopyArea16_32Proc) 00176 (const uint16 *sPtr, 00177 uint32 *dPtr, 00178 uint32 rows, 00179 uint32 cols, 00180 uint32 planes, 00181 int32 sRowStep, 00182 int32 sColStep, 00183 int32 sPlaneStep, 00184 int32 dRowStep, 00185 int32 dColStep, 00186 int32 dPlaneStep); 00187 00188 typedef void (CopyArea8_R32Proc) 00189 (const uint8 *sPtr, 00190 real32 *dPtr, 00191 uint32 rows, 00192 uint32 cols, 00193 uint32 planes, 00194 int32 sRowStep, 00195 int32 sColStep, 00196 int32 sPlaneStep, 00197 int32 dRowStep, 00198 int32 dColStep, 00199 int32 dPlaneStep, 00200 uint32 pixelRange); 00201 00202 typedef void (CopyArea16_R32Proc) 00203 (const uint16 *sPtr, 00204 real32 *dPtr, 00205 uint32 rows, 00206 uint32 cols, 00207 uint32 planes, 00208 int32 sRowStep, 00209 int32 sColStep, 00210 int32 sPlaneStep, 00211 int32 dRowStep, 00212 int32 dColStep, 00213 int32 dPlaneStep, 00214 uint32 pixelRange); 00215 00216 typedef void (CopyAreaS16_R32Proc) 00217 (const int16 *sPtr, 00218 real32 *dPtr, 00219 uint32 rows, 00220 uint32 cols, 00221 uint32 planes, 00222 int32 sRowStep, 00223 int32 sColStep, 00224 int32 sPlaneStep, 00225 int32 dRowStep, 00226 int32 dColStep, 00227 int32 dPlaneStep, 00228 uint32 pixelRange); 00229 00230 typedef void (CopyAreaR32_8Proc) 00231 (const real32 *sPtr, 00232 uint8 *dPtr, 00233 uint32 rows, 00234 uint32 cols, 00235 uint32 planes, 00236 int32 sRowStep, 00237 int32 sColStep, 00238 int32 sPlaneStep, 00239 int32 dRowStep, 00240 int32 dColStep, 00241 int32 dPlaneStep, 00242 uint32 pixelRange); 00243 00244 typedef void (CopyAreaR32_16Proc) 00245 (const real32 *sPtr, 00246 uint16 *dPtr, 00247 uint32 rows, 00248 uint32 cols, 00249 uint32 planes, 00250 int32 sRowStep, 00251 int32 sColStep, 00252 int32 sPlaneStep, 00253 int32 dRowStep, 00254 int32 dColStep, 00255 int32 dPlaneStep, 00256 uint32 pixelRange); 00257 00258 typedef void (CopyAreaR32_S16Proc) 00259 (const real32 *sPtr, 00260 int16 *dPtr, 00261 uint32 rows, 00262 uint32 cols, 00263 uint32 planes, 00264 int32 sRowStep, 00265 int32 sColStep, 00266 int32 sPlaneStep, 00267 int32 dRowStep, 00268 int32 dColStep, 00269 int32 dPlaneStep, 00270 uint32 pixelRange); 00271 00272 /*****************************************************************************/ 00273 00274 typedef void (RepeatArea8Proc) 00275 (const uint8 *sPtr, 00276 uint8 *dPtr, 00277 uint32 rows, 00278 uint32 cols, 00279 uint32 planes, 00280 int32 rowStep, 00281 int32 colStep, 00282 int32 planeStep, 00283 uint32 repeatV, 00284 uint32 repeatH, 00285 uint32 phaseV, 00286 uint32 phaseH); 00287 00288 typedef void (RepeatArea16Proc) 00289 (const uint16 *sPtr, 00290 uint16 *dPtr, 00291 uint32 rows, 00292 uint32 cols, 00293 uint32 planes, 00294 int32 rowStep, 00295 int32 colStep, 00296 int32 planeStep, 00297 uint32 repeatV, 00298 uint32 repeatH, 00299 uint32 phaseV, 00300 uint32 phaseH); 00301 00302 typedef void (RepeatArea32Proc) 00303 (const uint32 *sPtr, 00304 uint32 *dPtr, 00305 uint32 rows, 00306 uint32 cols, 00307 uint32 planes, 00308 int32 rowStep, 00309 int32 colStep, 00310 int32 planeStep, 00311 uint32 repeatV, 00312 uint32 repeatH, 00313 uint32 phaseV, 00314 uint32 phaseH); 00315 00316 /*****************************************************************************/ 00317 00318 typedef void (ShiftRight16Proc) 00319 (uint16 *dPtr, 00320 uint32 rows, 00321 uint32 cols, 00322 uint32 planes, 00323 int32 rowStep, 00324 int32 colStep, 00325 int32 planeStep, 00326 uint32 shift); 00327 00328 /*****************************************************************************/ 00329 00330 typedef void (BilinearRow16Proc) 00331 (const uint16 *sPtr, 00332 uint16 *dPtr, 00333 uint32 cols, 00334 uint32 patPhase, 00335 uint32 patCount, 00336 const uint32 * kernCounts, 00337 const int32 * const * kernOffsets, 00338 const uint16 * const * kernWeights, 00339 uint32 sShift); 00340 00341 typedef void (BilinearRow32Proc) 00342 (const real32 *sPtr, 00343 real32 *dPtr, 00344 uint32 cols, 00345 uint32 patPhase, 00346 uint32 patCount, 00347 const uint32 * kernCounts, 00348 const int32 * const * kernOffsets, 00349 const real32 * const * kernWeights, 00350 uint32 sShift); 00351 00352 /*****************************************************************************/ 00353 00354 typedef void (BaselineABCtoRGBProc) 00355 (const real32 *sPtrA, 00356 const real32 *sPtrB, 00357 const real32 *sPtrC, 00358 real32 *dPtrR, 00359 real32 *dPtrG, 00360 real32 *dPtrB, 00361 uint32 count, 00362 const dng_vector &cameraWhite, 00363 const dng_matrix &cameraToRGB); 00364 00365 typedef void (BaselineABCDtoRGBProc) 00366 (const real32 *sPtrA, 00367 const real32 *sPtrB, 00368 const real32 *sPtrC, 00369 const real32 *sPtrD, 00370 real32 *dPtrR, 00371 real32 *dPtrG, 00372 real32 *dPtrB, 00373 uint32 count, 00374 const dng_vector &cameraWhite, 00375 const dng_matrix &cameraToRGB); 00376 00377 /*****************************************************************************/ 00378 00379 typedef void (BaselineHueSatMapProc) 00380 (const real32 *sPtrR, 00381 const real32 *sPtrG, 00382 const real32 *sPtrB, 00383 real32 *dPtrR, 00384 real32 *dPtrG, 00385 real32 *dPtrB, 00386 uint32 count, 00387 const dng_hue_sat_map &lut); 00388 00389 /*****************************************************************************/ 00390 00391 typedef void (BaselineGrayToRGBProc) 00392 (const real32 *sPtrR, 00393 const real32 *sPtrG, 00394 const real32 *sPtrB, 00395 real32 *dPtrG, 00396 uint32 count, 00397 const dng_matrix &matrix); 00398 00399 typedef void (BaselineRGBtoRGBProc) 00400 (const real32 *sPtrR, 00401 const real32 *sPtrG, 00402 const real32 *sPtrB, 00403 real32 *dPtrR, 00404 real32 *dPtrG, 00405 real32 *dPtrB, 00406 uint32 count, 00407 const dng_matrix &matrix); 00408 00409 /*****************************************************************************/ 00410 00411 typedef void (Baseline1DTableProc) 00412 (const real32 *sPtr, 00413 real32 *dPtr, 00414 uint32 count, 00415 const dng_1d_table &table); 00416 00417 /*****************************************************************************/ 00418 00419 typedef void (BaselineRGBToneProc) 00420 (const real32 *sPtrR, 00421 const real32 *sPtrG, 00422 const real32 *sPtrB, 00423 real32 *dPtrR, 00424 real32 *dPtrG, 00425 real32 *dPtrB, 00426 uint32 count, 00427 const dng_1d_table &table); 00428 00429 /*****************************************************************************/ 00430 00431 typedef void (ResampleDown16Proc) 00432 (const uint16 *sPtr, 00433 uint16 *dPtr, 00434 uint32 sCount, 00435 int32 sRowStep, 00436 const int16 *wPtr, 00437 uint32 wCount, 00438 uint32 pixelRange); 00439 00440 typedef void (ResampleDown32Proc) 00441 (const real32 *sPtr, 00442 real32 *dPtr, 00443 uint32 sCount, 00444 int32 sRowStep, 00445 const real32 *wPtr, 00446 uint32 wCount); 00447 00448 /*****************************************************************************/ 00449 00450 typedef void (ResampleAcross16Proc) 00451 (const uint16 *sPtr, 00452 uint16 *dPtr, 00453 uint32 dCount, 00454 const int32 *coord, 00455 const int16 *wPtr, 00456 uint32 wCount, 00457 uint32 wStep, 00458 uint32 pixelRange); 00459 00460 typedef void (ResampleAcross32Proc) 00461 (const real32 *sPtr, 00462 real32 *dPtr, 00463 uint32 dCount, 00464 const int32 *coord, 00465 const real32 *wPtr, 00466 uint32 wCount, 00467 uint32 wStep); 00468 00469 /*****************************************************************************/ 00470 00471 typedef bool (EqualBytesProc) 00472 (const void *sPtr, 00473 const void *dPtr, 00474 uint32 count); 00475 00476 typedef bool (EqualArea8Proc) 00477 (const uint8 *sPtr, 00478 const uint8 *dPtr, 00479 uint32 rows, 00480 uint32 cols, 00481 uint32 planes, 00482 int32 sRowStep, 00483 int32 sColStep, 00484 int32 sPlaneStep, 00485 int32 dRowStep, 00486 int32 dColStep, 00487 int32 dPlaneStep); 00488 00489 typedef bool (EqualArea16Proc) 00490 (const uint16 *sPtr, 00491 const uint16 *dPtr, 00492 uint32 rows, 00493 uint32 cols, 00494 uint32 planes, 00495 int32 sRowStep, 00496 int32 sColStep, 00497 int32 sPlaneStep, 00498 int32 dRowStep, 00499 int32 dColStep, 00500 int32 dPlaneStep); 00501 00502 typedef bool (EqualArea32Proc) 00503 (const uint32 *sPtr, 00504 const uint32 *dPtr, 00505 uint32 rows, 00506 uint32 cols, 00507 uint32 planes, 00508 int32 sRowStep, 00509 int32 sColStep, 00510 int32 sPlaneStep, 00511 int32 dRowStep, 00512 int32 dColStep, 00513 int32 dPlaneStep); 00514 00515 /*****************************************************************************/ 00516 00517 typedef void (VignetteMask16Proc) 00518 (uint16 *mPtr, 00519 uint32 rows, 00520 uint32 cols, 00521 int32 rowStep, 00522 int64 offsetH, 00523 int64 offsetV, 00524 int64 stepH, 00525 int64 stepV, 00526 uint32 tBits, 00527 const uint16 *table); 00528 00529 typedef void (Vignette16Proc) 00530 (int16 *sPtr, 00531 const uint16 *mPtr, 00532 uint32 rows, 00533 uint32 cols, 00534 uint32 planes, 00535 int32 sRowStep, 00536 int32 sPlaneStep, 00537 int32 mRowStep, 00538 uint32 mBits); 00539 00540 /*****************************************************************************/ 00541 00542 typedef void (MapArea16Proc) 00543 (uint16 *dPtr, 00544 uint32 count0, 00545 uint32 count1, 00546 uint32 count2, 00547 int32 step0, 00548 int32 step1, 00549 int32 step2, 00550 const uint16 *map); 00551 00552 /*****************************************************************************/ 00553 00554 struct dng_suite 00555 { 00556 ZeroBytesProc *ZeroBytes; 00557 CopyBytesProc *CopyBytes; 00558 SwapBytes16Proc *SwapBytes16; 00559 SwapBytes32Proc *SwapBytes32; 00560 SetArea8Proc *SetArea8; 00561 SetArea16Proc *SetArea16; 00562 SetArea32Proc *SetArea32; 00563 CopyArea8Proc *CopyArea8; 00564 CopyArea16Proc *CopyArea16; 00565 CopyArea32Proc *CopyArea32; 00566 CopyArea8_16Proc *CopyArea8_16; 00567 CopyArea8_S16Proc *CopyArea8_S16; 00568 CopyArea8_32Proc *CopyArea8_32; 00569 CopyArea16_S16Proc *CopyArea16_S16; 00570 CopyArea16_32Proc *CopyArea16_32; 00571 CopyArea8_R32Proc *CopyArea8_R32; 00572 CopyArea16_R32Proc *CopyArea16_R32; 00573 CopyAreaS16_R32Proc *CopyAreaS16_R32; 00574 CopyAreaR32_8Proc *CopyAreaR32_8; 00575 CopyAreaR32_16Proc *CopyAreaR32_16; 00576 CopyAreaR32_S16Proc *CopyAreaR32_S16; 00577 RepeatArea8Proc *RepeatArea8; 00578 RepeatArea16Proc *RepeatArea16; 00579 RepeatArea32Proc *RepeatArea32; 00580 ShiftRight16Proc *ShiftRight16; 00581 BilinearRow16Proc *BilinearRow16; 00582 BilinearRow32Proc *BilinearRow32; 00583 BaselineABCtoRGBProc *BaselineABCtoRGB; 00584 BaselineABCDtoRGBProc *BaselineABCDtoRGB; 00585 BaselineHueSatMapProc *BaselineHueSatMap; 00586 BaselineGrayToRGBProc *BaselineRGBtoGray; 00587 BaselineRGBtoRGBProc *BaselineRGBtoRGB; 00588 Baseline1DTableProc *Baseline1DTable; 00589 BaselineRGBToneProc *BaselineRGBTone; 00590 ResampleDown16Proc *ResampleDown16; 00591 ResampleDown32Proc *ResampleDown32; 00592 ResampleAcross16Proc *ResampleAcross16; 00593 ResampleAcross32Proc *ResampleAcross32; 00594 EqualBytesProc *EqualBytes; 00595 EqualArea8Proc *EqualArea8; 00596 EqualArea16Proc *EqualArea16; 00597 EqualArea32Proc *EqualArea32; 00598 VignetteMask16Proc *VignetteMask16; 00599 Vignette16Proc *Vignette16; 00600 MapArea16Proc *MapArea16; 00601 }; 00602 00603 /*****************************************************************************/ 00604 00605 extern dng_suite gDNGSuite; 00606 00607 /*****************************************************************************/ 00608 00609 inline void DoZeroBytes (void *dPtr, 00610 uint32 count) 00611 { 00612 00613 (gDNGSuite.ZeroBytes) (dPtr, 00614 count); 00615 00616 } 00617 00618 inline void DoCopyBytes (const void *sPtr, 00619 void *dPtr, 00620 uint32 count) 00621 { 00622 00623 (gDNGSuite.CopyBytes) (sPtr, 00624 dPtr, 00625 count); 00626 00627 } 00628 00629 /*****************************************************************************/ 00630 00631 inline void DoSwapBytes16 (uint16 *dPtr, 00632 uint32 count) 00633 { 00634 00635 (gDNGSuite.SwapBytes16) (dPtr, 00636 count); 00637 00638 } 00639 00640 inline void DoSwapBytes32 (uint32 *dPtr, 00641 uint32 count) 00642 { 00643 00644 (gDNGSuite.SwapBytes32) (dPtr, 00645 count); 00646 00647 } 00648 00649 /*****************************************************************************/ 00650 00651 inline void DoSetArea8 (uint8 *dPtr, 00652 uint8 value, 00653 uint32 rows, 00654 uint32 cols, 00655 uint32 planes, 00656 int32 rowStep, 00657 int32 colStep, 00658 int32 planeStep) 00659 { 00660 00661 (gDNGSuite.SetArea8) (dPtr, 00662 value, 00663 rows, 00664 cols, 00665 planes, 00666 rowStep, 00667 colStep, 00668 planeStep); 00669 00670 } 00671 00672 inline void DoSetArea16 (uint16 *dPtr, 00673 uint16 value, 00674 uint32 rows, 00675 uint32 cols, 00676 uint32 planes, 00677 int32 rowStep, 00678 int32 colStep, 00679 int32 planeStep) 00680 { 00681 00682 (gDNGSuite.SetArea16) (dPtr, 00683 value, 00684 rows, 00685 cols, 00686 planes, 00687 rowStep, 00688 colStep, 00689 planeStep); 00690 00691 } 00692 00693 inline void DoSetArea32 (uint32 *dPtr, 00694 uint32 value, 00695 uint32 rows, 00696 uint32 cols, 00697 uint32 planes, 00698 int32 rowStep, 00699 int32 colStep, 00700 int32 planeStep) 00701 { 00702 00703 (gDNGSuite.SetArea32) (dPtr, 00704 value, 00705 rows, 00706 cols, 00707 planes, 00708 rowStep, 00709 colStep, 00710 planeStep); 00711 00712 } 00713 00714 /*****************************************************************************/ 00715 00716 inline void DoCopyArea8 (const uint8 *sPtr, 00717 uint8 *dPtr, 00718 uint32 rows, 00719 uint32 cols, 00720 uint32 planes, 00721 int32 sRowStep, 00722 int32 sColStep, 00723 int32 sPlaneStep, 00724 int32 dRowStep, 00725 int32 dColStep, 00726 int32 dPlaneStep) 00727 { 00728 00729 (gDNGSuite.CopyArea8) (sPtr, 00730 dPtr, 00731 rows, 00732 cols, 00733 planes, 00734 sRowStep, 00735 sColStep, 00736 sPlaneStep, 00737 dRowStep, 00738 dColStep, 00739 dPlaneStep); 00740 00741 } 00742 00743 inline void DoCopyArea16 (const uint16 *sPtr, 00744 uint16 *dPtr, 00745 uint32 rows, 00746 uint32 cols, 00747 uint32 planes, 00748 int32 sRowStep, 00749 int32 sColStep, 00750 int32 sPlaneStep, 00751 int32 dRowStep, 00752 int32 dColStep, 00753 int32 dPlaneStep) 00754 { 00755 00756 (gDNGSuite.CopyArea16) (sPtr, 00757 dPtr, 00758 rows, 00759 cols, 00760 planes, 00761 sRowStep, 00762 sColStep, 00763 sPlaneStep, 00764 dRowStep, 00765 dColStep, 00766 dPlaneStep); 00767 00768 } 00769 00770 inline void DoCopyArea32 (const uint32 *sPtr, 00771 uint32 *dPtr, 00772 uint32 rows, 00773 uint32 cols, 00774 uint32 planes, 00775 int32 sRowStep, 00776 int32 sColStep, 00777 int32 sPlaneStep, 00778 int32 dRowStep, 00779 int32 dColStep, 00780 int32 dPlaneStep) 00781 { 00782 00783 (gDNGSuite.CopyArea32) (sPtr, 00784 dPtr, 00785 rows, 00786 cols, 00787 planes, 00788 sRowStep, 00789 sColStep, 00790 sPlaneStep, 00791 dRowStep, 00792 dColStep, 00793 dPlaneStep); 00794 00795 } 00796 00797 inline void DoCopyArea8_16 (const uint8 *sPtr, 00798 uint16 *dPtr, 00799 uint32 rows, 00800 uint32 cols, 00801 uint32 planes, 00802 int32 sRowStep, 00803 int32 sColStep, 00804 int32 sPlaneStep, 00805 int32 dRowStep, 00806 int32 dColStep, 00807 int32 dPlaneStep) 00808 { 00809 00810 (gDNGSuite.CopyArea8_16) (sPtr, 00811 dPtr, 00812 rows, 00813 cols, 00814 planes, 00815 sRowStep, 00816 sColStep, 00817 sPlaneStep, 00818 dRowStep, 00819 dColStep, 00820 dPlaneStep); 00821 00822 } 00823 00824 inline void DoCopyArea8_S16 (const uint8 *sPtr, 00825 int16 *dPtr, 00826 uint32 rows, 00827 uint32 cols, 00828 uint32 planes, 00829 int32 sRowStep, 00830 int32 sColStep, 00831 int32 sPlaneStep, 00832 int32 dRowStep, 00833 int32 dColStep, 00834 int32 dPlaneStep) 00835 { 00836 00837 (gDNGSuite.CopyArea8_S16) (sPtr, 00838 dPtr, 00839 rows, 00840 cols, 00841 planes, 00842 sRowStep, 00843 sColStep, 00844 sPlaneStep, 00845 dRowStep, 00846 dColStep, 00847 dPlaneStep); 00848 00849 } 00850 00851 inline void DoCopyArea8_32 (const uint8 *sPtr, 00852 uint32 *dPtr, 00853 uint32 rows, 00854 uint32 cols, 00855 uint32 planes, 00856 int32 sRowStep, 00857 int32 sColStep, 00858 int32 sPlaneStep, 00859 int32 dRowStep, 00860 int32 dColStep, 00861 int32 dPlaneStep) 00862 { 00863 00864 (gDNGSuite.CopyArea8_32) (sPtr, 00865 dPtr, 00866 rows, 00867 cols, 00868 planes, 00869 sRowStep, 00870 sColStep, 00871 sPlaneStep, 00872 dRowStep, 00873 dColStep, 00874 dPlaneStep); 00875 00876 } 00877 00878 inline void DoCopyArea16_S16 (const uint16 *sPtr, 00879 int16 *dPtr, 00880 uint32 rows, 00881 uint32 cols, 00882 uint32 planes, 00883 int32 sRowStep, 00884 int32 sColStep, 00885 int32 sPlaneStep, 00886 int32 dRowStep, 00887 int32 dColStep, 00888 int32 dPlaneStep) 00889 { 00890 00891 (gDNGSuite.CopyArea16_S16) (sPtr, 00892 dPtr, 00893 rows, 00894 cols, 00895 planes, 00896 sRowStep, 00897 sColStep, 00898 sPlaneStep, 00899 dRowStep, 00900 dColStep, 00901 dPlaneStep); 00902 00903 } 00904 00905 inline void DoCopyArea16_32 (const uint16 *sPtr, 00906 uint32 *dPtr, 00907 uint32 rows, 00908 uint32 cols, 00909 uint32 planes, 00910 int32 sRowStep, 00911 int32 sColStep, 00912 int32 sPlaneStep, 00913 int32 dRowStep, 00914 int32 dColStep, 00915 int32 dPlaneStep) 00916 { 00917 00918 (gDNGSuite.CopyArea16_32) (sPtr, 00919 dPtr, 00920 rows, 00921 cols, 00922 planes, 00923 sRowStep, 00924 sColStep, 00925 sPlaneStep, 00926 dRowStep, 00927 dColStep, 00928 dPlaneStep); 00929 00930 } 00931 00932 inline void DoCopyArea8_R32 (const uint8 *sPtr, 00933 real32 *dPtr, 00934 uint32 rows, 00935 uint32 cols, 00936 uint32 planes, 00937 int32 sRowStep, 00938 int32 sColStep, 00939 int32 sPlaneStep, 00940 int32 dRowStep, 00941 int32 dColStep, 00942 int32 dPlaneStep, 00943 uint32 pixelRange) 00944 { 00945 00946 (gDNGSuite.CopyArea8_R32) (sPtr, 00947 dPtr, 00948 rows, 00949 cols, 00950 planes, 00951 sRowStep, 00952 sColStep, 00953 sPlaneStep, 00954 dRowStep, 00955 dColStep, 00956 dPlaneStep, 00957 pixelRange); 00958 00959 } 00960 00961 inline void DoCopyArea16_R32 (const uint16 *sPtr, 00962 real32 *dPtr, 00963 uint32 rows, 00964 uint32 cols, 00965 uint32 planes, 00966 int32 sRowStep, 00967 int32 sColStep, 00968 int32 sPlaneStep, 00969 int32 dRowStep, 00970 int32 dColStep, 00971 int32 dPlaneStep, 00972 uint32 pixelRange) 00973 { 00974 00975 (gDNGSuite.CopyArea16_R32) (sPtr, 00976 dPtr, 00977 rows, 00978 cols, 00979 planes, 00980 sRowStep, 00981 sColStep, 00982 sPlaneStep, 00983 dRowStep, 00984 dColStep, 00985 dPlaneStep, 00986 pixelRange); 00987 00988 } 00989 00990 inline void DoCopyAreaS16_R32 (const int16 *sPtr, 00991 real32 *dPtr, 00992 uint32 rows, 00993 uint32 cols, 00994 uint32 planes, 00995 int32 sRowStep, 00996 int32 sColStep, 00997 int32 sPlaneStep, 00998 int32 dRowStep, 00999 int32 dColStep, 01000 int32 dPlaneStep, 01001 uint32 pixelRange) 01002 { 01003 01004 (gDNGSuite.CopyAreaS16_R32) (sPtr, 01005 dPtr, 01006 rows, 01007 cols, 01008 planes, 01009 sRowStep, 01010 sColStep, 01011 sPlaneStep, 01012 dRowStep, 01013 dColStep, 01014 dPlaneStep, 01015 pixelRange); 01016 01017 } 01018 01019 inline void DoCopyAreaR32_8 (const real32 *sPtr, 01020 uint8 *dPtr, 01021 uint32 rows, 01022 uint32 cols, 01023 uint32 planes, 01024 int32 sRowStep, 01025 int32 sColStep, 01026 int32 sPlaneStep, 01027 int32 dRowStep, 01028 int32 dColStep, 01029 int32 dPlaneStep, 01030 uint32 pixelRange) 01031 { 01032 01033 (gDNGSuite.CopyAreaR32_8) (sPtr, 01034 dPtr, 01035 rows, 01036 cols, 01037 planes, 01038 sRowStep, 01039 sColStep, 01040 sPlaneStep, 01041 dRowStep, 01042 dColStep, 01043 dPlaneStep, 01044 pixelRange); 01045 01046 } 01047 01048 inline void DoCopyAreaR32_16 (const real32 *sPtr, 01049 uint16 *dPtr, 01050 uint32 rows, 01051 uint32 cols, 01052 uint32 planes, 01053 int32 sRowStep, 01054 int32 sColStep, 01055 int32 sPlaneStep, 01056 int32 dRowStep, 01057 int32 dColStep, 01058 int32 dPlaneStep, 01059 uint32 pixelRange) 01060 { 01061 01062 (gDNGSuite.CopyAreaR32_16) (sPtr, 01063 dPtr, 01064 rows, 01065 cols, 01066 planes, 01067 sRowStep, 01068 sColStep, 01069 sPlaneStep, 01070 dRowStep, 01071 dColStep, 01072 dPlaneStep, 01073 pixelRange); 01074 01075 } 01076 01077 inline void DoCopyAreaR32_S16 (const real32 *sPtr, 01078 int16 *dPtr, 01079 uint32 rows, 01080 uint32 cols, 01081 uint32 planes, 01082 int32 sRowStep, 01083 int32 sColStep, 01084 int32 sPlaneStep, 01085 int32 dRowStep, 01086 int32 dColStep, 01087 int32 dPlaneStep, 01088 uint32 pixelRange) 01089 { 01090 01091 (gDNGSuite.CopyAreaR32_S16) (sPtr, 01092 dPtr, 01093 rows, 01094 cols, 01095 planes, 01096 sRowStep, 01097 sColStep, 01098 sPlaneStep, 01099 dRowStep, 01100 dColStep, 01101 dPlaneStep, 01102 pixelRange); 01103 01104 } 01105 01106 /*****************************************************************************/ 01107 01108 inline void DoRepeatArea8 (const uint8 *sPtr, 01109 uint8 *dPtr, 01110 uint32 rows, 01111 uint32 cols, 01112 uint32 planes, 01113 int32 rowStep, 01114 int32 colStep, 01115 int32 planeStep, 01116 uint32 repeatV, 01117 uint32 repeatH, 01118 uint32 phaseV, 01119 uint32 phaseH) 01120 { 01121 01122 (gDNGSuite.RepeatArea8) (sPtr, 01123 dPtr, 01124 rows, 01125 cols, 01126 planes, 01127 rowStep, 01128 colStep, 01129 planeStep, 01130 repeatV, 01131 repeatH, 01132 phaseV, 01133 phaseH); 01134 01135 } 01136 01137 inline void DoRepeatArea16 (const uint16 *sPtr, 01138 uint16 *dPtr, 01139 uint32 rows, 01140 uint32 cols, 01141 uint32 planes, 01142 int32 rowStep, 01143 int32 colStep, 01144 int32 planeStep, 01145 uint32 repeatV, 01146 uint32 repeatH, 01147 uint32 phaseV, 01148 uint32 phaseH) 01149 { 01150 01151 (gDNGSuite.RepeatArea16) (sPtr, 01152 dPtr, 01153 rows, 01154 cols, 01155 planes, 01156 rowStep, 01157 colStep, 01158 planeStep, 01159 repeatV, 01160 repeatH, 01161 phaseV, 01162 phaseH); 01163 01164 } 01165 01166 inline void DoRepeatArea32 (const uint32 *sPtr, 01167 uint32 *dPtr, 01168 uint32 rows, 01169 uint32 cols, 01170 uint32 planes, 01171 int32 rowStep, 01172 int32 colStep, 01173 int32 planeStep, 01174 uint32 repeatV, 01175 uint32 repeatH, 01176 uint32 phaseV, 01177 uint32 phaseH) 01178 { 01179 01180 (gDNGSuite.RepeatArea32) (sPtr, 01181 dPtr, 01182 rows, 01183 cols, 01184 planes, 01185 rowStep, 01186 colStep, 01187 planeStep, 01188 repeatV, 01189 repeatH, 01190 phaseV, 01191 phaseH); 01192 01193 } 01194 01195 /*****************************************************************************/ 01196 01197 inline void DoShiftRight16 (uint16 *dPtr, 01198 uint32 rows, 01199 uint32 cols, 01200 uint32 planes, 01201 int32 rowStep, 01202 int32 colStep, 01203 int32 planeStep, 01204 uint32 shift) 01205 { 01206 01207 (gDNGSuite.ShiftRight16) (dPtr, 01208 rows, 01209 cols, 01210 planes, 01211 rowStep, 01212 colStep, 01213 planeStep, 01214 shift); 01215 01216 } 01217 01218 /*****************************************************************************/ 01219 01220 inline void DoBilinearRow16 (const uint16 *sPtr, 01221 uint16 *dPtr, 01222 uint32 cols, 01223 uint32 patPhase, 01224 uint32 patCount, 01225 const uint32 * kernCounts, 01226 const int32 * const * kernOffsets, 01227 const uint16 * const * kernWeights, 01228 uint32 sShift) 01229 { 01230 01231 (gDNGSuite.BilinearRow16) (sPtr, 01232 dPtr, 01233 cols, 01234 patPhase, 01235 patCount, 01236 kernCounts, 01237 kernOffsets, 01238 kernWeights, 01239 sShift); 01240 01241 } 01242 01243 inline void DoBilinearRow32 (const real32 *sPtr, 01244 real32 *dPtr, 01245 uint32 cols, 01246 uint32 patPhase, 01247 uint32 patCount, 01248 const uint32 * kernCounts, 01249 const int32 * const * kernOffsets, 01250 const real32 * const * kernWeights, 01251 uint32 sShift) 01252 { 01253 01254 (gDNGSuite.BilinearRow32) (sPtr, 01255 dPtr, 01256 cols, 01257 patPhase, 01258 patCount, 01259 kernCounts, 01260 kernOffsets, 01261 kernWeights, 01262 sShift); 01263 01264 } 01265 01266 /*****************************************************************************/ 01267 01268 inline void DoBaselineABCtoRGB (const real32 *sPtrA, 01269 const real32 *sPtrB, 01270 const real32 *sPtrC, 01271 real32 *dPtrR, 01272 real32 *dPtrG, 01273 real32 *dPtrB, 01274 uint32 count, 01275 const dng_vector &cameraWhite, 01276 const dng_matrix &cameraToRGB) 01277 { 01278 01279 (gDNGSuite.BaselineABCtoRGB) (sPtrA, 01280 sPtrB, 01281 sPtrC, 01282 dPtrR, 01283 dPtrG, 01284 dPtrB, 01285 count, 01286 cameraWhite, 01287 cameraToRGB); 01288 01289 } 01290 01291 inline void DoBaselineABCDtoRGB (const real32 *sPtrA, 01292 const real32 *sPtrB, 01293 const real32 *sPtrC, 01294 const real32 *sPtrD, 01295 real32 *dPtrR, 01296 real32 *dPtrG, 01297 real32 *dPtrB, 01298 uint32 count, 01299 const dng_vector &cameraWhite, 01300 const dng_matrix &cameraToRGB) 01301 { 01302 01303 (gDNGSuite.BaselineABCDtoRGB) (sPtrA, 01304 sPtrB, 01305 sPtrC, 01306 sPtrD, 01307 dPtrR, 01308 dPtrG, 01309 dPtrB, 01310 count, 01311 cameraWhite, 01312 cameraToRGB); 01313 01314 } 01315 01316 /*****************************************************************************/ 01317 01318 inline void DoBaselineHueSatMap (const real32 *sPtrR, 01319 const real32 *sPtrG, 01320 const real32 *sPtrB, 01321 real32 *dPtrR, 01322 real32 *dPtrG, 01323 real32 *dPtrB, 01324 uint32 count, 01325 const dng_hue_sat_map &lut) 01326 { 01327 01328 (gDNGSuite.BaselineHueSatMap) (sPtrR, 01329 sPtrG, 01330 sPtrB, 01331 dPtrR, 01332 dPtrG, 01333 dPtrB, 01334 count, 01335 lut); 01336 01337 } 01338 01339 /*****************************************************************************/ 01340 01341 inline void DoBaselineRGBtoGray (const real32 *sPtrR, 01342 const real32 *sPtrG, 01343 const real32 *sPtrB, 01344 real32 *dPtrG, 01345 uint32 count, 01346 const dng_matrix &matrix) 01347 { 01348 01349 (gDNGSuite.BaselineRGBtoGray) (sPtrR, 01350 sPtrG, 01351 sPtrB, 01352 dPtrG, 01353 count, 01354 matrix); 01355 01356 } 01357 01358 inline void DoBaselineRGBtoRGB (const real32 *sPtrR, 01359 const real32 *sPtrG, 01360 const real32 *sPtrB, 01361 real32 *dPtrR, 01362 real32 *dPtrG, 01363 real32 *dPtrB, 01364 uint32 count, 01365 const dng_matrix &matrix) 01366 { 01367 01368 (gDNGSuite.BaselineRGBtoRGB) (sPtrR, 01369 sPtrG, 01370 sPtrB, 01371 dPtrR, 01372 dPtrG, 01373 dPtrB, 01374 count, 01375 matrix); 01376 01377 } 01378 01379 /*****************************************************************************/ 01380 01381 inline void DoBaseline1DTable (const real32 *sPtr, 01382 real32 *dPtr, 01383 uint32 count, 01384 const dng_1d_table &table) 01385 { 01386 01387 (gDNGSuite.Baseline1DTable) (sPtr, 01388 dPtr, 01389 count, 01390 table); 01391 01392 } 01393 01394 /*****************************************************************************/ 01395 01396 inline void DoBaselineRGBTone (const real32 *sPtrR, 01397 const real32 *sPtrG, 01398 const real32 *sPtrB, 01399 real32 *dPtrR, 01400 real32 *dPtrG, 01401 real32 *dPtrB, 01402 uint32 count, 01403 const dng_1d_table &table) 01404 { 01405 01406 (gDNGSuite.BaselineRGBTone) (sPtrR, 01407 sPtrG, 01408 sPtrB, 01409 dPtrR, 01410 dPtrG, 01411 dPtrB, 01412 count, 01413 table); 01414 01415 } 01416 01417 /*****************************************************************************/ 01418 01419 inline void DoResampleDown16 (const uint16 *sPtr, 01420 uint16 *dPtr, 01421 uint32 sCount, 01422 int32 sRowStep, 01423 const int16 *wPtr, 01424 uint32 wCount, 01425 uint32 pixelRange) 01426 { 01427 01428 (gDNGSuite.ResampleDown16) (sPtr, 01429 dPtr, 01430 sCount, 01431 sRowStep, 01432 wPtr, 01433 wCount, 01434 pixelRange); 01435 01436 } 01437 01438 inline void DoResampleDown32 (const real32 *sPtr, 01439 real32 *dPtr, 01440 uint32 sCount, 01441 int32 sRowStep, 01442 const real32 *wPtr, 01443 uint32 wCount) 01444 { 01445 01446 (gDNGSuite.ResampleDown32) (sPtr, 01447 dPtr, 01448 sCount, 01449 sRowStep, 01450 wPtr, 01451 wCount); 01452 01453 } 01454 01455 /*****************************************************************************/ 01456 01457 inline void DoResampleAcross16 (const uint16 *sPtr, 01458 uint16 *dPtr, 01459 uint32 dCount, 01460 const int32 *coord, 01461 const int16 *wPtr, 01462 uint32 wCount, 01463 uint32 wStep, 01464 uint32 pixelRange) 01465 { 01466 01467 (gDNGSuite.ResampleAcross16) (sPtr, 01468 dPtr, 01469 dCount, 01470 coord, 01471 wPtr, 01472 wCount, 01473 wStep, 01474 pixelRange); 01475 01476 } 01477 01478 inline void DoResampleAcross32 (const real32 *sPtr, 01479 real32 *dPtr, 01480 uint32 dCount, 01481 const int32 *coord, 01482 const real32 *wPtr, 01483 uint32 wCount, 01484 uint32 wStep) 01485 { 01486 01487 (gDNGSuite.ResampleAcross32) (sPtr, 01488 dPtr, 01489 dCount, 01490 coord, 01491 wPtr, 01492 wCount, 01493 wStep); 01494 01495 } 01496 01497 /*****************************************************************************/ 01498 01499 inline bool DoEqualBytes (const void *sPtr, 01500 const void *dPtr, 01501 uint32 count) 01502 { 01503 01504 return (gDNGSuite.EqualBytes) (sPtr, 01505 dPtr, 01506 count); 01507 01508 } 01509 01510 inline bool DoEqualArea8 (const uint8 *sPtr, 01511 const uint8 *dPtr, 01512 uint32 rows, 01513 uint32 cols, 01514 uint32 planes, 01515 int32 sRowStep, 01516 int32 sColStep, 01517 int32 sPlaneStep, 01518 int32 dRowStep, 01519 int32 dColStep, 01520 int32 dPlaneStep) 01521 { 01522 01523 return (gDNGSuite.EqualArea8) (sPtr, 01524 dPtr, 01525 rows, 01526 cols, 01527 planes, 01528 sRowStep, 01529 sColStep, 01530 sPlaneStep, 01531 dRowStep, 01532 dColStep, 01533 dPlaneStep); 01534 01535 } 01536 01537 inline bool DoEqualArea16 (const uint16 *sPtr, 01538 const uint16 *dPtr, 01539 uint32 rows, 01540 uint32 cols, 01541 uint32 planes, 01542 int32 sRowStep, 01543 int32 sColStep, 01544 int32 sPlaneStep, 01545 int32 dRowStep, 01546 int32 dColStep, 01547 int32 dPlaneStep) 01548 { 01549 01550 return (gDNGSuite.EqualArea16) (sPtr, 01551 dPtr, 01552 rows, 01553 cols, 01554 planes, 01555 sRowStep, 01556 sColStep, 01557 sPlaneStep, 01558 dRowStep, 01559 dColStep, 01560 dPlaneStep); 01561 01562 } 01563 01564 inline bool DoEqualArea32 (const uint32 *sPtr, 01565 const uint32 *dPtr, 01566 uint32 rows, 01567 uint32 cols, 01568 uint32 planes, 01569 int32 sRowStep, 01570 int32 sColStep, 01571 int32 sPlaneStep, 01572 int32 dRowStep, 01573 int32 dColStep, 01574 int32 dPlaneStep) 01575 { 01576 01577 return (gDNGSuite.EqualArea32) (sPtr, 01578 dPtr, 01579 rows, 01580 cols, 01581 planes, 01582 sRowStep, 01583 sColStep, 01584 sPlaneStep, 01585 dRowStep, 01586 dColStep, 01587 dPlaneStep); 01588 01589 } 01590 01591 /*****************************************************************************/ 01592 01593 inline void DoVignetteMask16 (uint16 *mPtr, 01594 uint32 rows, 01595 uint32 cols, 01596 int32 rowStep, 01597 int64 offsetH, 01598 int64 offsetV, 01599 int64 stepH, 01600 int64 stepV, 01601 uint32 tBits, 01602 const uint16 *table) 01603 { 01604 01605 (gDNGSuite.VignetteMask16) (mPtr, 01606 rows, 01607 cols, 01608 rowStep, 01609 offsetH, 01610 offsetV, 01611 stepH, 01612 stepV, 01613 tBits, 01614 table); 01615 01616 } 01617 01618 /*****************************************************************************/ 01619 01620 inline void DoVignette16 (int16 *sPtr, 01621 const uint16 *mPtr, 01622 uint32 rows, 01623 uint32 cols, 01624 uint32 planes, 01625 int32 sRowStep, 01626 int32 sPlaneStep, 01627 int32 mRowStep, 01628 uint32 mBits) 01629 { 01630 01631 (gDNGSuite.Vignette16) (sPtr, 01632 mPtr, 01633 rows, 01634 cols, 01635 planes, 01636 sRowStep, 01637 sPlaneStep, 01638 mRowStep, 01639 mBits); 01640 01641 } 01642 01643 /*****************************************************************************/ 01644 01645 inline void DoMapArea16 (uint16 *dPtr, 01646 uint32 count0, 01647 uint32 count1, 01648 uint32 count2, 01649 int32 step0, 01650 int32 step1, 01651 int32 step2, 01652 const uint16 *map) 01653 { 01654 01655 (gDNGSuite.MapArea16) (dPtr, 01656 count0, 01657 count1, 01658 count2, 01659 step0, 01660 step1, 01661 step2, 01662 map); 01663 01664 } 01665 01666 /*****************************************************************************/ 01667 01668 #endif 01669 01670 /*****************************************************************************/ |