MythTV  master
videocolourspace.h
Go to the documentation of this file.
1 #ifndef VIDEOCOLOURSPACE_H
2 #define VIDEOCOLOURSPACE_H
3 
4 #include <QMap>
5 #include "videoouttypes.h"
6 
7 class Matrix
8 {
9  public:
10  Matrix(float m11, float m12, float m13, float m14,
11  float m21, float m22, float m23, float m24,
12  float m31, float m32, float m33, float m34);
13  Matrix();
14 
15  void setToIdentity(void);
16  void scale(float val1, float val2, float val3);
17  void translate(float val1, float val2, float val3);
18  Matrix & operator*=(const Matrix &r);
19  void product(int row, const Matrix &r);
20  void debug(void);
21  float m[4][4];
22 };
23 
24 typedef enum VideoCStd
25 {
30 } VideoCStd;
31 
33 {
34  public:
35  explicit VideoColourSpace(VideoCStd colour_std = kCSTD_ITUR_BT_601);
36  ~VideoColourSpace() = default;
37 
39  { return m_supported_attributes; }
41 
42  void* GetMatrix(void) { return &m_matrix.m; }
43  bool HasChanged(void) const { return m_changed; }
44 
46  int SetPictureAttribute(PictureAttribute attribute, int value);
48 
49  private:
50  void SetStudioLevels(bool studio);
51  void SetBrightness(int value);
52  void SetContrast(int value);
53  void SetHue(int value);
54  void SetSaturation(int value);
55 
56  void SaveValue(PictureAttribute attribute, int value);
57  void Update(void);
58  void Debug(void);
59 
60  private:
62  QMap<PictureAttribute,int> m_db_settings;
63 
64  bool m_changed;
66  float m_brightness;
67  float m_contrast;
68  float m_saturation;
69  float m_hue;
72 };
73 
74 #endif
PictureAttributeSupported
void SetHue(int value)
void product(int row, const Matrix &r)
unsigned char r
Definition: ParseText.cpp:329
void * GetMatrix(void)
void SaveValue(PictureAttribute attribute, int value)
VideoColourSpace(VideoCStd colour_std=kCSTD_ITUR_BT_601)
void SetSaturation(int value)
PictureAttribute
Definition: videoouttypes.h:89
void SetBrightness(int value)
void SetColourSpace(VideoCStd csp=kCSTD_Unknown)
void translate(float val1, float val2, float val3)
void setToIdentity(void)
~VideoColourSpace()=default
PictureAttributeSupported m_supported_attributes
void SetSupportedAttributes(PictureAttributeSupported supported)
VideoCStd
PictureAttributeSupported SupportedAttributes(void) const
float m[4][4]
bool HasChanged(void) const
void debug(void)
VideoCStd m_colourSpace
void SetContrast(int value)
int GetPictureAttribute(PictureAttribute attribute)
Matrix & operator*=(const Matrix &r)
void scale(float val1, float val2, float val3)
QMap< PictureAttribute, int > m_db_settings
int SetPictureAttribute(PictureAttribute attribute, int value)
void SetStudioLevels(bool studio)