Exemple #1
0
av_cold void ff_ps_init(void) {
    // Syntax initialization
    static const struct {
        const void *ps_codes, *ps_bits;
        const unsigned int table_size, elem_size;
    } ps_tmp[] = {
        PS_VLC_ROW(huff_iid_df1),
        PS_VLC_ROW(huff_iid_dt1),
        PS_VLC_ROW(huff_iid_df0),
        PS_VLC_ROW(huff_iid_dt0),
        PS_VLC_ROW(huff_icc_df),
        PS_VLC_ROW(huff_icc_dt),
        PS_VLC_ROW(huff_ipd_df),
        PS_VLC_ROW(huff_ipd_dt),
        PS_VLC_ROW(huff_opd_df),
        PS_VLC_ROW(huff_opd_dt),
    };

    PS_INIT_VLC_STATIC(0, 1544);
    PS_INIT_VLC_STATIC(1,  832);
    PS_INIT_VLC_STATIC(2, 1024);
    PS_INIT_VLC_STATIC(3, 1036);
    PS_INIT_VLC_STATIC(4,  544);
    PS_INIT_VLC_STATIC(5,  544);
    PS_INIT_VLC_STATIC(6,  512);
    PS_INIT_VLC_STATIC(7,  512);
    PS_INIT_VLC_STATIC(8,  512);
    PS_INIT_VLC_STATIC(9,  512);

    ps_tableinit();
}
int main(void)
{
    ps_tableinit();

    write_fileheader();

    printf("static const float pd_re_smooth[8*8*8] = {\n");
    write_float_array(pd_re_smooth, 8*8*8);
    printf("};\n");
    printf("static const float pd_im_smooth[8*8*8] = {\n");
    write_float_array(pd_im_smooth, 8*8*8);
    printf("};\n");

    printf("static const float HA[46][8][4] = {\n");
    write_float_3d_array(HA, 46, 8, 4);
    printf("};\n");
    printf("static const float HB[46][8][4] = {\n");
    write_float_3d_array(HB, 46, 8, 4);
    printf("};\n");

    printf("static const float f20_0_8[8][7][2] = {\n");
    write_float_3d_array(f20_0_8, 8, 7, 2);
    printf("};\n");
    printf("static const float f34_0_12[12][7][2] = {\n");
    write_float_3d_array(f34_0_12, 12, 7, 2);
    printf("};\n");
    printf("static const float f34_1_8[8][7][2] = {\n");
    write_float_3d_array(f34_1_8, 8, 7, 2);
    printf("};\n");
    printf("static const float f34_2_4[4][7][2] = {\n");
    write_float_3d_array(f34_2_4, 4, 7, 2);
    printf("};\n");

    printf("static const float Q_fract_allpass[2][50][3][2] = {\n");
    write_float_4d_array(Q_fract_allpass, 2, 50, 3, 2);
    printf("};\n");
    printf("static const float phi_fract[2][50][2] = {\n");
    write_float_3d_array(phi_fract, 2, 50, 2);
    printf("};\n");

    return 0;
}