void ff_slice_buffer_init(slice_buffer *buf, int line_count,

                          int max_allocated_lines, int line_width,

                          IDWTELEM *base_buffer)

{

    int i;



    buf->base_buffer = base_buffer;

    buf->line_count  = line_count;

    buf->line_width  = line_width;

    buf->data_count  = max_allocated_lines;

    buf->line        = av_mallocz(sizeof(IDWTELEM *) * line_count);

    buf->data_stack  = av_malloc(sizeof(IDWTELEM *) * max_allocated_lines);



    for (i = 0; i < max_allocated_lines; i++)

        buf->data_stack[i] = av_malloc(sizeof(IDWTELEM) * line_width);



    buf->data_stack_top = max_allocated_lines - 1;

}

void ff_slice_buffer_init(slice_buffer *buf, int line_count,

                          int max_allocated_lines, int line_width,

                          IDWTELEM *base_buffer)

{

    int i;



    buf->base_buffer = base_buffer;

    buf->line_count  = line_count;

    buf->line_width  = line_width;

    buf->data_count  = max_allocated_lines;

    buf->line        = av_mallocz(sizeof(IDWTELEM *) * line_count);

    buf->data_stack  = av_malloc(sizeof(IDWTELEM *) * max_allocated_lines);



    for (i = 0; i < max_allocated_lines; i++)

        buf->data_stack[i] = av_malloc(sizeof(IDWTELEM) * line_width);



    buf->data_stack_top = max_allocated_lines - 1;

}

void FUNC_0(slice_buffer *VAR_0, int VAR_1,

                          int VAR_2, int VAR_3,

                          IDWTELEM *VAR_4)

{

    int VAR_5;



    VAR_0->VAR_4 = VAR_4;

    VAR_0->VAR_1  = VAR_1;

    VAR_0->VAR_3  = VAR_3;

    VAR_0->data_count  = VAR_2;

    VAR_0->line        = av_mallocz(sizeof(IDWTELEM *) * VAR_1);

    VAR_0->data_stack  = av_malloc(sizeof(IDWTELEM *) * VAR_2);



    for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++)

        VAR_0->data_stack[VAR_5] = av_malloc(sizeof(IDWTELEM) * VAR_3);



    VAR_0->data_stack_top = VAR_2 - 1;

}

void FUNC_0(slice_buffer *VAR_0, int VAR_1,
int VAR_2, int VAR_3,
IDWTELEM *VAR_4)
{ int VAR_5; VAR_0->VAR_4 = VAR_4; VAR_0->VAR_1  = VAR_1; VAR_0->VAR_3  = VAR_3; VAR_0->data_count  = VAR_2; VAR_0->line        = av_mallocz(sizeof(IDWTELEM *) * VAR_1); VAR_0->data_stack  = av_malloc(sizeof(IDWTELEM *) * VAR_2); for (VAR_5 = 0; VAR_5 < VAR_2; VAR_5++) VAR_0->data_stack[VAR_5] = av_malloc(sizeof(IDWTELEM) * VAR_3); VAR_0->data_stack_top = VAR_2 - 1; }