static void encode_frame(VC2EncContext *s, const AVFrame *frame,

                         const char *aux_data, int field)

{

    int i;



    /* Sequence header */

    encode_parse_info(s, DIRAC_PCODE_SEQ_HEADER);

    encode_seq_header(s);



    /* Encoder version */

    if (aux_data) {

        encode_parse_info(s, DIRAC_PCODE_AUX);

        avpriv_put_string(&s->pb, aux_data, 1);

    }



    /* Picture header */

    encode_parse_info(s, DIRAC_PCODE_PICTURE_HQ);

    encode_picture_start(s);



    for (i = 0; i < 3; i++) {

        s->transform_args[i].ctx   = s;

        s->transform_args[i].field = field;

        s->transform_args[i].plane = &s->plane[i];

        s->transform_args[i].idata = frame->data[i];

        s->transform_args[i].istride = frame->linesize[i];

    }



    /* Do a DWT transform */

    s->avctx->execute(s->avctx, dwt_plane, s->transform_args, NULL, 3,

                      sizeof(TransformArgs));



    /* Calculate per-slice quantizers and sizes */

    calc_slice_sizes(s);



    /* Init planes and encode slices */

    encode_slices(s);



    /* End sequence */

    encode_parse_info(s, DIRAC_PCODE_END_SEQ);

}

static void encode_frame(VC2EncContext *s, const AVFrame *frame,

                         const char *aux_data, int field)

{

    int i;



    

    encode_parse_info(s, DIRAC_PCODE_SEQ_HEADER);

    encode_seq_header(s);



    

    if (aux_data) {

        encode_parse_info(s, DIRAC_PCODE_AUX);

        avpriv_put_string(&s->pb, aux_data, 1);

    }



    

    encode_parse_info(s, DIRAC_PCODE_PICTURE_HQ);

    encode_picture_start(s);



    for (i = 0; i < 3; i++) {

        s->transform_args[i].ctx   = s;

        s->transform_args[i].field = field;

        s->transform_args[i].plane = &s->plane[i];

        s->transform_args[i].idata = frame->data[i];

        s->transform_args[i].istride = frame->linesize[i];

    }



    

    s->avctx->execute(s->avctx, dwt_plane, s->transform_args, NULL, 3,

                      sizeof(TransformArgs));



    

    calc_slice_sizes(s);



    

    encode_slices(s);



    

    encode_parse_info(s, DIRAC_PCODE_END_SEQ);

}

static void encode_frame(VC2EncContext *s, const AVFrame *frame,                          const char *aux_data, int field)     int i;     for (i = 0; i < 3; i++) {         s->transform_args[i].ctx   = s;         s->transform_args[i].field = field;         s->transform_args[i].plane = &s->plane[i];         s->transform_args[i].idata = frame->data[i];         s->transform_args[i].istride = frame->linesize[i];     s->avctx->execute(s->avctx, dwt_plane, s->transform_args, NULL, 3,                       sizeof(TransformArgs));     calc_slice_sizes(s);
static void FUNC_0(VC2EncContext *VAR_0, const AVFrame *VAR_1,

                         const char *VAR_2, int VAR_3)

{

    int VAR_4;



    

    encode_parse_info(VAR_0, DIRAC_PCODE_SEQ_HEADER);

    encode_seq_header(VAR_0);



    

    if (VAR_2) {

        encode_parse_info(VAR_0, DIRAC_PCODE_AUX);

        avpriv_put_string(&VAR_0->pb, VAR_2, 1);

    }



    

    encode_parse_info(VAR_0, DIRAC_PCODE_PICTURE_HQ);

    encode_picture_start(VAR_0);



    for (VAR_4 = 0; VAR_4 < 3; VAR_4++) {

        VAR_0->transform_args[VAR_4].ctx   = VAR_0;

        VAR_0->transform_args[VAR_4].VAR_3 = VAR_3;

        VAR_0->transform_args[VAR_4].plane = &VAR_0->plane[VAR_4];

        VAR_0->transform_args[VAR_4].idata = VAR_1->data[VAR_4];

        VAR_0->transform_args[VAR_4].istride = VAR_1->linesize[VAR_4];

    }



    

    VAR_0->avctx->execute(VAR_0->avctx, dwt_plane, VAR_0->transform_args, NULL, 3,

                      sizeof(TransformArgs));



    

    calc_slice_sizes(VAR_0);



    

    encode_slices(VAR_0);



    

    encode_parse_info(VAR_0, DIRAC_PCODE_END_SEQ);

}

static void FUNC_0(VC2EncContext *VAR_0, const AVFrame *VAR_1,
const char *VAR_2, int VAR_3)
{ int VAR_4; encode_parse_info(VAR_0, DIRAC_PCODE_SEQ_HEADER); encode_seq_header(VAR_0); if (VAR_2) { encode_parse_info(VAR_0, DIRAC_PCODE_AUX); avpriv_put_string(&VAR_0->pb, VAR_2, 1); } encode_parse_info(VAR_0, DIRAC_PCODE_PICTURE_HQ); encode_picture_start(VAR_0); for (VAR_4 = 0; VAR_4 < 3; VAR_4++) { VAR_0->transform_args[VAR_4].ctx   = VAR_0; VAR_0->transform_args[VAR_4].VAR_3 = VAR_3; VAR_0->transform_args[VAR_4].plane = &VAR_0->plane[VAR_4]; VAR_0->transform_args[VAR_4].idata = VAR_1->data[VAR_4]; VAR_0->transform_args[VAR_4].istride = VAR_1->linesize[VAR_4]; } VAR_0->avctx->execute(VAR_0->avctx, dwt_plane, VAR_0->transform_args, NULL, 3,
sizeof(TransformArgs)); calc_slice_sizes(VAR_0); encode_slices(VAR_0); encode_parse_info(VAR_0, DIRAC_PCODE_END_SEQ); }