#include "camera_info.h"
#include "conf.h"
#include "math.h"
#include "modes.h"
#include "viewport.h"
#include "gui.h"
#include "gui_draw.h"
#include "gui_osd.h"
#include "shooting.h"
#include "histogram.h"
gehe zum Quellcode dieser Datei
|
static int | clip (int v) |
|
static float | identity (float x) |
|
static float | logarithmic (float x) |
|
static void | histogram_alloc () |
|
void | histogram_sample_stage (unsigned char *img, int stage, int byte_width, int vis_byte_width, int height, int xstep_bytes, int ystep) |
|
void | histogram_process () |
|
static void | gui_osd_draw_single_histo (int hist, coord x, coord y, int small) |
|
static void | gui_osd_draw_blended_histo (coord x, coord y) |
|
void | gui_osd_draw_histo (int is_osd_edit) |
|
int | _module_unloader () |
|
int | _module_can_unload () |
|
#define HISTO_MODE_LINEAR 0 |
#define HISTO_TARGET_SAMPLES 20000 |
#define HISTO_XSTEP_MIN 4 |
#define HISTO_YSTEP_MIN 2 |
#define OSD_HISTO_LAYOUT_A 0 |
#define OSD_HISTO_LAYOUT_A_Y 2 |
#define OSD_HISTO_LAYOUT_A_yrgb 4 |
#define OSD_HISTO_LAYOUT_BLEND 6 |
#define OSD_HISTO_LAYOUT_BLEND_Y 7 |
#define OSD_HISTO_LAYOUT_R_G_B 3 |
#define OSD_HISTO_LAYOUT_Y 1 |
#define OSD_HISTO_LAYOUT_Y_argb 5 |
int _module_can_unload |
( |
) | |
|
Definiert in Zeile 69 der Datei histogram.c.
72 else if (v>255) v=255;
static void gui_osd_draw_blended_histo |
( |
coord |
x, |
|
|
coord |
y |
|
) |
| |
|
static |
Definiert in Zeile 379 der Datei histogram.c.
384 register unsigned int i, v, red, grn, blu, sel;
404 if (v < red) sel = 4;
405 if (v < grn) sel |= 2;
406 if (v < blu) sel |= 1;
void gui_osd_draw_histo |
( |
int |
is_osd_edit) | |
|
Definiert in Zeile 419 der Datei histogram.c.
495 }
else if (is_osd_edit){
static void gui_osd_draw_single_histo |
( |
int |
hist, |
|
|
coord |
x, |
|
|
coord |
y, |
|
|
int |
small |
|
) |
| |
|
static |
Definiert in Zeile 323 der Datei histogram.c.
328 register int i, v, threshold;
352 for (i=0; i<
w; ++i) {
353 threshold = (
histogram[hist][i<<1]+histogram[hist][(i<<1)+1])>>2;
355 for (v=1; v<h-1; ++v)
362 for (i=0; i<
w; ++i) {
365 for (v=1; v<h-3; ++v)
static void histogram_alloc |
( |
) | |
|
|
static |
void histogram_process |
( |
) | |
|
Definiert in Zeile 142 der Datei histogram.c.
144 static unsigned char *
img;
148 static int viewport_vis_byte_width;
149 static int xstep_bytes, ystep;
152 float (*histogram_transform)(float);
153 unsigned int histo_fill[5];
217 xstep_bytes = (xstep*3)/2;
218 viewport_vis_byte_width = (viewport_pix_width*3)/2;
220 xstep_bytes = xstep*2;
221 viewport_vis_byte_width = viewport_pix_width*2;
224 for (c=0; c<5; ++c) {
256 for (c=0; c<5; ++c) {
290 for (c=0; c<5; ++c) {
302 if (histo_fill[histo_main] < (
HISTO_HEIGHT*HISTO_WIDTH)/5) {
304 for (c=0; c<5; ++c) {
void histogram_sample_stage |
( |
unsigned char * |
img, |
|
|
int |
stage, |
|
|
int |
byte_width, |
|
|
int |
vis_byte_width, |
|
|
int |
height, |
|
|
int |
xstep_bytes, |
|
|
int |
ystep |
|
) |
| |
Definiert in Zeile 102 der Datei histogram.c.
105 unsigned char *p_row =
img +
stage*ystep*byte_width + xstep_bytes;
107 unsigned char *p_max =
img + byte_width*(
height-ystep);
110 int row_sample_len = vis_byte_width - 2*xstep_bytes;
113 int ystep_bytes = ystep*byte_width*3;
115 for(;p_row < p_max; p_row += ystep_bytes) {
117 unsigned char *p = p_row;
118 unsigned char *p_row_end = p_row + row_sample_len;
119 for(;p < p_row_end; p+= xstep_bytes) {
123 u = (
signed char)p[0];
124 v = (
signed char)p[2];
132 hi =
clip(((y<<12) + v*5743 + 2048)>>12);
134 hi =
clip(((y<<12) - u*1411 - v*2925 + 2048)>>12);
136 hi =
clip(((y<<12) + u*7258 + 2048)>>12);
static float identity |
( |
float |
x) | |
|
|
static |
static float logarithmic |
( |
float |
x) | |
|
|
static |
Initialisierung:=
{
(
int32_t)
"Histogram Overlay (dll)",
0,
}
Definiert in Zeile 537 der Datei histogram.c.
unsigned int histo_max[5] |
unsigned int histo_max_center[5] |
float histo_max_center_invw[5] |
|
static |
unsigned short* histogram_proc[5] = { 0,0,0,0,0 } |
|
static |