37 s.spatial_decomposition_count=6;
38 s.spatial_decomposition_type=1;
43 if (!
s.temp_dwt_buffer || !
s.temp_idwt_buffer) {
44 fprintf(stderr,
"Failed to allocate memory\n");
50 printf(
"testing 5/3 DWT\n");
60 printf(
"testing 9/7 DWT\n");
61 s.spatial_decomposition_type=0;
72 int level, orientation, x, y;
76 memset(errors, 0,
sizeof(errors));
77 s.spatial_decomposition_count=3;
78 s.spatial_decomposition_type=0;
80 for(orientation=
level ? 1 : 0; orientation<4; orientation++){
87 if(orientation&1) buf+=
w;
88 if(orientation>1) buf+=
stride>>1;
94 for(x=0; x<
width; x++){
107 printf(
"static int const visual_weight[][4]={\n");
110 for(orientation=0; orientation<4; orientation++){
111 printf(
"%8"PRId64
",", errors[
level][orientation]/
g);
129 for(x=0; x<
width; x++){
130 int tab[4]={0,2,3,1};
136 for(x=0; x<
width; x++){
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
int64_t av_gcd(int64_t a, int64_t b)
Compute the greatest common divisor of two integer operands.
void * av_mallocz_array(size_t nmemb, size_t size)
Allocate a memory block for an array with av_mallocz().
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
void ff_spatial_idwt(IDWTELEM *buffer, IDWTELEM *temp, int width, int height, int stride, int type, int decomposition_count)
void ff_spatial_dwt(DWTELEM *buffer, DWTELEM *temp, int width, int height, int stride, int type, int decomposition_count)
Context structure for the Lagged Fibonacci PRNG.
static void error(const char *err)
static const struct twinvq_data tab