![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "../../src/common/dttypes.h"
Macros | |
#define | ELEM_SWAP(a, b) { elem_type t=(a);(a)=(b);(b)=t; } |
#define | median(a, n) kth_smallest(a,n,(((n)&1)?((n)/2):(((n)/2)-1))) |
#define | MIN(a, b) ((a>b)?b:a) |
#define | MAX(a, b) ((a>b)?a:b) |
#define | N 300 |
Typedefs | |
typedef float | elem_type |
Functions | |
static elem_type | kth_smallest (elem_type a[], int n, int k) |
static float * | read_pfm (const char *filename, int *wd, int *ht) |
static float * | read_histogram (const char *filename, int *bins) |
static void | invert_histogram (const float *const hist, float *const inv_hist, const int bins) |
static float | clamp (float f, float m, float M) |
int | compare_llhh (const void *a, const void *b) |
int | main (int argc, char *arg[]) |
#define ELEM_SWAP | ( | a, | |
b | |||
) | { elem_type t=(a);(a)=(b);(b)=t; } |
#define MAX | ( | a, | |
b | |||
) | ((a>b)?a:b) |
#define median | ( | a, | |
n | |||
) | kth_smallest(a,n,(((n)&1)?((n)/2):(((n)/2)-1))) |
#define MIN | ( | a, | |
b | |||
) | ((a>b)?b:a) |
#define N 300 |
typedef float elem_type |
|
inlinestatic |
References f(), m, MAX, and MIN.
Referenced by compare_llhh(), lerp_lookup_unbounded(), lookup(), lookup_unbounded(), and main().
|
static |
Referenced by main().
int main | ( | int | argc, |
char * | arg[] | ||
) |
References clamp(), compare_llhh(), f(), invert_histogram(), median, N, read_histogram(), read_pfm(), and write_pfm().
Referenced by wmain().
|
static |