static int xvid_ff_2pass_after(struct xvid_context *ref,

                                xvid_plg_data_t *param) {

    char *log = ref->twopassbuffer;

    const char *frame_types = " ipbs";

    char frame_type;



    /* Quick bounds check */

    if( log == NULL )

        return XVID_ERR_FAIL;



    /* Convert the type given to us into a character */

    if( param->type < 5 && param->type > 0 ) {

        frame_type = frame_types[param->type];

    } else {

        return XVID_ERR_FAIL;

    }



    snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log),

        "%c %d %d %d %d %d %d\n",

        frame_type, param->stats.quant, param->stats.kblks, param->stats.mblks,

        param->stats.ublks, param->stats.length, param->stats.hlength);



    return 0;

}

static int xvid_ff_2pass_after(struct xvid_context *ref,

                                xvid_plg_data_t *param) {

    char *log = ref->twopassbuffer;

    const char *frame_types = " ipbs";

    char frame_type;



    

    if( log == NULL )

        return XVID_ERR_FAIL;



    

    if( param->type < 5 && param->type > 0 ) {

        frame_type = frame_types[param->type];

    } else {

        return XVID_ERR_FAIL;

    }



    snprintf(BUFFER_CAT(log), BUFFER_REMAINING(log),

        "%c %d %d %d %d %d %d\n",

        frame_type, param->stats.quant, param->stats.kblks, param->stats.mblks,

        param->stats.ublks, param->stats.length, param->stats.hlength);



    return 0;

}

static int FUNC_0(struct xvid_context *VAR_0,

                                xvid_plg_data_t *VAR_1) {

    char *VAR_2 = VAR_0->twopassbuffer;

    const char *VAR_3 = " ipbs";

    char VAR_4;



    

    if( VAR_2 == NULL )

        return XVID_ERR_FAIL;



    

    if( VAR_1->type < 5 && VAR_1->type > 0 ) {

        VAR_4 = VAR_3[VAR_1->type];

    } else {

        return XVID_ERR_FAIL;

    }



    snprintf(BUFFER_CAT(VAR_2), BUFFER_REMAINING(VAR_2),

        "%c %d %d %d %d %d %d\n",

        VAR_4, VAR_1->stats.quant, VAR_1->stats.kblks, VAR_1->stats.mblks,

        VAR_1->stats.ublks, VAR_1->stats.length, VAR_1->stats.hlength);



    return 0;

}

static int FUNC_0(struct xvid_context *VAR_0,
xvid_plg_data_t *VAR_1) { char *VAR_2 = VAR_0->twopassbuffer; const char *VAR_3 = " ipbs"; char VAR_4; if( VAR_2 == NULL )
return XVID_ERR_FAIL; if( VAR_1->type < 5 && VAR_1->type > 0 ) { VAR_4 = VAR_3[VAR_1->type]; } else { return XVID_ERR_FAIL; } snprintf(BUFFER_CAT(VAR_2), BUFFER_REMAINING(VAR_2),
"%c %d %d %d %d %d %d\n",
VAR_4, VAR_1->stats.quant, VAR_1->stats.kblks, VAR_1->stats.mblks,
VAR_1->stats.ublks, VAR_1->stats.length, VAR_1->stats.hlength); return 0; }