Instrument Neutral Distributed Interface INDI  2.0.2
v4l2_colorspace.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <linux/videodev2.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 /* for kernel < 3.19 */
10 /* ITU-R 601 -- SDTV */
11 #define YCBCR_ENC_601 1
12 /* Rec. 709 -- HDTV */
13 #define YCBCR_ENC_709 2
14 /* sYCC (Y'CbCr encoding of sRGB) */
15 #define YCBCR_ENC_SYCC 5
16 /* SMPTE 240M -- Obsolete HDTV */
17 #define YCBCR_ENC_SMPTE240M 8
18 #define QUANTIZATION_FULL_RANGE 1
19 #define QUANTIZATION_LIM_RANGE 2
20 
21 void initColorSpace();
22 const char *getColorSpaceName(struct v4l2_format *fmt);
23 unsigned int getYCbCrEncoding(struct v4l2_format *fmt);
24 const char *getYCbCrEncodingName(struct v4l2_format *fmt);
25 unsigned int getQuantization(struct v4l2_format *fmt);
26 const char *getQuantizationName(struct v4l2_format *fmt);
27 
28 void rangeY8(unsigned char *buf, unsigned int len);
29 void linearize(float *buf, unsigned int len, struct v4l2_format *fmt);
30 
31 #ifdef __cplusplus
32 }
33 #endif
void initColorSpace()
const char * getYCbCrEncodingName(struct v4l2_format *fmt)
void rangeY8(unsigned char *buf, unsigned int len)
unsigned int getQuantization(struct v4l2_format *fmt)
const char * getQuantizationName(struct v4l2_format *fmt)
void linearize(float *buf, unsigned int len, struct v4l2_format *fmt)
unsigned int getYCbCrEncoding(struct v4l2_format *fmt)
const char * getColorSpaceName(struct v4l2_format *fmt)