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_reference.h00001 /*****************************************************************************/ 00002 // Copyright 2006-2009 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_reference.h#10 $ */ 00010 /* $DateTime: 2009/03/18 15:20:27 $ */ 00011 /* $Change: 548456 $ */ 00012 /* $Author: stern $ */ 00013 00014 /*****************************************************************************/ 00015 00016 #ifndef __dng_reference__ 00017 #define __dng_reference__ 00018 00019 /*****************************************************************************/ 00020 00021 #include "dng_bottlenecks.h" 00022 00023 /*****************************************************************************/ 00024 00025 void RefZeroBytes (void *dPtr, 00026 uint32 count); 00027 00028 void RefCopyBytes (const void *sPtr, 00029 void *dPtr, 00030 uint32 count); 00031 00032 /*****************************************************************************/ 00033 00034 void RefSwapBytes16 (uint16 *dPtr, 00035 uint32 count); 00036 00037 void RefSwapBytes32 (uint32 *dPtr, 00038 uint32 count); 00039 00040 /*****************************************************************************/ 00041 00042 void RefSetArea8 (uint8 *dPtr, 00043 uint8 value, 00044 uint32 rows, 00045 uint32 cols, 00046 uint32 planes, 00047 int32 rowStep, 00048 int32 colStep, 00049 int32 planeStep); 00050 00051 void RefSetArea16 (uint16 *dPtr, 00052 uint16 value, 00053 uint32 rows, 00054 uint32 cols, 00055 uint32 planes, 00056 int32 rowStep, 00057 int32 colStep, 00058 int32 planeStep); 00059 00060 void RefSetArea32 (uint32 *dPtr, 00061 uint32 value, 00062 uint32 rows, 00063 uint32 cols, 00064 uint32 planes, 00065 int32 rowStep, 00066 int32 colStep, 00067 int32 planeStep); 00068 00069 /*****************************************************************************/ 00070 00071 void RefCopyArea8 (const uint8 *sPtr, 00072 uint8 *dPtr, 00073 uint32 rows, 00074 uint32 cols, 00075 uint32 planes, 00076 int32 sRowStep, 00077 int32 sColStep, 00078 int32 sPlaneStep, 00079 int32 dRowStep, 00080 int32 dColStep, 00081 int32 dPlaneStep); 00082 00083 void RefCopyArea16 (const uint16 *sPtr, 00084 uint16 *dPtr, 00085 uint32 rows, 00086 uint32 cols, 00087 uint32 planes, 00088 int32 sRowStep, 00089 int32 sColStep, 00090 int32 sPlaneStep, 00091 int32 dRowStep, 00092 int32 dColStep, 00093 int32 dPlaneStep); 00094 00095 void RefCopyArea32 (const uint32 *sPtr, 00096 uint32 *dPtr, 00097 uint32 rows, 00098 uint32 cols, 00099 uint32 planes, 00100 int32 sRowStep, 00101 int32 sColStep, 00102 int32 sPlaneStep, 00103 int32 dRowStep, 00104 int32 dColStep, 00105 int32 dPlaneStep); 00106 00107 void RefCopyArea8_16 (const uint8 *sPtr, 00108 uint16 *dPtr, 00109 uint32 rows, 00110 uint32 cols, 00111 uint32 planes, 00112 int32 sRowStep, 00113 int32 sColStep, 00114 int32 sPlaneStep, 00115 int32 dRowStep, 00116 int32 dColStep, 00117 int32 dPlaneStep); 00118 00119 void RefCopyArea8_S16 (const uint8 *sPtr, 00120 int16 *dPtr, 00121 uint32 rows, 00122 uint32 cols, 00123 uint32 planes, 00124 int32 sRowStep, 00125 int32 sColStep, 00126 int32 sPlaneStep, 00127 int32 dRowStep, 00128 int32 dColStep, 00129 int32 dPlaneStep); 00130 00131 void RefCopyArea8_32 (const uint8 *sPtr, 00132 uint32 *dPtr, 00133 uint32 rows, 00134 uint32 cols, 00135 uint32 planes, 00136 int32 sRowStep, 00137 int32 sColStep, 00138 int32 sPlaneStep, 00139 int32 dRowStep, 00140 int32 dColStep, 00141 int32 dPlaneStep); 00142 00143 void RefCopyArea16_S16 (const uint16 *sPtr, 00144 int16 *dPtr, 00145 uint32 rows, 00146 uint32 cols, 00147 uint32 planes, 00148 int32 sRowStep, 00149 int32 sColStep, 00150 int32 sPlaneStep, 00151 int32 dRowStep, 00152 int32 dColStep, 00153 int32 dPlaneStep); 00154 00155 void RefCopyArea16_32 (const uint16 *sPtr, 00156 uint32 *dPtr, 00157 uint32 rows, 00158 uint32 cols, 00159 uint32 planes, 00160 int32 sRowStep, 00161 int32 sColStep, 00162 int32 sPlaneStep, 00163 int32 dRowStep, 00164 int32 dColStep, 00165 int32 dPlaneStep); 00166 00167 void RefCopyArea8_R32 (const uint8 *sPtr, 00168 real32 *dPtr, 00169 uint32 rows, 00170 uint32 cols, 00171 uint32 planes, 00172 int32 sRowStep, 00173 int32 sColStep, 00174 int32 sPlaneStep, 00175 int32 dRowStep, 00176 int32 dColStep, 00177 int32 dPlaneStep, 00178 uint32 pixelRange); 00179 00180 void RefCopyArea16_R32 (const uint16 *sPtr, 00181 real32 *dPtr, 00182 uint32 rows, 00183 uint32 cols, 00184 uint32 planes, 00185 int32 sRowStep, 00186 int32 sColStep, 00187 int32 sPlaneStep, 00188 int32 dRowStep, 00189 int32 dColStep, 00190 int32 dPlaneStep, 00191 uint32 pixelRange); 00192 00193 void RefCopyAreaS16_R32 (const int16 *sPtr, 00194 real32 *dPtr, 00195 uint32 rows, 00196 uint32 cols, 00197 uint32 planes, 00198 int32 sRowStep, 00199 int32 sColStep, 00200 int32 sPlaneStep, 00201 int32 dRowStep, 00202 int32 dColStep, 00203 int32 dPlaneStep, 00204 uint32 pixelRange); 00205 00206 void RefCopyAreaR32_8 (const real32 *sPtr, 00207 uint8 *dPtr, 00208 uint32 rows, 00209 uint32 cols, 00210 uint32 planes, 00211 int32 sRowStep, 00212 int32 sColStep, 00213 int32 sPlaneStep, 00214 int32 dRowStep, 00215 int32 dColStep, 00216 int32 dPlaneStep, 00217 uint32 pixelRange); 00218 00219 void RefCopyAreaR32_16 (const real32 *sPtr, 00220 uint16 *dPtr, 00221 uint32 rows, 00222 uint32 cols, 00223 uint32 planes, 00224 int32 sRowStep, 00225 int32 sColStep, 00226 int32 sPlaneStep, 00227 int32 dRowStep, 00228 int32 dColStep, 00229 int32 dPlaneStep, 00230 uint32 pixelRange); 00231 00232 void RefCopyAreaR32_S16 (const real32 *sPtr, 00233 int16 *dPtr, 00234 uint32 rows, 00235 uint32 cols, 00236 uint32 planes, 00237 int32 sRowStep, 00238 int32 sColStep, 00239 int32 sPlaneStep, 00240 int32 dRowStep, 00241 int32 dColStep, 00242 int32 dPlaneStep, 00243 uint32 pixelRange); 00244 00245 /*****************************************************************************/ 00246 00247 void RefRepeatArea8 (const uint8 *sPtr, 00248 uint8 *dPtr, 00249 uint32 rows, 00250 uint32 cols, 00251 uint32 planes, 00252 int32 rowStep, 00253 int32 colStep, 00254 int32 planeStep, 00255 uint32 repeatV, 00256 uint32 repeatH, 00257 uint32 phaseV, 00258 uint32 phaseH); 00259 00260 void RefRepeatArea16 (const uint16 *sPtr, 00261 uint16 *dPtr, 00262 uint32 rows, 00263 uint32 cols, 00264 uint32 planes, 00265 int32 rowStep, 00266 int32 colStep, 00267 int32 planeStep, 00268 uint32 repeatV, 00269 uint32 repeatH, 00270 uint32 phaseV, 00271 uint32 phaseH); 00272 00273 void RefRepeatArea32 (const uint32 *sPtr, 00274 uint32 *dPtr, 00275 uint32 rows, 00276 uint32 cols, 00277 uint32 planes, 00278 int32 rowStep, 00279 int32 colStep, 00280 int32 planeStep, 00281 uint32 repeatV, 00282 uint32 repeatH, 00283 uint32 phaseV, 00284 uint32 phaseH); 00285 00286 /*****************************************************************************/ 00287 00288 void RefShiftRight16 (uint16 *dPtr, 00289 uint32 rows, 00290 uint32 cols, 00291 uint32 planes, 00292 int32 rowStep, 00293 int32 colStep, 00294 int32 planeStep, 00295 uint32 shift); 00296 00297 /*****************************************************************************/ 00298 00299 void RefBilinearRow16 (const uint16 *sPtr, 00300 uint16 *dPtr, 00301 uint32 cols, 00302 uint32 patPhase, 00303 uint32 patCount, 00304 const uint32 * kernCounts, 00305 const int32 * const * kernOffsets, 00306 const uint16 * const * kernWeights, 00307 uint32 sShift); 00308 00309 void RefBilinearRow32 (const real32 *sPtr, 00310 real32 *dPtr, 00311 uint32 cols, 00312 uint32 patPhase, 00313 uint32 patCount, 00314 const uint32 * kernCounts, 00315 const int32 * const * kernOffsets, 00316 const real32 * const * kernWeights, 00317 uint32 sShift); 00318 00319 /*****************************************************************************/ 00320 00321 void RefBaselineABCtoRGB (const real32 *sPtrA, 00322 const real32 *sPtrB, 00323 const real32 *sPtrC, 00324 real32 *dPtrR, 00325 real32 *dPtrG, 00326 real32 *dPtrB, 00327 uint32 count, 00328 const dng_vector &cameraWhite, 00329 const dng_matrix &cameraToRGB); 00330 00331 void RefBaselineABCDtoRGB (const real32 *sPtrA, 00332 const real32 *sPtrB, 00333 const real32 *sPtrC, 00334 const real32 *sPtrD, 00335 real32 *dPtrR, 00336 real32 *dPtrG, 00337 real32 *dPtrB, 00338 uint32 count, 00339 const dng_vector &cameraWhite, 00340 const dng_matrix &cameraToRGB); 00341 00342 /*****************************************************************************/ 00343 00344 void RefBaselineHueSatMap (const real32 *sPtrR, 00345 const real32 *sPtrG, 00346 const real32 *sPtrB, 00347 real32 *dPtrR, 00348 real32 *dPtrG, 00349 real32 *dPtrB, 00350 uint32 count, 00351 const dng_hue_sat_map &lut); 00352 00353 /*****************************************************************************/ 00354 00355 void RefBaselineRGBtoGray (const real32 *sPtrR, 00356 const real32 *sPtrG, 00357 const real32 *sPtrB, 00358 real32 *dPtrG, 00359 uint32 count, 00360 const dng_matrix &matrix); 00361 00362 void RefBaselineRGBtoRGB (const real32 *sPtrR, 00363 const real32 *sPtrG, 00364 const real32 *sPtrB, 00365 real32 *dPtrR, 00366 real32 *dPtrG, 00367 real32 *dPtrB, 00368 uint32 count, 00369 const dng_matrix &matrix); 00370 00371 /*****************************************************************************/ 00372 00373 void RefBaseline1DTable (const real32 *sPtr, 00374 real32 *dPtr, 00375 uint32 count, 00376 const dng_1d_table &table); 00377 00378 /*****************************************************************************/ 00379 00380 void RefBaselineRGBTone (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_1d_table &table); 00388 00389 /*****************************************************************************/ 00390 00391 void RefResampleDown16 (const uint16 *sPtr, 00392 uint16 *dPtr, 00393 uint32 sCount, 00394 int32 sRowStep, 00395 const int16 *wPtr, 00396 uint32 wCount, 00397 uint32 pixelRange); 00398 00399 void RefResampleDown32 (const real32 *sPtr, 00400 real32 *dPtr, 00401 uint32 sCount, 00402 int32 sRowStep, 00403 const real32 *wPtr, 00404 uint32 wCount); 00405 00406 /*****************************************************************************/ 00407 00408 void RefResampleAcross16 (const uint16 *sPtr, 00409 uint16 *dPtr, 00410 uint32 dCount, 00411 const int32 *coord, 00412 const int16 *wPtr, 00413 uint32 wCount, 00414 uint32 wStep, 00415 uint32 pixelRange); 00416 00417 void RefResampleAcross32 (const real32 *sPtr, 00418 real32 *dPtr, 00419 uint32 dCount, 00420 const int32 *coord, 00421 const real32 *wPtr, 00422 uint32 wCount, 00423 uint32 wStep); 00424 00425 /*****************************************************************************/ 00426 00427 bool RefEqualBytes (const void *sPtr, 00428 const void *dPtr, 00429 uint32 count); 00430 00431 bool RefEqualArea8 (const uint8 *sPtr, 00432 const uint8 *dPtr, 00433 uint32 rows, 00434 uint32 cols, 00435 uint32 planes, 00436 int32 sRowStep, 00437 int32 sColStep, 00438 int32 sPlaneStep, 00439 int32 dRowStep, 00440 int32 dColStep, 00441 int32 dPlaneStep); 00442 00443 bool RefEqualArea16 (const uint16 *sPtr, 00444 const uint16 *dPtr, 00445 uint32 rows, 00446 uint32 cols, 00447 uint32 planes, 00448 int32 sRowStep, 00449 int32 sColStep, 00450 int32 sPlaneStep, 00451 int32 dRowStep, 00452 int32 dColStep, 00453 int32 dPlaneStep); 00454 00455 bool RefEqualArea32 (const uint32 *sPtr, 00456 const uint32 *dPtr, 00457 uint32 rows, 00458 uint32 cols, 00459 uint32 planes, 00460 int32 sRowStep, 00461 int32 sColStep, 00462 int32 sPlaneStep, 00463 int32 dRowStep, 00464 int32 dColStep, 00465 int32 dPlaneStep); 00466 00467 /*****************************************************************************/ 00468 00469 void RefVignetteMask16 (uint16 *mPtr, 00470 uint32 rows, 00471 uint32 cols, 00472 int32 rowStep, 00473 int64 offsetH, 00474 int64 offsetV, 00475 int64 stepH, 00476 int64 stepV, 00477 uint32 tBits, 00478 const uint16 *table); 00479 00480 /*****************************************************************************/ 00481 00482 void RefVignette16 (int16 *sPtr, 00483 const uint16 *mPtr, 00484 uint32 rows, 00485 uint32 cols, 00486 uint32 planes, 00487 int32 sRowStep, 00488 int32 sPlaneStep, 00489 int32 mRowStep, 00490 uint32 mBits); 00491 00492 /*****************************************************************************/ 00493 00494 void RefMapArea16 (uint16 *dPtr, 00495 uint32 count0, 00496 uint32 count1, 00497 uint32 count2, 00498 int32 step0, 00499 int32 step1, 00500 int32 step2, 00501 const uint16 *map); 00502 00503 /*****************************************************************************/ 00504 00505 #endif 00506 00507 /*****************************************************************************/ |