Encoding method, encoding device, decoding method, decoding device, and transmission system
Through multi-description quantization technology, the encoded signal is quantized twice to generate multi-description quantization signals, which solves the problem of weak packet loss resistance in RTC music scenes and improves audio quality and fluency.
Patent Information
- Application Number
- PCT/CN2025/074234
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-02
- Filing Date
- 2025-01-23
- Publication Date
- 2025-08-07
AI Technical Summary
The prior art has weak packet loss resistance in RTC music scenes, resulting in poor audio quality, especially in weak network conditions.
Multi-description quantization technology is adopted to generate multi-description quantization signals by performing two quantization processes on the signal to be encoded, and multi-description signal technology is used to combat packet loss problems and improve audio quality.
It improves the packet loss capability and quality of audio under weak network conditions, reduces bandwidth overhead and end-to-end delay, and improves audio fluency.
Smart Images

Figure CN2025074234_07082025_PF_FP_ABST
Abstract
Description
Coding method, coding device, decoding method, decoding device and transmission system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on and claims priority to an application filed in China with application number 202410153849.6 and filing date February 2, 2024. The disclosure of the application in China is hereby incorporated as a whole into this application. Technical Field
[0003] The present disclosure relates to the field of signal processing technology, and in particular to an encoding method, an encoding device, a decoding method, a decoding device, a transmission system, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0004] Interactive entertainment applications encompass a wide range of music-related scenarios beyond social interaction. These include live streaming, chorus singing, and Karaoke TV (Karaoke TV). In these music scenarios, users generally have high quality requirements and expect a smooth music experience, even on weak network connections.
[0005] In the related art, in an RTC (Real-Time Communication) music scenario, a PLC (Packet Loss Concealment) algorithm in the Opus music coding mode is used as an anti-packet loss technology. Summary of the Invention
[0006] According to some embodiments of the present disclosure, a coding method is provided, including: performing a first quantization process on a signal to be coded to obtain an initial quantization signal; performing a second quantization process on the signal to be coded to obtain a first multi-description quantization signal, wherein a first number of pulses used in the first quantization process is greater than a second number of pulses used in the second quantization process; obtaining a second multi-description quantization signal of the signal to be coded based on the initial quantization signal and the first multi-description quantization signal; and generating a code stream based on the first multi-description quantization signal and the second multi-description quantization signal.
[0007] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0008] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0009] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0010] In some embodiments, obtaining a second multi-description quantization signal of a signal to be encoded includes: obtaining a candidate multi-description quantization signal based on an initial quantization signal and a first multi-description quantization signal; in response to a fourth pulse number of inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, adjusting the number of pulses inserted in the candidate multi-description quantization signal at at least one target frequency point position to generate a second multi-description quantization signal.
[0011] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and adjusting the number of pulses inserted in at least one target frequency point position of the candidate multi-description quantization signal to generate a second multi-description quantization signal includes: adjusting the number of inserted pulses in at least one of the multiple target frequency point positions according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal, until the fourth number of pulses is the same as the first number of pulses.
[0012] In some embodiments, adjusting the number of inserted pulses in at least one of a plurality of target frequency positions includes: in response to a fourth pulse number being greater than a first pulse number, reducing the number of inserted pulses in a plurality of target frequency positions in sequence from back to front until the fourth pulse number is the same as the first pulse number.
[0013] In some embodiments, sequentially adjusting the number of inserted pulses of at least one of a plurality of target frequency points includes: in response to a fourth pulse number being less than a first pulse number, sequentially increasing the number of inserted pulses in a plurality of target frequency point positions in order from front to back until the fourth pulse number is the same as the first pulse number.
[0014] According to other embodiments of the present disclosure, a decoding method is provided, comprising: receiving at least one multiple-description codestream, the at least one multiple-description codestream being generated based on a first multiple-description quantization signal and a second multiple-description quantization signal of a signal, the second multiple-description quantization signal being obtained based on an initial quantization signal of the signal and the first multiple-description quantization signal, the initial quantization signal being obtained by performing a first quantization process on the signal, the first multiple-description quantization signal being obtained by performing a second quantization process on the signal, a first pulse number used in the first quantization process being greater than a second pulse number used in the second quantization process; and decoding the at least one multiple-description codestream to obtain a signal.
[0015] In some embodiments, the at least one multiple description codestream includes multiple multiple description codestreams, and decoding the at least one multiple description codestream to obtain the signal includes: decoding the multiple multiple description codestreams to obtain multiple sub-signals; and obtaining the signal based on the multiple sub-signals.
[0016] In some embodiments, obtaining the signal according to the multiple sub-signals includes: normalizing a weighted average of the multiple signals to obtain the signal.
[0017] In some embodiments, the at least one multiple description code stream includes a multiple description code stream, and decoding the at least one description code stream to obtain a signal includes decoding the multiple description code stream to obtain a signal.
[0018] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0019] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0020] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0021] In some embodiments, the second multi-description quantization signal is obtained in the following manner: a candidate multi-description quantization signal is obtained based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0022] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the second multi-description quantization signal can be generated in the following manner: according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal, the number of inserted pulses of at least one of the multiple target frequency point positions is adjusted until the fourth pulse number is the same as the first pulse number.
[0023] In some embodiments, the number of inserted pulses in at least one of the multiple target frequency positions is adjusted in the following manner: in response to the fourth pulse number being greater than the first pulse number, the number of inserted pulses in the multiple target frequency positions is reduced in sequence from back to front until the fourth pulse number is the same as the first pulse number.
[0024] In some embodiments, the number of inserted pulses of at least one of the multiple target frequency points is adjusted sequentially in the following manner: in response to the fourth pulse number being less than the first pulse number, the number of inserted pulses in the multiple target frequency point positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
[0025] According to some further embodiments of the present disclosure, a coding device is provided, comprising: a first quantization unit, configured to perform a first quantization process on a signal to be coded to obtain an initial quantization signal; a second quantization unit, configured to perform a second quantization process on the signal to be coded to obtain a first multiple-description quantization signal, wherein a first number of pulses used in the first quantization process is greater than a second number of pulses used in the second quantization process; a third quantization unit, configured to obtain a second multiple-description quantization signal of the signal to be coded based on the initial quantization signal and the first multiple-description quantization signal; and a generation unit, configured to generate a code stream based on the first multiple-description quantization signal and the second multiple-description quantization signal.
[0026] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0027] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0028] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0029] In some embodiments, the third quantization unit obtains a candidate multi-description quantization signal based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of pulses inserted in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0030] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the third quantization unit adjusts the number of inserted pulses of at least one of the multiple target frequency point positions according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal until the fourth pulse number is the same as the first pulse number.
[0031] In some embodiments, in response to the fourth pulse number being greater than the first pulse number, the third quantization unit reduces the number of inserted pulses in multiple target frequency positions in order from back to front until the fourth pulse number is the same as the first pulse number.
[0032] In some embodiments, in response to the fourth pulse number being less than the first pulse number, the third quantization unit sequentially increases the number of inserted pulses in multiple target frequency positions in order from front to back until the fourth pulse number is the same as the first pulse number.
[0033] According to some further embodiments of the present disclosure, a decoding device is provided, including: a receiving unit, configured to receive at least one multiple-description codestream, the at least one multiple-description codestream being generated based on a first multiple-description quantization signal and a second multiple-description quantization signal of a signal, the second multiple-description quantization signal being obtained based on an initial quantization signal of the signal and the first multiple-description quantization signal, the initial quantization signal being obtained by performing a first quantization process on the signal, the first multiple-description quantization signal being obtained by performing a second quantization process on the signal, a first pulse number used in the first quantization process being greater than a second pulse number used in the second quantization process; and a decoding unit, configured to decode the at least one multiple-description codestream to obtain a signal.
[0034] In some embodiments, the at least one multiple description codestream includes multiple multiple description codestreams, the decoding unit decodes the multiple multiple description codestreams to obtain multiple sub-signals, and obtains the signal according to the multiple sub-signals.
[0035] In some embodiments, the decoding unit normalizes a weighted average of the multiple signals to obtain the signal.
[0036] In some embodiments, the at least one multiple description code stream includes a multiple description code stream, and the decoding unit decodes the multiple description code stream to obtain a signal.
[0037] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0038] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0039] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0040] In some embodiments, the second multi-description quantization signal is obtained in the following manner: a candidate multi-description quantization signal is obtained based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0041] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the second multi-description quantization signal can be generated in the following manner: according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal, the number of inserted pulses of at least one of the multiple target frequency point positions is adjusted until the fourth pulse number is the same as the first pulse number.
[0042] In some embodiments, the number of inserted pulses in at least one of the multiple target frequency positions is adjusted in the following manner: in response to the fourth pulse number being greater than the first pulse number, the number of inserted pulses in the multiple target frequency positions is reduced in sequence from back to front until the fourth pulse number is the same as the first pulse number.
[0043] In some embodiments, the number of inserted pulses of at least one of the multiple target frequency points is adjusted sequentially in the following manner: in response to the fourth pulse number being less than the first pulse number, the number of inserted pulses in the multiple target frequency point positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
[0044] According to some further embodiments of the present disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the encoding method or decoding method in any one of the above embodiments based on instructions stored in the memory device.
[0045] According to some further embodiments of the present disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the encoding method or decoding method in any of the above embodiments is implemented.
[0046] According to some further embodiments of the present disclosure, a transmission system is provided, comprising: an encoding device for executing the encoding method in any one of the above embodiments; and a decoding device for executing the decoding method in any one of the above embodiments.
[0047] According to some further embodiments of the present disclosure, a computer program product is provided, comprising instructions, which, when executed by a processor, enable the processor to perform the encoding method or decoding method in any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0049] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings:
[0050] FIG1 shows a flowchart of some embodiments of the encoding method of the present disclosure;
[0051] FIG2 a shows a schematic diagram of some embodiments of the encoding method of the present disclosure;
[0052] FIG2 b shows a flowchart of some other embodiments of the encoding method disclosed herein;
[0053] FIG3 shows a flowchart of some embodiments of the decoding method of the present disclosure;
[0054] FIG4a shows a block diagram of some embodiments of the encoding device of the present disclosure;
[0055] FIG4 b shows a block diagram of some embodiments of a decoding device of the present disclosure;
[0056] FIG5 shows a block diagram of some embodiments of an electronic device of the present disclosure;
[0057] FIG6 shows a block diagram of another embodiment of the electronic device of the present disclosure;
[0058] FIG7 shows a block diagram of some other embodiments of the transmission system of the present disclosure. DETAILED DESCRIPTION
[0059] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0060] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0061] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0062] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0063] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0064] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0065] The inventors of the present disclosure have discovered that the above-mentioned related technologies have the following problems: weak anti-packet loss capability, resulting in poor audio quality.
[0066] In view of this, the present disclosure proposes a coding technology solution that can improve the anti-packet loss capability and thus improve the audio quality.
[0067] As mentioned earlier, the Opus music coding mode, also known as the CELT (Constrained Energy Lapped Transform) coding mode, does not have any other anti-packet loss measures besides the PLC packet loss compensation algorithm. This results in poor audio quality when restored through packet loss compensation.
[0068] To address the audio quality issues over weak networks, out-of-band FEC (Forward Error Correction) or active retransmission can be used to improve packet loss resistance. However, this increases bandwidth overhead and end-to-end latency, resulting in low transmission efficiency and poor audio quality.
[0069] To address the above technical issues, the present disclosure proposes a multi-description quantization technical solution to improve the anti-packet loss capability, thereby improving audio quality. For example, the technical solution of the present disclosure can be implemented through the following embodiments.
[0070] FIG1 shows a flowchart of some embodiments of the encoding method of the present disclosure.
[0071] As shown in FIG1 , in step 110 , a first quantization process is performed on the signal to be encoded to obtain an initial quantized signal.
[0072] For example, a search may be performed based on the total number of pulses 2K of two multiple description code streams md1_stream and md2_stream of the signal to be encoded to obtain the initial quantization vector y.
[0073] In step 120, a second quantization process is performed on the signal to be coded to obtain a first multi-description quantized signal. The first pulse number used in the first quantization process is greater than the second pulse number used in the second quantization process.
[0074] For example, a search may be performed based on the number of pulses K of a single multiple-description code stream to obtain the first multiple-description quantized signal y_md1 of md1_stream.
[0075] In some embodiments, bit allocation can be performed on the two multiple-description code streams md1_stream and md2_stream of the signal to be coded before quantization. Different multiple-description signals in the multiple multiple-description signals of the signal to be coded have the same number of bits allocated to them in the same frequency band. For example, the multiple-description code streams can be generated using the embodiment shown in FIG2a.
[0076] FIG2 a shows a schematic diagram of some embodiments of the encoding method of the present disclosure.
[0077] As shown in FIG2a , the processing flow before bit allocation of the input signal to be encoded and the bit rate, etc. can be consistent with that of CELT.
[0078] For example, the number of bits b to be allocated may be divided into two, such as two b / 2. In step 201a, bit allocation is performed once using the number of bits b / 2.
[0079] In step 202a, energy fine quantization is performed according to the number of fine quantization bits for each frequency band.
[0080] In step 203a, two multiple description code streams md1_stream and md2_stream are defined, and the side information generated in the previous step is encoded into md1_stream1.
[0081] In step 204a, the md1_stream1 data is copied to md2_stream.
[0082] For example, the above bit allocation result can be applied to two multiple description code streams respectively to ensure that the number of bits in each frequency band of the two multiple description code streams is consistent.
[0083] In step 205a, multi-description PVQ (Pyramid Vector Quantization) spectrum quantization is performed using the encoding method in any embodiment according to the normalized spectrum X and the number of spectrum quantization bits of each frequency band.
[0084] In this way, since the number of bits of the two multiple description code streams in each frequency band is the same when performing spectrum quantization, the number of pulses K of the two multiple description code streams after conversion also remains consistent.
[0085] In step 206a, energy residual quantization is performed to output processed md1_stream and md2_stream.
[0086] After multiple multiple description code streams are generated in step 204a, quantization, searching, encoding, etc. may be continued through steps 130 to 140 in FIG. 1 .
[0087] In step 130 , a second multiple-description quantized signal of the signal to be encoded is obtained according to the initial quantized signal and the first multiple-description quantized signal.
[0088] In some embodiments, the number of pulses inserted at a specified frequency point in the second multi-description quantized signal is determined based on the number of pulses inserted at the specified frequency point in the initial quantized signal and the number of pulses inserted at the specified frequency point in the first multi-description quantized signal. For example, the above operation can be performed at each frequency point.
[0089] For example, the number of pulses inserted at a specified frequency point in the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point in the initial quantized signal and the number of pulses inserted at the specified frequency point in the first multi-description quantized signal. For example, the quantization vector y_md2 of another stream md2_stream is y - y_md1.
[0090] For example, when traversing each frequency point, if the total number of pulses of y at a certain frequency point is greater than the number of pulses of the y_md1 stream, the number of inserted pulses of y and y_md1 at the frequency point is directly subtracted to obtain the number of inserted pulses of y_md2.
[0091] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0092] In some embodiments, a candidate multi-description quantization signal is obtained based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0093] For example, the total number of pulses obtained by the current y_md2 (i.e., the candidate multi-description quantization signal) is calculated to determine whether it is equal to the target pulse number K. If equal, it is directly output; if not equal, the number of inserted pulses of y_md2 at each frequency point is adjusted.
[0094] In some embodiments, the at least one target frequency location includes a plurality of target frequency locations. According to an arrangement order of the plurality of target frequency locations in the candidate multiple-description quantization signal, the number of inserted pulses in at least one of the plurality of target frequency locations is adjusted until the fourth number of pulses is the same as the first number of pulses.
[0095] In some embodiments, in response to the fourth pulse number being greater than the first pulse number, the number of inserted pulses in the plurality of target frequency positions is reduced sequentially in order from back to front until the fourth pulse number is the same as the first pulse number.
[0096] For example, if the current number of pulses in y_md2 is greater than K, each frequency point position is traversed from the back to the front; if there is a pulse at the current frequency point position, the number of pulses is reduced by 1 until the total number of pulses in the current y_md2 is equal to K.
[0097] In some embodiments, in response to the fourth pulse number being less than the first pulse number, the number of inserted pulses in the plurality of target frequency positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
[0098] For example, if the current number of pulses in y_md2 is less than K, each frequency point position is traversed from the front to the back; if there is a pulse at the current frequency point position, the number of pulses is increased by 1 until the total number of pulses in y_md2 is equal to K.
[0099] In step 140, a code stream is generated based on the first multiple description quantized signal and the second multiple description quantized signal. For example, y_md1 and y_md2 can be transmitted as two independent multiple description code streams, or y_md1 and y_md2 can be processed into one multiple description code stream for transmission.
[0100] In this way, multiple description signaling techniques are used to generate multiple multi-description quantized signals of the signal to be encoded, which are used to generate the bitstream of the signal to be encoded. In this way, multiple description signaling techniques can effectively combat packet loss, thereby improving the anti-packet loss capability and thus improving audio quality.
[0101] In the above embodiment, multiple multi-description quantized signals of the signal to be encoded are generated based on the first pulse number, the second pulse number, etc., and used to generate a bitstream of the signal to be encoded. In this way, the multi-description signal technology can be used to effectively combat packet loss, thereby improving the anti-packet loss capability and thereby enhancing audio quality.
[0102] FIG2 b shows a flowchart of other embodiments of the encoding method of the present disclosure.
[0103] As shown in Figure 2b, a search can be performed based on the total pulse count 2K of the two multiple-description code streams md1_stream and md2_stream of the signal to be encoded to obtain the initial quantization vector y. A search can also be performed based on the pulse count K of a single multiple-description code stream to obtain the first multiple-description quantized signal y_md1 of md1_stream. For example, the quantization vector y_md2 of another stream md2_stream = y - y_md1, which can be achieved through the following steps.
[0104] In step 201b, the sign of each frequency point is recorded, and the absolute value of each frequency point is obtained.
[0105] In step 202b, i=0 and cnt=0 are initialized, where i represents the position of each frequency point and cnt represents the number of pulses inserted in y_md2.
[0106] In step 203b, it is determined whether i is less than N. N is the length of the signal's normalized spectrum to be quantized. If yes, step 204b is executed; if not, step 207b is executed.
[0107] In step 204b, it is determined whether the number of pulses y[i] of y at frequency position i is greater than or equal to the number of pulses y_md1[i] of y at frequency position i. If so, step 205b is executed; if not, step 206b is executed.
[0108] In step 205b, the number of inserted pulses of y and y_md1 at the frequency point is directly subtracted to obtain the number of inserted pulses of y_md2[i], and the number of inserted pulses at the frequency point position i is updated to cnt+y_md2[i].
[0109] In step 206b, the current frequency point position is updated to i+1.
[0110] In step 207b, it is determined whether cnt is not equal to K, that is, whether the total number of pulses currently obtained by y_md2 is equal to the target number of pulses K. If yes, step 208b is executed; if not, step 219b is executed.
[0111] In step 208b, it is determined whether cnt is greater than K. If yes, step 209b is executed; if not, step 214b is executed.
[0112] In some embodiments, if the current number of pulses in y_md2 is equal to K, it is directly output; if not, the number of pulses inserted in y_md2 at each frequency point is adjusted. For example, if the current number of pulses in y_md2 is greater than K, each frequency point is traversed from the back to the front; if there is a pulse at the current frequency point, the number of pulses is reduced by 1 until the total number of pulses in y_md2 is equal to K. For example, the above technical solution can be implemented through steps 209b to 213b.
[0113] In step 209b, the current frequency point position i is updated to N-1, and the number of inserted pulses in y_md2 is updated to cnt-K.
[0114] In step 210b, it is determined whether i is greater than or equal to 0 and whether cnt is greater than 0. If yes, step 211b is executed; if not, step 219b is executed.
[0115] In step 211b, it is determined whether y_md2[i] is greater than 0. If so, step 212b is executed; otherwise, step 213b is executed.
[0116] In step 212b, the number of pulses inserted into y_md2 at frequency point i is updated to y_md2[i]-1, and the number of pulses inserted into y_md2 is updated to cnt-1.
[0117] In step 213b, the current frequency point position is updated to i+1.
[0118] For example, if the current number of pulses in y_md2 is less than K, each frequency point position is traversed from the front to the back; if there is a pulse at the current frequency point position, the number of pulses is increased by 1 until the total number of pulses in y_md2 is equal to K. For example, the above technical solution can be implemented through steps 214b to 218b.
[0119] In step 214b, the current frequency point position i is updated to 0, and the number of inserted pulses in y_md2 is updated to K-cnt.
[0120] In step 215b, it is determined whether i is less than N and whether cnt is greater than 0. If so, step 216b is executed; if not, step 219b is executed.
[0121] In step 216b, it is determined whether y_md2[i] is greater than 0. If so, step 217b is executed; otherwise, step 218b is executed.
[0122] In step 217b, the number of pulses inserted into y_md2 at frequency point i is updated to y_md2[i]+1, and the number of pulses inserted into y_md2 is updated to cnt-1.
[0123] In step 218b, the current frequency point position is updated to i+1.
[0124] In step 219b, the frequency bin symbols are applied to the quantized vector to output a quantized spectrum.
[0125] FIG3 shows a flowchart of some embodiments of the decoding method of the present disclosure.
[0126] As shown in FIG3 , in step 310, at least one multiple-description codestream is received. The at least one multiple-description codestream is generated based on a first multiple-description quantized signal and a second multiple-description quantized signal of a signal. The second multiple-description quantized signal is obtained based on an initial quantized signal of the signal and the first multiple-description quantized signal. The initial quantized signal is obtained by performing a first quantization process on the signal. The first multiple-description quantized signal is obtained by performing a second quantization process on the signal. The first pulse number used in the first quantization process is greater than the second pulse number used in the second quantization process.
[0127] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0128] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0129] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0130] In some embodiments, the second multi-description quantization signal is obtained in the following manner: a candidate multi-description quantization signal is obtained based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0131] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the second multi-description quantization signal can be generated in the following manner: according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal, the number of inserted pulses of at least one of the multiple target frequency point positions is adjusted until the fourth pulse number is the same as the first pulse number.
[0132] In some embodiments, the number of inserted pulses in at least one of the multiple target frequency positions is adjusted in the following manner: in response to the fourth pulse number being greater than the first pulse number, the number of inserted pulses in the multiple target frequency positions is reduced in sequence from back to front until the fourth pulse number is the same as the first pulse number.
[0133] In some embodiments, the number of inserted pulses of at least one of the multiple target frequency points is adjusted sequentially in the following manner: in response to the fourth pulse number being less than the first pulse number, the number of inserted pulses in the multiple target frequency point positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
[0134] In step 320, at least one multiple description code stream is decoded to obtain a signal.
[0135] In some embodiments, the at least one multiple description codestream includes multiple multiple description codestreams, the multiple multiple description codestreams are decoded to obtain multiple sub-signals, and the signal is obtained based on the multiple sub-signals. For example, a weighted average of the multiple signals is normalized to obtain the signal.
[0136] In some embodiments, the at least one multiple description code stream includes a multiple description code stream, and the multiple description code stream is decoded to obtain a signal.
[0137] FIG4 a shows a block diagram of some embodiments of the encoding apparatus of the present disclosure.
[0138] As shown in Figure 4a, the encoding device 4a includes: a first quantization unit 41a, used to perform a first quantization process on the signal to be encoded to obtain an initial quantization signal; a second quantization unit 42a, used to perform a second quantization process on the signal to be encoded to obtain a first multi-description quantization signal, and the first number of pulses used in the first quantization process is greater than the second number of pulses used in the second quantization process; a third quantization unit 43a, used to obtain a second multi-description quantization signal of the signal to be encoded based on the initial quantization signal and the first multi-description quantization signal; a generation unit 44a, used to generate a code stream based on the first multi-description quantization signal and the second multi-description quantization signal.
[0139] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0140] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0141] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0142] In some embodiments, the third quantization unit 43a obtains a candidate multi-description quantization signal based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0143] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the third quantization unit 43a adjusts the number of inserted pulses of at least one of the multiple target frequency point positions according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal until the fourth pulse number is the same as the first pulse number.
[0144] In some embodiments, in response to the fourth pulse number being greater than the first pulse number, the third quantization unit 43a reduces the number of inserted pulses in multiple target frequency positions in order from back to front until the fourth pulse number is the same as the first pulse number.
[0145] In some embodiments, in response to the fourth pulse number being less than the first pulse number, the third quantization unit 43a increases the number of inserted pulses in multiple target frequency positions in order from front to back until the fourth pulse number is the same as the first pulse number.
[0146] FIG4 b shows a block diagram of some embodiments of a decoding device of the present disclosure.
[0147] As shown in Figure 4b, the decoding device 4b includes: a receiving unit 41b, used to receive at least one multi-description code stream, the at least one multi-description code stream is generated according to a first multi-description quantization signal and a second multi-description quantization signal of a signal, the second multi-description quantization signal is obtained according to an initial quantization signal of the signal and the first multi-description quantization signal, the initial quantization signal is obtained by performing a first quantization process on the signal, the first multi-description quantization signal is obtained by performing a second quantization process on the signal, the first pulse number used in the first quantization process is greater than the second pulse number used in the second quantization process; a decoding unit 42b, used to decode the at least one multi-description code stream to obtain a signal.
[0148] In some embodiments, the at least one multiple description codestream includes multiple multiple description codestreams, and the decoding unit 42b decodes the multiple description codestreams to obtain multiple sub-signals; and obtains the signal according to the multiple sub-signals.
[0149] In some embodiments, the decoding unit 42b normalizes the weighted average of the multiple signals to obtain the signal.
[0150] In some embodiments, the at least one multiple description code stream includes a multiple description code stream, and the decoding unit 42b decodes the multiple description code stream to obtain a signal.
[0151] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined according to the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0152] In some embodiments, the number of pulses inserted at the specified frequency point of the second multi-description quantized signal is determined based on the difference between the number of pulses inserted at the specified frequency point of the initial quantized signal and the number of pulses inserted at the specified frequency point of the first multi-description quantized signal.
[0153] In some embodiments, the second number of pulses is the same as a third number of pulses inserted into the second multi-description quantized signal.
[0154] In some embodiments, the second multi-description quantization signal is obtained in the following manner: a candidate multi-description quantization signal is obtained based on the initial quantization signal and the first multi-description quantization signal; in response to the fourth pulse number of the inserted pulses in the candidate multi-description quantization signal being different from the first pulse number, the number of inserted pulses in the candidate multi-description quantization signal at at least one target frequency point position is adjusted to generate a second multi-description quantization signal.
[0155] In some embodiments, at least one target frequency point position includes multiple target frequency point positions, and the second multi-description quantization signal can be generated in the following manner: according to the arrangement order of the multiple target frequency point positions in the candidate multi-description quantization signal, the number of inserted pulses of at least one of the multiple target frequency point positions is adjusted until the fourth pulse number is the same as the first pulse number.
[0156] In some embodiments, the number of inserted pulses in at least one of the multiple target frequency positions is adjusted in the following manner: in response to the fourth pulse number being greater than the first pulse number, the number of inserted pulses in the multiple target frequency positions is reduced in sequence from back to front until the fourth pulse number is the same as the first pulse number.
[0157] In some embodiments, the number of inserted pulses of at least one of the multiple target frequency points is adjusted sequentially in the following manner: in response to the fourth pulse number being less than the first pulse number, the number of inserted pulses in the multiple target frequency point positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
[0158] FIG5 shows a block diagram of some embodiments of an electronic device of the present disclosure.
[0159] As shown in FIG5 , the electronic device 5 of this embodiment includes: a memory 51 and a processor 52 coupled to the memory 51 , and the processor 52 is configured to execute the encoding method or decoding method in any one embodiment of the present disclosure based on instructions stored in the memory 51 .
[0160] The memory 51 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, application programs, a boot loader, a database, and other programs.
[0161] FIG6 shows a block diagram of some other embodiments of the electronic device of the present disclosure.
[0162] As shown in FIG6 , the electronic device 6 of this embodiment includes a memory 610 and a processor 620 coupled to the memory 610 . The processor 620 is configured to execute the encoding method or decoding method in any one of the aforementioned embodiments based on instructions stored in the memory 610 .
[0163] The memory 610 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, application programs, a boot loader, and other programs.
[0164] The electronic device 6 may further include an input / output interface 630, a network interface 640, a storage interface 650, and the like. These interfaces 630, 640, 650, as well as the memory 610 and the processor 620, may be connected, for example, via a bus 660. The input / output interface 630 provides a connection interface for input / output devices such as a display, mouse, keyboard, touch screen, microphone, and speakers. The network interface 640 provides a connection interface for various networked devices. The storage interface 650 provides a connection interface for external storage devices such as SD cards and USB flash drives.
[0165] FIG7 shows a block diagram of some other embodiments of the transmission system of the present disclosure.
[0166] As shown in FIG7 , the transmission system 7 includes: an encoding device 71 for executing the encoding method in any one of the above embodiments; and a decoding device 72 for executing the decoding method in any one of the above embodiments.
[0167] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transitory storage media, including but not limited to magnetic disk storage, CD-ROMs, optical storage, and the like, containing computer-usable program code.
[0168] The encoding method, encoding device, decoding method, decoding device, transmission system, electronic device, computer-readable storage medium, and computer program product according to the present disclosure have been described in detail. To avoid obscuring the concepts of the present disclosure, some details well known in the art have been omitted. Based on the above description, those skilled in the art will fully understand how to implement the technical solutions disclosed herein.
[0169] The methods and systems of the present disclosure may be implemented in many ways. For example, the methods and systems of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless otherwise specified. In addition, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present disclosure. Therefore, the present disclosure also covers recording media that store programs for executing the methods according to the present disclosure.
[0170] Although some specific embodiments of the present disclosure have been described in detail by way of examples, those skilled in the art will appreciate that the above examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Those skilled in the art will appreciate that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A coding method comprising: Performing a first quantization process on the signal to be encoded to obtain an initial quantized signal; performing a second quantization process on the signal to be encoded to obtain a first multi-description quantized signal, wherein a first pulse number used in the first quantization process is greater than a second pulse number used in the second quantization process; Obtaining a second multi-description quantization signal of the signal to be encoded according to the initial quantization signal and the first multi-description quantization signal; A code stream is generated according to the first multiple-description quantized signal and the second multiple-description quantized signal.
2. The encoding method according to claim 1, wherein: The number of pulses inserted into the second multi-description quantized signal at the designated frequency point is determined according to the number of pulses inserted into the initial quantized signal at the designated frequency point and the number of pulses inserted into the first multi-description quantized signal at the designated frequency point.
3. The encoding method according to claim 2, wherein: The number of pulses inserted into the second multi-description quantized signal at the designated frequency point is determined based on the difference between the number of pulses inserted into the initial quantized signal at the designated frequency point and the number of pulses inserted into the first multi-description quantized signal at the designated frequency point.
4. The encoding method according to any one of claims 1 to 3, wherein: The second pulse number is the same as the third pulse number of the second multi-description quantized signal into which pulses are inserted.
5. The encoding method according to claim 4, wherein: Obtaining a second multiple description quantization signal of the signal to be encoded includes: Obtaining a candidate multi-description quantization signal according to the initial quantization signal and the first multi-description quantization signal; In response to a fourth number of pulses inserted in the candidate multi-description quantized signal being different from the first number of pulses, the number of pulses inserted in at least one target frequency point of the candidate multi-description quantized signal is adjusted to generate the second multi-description quantized signal.
6. The encoding method according to claim 5, wherein: The at least one target frequency point position includes multiple target frequency point positions, The step of adjusting the number of pulses inserted into the candidate multi-description quantized signal at at least one target frequency point to generate the second multi-description quantized signal includes: According to the arrangement order of the multiple target frequency points in the candidate multi-description quantization signal, the number of inserted pulses of at least one of the multiple target frequency points is adjusted until the fourth number of pulses is the same as the first number of pulses.
7. The encoding method according to claim 6, wherein: The step of adjusting the number of inserted pulses of at least one of the plurality of target frequency positions comprises: In response to the fourth number of pulses being greater than the first number of pulses, the number of pulses inserted in the multiple target frequency positions is reduced in sequence from back to front until the fourth number of pulses is the same as the first number of pulses.
8. The encoding method according to claim 6 or 7, wherein: The step of sequentially adjusting the number of inserted pulses of at least one of the plurality of target frequency points includes: In response to the fourth pulse number being less than the first pulse number, the number of pulses inserted in the plurality of target frequency positions is increased sequentially in order from front to back until the fourth pulse number is the same as the first pulse number.
9. A decoding method comprising: receiving at least one multiple-description codestream, the at least one multiple-description codestream being generated based on a first multiple-description quantized signal and a second multiple-description quantized signal of a signal, the second multiple-description quantized signal being obtained based on an initial quantized signal of the signal and the first multiple-description quantized signal, the initial quantized signal being obtained by performing a first quantization process on the signal, the first multiple-description quantized signal being obtained by performing a second quantization process on the signal, a first pulse number used in the first quantization process being greater than a second pulse number used in the second quantization process; The at least one multiple description code stream is decoded to obtain the signal.
10. The decoding method according to claim 9, wherein: The at least one multiple description code stream includes multiple multiple description code streams, The decoding of the at least one multiple description code stream to obtain the signal includes: Decoding the multiple description code streams to obtain multiple sub-signals; The signal is obtained according to the multiple sub-signals.
11. The decoding method according to claim 10, wherein: The obtaining the signal according to the multiple sub-signals includes: Normalizing the weighted average of the multiple signals to obtain the signal.
12. The decoding method according to any one of claims 9 to 11, wherein: The at least one multiple description code stream comprises a multiple description code stream, The decoding of the at least one description code stream to obtain the signal includes: The multiple description code stream is decoded to obtain the signal.
13. An encoding device comprising: A first quantization unit, configured to perform a first quantization process on the signal to be encoded to obtain an initial quantized signal; a second quantization unit, configured to perform a second quantization process on the signal to be encoded to obtain a first multi-description quantized signal, wherein a first pulse number used in the first quantization process is greater than a second pulse number used in the second quantization process; a third quantization unit, configured to obtain a second multiple-description quantization signal of the signal to be encoded according to the initial quantization signal and the first multiple-description quantization signal; A generating unit is configured to generate a code stream according to the first multiple-description quantized signal and the second multiple-description quantized signal.
14. A decoding device comprising: a receiving unit, configured to receive at least one multiple-description codestream, the at least one multiple-description codestream being generated based on a first multiple-description quantized signal and a second multiple-description quantized signal of a signal, the second multiple-description quantized signal being obtained based on an initial quantized signal of the signal and the first multiple-description quantized signal, the initial quantized signal being obtained by performing a first quantization process on the signal, the first multiple-description quantized signal being obtained by performing a second quantization process on the signal, a first pulse number used in the first quantization process being greater than a second pulse number used in the second quantization process; A decoding unit is configured to decode the at least one multiple description code stream to obtain the signal.
15. An electronic device comprising: Memory; and A processor coupled to the memory, the processor being configured to execute the encoding method according to any one of claims 1 to 8 or the decoding method according to any one of claims 9 to 12 based on instructions stored in the memory.
16. A non-volatile computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the encoding method according to any one of claims 1 to 8 or the decoding method according to any one of claims 9 to 12 is implemented.
17. A transmission system comprising: An encoding device, configured to execute the encoding method according to any one of claims 1 to 8; A decoding device, configured to execute the decoding method according to any one of claims 9 to 12.
18. A computer program product comprising instructions, which, when executed by a processor, cause the processor to perform the encoding method according to any one of claims 1 to 8, or the decoding method according to any one of claims 9 to 12.
Citation Information
Patent Citations
Image encoding and decoding method and system based on multi-description network
CN110753241A
Adaptive quantization of weighting matrix coefficients
CN111899746A
Audio coding method and audio coding device
CN113808596A
Audio coding method, decoding method, device, equipment, storage medium and product
CN114333862A
Voice coding and decoding method and device, computer equipment and storage medium
CN116631418A