FFmpeg
Macros | Functions
color_utils.c File Reference
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "libavutil/csp.h"
#include "libavutil/macros.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"

Go to the source code of this file.

Macros

#define TEST_EOTF(func, input, ref)
 
#define XYZ(X, Y, Z)   { X / 4095.0, Y / 4095.0, Z / 4095.0 }
 

Functions

static int fuzzy_equal (double a, double b)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ TEST_EOTF

#define TEST_EOTF (   func,
  input,
  ref 
)
Value:
do \
{ \
const double _b[3] = { (ref)[0], (ref)[1], (ref)[2] }; \
double _a[3] = { (input)[0], (input)[1], (input)[2] }; \
func(Lw, Lb, _a); \
for (int _i = 0; _i < 3; _i++) { \
if (!fuzzy_equal(_a[_i], _b[_i])) { \
printf("FAIL: trc=%s %s(%g, %g, %s) != %s\n" \
" expected {%g, %g, %g}, got {%g, %g, %g}\n", \
trc_name, #func, Lw, Lb, #input, #ref, \
_b[0], _b[1], _b[2], _a[0], _a[1], _a[2]); \
return 1; \
} \
} \
} while (0)

Definition at line 36 of file color_utils.c.

◆ XYZ

#define XYZ (   X,
  Y,
 
)    { X / 4095.0, Y / 4095.0, Z / 4095.0 }

Function Documentation

◆ fuzzy_equal()

static int fuzzy_equal ( double  a,
double  b 
)
inlinestatic

Definition at line 30 of file color_utils.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 52 of file color_utils.c.

func
int(* func)(AVBPrint *dst, const char *in, const char *arg)
Definition: jacosubdec.c:68
fuzzy_equal
static int fuzzy_equal(double a, double b)
Definition: color_utils.c:30
input
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Definition: filter_design.txt:172
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:117