image.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 #ifndef LIBREALSENSE_IMAGE_H
6 #define LIBREALSENSE_IMAGE_H
7 
8 #include "types.h"
9 
10 namespace librealsense
11 {
12  size_t get_image_size (int width, int height, rs2_format format);
13  int get_image_bpp (rs2_format format);
14 
15  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)
16  {
17  auto a = reinterpret_cast<decltype(split_a(SOURCE())) *>(dest[0]);
18  auto b = reinterpret_cast<decltype(split_b(SOURCE())) *>(dest[1]);
19  for (int i = 0; i < count; ++i)
20  {
21  *a++ = split_a(*source);
22  *b++ = split_b(*source++);
23  }
24  }
25 
28 }
29 
30 #endif
GLboolean GLboolean GLboolean b
size_t get_image_size(int width, int height, rs2_format format)
Definition: image.cpp:14
resolution l500_confidence_resolution(resolution res)
Definition: image.cpp:65
GLboolean GLboolean GLboolean GLboolean a
GLint GLsizei GLsizei height
GLint GLint GLsizei GLint GLenum format
rs2_format
A stream&#39;s format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:59
resolution rotate_resolution(resolution res)
Definition: image.cpp:60
unsigned char byte
Definition: src/types.h:52
GLint GLsizei count
GLsizei GLsizei GLchar * source
LZ4LIB_API char * dest
Definition: lz4.h:438
void split_frame(byte *const dest[], int count, const SOURCE *source, SPLIT_A split_a, SPLIT_B split_b)
Definition: image.h:15
int i
GLuint res
Definition: glext.h:8856
int get_image_bpp(rs2_format format)
Definition: image.cpp:21
GLint GLsizei width


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:16