static int dca_subsubframe(DCAContext * s)
{
    int k, l;
    int subsubframe = s->current_subsubframe;
    const float *quant_step_table;
    float subband_samples[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];
    if (s->bit_rate == 0x1f)
        quant_step_table = lossless_quant_d;
    else
        quant_step_table = lossy_quant_d;
    for (k = 0; k < s->prim_channels; k++) {
        for (l = 0; l < s->vq_start_subband[k]; l++) {
            int m;
            int abits = s->bitalloc[k][l];
            float quant_step_size = quant_step_table[abits];
            float rscale;
            int sel = s->quant_index_huffman[k][abits];
            if(!abits){
                memset(subband_samples[k][l], 0, 8 * sizeof(subband_samples[0][0][0]));
            }else if(abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table){
                if(abits <= 7){
                    int block_code1, block_code2, size, levels;
                    int block[8];
                    size = abits_sizes[abits-1];
                    levels = abits_levels[abits-1];
                    block_code1 = get_bits(&s->gb, size);
                    decode_blockcode(block_code1, levels, block);
                    block_code2 = get_bits(&s->gb, size);
                    decode_blockcode(block_code2, levels, &block[4]);
                    for (m = 0; m < 8; m++)
                        subband_samples[k][l][m] = block[m];
                }else{
                    for (m = 0; m < 8; m++)
                        subband_samples[k][l][m] = get_sbits(&s->gb, abits - 3);
                }
            }else{
                for (m = 0; m < 8; m++)
                    subband_samples[k][l][m] = get_bitalloc(&s->gb, &dca_smpl_bitalloc[abits], sel);
            }
            if (s->transition_mode[k][l] &&
                subsubframe >= s->transition_mode[k][l])
                rscale = quant_step_size * s->scale_factor[k][l][1];
            else
                rscale = quant_step_size * s->scale_factor[k][l][0];
            rscale *= s->scalefactor_adj[k][sel];
            for (m = 0; m < 8; m++)
                subband_samples[k][l][m] *= rscale;
            if (s->prediction_mode[k][l]) {
                int n;
                for (m = 0; m < 8; m++) {
                    for (n = 1; n <= 4; n++)
                        if (m >= n)
                            subband_samples[k][l][m] +=
                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                 subband_samples[k][l][m - n] / 8192);
                        else if (s->predictor_history)
                            subband_samples[k][l][m] +=
                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *
                                 s->subband_samples_hist[k][l][m - n +
                                                               4] / 8192);
                }
            }
        }
        for (l = s->vq_start_subband[k]; l < s->subband_activity[k]; l++) {
            int m;
            if (!s->debug_flag & 0x01) {
                av_log(s->avctx, AV_LOG_DEBUG, "Stream with high frequencies VQ coding\n");
                s->debug_flag |= 0x01;
            }
            for (m = 0; m < 8; m++) {
                subband_samples[k][l][m] =
                    high_freq_vq[s->high_freq_vq[k][l]][subsubframe * 8 +
                                                        m]
                    * (float) s->scale_factor[k][l][0] / 16.0;
            }
        }
    }
    if (s->aspf || subsubframe == s->subsubframes - 1) {
        if (0xFFFF == get_bits(&s->gb, 16)) {
#ifdef TRACE
            av_log(s->avctx, AV_LOG_DEBUG, "Got subframe DSYNC\n");
#endif
        } else {
            av_log(s->avctx, AV_LOG_ERROR, "Didn't get subframe DSYNC\n");
        }
    }
    for (k = 0; k < s->prim_channels; k++)
        for (l = 0; l < s->vq_start_subband[k]; l++)
            memcpy(s->subband_samples_hist[k][l], &subband_samples[k][l][4],
                        4 * sizeof(subband_samples[0][0][0]));
    for (k = 0; k < s->prim_channels; k++) {
         qmf_32_subbands(s, k, subband_samples[k], &s->samples[256 * k],
                            2.0 / 3   ,
                            0   );
    }
    if (s->prim_channels > dca_channels[s->output & DCA_CHANNEL_MASK]) {
        dca_downmix(s->samples, s->amode, s->downmix_coef);
    }
    if (s->output & DCA_LFE) {
        int lfe_samples = 2 * s->lfe * s->subsubframes;
        int i_channels = dca_channels[s->output & DCA_CHANNEL_MASK];
        lfe_interpolation_fir(s->lfe, 2 * s->lfe,
                              s->lfe_data + lfe_samples +
                              2 * s->lfe * subsubframe,
                              &s->samples[256 * i_channels],
                              256.0, 0  );
    }
    return 0;
}
['static int dca_subsubframe(DCAContext * s)\n{\n    int k, l;\n    int subsubframe = s->current_subsubframe;\n    const float *quant_step_table;\n    float subband_samples[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8];\n    if (s->bit_rate == 0x1f)\n        quant_step_table = lossless_quant_d;\n    else\n        quant_step_table = lossy_quant_d;\n    for (k = 0; k < s->prim_channels; k++) {\n        for (l = 0; l < s->vq_start_subband[k]; l++) {\n            int m;\n            int abits = s->bitalloc[k][l];\n            float quant_step_size = quant_step_table[abits];\n            float rscale;\n            int sel = s->quant_index_huffman[k][abits];\n            if(!abits){\n                memset(subband_samples[k][l], 0, 8 * sizeof(subband_samples[0][0][0]));\n            }else if(abits >= 11 || !dca_smpl_bitalloc[abits].vlc[sel].table){\n                if(abits <= 7){\n                    int block_code1, block_code2, size, levels;\n                    int block[8];\n                    size = abits_sizes[abits-1];\n                    levels = abits_levels[abits-1];\n                    block_code1 = get_bits(&s->gb, size);\n                    decode_blockcode(block_code1, levels, block);\n                    block_code2 = get_bits(&s->gb, size);\n                    decode_blockcode(block_code2, levels, &block[4]);\n                    for (m = 0; m < 8; m++)\n                        subband_samples[k][l][m] = block[m];\n                }else{\n                    for (m = 0; m < 8; m++)\n                        subband_samples[k][l][m] = get_sbits(&s->gb, abits - 3);\n                }\n            }else{\n                for (m = 0; m < 8; m++)\n                    subband_samples[k][l][m] = get_bitalloc(&s->gb, &dca_smpl_bitalloc[abits], sel);\n            }\n            if (s->transition_mode[k][l] &&\n                subsubframe >= s->transition_mode[k][l])\n                rscale = quant_step_size * s->scale_factor[k][l][1];\n            else\n                rscale = quant_step_size * s->scale_factor[k][l][0];\n            rscale *= s->scalefactor_adj[k][sel];\n            for (m = 0; m < 8; m++)\n                subband_samples[k][l][m] *= rscale;\n            if (s->prediction_mode[k][l]) {\n                int n;\n                for (m = 0; m < 8; m++) {\n                    for (n = 1; n <= 4; n++)\n                        if (m >= n)\n                            subband_samples[k][l][m] +=\n                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                 subband_samples[k][l][m - n] / 8192);\n                        else if (s->predictor_history)\n                            subband_samples[k][l][m] +=\n                                (adpcm_vb[s->prediction_vq[k][l]][n - 1] *\n                                 s->subband_samples_hist[k][l][m - n +\n                                                               4] / 8192);\n                }\n            }\n        }\n        for (l = s->vq_start_subband[k]; l < s->subband_activity[k]; l++) {\n            int m;\n            if (!s->debug_flag & 0x01) {\n                av_log(s->avctx, AV_LOG_DEBUG, "Stream with high frequencies VQ coding\\n");\n                s->debug_flag |= 0x01;\n            }\n            for (m = 0; m < 8; m++) {\n                subband_samples[k][l][m] =\n                    high_freq_vq[s->high_freq_vq[k][l]][subsubframe * 8 +\n                                                        m]\n                    * (float) s->scale_factor[k][l][0] / 16.0;\n            }\n        }\n    }\n    if (s->aspf || subsubframe == s->subsubframes - 1) {\n        if (0xFFFF == get_bits(&s->gb, 16)) {\n#ifdef TRACE\n            av_log(s->avctx, AV_LOG_DEBUG, "Got subframe DSYNC\\n");\n#endif\n        } else {\n            av_log(s->avctx, AV_LOG_ERROR, "Didn\'t get subframe DSYNC\\n");\n        }\n    }\n    for (k = 0; k < s->prim_channels; k++)\n        for (l = 0; l < s->vq_start_subband[k]; l++)\n            memcpy(s->subband_samples_hist[k][l], &subband_samples[k][l][4],\n                        4 * sizeof(subband_samples[0][0][0]));\n    for (k = 0; k < s->prim_channels; k++) {\n         qmf_32_subbands(s, k, subband_samples[k], &s->samples[256 * k],\n                            2.0 / 3   ,\n                            0   );\n    }\n    if (s->prim_channels > dca_channels[s->output & DCA_CHANNEL_MASK]) {\n        dca_downmix(s->samples, s->amode, s->downmix_coef);\n    }\n    if (s->output & DCA_LFE) {\n        int lfe_samples = 2 * s->lfe * s->subsubframes;\n        int i_channels = dca_channels[s->output & DCA_CHANNEL_MASK];\n        lfe_interpolation_fir(s->lfe, 2 * s->lfe,\n                              s->lfe_data + lfe_samples +\n                              2 * s->lfe * subsubframe,\n                              &s->samples[256 * i_channels],\n                              256.0, 0  );\n    }\n    return 0;\n}']