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/dng_sdk_1_2/dng_sdk/source/dng_bottlenecks.h#1 $ */ 00010 /* $DateTime: 2008/03/09 14:29:54 $ */ 00011 /* $Change: 431850 $ */ 00012 /* $Author: tknoll $ */ 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 struct dng_suite 00518 { 00519 ZeroBytesProc *ZeroBytes; 00520 CopyBytesProc *CopyBytes; 00521 SwapBytes16Proc *SwapBytes16; 00522 SwapBytes32Proc *SwapBytes32; 00523 SetArea8Proc *SetArea8; 00524 SetArea16Proc *SetArea16; 00525 SetArea32Proc *SetArea32; 00526 CopyArea8Proc *CopyArea8; 00527 CopyArea16Proc *CopyArea16; 00528 CopyArea32Proc *CopyArea32; 00529 CopyArea8_16Proc *CopyArea8_16; 00530 CopyArea8_S16Proc *CopyArea8_S16; 00531 CopyArea8_32Proc *CopyArea8_32; 00532 CopyArea16_S16Proc *CopyArea16_S16; 00533 CopyArea16_32Proc *CopyArea16_32; 00534 CopyArea8_R32Proc *CopyArea8_R32; 00535 CopyArea16_R32Proc *CopyArea16_R32; 00536 CopyAreaS16_R32Proc *CopyAreaS16_R32; 00537 CopyAreaR32_8Proc *CopyAreaR32_8; 00538 CopyAreaR32_16Proc *CopyAreaR32_16; 00539 CopyAreaR32_S16Proc *CopyAreaR32_S16; 00540 RepeatArea8Proc *RepeatArea8; 00541 RepeatArea16Proc *RepeatArea16; 00542 RepeatArea32Proc *RepeatArea32; 00543 ShiftRight16Proc *ShiftRight16; 00544 BilinearRow16Proc *BilinearRow16; 00545 BilinearRow32Proc *BilinearRow32; 00546 BaselineABCtoRGBProc *BaselineABCtoRGB; 00547 BaselineABCDtoRGBProc *BaselineABCDtoRGB; 00548 BaselineHueSatMapProc *BaselineHueSatMap; 00549 BaselineGrayToRGBProc *BaselineRGBtoGray; 00550 BaselineRGBtoRGBProc *BaselineRGBtoRGB; 00551 Baseline1DTableProc *Baseline1DTable; 00552 BaselineRGBToneProc *BaselineRGBTone; 00553 ResampleDown16Proc *ResampleDown16; 00554 ResampleDown32Proc *ResampleDown32; 00555 ResampleAcross16Proc *ResampleAcross16; 00556 ResampleAcross32Proc *ResampleAcross32; 00557 EqualBytesProc *EqualBytes; 00558 EqualArea8Proc *EqualArea8; 00559 EqualArea16Proc *EqualArea16; 00560 EqualArea32Proc *EqualArea32; 00561 }; 00562 00563 /*****************************************************************************/ 00564 00565 extern dng_suite gDNGSuite; 00566 00567 /*****************************************************************************/ 00568 00569 inline void DoZeroBytes (void *dPtr, 00570 uint32 count) 00571 { 00572 00573 (gDNGSuite.ZeroBytes) (dPtr, 00574 count); 00575 00576 } 00577 00578 inline void DoCopyBytes (const void *sPtr, 00579 void *dPtr, 00580 uint32 count) 00581 { 00582 00583 (gDNGSuite.CopyBytes) (sPtr, 00584 dPtr, 00585 count); 00586 00587 } 00588 00589 /*****************************************************************************/ 00590 00591 inline void DoSwapBytes16 (uint16 *dPtr, 00592 uint32 count) 00593 { 00594 00595 (gDNGSuite.SwapBytes16) (dPtr, 00596 count); 00597 00598 } 00599 00600 inline void DoSwapBytes32 (uint32 *dPtr, 00601 uint32 count) 00602 { 00603 00604 (gDNGSuite.SwapBytes32) (dPtr, 00605 count); 00606 00607 } 00608 00609 /*****************************************************************************/ 00610 00611 inline void DoSetArea8 (uint8 *dPtr, 00612 uint8 value, 00613 uint32 rows, 00614 uint32 cols, 00615 uint32 planes, 00616 int32 rowStep, 00617 int32 colStep, 00618 int32 planeStep) 00619 { 00620 00621 (gDNGSuite.SetArea8) (dPtr, 00622 value, 00623 rows, 00624 cols, 00625 planes, 00626 rowStep, 00627 colStep, 00628 planeStep); 00629 00630 } 00631 00632 inline void DoSetArea16 (uint16 *dPtr, 00633 uint16 value, 00634 uint32 rows, 00635 uint32 cols, 00636 uint32 planes, 00637 int32 rowStep, 00638 int32 colStep, 00639 int32 planeStep) 00640 { 00641 00642 (gDNGSuite.SetArea16) (dPtr, 00643 value, 00644 rows, 00645 cols, 00646 planes, 00647 rowStep, 00648 colStep, 00649 planeStep); 00650 00651 } 00652 00653 inline void DoSetArea32 (uint32 *dPtr, 00654 uint32 value, 00655 uint32 rows, 00656 uint32 cols, 00657 uint32 planes, 00658 int32 rowStep, 00659 int32 colStep, 00660 int32 planeStep) 00661 { 00662 00663 (gDNGSuite.SetArea32) (dPtr, 00664 value, 00665 rows, 00666 cols, 00667 planes, 00668 rowStep, 00669 colStep, 00670 planeStep); 00671 00672 } 00673 00674 /*****************************************************************************/ 00675 00676 inline void DoCopyArea8 (const uint8 *sPtr, 00677 uint8 *dPtr, 00678 uint32 rows, 00679 uint32 cols, 00680 uint32 planes, 00681 int32 sRowStep, 00682 int32 sColStep, 00683 int32 sPlaneStep, 00684 int32 dRowStep, 00685 int32 dColStep, 00686 int32 dPlaneStep) 00687 { 00688 00689 (gDNGSuite.CopyArea8) (sPtr, 00690 dPtr, 00691 rows, 00692 cols, 00693 planes, 00694 sRowStep, 00695 sColStep, 00696 sPlaneStep, 00697 dRowStep, 00698 dColStep, 00699 dPlaneStep); 00700 00701 } 00702 00703 inline void DoCopyArea16 (const uint16 *sPtr, 00704 uint16 *dPtr, 00705 uint32 rows, 00706 uint32 cols, 00707 uint32 planes, 00708 int32 sRowStep, 00709 int32 sColStep, 00710 int32 sPlaneStep, 00711 int32 dRowStep, 00712 int32 dColStep, 00713 int32 dPlaneStep) 00714 { 00715 00716 (gDNGSuite.CopyArea16) (sPtr, 00717 dPtr, 00718 rows, 00719 cols, 00720 planes, 00721 sRowStep, 00722 sColStep, 00723 sPlaneStep, 00724 dRowStep, 00725 dColStep, 00726 dPlaneStep); 00727 00728 } 00729 00730 inline void DoCopyArea32 (const uint32 *sPtr, 00731 uint32 *dPtr, 00732 uint32 rows, 00733 uint32 cols, 00734 uint32 planes, 00735 int32 sRowStep, 00736 int32 sColStep, 00737 int32 sPlaneStep, 00738 int32 dRowStep, 00739 int32 dColStep, 00740 int32 dPlaneStep) 00741 { 00742 00743 (gDNGSuite.CopyArea32) (sPtr, 00744 dPtr, 00745 rows, 00746 cols, 00747 planes, 00748 sRowStep, 00749 sColStep, 00750 sPlaneStep, 00751 dRowStep, 00752 dColStep, 00753 dPlaneStep); 00754 00755 } 00756 00757 inline void DoCopyArea8_16 (const uint8 *sPtr, 00758 uint16 *dPtr, 00759 uint32 rows, 00760 uint32 cols, 00761 uint32 planes, 00762 int32 sRowStep, 00763 int32 sColStep, 00764 int32 sPlaneStep, 00765 int32 dRowStep, 00766 int32 dColStep, 00767 int32 dPlaneStep) 00768 { 00769 00770 (gDNGSuite.CopyArea8_16) (sPtr, 00771 dPtr, 00772 rows, 00773 cols, 00774 planes, 00775 sRowStep, 00776 sColStep, 00777 sPlaneStep, 00778 dRowStep, 00779 dColStep, 00780 dPlaneStep); 00781 00782 } 00783 00784 inline void DoCopyArea8_S16 (const uint8 *sPtr, 00785 int16 *dPtr, 00786 uint32 rows, 00787 uint32 cols, 00788 uint32 planes, 00789 int32 sRowStep, 00790 int32 sColStep, 00791 int32 sPlaneStep, 00792 int32 dRowStep, 00793 int32 dColStep, 00794 int32 dPlaneStep) 00795 { 00796 00797 (gDNGSuite.CopyArea8_S16) (sPtr, 00798 dPtr, 00799 rows, 00800 cols, 00801 planes, 00802 sRowStep, 00803 sColStep, 00804 sPlaneStep, 00805 dRowStep, 00806 dColStep, 00807 dPlaneStep); 00808 00809 } 00810 00811 inline void DoCopyArea8_32 (const uint8 *sPtr, 00812 uint32 *dPtr, 00813 uint32 rows, 00814 uint32 cols, 00815 uint32 planes, 00816 int32 sRowStep, 00817 int32 sColStep, 00818 int32 sPlaneStep, 00819 int32 dRowStep, 00820 int32 dColStep, 00821 int32 dPlaneStep) 00822 { 00823 00824 (gDNGSuite.CopyArea8_32) (sPtr, 00825 dPtr, 00826 rows, 00827 cols, 00828 planes, 00829 sRowStep, 00830 sColStep, 00831 sPlaneStep, 00832 dRowStep, 00833 dColStep, 00834 dPlaneStep); 00835 00836 } 00837 00838 inline void DoCopyArea16_S16 (const uint16 *sPtr, 00839 int16 *dPtr, 00840 uint32 rows, 00841 uint32 cols, 00842 uint32 planes, 00843 int32 sRowStep, 00844 int32 sColStep, 00845 int32 sPlaneStep, 00846 int32 dRowStep, 00847 int32 dColStep, 00848 int32 dPlaneStep) 00849 { 00850 00851 (gDNGSuite.CopyArea16_S16) (sPtr, 00852 dPtr, 00853 rows, 00854 cols, 00855 planes, 00856 sRowStep, 00857 sColStep, 00858 sPlaneStep, 00859 dRowStep, 00860 dColStep, 00861 dPlaneStep); 00862 00863 } 00864 00865 inline void DoCopyArea16_32 (const uint16 *sPtr, 00866 uint32 *dPtr, 00867 uint32 rows, 00868 uint32 cols, 00869 uint32 planes, 00870 int32 sRowStep, 00871 int32 sColStep, 00872 int32 sPlaneStep, 00873 int32 dRowStep, 00874 int32 dColStep, 00875 int32 dPlaneStep) 00876 { 00877 00878 (gDNGSuite.CopyArea16_32) (sPtr, 00879 dPtr, 00880 rows, 00881 cols, 00882 planes, 00883 sRowStep, 00884 sColStep, 00885 sPlaneStep, 00886 dRowStep, 00887 dColStep, 00888 dPlaneStep); 00889 00890 } 00891 00892 inline void DoCopyArea8_R32 (const uint8 *sPtr, 00893 real32 *dPtr, 00894 uint32 rows, 00895 uint32 cols, 00896 uint32 planes, 00897 int32 sRowStep, 00898 int32 sColStep, 00899 int32 sPlaneStep, 00900 int32 dRowStep, 00901 int32 dColStep, 00902 int32 dPlaneStep, 00903 uint32 pixelRange) 00904 { 00905 00906 (gDNGSuite.CopyArea8_R32) (sPtr, 00907 dPtr, 00908 rows, 00909 cols, 00910 planes, 00911 sRowStep, 00912 sColStep, 00913 sPlaneStep, 00914 dRowStep, 00915 dColStep, 00916 dPlaneStep, 00917 pixelRange); 00918 00919 } 00920 00921 inline void DoCopyArea16_R32 (const uint16 *sPtr, 00922 real32 *dPtr, 00923 uint32 rows, 00924 uint32 cols, 00925 uint32 planes, 00926 int32 sRowStep, 00927 int32 sColStep, 00928 int32 sPlaneStep, 00929 int32 dRowStep, 00930 int32 dColStep, 00931 int32 dPlaneStep, 00932 uint32 pixelRange) 00933 { 00934 00935 (gDNGSuite.CopyArea16_R32) (sPtr, 00936 dPtr, 00937 rows, 00938 cols, 00939 planes, 00940 sRowStep, 00941 sColStep, 00942 sPlaneStep, 00943 dRowStep, 00944 dColStep, 00945 dPlaneStep, 00946 pixelRange); 00947 00948 } 00949 00950 inline void DoCopyAreaS16_R32 (const int16 *sPtr, 00951 real32 *dPtr, 00952 uint32 rows, 00953 uint32 cols, 00954 uint32 planes, 00955 int32 sRowStep, 00956 int32 sColStep, 00957 int32 sPlaneStep, 00958 int32 dRowStep, 00959 int32 dColStep, 00960 int32 dPlaneStep, 00961 uint32 pixelRange) 00962 { 00963 00964 (gDNGSuite.CopyAreaS16_R32) (sPtr, 00965 dPtr, 00966 rows, 00967 cols, 00968 planes, 00969 sRowStep, 00970 sColStep, 00971 sPlaneStep, 00972 dRowStep, 00973 dColStep, 00974 dPlaneStep, 00975 pixelRange); 00976 00977 } 00978 00979 inline void DoCopyAreaR32_8 (const real32 *sPtr, 00980 uint8 *dPtr, 00981 uint32 rows, 00982 uint32 cols, 00983 uint32 planes, 00984 int32 sRowStep, 00985 int32 sColStep, 00986 int32 sPlaneStep, 00987 int32 dRowStep, 00988 int32 dColStep, 00989 int32 dPlaneStep, 00990 uint32 pixelRange) 00991 { 00992 00993 (gDNGSuite.CopyAreaR32_8) (sPtr, 00994 dPtr, 00995 rows, 00996 cols, 00997 planes, 00998 sRowStep, 00999 sColStep, 01000 sPlaneStep, 01001 dRowStep, 01002 dColStep, 01003 dPlaneStep, 01004 pixelRange); 01005 01006 } 01007 01008 inline void DoCopyAreaR32_16 (const real32 *sPtr, 01009 uint16 *dPtr, 01010 uint32 rows, 01011 uint32 cols, 01012 uint32 planes, 01013 int32 sRowStep, 01014 int32 sColStep, 01015 int32 sPlaneStep, 01016 int32 dRowStep, 01017 int32 dColStep, 01018 int32 dPlaneStep, 01019 uint32 pixelRange) 01020 { 01021 01022 (gDNGSuite.CopyAreaR32_16) (sPtr, 01023 dPtr, 01024 rows, 01025 cols, 01026 planes, 01027 sRowStep, 01028 sColStep, 01029 sPlaneStep, 01030 dRowStep, 01031 dColStep, 01032 dPlaneStep, 01033 pixelRange); 01034 01035 } 01036 01037 inline void DoCopyAreaR32_S16 (const real32 *sPtr, 01038 int16 *dPtr, 01039 uint32 rows, 01040 uint32 cols, 01041 uint32 planes, 01042 int32 sRowStep, 01043 int32 sColStep, 01044 int32 sPlaneStep, 01045 int32 dRowStep, 01046 int32 dColStep, 01047 int32 dPlaneStep, 01048 uint32 pixelRange) 01049 { 01050 01051 (gDNGSuite.CopyAreaR32_S16) (sPtr, 01052 dPtr, 01053 rows, 01054 cols, 01055 planes, 01056 sRowStep, 01057 sColStep, 01058 sPlaneStep, 01059 dRowStep, 01060 dColStep, 01061 dPlaneStep, 01062 pixelRange); 01063 01064 } 01065 01066 /*****************************************************************************/ 01067 01068 inline void DoRepeatArea8 (const uint8 *sPtr, 01069 uint8 *dPtr, 01070 uint32 rows, 01071 uint32 cols, 01072 uint32 planes, 01073 int32 rowStep, 01074 int32 colStep, 01075 int32 planeStep, 01076 uint32 repeatV, 01077 uint32 repeatH, 01078 uint32 phaseV, 01079 uint32 phaseH) 01080 { 01081 01082 (gDNGSuite.RepeatArea8) (sPtr, 01083 dPtr, 01084 rows, 01085 cols, 01086 planes, 01087 rowStep, 01088 colStep, 01089 planeStep, 01090 repeatV, 01091 repeatH, 01092 phaseV, 01093 phaseH); 01094 01095 } 01096 01097 inline void DoRepeatArea16 (const uint16 *sPtr, 01098 uint16 *dPtr, 01099 uint32 rows, 01100 uint32 cols, 01101 uint32 planes, 01102 int32 rowStep, 01103 int32 colStep, 01104 int32 planeStep, 01105 uint32 repeatV, 01106 uint32 repeatH, 01107 uint32 phaseV, 01108 uint32 phaseH) 01109 { 01110 01111 (gDNGSuite.RepeatArea16) (sPtr, 01112 dPtr, 01113 rows, 01114 cols, 01115 planes, 01116 rowStep, 01117 colStep, 01118 planeStep, 01119 repeatV, 01120 repeatH, 01121 phaseV, 01122 phaseH); 01123 01124 } 01125 01126 inline void DoRepeatArea32 (const uint32 *sPtr, 01127 uint32 *dPtr, 01128 uint32 rows, 01129 uint32 cols, 01130 uint32 planes, 01131 int32 rowStep, 01132 int32 colStep, 01133 int32 planeStep, 01134 uint32 repeatV, 01135 uint32 repeatH, 01136 uint32 phaseV, 01137 uint32 phaseH) 01138 { 01139 01140 (gDNGSuite.RepeatArea32) (sPtr, 01141 dPtr, 01142 rows, 01143 cols, 01144 planes, 01145 rowStep, 01146 colStep, 01147 planeStep, 01148 repeatV, 01149 repeatH, 01150 phaseV, 01151 phaseH); 01152 01153 } 01154 01155 /*****************************************************************************/ 01156 01157 inline void DoShiftRight16 (uint16 *dPtr, 01158 uint32 rows, 01159 uint32 cols, 01160 uint32 planes, 01161 int32 rowStep, 01162 int32 colStep, 01163 int32 planeStep, 01164 uint32 shift) 01165 { 01166 01167 (gDNGSuite.ShiftRight16) (dPtr, 01168 rows, 01169 cols, 01170 planes, 01171 rowStep, 01172 colStep, 01173 planeStep, 01174 shift); 01175 01176 } 01177 01178 /*****************************************************************************/ 01179 01180 inline void DoBilinearRow16 (const uint16 *sPtr, 01181 uint16 *dPtr, 01182 uint32 cols, 01183 uint32 patPhase, 01184 uint32 patCount, 01185 const uint32 * kernCounts, 01186 const int32 * const * kernOffsets, 01187 const uint16 * const * kernWeights, 01188 uint32 sShift) 01189 { 01190 01191 (gDNGSuite.BilinearRow16) (sPtr, 01192 dPtr, 01193 cols, 01194 patPhase, 01195 patCount, 01196 kernCounts, 01197 kernOffsets, 01198 kernWeights, 01199 sShift); 01200 01201 } 01202 01203 inline void DoBilinearRow32 (const real32 *sPtr, 01204 real32 *dPtr, 01205 uint32 cols, 01206 uint32 patPhase, 01207 uint32 patCount, 01208 const uint32 * kernCounts, 01209 const int32 * const * kernOffsets, 01210 const real32 * const * kernWeights, 01211 uint32 sShift) 01212 { 01213 01214 (gDNGSuite.BilinearRow32) (sPtr, 01215 dPtr, 01216 cols, 01217 patPhase, 01218 patCount, 01219 kernCounts, 01220 kernOffsets, 01221 kernWeights, 01222 sShift); 01223 01224 } 01225 01226 /*****************************************************************************/ 01227 01228 inline void DoBaselineABCtoRGB (const real32 *sPtrA, 01229 const real32 *sPtrB, 01230 const real32 *sPtrC, 01231 real32 *dPtrR, 01232 real32 *dPtrG, 01233 real32 *dPtrB, 01234 uint32 count, 01235 const dng_vector &cameraWhite, 01236 const dng_matrix &cameraToRGB) 01237 { 01238 01239 (gDNGSuite.BaselineABCtoRGB) (sPtrA, 01240 sPtrB, 01241 sPtrC, 01242 dPtrR, 01243 dPtrG, 01244 dPtrB, 01245 count, 01246 cameraWhite, 01247 cameraToRGB); 01248 01249 } 01250 01251 inline void DoBaselineABCDtoRGB (const real32 *sPtrA, 01252 const real32 *sPtrB, 01253 const real32 *sPtrC, 01254 const real32 *sPtrD, 01255 real32 *dPtrR, 01256 real32 *dPtrG, 01257 real32 *dPtrB, 01258 uint32 count, 01259 const dng_vector &cameraWhite, 01260 const dng_matrix &cameraToRGB) 01261 { 01262 01263 (gDNGSuite.BaselineABCDtoRGB) (sPtrA, 01264 sPtrB, 01265 sPtrC, 01266 sPtrD, 01267 dPtrR, 01268 dPtrG, 01269 dPtrB, 01270 count, 01271 cameraWhite, 01272 cameraToRGB); 01273 01274 } 01275 01276 /*****************************************************************************/ 01277 01278 inline void DoBaselineHueSatMap (const real32 *sPtrR, 01279 const real32 *sPtrG, 01280 const real32 *sPtrB, 01281 real32 *dPtrR, 01282 real32 *dPtrG, 01283 real32 *dPtrB, 01284 uint32 count, 01285 const dng_hue_sat_map &lut) 01286 { 01287 01288 (gDNGSuite.BaselineHueSatMap) (sPtrR, 01289 sPtrG, 01290 sPtrB, 01291 dPtrR, 01292 dPtrG, 01293 dPtrB, 01294 count, 01295 lut); 01296 01297 } 01298 01299 /*****************************************************************************/ 01300 01301 inline void DoBaselineRGBtoGray (const real32 *sPtrR, 01302 const real32 *sPtrG, 01303 const real32 *sPtrB, 01304 real32 *dPtrG, 01305 uint32 count, 01306 const dng_matrix &matrix) 01307 { 01308 01309 (gDNGSuite.BaselineRGBtoGray) (sPtrR, 01310 sPtrG, 01311 sPtrB, 01312 dPtrG, 01313 count, 01314 matrix); 01315 01316 } 01317 01318 inline void DoBaselineRGBtoRGB (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_matrix &matrix) 01326 { 01327 01328 (gDNGSuite.BaselineRGBtoRGB) (sPtrR, 01329 sPtrG, 01330 sPtrB, 01331 dPtrR, 01332 dPtrG, 01333 dPtrB, 01334 count, 01335 matrix); 01336 01337 } 01338 01339 /*****************************************************************************/ 01340 01341 inline void DoBaseline1DTable (const real32 *sPtr, 01342 real32 *dPtr, 01343 uint32 count, 01344 const dng_1d_table &table) 01345 { 01346 01347 (gDNGSuite.Baseline1DTable) (sPtr, 01348 dPtr, 01349 count, 01350 table); 01351 01352 } 01353 01354 /*****************************************************************************/ 01355 01356 inline void DoBaselineRGBTone (const real32 *sPtrR, 01357 const real32 *sPtrG, 01358 const real32 *sPtrB, 01359 real32 *dPtrR, 01360 real32 *dPtrG, 01361 real32 *dPtrB, 01362 uint32 count, 01363 const dng_1d_table &table) 01364 { 01365 01366 (gDNGSuite.BaselineRGBTone) (sPtrR, 01367 sPtrG, 01368 sPtrB, 01369 dPtrR, 01370 dPtrG, 01371 dPtrB, 01372 count, 01373 table); 01374 01375 } 01376 01377 /*****************************************************************************/ 01378 01379 inline void DoResampleDown16 (const uint16 *sPtr, 01380 uint16 *dPtr, 01381 uint32 sCount, 01382 int32 sRowStep, 01383 const int16 *wPtr, 01384 uint32 wCount, 01385 uint32 pixelRange) 01386 { 01387 01388 (gDNGSuite.ResampleDown16) (sPtr, 01389 dPtr, 01390 sCount, 01391 sRowStep, 01392 wPtr, 01393 wCount, 01394 pixelRange); 01395 01396 } 01397 01398 inline void DoResampleDown32 (const real32 *sPtr, 01399 real32 *dPtr, 01400 uint32 sCount, 01401 int32 sRowStep, 01402 const real32 *wPtr, 01403 uint32 wCount) 01404 { 01405 01406 (gDNGSuite.ResampleDown32) (sPtr, 01407 dPtr, 01408 sCount, 01409 sRowStep, 01410 wPtr, 01411 wCount); 01412 01413 } 01414 01415 /*****************************************************************************/ 01416 01417 inline void DoResampleAcross16 (const uint16 *sPtr, 01418 uint16 *dPtr, 01419 uint32 dCount, 01420 const int32 *coord, 01421 const int16 *wPtr, 01422 uint32 wCount, 01423 uint32 wStep, 01424 uint32 pixelRange) 01425 { 01426 01427 (gDNGSuite.ResampleAcross16) (sPtr, 01428 dPtr, 01429 dCount, 01430 coord, 01431 wPtr, 01432 wCount, 01433 wStep, 01434 pixelRange); 01435 01436 } 01437 01438 inline void DoResampleAcross32 (const real32 *sPtr, 01439 real32 *dPtr, 01440 uint32 dCount, 01441 const int32 *coord, 01442 const real32 *wPtr, 01443 uint32 wCount, 01444 uint32 wStep) 01445 { 01446 01447 (gDNGSuite.ResampleAcross32) (sPtr, 01448 dPtr, 01449 dCount, 01450 coord, 01451 wPtr, 01452 wCount, 01453 wStep); 01454 01455 } 01456 01457 /*****************************************************************************/ 01458 01459 inline bool DoEqualBytes (const void *sPtr, 01460 const void *dPtr, 01461 uint32 count) 01462 { 01463 01464 return (gDNGSuite.EqualBytes) (sPtr, 01465 dPtr, 01466 count); 01467 01468 } 01469 01470 inline bool DoEqualArea8 (const uint8 *sPtr, 01471 const uint8 *dPtr, 01472 uint32 rows, 01473 uint32 cols, 01474 uint32 planes, 01475 int32 sRowStep, 01476 int32 sColStep, 01477 int32 sPlaneStep, 01478 int32 dRowStep, 01479 int32 dColStep, 01480 int32 dPlaneStep) 01481 { 01482 01483 return (gDNGSuite.EqualArea8) (sPtr, 01484 dPtr, 01485 rows, 01486 cols, 01487 planes, 01488 sRowStep, 01489 sColStep, 01490 sPlaneStep, 01491 dRowStep, 01492 dColStep, 01493 dPlaneStep); 01494 01495 } 01496 01497 inline bool DoEqualArea16 (const uint16 *sPtr, 01498 const uint16 *dPtr, 01499 uint32 rows, 01500 uint32 cols, 01501 uint32 planes, 01502 int32 sRowStep, 01503 int32 sColStep, 01504 int32 sPlaneStep, 01505 int32 dRowStep, 01506 int32 dColStep, 01507 int32 dPlaneStep) 01508 { 01509 01510 return (gDNGSuite.EqualArea16) (sPtr, 01511 dPtr, 01512 rows, 01513 cols, 01514 planes, 01515 sRowStep, 01516 sColStep, 01517 sPlaneStep, 01518 dRowStep, 01519 dColStep, 01520 dPlaneStep); 01521 01522 } 01523 01524 inline bool DoEqualArea32 (const uint32 *sPtr, 01525 const uint32 *dPtr, 01526 uint32 rows, 01527 uint32 cols, 01528 uint32 planes, 01529 int32 sRowStep, 01530 int32 sColStep, 01531 int32 sPlaneStep, 01532 int32 dRowStep, 01533 int32 dColStep, 01534 int32 dPlaneStep) 01535 { 01536 01537 return (gDNGSuite.EqualArea32) (sPtr, 01538 dPtr, 01539 rows, 01540 cols, 01541 planes, 01542 sRowStep, 01543 sColStep, 01544 sPlaneStep, 01545 dRowStep, 01546 dColStep, 01547 dPlaneStep); 01548 01549 } 01550 01551 /*****************************************************************************/ 01552 01553 #endif 01554 01555 /*****************************************************************************/ | |||
