Go to the documentation of this file.
   36         fprintf(stderr, 
"ff_jpeg2000_dwt_init failed\n");
 
   41         fprintf(stderr, 
"ff_dwt_encode failed\n");
 
   46         fprintf(stderr, 
"ff_dwt_encode failed\n");
 
   51             fprintf(stderr, 
"missmatch at %d (%d != %d) decomp:%d border %d %d %d %d\n",
 
   52                     j, 
array[j], 
ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
 
   60     printf(
"%s, decomp:%2d border %3d %3d %3d %3d milli-err2:%9"PRId64
"\n",
 
   62            decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1],
 
   63            1000*err2 / ((border[0][1] - border[0][0])*(border[1][1] - border[1][0])));
 
   68 static int test_dwtf(
float *
array, 
float *
ref, 
int border[2][2], 
int decomp_levels, 
float max_diff) {
 
   75         fprintf(stderr, 
"ff_jpeg2000_dwt_init failed\n");
 
   80         fprintf(stderr, 
"ff_dwt_encode failed\n");
 
   85         fprintf(stderr, 
"ff_dwt_encode failed\n");
 
   90             fprintf(stderr, 
"missmatch at %d (%f != %f) decomp:%d border %d %d %d %d\n",
 
   91                     j, 
array[j], 
ref[j],decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1]);
 
   99     printf(
"9/7f, decomp:%2d border %3d %3d %3d %3d err2:%20.3f\n",
 
  100            decomp_levels, border[0][0], border[0][1], border[1][0], border[1][1],
 
  101            err2 / ((border[0][1] - border[0][0])*(border[1][1] - border[1][0])));
 
  115     int ret, decomp_levels;
 
  122     for (
i = 0; 
i < 100; 
i++) {
 
  125         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]