diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-06-14 11:47:55 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-06-17 23:20:10 +0100 |
commit | d9669eab0b8709f66d0872671511cb9487ea2651 (patch) | |
tree | e5bfe25fa298d33761ef5e4ee6a01f9198bcaed6 /libavcodec/snowenc.c | |
parent | 8e50c57dcb481479f2fd46f9bdb6a9776b0d9fa6 (diff) | |
download | ffmpeg-streaming-d9669eab0b8709f66d0872671511cb9487ea2651.zip ffmpeg-streaming-d9669eab0b8709f66d0872671511cb9487ea2651.tar.gz |
dwt: remove variable-length arrays
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 7b010e1..7e3b68f 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -93,7 +93,7 @@ static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, i //FIXME pass the copy cleanly ? // memcpy(dwt_buffer, buffer, height * stride * sizeof(DWTELEM)); - ff_spatial_dwt(buffer, width, height, stride, type, s->spatial_decomposition_count); + ff_spatial_dwt(buffer, s->temp_dwt_buffer, width, height, stride, type, s->spatial_decomposition_count); for(level=0; level<s->spatial_decomposition_count; level++){ for(orientation=level ? 1 : 0; orientation<4; orientation++){ @@ -118,7 +118,7 @@ static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, i for(xs= 0; xs<Q2_STEP; xs++){ memcpy(idwt2_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); dequantize_all(s, p, idwt2_buffer, width, height); - ff_spatial_idwt(idwt2_buffer, width, height, stride, type, s->spatial_decomposition_count); + ff_spatial_idwt(idwt2_buffer, s->temp_idwt_buffer, width, height, stride, type, s->spatial_decomposition_count); find_sse(s, p, best_score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); memcpy(idwt2_buffer, best_dequant, height * stride * sizeof(IDWTELEM)); for(y=ys; y<b->height; y+= Q2_STEP){ @@ -129,7 +129,7 @@ static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, i } } dequantize_all(s, p, idwt2_buffer, width, height); - ff_spatial_idwt(idwt2_buffer, width, height, stride, type, s->spatial_decomposition_count); + ff_spatial_idwt(idwt2_buffer, s->temp_idwt_buffer, width, height, stride, type, s->spatial_decomposition_count); find_sse(s, p, score, score_stride, idwt2_buffer, s->spatial_idwt_buffer, level, orientation); for(y=ys; y<b->height; y+= Q2_STEP){ for(x=xs; x<b->width; x+= Q2_STEP){ @@ -1586,7 +1586,7 @@ static void calculate_visual_weight(SnowContext *s, Plane *p){ memset(s->spatial_idwt_buffer, 0, sizeof(*s->spatial_idwt_buffer)*width*height); ibuf[b->width/2 + b->height/2*b->stride]= 256*16; - ff_spatial_idwt(s->spatial_idwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); + ff_spatial_idwt(s->spatial_idwt_buffer, s->temp_idwt_buffer, width, height, width, s->spatial_decomposition_type, s->spatial_decomposition_count); for(y=0; y<height; y++){ for(x=0; x<width; x++){ int64_t d= s->spatial_idwt_buffer[x + y*width]*16; @@ -1775,7 +1775,7 @@ redo_frame: /* if(QUANTIZE2) dwt_quantize(s, p, s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type); else*/ - ff_spatial_dwt(s->spatial_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); + ff_spatial_dwt(s->spatial_dwt_buffer, s->temp_dwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); if(s->pass1_rc && plane_index==0){ int delta_qlog = ratecontrol_1pass(s, pic); @@ -1814,7 +1814,7 @@ redo_frame: } } - ff_spatial_idwt(s->spatial_idwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); + ff_spatial_idwt(s->spatial_idwt_buffer, s->temp_idwt_buffer, w, h, w, s->spatial_decomposition_type, s->spatial_decomposition_count); if(s->qlog == LOSSLESS_QLOG){ for(y=0; y<h; y++){ for(x=0; x<w; x++){ |