hvirtual/plugins/threshold/histogramengine.C File Reference

#include "histogramengine.h"
#include "../colors/plugincolors.h"
#include "vframe.h"
#include <stdio.h>
#include <string.h>

Include dependency graph for histogramengine.C:

Go to the source code of this file.

Defines

#define HISTOGRAM_HEAD(type)
#define HISTOGRAM_TAIL(components)


Define Documentation

#define HISTOGRAM_HEAD ( type   ) 

Value:

{ \
        for(int i = pkg->start; i < pkg->end; i++) \
        { \
                type *row = (type*)data->get_rows()[i]; \
                for(int j = 0; j < w; j++) \
                {

#define HISTOGRAM_TAIL ( components   ) 

Value:

v = (r * 76 + g * 150 + b * 29) >> 8; \
/*                      v = MAX(r, g); */ \
/*                      v = MAX(v, b); */ \
                        r += -(int)(HISTOGRAM_MIN * 0xffff); \
                        g += -(int)(HISTOGRAM_MIN * 0xffff); \
                        b += -(int)(HISTOGRAM_MIN * 0xffff); \
                        v += -(int)(HISTOGRAM_MIN * 0xffff); \
                        CLAMP(r, 0, HISTOGRAM_RANGE); \
                        CLAMP(g, 0, HISTOGRAM_RANGE); \
                        CLAMP(b, 0, HISTOGRAM_RANGE); \
                        CLAMP(v, 0, HISTOGRAM_RANGE); \
                        accum_r[r]++; \
                        accum_g[g]++; \
                        accum_b[b]++; \
                        accum_v[v]++; \
/*                      if(components == 4) accum_a[row[3]]++; */ \
                        row += components; \
                } \
        } \
}


Generated on Mon Apr 28 14:01:54 2008 for Cinelerra by  doxygen 1.5.5