Lines Matching refs:gbp

255 static inline int read_huff_channels(MLPDecodeContext *m, GetBitContext *gbp,
263 m->bypassed_lsbs[pos + s->blockpos][mat] = get_bits1(gbp);
273 result = get_vlc2(gbp, huff_vlc[codebook-1].table,
280 result = (result << lsb_bits) + get_bits_long(gbp, lsb_bits);
502 static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
510 int start_count = get_bits_count(gbp);
516 sync_word = get_bits(gbp, 13);
524 noise_type = get_bits1(gbp);
531 skip_bits(gbp, 16); /* Output timestamp */
533 min_channel = get_bits(gbp, 4);
534 max_channel = get_bits(gbp, 4);
535 max_matrix_channel = get_bits(gbp, 4);
580 s->noise_shift = get_bits(gbp, 4);
581 s->noisegen_seed = get_bits(gbp, 23);
583 skip_bits(gbp, 19);
585 s->data_check_present = get_bits1(gbp);
586 lossless_check = get_bits(gbp, 8);
596 skip_bits(gbp, 16);
601 int ch_assign = get_bits(gbp, 6);
618 checksum = ff_mlp_restart_checksum(buf, get_bits_count(gbp) - start_count);
620 if (checksum != get_bits(gbp, 8))
674 static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
692 order = get_bits(gbp, 4);
705 fp->shift = get_bits(gbp, 4);
707 coeff_bits = get_bits(gbp, 5);
708 coeff_shift = get_bits(gbp, 3);
723 fcoeff[i] = get_sbits(gbp, coeff_bits) * (1 << coeff_shift);
725 if (get_bits1(gbp)) {
734 state_bits = get_bits(gbp, 4);
735 state_shift = get_bits(gbp, 4);
740 fp->state[i] = state_bits ? get_sbits(gbp, state_bits) * (1 << state_shift) : 0;
749 static int read_matrix_params(MLPDecodeContext *m, unsigned int substr, GetBitContext *gbp)
762 s->num_primitive_matrices = get_bits(gbp, 4);
773 s->matrix_out_ch[mat] = get_bits(gbp, 4);
774 frac_bits = get_bits(gbp, 4);
775 s->lsb_bypass [mat] = get_bits1(gbp);
795 if (get_bits1(gbp))
796 coeff_val = get_sbits(gbp, frac_bits + 2);
802 s->matrix_noise_shift[mat] = get_bits(gbp, 4);
818 GetBitContext *gbp, unsigned int ch)
827 if (get_bits1(gbp))
828 if ((ret = read_filter_params(m, gbp, substr, ch, FIR)) < 0)
832 if (get_bits1(gbp))
833 if ((ret = read_filter_params(m, gbp, substr, ch, IIR)) < 0)
856 if (get_bits1(gbp))
857 cp->huff_offset = get_sbits(gbp, 15);
859 cp->codebook = get_bits(gbp, 2);
860 cp->huff_lsbs = get_bits(gbp, 5);
874 static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp,
883 if (get_bits1(gbp))
884 s->param_presence_flags = get_bits(gbp, 8);
887 if (get_bits1(gbp)) {
888 s->blocksize = get_bits(gbp, 9);
897 if (get_bits1(gbp))
898 if ((ret = read_matrix_params(m, substr, gbp)) < 0)
902 if (get_bits1(gbp)) {
904 s->output_shift[ch] = get_sbits(gbp, 4);
918 if (get_bits1(gbp))
920 s->quant_step_size[ch] = get_bits(gbp, 4);
926 if (get_bits1(gbp)) {
928 if ((ret = read_channel_params(m, substr, gbp, ch)) < 0)
984 static int read_block_data(MLPDecodeContext *m, GetBitContext *gbp,
992 expected_stream_pos = get_bits_count(gbp);
993 expected_stream_pos += get_bits(gbp, 16);
1007 if ((ret = read_huff_channels(m, gbp, substr, i)) < 0)
1016 if (get_bits_count(gbp) != expected_stream_pos)
1018 skip_bits(gbp, 8);