static void calc_slice_sizes(VC2EncContext *s)

{

    int slice_x, slice_y;

    SliceArgs *enc_args = s->slice_args;



    for (slice_y = 0; slice_y < s->num_y; slice_y++) {

        for (slice_x = 0; slice_x < s->num_x; slice_x++) {

            SliceArgs *args = &enc_args[s->num_x*slice_y + slice_x];

            args->ctx = s;

            args->x = slice_x;

            args->y = slice_y;

            args->bits_ceil = s->slice_max_bytes << 3;

            args->bits_floor = s->slice_min_bytes << 3;

            memset(args->cache, 0, MAX_QUANT_INDEX*sizeof(*args->cache));

        }

    }



    /* Determine quantization indices and bytes per slice */

    s->avctx->execute(s->avctx, rate_control, enc_args, NULL, s->num_x*s->num_y,

                      sizeof(SliceArgs));

}

static void calc_slice_sizes(VC2EncContext *s)

{

    int slice_x, slice_y;

    SliceArgs *enc_args = s->slice_args;



    for (slice_y = 0; slice_y < s->num_y; slice_y++) {

        for (slice_x = 0; slice_x < s->num_x; slice_x++) {

            SliceArgs *args = &enc_args[s->num_x*slice_y + slice_x];

            args->ctx = s;

            args->x = slice_x;

            args->y = slice_y;

            args->bits_ceil = s->slice_max_bytes << 3;

            args->bits_floor = s->slice_min_bytes << 3;

            memset(args->cache, 0, MAX_QUANT_INDEX*sizeof(*args->cache));

        }

    }



    

    s->avctx->execute(s->avctx, rate_control, enc_args, NULL, s->num_x*s->num_y,

                      sizeof(SliceArgs));

}

static void calc_slice_sizes(VC2EncContext *s)     int slice_x, slice_y;             args->x = slice_x;             args->y = slice_y;             args->bits_ceil = s->slice_max_bytes << 3;             memset(args->cache, 0, MAX_QUANT_INDEX*sizeof(*args->cache));     for (slice_y = 0; slice_y < s->num_y; slice_y++) {         for (slice_x = 0; slice_x < s->num_x; slice_x++) {             SliceArgs *args = &enc_args[s->num_x*slice_y + slice_x];     for (slice_y = 0; slice_y < s->num_y; slice_y++) {         for (slice_x = 0; slice_x < s->num_x; slice_x++) {
static void FUNC_0(VC2EncContext *VAR_0)

{

    int VAR_1, VAR_2;

    SliceArgs *enc_args = VAR_0->slice_args;



    for (VAR_2 = 0; VAR_2 < VAR_0->num_y; VAR_2++) {

        for (VAR_1 = 0; VAR_1 < VAR_0->num_x; VAR_1++) {

            SliceArgs *args = &enc_args[VAR_0->num_x*VAR_2 + VAR_1];

            args->ctx = VAR_0;

            args->x = VAR_1;

            args->y = VAR_2;

            args->bits_ceil = VAR_0->slice_max_bytes << 3;

            args->bits_floor = VAR_0->slice_min_bytes << 3;

            memset(args->cache, 0, MAX_QUANT_INDEX*sizeof(*args->cache));

        }

    }



    

    VAR_0->avctx->execute(VAR_0->avctx, rate_control, enc_args, NULL, VAR_0->num_x*VAR_0->num_y,

                      sizeof(SliceArgs));

}

static void FUNC_0(VC2EncContext *VAR_0)
{ int VAR_1, VAR_2; SliceArgs *enc_args = VAR_0->slice_args; for (VAR_2 = 0; VAR_2 < VAR_0->num_y; VAR_2++) { for (VAR_1 = 0; VAR_1 < VAR_0->num_x; VAR_1++) { SliceArgs *args = &enc_args[VAR_0->num_x*VAR_2 + VAR_1]; args->ctx = VAR_0; args->x = VAR_1; args->y = VAR_2; args->bits_ceil = VAR_0->slice_max_bytes << 3; args->bits_floor = VAR_0->slice_min_bytes << 3; memset(args->cache, 0, MAX_QUANT_INDEX*sizeof(*args->cache)); } } VAR_0->avctx->execute(VAR_0->avctx, rate_control, enc_args, NULL, VAR_0->num_x*VAR_0->num_y,
sizeof(SliceArgs)); }