static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,

                                     unsigned int substr, unsigned int pos)

{

    SubStream *s = &m->substream[substr];

    unsigned int mat, channel;



    for (mat = 0; mat < s->num_primitive_matrices; mat++)

        if (s->lsb_bypass[mat])

            m->bypassed_lsbs[pos + s->blockpos][mat] = get_bits1(gbp);



    for (channel = s->min_channel; channel <= s->max_channel; channel++) {

        ChannelParams *cp = &s->channel_params[channel];

        int codebook = cp->codebook;

        int quant_step_size = s->quant_step_size[channel];

        int lsb_bits = cp->huff_lsbs - quant_step_size;

        int result = 0;



        if (codebook > 0)

            result = get_vlc2(gbp, huff_vlc[codebook-1].table,

                            VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS);



        if (result < 0)

            return AVERROR_INVALIDDATA;



        if (lsb_bits > 0)

            result = (result << lsb_bits) + get_bits(gbp, lsb_bits);



        result  += cp->sign_huff_offset;

        result <<= quant_step_size;



        m->sample_buffer[pos + s->blockpos][channel] = result;

    }



    return 0;

}

static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,

                                     unsigned int substr, unsigned int pos)

{

    SubStream *s = &m->substream[substr];

    unsigned int mat, channel;



    for (mat = 0; mat < s->num_primitive_matrices; mat++)

        if (s->lsb_bypass[mat])

            m->bypassed_lsbs[pos + s->blockpos][mat] = get_bits1(gbp);



    for (channel = s->min_channel; channel <= s->max_channel; channel++) {

        ChannelParams *cp = &s->channel_params[channel];

        int codebook = cp->codebook;

        int quant_step_size = s->quant_step_size[channel];

        int lsb_bits = cp->huff_lsbs - quant_step_size;

        int result = 0;



        if (codebook > 0)

            result = get_vlc2(gbp, huff_vlc[codebook-1].table,

                            VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS);



        if (result < 0)

            return AVERROR_INVALIDDATA;



        if (lsb_bits > 0)

            result = (result << lsb_bits) + get_bits(gbp, lsb_bits);



        result  += cp->sign_huff_offset;

        result <<= quant_step_size;



        m->sample_buffer[pos + s->blockpos][channel] = result;

    }



    return 0;

}

        result <<= quant_step_size;
static inline int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,

                                     unsigned int VAR_2, unsigned int VAR_3)

{

    SubStream *s = &VAR_0->substream[VAR_2];

    unsigned int VAR_4, VAR_5;



    for (VAR_4 = 0; VAR_4 < s->num_primitive_matrices; VAR_4++)

        if (s->lsb_bypass[VAR_4])

            VAR_0->bypassed_lsbs[VAR_3 + s->blockpos][VAR_4] = get_bits1(VAR_1);



    for (VAR_5 = s->min_channel; VAR_5 <= s->max_channel; VAR_5++) {

        ChannelParams *cp = &s->channel_params[VAR_5];

        int codebook = cp->codebook;

        int quant_step_size = s->quant_step_size[VAR_5];

        int lsb_bits = cp->huff_lsbs - quant_step_size;

        int result = 0;



        if (codebook > 0)

            result = get_vlc2(VAR_1, huff_vlc[codebook-1].table,

                            VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS);



        if (result < 0)

            return AVERROR_INVALIDDATA;



        if (lsb_bits > 0)

            result = (result << lsb_bits) + get_bits(VAR_1, lsb_bits);



        result  += cp->sign_huff_offset;

        result <<= quant_step_size;



        VAR_0->sample_buffer[VAR_3 + s->blockpos][VAR_5] = result;

    }



    return 0;

}

static inline int FUNC_0(MLPDecodeContext *VAR_0, GetBitContext *VAR_1,
unsigned int VAR_2, unsigned int VAR_3)
{ SubStream *s = &VAR_0->substream[VAR_2]; unsigned int VAR_4, VAR_5; for (VAR_4 = 0; VAR_4 < s->num_primitive_matrices; VAR_4++) if (s->lsb_bypass[VAR_4])
VAR_0->bypassed_lsbs[VAR_3 + s->blockpos][VAR_4] = get_bits1(VAR_1); for (VAR_5 = s->min_channel; VAR_5 <= s->max_channel; VAR_5++) { ChannelParams *cp = &s->channel_params[VAR_5]; int codebook = cp->codebook; int quant_step_size = s->quant_step_size[VAR_5]; int lsb_bits = cp->huff_lsbs - quant_step_size; int result = 0; if (codebook > 0)
result = get_vlc2(VAR_1, huff_vlc[codebook-1].table,
VLC_BITS, (9 + VLC_BITS - 1) / VLC_BITS); if (result < 0)
return AVERROR_INVALIDDATA; if (lsb_bits > 0)
result = (result << lsb_bits) + get_bits(VAR_1, lsb_bits); result  += cp->sign_huff_offset; result <<= quant_step_size; VAR_0->sample_buffer[VAR_3 + s->blockpos][VAR_5] = result; } return 0; }