RsCommon.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 #include "RsCommon.h"
5 
7  switch(t_format) {
8  case RS2_FORMAT_RGB8:
9  case RS2_FORMAT_BGR8:
10  return 3;
11  case RS2_FORMAT_RGBA8:
12  case RS2_FORMAT_BGRA8:
13  return 4;
14  case RS2_FORMAT_Z16:
15  case RS2_FORMAT_Y16:
16  case RS2_FORMAT_RAW16:
17  case RS2_FORMAT_YUYV:
18  case RS2_FORMAT_UYVY:
19  return 2;
20  case RS2_FORMAT_Y8:
21  return 1;
22  default:
23  return 0;
24  }
25 }
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:59
int getStreamProfileBpp(rs2_format t_format)
Definition: RsCommon.cpp:6


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