Lines Matching defs:pitch
71 ACB_TYPE_ASYMMETRIC = 1, ///< adaptive codebook with per-frame pitch, which
72 ///< we interpolate to get a per-sample pitch.
76 ACB_TYPE_HAMMING = 2 ///< Per-block pitch with signal generation using
164 int min_pitch_val; ///< base value for pitch parsing code
165 int max_pitch_val; ///< max value + 1 for pitch parsing
167 ///< pitch value in the frame header
169 ///< first block's pitch value
170 int block_pitch_range; ///< range of the block pitch
172 ///< delta pitch between this and the last
173 ///< block's pitch value, used in all but
177 uint16_t block_conv_table[4]; ///< boundaries for block pitch unit/scale
223 int last_pitch_val; ///< pitch value of the previous frame
245 ///< cache for pitch-adaptive window pulses
445 av_log(ctx, AV_LOG_ERROR, "Invalid pitch range; broken extradata?\n");
470 av_log(ctx, AV_LOG_ERROR, "Invalid delta pitch hrange; broken extradata?\n");
533 * This function looks back pitch +/- 3 samples back into history to find
540 * @param pitch pitch of the speech signal
548 static int kalman_smoothen(WMAVoiceContext *s, int pitch,
553 const float *ptr = &in[-FFMAX(s->min_pitch_val, pitch - 3)],
554 *end = &in[-FFMIN(s->max_pitch_val, pitch + 3)],
793 * - Kalman smoothing on excitation, based on pitch
806 * @param pitch Pitch of the input signal
811 int fcb_type, int pitch)
823 !kalman_smoothen(s, pitch, zero_exc_pf, synth_filter_in_buf, size))
1028 * The next few functions are for pitch-adaptive window coding.
1032 * Parse the offset of the first pitch-adaptive window pulses, and
1036 * @param pitch pitch for each block in this frame
1039 const int *pitch)
1060 /* for a repeated pulse at pulse_off with a pitch_lag of pitch[], count
1062 s->aw_pulse_range = FFMIN(pitch[0], pitch[1]) > 32 ? 24 : 16;
1063 for (offset = start_offset[bits]; offset < 0; offset += pitch[0]) ;
1064 s->aw_n_pulses[0] = (pitch[0] - 1 + MAX_FRAMESIZE / 2 - offset) / pitch[0];
1066 offset += s->aw_n_pulses[0] * pitch[0];
1067 s->aw_n_pulses[1] = (pitch[1] - 1 + MAX_FRAMESIZE - offset) / pitch[1];
1074 while (s->aw_first_pulse_off[1] - pitch[1] + s->aw_pulse_range > 0)
1075 s->aw_first_pulse_off[1] -= pitch[1];
1077 while (s->aw_first_pulse_off[0] - pitch[0] + s->aw_pulse_range > 0)
1078 s->aw_first_pulse_off[0] -= pitch[0];
1083 * Apply second set of pitch-adaptive window pulses.
1174 * Apply first set of pitch-adaptive window pulses.
1393 int pitch = (pitch_sh16 + 0x6FFF) >> 16;
1394 int idx_sh16 = ((pitch << 16) - pitch_sh16) * 8 + 0x58000;
1406 ff_acelp_interpolatef(&excitation[n], &excitation[n - pitch],
1434 * @param block_pitch_sh2 pitch for this block << 2
1491 int pitch[MAX_BLOCKS], av_uninit(last_block_pitch);
1496 pitch[0] = INT_MAX;
1506 /* Pitch calculation for ACB_TYPE_ASYMMETRIC ("pitch-per-frame") */
1508 /* Pitch is provided per frame, which is interpreted as the pitch of
1510 * the pitch of other blocks (and even pitch-per-sample) by gradually
1521 /* pitch per block */
1525 pitch[n] = (MUL16(fac, cur_pitch_val) +
1530 /* "pitch-diff-per-sample" for calculation of pitch per sample */
1535 /* Global gain (if silence) and pitch-adaptive window coordinates */
1541 aw_parse_coords(s, gb, pitch);
1548 /* Pitch calculation for ACB_TYPE_HAMMING ("pitch-per-block") */
1554 * this pitch value is semi-logarithmic compared to its use in the
1589 pitch[n] = bl_pitch_sh2 >> 2;
1594 bl_pitch_sh2 = pitch[n] << 2;
1598 default: // ACB_TYPE_NONE has no pitch
1615 if(frame_descs[bd_idx].fcb_type >= FCB_TYPE_AW_PULSES && pitch[0] == INT_MAX)
1623 frame_descs[bd_idx].fcb_type, pitch[0]);
1630 frame_descs[bd_idx].fcb_type, pitch[0]);
1646 s->last_pitch_val = pitch[frame_descs[bd_idx].n_blocks - 1];