Go to the documentation of this file.
41 fprintf(stderr,
"ff_jpeg2000_dwt_init failed\n");
46 fprintf(stderr,
"ff_dwt_encode failed\n");
51 fprintf(stderr,
"ff_dwt_encode failed\n");
56 fprintf(stderr,
"missmatch at %d (%d != %d) decomp:%d border %d %d %d %d\n",
57 j,
array[j],
ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
65 printf(
"%s, decomp:%2d border %3d %3d %3d %3d milli-err2:%9"PRId64
"\n",
67 decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1],
68 1000*err2 / ((border[0][1] - border[0][0])*(border[1][1] - border[1][0])));
73 static int test_dwtf(
float *
array,
float *
ref,
int border[2][2],
int decomp_levels,
float max_diff) {
80 fprintf(stderr,
"ff_jpeg2000_dwt_init failed\n");
85 fprintf(stderr,
"ff_dwt_encode failed\n");
90 fprintf(stderr,
"ff_dwt_encode failed\n");
95 fprintf(stderr,
"missmatch at %d (%f != %f) decomp:%d border %d %d %d %d\n",
96 j,
array[j],
ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
104 printf(
"9/7f, decomp:%2d border %3d %3d %3d %3d err2:%20.3f\n",
105 decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1],
106 err2 / ((border[0][1] - border[0][0])*(border[1][1] - border[1][0])));
120 int ret, decomp_levels;
127 for (
i = 0;
i < 100;
i++) {
130 if (border[0][0] >= border[0][1] || border[1][0] >= border[1][1])
int ff_dwt_decode(DWTContext *s, void *t)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
int ff_dwt_encode(DWTContext *s, void *t)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
static float reff[MAX_W *MAX_W]
static float arrayf[MAX_W *MAX_W]
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
static int test_dwtf(float *array, float *ref, int border[2][2], int decomp_levels, float max_diff)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
static int test_dwt(int *array, int *ref, int border[2][2], int decomp_levels, int type, int max_diff)
int ff_jpeg2000_dwt_init(DWTContext *s, int border[2][2], int decomp_levels, int type)
Initialize DWT.
Context structure for the Lagged Fibonacci PRNG.
void ff_dwt_destroy(DWTContext *s)
printf("static const uint8_t my_array[100] = {\n")
#define i(width, name, range_min, range_max)
#define FF_DWT_MAX_DECLVLS
max number of decomposition levels
static int array[MAX_W *MAX_W]
static int ref[MAX_W *MAX_W]