diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index c853a34c6c..383e6531c0 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1950,14 +1950,17 @@ int main(void){ s.spatial_decomposition_count=6; s.spatial_decomposition_type=1; + s.temp_dwt_buffer = av_mallocz(width * sizeof(DWTELEM)); + s.temp_idwt_buffer = av_mallocz(width * sizeof(IDWTELEM)); + av_lfg_init(&prng, 1); printf("testing 5/3 DWT\n"); for(i=0; i20) printf("fsck: %6d %12d %7d\n",i, buffer[0][i], buffer[1][i]); @@ -1994,7 +1997,7 @@ int main(void){ memset(buffer[0], 0, sizeof(int)*width*height); buf[w/2 + h/2*stride]= 256*256; - ff_spatial_idwt((IDWTELEM*)buffer[0], width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count); + ff_spatial_idwt((IDWTELEM*)buffer[0], s.temp_idwt_buffer, width, height, width, s.spatial_decomposition_type, s.spatial_decomposition_count); for(y=0; y