]> git.sesse.net Git - kdenlive/blob - src/colorcorrection/vectorscopegenerator.h
15744e1a9b1185824643e4dfb123230ac353613e
[kdenlive] / src / colorcorrection / vectorscopegenerator.h
1 /***************************************************************************
2  *   Copyright (C) 2010 by Simon Andreas Eugster (simon.eu@gmail.com)      *
3  *   This file is part of kdenlive. See www.kdenlive.org.                  *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  ***************************************************************************/
10
11 #ifndef VECTORSCOPEGENERATOR_H
12 #define VECTORSCOPEGENERATOR_H
13
14 #include <QObject>
15
16 class QImage;
17 class QPoint;
18 class QPointF;
19 class QSize;
20
21 class VectorscopeGenerator : public QObject
22 {
23 Q_OBJECT
24
25 public:
26     enum ColorSpace { ColorSpace_YUV, ColorSpace_YPbPr };
27     enum PaintMode { PaintMode_Green, PaintMode_Green2, PaintMode_Original, PaintMode_Chroma, PaintMode_YUV, PaintMode_Black };
28
29     QImage calculateVectorscope(const QSize &vectorscopeSize, const QImage &image, const float &gain,
30                                 const VectorscopeGenerator::PaintMode &paintMode,
31                                 const VectorscopeGenerator::ColorSpace &colorSpace,
32                                 const bool&, const uint &accelFactor = 1) const;
33
34     QPoint mapToCircle(const QSize &targetSize, const QPointF &point) const;
35     static const float scaling;
36
37 signals:
38     void signalCalculationFinished(QImage image, const uint &ms);
39
40 };
41
42 #endif // VECTORSCOPEGENERATOR_H