Abstract:
The present application discloses a pulse encoding method for use by a voice encoder. An initial number of coding bits is determined according to number of pulses in an input signal. An index value is calculated according to information of the pulses in the input signal. The index value is compared with an adjustment threshold value. If the index value is smaller than the adjustment threshold value, the index value is encoded using a reduced number of encoding bits. If the index value is not smaller than the adjustment threshold value, the index value plus an offset value is encoded using the initial number of encoding bits. The reduced number of encoding bits is smaller than the initial number of encoding bits, and the offset value is greater than or equal to the adjustment threshold value.
Abstract:
The present invention discloses a method and a device for pulse encoding, and a method and a device for pulse decoding. The method for pulse encoding includes: calculating an index value of an input pulse; selecting an adjustment threshold value according to the number of pulses, and comparing the index value of the pulse with the adjustment threshold value; if the index value is smaller than the adjustment threshold value, adopting the first number of encoding bits to encode the index value, if the index value is not smaller than the adjustment threshold value, adopting the second number of encoding bits to encode the index value plus an offset value, where the first number is smaller than the second number, the first number and the second number are both positive integers, and the offset value is greater than or equal to the adjustment threshold value.
Abstract:
The present invention discloses a method and a device for pulse encoding, and a method and a device for pulse decoding. The method for pulse encoding includes: calculating an index value of an input pulse; selecting an adjustment threshold value according to the number of pulses, and comparing the index value of the pulse with the adjustment threshold value; if the index value is smaller than the adjustment threshold value, adopting the first number of encoding bits to encode the index value, if the index value is not smaller than the adjustment threshold value, adopting the second number of encoding bits to encode the index value plus an offset value, where the first number is smaller than the second number, the first number and the second number are both positive integers, and the offset value is greater than or equal to the adjustment threshold value.