/src/skia/third_party/externals/dng_sdk/source/dng_bottlenecks.h
Line | Count | Source (jump to first uncovered line) |
1 | | /*****************************************************************************/ |
2 | | // Copyright 2006-2007 Adobe Systems Incorporated |
3 | | // All Rights Reserved. |
4 | | // |
5 | | // NOTICE: Adobe permits you to use, modify, and distribute this file in |
6 | | // accordance with the terms of the Adobe license agreement accompanying it. |
7 | | /*****************************************************************************/ |
8 | | |
9 | | /* $Id: //mondo/dng_sdk_1_4/dng_sdk/source/dng_bottlenecks.h#1 $ */ |
10 | | /* $DateTime: 2012/05/30 13:28:51 $ */ |
11 | | /* $Change: 832332 $ */ |
12 | | /* $Author: tknoll $ */ |
13 | | |
14 | | /** \file |
15 | | * Indirection mechanism for performance-critical routines that might be replaced |
16 | | * with hand-optimized or hardware-specific implementations. |
17 | | */ |
18 | | |
19 | | /*****************************************************************************/ |
20 | | |
21 | | #ifndef __dng_bottlenecks__ |
22 | | #define __dng_bottlenecks__ |
23 | | |
24 | | /*****************************************************************************/ |
25 | | |
26 | | #include "dng_classes.h" |
27 | | #include "dng_types.h" |
28 | | |
29 | | /*****************************************************************************/ |
30 | | |
31 | | typedef void (ZeroBytesProc) |
32 | | (void *dPtr, |
33 | | uint32 count); |
34 | | |
35 | | typedef void (CopyBytesProc) |
36 | | (const void *sPtr, |
37 | | void *dPtr, |
38 | | uint32 count); |
39 | | |
40 | | /*****************************************************************************/ |
41 | | |
42 | | typedef void (SwapBytes16Proc) |
43 | | (uint16 *dPtr, |
44 | | uint32 count); |
45 | | |
46 | | typedef void (SwapBytes32Proc) |
47 | | (uint32 *dPtr, |
48 | | uint32 count); |
49 | | |
50 | | /*****************************************************************************/ |
51 | | |
52 | | typedef void (SetArea8Proc) |
53 | | (uint8 *dPtr, |
54 | | uint8 value, |
55 | | uint32 rows, |
56 | | uint32 cols, |
57 | | uint32 planes, |
58 | | int32 rowStep, |
59 | | int32 colStep, |
60 | | int32 planeStep); |
61 | | |
62 | | typedef void (SetArea16Proc) |
63 | | (uint16 *dPtr, |
64 | | uint16 value, |
65 | | uint32 rows, |
66 | | uint32 cols, |
67 | | uint32 planes, |
68 | | int32 rowStep, |
69 | | int32 colStep, |
70 | | int32 planeStep); |
71 | | |
72 | | typedef void (SetArea32Proc) |
73 | | (uint32 *dPtr, |
74 | | uint32 value, |
75 | | uint32 rows, |
76 | | uint32 cols, |
77 | | uint32 planes, |
78 | | int32 rowStep, |
79 | | int32 colStep, |
80 | | int32 planeStep); |
81 | | |
82 | | /*****************************************************************************/ |
83 | | |
84 | | typedef void (CopyArea8Proc) |
85 | | (const uint8 *sPtr, |
86 | | uint8 *dPtr, |
87 | | uint32 rows, |
88 | | uint32 cols, |
89 | | uint32 planes, |
90 | | int32 sRowStep, |
91 | | int32 sColStep, |
92 | | int32 sPlaneStep, |
93 | | int32 dRowStep, |
94 | | int32 dColStep, |
95 | | int32 dPlaneStep); |
96 | | |
97 | | typedef void (CopyArea16Proc) |
98 | | (const uint16 *sPtr, |
99 | | uint16 *dPtr, |
100 | | uint32 rows, |
101 | | uint32 cols, |
102 | | uint32 planes, |
103 | | int32 sRowStep, |
104 | | int32 sColStep, |
105 | | int32 sPlaneStep, |
106 | | int32 dRowStep, |
107 | | int32 dColStep, |
108 | | int32 dPlaneStep); |
109 | | |
110 | | typedef void (CopyArea32Proc) |
111 | | (const uint32 *sPtr, |
112 | | uint32 *dPtr, |
113 | | uint32 rows, |
114 | | uint32 cols, |
115 | | uint32 planes, |
116 | | int32 sRowStep, |
117 | | int32 sColStep, |
118 | | int32 sPlaneStep, |
119 | | int32 dRowStep, |
120 | | int32 dColStep, |
121 | | int32 dPlaneStep); |
122 | | |
123 | | typedef void (CopyArea8_16Proc) |
124 | | (const uint8 *sPtr, |
125 | | uint16 *dPtr, |
126 | | uint32 rows, |
127 | | uint32 cols, |
128 | | uint32 planes, |
129 | | int32 sRowStep, |
130 | | int32 sColStep, |
131 | | int32 sPlaneStep, |
132 | | int32 dRowStep, |
133 | | int32 dColStep, |
134 | | int32 dPlaneStep); |
135 | | |
136 | | typedef void (CopyArea8_S16Proc) |
137 | | (const uint8 *sPtr, |
138 | | int16 *dPtr, |
139 | | uint32 rows, |
140 | | uint32 cols, |
141 | | uint32 planes, |
142 | | int32 sRowStep, |
143 | | int32 sColStep, |
144 | | int32 sPlaneStep, |
145 | | int32 dRowStep, |
146 | | int32 dColStep, |
147 | | int32 dPlaneStep); |
148 | | |
149 | | typedef void (CopyArea8_32Proc) |
150 | | (const uint8 *sPtr, |
151 | | uint32 *dPtr, |
152 | | uint32 rows, |
153 | | uint32 cols, |
154 | | uint32 planes, |
155 | | int32 sRowStep, |
156 | | int32 sColStep, |
157 | | int32 sPlaneStep, |
158 | | int32 dRowStep, |
159 | | int32 dColStep, |
160 | | int32 dPlaneStep); |
161 | | |
162 | | typedef void (CopyArea16_S16Proc) |
163 | | (const uint16 *sPtr, |
164 | | int16 *dPtr, |
165 | | uint32 rows, |
166 | | uint32 cols, |
167 | | uint32 planes, |
168 | | int32 sRowStep, |
169 | | int32 sColStep, |
170 | | int32 sPlaneStep, |
171 | | int32 dRowStep, |
172 | | int32 dColStep, |
173 | | int32 dPlaneStep); |
174 | | |
175 | | typedef void (CopyArea16_32Proc) |
176 | | (const uint16 *sPtr, |
177 | | uint32 *dPtr, |
178 | | uint32 rows, |
179 | | uint32 cols, |
180 | | uint32 planes, |
181 | | int32 sRowStep, |
182 | | int32 sColStep, |
183 | | int32 sPlaneStep, |
184 | | int32 dRowStep, |
185 | | int32 dColStep, |
186 | | int32 dPlaneStep); |
187 | | |
188 | | typedef void (CopyArea8_R32Proc) |
189 | | (const uint8 *sPtr, |
190 | | real32 *dPtr, |
191 | | uint32 rows, |
192 | | uint32 cols, |
193 | | uint32 planes, |
194 | | int32 sRowStep, |
195 | | int32 sColStep, |
196 | | int32 sPlaneStep, |
197 | | int32 dRowStep, |
198 | | int32 dColStep, |
199 | | int32 dPlaneStep, |
200 | | uint32 pixelRange); |
201 | | |
202 | | typedef void (CopyArea16_R32Proc) |
203 | | (const uint16 *sPtr, |
204 | | real32 *dPtr, |
205 | | uint32 rows, |
206 | | uint32 cols, |
207 | | uint32 planes, |
208 | | int32 sRowStep, |
209 | | int32 sColStep, |
210 | | int32 sPlaneStep, |
211 | | int32 dRowStep, |
212 | | int32 dColStep, |
213 | | int32 dPlaneStep, |
214 | | uint32 pixelRange); |
215 | | |
216 | | typedef void (CopyAreaS16_R32Proc) |
217 | | (const int16 *sPtr, |
218 | | real32 *dPtr, |
219 | | uint32 rows, |
220 | | uint32 cols, |
221 | | uint32 planes, |
222 | | int32 sRowStep, |
223 | | int32 sColStep, |
224 | | int32 sPlaneStep, |
225 | | int32 dRowStep, |
226 | | int32 dColStep, |
227 | | int32 dPlaneStep, |
228 | | uint32 pixelRange); |
229 | | |
230 | | typedef void (CopyAreaR32_8Proc) |
231 | | (const real32 *sPtr, |
232 | | uint8 *dPtr, |
233 | | uint32 rows, |
234 | | uint32 cols, |
235 | | uint32 planes, |
236 | | int32 sRowStep, |
237 | | int32 sColStep, |
238 | | int32 sPlaneStep, |
239 | | int32 dRowStep, |
240 | | int32 dColStep, |
241 | | int32 dPlaneStep, |
242 | | uint32 pixelRange); |
243 | | |
244 | | typedef void (CopyAreaR32_16Proc) |
245 | | (const real32 *sPtr, |
246 | | uint16 *dPtr, |
247 | | uint32 rows, |
248 | | uint32 cols, |
249 | | uint32 planes, |
250 | | int32 sRowStep, |
251 | | int32 sColStep, |
252 | | int32 sPlaneStep, |
253 | | int32 dRowStep, |
254 | | int32 dColStep, |
255 | | int32 dPlaneStep, |
256 | | uint32 pixelRange); |
257 | | |
258 | | typedef void (CopyAreaR32_S16Proc) |
259 | | (const real32 *sPtr, |
260 | | int16 *dPtr, |
261 | | uint32 rows, |
262 | | uint32 cols, |
263 | | uint32 planes, |
264 | | int32 sRowStep, |
265 | | int32 sColStep, |
266 | | int32 sPlaneStep, |
267 | | int32 dRowStep, |
268 | | int32 dColStep, |
269 | | int32 dPlaneStep, |
270 | | uint32 pixelRange); |
271 | | |
272 | | /*****************************************************************************/ |
273 | | |
274 | | typedef void (RepeatArea8Proc) |
275 | | (const uint8 *sPtr, |
276 | | uint8 *dPtr, |
277 | | uint32 rows, |
278 | | uint32 cols, |
279 | | uint32 planes, |
280 | | int32 rowStep, |
281 | | int32 colStep, |
282 | | int32 planeStep, |
283 | | uint32 repeatV, |
284 | | uint32 repeatH, |
285 | | uint32 phaseV, |
286 | | uint32 phaseH); |
287 | | |
288 | | typedef void (RepeatArea16Proc) |
289 | | (const uint16 *sPtr, |
290 | | uint16 *dPtr, |
291 | | uint32 rows, |
292 | | uint32 cols, |
293 | | uint32 planes, |
294 | | int32 rowStep, |
295 | | int32 colStep, |
296 | | int32 planeStep, |
297 | | uint32 repeatV, |
298 | | uint32 repeatH, |
299 | | uint32 phaseV, |
300 | | uint32 phaseH); |
301 | | |
302 | | typedef void (RepeatArea32Proc) |
303 | | (const uint32 *sPtr, |
304 | | uint32 *dPtr, |
305 | | uint32 rows, |
306 | | uint32 cols, |
307 | | uint32 planes, |
308 | | int32 rowStep, |
309 | | int32 colStep, |
310 | | int32 planeStep, |
311 | | uint32 repeatV, |
312 | | uint32 repeatH, |
313 | | uint32 phaseV, |
314 | | uint32 phaseH); |
315 | | |
316 | | /*****************************************************************************/ |
317 | | |
318 | | typedef void (ShiftRight16Proc) |
319 | | (uint16 *dPtr, |
320 | | uint32 rows, |
321 | | uint32 cols, |
322 | | uint32 planes, |
323 | | int32 rowStep, |
324 | | int32 colStep, |
325 | | int32 planeStep, |
326 | | uint32 shift); |
327 | | |
328 | | /*****************************************************************************/ |
329 | | |
330 | | typedef void (BilinearRow16Proc) |
331 | | (const uint16 *sPtr, |
332 | | uint16 *dPtr, |
333 | | uint32 cols, |
334 | | uint32 patPhase, |
335 | | uint32 patCount, |
336 | | const uint32 * kernCounts, |
337 | | const int32 * const * kernOffsets, |
338 | | const uint16 * const * kernWeights, |
339 | | uint32 sShift); |
340 | | |
341 | | typedef void (BilinearRow32Proc) |
342 | | (const real32 *sPtr, |
343 | | real32 *dPtr, |
344 | | uint32 cols, |
345 | | uint32 patPhase, |
346 | | uint32 patCount, |
347 | | const uint32 * kernCounts, |
348 | | const int32 * const * kernOffsets, |
349 | | const real32 * const * kernWeights, |
350 | | uint32 sShift); |
351 | | |
352 | | /*****************************************************************************/ |
353 | | |
354 | | typedef void (BaselineABCtoRGBProc) |
355 | | (const real32 *sPtrA, |
356 | | const real32 *sPtrB, |
357 | | const real32 *sPtrC, |
358 | | real32 *dPtrR, |
359 | | real32 *dPtrG, |
360 | | real32 *dPtrB, |
361 | | uint32 count, |
362 | | const dng_vector &cameraWhite, |
363 | | const dng_matrix &cameraToRGB); |
364 | | |
365 | | typedef void (BaselineABCDtoRGBProc) |
366 | | (const real32 *sPtrA, |
367 | | const real32 *sPtrB, |
368 | | const real32 *sPtrC, |
369 | | const real32 *sPtrD, |
370 | | real32 *dPtrR, |
371 | | real32 *dPtrG, |
372 | | real32 *dPtrB, |
373 | | uint32 count, |
374 | | const dng_vector &cameraWhite, |
375 | | const dng_matrix &cameraToRGB); |
376 | | |
377 | | /*****************************************************************************/ |
378 | | |
379 | | typedef void (BaselineHueSatMapProc) |
380 | | (const real32 *sPtrR, |
381 | | const real32 *sPtrG, |
382 | | const real32 *sPtrB, |
383 | | real32 *dPtrR, |
384 | | real32 *dPtrG, |
385 | | real32 *dPtrB, |
386 | | uint32 count, |
387 | | const dng_hue_sat_map &lut, |
388 | | const dng_1d_table *encodeTable, |
389 | | const dng_1d_table *decodeTable); |
390 | | |
391 | | /*****************************************************************************/ |
392 | | |
393 | | typedef void (BaselineGrayToRGBProc) |
394 | | (const real32 *sPtrR, |
395 | | const real32 *sPtrG, |
396 | | const real32 *sPtrB, |
397 | | real32 *dPtrG, |
398 | | uint32 count, |
399 | | const dng_matrix &matrix); |
400 | | |
401 | | typedef void (BaselineRGBtoRGBProc) |
402 | | (const real32 *sPtrR, |
403 | | const real32 *sPtrG, |
404 | | const real32 *sPtrB, |
405 | | real32 *dPtrR, |
406 | | real32 *dPtrG, |
407 | | real32 *dPtrB, |
408 | | uint32 count, |
409 | | const dng_matrix &matrix); |
410 | | |
411 | | /*****************************************************************************/ |
412 | | |
413 | | typedef void (Baseline1DTableProc) |
414 | | (const real32 *sPtr, |
415 | | real32 *dPtr, |
416 | | uint32 count, |
417 | | const dng_1d_table &table); |
418 | | |
419 | | /*****************************************************************************/ |
420 | | |
421 | | typedef void (BaselineRGBToneProc) |
422 | | (const real32 *sPtrR, |
423 | | const real32 *sPtrG, |
424 | | const real32 *sPtrB, |
425 | | real32 *dPtrR, |
426 | | real32 *dPtrG, |
427 | | real32 *dPtrB, |
428 | | uint32 count, |
429 | | const dng_1d_table &table); |
430 | | |
431 | | /*****************************************************************************/ |
432 | | |
433 | | typedef void (ResampleDown16Proc) |
434 | | (const uint16 *sPtr, |
435 | | uint16 *dPtr, |
436 | | uint32 sCount, |
437 | | int32 sRowStep, |
438 | | const int16 *wPtr, |
439 | | uint32 wCount, |
440 | | uint32 pixelRange); |
441 | | |
442 | | typedef void (ResampleDown32Proc) |
443 | | (const real32 *sPtr, |
444 | | real32 *dPtr, |
445 | | uint32 sCount, |
446 | | int32 sRowStep, |
447 | | const real32 *wPtr, |
448 | | uint32 wCount); |
449 | | |
450 | | /*****************************************************************************/ |
451 | | |
452 | | typedef void (ResampleAcross16Proc) |
453 | | (const uint16 *sPtr, |
454 | | uint16 *dPtr, |
455 | | uint32 dCount, |
456 | | const int32 *coord, |
457 | | const int16 *wPtr, |
458 | | uint32 wCount, |
459 | | uint32 wStep, |
460 | | uint32 pixelRange); |
461 | | |
462 | | typedef void (ResampleAcross32Proc) |
463 | | (const real32 *sPtr, |
464 | | real32 *dPtr, |
465 | | uint32 dCount, |
466 | | const int32 *coord, |
467 | | const real32 *wPtr, |
468 | | uint32 wCount, |
469 | | uint32 wStep); |
470 | | |
471 | | /*****************************************************************************/ |
472 | | |
473 | | typedef bool (EqualBytesProc) |
474 | | (const void *sPtr, |
475 | | const void *dPtr, |
476 | | uint32 count); |
477 | | |
478 | | typedef bool (EqualArea8Proc) |
479 | | (const uint8 *sPtr, |
480 | | const uint8 *dPtr, |
481 | | uint32 rows, |
482 | | uint32 cols, |
483 | | uint32 planes, |
484 | | int32 sRowStep, |
485 | | int32 sColStep, |
486 | | int32 sPlaneStep, |
487 | | int32 dRowStep, |
488 | | int32 dColStep, |
489 | | int32 dPlaneStep); |
490 | | |
491 | | typedef bool (EqualArea16Proc) |
492 | | (const uint16 *sPtr, |
493 | | const uint16 *dPtr, |
494 | | uint32 rows, |
495 | | uint32 cols, |
496 | | uint32 planes, |
497 | | int32 sRowStep, |
498 | | int32 sColStep, |
499 | | int32 sPlaneStep, |
500 | | int32 dRowStep, |
501 | | int32 dColStep, |
502 | | int32 dPlaneStep); |
503 | | |
504 | | typedef bool (EqualArea32Proc) |
505 | | (const uint32 *sPtr, |
506 | | const uint32 *dPtr, |
507 | | uint32 rows, |
508 | | uint32 cols, |
509 | | uint32 planes, |
510 | | int32 sRowStep, |
511 | | int32 sColStep, |
512 | | int32 sPlaneStep, |
513 | | int32 dRowStep, |
514 | | int32 dColStep, |
515 | | int32 dPlaneStep); |
516 | | |
517 | | /*****************************************************************************/ |
518 | | |
519 | | typedef void (VignetteMask16Proc) |
520 | | (uint16 *mPtr, |
521 | | uint32 rows, |
522 | | uint32 cols, |
523 | | int32 rowStep, |
524 | | int64 offsetH, |
525 | | int64 offsetV, |
526 | | int64 stepH, |
527 | | int64 stepV, |
528 | | uint32 tBits, |
529 | | const uint16 *table); |
530 | | |
531 | | typedef void (Vignette16Proc) |
532 | | (int16 *sPtr, |
533 | | const uint16 *mPtr, |
534 | | uint32 rows, |
535 | | uint32 cols, |
536 | | uint32 planes, |
537 | | int32 sRowStep, |
538 | | int32 sPlaneStep, |
539 | | int32 mRowStep, |
540 | | uint32 mBits); |
541 | | |
542 | | /*****************************************************************************/ |
543 | | |
544 | | typedef void (Vignette32Proc) |
545 | | (real32 *sPtr, |
546 | | const uint16 *mPtr, |
547 | | uint32 rows, |
548 | | uint32 cols, |
549 | | uint32 planes, |
550 | | int32 sRowStep, |
551 | | int32 sPlaneStep, |
552 | | int32 mRowStep, |
553 | | uint32 mBits); |
554 | | |
555 | | /*****************************************************************************/ |
556 | | |
557 | | typedef void (MapArea16Proc) |
558 | | (uint16 *dPtr, |
559 | | uint32 count0, |
560 | | uint32 count1, |
561 | | uint32 count2, |
562 | | int32 step0, |
563 | | int32 step1, |
564 | | int32 step2, |
565 | | const uint16 *map); |
566 | | |
567 | | /*****************************************************************************/ |
568 | | |
569 | | struct dng_suite |
570 | | { |
571 | | ZeroBytesProc *ZeroBytes; |
572 | | CopyBytesProc *CopyBytes; |
573 | | SwapBytes16Proc *SwapBytes16; |
574 | | SwapBytes32Proc *SwapBytes32; |
575 | | SetArea8Proc *SetArea8; |
576 | | SetArea16Proc *SetArea16; |
577 | | SetArea32Proc *SetArea32; |
578 | | CopyArea8Proc *CopyArea8; |
579 | | CopyArea16Proc *CopyArea16; |
580 | | CopyArea32Proc *CopyArea32; |
581 | | CopyArea8_16Proc *CopyArea8_16; |
582 | | CopyArea8_S16Proc *CopyArea8_S16; |
583 | | CopyArea8_32Proc *CopyArea8_32; |
584 | | CopyArea16_S16Proc *CopyArea16_S16; |
585 | | CopyArea16_32Proc *CopyArea16_32; |
586 | | CopyArea8_R32Proc *CopyArea8_R32; |
587 | | CopyArea16_R32Proc *CopyArea16_R32; |
588 | | CopyAreaS16_R32Proc *CopyAreaS16_R32; |
589 | | CopyAreaR32_8Proc *CopyAreaR32_8; |
590 | | CopyAreaR32_16Proc *CopyAreaR32_16; |
591 | | CopyAreaR32_S16Proc *CopyAreaR32_S16; |
592 | | RepeatArea8Proc *RepeatArea8; |
593 | | RepeatArea16Proc *RepeatArea16; |
594 | | RepeatArea32Proc *RepeatArea32; |
595 | | ShiftRight16Proc *ShiftRight16; |
596 | | BilinearRow16Proc *BilinearRow16; |
597 | | BilinearRow32Proc *BilinearRow32; |
598 | | BaselineABCtoRGBProc *BaselineABCtoRGB; |
599 | | BaselineABCDtoRGBProc *BaselineABCDtoRGB; |
600 | | BaselineHueSatMapProc *BaselineHueSatMap; |
601 | | BaselineGrayToRGBProc *BaselineRGBtoGray; |
602 | | BaselineRGBtoRGBProc *BaselineRGBtoRGB; |
603 | | Baseline1DTableProc *Baseline1DTable; |
604 | | BaselineRGBToneProc *BaselineRGBTone; |
605 | | ResampleDown16Proc *ResampleDown16; |
606 | | ResampleDown32Proc *ResampleDown32; |
607 | | ResampleAcross16Proc *ResampleAcross16; |
608 | | ResampleAcross32Proc *ResampleAcross32; |
609 | | EqualBytesProc *EqualBytes; |
610 | | EqualArea8Proc *EqualArea8; |
611 | | EqualArea16Proc *EqualArea16; |
612 | | EqualArea32Proc *EqualArea32; |
613 | | VignetteMask16Proc *VignetteMask16; |
614 | | Vignette16Proc *Vignette16; |
615 | | Vignette32Proc *Vignette32; |
616 | | MapArea16Proc *MapArea16; |
617 | | }; |
618 | | |
619 | | /*****************************************************************************/ |
620 | | |
621 | | extern dng_suite gDNGSuite; |
622 | | |
623 | | /*****************************************************************************/ |
624 | | |
625 | | inline void DoZeroBytes (void *dPtr, |
626 | | uint32 count) |
627 | 0 | { |
628 | | |
629 | 0 | (gDNGSuite.ZeroBytes) (dPtr, |
630 | 0 | count); |
631 | | |
632 | 0 | } |
633 | | |
634 | | inline void DoCopyBytes (const void *sPtr, |
635 | | void *dPtr, |
636 | | uint32 count) |
637 | 8.63M | { |
638 | | |
639 | 8.63M | (gDNGSuite.CopyBytes) (sPtr, |
640 | 8.63M | dPtr, |
641 | 8.63M | count); |
642 | | |
643 | 8.63M | } |
644 | | |
645 | | /*****************************************************************************/ |
646 | | |
647 | | inline void DoSwapBytes16 (uint16 *dPtr, |
648 | | uint32 count) |
649 | 0 | { |
650 | | |
651 | 0 | (gDNGSuite.SwapBytes16) (dPtr, |
652 | 0 | count); |
653 | | |
654 | 0 | } |
655 | | |
656 | | inline void DoSwapBytes32 (uint32 *dPtr, |
657 | | uint32 count) |
658 | 0 | { |
659 | | |
660 | 0 | (gDNGSuite.SwapBytes32) (dPtr, |
661 | 0 | count); |
662 | | |
663 | 0 | } |
664 | | |
665 | | /*****************************************************************************/ |
666 | | |
667 | | inline void DoSetArea8 (uint8 *dPtr, |
668 | | uint8 value, |
669 | | uint32 rows, |
670 | | uint32 cols, |
671 | | uint32 planes, |
672 | | int32 rowStep, |
673 | | int32 colStep, |
674 | | int32 planeStep) |
675 | 0 | { |
676 | | |
677 | 0 | (gDNGSuite.SetArea8) (dPtr, |
678 | 0 | value, |
679 | 0 | rows, |
680 | 0 | cols, |
681 | 0 | planes, |
682 | 0 | rowStep, |
683 | 0 | colStep, |
684 | 0 | planeStep); |
685 | | |
686 | 0 | } |
687 | | |
688 | | inline void DoSetArea16 (uint16 *dPtr, |
689 | | uint16 value, |
690 | | uint32 rows, |
691 | | uint32 cols, |
692 | | uint32 planes, |
693 | | int32 rowStep, |
694 | | int32 colStep, |
695 | | int32 planeStep) |
696 | 0 | { |
697 | | |
698 | 0 | (gDNGSuite.SetArea16) (dPtr, |
699 | 0 | value, |
700 | 0 | rows, |
701 | 0 | cols, |
702 | 0 | planes, |
703 | 0 | rowStep, |
704 | 0 | colStep, |
705 | 0 | planeStep); |
706 | | |
707 | 0 | } |
708 | | |
709 | | inline void DoSetArea32 (uint32 *dPtr, |
710 | | uint32 value, |
711 | | uint32 rows, |
712 | | uint32 cols, |
713 | | uint32 planes, |
714 | | int32 rowStep, |
715 | | int32 colStep, |
716 | | int32 planeStep) |
717 | 0 | { |
718 | | |
719 | 0 | (gDNGSuite.SetArea32) (dPtr, |
720 | 0 | value, |
721 | 0 | rows, |
722 | 0 | cols, |
723 | 0 | planes, |
724 | 0 | rowStep, |
725 | 0 | colStep, |
726 | 0 | planeStep); |
727 | | |
728 | 0 | } |
729 | | |
730 | | /*****************************************************************************/ |
731 | | |
732 | | inline void DoCopyArea8 (const uint8 *sPtr, |
733 | | uint8 *dPtr, |
734 | | uint32 rows, |
735 | | uint32 cols, |
736 | | uint32 planes, |
737 | | int32 sRowStep, |
738 | | int32 sColStep, |
739 | | int32 sPlaneStep, |
740 | | int32 dRowStep, |
741 | | int32 dColStep, |
742 | | int32 dPlaneStep) |
743 | 0 | { |
744 | | |
745 | 0 | (gDNGSuite.CopyArea8) (sPtr, |
746 | 0 | dPtr, |
747 | 0 | rows, |
748 | 0 | cols, |
749 | 0 | planes, |
750 | 0 | sRowStep, |
751 | 0 | sColStep, |
752 | 0 | sPlaneStep, |
753 | 0 | dRowStep, |
754 | 0 | dColStep, |
755 | 0 | dPlaneStep); |
756 | | |
757 | 0 | } |
758 | | |
759 | | inline void DoCopyArea16 (const uint16 *sPtr, |
760 | | uint16 *dPtr, |
761 | | uint32 rows, |
762 | | uint32 cols, |
763 | | uint32 planes, |
764 | | int32 sRowStep, |
765 | | int32 sColStep, |
766 | | int32 sPlaneStep, |
767 | | int32 dRowStep, |
768 | | int32 dColStep, |
769 | | int32 dPlaneStep) |
770 | 0 | { |
771 | | |
772 | 0 | (gDNGSuite.CopyArea16) (sPtr, |
773 | 0 | dPtr, |
774 | 0 | rows, |
775 | 0 | cols, |
776 | 0 | planes, |
777 | 0 | sRowStep, |
778 | 0 | sColStep, |
779 | 0 | sPlaneStep, |
780 | 0 | dRowStep, |
781 | 0 | dColStep, |
782 | 0 | dPlaneStep); |
783 | | |
784 | 0 | } |
785 | | |
786 | | inline void DoCopyArea32 (const uint32 *sPtr, |
787 | | uint32 *dPtr, |
788 | | uint32 rows, |
789 | | uint32 cols, |
790 | | uint32 planes, |
791 | | int32 sRowStep, |
792 | | int32 sColStep, |
793 | | int32 sPlaneStep, |
794 | | int32 dRowStep, |
795 | | int32 dColStep, |
796 | | int32 dPlaneStep) |
797 | 0 | { |
798 | | |
799 | 0 | (gDNGSuite.CopyArea32) (sPtr, |
800 | 0 | dPtr, |
801 | 0 | rows, |
802 | 0 | cols, |
803 | 0 | planes, |
804 | 0 | sRowStep, |
805 | 0 | sColStep, |
806 | 0 | sPlaneStep, |
807 | 0 | dRowStep, |
808 | 0 | dColStep, |
809 | 0 | dPlaneStep); |
810 | | |
811 | 0 | } |
812 | | |
813 | | inline void DoCopyArea8_16 (const uint8 *sPtr, |
814 | | uint16 *dPtr, |
815 | | uint32 rows, |
816 | | uint32 cols, |
817 | | uint32 planes, |
818 | | int32 sRowStep, |
819 | | int32 sColStep, |
820 | | int32 sPlaneStep, |
821 | | int32 dRowStep, |
822 | | int32 dColStep, |
823 | | int32 dPlaneStep) |
824 | 0 | { |
825 | | |
826 | 0 | (gDNGSuite.CopyArea8_16) (sPtr, |
827 | 0 | dPtr, |
828 | 0 | rows, |
829 | 0 | cols, |
830 | 0 | planes, |
831 | 0 | sRowStep, |
832 | 0 | sColStep, |
833 | 0 | sPlaneStep, |
834 | 0 | dRowStep, |
835 | 0 | dColStep, |
836 | 0 | dPlaneStep); |
837 | | |
838 | 0 | } |
839 | | |
840 | | inline void DoCopyArea8_S16 (const uint8 *sPtr, |
841 | | int16 *dPtr, |
842 | | uint32 rows, |
843 | | uint32 cols, |
844 | | uint32 planes, |
845 | | int32 sRowStep, |
846 | | int32 sColStep, |
847 | | int32 sPlaneStep, |
848 | | int32 dRowStep, |
849 | | int32 dColStep, |
850 | | int32 dPlaneStep) |
851 | 0 | { |
852 | | |
853 | 0 | (gDNGSuite.CopyArea8_S16) (sPtr, |
854 | 0 | dPtr, |
855 | 0 | rows, |
856 | 0 | cols, |
857 | 0 | planes, |
858 | 0 | sRowStep, |
859 | 0 | sColStep, |
860 | 0 | sPlaneStep, |
861 | 0 | dRowStep, |
862 | 0 | dColStep, |
863 | 0 | dPlaneStep); |
864 | | |
865 | 0 | } |
866 | | |
867 | | inline void DoCopyArea8_32 (const uint8 *sPtr, |
868 | | uint32 *dPtr, |
869 | | uint32 rows, |
870 | | uint32 cols, |
871 | | uint32 planes, |
872 | | int32 sRowStep, |
873 | | int32 sColStep, |
874 | | int32 sPlaneStep, |
875 | | int32 dRowStep, |
876 | | int32 dColStep, |
877 | | int32 dPlaneStep) |
878 | 0 | { |
879 | | |
880 | 0 | (gDNGSuite.CopyArea8_32) (sPtr, |
881 | 0 | dPtr, |
882 | 0 | rows, |
883 | 0 | cols, |
884 | 0 | planes, |
885 | 0 | sRowStep, |
886 | 0 | sColStep, |
887 | 0 | sPlaneStep, |
888 | 0 | dRowStep, |
889 | 0 | dColStep, |
890 | 0 | dPlaneStep); |
891 | | |
892 | 0 | } |
893 | | |
894 | | inline void DoCopyArea16_S16 (const uint16 *sPtr, |
895 | | int16 *dPtr, |
896 | | uint32 rows, |
897 | | uint32 cols, |
898 | | uint32 planes, |
899 | | int32 sRowStep, |
900 | | int32 sColStep, |
901 | | int32 sPlaneStep, |
902 | | int32 dRowStep, |
903 | | int32 dColStep, |
904 | | int32 dPlaneStep) |
905 | 0 | { |
906 | | |
907 | 0 | (gDNGSuite.CopyArea16_S16) (sPtr, |
908 | 0 | dPtr, |
909 | 0 | rows, |
910 | 0 | cols, |
911 | 0 | planes, |
912 | 0 | sRowStep, |
913 | 0 | sColStep, |
914 | 0 | sPlaneStep, |
915 | 0 | dRowStep, |
916 | 0 | dColStep, |
917 | 0 | dPlaneStep); |
918 | |
|
919 | 0 | } |
920 | | |
921 | | inline void DoCopyArea16_32 (const uint16 *sPtr, |
922 | | uint32 *dPtr, |
923 | | uint32 rows, |
924 | | uint32 cols, |
925 | | uint32 planes, |
926 | | int32 sRowStep, |
927 | | int32 sColStep, |
928 | | int32 sPlaneStep, |
929 | | int32 dRowStep, |
930 | | int32 dColStep, |
931 | | int32 dPlaneStep) |
932 | 0 | { |
933 | | |
934 | 0 | (gDNGSuite.CopyArea16_32) (sPtr, |
935 | 0 | dPtr, |
936 | 0 | rows, |
937 | 0 | cols, |
938 | 0 | planes, |
939 | 0 | sRowStep, |
940 | 0 | sColStep, |
941 | 0 | sPlaneStep, |
942 | 0 | dRowStep, |
943 | 0 | dColStep, |
944 | 0 | dPlaneStep); |
945 | |
|
946 | 0 | } |
947 | | |
948 | | inline void DoCopyArea8_R32 (const uint8 *sPtr, |
949 | | real32 *dPtr, |
950 | | uint32 rows, |
951 | | uint32 cols, |
952 | | uint32 planes, |
953 | | int32 sRowStep, |
954 | | int32 sColStep, |
955 | | int32 sPlaneStep, |
956 | | int32 dRowStep, |
957 | | int32 dColStep, |
958 | | int32 dPlaneStep, |
959 | | uint32 pixelRange) |
960 | 0 | { |
961 | | |
962 | 0 | (gDNGSuite.CopyArea8_R32) (sPtr, |
963 | 0 | dPtr, |
964 | 0 | rows, |
965 | 0 | cols, |
966 | 0 | planes, |
967 | 0 | sRowStep, |
968 | 0 | sColStep, |
969 | 0 | sPlaneStep, |
970 | 0 | dRowStep, |
971 | 0 | dColStep, |
972 | 0 | dPlaneStep, |
973 | 0 | pixelRange); |
974 | |
|
975 | 0 | } |
976 | | |
977 | | inline void DoCopyArea16_R32 (const uint16 *sPtr, |
978 | | real32 *dPtr, |
979 | | uint32 rows, |
980 | | uint32 cols, |
981 | | uint32 planes, |
982 | | int32 sRowStep, |
983 | | int32 sColStep, |
984 | | int32 sPlaneStep, |
985 | | int32 dRowStep, |
986 | | int32 dColStep, |
987 | | int32 dPlaneStep, |
988 | | uint32 pixelRange) |
989 | 0 | { |
990 | | |
991 | 0 | (gDNGSuite.CopyArea16_R32) (sPtr, |
992 | 0 | dPtr, |
993 | 0 | rows, |
994 | 0 | cols, |
995 | 0 | planes, |
996 | 0 | sRowStep, |
997 | 0 | sColStep, |
998 | 0 | sPlaneStep, |
999 | 0 | dRowStep, |
1000 | 0 | dColStep, |
1001 | 0 | dPlaneStep, |
1002 | 0 | pixelRange); |
1003 | |
|
1004 | 0 | } |
1005 | | |
1006 | | inline void DoCopyAreaS16_R32 (const int16 *sPtr, |
1007 | | real32 *dPtr, |
1008 | | uint32 rows, |
1009 | | uint32 cols, |
1010 | | uint32 planes, |
1011 | | int32 sRowStep, |
1012 | | int32 sColStep, |
1013 | | int32 sPlaneStep, |
1014 | | int32 dRowStep, |
1015 | | int32 dColStep, |
1016 | | int32 dPlaneStep, |
1017 | | uint32 pixelRange) |
1018 | 0 | { |
1019 | | |
1020 | 0 | (gDNGSuite.CopyAreaS16_R32) (sPtr, |
1021 | 0 | dPtr, |
1022 | 0 | rows, |
1023 | 0 | cols, |
1024 | 0 | planes, |
1025 | 0 | sRowStep, |
1026 | 0 | sColStep, |
1027 | 0 | sPlaneStep, |
1028 | 0 | dRowStep, |
1029 | 0 | dColStep, |
1030 | 0 | dPlaneStep, |
1031 | 0 | pixelRange); |
1032 | |
|
1033 | 0 | } |
1034 | | |
1035 | | inline void DoCopyAreaR32_8 (const real32 *sPtr, |
1036 | | uint8 *dPtr, |
1037 | | uint32 rows, |
1038 | | uint32 cols, |
1039 | | uint32 planes, |
1040 | | int32 sRowStep, |
1041 | | int32 sColStep, |
1042 | | int32 sPlaneStep, |
1043 | | int32 dRowStep, |
1044 | | int32 dColStep, |
1045 | | int32 dPlaneStep, |
1046 | | uint32 pixelRange) |
1047 | 0 | { |
1048 | | |
1049 | 0 | (gDNGSuite.CopyAreaR32_8) (sPtr, |
1050 | 0 | dPtr, |
1051 | 0 | rows, |
1052 | 0 | cols, |
1053 | 0 | planes, |
1054 | 0 | sRowStep, |
1055 | 0 | sColStep, |
1056 | 0 | sPlaneStep, |
1057 | 0 | dRowStep, |
1058 | 0 | dColStep, |
1059 | 0 | dPlaneStep, |
1060 | 0 | pixelRange); |
1061 | |
|
1062 | 0 | } |
1063 | | |
1064 | | inline void DoCopyAreaR32_16 (const real32 *sPtr, |
1065 | | uint16 *dPtr, |
1066 | | uint32 rows, |
1067 | | uint32 cols, |
1068 | | uint32 planes, |
1069 | | int32 sRowStep, |
1070 | | int32 sColStep, |
1071 | | int32 sPlaneStep, |
1072 | | int32 dRowStep, |
1073 | | int32 dColStep, |
1074 | | int32 dPlaneStep, |
1075 | | uint32 pixelRange) |
1076 | 0 | { |
1077 | | |
1078 | 0 | (gDNGSuite.CopyAreaR32_16) (sPtr, |
1079 | 0 | dPtr, |
1080 | 0 | rows, |
1081 | 0 | cols, |
1082 | 0 | planes, |
1083 | 0 | sRowStep, |
1084 | 0 | sColStep, |
1085 | 0 | sPlaneStep, |
1086 | 0 | dRowStep, |
1087 | 0 | dColStep, |
1088 | 0 | dPlaneStep, |
1089 | 0 | pixelRange); |
1090 | |
|
1091 | 0 | } |
1092 | | |
1093 | | inline void DoCopyAreaR32_S16 (const real32 *sPtr, |
1094 | | int16 *dPtr, |
1095 | | uint32 rows, |
1096 | | uint32 cols, |
1097 | | uint32 planes, |
1098 | | int32 sRowStep, |
1099 | | int32 sColStep, |
1100 | | int32 sPlaneStep, |
1101 | | int32 dRowStep, |
1102 | | int32 dColStep, |
1103 | | int32 dPlaneStep, |
1104 | | uint32 pixelRange) |
1105 | 0 | { |
1106 | | |
1107 | 0 | (gDNGSuite.CopyAreaR32_S16) (sPtr, |
1108 | 0 | dPtr, |
1109 | 0 | rows, |
1110 | 0 | cols, |
1111 | 0 | planes, |
1112 | 0 | sRowStep, |
1113 | 0 | sColStep, |
1114 | 0 | sPlaneStep, |
1115 | 0 | dRowStep, |
1116 | 0 | dColStep, |
1117 | 0 | dPlaneStep, |
1118 | 0 | pixelRange); |
1119 | |
|
1120 | 0 | } |
1121 | | |
1122 | | /*****************************************************************************/ |
1123 | | |
1124 | | inline void DoRepeatArea8 (const uint8 *sPtr, |
1125 | | uint8 *dPtr, |
1126 | | uint32 rows, |
1127 | | uint32 cols, |
1128 | | uint32 planes, |
1129 | | int32 rowStep, |
1130 | | int32 colStep, |
1131 | | int32 planeStep, |
1132 | | uint32 repeatV, |
1133 | | uint32 repeatH, |
1134 | | uint32 phaseV, |
1135 | | uint32 phaseH) |
1136 | 0 | { |
1137 | | |
1138 | 0 | (gDNGSuite.RepeatArea8) (sPtr, |
1139 | 0 | dPtr, |
1140 | 0 | rows, |
1141 | 0 | cols, |
1142 | 0 | planes, |
1143 | 0 | rowStep, |
1144 | 0 | colStep, |
1145 | 0 | planeStep, |
1146 | 0 | repeatV, |
1147 | 0 | repeatH, |
1148 | 0 | phaseV, |
1149 | 0 | phaseH); |
1150 | |
|
1151 | 0 | } |
1152 | | |
1153 | | inline void DoRepeatArea16 (const uint16 *sPtr, |
1154 | | uint16 *dPtr, |
1155 | | uint32 rows, |
1156 | | uint32 cols, |
1157 | | uint32 planes, |
1158 | | int32 rowStep, |
1159 | | int32 colStep, |
1160 | | int32 planeStep, |
1161 | | uint32 repeatV, |
1162 | | uint32 repeatH, |
1163 | | uint32 phaseV, |
1164 | | uint32 phaseH) |
1165 | 0 | { |
1166 | | |
1167 | 0 | (gDNGSuite.RepeatArea16) (sPtr, |
1168 | 0 | dPtr, |
1169 | 0 | rows, |
1170 | 0 | cols, |
1171 | 0 | planes, |
1172 | 0 | rowStep, |
1173 | 0 | colStep, |
1174 | 0 | planeStep, |
1175 | 0 | repeatV, |
1176 | 0 | repeatH, |
1177 | 0 | phaseV, |
1178 | 0 | phaseH); |
1179 | |
|
1180 | 0 | } |
1181 | | |
1182 | | inline void DoRepeatArea32 (const uint32 *sPtr, |
1183 | | uint32 *dPtr, |
1184 | | uint32 rows, |
1185 | | uint32 cols, |
1186 | | uint32 planes, |
1187 | | int32 rowStep, |
1188 | | int32 colStep, |
1189 | | int32 planeStep, |
1190 | | uint32 repeatV, |
1191 | | uint32 repeatH, |
1192 | | uint32 phaseV, |
1193 | | uint32 phaseH) |
1194 | 0 | { |
1195 | | |
1196 | 0 | (gDNGSuite.RepeatArea32) (sPtr, |
1197 | 0 | dPtr, |
1198 | 0 | rows, |
1199 | 0 | cols, |
1200 | 0 | planes, |
1201 | 0 | rowStep, |
1202 | 0 | colStep, |
1203 | 0 | planeStep, |
1204 | 0 | repeatV, |
1205 | 0 | repeatH, |
1206 | 0 | phaseV, |
1207 | 0 | phaseH); |
1208 | |
|
1209 | 0 | } |
1210 | | |
1211 | | /*****************************************************************************/ |
1212 | | |
1213 | | inline void DoShiftRight16 (uint16 *dPtr, |
1214 | | uint32 rows, |
1215 | | uint32 cols, |
1216 | | uint32 planes, |
1217 | | int32 rowStep, |
1218 | | int32 colStep, |
1219 | | int32 planeStep, |
1220 | | uint32 shift) |
1221 | 0 | { |
1222 | | |
1223 | 0 | (gDNGSuite.ShiftRight16) (dPtr, |
1224 | 0 | rows, |
1225 | 0 | cols, |
1226 | 0 | planes, |
1227 | 0 | rowStep, |
1228 | 0 | colStep, |
1229 | 0 | planeStep, |
1230 | 0 | shift); |
1231 | | |
1232 | 0 | } |
1233 | | |
1234 | | /*****************************************************************************/ |
1235 | | |
1236 | | inline void DoBilinearRow16 (const uint16 *sPtr, |
1237 | | uint16 *dPtr, |
1238 | | uint32 cols, |
1239 | | uint32 patPhase, |
1240 | | uint32 patCount, |
1241 | | const uint32 * kernCounts, |
1242 | | const int32 * const * kernOffsets, |
1243 | | const uint16 * const * kernWeights, |
1244 | | uint32 sShift) |
1245 | 0 | { |
1246 | | |
1247 | 0 | (gDNGSuite.BilinearRow16) (sPtr, |
1248 | 0 | dPtr, |
1249 | 0 | cols, |
1250 | 0 | patPhase, |
1251 | 0 | patCount, |
1252 | 0 | kernCounts, |
1253 | 0 | kernOffsets, |
1254 | 0 | kernWeights, |
1255 | 0 | sShift); |
1256 | | |
1257 | 0 | } |
1258 | | |
1259 | | inline void DoBilinearRow32 (const real32 *sPtr, |
1260 | | real32 *dPtr, |
1261 | | uint32 cols, |
1262 | | uint32 patPhase, |
1263 | | uint32 patCount, |
1264 | | const uint32 * kernCounts, |
1265 | | const int32 * const * kernOffsets, |
1266 | | const real32 * const * kernWeights, |
1267 | | uint32 sShift) |
1268 | 0 | { |
1269 | | |
1270 | 0 | (gDNGSuite.BilinearRow32) (sPtr, |
1271 | 0 | dPtr, |
1272 | 0 | cols, |
1273 | 0 | patPhase, |
1274 | 0 | patCount, |
1275 | 0 | kernCounts, |
1276 | 0 | kernOffsets, |
1277 | 0 | kernWeights, |
1278 | 0 | sShift); |
1279 | | |
1280 | 0 | } |
1281 | | |
1282 | | /*****************************************************************************/ |
1283 | | |
1284 | | inline void DoBaselineABCtoRGB (const real32 *sPtrA, |
1285 | | const real32 *sPtrB, |
1286 | | const real32 *sPtrC, |
1287 | | real32 *dPtrR, |
1288 | | real32 *dPtrG, |
1289 | | real32 *dPtrB, |
1290 | | uint32 count, |
1291 | | const dng_vector &cameraWhite, |
1292 | | const dng_matrix &cameraToRGB) |
1293 | 0 | { |
1294 | | |
1295 | 0 | (gDNGSuite.BaselineABCtoRGB) (sPtrA, |
1296 | 0 | sPtrB, |
1297 | 0 | sPtrC, |
1298 | 0 | dPtrR, |
1299 | 0 | dPtrG, |
1300 | 0 | dPtrB, |
1301 | 0 | count, |
1302 | 0 | cameraWhite, |
1303 | 0 | cameraToRGB); |
1304 | | |
1305 | 0 | } |
1306 | | |
1307 | | inline void DoBaselineABCDtoRGB (const real32 *sPtrA, |
1308 | | const real32 *sPtrB, |
1309 | | const real32 *sPtrC, |
1310 | | const real32 *sPtrD, |
1311 | | real32 *dPtrR, |
1312 | | real32 *dPtrG, |
1313 | | real32 *dPtrB, |
1314 | | uint32 count, |
1315 | | const dng_vector &cameraWhite, |
1316 | | const dng_matrix &cameraToRGB) |
1317 | 0 | { |
1318 | | |
1319 | 0 | (gDNGSuite.BaselineABCDtoRGB) (sPtrA, |
1320 | 0 | sPtrB, |
1321 | 0 | sPtrC, |
1322 | 0 | sPtrD, |
1323 | 0 | dPtrR, |
1324 | 0 | dPtrG, |
1325 | 0 | dPtrB, |
1326 | 0 | count, |
1327 | 0 | cameraWhite, |
1328 | 0 | cameraToRGB); |
1329 | | |
1330 | 0 | } |
1331 | | |
1332 | | /*****************************************************************************/ |
1333 | | |
1334 | | inline void DoBaselineHueSatMap (const real32 *sPtrR, |
1335 | | const real32 *sPtrG, |
1336 | | const real32 *sPtrB, |
1337 | | real32 *dPtrR, |
1338 | | real32 *dPtrG, |
1339 | | real32 *dPtrB, |
1340 | | uint32 count, |
1341 | | const dng_hue_sat_map &lut, |
1342 | | const dng_1d_table *encodeTable, |
1343 | | const dng_1d_table *decodeTable) |
1344 | 0 | { |
1345 | | |
1346 | 0 | (gDNGSuite.BaselineHueSatMap) (sPtrR, |
1347 | 0 | sPtrG, |
1348 | 0 | sPtrB, |
1349 | 0 | dPtrR, |
1350 | 0 | dPtrG, |
1351 | 0 | dPtrB, |
1352 | 0 | count, |
1353 | 0 | lut, |
1354 | 0 | encodeTable, |
1355 | 0 | decodeTable); |
1356 | | |
1357 | 0 | } |
1358 | | |
1359 | | /*****************************************************************************/ |
1360 | | |
1361 | | inline void DoBaselineRGBtoGray (const real32 *sPtrR, |
1362 | | const real32 *sPtrG, |
1363 | | const real32 *sPtrB, |
1364 | | real32 *dPtrG, |
1365 | | uint32 count, |
1366 | | const dng_matrix &matrix) |
1367 | 0 | { |
1368 | | |
1369 | 0 | (gDNGSuite.BaselineRGBtoGray) (sPtrR, |
1370 | 0 | sPtrG, |
1371 | 0 | sPtrB, |
1372 | 0 | dPtrG, |
1373 | 0 | count, |
1374 | 0 | matrix); |
1375 | | |
1376 | 0 | } |
1377 | | |
1378 | | inline void DoBaselineRGBtoRGB (const real32 *sPtrR, |
1379 | | const real32 *sPtrG, |
1380 | | const real32 *sPtrB, |
1381 | | real32 *dPtrR, |
1382 | | real32 *dPtrG, |
1383 | | real32 *dPtrB, |
1384 | | uint32 count, |
1385 | | const dng_matrix &matrix) |
1386 | 0 | { |
1387 | | |
1388 | 0 | (gDNGSuite.BaselineRGBtoRGB) (sPtrR, |
1389 | 0 | sPtrG, |
1390 | 0 | sPtrB, |
1391 | 0 | dPtrR, |
1392 | 0 | dPtrG, |
1393 | 0 | dPtrB, |
1394 | 0 | count, |
1395 | 0 | matrix); |
1396 | | |
1397 | 0 | } |
1398 | | |
1399 | | /*****************************************************************************/ |
1400 | | |
1401 | | inline void DoBaseline1DTable (const real32 *sPtr, |
1402 | | real32 *dPtr, |
1403 | | uint32 count, |
1404 | | const dng_1d_table &table) |
1405 | 0 | { |
1406 | | |
1407 | 0 | (gDNGSuite.Baseline1DTable) (sPtr, |
1408 | 0 | dPtr, |
1409 | 0 | count, |
1410 | 0 | table); |
1411 | | |
1412 | 0 | } |
1413 | | |
1414 | | /*****************************************************************************/ |
1415 | | |
1416 | | inline void DoBaselineRGBTone (const real32 *sPtrR, |
1417 | | const real32 *sPtrG, |
1418 | | const real32 *sPtrB, |
1419 | | real32 *dPtrR, |
1420 | | real32 *dPtrG, |
1421 | | real32 *dPtrB, |
1422 | | uint32 count, |
1423 | | const dng_1d_table &table) |
1424 | 0 | { |
1425 | | |
1426 | 0 | (gDNGSuite.BaselineRGBTone) (sPtrR, |
1427 | 0 | sPtrG, |
1428 | 0 | sPtrB, |
1429 | 0 | dPtrR, |
1430 | 0 | dPtrG, |
1431 | 0 | dPtrB, |
1432 | 0 | count, |
1433 | 0 | table); |
1434 | | |
1435 | 0 | } |
1436 | | |
1437 | | /*****************************************************************************/ |
1438 | | |
1439 | | inline void DoResampleDown16 (const uint16 *sPtr, |
1440 | | uint16 *dPtr, |
1441 | | uint32 sCount, |
1442 | | int32 sRowStep, |
1443 | | const int16 *wPtr, |
1444 | | uint32 wCount, |
1445 | | uint32 pixelRange) |
1446 | 0 | { |
1447 | | |
1448 | 0 | (gDNGSuite.ResampleDown16) (sPtr, |
1449 | 0 | dPtr, |
1450 | 0 | sCount, |
1451 | 0 | sRowStep, |
1452 | 0 | wPtr, |
1453 | 0 | wCount, |
1454 | 0 | pixelRange); |
1455 | | |
1456 | 0 | } |
1457 | | |
1458 | | inline void DoResampleDown32 (const real32 *sPtr, |
1459 | | real32 *dPtr, |
1460 | | uint32 sCount, |
1461 | | int32 sRowStep, |
1462 | | const real32 *wPtr, |
1463 | | uint32 wCount) |
1464 | 0 | { |
1465 | | |
1466 | 0 | (gDNGSuite.ResampleDown32) (sPtr, |
1467 | 0 | dPtr, |
1468 | 0 | sCount, |
1469 | 0 | sRowStep, |
1470 | 0 | wPtr, |
1471 | 0 | wCount); |
1472 | | |
1473 | 0 | } |
1474 | | |
1475 | | /*****************************************************************************/ |
1476 | | |
1477 | | inline void DoResampleAcross16 (const uint16 *sPtr, |
1478 | | uint16 *dPtr, |
1479 | | uint32 dCount, |
1480 | | const int32 *coord, |
1481 | | const int16 *wPtr, |
1482 | | uint32 wCount, |
1483 | | uint32 wStep, |
1484 | | uint32 pixelRange) |
1485 | 0 | { |
1486 | | |
1487 | 0 | (gDNGSuite.ResampleAcross16) (sPtr, |
1488 | 0 | dPtr, |
1489 | 0 | dCount, |
1490 | 0 | coord, |
1491 | 0 | wPtr, |
1492 | 0 | wCount, |
1493 | 0 | wStep, |
1494 | 0 | pixelRange); |
1495 | | |
1496 | 0 | } |
1497 | | |
1498 | | inline void DoResampleAcross32 (const real32 *sPtr, |
1499 | | real32 *dPtr, |
1500 | | uint32 dCount, |
1501 | | const int32 *coord, |
1502 | | const real32 *wPtr, |
1503 | | uint32 wCount, |
1504 | | uint32 wStep) |
1505 | 0 | { |
1506 | | |
1507 | 0 | (gDNGSuite.ResampleAcross32) (sPtr, |
1508 | 0 | dPtr, |
1509 | 0 | dCount, |
1510 | 0 | coord, |
1511 | 0 | wPtr, |
1512 | 0 | wCount, |
1513 | 0 | wStep); |
1514 | | |
1515 | 0 | } |
1516 | | |
1517 | | /*****************************************************************************/ |
1518 | | |
1519 | | inline bool DoEqualBytes (const void *sPtr, |
1520 | | const void *dPtr, |
1521 | | uint32 count) |
1522 | 0 | { |
1523 | | |
1524 | 0 | return (gDNGSuite.EqualBytes) (sPtr, |
1525 | 0 | dPtr, |
1526 | 0 | count); |
1527 | | |
1528 | 0 | } |
1529 | | |
1530 | | inline bool DoEqualArea8 (const uint8 *sPtr, |
1531 | | const uint8 *dPtr, |
1532 | | uint32 rows, |
1533 | | uint32 cols, |
1534 | | uint32 planes, |
1535 | | int32 sRowStep, |
1536 | | int32 sColStep, |
1537 | | int32 sPlaneStep, |
1538 | | int32 dRowStep, |
1539 | | int32 dColStep, |
1540 | | int32 dPlaneStep) |
1541 | 0 | { |
1542 | | |
1543 | 0 | return (gDNGSuite.EqualArea8) (sPtr, |
1544 | 0 | dPtr, |
1545 | 0 | rows, |
1546 | 0 | cols, |
1547 | 0 | planes, |
1548 | 0 | sRowStep, |
1549 | 0 | sColStep, |
1550 | 0 | sPlaneStep, |
1551 | 0 | dRowStep, |
1552 | 0 | dColStep, |
1553 | 0 | dPlaneStep); |
1554 | | |
1555 | 0 | } |
1556 | | |
1557 | | inline bool DoEqualArea16 (const uint16 *sPtr, |
1558 | | const uint16 *dPtr, |
1559 | | uint32 rows, |
1560 | | uint32 cols, |
1561 | | uint32 planes, |
1562 | | int32 sRowStep, |
1563 | | int32 sColStep, |
1564 | | int32 sPlaneStep, |
1565 | | int32 dRowStep, |
1566 | | int32 dColStep, |
1567 | | int32 dPlaneStep) |
1568 | 0 | { |
1569 | | |
1570 | 0 | return (gDNGSuite.EqualArea16) (sPtr, |
1571 | 0 | dPtr, |
1572 | 0 | rows, |
1573 | 0 | cols, |
1574 | 0 | planes, |
1575 | 0 | sRowStep, |
1576 | 0 | sColStep, |
1577 | 0 | sPlaneStep, |
1578 | 0 | dRowStep, |
1579 | 0 | dColStep, |
1580 | 0 | dPlaneStep); |
1581 | | |
1582 | 0 | } |
1583 | | |
1584 | | inline bool DoEqualArea32 (const uint32 *sPtr, |
1585 | | const uint32 *dPtr, |
1586 | | uint32 rows, |
1587 | | uint32 cols, |
1588 | | uint32 planes, |
1589 | | int32 sRowStep, |
1590 | | int32 sColStep, |
1591 | | int32 sPlaneStep, |
1592 | | int32 dRowStep, |
1593 | | int32 dColStep, |
1594 | | int32 dPlaneStep) |
1595 | 0 | { |
1596 | | |
1597 | 0 | return (gDNGSuite.EqualArea32) (sPtr, |
1598 | 0 | dPtr, |
1599 | 0 | rows, |
1600 | 0 | cols, |
1601 | 0 | planes, |
1602 | 0 | sRowStep, |
1603 | 0 | sColStep, |
1604 | 0 | sPlaneStep, |
1605 | 0 | dRowStep, |
1606 | 0 | dColStep, |
1607 | 0 | dPlaneStep); |
1608 | | |
1609 | 0 | } |
1610 | | |
1611 | | /*****************************************************************************/ |
1612 | | |
1613 | | inline void DoVignetteMask16 (uint16 *mPtr, |
1614 | | uint32 rows, |
1615 | | uint32 cols, |
1616 | | int32 rowStep, |
1617 | | int64 offsetH, |
1618 | | int64 offsetV, |
1619 | | int64 stepH, |
1620 | | int64 stepV, |
1621 | | uint32 tBits, |
1622 | | const uint16 *table) |
1623 | 0 | { |
1624 | | |
1625 | 0 | (gDNGSuite.VignetteMask16) (mPtr, |
1626 | 0 | rows, |
1627 | 0 | cols, |
1628 | 0 | rowStep, |
1629 | 0 | offsetH, |
1630 | 0 | offsetV, |
1631 | 0 | stepH, |
1632 | 0 | stepV, |
1633 | 0 | tBits, |
1634 | 0 | table); |
1635 | |
|
1636 | 0 | } |
1637 | | |
1638 | | /*****************************************************************************/ |
1639 | | |
1640 | | inline void DoVignette16 (int16 *sPtr, |
1641 | | const uint16 *mPtr, |
1642 | | uint32 rows, |
1643 | | uint32 cols, |
1644 | | uint32 planes, |
1645 | | int32 sRowStep, |
1646 | | int32 sPlaneStep, |
1647 | | int32 mRowStep, |
1648 | | uint32 mBits) |
1649 | 0 | { |
1650 | 0 | |
1651 | 0 | (gDNGSuite.Vignette16) (sPtr, |
1652 | 0 | mPtr, |
1653 | 0 | rows, |
1654 | 0 | cols, |
1655 | 0 | planes, |
1656 | 0 | sRowStep, |
1657 | 0 | sPlaneStep, |
1658 | 0 | mRowStep, |
1659 | 0 | mBits); |
1660 | 0 |
|
1661 | 0 | } |
1662 | | |
1663 | | /*****************************************************************************/ |
1664 | | |
1665 | | inline void DoVignette32 (real32 *sPtr, |
1666 | | const uint16 *mPtr, |
1667 | | uint32 rows, |
1668 | | uint32 cols, |
1669 | | uint32 planes, |
1670 | | int32 sRowStep, |
1671 | | int32 sPlaneStep, |
1672 | | int32 mRowStep, |
1673 | | uint32 mBits) |
1674 | 0 | { |
1675 | | |
1676 | 0 | (gDNGSuite.Vignette32) (sPtr, |
1677 | 0 | mPtr, |
1678 | 0 | rows, |
1679 | 0 | cols, |
1680 | 0 | planes, |
1681 | 0 | sRowStep, |
1682 | 0 | sPlaneStep, |
1683 | 0 | mRowStep, |
1684 | 0 | mBits); |
1685 | |
|
1686 | 0 | } |
1687 | | |
1688 | | /*****************************************************************************/ |
1689 | | |
1690 | | inline void DoMapArea16 (uint16 *dPtr, |
1691 | | uint32 count0, |
1692 | | uint32 count1, |
1693 | | uint32 count2, |
1694 | | int32 step0, |
1695 | | int32 step1, |
1696 | | int32 step2, |
1697 | | const uint16 *map) |
1698 | 0 | { |
1699 | | |
1700 | 0 | (gDNGSuite.MapArea16) (dPtr, |
1701 | 0 | count0, |
1702 | 0 | count1, |
1703 | 0 | count2, |
1704 | 0 | step0, |
1705 | 0 | step1, |
1706 | 0 | step2, |
1707 | 0 | map); |
1708 | |
|
1709 | 0 | } |
1710 | | |
1711 | | /*****************************************************************************/ |
1712 | | |
1713 | | #endif |
1714 | | |
1715 | | /*****************************************************************************/ |