5 #include "../include/librealsense/rsutil.h" 11 #include <tmmintrin.h> 14 #pragma pack(push, 1) // All structs in this file are assumed to be byte-packed 46 default: assert(
false);
return 0;
55 memcpy(dest[0], source, SIZE * count);
60 memcpy(dest[0], source, (5 * (count/4)));
65 auto out =
reinterpret_cast<decltype(unpack(SOURCE())) *
>(dest[0]);
66 for(
int i=0; i<
count; ++i) *out++ = unpack(*source++);
75 auto src =
reinterpret_cast<const __m128i *
>(
s);
76 auto dst =
reinterpret_cast<__m128i *
>(d[0]);
78 __m128i* xin = (__m128i*)
src;
79 __m128i* xout = (__m128i*)
dst;
80 for (
int i = 0; i <
n; i += 16, ++xout, xin += 2)
82 __m128i in1_16 = _mm_load_si128((__m128i*)(xin));
83 __m128i in2_16 = _mm_load_si128((__m128i*)(xin + 1));
84 __m128i out1_16 = _mm_srli_epi16(in1_16, 2);
85 __m128i out2_16 = _mm_srli_epi16(in2_16, 2);
86 __m128i out8 = _mm_packus_epi16(out1_16, out2_16);
87 _mm_store_si128(xout, out8);
89 #else // Generic code for when SSSE3 is not available. 90 unsigned short* from = (
unsigned short*)s;
93 for(
int i = 0; i <
n; ++i)
113 auto src =
reinterpret_cast<const __m128i *
>(
s);
114 auto dst =
reinterpret_cast<__m128i *
>(d[0]);
117 const __m128i zero = _mm_set1_epi8(0);
118 const __m128i n100 = _mm_set1_epi16(100 << 4);
119 const __m128i n208 = _mm_set1_epi16(208 << 4);
120 const __m128i n298 = _mm_set1_epi16(298 << 4);
121 const __m128i n409 = _mm_set1_epi16(409 << 4);
122 const __m128i n516 = _mm_set1_epi16(516 << 4);
123 const __m128i evens_odds = _mm_setr_epi8(0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15);
126 __m128i
s0 = _mm_loadu_si128(
src++);
127 __m128i
s1 = _mm_loadu_si128(
src++);
132 __m128i
y0 = _mm_shuffle_epi8(s0, _mm_setr_epi8(1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 14));
133 __m128i
y1 = _mm_shuffle_epi8(s1, _mm_setr_epi8(0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15));
134 _mm_storeu_si128(
dst++, _mm_alignr_epi8(y0, y1, 8));
139 const __m128i evens_odd1s_odd3s = _mm_setr_epi8(0, 2, 4, 6, 8, 10, 12, 14, 1, 5, 9, 13, 3, 7, 11, 15);
140 __m128i yyyyyyyyuuuuvvvv0 = _mm_shuffle_epi8(s0, evens_odd1s_odd3s);
141 __m128i yyyyyyyyuuuuvvvv8 = _mm_shuffle_epi8(s1, evens_odd1s_odd3s);
144 __m128i y16__0_7 = _mm_unpacklo_epi8(yyyyyyyyuuuuvvvv0, zero);
145 __m128i y16__8_F = _mm_unpacklo_epi8(yyyyyyyyuuuuvvvv8, zero);
150 _mm_storeu_si128(
dst++, _mm_slli_epi16(y16__0_7, 8));
151 _mm_storeu_si128(
dst++, _mm_slli_epi16(y16__8_F, 8));
156 __m128i uv = _mm_unpackhi_epi32(yyyyyyyyuuuuvvvv0, yyyyyyyyuuuuvvvv8);
157 __m128i u = _mm_unpacklo_epi8(uv, uv);
158 __m128i
v = _mm_unpackhi_epi8(uv, uv);
159 __m128i u16__0_7 = _mm_unpacklo_epi8(u, zero);
160 __m128i u16__8_F = _mm_unpackhi_epi8(u, zero);
161 __m128i v16__0_7 = _mm_unpacklo_epi8(v, zero);
162 __m128i v16__8_F = _mm_unpackhi_epi8(v, zero);
165 __m128i c16__0_7 = _mm_slli_epi16(_mm_subs_epi16(y16__0_7, _mm_set1_epi16(16)), 4);
166 __m128i d16__0_7 = _mm_slli_epi16(_mm_subs_epi16(u16__0_7, _mm_set1_epi16(128)), 4);
167 __m128i e16__0_7 = _mm_slli_epi16(_mm_subs_epi16(v16__0_7, _mm_set1_epi16(128)), 4);
168 __m128i r16__0_7 = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_add_epi16(_mm_mulhi_epi16(c16__0_7, n298), _mm_mulhi_epi16(e16__0_7, n409))))));
169 __m128i g16__0_7 = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_sub_epi16(_mm_sub_epi16(_mm_mulhi_epi16(c16__0_7, n298), _mm_mulhi_epi16(d16__0_7, n100)), _mm_mulhi_epi16(e16__0_7, n208))))));
170 __m128i b16__0_7 = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_add_epi16(_mm_mulhi_epi16(c16__0_7, n298), _mm_mulhi_epi16(d16__0_7, n516))))));
173 __m128i c16__8_F = _mm_slli_epi16(_mm_subs_epi16(y16__8_F, _mm_set1_epi16(16)), 4);
174 __m128i d16__8_F = _mm_slli_epi16(_mm_subs_epi16(u16__8_F, _mm_set1_epi16(128)), 4);
175 __m128i e16__8_F = _mm_slli_epi16(_mm_subs_epi16(v16__8_F, _mm_set1_epi16(128)), 4);
176 __m128i r16__8_F = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_add_epi16(_mm_mulhi_epi16(c16__8_F, n298), _mm_mulhi_epi16(e16__8_F, n409))))));
177 __m128i g16__8_F = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_sub_epi16(_mm_sub_epi16(_mm_mulhi_epi16(c16__8_F, n298), _mm_mulhi_epi16(d16__8_F, n100)), _mm_mulhi_epi16(e16__8_F, n208))))));
178 __m128i b16__8_F = _mm_min_epi16(_mm_set1_epi16(255), _mm_max_epi16(zero, ((_mm_add_epi16(_mm_mulhi_epi16(c16__8_F, n298), _mm_mulhi_epi16(d16__8_F, n516))))));
183 __m128i rg8__0_7 = _mm_unpacklo_epi8(_mm_shuffle_epi8(r16__0_7, evens_odds), _mm_shuffle_epi8(g16__0_7, evens_odds));
184 __m128i ba8__0_7 = _mm_unpacklo_epi8(_mm_shuffle_epi8(b16__0_7, evens_odds), _mm_set1_epi8(-1));
185 __m128i rgba_0_3 = _mm_unpacklo_epi16(rg8__0_7, ba8__0_7);
186 __m128i rgba_4_7 = _mm_unpackhi_epi16(rg8__0_7, ba8__0_7);
188 __m128i rg8__8_F = _mm_unpacklo_epi8(_mm_shuffle_epi8(r16__8_F, evens_odds), _mm_shuffle_epi8(g16__8_F, evens_odds));
189 __m128i ba8__8_F = _mm_unpacklo_epi8(_mm_shuffle_epi8(b16__8_F, evens_odds), _mm_set1_epi8(-1));
190 __m128i rgba_8_B = _mm_unpacklo_epi16(rg8__8_F, ba8__8_F);
191 __m128i rgba_C_F = _mm_unpackhi_epi16(rg8__8_F, ba8__8_F);
196 _mm_storeu_si128(
dst++, rgba_0_3);
197 _mm_storeu_si128(
dst++, rgba_4_7);
198 _mm_storeu_si128(
dst++, rgba_8_B);
199 _mm_storeu_si128(
dst++, rgba_C_F);
205 __m128i rgb0 = _mm_shuffle_epi8(rgba_0_3, _mm_setr_epi8( 3, 7, 11, 15, 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14));
206 __m128i rgb1 = _mm_shuffle_epi8(rgba_4_7, _mm_setr_epi8(0, 1, 2, 4, 3, 7, 11, 15, 5, 6, 8, 9, 10, 12, 13, 14));
207 __m128i rgb2 = _mm_shuffle_epi8(rgba_8_B, _mm_setr_epi8(0, 1, 2, 4, 5, 6, 8, 9, 3, 7, 11, 15, 10, 12, 13, 14));
208 __m128i rgb3 = _mm_shuffle_epi8(rgba_C_F, _mm_setr_epi8(0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 3, 7, 11, 15 ));
211 _mm_storeu_si128(
dst++, _mm_alignr_epi8(rgb1, rgb0, 4));
212 _mm_storeu_si128(
dst++, _mm_alignr_epi8(rgb2, rgb1, 8));
213 _mm_storeu_si128(
dst++, _mm_alignr_epi8(rgb3, rgb2, 12));
220 __m128i bg8__0_7 = _mm_unpacklo_epi8(_mm_shuffle_epi8(b16__0_7, evens_odds), _mm_shuffle_epi8(g16__0_7, evens_odds));
221 __m128i ra8__0_7 = _mm_unpacklo_epi8(_mm_shuffle_epi8(r16__0_7, evens_odds), _mm_set1_epi8(-1));
222 __m128i bgra_0_3 = _mm_unpacklo_epi16(bg8__0_7, ra8__0_7);
223 __m128i bgra_4_7 = _mm_unpackhi_epi16(bg8__0_7, ra8__0_7);
225 __m128i bg8__8_F = _mm_unpacklo_epi8(_mm_shuffle_epi8(b16__8_F, evens_odds), _mm_shuffle_epi8(g16__8_F, evens_odds));
226 __m128i ra8__8_F = _mm_unpacklo_epi8(_mm_shuffle_epi8(r16__8_F, evens_odds), _mm_set1_epi8(-1));
227 __m128i bgra_8_B = _mm_unpacklo_epi16(bg8__8_F, ra8__8_F);
228 __m128i bgra_C_F = _mm_unpackhi_epi16(bg8__8_F, ra8__8_F);
233 _mm_storeu_si128(
dst++, bgra_0_3);
234 _mm_storeu_si128(
dst++, bgra_4_7);
235 _mm_storeu_si128(
dst++, bgra_8_B);
236 _mm_storeu_si128(
dst++, bgra_C_F);
242 __m128i bgr0 = _mm_shuffle_epi8(bgra_0_3, _mm_setr_epi8( 3, 7, 11, 15, 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14));
243 __m128i bgr1 = _mm_shuffle_epi8(bgra_4_7, _mm_setr_epi8(0, 1, 2, 4, 3, 7, 11, 15, 5, 6, 8, 9, 10, 12, 13, 14));
244 __m128i bgr2 = _mm_shuffle_epi8(bgra_8_B, _mm_setr_epi8(0, 1, 2, 4, 5, 6, 8, 9, 3, 7, 11, 15, 10, 12, 13, 14));
245 __m128i bgr3 = _mm_shuffle_epi8(bgra_C_F, _mm_setr_epi8(0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 3, 7, 11, 15 ));
248 _mm_storeu_si128(
dst++, _mm_alignr_epi8(bgr1, bgr0, 4));
249 _mm_storeu_si128(
dst++, _mm_alignr_epi8(bgr2, bgr1, 8));
250 _mm_storeu_si128(
dst++, _mm_alignr_epi8(bgr3, bgr2, 12));
254 #else // Generic code for when SSSE3 is not available. 255 auto src =
reinterpret_cast<const uint8_t *
>(
s);
256 auto dst =
reinterpret_cast<uint8_t *
>(d[0]);
257 for(;
n; n -= 16,
src += 32)
262 src[ 0],
src[ 2], src[ 4], src[ 6],
263 src[ 8], src[10], src[12], src[14],
264 src[16], src[18], src[20], src[22],
265 src[24], src[26], src[28], src[30],
267 memcpy(
dst, out,
sizeof out);
276 0,
src[ 0], 0,
src[ 2], 0, src[ 4], 0, src[ 6],
277 0, src[ 8], 0, src[10], 0, src[12], 0, src[14],
278 0, src[16], 0, src[18], 0, src[20], 0, src[22],
279 0, src[24], 0, src[26], 0, src[28], 0, src[30],
281 memcpy(
dst, out,
sizeof out);
287 src[ 0],
src[ 2], src[ 4], src[ 6],
288 src[ 8], src[10], src[12], src[14],
289 src[16], src[18], src[20], src[22],
290 src[24], src[26], src[28], src[30],
292 src[ 1],
src[ 1], src[ 5], src[ 5],
293 src[ 9], src[ 9], src[13], src[13],
294 src[17], src[17], src[21], src[21],
295 src[25], src[25], src[29], src[29],
297 src[ 3],
src[ 3], src[ 7], src[ 7],
298 src[11], src[11], src[15], src[15],
299 src[19], src[19], src[23], src[23],
300 src[27], src[27], src[31], src[31],
303 uint8_t
r[16],
g[16],
b[16];
304 for(
int i = 0; i < 16; i++)
306 int32_t
c = y[i] - 16;
307 int32_t d = u[i] - 128;
308 int32_t
e = v[i] - 128;
311 #define clamp(x) ((t=(x)) > 255 ? 255 : t < 0 ? 0 : t) 312 r[i] =
clamp((298 * c + 409 * e + 128) >> 8);
313 g[i] =
clamp((298 * c - 100 * d - 409 * e + 128) >> 8);
314 b[i] =
clamp((298 * c + 516 * d + 128) >> 8);
320 uint8_t out[16*3] = {
321 r[ 0], g[ 0], b[ 0], r[ 1], g[ 1], b[ 1],
322 r[ 2], g[ 2], b[ 2], r[ 3], g[ 3], b[ 3],
323 r[ 4], g[ 4], b[ 4], r[ 5], g[ 5], b[ 5],
324 r[ 6], g[ 6], b[ 6], r[ 7], g[ 7], b[ 7],
325 r[ 8], g[ 8], b[ 8], r[ 9], g[ 9], b[ 9],
326 r[10], g[10], b[10], r[11], g[11], b[11],
327 r[12], g[12], b[12], r[13], g[13], b[13],
328 r[14], g[14], b[14], r[15], g[15], b[15],
330 memcpy(
dst, out,
sizeof out);
337 uint8_t out[16*3] = {
338 b[ 0], g[ 0], r[ 0], b[ 1], g[ 1], r[ 1],
339 b[ 2], g[ 2], r[ 2], b[ 3], g[ 3], r[ 3],
340 b[ 4], g[ 4], r[ 4], b[ 5], g[ 5], r[ 5],
341 b[ 6], g[ 6], r[ 6], b[ 7], g[ 7], r[ 7],
342 b[ 8], g[ 8], r[ 8], b[ 9], g[ 9], r[ 9],
343 b[10], g[10], r[10], b[11], g[11], r[11],
344 b[12], g[12], r[12], b[13], g[13], r[13],
345 b[14], g[14], r[14], b[15], g[15], r[15],
347 memcpy(
dst, out,
sizeof out);
354 uint8_t out[16*4] = {
355 r[ 0], g[ 0], b[ 0], 255, r[ 1], g[ 1], b[ 1], 255,
356 r[ 2], g[ 2], b[ 2], 255, r[ 3], g[ 3], b[ 3], 255,
357 r[ 4], g[ 4], b[ 4], 255, r[ 5], g[ 5], b[ 5], 255,
358 r[ 6], g[ 6], b[ 6], 255, r[ 7], g[ 7], b[ 7], 255,
359 r[ 8], g[ 8], b[ 8], 255, r[ 9], g[ 9], b[ 9], 255,
360 r[10], g[10], b[10], 255, r[11], g[11], b[11], 255,
361 r[12], g[12], b[12], 255, r[13], g[13], b[13], 255,
362 r[14], g[14], b[14], 255, r[15], g[15], b[15], 255,
364 memcpy(
dst, out,
sizeof out);
371 uint8_t out[16*4] = {
372 b[ 0], g[ 0], r[ 0], 255, b[ 1], g[ 1], r[ 1], 255,
373 b[ 2], g[ 2], r[ 2], 255, b[ 3], g[ 3], r[ 3], 255,
374 b[ 4], g[ 4], r[ 4], 255, b[ 5], g[ 5], r[ 5], 255,
375 b[ 6], g[ 6], r[ 6], 255, b[ 7], g[ 7], r[ 7], 255,
376 b[ 8], g[ 8], r[ 8], 255, b[ 9], g[ 9], r[ 9], 255,
377 b[10], g[10], r[10], 255, b[11], g[11], r[11], 255,
378 b[12], g[12], r[12], 255, b[13], g[13], r[13], 255,
379 b[14], g[14], r[14], 255, b[15], g[15], r[15], 255,
381 memcpy(
dst, out,
sizeof out);
393 template<
class SOURCE,
class SPLIT_A,
class SPLIT_B>
void split_frame(
byte *
const dest[],
int count,
const SOURCE *
source, SPLIT_A split_a, SPLIT_B split_b)
395 auto a =
reinterpret_cast<decltype(split_a(SOURCE())) *
>(dest[0]);
396 auto b =
reinterpret_cast<decltype(split_b(SOURCE())) *
>(dest[1]);
397 for(
int i=0; i<
count; ++i)
399 *
a++ = split_a(*source);
400 *
b++ = split_b(*source++);
407 split_frame(dest, count, reinterpret_cast<const y8i_pixel *>(source),
408 [](
const y8i_pixel &
p) -> uint8_t {
return p.
l; },
409 [](
const y8i_pixel &
p) -> uint8_t {
return p.
r; });
412 struct y12i_pixel { uint8_t rl : 8, rh : 4, ll : 4, lh : 8;
int l()
const {
return lh << 4 | ll; }
int r()
const {
return rh << 8 |
rl; } };
415 split_frame(dest, count, reinterpret_cast<const y12i_pixel *>(source),
416 [](
const y12i_pixel &
p) -> uint16_t {
return p.
l() << 6 | p.
l() >> 4; },
417 [](
const y12i_pixel &
p) -> uint16_t {
return p.
r() << 6 | p.
r() >> 4; });
423 split_frame(dest, count, reinterpret_cast<const f200_inzi_pixel *>(source),
430 split_frame(dest, count, reinterpret_cast<const f200_inzi_pixel *>(source),
437 auto in =
reinterpret_cast<const uint16_t *
>(
source);
438 auto out_ir =
reinterpret_cast<uint8_t *
>(dest[1]);
439 for(
int i=0; i<count; ++i) *out_ir++ = *in++ >> 2;
440 memcpy(dest[0],
in, count*2);
445 auto in =
reinterpret_cast<const uint16_t *
>(
source);
446 auto out_ir =
reinterpret_cast<uint16_t *
>(dest[1]);
447 for(
int i=0; i<
count; ++i) *out_ir++ = *
in++ << 6;
448 memcpy(dest[0],
in, count*2);
451 #pragma GCC diagnostic push 452 #pragma GCC diagnostic ignored "-Wmultichar" 454 #pragma GCC diagnostic ignored "-Wfour-char-constants" 482 #pragma GCC diagnostic pop 494 const float pixel[] = { (float)
x, (
float)
y};
503 deproject_depth(points, z_intrin, z_pixels, [z_scale](uint16_t
z) {
return z_scale *
z; });
508 deproject_depth(points, disparity_intrin, disparity_pixels, [disparity_scale](uint16_t disparity) {
return disparity_scale / disparity; });
518 #pragma omp parallel for schedule(dynamic) 519 for(
int depth_y = 0; depth_y < depth_intrin.
height; ++depth_y)
521 int depth_pixel_index = depth_y * depth_intrin.
width;
522 for(
int depth_x = 0; depth_x < depth_intrin.
width; ++depth_x, ++depth_pixel_index)
525 if(
float depth = get_depth(depth_pixel_index))
528 float depth_pixel[2] = {depth_x-0.5f, depth_y-0.5f}, depth_point[3], other_point[3], other_pixel[2];
532 const int other_x0 =
static_cast<int>(other_pixel[0] + 0.5f);
533 const int other_y0 =
static_cast<int>(other_pixel[1] + 0.5f);
536 depth_pixel[0] = depth_x+0.5f; depth_pixel[1] = depth_y+0.5f;
540 const int other_x1 =
static_cast<int>(other_pixel[0] + 0.5f);
541 const int other_y1 =
static_cast<int>(other_pixel[1] + 0.5f);
543 if(other_x0 < 0 || other_y0 < 0 || other_x1 >= other_intrin.
width || other_y1 >= other_intrin.
height)
continue;
546 for(
int y=other_y0;
y<=other_y1; ++
y)
for(
int x=other_x0;
x<=other_x1; ++
x) transfer_pixel(depth_pixel_index,
y * other_intrin.
width +
x);
554 auto out_z = (uint16_t *)(z_aligned_to_other);
556 [z_pixels, z_scale](
int z_pixel_index) {
return z_scale * z_pixels[z_pixel_index]; },
557 [out_z, z_pixels](
int z_pixel_index,
int other_pixel_index) { out_z[other_pixel_index] = out_z[other_pixel_index] ? std::min(out_z[other_pixel_index],z_pixels[z_pixel_index]) : z_pixels[z_pixel_index]; });
562 auto out_disparity = (uint16_t *)(disparity_aligned_to_other);
563 align_images(disparity_intrin, disparity_to_other, other_intrin,
564 [disparity_pixels, disparity_scale](
int disparity_pixel_index) {
return disparity_scale / disparity_pixels[disparity_pixel_index]; },
565 [out_disparity, disparity_pixels](
int disparity_pixel_index,
int other_pixel_index) { out_disparity[other_pixel_index] = disparity_pixels[disparity_pixel_index]; });
568 template<
int N>
struct bytes {
char b[N]; };
571 auto in_other = (
const bytes<N> *)(other_pixels);
572 auto out_other = (
bytes<N> *)(other_aligned_to_depth);
573 align_images(depth_intrin, depth_to_other, other_intrin, get_depth,
574 [out_other, in_other](
int depth_pixel_index,
int other_pixel_index) { out_other[depth_pixel_index] = in_other[other_pixel_index]; });
582 align_other_to_depth_bytes<1>(other_aligned_to_depth, get_depth, depth_intrin, depth_to_other, other_intrin, other_pixels);
break;
583 case RS_FORMAT_Y16:
case RS_FORMAT_Z16:
584 align_other_to_depth_bytes<2>(other_aligned_to_depth, get_depth, depth_intrin, depth_to_other, other_intrin, other_pixels);
break;
586 align_other_to_depth_bytes<3>(other_aligned_to_depth, get_depth, depth_intrin, depth_to_other, other_intrin, other_pixels);
break;
588 align_other_to_depth_bytes<4>(other_aligned_to_depth, get_depth, depth_intrin, depth_to_other, other_intrin, other_pixels);
break;
596 align_other_to_depth(other_aligned_to_z, [z_pixels, z_scale](
int z_pixel_index) {
return z_scale * z_pixels[z_pixel_index]; }, z_intrin, z_to_other, other_intrin, other_pixels, other_format);
601 align_other_to_depth(other_aligned_to_disparity, [disparity_pixels, disparity_scale](
int disparity_pixel_index) {
return disparity_scale / disparity_pixels[disparity_pixel_index]; }, disparity_intrin, disparity_to_other, other_intrin, other_pixels, other_format);
610 std::vector<int> rectification_table;
611 rectification_table.resize(rect_intrin.
width * rect_intrin.
height);
612 align_images(rect_intrin, rect_to_unrect, unrect_intrin, [](
int) {
return 1.0f; },
613 [&rectification_table](
int rect_pixel_index,
int unrect_pixel_index) { rectification_table[rect_pixel_index] = unrect_pixel_index; });
614 return rectification_table;
617 template<
class T>
void rectify_image_pixels(T * rect_pixels,
const std::vector<int> & rectification_table,
const T * unrect_pixels)
619 for(
auto entry : rectification_table) *rect_pixels++ = unrect_pixels[entry];
628 case RS_FORMAT_Y16:
case RS_FORMAT_Z16:
void align_other_to_z(byte *other_aligned_to_z, const uint16_t *z_pixels, float z_scale, const rs_intrinsics &z_intrin, const rs_extrinsics &z_to_other, const rs_intrinsics &other_intrin, const byte *other_pixels, rs_format other_format)
void unpack_y16_from_y8(byte *const d[], const byte *s, int n)
const native_pixel_format pf_sr300_invi
void unpack_z16_y8_from_f200_inzi(byte *const dest[], const byte *source, int count)
const native_pixel_format pf_rw10
void rectify_image_pixels(T *rect_pixels, const std::vector< int > &rectification_table, const T *unrect_pixels)
GLint GLint GLsizei GLsizei height
void unpack_y8_y8_from_y8i(byte *const dest[], const byte *source, int count)
GLint GLint GLint GLint GLint GLint y
const native_pixel_format pf_y8i
void align_disparity_to_other(byte *disparity_aligned_to_other, const uint16_t *disparity_pixels, float disparity_scale, const rs_intrinsics &disparity_intrin, const rs_extrinsics &disparity_to_other, const rs_intrinsics &other_intrin)
const native_pixel_format pf_y12i
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s0
GLint GLint GLsizei GLsizei GLsizei depth
int get_image_bpp(rs_format format)
void unpack_z16_y8_from_sr300_inzi(byte *const dest[], const byte *source, int count)
static void rs_project_point_to_pixel(float pixel[2], const struct rs_intrinsics *intrin, const float point[3])
static void rs_transform_point_to_point(float to_point[3], const struct rs_extrinsics *extrin, const float from_point[3])
const native_pixel_format pf_y16
void split_frame(byte *const dest[], int count, const SOURCE *source, SPLIT_A split_a, SPLIT_B split_b)
void deproject_disparity(float *points, const rs_intrinsics &disparity_intrin, const uint16_t *disparity_pixels, float disparity_scale)
const native_pixel_format pf_y8
void align_images(const rs_intrinsics &depth_intrin, const rs_extrinsics &depth_to_other, const rs_intrinsics &other_intrin, GET_DEPTH get_depth, TRANSFER_PIXEL transfer_pixel)
void copy_pixels(byte *const dest[], const byte *source, int count)
GLfixed GLfixed GLint GLint GLfixed points
GLuint GLuint GLsizei count
void unpack_z16_y16_from_sr300_inzi(byte *const dest[], const byte *source, int count)
const native_pixel_format pf_sr300_inzi
void unpack_y8_from_y16_10(byte *const d[], const byte *s, int n)
void deproject_z(float *points, const rs_intrinsics &z_intrin, const uint16_t *z_pixels, float z_scale)
void unpack_y16_from_y16_10(byte *const d[], const byte *s, int n)
static void rs_deproject_pixel_to_point(float point[3], const struct rs_intrinsics *intrin, const float pixel[2], float depth)
rs_format
Formats: defines how each stream can be encoded.
void unpack_pixels(byte *const dest[], int count, const SOURCE *source, UNPACK unpack)
void deproject_depth(float *points, const rs_intrinsics &intrin, const uint16_t *depth, MAP_DEPTH map_depth)
void unpack_z16_y16_from_f200_inzi(byte *const dest[], const byte *source, int count)
GLboolean GLboolean GLboolean GLboolean a
void align_other_to_depth_bytes(byte *other_aligned_to_depth, GET_DEPTH get_depth, const rs_intrinsics &depth_intrin, const rs_extrinsics &depth_to_other, const rs_intrinsics &other_intrin, const byte *other_pixels)
std::vector< int > compute_rectification_table(const rs_intrinsics &rect_intrin, const rs_extrinsics &rect_to_unrect, const rs_intrinsics &unrect_intrin)
const native_pixel_format pf_f200_inzi
const native_pixel_format pf_z16
GLboolean GLboolean GLboolean b
void unpack_rw10_from_rw8(byte *const d[], const byte *s, int n)
Cross-stream extrinsics: encode the topology describing how the different devices are connected...
const native_pixel_format pf_rw16
void align_z_to_other(byte *z_aligned_to_other, const uint16_t *z_pixels, float z_scale, const rs_intrinsics &z_intrin, const rs_extrinsics &z_to_other, const rs_intrinsics &other_intrin)
void rectify_image(uint8_t *rect_pixels, const std::vector< int > &rectification_table, const uint8_t *unrect_pixels, rs_format format)
GLint GLint GLsizei width
GLsizei GLsizei GLchar * source
size_t get_image_size(int width, int height, rs_format format)
GLuint GLfloat GLfloat y0
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
void unpack_yuy2(byte *const d[], const byte *s, int n)
const native_pixel_format pf_yuy2
void align_other_to_depth(byte *other_aligned_to_depth, GET_DEPTH get_depth, const rs_intrinsics &depth_intrin, const rs_extrinsics &depth_to_other, const rs_intrinsics &other_intrin, const byte *other_pixels, rs_format other_format)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
void align_other_to_disparity(byte *other_aligned_to_disparity, const uint16_t *disparity_pixels, float disparity_scale, const rs_intrinsics &disparity_intrin, const rs_extrinsics &disparity_to_other, const rs_intrinsics &other_intrin, const byte *other_pixels, rs_format other_format)
void copy_raw10(byte *const dest[], const byte *source, int count)
const native_pixel_format pf_f200_invi
GLdouble GLdouble GLdouble r
const native_pixel_format pf_invz
GLint GLint GLint GLint GLint x
const native_pixel_format pf_raw8
void unpack_y16_y16_from_y12i_10(byte *const dest[], const byte *source, int count)