File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ diff -bur LibRaw-0.17.2_original/libraw/libraw.h LibRaw-0.17.2_flashair/libraw/libraw.h
2+ --- LibRaw-0.17.2_original/libraw/libraw.h 2016-05-14 10:54:00.000000000 -0700
3+ +++ LibRaw-0.17.2_flashair/libraw/libraw.h 2016-12-13 15:45:48.000000000 -0800
4+ @@ -108,6 +108,9 @@
5+ DllDef float libraw_get_rgb_cam(libraw_data_t *lr,int index1, int index2);
6+ DllDef int libraw_get_color_maximum(libraw_data_t *lr);
7+
8+ + // 2016/12 Toshiba corporation has added this function
9+ + void swab(const void *p_src_, void *p_dst_, ssize_t n);
10+ +
11+ #ifdef __cplusplus
12+ }
13+ #endif
14+ diff -bur LibRaw-0.17.2_original/src/libraw_c_api.cpp LibRaw-0.17.2_flashair/src/libraw_c_api.cpp
15+ --- LibRaw-0.17.2_original/src/libraw_c_api.cpp 2016-05-14 10:54:00.000000000 -0700
16+ +++ LibRaw-0.17.2_flashair/src/libraw_c_api.cpp 2016-12-13 15:28:56.000000000 -0800
17+ @@ -336,6 +336,23 @@
18+ return lr->color.maximum;
19+ }
20+
21+ + // 2016/12 Toshiba corporation has added this function
22+ + void swab(const void *p_src_, void *p_dst_, ssize_t n) {
23+ + const uint8_t *p_src = p_src_;
24+ + uint8_t *p_dst = p_dst_;
25+ + uint8_t tmp;
26+ + ssize_t i;
27+ +
28+ + if (n < 0)
29+ + return;
30+ +
31+ + for (i = 0; i < n - 1; i += 2) {
32+ + tmp = p_src[i + 0];
33+ + p_dst[i + 0] = p_src[i + 1];
34+ + p_dst[i + 1] = tmp;
35+ + }
36+ + }
37+ +
38+ #ifdef __cplusplus
39+ }
40+ #endif
You can’t perform that action at this time.
0 commit comments