static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
    int      smp = bd->block_length - 1;
    int32_t  val = *bd->raw_samples;
    int32_t *dst = bd->raw_samples + 1;
    for (; smp; smp--)
        *dst++ = val;
}
['static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,\n                         unsigned int c, const unsigned int *div_blocks,\n                         unsigned int *js_blocks)\n{\n    ALSSpecificConfig *sconf = &ctx->sconf;\n    unsigned int offset = 0;\n    unsigned int b;\n    int ret;\n    ALSBlockData bd[2] = { { 0 } };\n    bd[0].ra_block         = ra_frame;\n    bd[0].const_block      = ctx->const_block;\n    bd[0].shift_lsbs       = ctx->shift_lsbs;\n    bd[0].opt_order        = ctx->opt_order;\n    bd[0].store_prev_samples = ctx->store_prev_samples;\n    bd[0].use_ltp          = ctx->use_ltp;\n    bd[0].ltp_lag          = ctx->ltp_lag;\n    bd[0].ltp_gain         = ctx->ltp_gain[0];\n    bd[0].quant_cof        = ctx->quant_cof[0];\n    bd[0].lpc_cof          = ctx->lpc_cof[0];\n    bd[0].prev_raw_samples = ctx->prev_raw_samples;\n    bd[0].js_blocks        = *js_blocks;\n    bd[1].ra_block         = ra_frame;\n    bd[1].const_block      = ctx->const_block;\n    bd[1].shift_lsbs       = ctx->shift_lsbs;\n    bd[1].opt_order        = ctx->opt_order;\n    bd[1].store_prev_samples = ctx->store_prev_samples;\n    bd[1].use_ltp          = ctx->use_ltp;\n    bd[1].ltp_lag          = ctx->ltp_lag;\n    bd[1].ltp_gain         = ctx->ltp_gain[0];\n    bd[1].quant_cof        = ctx->quant_cof[0];\n    bd[1].lpc_cof          = ctx->lpc_cof[0];\n    bd[1].prev_raw_samples = ctx->prev_raw_samples;\n    bd[1].js_blocks        = *(js_blocks + 1);\n    for (b = 0; b < ctx->num_blocks; b++) {\n        unsigned int s;\n        bd[0].block_length = div_blocks[b];\n        bd[1].block_length = div_blocks[b];\n        bd[0].raw_samples  = ctx->raw_samples[c    ] + offset;\n        bd[1].raw_samples  = ctx->raw_samples[c + 1] + offset;\n        bd[0].raw_other    = bd[1].raw_samples;\n        bd[1].raw_other    = bd[0].raw_samples;\n        if ((ret = read_decode_block(ctx, &bd[0])) < 0 ||\n            (ret = read_decode_block(ctx, &bd[1])) < 0)\n            goto fail;\n        if (bd[0].js_blocks) {\n            if (bd[1].js_blocks)\n                av_log(ctx->avctx, AV_LOG_WARNING, "Invalid channel pair!\\n");\n            for (s = 0; s < div_blocks[b]; s++)\n                bd[0].raw_samples[s] = bd[1].raw_samples[s] - bd[0].raw_samples[s];\n        } else if (bd[1].js_blocks) {\n            for (s = 0; s < div_blocks[b]; s++)\n                bd[1].raw_samples[s] = bd[1].raw_samples[s] + bd[0].raw_samples[s];\n        }\n        offset  += div_blocks[b];\n        bd[0].ra_block = 0;\n        bd[1].ra_block = 0;\n    }\n    memmove(ctx->raw_samples[c] - sconf->max_order,\n            ctx->raw_samples[c] - sconf->max_order + sconf->frame_length,\n            sizeof(*ctx->raw_samples[c]) * sconf->max_order);\n    return 0;\nfail:\n    zero_remaining(b, ctx->num_blocks, div_blocks, bd[0].raw_samples);\n    zero_remaining(b, ctx->num_blocks, div_blocks, bd[1].raw_samples);\n    return ret;\n}', 'static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int ret;\n    if ((ret = read_block(ctx, bd)) < 0)\n        return ret;\n    return decode_block(ctx, bd);\n}', 'static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    unsigned int smp;\n    int ret = 0;\n    if (*bd->const_block)\n        decode_const_block_data(ctx, bd);\n    else\n        ret = decode_var_block_data(ctx, bd);\n    if (ret < 0)\n        return ret;\n    if (*bd->shift_lsbs)\n        for (smp = 0; smp < bd->block_length; smp++)\n            bd->raw_samples[smp] <<= *bd->shift_lsbs;\n    return 0;\n}', 'static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int      smp = bd->block_length - 1;\n    int32_t  val = *bd->raw_samples;\n    int32_t *dst = bd->raw_samples + 1;\n    for (; smp; smp--)\n        *dst++ = val;\n}']