color-formats-converter.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "synthetic-stream.h"
7 
8 namespace librealsense
9 {
11  {
12  protected:
13  color_converter(const char* name, rs2_format target_format, rs2_stream target_stream = RS2_STREAM_COLOR) :
14  functional_processing_block(name, target_format, target_stream, RS2_EXTENSION_VIDEO_FRAME) {};
15  };
16 
18  {
19  public:
20  yuy2_converter(rs2_format target_format) :
21  yuy2_converter("YUY Converter", target_format) {};
22 
23  protected:
24  yuy2_converter(const char* name, rs2_format target_format) :
25  color_converter(name, target_format) {};
26  void process_function( uint8_t * const dest[], const uint8_t * source, int width, int height, int actual_size, int input_size) override;
27  };
28 
30  {
31  public:
32  uyvy_converter(rs2_format target_format, rs2_stream target_stream = RS2_STREAM_COLOR) :
33  uyvy_converter("UYVY Converter", target_format, target_stream) {};
34 
35  protected:
36  uyvy_converter(const char* name, rs2_format target_format, rs2_stream target_stream) :
37  color_converter(name, target_format, target_stream) {};
38  void process_function( uint8_t * const dest[], const uint8_t * source, int width, int height, int actual_size, int input_size) override;
39  };
40 
42  {
43  public:
44  mjpeg_converter(rs2_format target_format) :
45  mjpeg_converter("MJPEG Converter", target_format) {};
46 
47  protected:
48  mjpeg_converter(const char* name, rs2_format target_format) :
49  color_converter(name, target_format) {};
50  void process_function( uint8_t * const dest[], const uint8_t * source, int width, int height, int actual_size, int input_size) override;
51  };
52 
54  {
55  public:
57  bgr_to_rgb("BGR to RGB Converter") {};
58 
59  protected:
60  bgr_to_rgb(const char* name) :
62  void process_function( uint8_t * const dest[], const uint8_t * source, int width, int height, int actual_size, int input_size) override;
63  };
64 
66  {
67  public:
68  m420_converter(rs2_format target_format) :
69  m420_converter("M420 Converter", target_format) {};
70 
71  protected:
72  m420_converter(const char* name, rs2_format target_format) :
73  color_converter(name, target_format) {};
74  void process_function( uint8_t * const dest[], const uint8_t * source, int width, int height, int actual_size, int input_size) override;
75  };
76 }
librealsense
Definition: algo.h:18
uint8_t
unsigned char uint8_t
Definition: stdint.h:78
librealsense::bgr_to_rgb
Definition: color-formats-converter.h:53
librealsense::mjpeg_converter
Definition: color-formats-converter.h:41
LRS_EXTENSION_API
#define LRS_EXTENSION_API
Definition: basics.h:23
RS2_FORMAT_RGB8
@ RS2_FORMAT_RGB8
Definition: rs_sensor.h:68
librealsense::yuy2_converter::yuy2_converter
yuy2_converter(rs2_format target_format)
Definition: color-formats-converter.h:20
RS2_STREAM_COLOR
@ RS2_STREAM_COLOR
Definition: rs_sensor.h:47
width
GLint GLsizei width
Definition: glad/glad/glad.h:1397
librealsense::mjpeg_converter::mjpeg_converter
mjpeg_converter(rs2_format target_format)
Definition: color-formats-converter.h:44
librealsense::uyvy_converter::uyvy_converter
uyvy_converter(rs2_format target_format, rs2_stream target_stream=RS2_STREAM_COLOR)
Definition: color-formats-converter.h:32
librealsense::m420_converter::m420_converter
m420_converter(const char *name, rs2_format target_format)
Definition: color-formats-converter.h:72
rs2_format
rs2_format
A stream's format identifies how binary data is encoded within a frame.
Definition: rs_sensor.h:61
librealsense::yuy2_converter
Definition: color-formats-converter.h:17
librealsense::color_converter
Definition: color-formats-converter.h:10
height
GLint GLsizei GLsizei height
Definition: glad/glad/glad.h:1397
librealsense::uyvy_converter
Definition: color-formats-converter.h:29
librealsense::color_converter::color_converter
color_converter(const char *name, rs2_format target_format, rs2_stream target_stream=RS2_STREAM_COLOR)
Definition: color-formats-converter.h:13
synthetic-stream.h
RS2_EXTENSION_VIDEO_FRAME
@ RS2_EXTENSION_VIDEO_FRAME
Definition: rs_types.h:144
name
GLuint const GLchar * name
Definition: glad/glad/glad.h:2777
source
GLsizei GLsizei GLchar * source
Definition: glad/glad/glad.h:2828
dest
char * dest
Definition: lz4.h:697
librealsense::bgr_to_rgb::bgr_to_rgb
bgr_to_rgb(const char *name)
Definition: color-formats-converter.h:60
librealsense::functional_processing_block
Definition: synthetic-stream.h:147
librealsense::yuy2_converter::yuy2_converter
yuy2_converter(const char *name, rs2_format target_format)
Definition: color-formats-converter.h:24
librealsense::uyvy_converter::uyvy_converter
uyvy_converter(const char *name, rs2_format target_format, rs2_stream target_stream)
Definition: color-formats-converter.h:36
librealsense::m420_converter
Definition: color-formats-converter.h:65
librealsense::mjpeg_converter::mjpeg_converter
mjpeg_converter(const char *name, rs2_format target_format)
Definition: color-formats-converter.h:48
RS2_STREAM_INFRARED
@ RS2_STREAM_INFRARED
Definition: rs_sensor.h:48
librealsense::m420_converter::m420_converter
m420_converter(rs2_format target_format)
Definition: color-formats-converter.h:68
librealsense::bgr_to_rgb::bgr_to_rgb
bgr_to_rgb()
Definition: color-formats-converter.h:56
rs2_stream
rs2_stream
Streams are different types of data provided by RealSense devices.
Definition: rs_sensor.h:43


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Mon Apr 22 2024 02:12:55