]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/atmo/AtmoCalculations.h
Use var_InheritString for --decklink-video-connection.
[vlc] / modules / video_filter / atmo / AtmoCalculations.h
index e82580331b30215eea0a3e2da11431f73f0f602a..a8b97f05503025908219552ee5648b04913e1992 100644 (file)
 #include "AtmoDefs.h"
 #include "AtmoConfig.h"
 
+#define Weight(zone, pixel_nummer) m_Weight[((zone) * (IMAGE_SIZE)) + (pixel_nummer)]
+
+class CAtmoColorCalculator
+{
+protected:
+   CAtmoConfig *m_pAtmoConfig;
+
+  // Flip instead having a array with (64x48) entries of values for each channel
+  // I have x arrays of 64x48 so each channel has its own array...
+  // (or gradient which is use to judge about the pixels)
+  int *m_Weight;
+  int **m_Zone_Weights;
+
+  long int *m_hue_hist;
+  long int *m_windowed_hue_hist;
+  int *m_most_used_hue_last;
+  int *m_most_used_hue;
+
+  long int *m_sat_hist;
+  long int *m_windowed_sat_hist;
+  int *m_most_used_sat;
+
+  long int *m_average_v;
+  int *m_average_counter;
+
+protected:
+  int m_LastEdgeWeighting;
+  int m_LastWidescreenMode;
+  int m_LastLayout_TopCount;
+  int m_LastLayout_BottomCount;
+  int m_LastLayout_LRCount;
+  int m_LastNumZones;
+
+
+protected:
+    void FindMostUsed(int AtmoSetup_NumZones,int *most_used,long int *windowed_hist);
+
+public:
+    CAtmoColorCalculator(CAtmoConfig *pAtmoConfig);
+       ~CAtmoColorCalculator(void);
+
+    pColorPacket AnalyzeHSV(tHSVColor *HSV_Img);
+
+    void UpdateParameters();
+};
 
-tColorPacket CalcColorsAnalyzeHSV(CAtmoConfig *pAtmoConfig, tHSVColor *HSV_Img);
 
 tHSVColor RGB2HSV(tRGBColor color);
 tRGBColor HSV2RGB(tHSVColor color);