Revision 33996217 libavcodec/snow.c

View differences:

libavcodec/snow.c
2081 2081
    common_init_after_header(avctx);
2082 2082

  
2083 2083
    // realloc slice buffer for the case that spatial_decomposition_count changed
2084
    slice_buffer_destroy(&s->sb);
2085
    slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer);
2084
    ff_slice_buffer_destroy(&s->sb);
2085
    ff_slice_buffer_init(&s->sb, s->plane[0].height, (MB_SIZE >> s->block_max_depth) + s->spatial_decomposition_count * 8 + 1, s->plane[0].width, s->spatial_idwt_buffer);
2086 2086

  
2087 2087
    for(plane_index=0; plane_index<3; plane_index++){
2088 2088
        Plane *p= &s->plane[plane_index];
......
2199 2199
            y = FFMIN(p->height, slice_starty);
2200 2200
            end_y = FFMIN(p->height, slice_h);
2201 2201
            while(y < end_y)
2202
                slice_buffer_release(&s->sb, y++);
2202
                ff_slice_buffer_release(&s->sb, y++);
2203 2203
        }
2204 2204

  
2205
        slice_buffer_flush(&s->sb);
2205
        ff_slice_buffer_flush(&s->sb);
2206 2206
        }
2207 2207

  
2208 2208
    }
......
2228 2228
{
2229 2229
    SnowContext *s = avctx->priv_data;
2230 2230

  
2231
    slice_buffer_destroy(&s->sb);
2231
    ff_slice_buffer_destroy(&s->sb);
2232 2232

  
2233 2233
    common_end(s);
2234 2234

  
......
2829 2829
         * to improve the score of the whole frame, thus iterative motion
2830 2830
         * estimation does not always converge. */
2831 2831
        if(s->avctx->me_cmp == FF_CMP_W97)
2832
            distortion = w97_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
2832
            distortion = ff_w97_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
2833 2833
        else if(s->avctx->me_cmp == FF_CMP_W53)
2834
            distortion = w53_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
2834
            distortion = ff_w53_32_c(&s->m, src + sx + sy*ref_stride, dst + sx + sy*ref_stride, ref_stride, 32);
2835 2835
        else{
2836 2836
            distortion = 0;
2837 2837
            for(i=0; i<4; i++){

Also available in: Unified diff