This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
void | init_histograms (void) |
wait queue for all the other (R,G2,B) histograms (color) | |
int | set_histograms (unsigned long frame, int needed, unsigned long *gammaHash) |
Get histograms from the FPGA (called as tasklet?). | |
int | get_histograms (unsigned long frame, int needed) |
Get histograms from the FPGA (called as tasklet?) and/or calculate derivatives (if needed). | |
Variables | |
wait_queue_head_t | hist_y_wait_queue |
wait_queue_head_t | hist_c_wait_queue |
wait queue for the G1 histogram (used as Y) |
int get_histograms | ( | unsigned long | frame, | |
int | needed | |||
) |
Get histograms from the FPGA (called as tasklet?) and/or calculate derivatives (if needed).
frame | absolute frame number (Caller should match it to the hardware frame). TODO: should it be one frame behind current? - yes, exactly | |
needed | bits specify what histograms (color, type) are requested TODO: Add P_* parameter - what to read from tasklet, turn colors it off for high FPS/small window each group of 4 bits cover 4 colors of the same type:
|
if Y - never calculated, if C - maybe all the cache is used by Y
mask out FPGA read requests -= they are not handled here anymore (use set_histograms())
cumulative histograms are needed for percentile calculations
if ((needed >> 4) & (~histograms[index].valid) & 0x0f) return -2 ; /// some needed raw histograms are not available NOTE: now never comes here
Calculating cumulative histograms
Calculating percentiles
Definition at line 231 of file histograms.c.
References ELP_KERR, G_HIST_LAST_INDEX, GLOBALPARS, hist, HISTOGRAM_CACHE_NUMBER, histogram_calc_cumul(), histogram_calc_percentiles(), MDF21, MDF22, printk, and histogram_stuct_t::valid.
Referenced by histograms_lseek().
void init_histograms | ( | void | ) |
wait queue for all the other (R,G2,B) histograms (color)
Definition at line 169 of file histograms.c.
References flags, frame, HISTOGRAM_CACHE_NUMBER, histograms_p, local_irq_restore, local_irq_save, MDF21, printk, and histogram_stuct_t::valid.
Referenced by histograms_init().
int set_histograms | ( | unsigned long | frame, | |
int | needed, | |||
unsigned long * | gammaHash | |||
) |
Get histograms from the FPGA (called as tasklet?).
frame | absolute frame number (Caller should match it to the hardware frame) TODO: should it be one frame behind current? | |
needed | bits specify what histograms (color, type) are requested | |
gammaHash | array of 4 hash32 values to be saved with the histograms each group of 4 bits cover 4 colors of the same type:
|
overwrite all
add to existent
remove those that are already available from the request
Definition at line 193 of file histograms.c.
References fpga_hist_read_nice(), histogram_stuct_t::frame, G_HIST_LAST_INDEX, GLOBALPARS, hist, HISTOGRAM_CACHE_NUMBER, memcpy(), and histogram_stuct_t::valid.
Referenced by tasklet_fpga_function().
wait_queue_head_t hist_c_wait_queue |
wait queue for the G1 histogram (used as Y)
Definition at line 131 of file histograms.c.
Referenced by histograms_init(), and histograms_lseek().
wait_queue_head_t hist_y_wait_queue |
These wait queues will be advanced each frame after the histogram data is transferred to the FPGA. It will happen even if the corresponding task is disabled, with the only exception: hist_c_wait_queue will not be awaken in the current frame if it is too late (frame counter incremented while serving tasklet)
Definition at line 130 of file histograms.c.
Referenced by histograms_init(), histograms_lseek(), and tasklet_fpga_function().