Lines Matching refs:lpc
79 AlacLPCContext lpc[2]; member
160 s->lpc[ch].lpc_order = 6; in calc_predictor_params()
161 s->lpc[ch].lpc_quant = 6; in calc_predictor_params()
162 s->lpc[ch].lpc_coeff[0] = 160; in calc_predictor_params()
163 s->lpc[ch].lpc_coeff[1] = -190; in calc_predictor_params()
164 s->lpc[ch].lpc_coeff[2] = 170; in calc_predictor_params()
165 s->lpc[ch].lpc_coeff[3] = -130; in calc_predictor_params()
166 s->lpc[ch].lpc_coeff[4] = 80; in calc_predictor_params()
167 s->lpc[ch].lpc_coeff[5] = -25; in calc_predictor_params()
178 s->lpc[ch].lpc_order = opt_order; in calc_predictor_params()
179 s->lpc[ch].lpc_quant = shift[opt_order-1]; in calc_predictor_params()
180 memcpy(s->lpc[ch].lpc_coeff, coefs[opt_order-1], opt_order*sizeof(int)); in calc_predictor_params()
260 AlacLPCContext lpc = s->lpc[ch]; in alac_linear_predictor() local
263 if (lpc.lpc_order == 31) { in alac_linear_predictor()
276 if (lpc.lpc_order > 0) { in alac_linear_predictor()
281 for (i = 1; i <= lpc.lpc_order; i++) in alac_linear_predictor()
285 for (i = lpc.lpc_order + 1; i < s->frame_size; i++) { in alac_linear_predictor()
286 int sum = 1 << (lpc.lpc_quant - 1), res_val, j; in alac_linear_predictor()
288 for (j = 0; j < lpc.lpc_order; j++) { in alac_linear_predictor()
289 sum += (samples[lpc.lpc_order-j] - samples[0]) * in alac_linear_predictor()
290 lpc.lpc_coeff[j]; in alac_linear_predictor()
293 sum >>= lpc.lpc_quant; in alac_linear_predictor()
295 residual[i] = sign_extend(samples[lpc.lpc_order+1] - sum, in alac_linear_predictor()
300 int index = lpc.lpc_order - 1; in alac_linear_predictor()
304 int val = samples[0] - samples[lpc.lpc_order - index]; in alac_linear_predictor()
310 lpc.lpc_coeff[index] -= sign; in alac_linear_predictor()
312 res_val -= (val >> lpc.lpc_quant) * (lpc.lpc_order - index); in alac_linear_predictor()
426 put_bits(pb, 4, s->lpc[i].lpc_quant); in write_element()
429 put_bits(pb, 5, s->lpc[i].lpc_order); in write_element()
431 for (j = 0; j < s->lpc[i].lpc_order; j++) in write_element()
432 put_sbits(pb, 16, s->lpc[i].lpc_coeff[j]); in write_element()