Debian Codegraph @

core/libs/dngwriter/extra/dng_sdk/dng_bottlenecks.h

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