Method and apparatus for encoding and decoding a multi-channel signal

By analyzing and adjusting the transient identifiers and grouping information of multi-channel signals, and combining them with a coding neural network to optimize the coding sequence and interleaving process, the problems of low coding quality and poor reconstruction effect in existing technologies are solved, and higher quality audio signal coding and reconstruction are achieved.

CN115691514BActive Publication Date: 2026-01-02HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110865298.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2026-01-02
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

Existing audio signal encoding schemes have low encoding quality when processing transient signals and poor multi-channel signal reconstruction.

Method used

By analyzing the transient identification and grouping information of each channel block in the current frame of the multi-channel signal, the spectrum is encoded using a coding neural network. Under preset conditions, the grouping information is adjusted to improve the coding quality. Intra-group interleaving and spectrum arrangement are used to optimize the coding order.

Benefits of technology

It improves the coding quality and reconstruction effect of multi-channel signals, especially in the transient signal processing to better preserve the transient characteristics of audio signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115691514B_ABST
    Figure CN115691514B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a kind of multi-channel signal encoding and decoding method and device.In the encoding method of multi-channel signal, the current frame of the multi-channel signal to be encoded includes first channel and second channel, obtain the first grouping information of the M blocks of first channel and the second grouping information of the M blocks of second channel, when the first grouping information and the second grouping information satisfy preset condition, obtain the first adjustment grouping information and the second adjustment grouping information according to the first grouping information and the second grouping information;Next, obtain the first to be encoded spectrum according to the first adjustment grouping information and the spectrum of the M blocks of first channel, and the same can obtain second to be encoded spectrum, finally, the first to be encoded spectrum and second to be encoded are encoded using encoding neural network, and the spectrum encoding result is obtained, and the spectrum encoding result can be carried by bitstream.It can realize grouping, adjustment and encoding for different transient identification blocks, improve the encoding quality of multi-channel signal.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of audio processing, and in particular to a multi-channel signal encoding and decoding method and device. BACKGROUND

[0002] Compression of audio data is an indispensable link in media applications such as media communication and media broadcasting. With the development of high-definition audio industry and three-dimensional audio industry, people's demand for audio quality is getting higher and higher, which leads to a rapid increase in the amount of audio data in media applications.

[0003] The current audio data compression technology is based on the basic principle of signal processing, which utilizes the correlation of signals in time and space to compress the original audio signal, for example, a stereo signal, to reduce the amount of data, thereby facilitating the transmission or storage of audio data.

[0004] In the current audio signal encoding scheme, when the audio signal is a transient signal, there is a problem of low encoding quality. When signal reconstruction is performed at the decoding end, there is also a problem of poor reconstruction effect of multi-channel signals. SUMMARY

[0005] Embodiments of the present application provide a multi-channel signal encoding and decoding method and device for improving the encoding quality of multi-channel signals and the reconstruction effect of multi-channel signals.

[0006] To solve the above technical problems, embodiments of the present application provide the following technical solutions:

[0007] In a first aspect, the present application provides a multi-channel signal encoding method, comprising:

[0008] obtaining M first transient identifiers of M blocks of a first channel according to the spectrum of the M blocks of the first channel of a current frame of a multi-channel signal to be encoded; the M blocks of the first channel include a first block of the first channel, and the first transient identifier of the first block is used to indicate that the first block is a transient block or that the first block is a non-transient block;

[0009] obtaining first grouping information of the M blocks of the first channel according to the M first transient identifiers;

[0010] obtaining M second transient identifiers of M blocks of a second channel according to the spectrum of the M blocks of the second channel of the current frame; the M blocks of the second channel include a second block of the second channel, and the second transient identifier of the second block is used to indicate that the second block is a transient block or that the second block is a non-transient block;

[0011] obtaining second grouping information of the M blocks of the second channel according to the M second transient identifiers;

[0012] When the first grouping information and the second grouping information satisfy a preset condition, first adjustment grouping information and second adjustment grouping information are obtained according to the first grouping information and the second grouping information, the first adjustment grouping information corresponds to the first grouping information, and the second adjustment grouping information corresponds to the second grouping information; wherein the first adjustment grouping information is the same as the first grouping information, and the second adjustment grouping information is obtained by adjusting the second grouping information; or the first adjustment grouping information is obtained by adjusting the first grouping information, and the second adjustment grouping information is the same as the second grouping information; or the first adjustment grouping information is obtained by adjusting the first grouping information, and the second adjustment grouping information is obtained by adjusting the second grouping information;

[0013] A first to-be-encoded spectrum is obtained according to the first adjustment grouping information and the spectrum of the M blocks of the first channel;

[0014] A second to-be-encoded spectrum is obtained according to the second adjustment grouping information and the spectrum of the M blocks of the second channel;

[0015] The first to-be-encoded spectrum and the second to-be-encoded spectrum are encoded by using an encoding neural network to obtain a spectrum encoding result;

[0016] The spectrum encoding result is written into a bitstream.

[0017] In the above scheme, the current frame of the multi-channel signal to be encoded includes a first channel and a second channel, each channel including the spectrum of M blocks, the first M blocks of the first channel are obtained according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the first grouping information of the M blocks of the first channel is obtained according to the M first transient identifiers, and the second grouping information of the M blocks of the second channel can be obtained in the same way. When the first grouping information and the second grouping information meet the preset condition, the first adjustment grouping information and the second adjustment grouping information are obtained according to the first grouping information and the second grouping information; next, the first to-be-encoded spectrum is obtained according to the first adjustment grouping information and the spectrum of the M blocks of the first channel, and the second to-be-encoded spectrum can be obtained in the same way; finally, the first to-be-encoded spectrum and the second to-be-encoded are encoded using the encoding neural network to obtain the spectrum encoding result, and the spectrum encoding result can be carried by the bitstream. Therefore, in the embodiment of the application, the grouping information of the M blocks of each channel is obtained according to the M transient identifiers of each channel of the current frame, the adjustment grouping information of the M blocks of each channel is obtained when the grouping information of the M blocks of each channel meets the preset condition, and the to-be-encoded spectrum is obtained according to the adjustment grouping information of the M blocks of each channel and the spectrum of the M blocks of each channel. Thus, grouping, adjustment and encoding of blocks with different transient identifiers can be realized, and the encoding quality of the multi-channel signal is improved.

[0018] In a possible implementation, the method further includes: encoding the first adjustment grouping information and the second adjustment grouping information to obtain grouping information encoding result; and writing the grouping information encoding result into the bitstream. In the above scheme, the encoding end encodes the first adjustment grouping information and the second adjustment grouping information after obtaining the first adjustment grouping information and the second adjustment grouping information, and obtains the grouping information encoding result. The encoding method used for the adjustment grouping information is not limited here. By encoding the adjustment grouping information, the grouping information encoding result can be obtained, which can be written into the bitstream, so that the bitstream can carry the grouping information encoding result, so that the decoding end can obtain the first adjustment grouping information and the second adjustment grouping information by analyzing the bitstream.

[0019] In a possible implementation, the first grouping information includes: a first grouping number or a first grouping number identifier of the M blocks of the first channel, the first grouping number identifier is used to indicate the first grouping number, and when the first grouping number is greater than 1, the first grouping information further includes: the M first transient identifiers; or, the first grouping information includes: the M first transient identifiers.

[0020] and / or,

[0021] The second grouping information includes: a second grouping number or a second grouping number identifier of M blocks of the second channel, the second grouping number identifier being used to indicate the second grouping number, when the second grouping number is greater than 1, the second grouping information further includes: the M second transient identifiers; or the second grouping information includes: the M second transient identifiers.

[0022] and / or,

[0023] The first adjustment grouping information includes: a first adjustment grouping number or a first adjustment grouping number identifier of M blocks of the first channel, the first adjustment grouping number identifier being used to indicate the first adjustment grouping number, when the first adjustment grouping number is greater than 1, the first adjustment grouping information further includes: M first adjustment transient identifiers of M blocks of the first channel, the first adjustment transient identifier of the first block being different from the first transient identifier of the first block or the first adjustment transient identifier of the first block being the same as the first transient identifier of the first block; or the first adjustment grouping information includes: the M first adjustment transient identifiers.

[0024] and / or,

[0025] The second adjustment grouping information includes: a second adjustment grouping number or a second adjustment grouping number identifier of M blocks of the second channel, the second adjustment grouping number identifier being used to indicate the second adjustment grouping number, when the second adjustment grouping number is greater than 1, the second adjustment grouping information further includes: M second adjustment transient identifiers of M blocks of the second channel, the second adjustment transient identifier of the second block being different from the second transient identifier of the second block or the second adjustment transient identifier of the second block being the same as the second transient identifier of the second block; or the second adjustment grouping information includes: the M second adjustment transient identifiers.

[0026] In the above scheme, the first adjustment grouping information and the first grouping information can be the same or different. The first grouping information includes a first grouping number or a first grouping number identifier of the M blocks of the first channel, and the first adjustment grouping information includes a first adjustment grouping number or a first adjustment grouping number identifier of the M blocks of the first channel. When the first grouping information is not adjusted, the first grouping number and the first adjustment grouping number are the same, and the first grouping number identifier and the first adjustment grouping number identifier are the same. When the first grouping information is adjusted, the first grouping number and the first adjustment grouping number can be the same or different. For example, if the adjustment of the first grouping information does not change the grouping number, the first grouping number and the first adjustment grouping number are the same. If the adjustment of the first grouping information changes the grouping number, the first grouping number and the first adjustment grouping number are different. For example, before the adjustment of the first grouping information, the first grouping number is 2, and the first grouping number identifier is 1. After the adjustment of the first grouping information, if the first adjustment grouping number is 2, the first grouping number identifier is still 1. Similarly, the second adjustment grouping information and the second grouping information can be the same or different.

[0027] In a possible implementation, the preset condition includes that the first grouping information is inconsistent with the second grouping information. In the above scheme, the first grouping information being inconsistent with the second grouping information means that the first grouping information and the second grouping information are not completely consistent. When the first grouping information is inconsistent with the second grouping information, it can be considered that the first grouping information and the second grouping information satisfy the preset condition. When the first grouping information is consistent with the second grouping information, it can be considered that the first grouping information and the second grouping information do not satisfy the preset condition. For example, the grouping numbers of the M blocks of the first grouping information and the grouping numbers of the M blocks of the second grouping information are the same, but the M first transient identifiers included in the first grouping information are different from the M second transient identifiers included in the second grouping information. For another example, the grouping numbers of the M blocks of the first grouping information and the grouping numbers of the M blocks of the second grouping information are different. The preset condition needs to be determined in combination with a specific application scenario, which is not limited herein. By setting the preset condition, it can be determined whether to adjust the first grouping information and the second grouping information.

[0028] In a possible implementation, the first grouping information being inconsistent with the second grouping information includes that the M first transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, and the M first transient identifiers and the M second transient identifiers are inconsistent.

[0029] or,

[0030] The inconsistency between the first grouping information and the second grouping information comprises: the M first transient identifiers indicate that the M blocks of the first sound channel comprise transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound channel comprise transient blocks and non-transient blocks, and the number of transient blocks of the first sound channel is inconsistent with the number of transient blocks of the second sound channel.

[0031] or,

[0032] The inconsistency between the first grouping information and the second grouping information comprises: the M first transient identifiers indicate that the M blocks of the first sound channel comprise transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound channel comprise transient blocks and non-transient blocks, the M first transient identifiers and the M second transient identifiers are inconsistent, and an Nth block in the M blocks of the first sound channel and an Nth block in the M blocks of the second sound channel are both transient, 0≤N

[0033] In an implementation form of the above solution, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks. Similarly, the M blocks of the second sound channel comprise transient blocks and non-transient blocks. The inconsistency between the M first transient identifiers and the M second transient identifiers means that at least one of the M first transient identifiers and the transient identifier of the same index in the M second transient identifiers have different values. For example, one of the M blocks of the first sound channel is a transient block A, and one of the M blocks of the second sound channel is a transient block B. If the index of block A in the M blocks of the first sound channel is the same as the index of block B in the M blocks of the second sound channel, the first transient identifier of block A is consistent with the second transient identifier of block B. For example, one of the M blocks of the first sound channel is a non-transient block C, and one of the M blocks of the second sound channel is a transient block D. If the index of block C in the M blocks of the first sound channel is the same as the index of block D in the M blocks of the second sound channel, the first transient identifier of block A is inconsistent with the second transient identifier of block B. In the embodiment of the application, when the M first transient identifiers and the M second transient identifiers are inconsistent, it can be determined that the first grouping information and the second grouping information satisfy the preset condition, and grouping information adjustment is required at this time. When the M first transient identifiers and the M second transient identifiers are completely consistent, it can be determined that the first grouping information and the second grouping information do not satisfy the preset condition, and grouping information adjustment is not required at this time.

[0034] In an implementation form of the above-mentioned solution, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks. Similarly, the M blocks of the second sound channel include transient blocks and non-transient blocks. The M first transient identifiers and the M second transient identifiers are inconsistent in that at least one of the M first transient identifiers and the transient identifier of the same index in the M second transient identifiers have different values. For example, one block A of the M blocks of the first sound channel is a transient block, and one block B of the M blocks of the second sound channel is a transient block. If the index of block A in the M blocks of the first sound channel is the same as the index of block B in the M blocks of the second sound channel, the first transient identifier of block A and the second transient identifier of block B are consistent. For example, one block C of the M blocks of the first sound channel is a non-transient block, and one block D of the M blocks of the second sound channel is a transient block. If the index of block C in the M blocks of the first sound channel is the same as the index of block D in the M blocks of the second sound channel, the first transient identifier of block A and the second transient identifier of block B are inconsistent. The Nth block of the M blocks of the first sound channel and the Nth block of the M blocks of the second sound channel are both transient, 0≤N

[0035] In an implementation form of the above-mentioned solution, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks. Similarly, the M blocks of the second sound channel include transient blocks and non-transient blocks. The M first transient identifiers and the M second transient identifiers are inconsistent in that at least one of the M first transient identifiers and the transient identifier of the same index in the M second transient identifiers have different values. For example, one block A of the M blocks of the first sound channel is a transient block, and one block B of the M blocks of the second sound channel is a transient block. If the index of block A in the M blocks of the first sound channel is the same as the index of block B in the M blocks of the second sound channel, the first transient identifier of block A and the second transient identifier of block B are consistent. For example, one block C of the M blocks of the first sound channel is a non-transient block, and one block D of the M blocks of the second sound channel is a transient block. If the index of block C in the M blocks of the first sound channel is the same as the index of block D in the M blocks of the second sound channel, the first transient identifier of block A and the second transient identifier of block B are inconsistent. The Nth block of the M blocks of the first sound channel and the Nth block of the M blocks of the second sound channel are both transient, 0≤N

[0036] In a possible implementation, the M blocks of the first sound track have respective indexes, and the M blocks of the second sound track have respective indexes;

[0037] When the first grouping information and the second grouping information are inconsistent, including: the M first transient identifiers indicate that the M blocks of the first sound track include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound track include transient blocks and non-transient blocks, and the number of transient blocks of the first sound track and the number of transient blocks of the second sound track are inconsistent, if the indexes of the transient blocks in the M blocks of the first sound track and the indexes of the transient blocks in the M blocks of the second sound track have no intersection, the first adjustment grouping information and the second adjustment grouping information obtained according to the first grouping information and the second grouping information include:

[0038] When the number of transient blocks of the first sound track is less than the number of transient blocks of the second sound track, the first grouping information is adjusted to obtain the first adjustment grouping information, and the first adjustment grouping information indicates that the number of transient blocks of the first sound track is equal to the number of transient blocks of the second sound track indicated by the second grouping information;

[0039] Or,

[0040] When the number of transient blocks of the first sound track is greater than the number of transient blocks of the second sound track, the second grouping information is adjusted to obtain the second adjustment grouping information, and the second adjustment grouping information indicates that the number of transient blocks of the second sound track is equal to the number of transient blocks of the first sound track indicated by the first grouping information.

[0041] In the above scheme, when the number of transient blocks of the first channel is inconsistent with the number of transient blocks of the second channel, and the index of the transient block in the M blocks of the first channel and the index of the transient block in the M blocks of the second channel have no intersection, then the grouping information of the channel with fewer transient blocks needs to be adjusted, and the grouping information of the channel with more transient blocks remains unchanged, and the number of transient blocks indicated by the grouping information of the two channels after adjustment is the same. Through this adjustment method, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel. When the number of transient blocks of the first channel is less than the number of transient blocks of the second channel, the first grouping information is adjusted to obtain first adjusted grouping information. Specifically, the adjustment of the first grouping information can include adjusting the first transient identifier of the M blocks, for example, adjusting the first transient identifier of the first block in the M blocks from non-transient to transient, so that the number of transient blocks of the first channel increases, so that the number of transient blocks of the first channel in the first adjusted grouping information (i.e., the number of transient blocks of the first channel after adjustment) is equal to the number of transient blocks of the second channel indicated by the second grouping information. When the number of transient blocks of the first channel is greater than the number of transient blocks of the second channel, the second grouping information is adjusted to obtain second adjusted grouping information. Specifically, the adjustment of the second grouping information can include adjusting the second transient identifier of the M blocks, for example, adjusting the second transient identifier of the second block in the M blocks from non-transient to transient, so that the number of transient blocks of the second channel increases, so that the number of transient blocks of the second channel in the second adjusted grouping information (i.e., the number of transient blocks of the second channel after adjustment) is equal to the number of transient blocks of the first channel indicated by the first grouping information.

[0042] In a possible implementation, the M blocks of the first channel have respective indexes, and the M blocks of the second channel have respective indexes.

[0043] When the first grouping information and the second grouping information are inconsistent, including that the M first transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, and the number of transient blocks of the first channel is inconsistent with the number of transient blocks of the second channel, if the index of the transient block in the M blocks of the first channel and the index of the transient block in the M blocks of the second channel have an intersection, the first adjusted grouping information and the second adjusted grouping information are obtained according to the first grouping information and the second grouping information, including:

[0044] When the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, all indexes of the transient blocks indicated by the M first adjusted transient identifiers are the same as all indexes of the transient blocks indicated by the M second transient identifiers.

[0045] Or

[0046] When the indexes of the transient blocks indicated by the M second transient identifiers are part of the indexes of the transient blocks indicated by the M first transient identifiers, at least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers, all indexes of the transient blocks indicated by the M second adjusted transient identifiers are the same as all indexes of the transient blocks indicated by the M first transient identifiers.

[0047] Or

[0048] When the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, at least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers, all indexes of the transient blocks indicated by the M first adjusted transient identifiers are the same as all indexes of the transient blocks indicated by the M second adjusted transient identifiers.

[0049] In an implementation form of the above solution, the number of transient blocks of the first channel is less than the number of transient blocks of the second channel, i.e., the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, at this time, the first transient identifiers of the M blocks of the first channel need to be adjusted, the second transient identifiers of the M blocks of the second channel remain unchanged, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, all indexes of the transient blocks indicated by the M first adjusted transient identifiers are the same as all indexes of the transient blocks indicated by the M second transient identifiers, after the adjustment, the number of transient blocks indicated by the grouping information of the two channels is the same, through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0050] In an implementation form of the above solution, the number of transient blocks of the second channel is less than the number of transient blocks of the first channel, i.e., the indexes of the transient blocks indicated by the M second transient identifiers are a part of the indexes of the transient blocks indicated by the M first transient identifiers. In this case, the second transient identifiers of the M blocks of the second channel need to be adjusted, and the first transient identifiers of the M blocks of the first channel remain unchanged. At least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers. The indexes of all the transient blocks indicated by the M second adjusted transient identifiers are the same as the indexes of all the transient blocks indicated by the M first transient identifiers. The number of transient blocks indicated by the grouping information of the two channels is the same after the adjustment. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0051] In an implementation form of the above solution, the number of transient blocks of the second channel is not equal to the number of transient blocks of the first channel, but the indexes of the transient blocks indicated by the M first transient identifiers are partially the same as the indexes of the transient blocks indicated by the M second transient identifiers. Partially the same here means that the indexes of some transient blocks in the M blocks of the first channel are partially the same as the indexes of some transient blocks in the M blocks of the second channel, but not completely the same. In this case, the first transient identifiers of the M blocks of the first channel need to be adjusted, and the second transient identifiers of the M blocks of the second channel need to be adjusted, i.e., the transient identifiers of the M blocks of the two channels need to be adjusted. At least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, and at least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers. The indexes of all the transient blocks indicated by the M first adjusted transient identifiers are the same as the indexes of all the transient blocks indicated by the M second adjusted transient identifiers. The number of transient blocks indicated by the grouping information of the two channels is the same after the adjustment. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0052] In a possible implementation form, the adjusting of at least one of the M first transient identifiers to obtain the M first adjusted transient identifiers comprises:

[0053] When the first transient identifier of the first block indicates that the first block is a non-transient block, if the second transient identifier of a third block of the M blocks of the second channel indicates that the third block is a transient block, the first transient identifier of the first block is adjusted to be a first adjusted transient identifier of the first block. The first adjusted transient identifier of the first block indicates that the first block is a transient block, and the index of the first block is the same as the index of the third block.

[0054] Or

[0055] The adjusting of the at least one of the M second transient identifiers comprises:

[0056] When the second transient identifier of the second block indicates that the second block is a non-transient block, if the first transient identifier of a fourth block of the M blocks of the first channel indicates that the fourth block is a transient block, the second transient identifier of the second block is adjusted to a second adjusted transient identifier of the second block, the second adjusted transient identifier of the second block indicates that the second block is a transient block, and the index of the second block is the same as the index of the fourth block.

[0057] In the above scheme, taking the adjustment of the first transient identifier as an example, when the first transient identifier of the first block indicates that the first block is a non-transient block, if the second transient identifier of a third block of the M blocks of the second channel indicates that the third block is a transient block, the first transient identifier of the first block is adjusted to a first adjusted transient identifier of the first block, the first adjusted transient identifier of the first block indicates that the first block is a transient block, and the index of the first block is the same as the index of the third block. For example, the first transient identifier of the first block is 1, the second transient identifier of the third block is 0, and the index of the first block and the index of the third block are both 4, and the first adjusted transient identifier of the first block is 0. Through this adjustment mode, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0058] In a possible implementation, when the first adjusted grouping number is greater than 1 or the M first adjusted transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the obtaining of the first to-be-encoded spectrum according to the first adjusted grouping information and the spectrum of the M blocks of the first channel comprises:

[0059] grouping and arranging the spectrum of the M blocks of the first channel according to the first adjusted grouping information to obtain the first to-be-encoded spectrum;

[0060] When the second adjusted grouping number is greater than 1 or the M second adjusted transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, the obtaining of the second to-be-encoded spectrum according to the second adjusted grouping information and the spectrum of the M blocks of the second channel comprises:

[0061] grouping and arranging the spectrum of the M blocks of the second channel according to the second adjusted grouping information to obtain the second to-be-encoded spectrum.

[0062] In the above scheme, taking obtaining the first adjustment grouping information at the encoding end as an example, after the encoding end obtains the first adjustment grouping information of the M blocks, the first adjustment grouping information of the M blocks can be used to arrange and group the spectrums of the M blocks of the current frame, so that the arrangement order of the spectrums of the M blocks in the current frame can be adjusted. The above arrangement and grouping is performed according to the first adjustment grouping information of the M blocks, and the first adjustment grouping information of the M blocks is obtained according to the M transient identifiers of the M blocks. After the arrangement and grouping of the M blocks, the spectrums of the M blocks after the arrangement and grouping are obtained, and the spectrums of the M blocks after the arrangement and grouping are arranged and grouped according to the M transient identifiers of the M blocks. The arrangement and grouping can change the encoding order of the spectrums of the M blocks. It should be noted that the M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0063] In a possible implementation, the arranging and grouping the spectrums of the M blocks of the first channel according to the first adjustment grouping information to obtain the first to-be-encoded spectrums comprises:

[0064] dividing the spectrums of the M blocks of the first channel indicated as transient blocks by the first adjustment transient identifiers of the M blocks into a first transient group, and dividing the spectrums of the M blocks of the first channel indicated as non-transient blocks by the first adjustment transient identifiers of the M blocks into a first non-transient group; arranging the spectrums of the blocks in the first transient group before the spectrums of the blocks in the first non-transient group to obtain the first to-be-encoded spectrums.

[0065] or,

[0066] the arranging and grouping the spectrums of the M blocks of the second channel according to the second adjustment grouping information to obtain the second to-be-encoded spectrums comprises:

[0067] dividing the spectrums of the M blocks of the second channel indicated as transient blocks by the second adjustment transient identifiers of the M blocks into a second transient group, and dividing the spectrums of the M blocks of the second channel indicated as non-transient blocks by the second adjustment transient identifiers of the M blocks into a second non-transient group; arranging the spectrums of the blocks in the second transient group before the spectrums of the blocks in the second non-transient group to obtain the second to-be-encoded spectrums.

[0068] In the above scheme, after the encoding end obtains the first adjustment grouping information of the M blocks, the M blocks are grouped based on the different of the transient identifiers, so that the transient group and the non-transient group can be obtained, and then the positions of the M blocks in the spectrum of the current frame are arranged, the spectrum of the block in the transient group is arranged before the spectrum of the block in the non-transient group, to obtain the to-be-encoded spectrum. That is, in the to-be-encoded spectrum, the spectrum of all transient blocks is located before the spectrum of non-transient blocks, so that the spectrum of the transient block can be adjusted to a position with higher coding importance, so that the reconstructed audio signal after the neural network coding and decoding processing can better retain the transient characteristics. The M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0069] In a possible implementation, the grouping and arranging of the spectrum of the M blocks of the first channel according to the first adjustment grouping information to obtain the first to-be-encoded spectrum comprises:

[0070] arranging the spectrum of the block indicated as the transient block by the first adjustment transient identifier of the M blocks to the spectrum of the block indicated as the non-transient block by the first adjustment transient identifier of the M blocks to obtain the first to-be-encoded spectrum;

[0071] Or,

[0072] The grouping and arranging of the spectrum of the M blocks of the second channel according to the second adjustment grouping information to obtain the second to-be-encoded spectrum comprises:

[0073] arranging the spectrum of the block indicated as the transient block by the second adjustment transient identifier of the M blocks to the spectrum of the block indicated as the non-transient block by the second adjustment transient identifier of the M blocks to obtain the second to-be-encoded spectrum.

[0074] In the above scheme, after the encoding end obtains the first adjustment grouping information of the M blocks, the transient identifier of each block in the M blocks is determined according to the first adjustment grouping information, P transient blocks and Q non-transient blocks are found from the M blocks, and M=P+Q. The spectrum of the block indicated as the transient block by the M first adjustment transient identifiers is arranged before the spectrum of the block indicated as the non-transient block by the M transient identifiers to obtain the to-be-encoded spectrum. That is, in the to-be-encoded spectrum, the spectrum of all transient blocks is located before the spectrum of non-transient blocks, so that the spectrum of the transient block can be adjusted to a position with higher coding importance, so that the reconstructed audio signal after the neural network coding and decoding processing can better retain the transient characteristics. The M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0075] In a possible implementation, before the first to-be-encoded spectrum and the second to-be-encoded spectrum are encoded by using the encoding neural network, the method further includes:

[0076] The first to-be-encoded spectrum is subjected to intra-group interleaving processing to obtain an intra-group interleaving processed first spectrum;

[0077] The second to-be-encoded spectrum is subjected to intra-group interleaving processing to obtain an intra-group interleaving processed second spectrum;

[0078] The first to-be-encoded spectrum and the second to-be-encoded spectrum are encoded by using the encoding neural network, including:

[0079] The intra-group interleaving processed first spectrum and the intra-group interleaving processed second spectrum are encoded by using the encoding neural network.

[0080] In the foregoing solution, after obtaining the to-be-encoded spectrum (for example, the first to-be-encoded spectrum and the second to-be-encoded spectrum), the encoding end can first perform intra-group interleaving processing according to the grouping of the M blocks of each channel, to obtain the spectrum of the M blocks after intra-group interleaving processing. The spectrum of the M blocks after intra-group interleaving processing can be the input data of the encoding neural network. The M blocks of the first channel of the current frame can be the M blocks of the first channel of the current frame. Through intra-group interleaving processing, the side information of encoding can be reduced, and the encoding efficiency can be improved.

[0081] In a possible implementation, the number of the M blocks of the first channel that are indicated as transient blocks by the M first adjustment transient identifiers is P, and the number of the M blocks of the first channel that are indicated as non-transient blocks by the M first adjustment transient identifiers is Q, M = P + Q;

[0082] The first to-be-encoded spectrum is subjected to intra-group interleaving processing, including:

[0083] The spectrum of the P blocks is subjected to interleaving processing to obtain the spectrum of the P blocks after interleaving processing;

[0084] The spectrum of the Q blocks is subjected to interleaving processing to obtain the spectrum of the Q blocks after interleaving processing.

[0085] In the foregoing solution, the interleaving processing of the spectrum of the P blocks includes interleaving processing of the spectrum of the P blocks as a whole; similarly, the interleaving processing of the spectrum of the Q blocks includes interleaving processing of the spectrum of the Q blocks as a whole. If the number of the adjustment groups of the M blocks of the first channel is 1, the spectrum of the M blocks of the first channel needs to be subjected to intra-group interleaving processing to obtain the intra-group interleaving processed spectrum of the M blocks of the first channel.

[0086] In a possible implementation, before the M first transient identifications of the M blocks of the first channel are obtained according to the spectra of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the method further includes:

[0087] obtaining a first window type of the first channel, the first window type being a short window type or a non-short window type;

[0088] obtaining a second window type of the second channel, the second window type being a short window type or a non-short window type;

[0089] only when the first window type and the second window type are both short window types, the step of obtaining the M first transient identifications of the M blocks of the first channel according to the spectra of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded is performed.

[0090] In the foregoing solution, the encoding end can first determine the window type of the current frame, which can be a short window type or a non-short window type, for example, the encoding end determines the window type according to the current frame of the multi-channel signal to be encoded. The short window can also be referred to as a short frame, and the non-short window can also be referred to as a non-short frame. When the window type is a short window type, the step of obtaining the M first transient identifications of the M blocks of the first channel is triggered to be performed. In this embodiment of this application, the foregoing encoding solution is performed when the window type of the current frame is a short window type, to achieve encoding when the multi-channel signal is a transient signal.

[0091] In a possible implementation, the method further includes:

[0092] encoding the first window type and the second window type to obtain a window type encoding result;

[0093] writing the window type encoding result into the code stream.

[0094] In the foregoing solution, after the encoding end obtains the first window type of the first channel and the second window type of the second channel of the current frame, the encoding end can carry the window type in the code stream. The encoding manner used for the window type is not limited here. Through encoding of the window type, a window type encoding result can be obtained, which can be written into the code stream, so that the code stream can carry the window type encoding result. The decoding end can obtain the window type encoding result from the code stream, and analyze the window type encoding result to obtain the first window type of the first channel and the second window type of the second channel of the current frame. According to the first window type of the first channel and the second window type of the second channel, it is determined whether to continue decoding the code stream to obtain the first decoding grouping information of the M blocks of the first channel.

[0095] In a possible implementation, the obtaining of the M first transient identifiers of the M blocks of the first channel according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded comprises:

[0096] The M first spectral energies of the M blocks of the first channel are obtained according to the spectrum of the M blocks of the first channel.

[0097] The first spectral energy average of the M blocks of the first channel is obtained according to the M first spectral energies.

[0098] The M first transient identifiers of the M blocks of the first channel are obtained according to the M first spectral energies and the first spectral energy average.

[0099] In the above scheme, after the M spectral energies are obtained at the encoding end, the M spectral energies can be averaged to obtain a spectral energy average, or the maximum value or the maximum values in the M spectral energies are removed and then averaged to obtain the spectral energy average. By comparing the spectral energy of each block with the spectral energy average, the change of the spectrum of each block compared with the spectrum of other blocks in the M blocks is determined, and then the M transient identifiers of the M blocks are obtained, wherein the transient identifier of a block can be used to represent the transient feature of the block. The M blocks of the current frame can be the M blocks of the first channel of the current frame. According to the spectral energy of each block and the spectral energy average, the transient identifier of each block can be determined, so that the transient identifier of a block can determine the grouping information of the block.

[0100] In a possible implementation, when the first spectral energy of the first block is greater than K times of the first spectral energy average, the first transient identifier of the first block indicates that the first block is a transient block; or,

[0101] When the first spectral energy of the first block is less than or equal to K times of the first spectral energy average, the first transient identifier of the first block indicates that the first block is a non-transient block.

[0102] Wherein, the K is a real number greater than or equal to 1.

[0103] In the above scheme, K has multiple values, which are not limited here. Taking the determination process of the transient identifier of the first block in the M blocks as an example, when the spectral energy of the first block is greater than K times the average spectral energy, it indicates that the spectral change of the first block is too large compared with other blocks of the M blocks, and the transient identifier of the first block indicates that the first block is a transient block. When the spectral energy of the first block is less than or equal to K times the average spectral energy, it indicates that the spectral change of the first block is not large compared with other blocks of the M blocks, and the transient identifier of the first block indicates that the first block is a non-transient block. The M blocks of the current frame can be the M blocks of the first channel of the current frame. It is not limited that the encoding end can also obtain the M transient identifiers of the M blocks according to other manners, for example, obtaining the difference value or the proportional value of the spectral energy of the first block and the average spectral energy, and determining the M transient identifiers of the M blocks according to the obtained difference value or proportional value.

[0104] In a second aspect, the embodiments of the present application also provide a decoding method of a multi-channel signal, comprising:

[0105] obtaining first decoding grouping information of M blocks of a first channel of a current frame of a multi-channel signal from a bitstream, the first decoding grouping information being used to indicate first decoding transient identifiers of the M blocks of the first channel;

[0106] obtaining second decoding grouping information of M blocks of a second channel of the current frame from the bitstream, the second decoding grouping information being used to indicate second decoding transient identifiers of the M blocks of the second channel;

[0107] decoding the bitstream by using a decoding neural network to obtain decoded spectrums of the M blocks of the first channel and decoded spectrums of the M blocks of the second channel;

[0108] obtaining a first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectrums of the M blocks of the first channel;

[0109] obtaining a second reconstructed signal of the second channel according to the second decoding grouping information and the decoded spectrums of the M blocks of the second channel.

[0110] In the above scheme, first decoding grouping information of M blocks of a first channel of a current frame of a multi-channel signal is obtained from a bitstream, the first decoding grouping information is used to indicate first decoding transient identifiers of the M blocks of the first channel, second decoding grouping information of M blocks of a second channel is obtained from the bitstream in the same way, and the bitstream is decoded by using a decoding neural network to obtain decoded spectra of the M blocks of the first channel and decoded spectra of the M blocks of the second channel; a first reconstructed signal of the first channel is obtained by using the first decoding grouping information and the decoded spectra of the M blocks of the first channel, and a second reconstructed signal of the second channel is obtained by using the second decoding grouping information and the decoded spectra of the M blocks of the second channel. The first decoded spectra of the M blocks of the first channel and the second decoded spectra of the M blocks of the second channel obtained when the bitstream is decoded respectively correspond to spectra of the M blocks of the first channel and spectra of the M blocks of the second channel arranged in groups at an encoding end, and therefore the first reconstructed signal of the first channel and the second reconstructed signal of the second channel can be obtained by using the first decoding grouping information and the second decoding grouping information. When signal reconstruction is performed, blocks of different transient identifiers in the multi-channel signal can be decoded and reconstructed, and therefore the reconstruction effect of the multi-channel signal can be improved.

[0111] In a possible implementation, the obtaining of the first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectra of the M blocks of the first channel comprises:

[0112] When the first decoding grouping information indicates that the first decoding grouping number of the M blocks of the first channel is greater than 1, inverse grouping arrangement processing is performed on the decoded spectra of the M blocks of the first channel to obtain spectra of the M blocks of the first channel after inverse grouping arrangement processing;

[0113] The first reconstructed signal of the first channel is obtained according to the spectra of the M blocks of the first channel after inverse grouping arrangement processing;

[0114] The obtaining of the second reconstructed signal of the second channel according to the second decoding grouping information and the decoded spectra of the M blocks of the second channel comprises:

[0115] When the second decoding grouping information indicates that the second decoding grouping number of the M blocks of the second channel is greater than 1, inverse grouping arrangement processing is performed on the decoded spectra of the M blocks of the second channel to obtain spectra of the M blocks of the second channel after inverse grouping arrangement processing;

[0116] The second reconstructed signal of the second channel is obtained according to the spectra of the M blocks of the second channel after inverse grouping arrangement processing.

[0117] In the above scheme, taking the signal reconstruction process of the first channel as an example, the decoding end obtains the first decoding grouping information of the M blocks, and the decoding end further obtains the decoding spectrum of the M blocks of the first channel from the code stream. Since the encoding end has performed grouping arrangement processing on the decoding spectrum of the M blocks of the first channel, the decoding end needs to perform a process inverse to that of the encoding end, and therefore inverse grouping arrangement processing is performed on the decoding spectrum of the M blocks of the first channel according to the first decoding grouping information of the M blocks, to obtain the spectrum of the M blocks of the first channel after inverse grouping arrangement processing, which is inverse to the grouping arrangement processing of the encoding end. After obtaining the spectrum of the M blocks of the first channel after inverse grouping arrangement processing, the encoding end can obtain the first reconstructed signal of the first channel by performing frequency-domain to time-domain conversion on the spectrum of the M blocks of the first channel after inverse grouping arrangement processing.

[0118] In a possible implementation, the obtaining of the first reconstructed signal of the first channel according to the first decoding grouping information and the decoding spectrum of the M blocks of the first channel comprises:

[0119] performing in-group de-interleaving processing on the decoding spectrum of the M blocks of the first channel, to obtain the spectrum of the M blocks of the first channel after in-group de-interleaving processing;

[0120] obtaining the first reconstructed signal according to the spectrum of the M blocks of the first channel after in-group de-interleaving processing;

[0121] The obtaining of the second reconstructed signal of the second channel according to the second decoding grouping information and the decoding spectrum of the M blocks of the second channel comprises:

[0122] performing in-group de-interleaving processing on the decoding spectrum of the M blocks of the second channel, to obtain the spectrum of the M blocks of the second channel after in-group de-interleaving processing;

[0123] obtaining the second reconstructed signal according to the spectrum of the M blocks of the second channel after in-group de-interleaving processing.

[0124] In the above scheme, the in-group de-interleaving performed by the decoding end is the inverse process of the in-group interleaving performed by the encoding end, which will not be described in detail here.

[0125] In a possible implementation, the number of the M blocks of the first channel indicated as transient blocks by the M first decoding transient identifiers is P, and the number of the M blocks of the first channel indicated as non-transient blocks by the M first decoding transient identifiers is Q, where M = P + Q.

[0126] The obtaining of the first reconstructed signal of the first channel according to the first decoding grouping information and the decoding spectrum of the M blocks of the first channel comprises:

[0127] performing in-group de-interleaving processing on the decoded spectrum of the P blocks of the first channel and performing in-group de-interleaving processing on the decoded spectrum of the Q blocks of the first channel to obtain in-group de-interleaved spectrum of the M blocks of the first channel;

[0128] performing inverse grouping arrangement processing on the in-group de-interleaved spectrum of the M blocks of the first channel according to the first decoded grouping information to obtain inverse grouping arrangement processed spectrum of the M blocks of the first channel;

[0129] obtaining a first reconstructed signal of the first channel according to the inverse grouping arrangement processed spectrum of the M blocks of the first channel.

[0130] In the above scheme, the de-interleaving processing on the spectrum of the P blocks includes de-interleaving the spectrum of the P blocks as a whole; similarly, the de-interleaving processing on the spectrum of the Q blocks includes de-interleaving the spectrum of the Q blocks as a whole. The encoding end can perform interleaving processing according to the transient group and the non-transient group respectively, so as to obtain the interleaving processed spectrum of the P blocks and the interleaving processed spectrum of the Q blocks. The interleaving processed spectrum of the P blocks and the interleaving processed spectrum of the Q blocks can be used as input data of the encoding neural network. Through the in-group interleaving processing, the side information of the encoding can be reduced, and the encoding efficiency can be improved. Since the encoding end performs in-group interleaving, the decoding end needs to perform a corresponding inverse process, that is, the decoding end can perform de-interleaving processing. If the number of adjusted groups of the M blocks of the first channel is 1, the decoded spectrum of the M blocks of the first channel needs to be de-interleaved to obtain the in-group de-interleaved spectrum of the M blocks of the first channel

[0131] In a possible implementation, the inverse grouping arrangement processing on the in-group de-interleaved spectrum of the M blocks of the first channel according to the first decoded grouping information includes:

[0132] obtaining an index of the P blocks of the first channel according to the first decoded grouping information;

[0133] obtaining an index of the Q blocks of the first channel according to the first decoded grouping information;

[0134] performing the inverse grouping arrangement processing on the in-group de-interleaved spectrum of the M blocks of the first channel according to the index of the P blocks and the index of the Q blocks.

[0135] In the above scheme, the indexes of the M blocks are continuous, for example, from 0 to M-1, before the encoding end groups and arranges the spectrum of the M blocks. After the encoding end groups and arranges the spectrum, the indexes of the M blocks are no longer continuous. The decoding end can obtain the indexes of the P blocks in the reconstructed grouped and arranged M blocks and the indexes of the Q blocks in the reconstructed grouped and arranged M blocks according to the first decoding grouping information of the M blocks, and can restore the indexes of the M blocks to be still continuous through inverse grouping and arranging processing.

[0136] In a possible implementation, the method further includes:

[0137] obtaining a window type of a first channel of a current frame from the bitstream;

[0138] obtaining a window type of a second channel of the current frame from the bitstream;

[0139] performing the step of obtaining the first decoding grouping information of the M blocks of the first channel of the current frame of the multi-channel signal only when the first window type and the second window type are both short window types.

[0140] In the above scheme, the foregoing encoding scheme can be performed only when the first window type and the second window type of the current frame are both short window types, to achieve encoding when the multi-channel signal is a transient signal. The decoding end performs a process inverse to that of the encoding end, and thus the decoding end can also determine the first window type and the second window type of the current frame first. The window type can be a short window type or a non-short window type, for example, the decoding end obtains the window type of the current frame from the bitstream. The current frame includes the first channel and the second channel, and thus the first window type of the first channel and the second window type of the second channel can be obtained.

[0141] In a possible implementation, the first decoding grouping information includes a first decoding grouping number or a first decoding grouping number identifier of the M blocks of the first channel. The first decoding grouping number identifier is used to indicate the first decoding grouping number. When the first decoding grouping number is greater than 1, the first decoding grouping information further includes M first decoding transient identifiers; or the first decoding grouping information includes the M first decoding transient identifiers.

[0142] and / or,

[0143] The second decoding grouping information includes a second decoding grouping number or a second decoding grouping number identifier of the M blocks of the second channel. The second decoding grouping number identifier is used to indicate the second decoding grouping number. When the second decoding grouping number is greater than 1, the second decoding grouping information further includes M second decoding transient identifiers; or the second decoding grouping information includes the M second decoding transient identifiers.

[0144] In the above scheme, the encoding end carries the grouping information coding result in the code stream, the grouping information coding result includes the first adjusted grouping information and the second adjusted grouping information, and the decoding end can obtain the first decoded grouping information and the second decoded grouping information by decoding the code stream, the first decoded grouping information corresponds to the first adjusted grouping information of the encoding end, and the second decoded grouping information corresponds to the second adjusted grouping information of the encoding end. For example, the first decoded grouping information includes: the first decoded grouping number or the first decoded grouping number identifier of the M blocks of the first channel, the first decoded grouping number represents the grouping number or the adjusted grouping number of the first channel, and the first decoded grouping number identifier is used to indicate the grouping number or the adjusted grouping number of the first channel. The M first decoded transient identifiers are used to indicate the transient identifiers or the adjusted transient identifiers corresponding to the M blocks of the first channel respectively. Similarly, the second decoded grouping information is similar to the description of the first decoded grouping information.

[0145] In a third aspect, the embodiments of the present application further provide an encoding device of a multi-channel signal, including:

[0146] a transient identifier obtaining module, configured to obtain M first transient identifiers of M blocks of a first channel of a current frame of a multi-channel signal to be encoded according to the spectrum of the M blocks of the first channel; the M blocks of the first channel include a first block of the first channel, and the first transient identifier of the first block is used to indicate that the first block is a transient block or a non-transient block;

[0147] a grouping information obtaining module, configured to obtain first grouping information of the M blocks of the first channel according to the M first transient identifiers;

[0148] the transient identifier obtaining module, configured to obtain M second transient identifiers of M blocks of a second channel of the current frame according to the spectrum of the M blocks of the second channel; the M blocks of the second channel include a second block of the second channel, and the second transient identifier of the second block is used to indicate that the second block is a transient block or a non-transient block;

[0149] the grouping information obtaining module, configured to obtain second grouping information of the M blocks of the second channel according to the M second transient identifiers;

[0150] The packet information adjustment module is configured to obtain first adjustment packet information and second adjustment packet information according to the first packet information and the second packet information when the first packet information and the second packet information satisfy a preset condition, the first adjustment packet information corresponds to the first packet information, and the second adjustment packet information corresponds to the second packet information; wherein the first adjustment packet information is the same as the first packet information, and the second adjustment packet information is obtained based on adjustment on the second packet information; or the first adjustment packet information is obtained based on adjustment on the first packet information, and the second adjustment packet information is the same as the second packet information; or the first adjustment packet information is obtained based on adjustment on the first packet information, and the second adjustment packet information is obtained based on adjustment on the second packet information.

[0151] The spectrum obtaining module is configured to obtain a first to-be-encoded spectrum according to the first adjustment packet information and spectrums of the M blocks of the first channel.

[0152] The spectrum obtaining module is configured to obtain a second to-be-encoded spectrum according to the second adjustment packet information and spectrums of the M blocks of the second channel.

[0153] The encoding module is configured to encode the first to-be-encoded spectrum and the second to-be-encoded spectrum by using an encoding neural network to obtain a spectrum encoding result, and write the spectrum encoding result into a bitstream.

[0154] In a third aspect of the present application, the component modules of the encoding device of the multi-channel signal can also perform the steps described in the foregoing first aspect and various possible implementation manners, for details, refer to the foregoing description of the first aspect and various possible implementation manners.

[0155] In a fourth aspect, the embodiments of the present application further provide a decoding device of a multi-channel signal, comprising:

[0156] The packet information obtaining module is configured to obtain first decoding packet information of M blocks of a first channel of a current frame of a multi-channel signal from a bitstream, the first decoding packet information being used to indicate first decoding transient identifiers of the M blocks of the first channel.

[0157] The packet information obtaining module is configured to obtain second decoding packet information of M blocks of a second channel of the current frame from the bitstream, the second decoding packet information being used to indicate second decoding transient identifiers of the M blocks of the second channel.

[0158] The decoding module is configured to decode the bitstream by using a decoding neural network to obtain a decoded spectrum of the M blocks of the first channel and a decoded spectrum of the M blocks of the second channel.

[0159] a reconstructed signal obtaining module configured to obtain a first reconstructed signal of the first channel according to the first decoded group information and the decoded spectrum of the M blocks of the first channel;

[0160] the reconstructed signal obtaining module, configured to obtain a second reconstructed signal of the second channel according to the second decoded group information and the decoded spectrum of the M blocks of the second channel.

[0161] In a fourth aspect of the present application, the component modules of the decoding apparatus of the multi-channel signal can also perform the steps described in the foregoing second aspect and various possible implementation manners, and details are described in the foregoing description of the second aspect and various possible implementation manners.

[0162] In a fifth aspect, the embodiments of the present application provide a computer readable storage medium, which stores instructions, and when the instructions run on a computer, the computer executes the method in the foregoing first aspect or second aspect.

[0163] In a sixth aspect, the embodiments of the present application provide a computer program product containing instructions, and when the instructions run on a computer, the computer executes the method in the foregoing first aspect or second aspect.

[0164] In a seventh aspect, the embodiments of the present application provide a computer readable storage medium, which includes a code stream generated by the method in the foregoing first aspect.

[0165] In an eighth aspect, the embodiments of the present application provide a communication apparatus, which can include a terminal device or a chip and the like entity, and the communication apparatus includes a processor and a memory. The memory is configured to store instructions, and the processor is configured to execute the instructions in the memory, so that the communication apparatus executes the method in any one of the foregoing first aspect or second aspect.

[0166] In a ninth aspect, the present application provides a chip system, which includes a processor configured to support the encoding apparatus of the multi-channel signal or the decoding apparatus of the multi-channel signal to implement the functions involved in the foregoing aspects, for example, to send or process the data and / or information involved in the foregoing method. In a possible design, the chip system further includes a memory, and the memory is configured to save the necessary program instructions and data of the encoding apparatus of the multi-channel signal or the decoding apparatus of the multi-channel signal. The chip system can be composed of a chip, or can include a chip and other discrete devices.

[0167] From the above technical solutions, it can be seen that the embodiments of the present application have the following advantages:

[0168] In the embodiment of the present application, the current frame of the multi-channel signal to be encoded includes a first channel and a second channel, each channel includes the spectrum of M blocks, the first transient identifier of the M blocks of the first channel is obtained according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the first grouping information of the M blocks of the first channel is obtained according to the M first transient identifiers, the second grouping information of the M blocks of the second channel can be obtained in the same way, when the first grouping information and the second grouping information meet the preset condition, the first adjustment grouping information and the second adjustment grouping information are obtained according to the first grouping information and the second grouping information; next, the first to-be-encoded spectrum is obtained according to the first adjustment grouping information and the spectrum of the M blocks of the first channel, and the second to-be-encoded spectrum can be obtained in the same way, finally, the first to-be-encoded spectrum and the second to-be-encoded are encoded by using the encoding neural network to obtain the spectrum encoding result, and the spectrum encoding result can be carried by the code stream. Therefore, in the embodiment of the present application, the grouping information of the M blocks of each channel is obtained according to the M transient identifiers of each channel of the current frame, the adjustment grouping information of the M blocks of each channel is obtained when the grouping information of the M blocks of each channel meets the preset condition, and the to-be-encoded spectrum is obtained according to the adjustment grouping information of the M blocks of each channel and the spectrum of the M blocks of each channel. Therefore, grouping, adjustment and encoding can be performed on blocks with different transient identifiers, and the encoding quality of the multi-channel signal is improved.

[0169] In another embodiment of the present application, the first decoding grouping information of the M blocks of the first channel of the current frame of the multi-channel signal is obtained from the code stream, the first decoding grouping information is used to indicate the first decoding transient identifier of the M blocks of the first channel, the second decoding grouping information of the M blocks of the second channel is obtained from the code stream in the same way, and the decoding neural network is used to decode the code stream to obtain the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel; the first reconstructed signal of the first channel is obtained by using the first decoding grouping information and the decoding spectrum of the M blocks of the first channel, and the second reconstructed signal of the second channel is obtained by using the second decoding grouping information and the decoding spectrum of the M blocks of the second channel. The first decoding spectrum of the M blocks of the first channel and the second decoding spectrum of the M blocks of the second channel obtained when the code stream is decoded correspond to the spectrum of the M blocks of the first channel arranged by grouping and the spectrum of the M blocks of the second channel arranged by grouping at the encoding end respectively, so that the first reconstructed signal of the first channel and the second reconstructed signal of the second channel can be obtained by using the first decoding grouping information and the second decoding grouping information. When the signal is reconstructed, the blocks with different transient identifiers in the multi-channel signal can be decoded and reconstructed, so that the reconstruction effect of the multi-channel signal can be improved. BRIEF DESCRIPTION OF DRAWINGS

[0170] Figure 1 The composition structure schematic diagram of the audio processing system provided in the embodiment of the present application;

[0171] Figure 2a A schematic diagram of an audio encoder and an audio decoder according to an embodiment of the present application applied in a terminal device;

[0172] Figure 2b A schematic diagram of an audio encoder according to an embodiment of the present application applied in a wireless device or a core network device;

[0173] Figure 2c A schematic diagram of an audio decoder according to an embodiment of the present application applied in a wireless device or a core network device;

[0174] Figure 3a A schematic diagram of a multi-channel encoder and a multi-channel decoder according to an embodiment of the present application applied in a terminal device;

[0175] Figure 3b A schematic diagram of a multi-channel encoder according to an embodiment of the present application applied in a wireless device or a core network device;

[0176] Figure 3c A schematic diagram of a multi-channel decoder according to an embodiment of the present application applied in a wireless device or a core network device;

[0177] Figure 4 A schematic diagram of a multi-channel signal encoding method according to an embodiment of the present application;

[0178] Figure 5 A schematic diagram of a multi-channel signal decoding method according to an embodiment of the present application;

[0179] Figure 6 A schematic diagram of an audio signal encoding and decoding system according to an embodiment of the present application;

[0180] Figure 7 A schematic diagram of a multi-channel signal encoding method according to an embodiment of the present application;

[0181] Figure 8 A schematic diagram of a multi-channel signal decoding method according to an embodiment of the present application;

[0182] Figure 9 A schematic diagram of a multi-channel signal encoding method according to an embodiment of the present application;

[0183] Figure 10 A schematic diagram of a multi-channel signal decoding method according to an embodiment of the present application;

[0184] Figure 11 A schematic diagram of a multi-channel signal encoding method according to an embodiment of the present application;

[0185] Figure 12 A schematic diagram of a multi-channel signal decoding method provided by an embodiment of the present application;

[0186] Figure 13 A schematic diagram of a multi-channel signal encoding method provided by an embodiment of the present application;

[0187] Figure 14 A schematic diagram of a multi-channel signal decoding method provided by an embodiment of the present application;

[0188] Figure 15 A schematic diagram of a multi-channel signal encoding device provided by an embodiment of the present application;

[0189] Figure 16 A schematic diagram of a multi-channel signal decoding device provided by an embodiment of the present application;

[0190] Figure 17 A schematic diagram of another multi-channel signal encoding device provided by an embodiment of the present application;

[0191] Figure 18 A schematic diagram of another multi-channel signal decoding device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0192] The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0193] The terms "first", "second", and the like in the description and in the claims of the present application and in the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances and that the embodiments of the present application are capable of functioning in other sequences, unless explicitly stated otherwise. Moreover, the terms "comprise", "have" and any variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, system, product or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, system, product or apparatus.

[0194] Sound is a continuous wave produced by the vibration of an object. The object that produces the vibration to emit the sound wave is called a sound source. During the propagation of the sound wave through a medium (such as air, solid or liquid), the auditory organs of a human or an animal can perceive the sound.

[0195] The characteristics of a sound wave include pitch, loudness and timbre. The pitch represents the high or low of the sound. The loudness represents the size of the sound. The loudness can also be referred to as the loudness or volume. The unit of the loudness is decibel (dB). The timbre is also referred to as tone color.

[0196] The frequency of a sound wave determines the pitch of a tone. The higher the frequency, the higher the pitch. The number of times an object vibrates in one second is called frequency, and the unit of frequency is hertz (Hz). The frequency of a sound that the human ear can recognize is between 20 Hz and 20,000 Hz.

[0197] The amplitude of a sound wave determines the loudness of a tone. The greater the amplitude, the greater the loudness. The closer the distance to the sound source, the greater the loudness.

[0198] The waveform of a sound wave determines the timbre. The waveform of a sound wave includes square wave, sawtooth wave, sine wave, and pulse wave, etc.

[0199] According to the characteristics of sound waves, sound can be divided into regular sound and irregular sound. Irregular sound refers to the sound emitted by the irregular vibration of the sound source. Irregular sound is, for example, noise that affects people's work, study, and rest, etc. Regular sound refers to the sound emitted by the regular vibration of the sound source. Regular sound includes speech and musical sound. When sound is represented by electricity, regular sound is an analog signal that changes continuously in the time-frequency domain. This analog signal can be referred to as an audio signal. An audio signal is an information carrier that carries speech, music, and sound effects.

[0200] Since human hearing has the ability to distinguish the position distribution of sound sources in space, when a listener hears the sound in space, in addition to being able to perceive the pitch, loudness, and timbre of the sound, the listener can also perceive the direction of the sound.

[0201] Sound can also be divided into monaural sound and stereophonic sound. Monaural sound has one sound channel, and sound is picked up by one microphone and played by one loudspeaker. Stereophonic sound has multiple sound channels, and different sound channels transmit different sound waveforms.

[0202] When the audio signal is a transient signal, the current encoding end does not extract the transient feature and transmits it in the code stream. The transient feature is used to represent the change of the spectrum of adjacent blocks in the transient frame of the audio signal, so that when the signal is reconstructed at the decoding end, the transient feature of the reconstructed audio signal cannot be obtained from the code stream, and there is a problem of poor audio signal reconstruction effect.

[0203] The embodiments of the present application provide an audio processing technology, in particular, provide an audio encoding technology for multi-channel signals, so as to improve the traditional audio encoding system. The multi-channel signal refers to an audio signal including multiple channels, for example, the multi-channel signal can be a stereo signal. The audio processing includes two parts of audio encoding and audio decoding. The audio encoding is performed at the source side, including encoding (for example, compressing) the original audio to reduce the amount of data required to represent the audio, so as to more efficiently store and / or transmit. The audio decoding is performed at the destination side, including inverse processing relative to the encoder, to reconstruct the original audio. The encoding part and the decoding part are also collectively referred to as encoding. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0204] The technical solutions of the embodiments of the present application can be applied to various audio processing systems, such as Figure 1 As shown in FIG. 1, an audio processing system 100 provided by the embodiments of the present application includes a multi-channel signal encoding device 101 and a multi-channel signal decoding device 102. The multi-channel signal encoding device 101 can also be referred to as an audio encoding device, which can be used to generate a bitstream. The audio encoding bitstream can be transmitted to the multi-channel signal decoding device 102 through an audio transmission channel. The multi-channel signal decoding device 102 can also be referred to as a multi-audio decoding device, which can receive the bitstream and then perform the audio decoding function of the multi-channel signal decoding device 102, and finally obtain the reconstructed signal.

[0205] In the embodiments of the present application, the multi-channel signal encoding device can be applied to various terminal devices that need audio communication, wireless devices that need transcoding, and core network devices. For example, the multi-channel signal encoding device can be an audio encoder of the above terminal device or wireless device or core network device. Similarly, the multi-channel signal decoding device can be applied to various terminal devices that need audio communication, wireless devices that need transcoding, and core network devices. For example, the multi-channel signal decoding device can be an audio decoder of the above terminal device or wireless device or core network device. For example, the audio encoder can include a radio access network, a media gateway of a core network, a transcoding device, a media resource server, a mobile terminal, a fixed network terminal, etc. The audio encoder can also be an audio encoder applied to a virtual reality (VR) streaming service.

[0206] In the application embodiment, taking the audio encoding module and audio decoding module suitable for virtual reality streaming service as an example, the end-to-end coding and decoding process of the audio signal includes: the audio signal A is preprocessed (audio PReprocessing) after being acquired by the acquisition module, the preprocessing operation includes filtering out the low frequency part in the signal, which can be divided by 20Hz or 50Hz, extracting the azimuth information in the signal, and then performing encoding processing (audio encoding) and packaging (file / segment encapsulation) and then sending (delivery) to the decoding end. The decoding end first performs unpacking (file / segment decapsulation), and then decoding (audio decoding), performs binaural rendering (audio rendering) processing on the decoded signal, and maps the processed signal to the listener's headphones (headphones), which can be independent headphones or headphones on glasses devices.

[0207] As shown in Figure 2a The audio encoder and the audio decoder provided by the application embodiment are applied to the schematic diagram of the terminal device. Each terminal device can include an audio encoder, a channel encoder, an audio decoder, and a channel decoder. Specifically, the channel encoder is configured to perform channel encoding on the audio signal, and the channel decoder is configured to perform channel decoding on the audio signal. For example, the first terminal device 20 can include a first audio encoder 201, a first channel encoder 202, a first audio decoder 203, and a first channel decoder 204. The second terminal device 21 can include a second audio decoder 211, a second channel decoder 212, a second audio encoder 213, and a second channel encoder 214. The first terminal device 20 is connected to a first wireless or wired network communication device 22, the first network communication device 22 and the second wireless or wired network communication device 23 are connected through a digital channel, and the second terminal device 21 is connected to the second wireless or wired network communication device 23. The above-mentioned wireless or wired network communication device can be a signal transmission device, such as a communication base station, a data exchange device, etc.

[0208] In the audio communication, the terminal device as the sending end first acquires the audio signal, encodes the acquired audio signal, and then performs channel encoding and transmits in the digital channel through the wireless network or the core network. The terminal device as the receiving end performs channel decoding according to the received signal to obtain the code stream, and then restores the audio signal through audio decoding, and the terminal device as the receiving end plays back the audio signal.

[0209] As shown in Figure 2b Fig. 6 is a schematic diagram of the wireless device or core network device to which the audio encoder provided by the embodiments of the present application is applied. The wireless device or core network device 25 comprises a channel decoder 251, another audio decoder 252, the audio encoder 253 provided by the embodiments of the present application, a channel encoder 254, wherein the another audio decoder 252 refers to an audio decoder other than the audio decoder. In the wireless device or core network device 25, the signal entering the device is first channel-decoded by the channel decoder 251, then audio-decoded by the another audio decoder 252, then audio-encoded by the audio encoder 253 provided by the embodiments of the present application, and finally channel-encoded by the channel encoder 254, and the channel-encoded signal is then transmitted out. The another audio decoder 252 is used to audio-decode the code stream decoded by the channel decoder 251.

[0210] As shown in Figure 2c Fig. 7 is a schematic diagram of the wireless device or core network device to which the audio decoder provided by the embodiments of the present application is applied. The wireless device or core network device 25 comprises a channel decoder 251, the audio decoder 255 provided by the embodiments of the present application, another audio encoder 256, a channel encoder 254, wherein the another audio encoder 256 refers to an audio encoder other than the audio encoder. In the wireless device or core network device 25, the signal entering the device is first channel-decoded by the channel decoder 251, then decoded by the audio decoder 255, then audio-encoded by the another audio encoder 256, and finally channel-encoded by the channel encoder 254, and the channel-encoded signal is then transmitted out. In the wireless device or core network device, if transcoding is needed, corresponding audio encoding is needed. The wireless device refers to the radio frequency related device in communication, and the core network device refers to the core network related device in communication.

[0211] In some embodiments of the present application, the multi-channel signal encoding apparatus can be applied to various terminal devices having audio communication needs, wireless devices having transcoding needs, and core network devices having transcoding needs, for example, the multi-channel signal encoding apparatus can be a multi-channel encoder of the terminal device, the wireless device, or the core network device. Similarly, the multi-channel signal decoding apparatus can be applied to various terminal devices having audio communication needs, wireless devices having transcoding needs, and core network devices having transcoding needs, for example, the multi-channel signal decoding apparatus can be a multi-channel decoder of the terminal device, the wireless device, or the core network device.

[0212] As shown in Figure 3aThe diagram illustrates the application of the multi-channel encoder and multi-channel decoder provided in this embodiment of the application to a terminal device. Each terminal device may include: a multi-channel encoder, a channel encoder, a multi-channel decoder, and a channel decoder. The multi-channel encoder can execute the audio encoding method provided in this embodiment of the application, and the multi-channel decoder can execute the audio decoding method provided in this embodiment of the application. Specifically, the channel encoder is used to perform channel encoding on the multi-channel signal, and the channel decoder is used to perform channel decoding on the multi-channel signal. For example, the first terminal device 30 may include: a first multi-channel encoder 301, a first channel encoder 302, a first multi-channel decoder 303, and a first channel decoder 304. The second terminal device 31 may include: a second multi-channel decoder 311, a second channel decoder 312, a second multi-channel encoder 313, and a second channel encoder 314. The first terminal device 30 is connected to a wireless or wired first network communication device 32, and the first network communication device 32 and a wireless or wired second network communication device 33 are connected via a digital channel. The second terminal device 31 is connected to the wireless or wired second network communication device 33. The aforementioned wireless or wired network communication equipment can broadly refer to signal transmission equipment, such as communication base stations and data switching equipment. In audio communication, the transmitting terminal device performs multi-channel encoding on the acquired multi-channel signal, followed by channel encoding, and then transmits it through a wireless network or core network in a digital channel. The receiving terminal device performs channel decoding on the received signal to obtain the multi-channel signal encoded bitstream, and then recovers the multi-channel signal through multi-channel decoding for playback by the receiving terminal device.

[0213] like Figure 3b The diagram shown illustrates the application of the multi-channel encoder provided in this embodiment of the invention in a wireless device or core network device. The wireless device or core network device 35 includes: a channel decoder 351, other audio decoders 352, a multi-channel encoder 353, and a channel encoder 354, as described above. Figure 2b Similarly, this will not be elaborated upon here.

[0214] like Figure 3c The diagram shown illustrates the application of the multi-channel decoder provided in this embodiment of the invention in a wireless device or core network device. The wireless device or core network device 35 includes: a channel decoder 351, a multi-channel decoder 355, other audio encoders 356, and a channel encoder 354, as described above. Figure 2c Similarly, this will not be elaborated upon here.

[0215] The audio encoding process can be part of a multi-channel encoder, and the audio decoding process can be part of a multi-channel decoder. For example, multi-channel encoding of a captured multi-channel signal can include processing the captured multi-channel signal to obtain an audio signal, and encoding the obtained audio signal according to the method provided in the embodiments of the present application. The decoding end decodes the multi-channel signal encoding stream to obtain an audio signal, and recovers the multi-channel signal after upmix processing. Therefore, the embodiments of the present application can also be applied to multi-channel encoders and multi-channel decoders in terminal devices, wireless devices, and core network devices. In wireless or core network devices, if transcoding is required, corresponding multi-channel encoding processing needs to be performed.

[0216] First, a multi-channel signal encoding method provided in the embodiments of the present application is introduced. The method can be executed by a terminal device, for example, the terminal device can be a multi-channel signal encoding apparatus (hereinafter referred to as an encoding end or an encoder, for example, an artificial intelligence (AI) encoder). The multi-channel signal in the embodiments of the present application can include multiple channels, for example, a first channel and a second channel, or multiple channels can include a first channel, a second channel, and a third channel, etc. In subsequent embodiments, the encoding process of the first channel is mainly described, and the encoding processes of other channels can refer to the encoding processing mode of the first channel, and detailed description is not performed for each channel. As shown in FIG. 1, the encoding process performed by the encoding end in the embodiments of the present application is described. Figure 4

[0217] 401.Obtain M first transient identifiers of M blocks of the first channel according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded; the M blocks of the first channel include a first block of the first channel, and the first transient identifier of the first block is used to indicate that the first block is a transient block or a non-transient block.

[0218] ​The encoding end first obtains a multi-channel signal to be encoded, frames the multi-channel signal to be encoded to obtain a current frame of the multi-channel signal to be encoded. In subsequent embodiments, the encoding process of the current frame is taken as an example for description, and the encoding mode of other frames of the multi-channel signal to be encoded is similar to that of the current frame. The current frame of the multi-channel signal to be encoded includes a first channel and a second channel, each channel includes the spectrum of M blocks, for example, the first channel can be a left channel, and the second channel can be a right channel. Alternatively, the first channel and the second channel can be any two channels of multiple channels, or the first channel and the second channel can be two channel signals obtained from the multi-channel signal. It is not limited that, in the embodiments of the present application, the current frame can also include 3 channels or more channels, which is not limited here. In the embodiments of the present application, for the first channel and the second channel, the transient identifier is obtained, the grouping information is obtained, and the grouping arrangement mode is similar. In subsequent embodiments, only the processing of the first channel is taken as an example, and the processing of the second channel can refer to the processing mode of the first channel, which will not be described here.

[0219] After the encoding end determines the current frame, the current frame is windowed and time-frequency transformed. If the current frame includes M blocks, the spectrum of the M blocks of the current frame can be obtained. M represents the number of blocks included in the current frame, and the value of M is not limited in the embodiments of the present application. For example, the audio signal of the current frame is blocked to obtain the audio signal of M blocks, and the length of the window function used when the audio signal of the block is windowed is the same as that of the block. Then, the M blocks of audio signals are windowed and time-frequency transformed, so that the spectrum of the M blocks can be obtained. For example, the encoding end performs time-frequency transformation on the windowed audio signal of the M blocks of the current frame to obtain the modified discrete cosine transform (MDCT) spectrum of the M blocks. In subsequent embodiments, the spectrum of the M blocks is taken as an example of the MDCT spectrum, which is not limited. The spectrum of the M blocks can also be other spectrums. The M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0220] After the encoding end obtains the spectrum of the M blocks, the M transient identifiers of the M blocks are obtained according to the spectrum of the M blocks. The spectrum of each block is used to determine the transient identifier of the block, and each block corresponds to a transient identifier. The transient identifier of a block is used to indicate the spectrum change of the block in the M blocks. For example, a block included in the M blocks is a first block, and the first block corresponds to a transient identifier. The M blocks of the current frame can be the M blocks of the first channel of the current frame. For another example, the fourth block in the M blocks of the first channel has an index different from that of the first block.

[0221] In some embodiments of the present application, the value of the transient identifier has multiple implementation manners. For example, the transient identifier can indicate that the first block is a transient block, or the transient identifier can indicate that the first block is a non-transient block. Wherein, the transient identifier of a block being transient indicates that the spectrum of the block changes greatly compared with the spectrum of other blocks in the M blocks, and the transient identifier of a block being non-transient indicates that the spectrum of the block does not change greatly compared with the spectrum of other blocks in the M blocks. For example, the transient identifier occupies 1 bit, if the value of the transient identifier is 0, it indicates that the corresponding block is a transient block, and if the value of the transient identifier is 1, it indicates that the corresponding block is a non-transient block. Alternatively, if the value of the transient identifier is 1, it indicates that the corresponding block is a transient block, and if the value of the transient identifier is 0, it indicates that the corresponding block is a non-transient block. Here, no limitation is made.

[0222] 402. Obtain first grouping information of the M blocks of the first channel according to the M first transient identifiers.

[0223] After the encoding end obtains the M transient identifiers of the M blocks, the M transient identifiers of the M blocks are used for grouping the M blocks, the first grouping information of the M blocks is obtained according to the M transient identifiers of the M blocks, the first grouping information of the M blocks can represent the grouping manner of the M blocks, and the M transient identifiers of the M blocks are the basis for grouping the M blocks. For example, blocks with the same transient identifier can be grouped into one group, and blocks with different transient identifiers can be grouped into different groups. The above M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0224] In some embodiments of the present application, the first grouping information includes: a first grouping number of the M blocks of the first channel or a first grouping number identifier, the first grouping number identifier is used to indicate the first grouping number, when the first grouping number is greater than 1, the first grouping information further includes: the M first transient identifiers; or, the first grouping information includes: the M first transient identifiers, that is, the first grouping information can not directly include the grouping number, but indirectly indicate the grouping number by the M first transient identifiers, that is, when the M first transient identifiers indicate that the M blocks of the first channel are all transient blocks or all non-transient blocks, the grouping number is 1, and when the M first transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the grouping number is 2.

[0225] The first grouping information of the M blocks can have various implementation manners. The first grouping information of the M blocks includes: a grouping number of the M blocks or a grouping number identifier, the grouping number identifier is used to indicate the grouping number, when the grouping number is greater than 1, the first grouping information of the M blocks further includes: M transient identifiers of the M blocks; or the first grouping information of the M blocks includes: M transient identifiers of the M blocks. The first grouping information of the M blocks can indicate the grouping situation of the M blocks, so that the encoding end can arrange the spectrum of the M blocks by using the grouping information. The M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0226] For example, the first grouping information of the M blocks includes: a grouping number of the M blocks and a transient identifier of the M blocks, and the transient identifier of the M blocks can also be referred to as grouping flag information. Therefore, the grouping information in the embodiment of the present application can include the grouping number and the grouping flag information. For example, the grouping number can be 1 or 2. The grouping flag information is used to indicate the transient identifier of the M blocks.

[0227] For example, the first grouping information of the M blocks includes: a transient identifier of the M blocks, and the transient identifier of the M blocks can also be referred to as grouping flag information. Therefore, the grouping information in the embodiment of the present application can include the grouping flag information. For example, the grouping flag information is used to indicate the transient identifier of the M blocks.

[0228] For example, the first grouping information of the M blocks includes: a grouping number of the M blocks is 1, that is, when the grouping number is equal to 1, the first grouping information of the M blocks does not include the M transient identifiers, and when the grouping number is greater than 1, the first grouping information of the M blocks further includes: M transient identifiers of the M blocks.

[0229] For another example, the grouping number in the first grouping information of the M blocks can be replaced by a grouping number identifier, which is used to indicate the grouping number. For example, when the grouping number identifier is 0, it indicates that the grouping number is 1, and when the grouping number identifier is 1, it indicates that the grouping number is 2.

[0230] 403. Obtain M second transient identifiers of the M blocks of the second channel according to the spectrum of the M blocks of the second channel of the current frame; the M blocks of the second channel include a second block of the second channel, and the second transient identifier of the second block is used to indicate that the second block is a transient block or a non-transient block;

[0231] 404. Obtain second grouping information of the M blocks of the second channel according to the M second transient identifiers.

[0232] The steps 403 to 404 are similar to the implementation manners of the aforementioned steps 401 to 402, and will not be described here.

[0233] After the encoder obtains the spectrum of the M blocks of the second channel of the current frame, the encoder obtains M transient identifiers of the M blocks according to the spectrum of the M blocks respectively. The spectrum of each block is used to determine the transient identifier of the block, each block corresponds to a transient identifier, and the transient identifier of a block is used to indicate the spectrum change of the block in the M blocks. For example, a block included in the M blocks is the second block, and the second block corresponds to a transient identifier. For another example, a block included in the M blocks of the second channel is the third block, and the index of the third block is different from that of the second block.

[0234] 405.When the first grouping information and the second grouping information satisfy a preset condition, first adjusted grouping information and second adjusted grouping information are obtained according to the first grouping information and the second grouping information, the first adjusted grouping information corresponds to the first grouping information, and the second adjusted grouping information corresponds to the second grouping information.

[0235] The first adjusted grouping information is the same as the first grouping information, and the second adjusted grouping information is obtained based on adjustment of the second grouping information; or, the first adjusted grouping information is obtained based on adjustment of the first grouping information, and the second adjusted grouping information is the same as the second grouping information; or, the first adjusted grouping information is obtained based on adjustment of the first grouping information, and the second adjusted grouping information is obtained based on adjustment of the second grouping information.

[0236] In some embodiments of the present application, the first grouping information includes: a first grouping number or a first grouping number identifier of the M blocks of the first channel, the first grouping number identifier is used to indicate the first grouping number, when the first grouping number is greater than 1, the first grouping information further includes: M first transient identifiers; or, the first grouping information includes: M first transient identifiers;

[0237] and / or,

[0238] The second grouping information includes: a second grouping number or a second grouping number identifier of the M blocks of the second channel, the second grouping number identifier is used to indicate the second grouping number, when the second grouping number is greater than 1, the second grouping information further includes: M second transient identifiers; or, the second grouping information includes: M second transient identifiers;

[0239] and / or,

[0240] The first adjustment grouping information includes: a first adjustment grouping number of the M blocks of the first channel or a first adjustment grouping number identifier, the first adjustment grouping number identifier being used to indicate the first adjustment grouping number, when the first adjustment grouping number is greater than 1, the first adjustment grouping information further includes: M first adjustment transient identifiers of the M blocks of the first channel, the first adjustment transient identifier of the first block being different from the first transient identifier of the first block or the first adjustment transient identifier of the first block being the same as the first transient identifier of the first block; or, the first adjustment grouping information includes: M first adjustment transient identifiers.

[0241] and / or,

[0242] The second adjustment grouping information includes: a second adjustment grouping number of the M blocks of the second channel or a second adjustment grouping number identifier, the second adjustment grouping number identifier being used to indicate the second adjustment grouping number, when the second adjustment grouping number is greater than 1, the second adjustment grouping information further includes: M second adjustment transient identifiers of the M blocks of the second channel, the second adjustment transient identifier of the second block being different from the second transient identifier of the second block or the second adjustment transient identifier of the second block being the same as the second transient identifier of the second block; or, the second adjustment grouping information includes: M second adjustment transient identifiers.

[0243] Specifically, the implementation manners of the first grouping information, the second grouping information, the first adjustment grouping information and the second adjustment grouping information can be any one of the specific implementation manners of the grouping information as described above, which are not limited here.

[0244] It should be noted that the first adjustment grouping information and the first grouping information can be the same or different, and details are described above. The first grouping information includes: the first grouping number or the first grouping number identifier of the M blocks of the first channel. The first adjustment grouping information includes: the first adjustment grouping number or the first adjustment grouping number identifier of the M blocks of the first channel. When the first grouping information is not adjusted, the first grouping number and the first adjustment grouping number are the same, and the first grouping number identifier and the first adjustment grouping number identifier are the same. When the first grouping information is adjusted, the first grouping number and the first adjustment grouping number can be the same or different. For example, the adjustment of the first grouping information does not change the grouping number, and thus the first grouping number and the first adjustment grouping number are the same. If the adjustment of the first grouping information changes the grouping number, the first grouping number and the first adjustment grouping number are different. For example, before the adjustment of the first grouping information, the first grouping number is 2, and after the adjustment of the first grouping information, the first adjustment grouping number is 1. When the first grouping information is adjusted, the first grouping number identifier and the first adjustment grouping number identifier can be the same or different. For example, before the adjustment of the first grouping information, the first grouping number is 2, and the first grouping number identifier is 1. After the adjustment of the first grouping information, if the first adjustment grouping number is 2, the first grouping number identifier is still 1. Similarly, the second adjustment grouping information and the second grouping information can be the same or different, and details are not described herein.

[0245] In an embodiment, the number of transient blocks in the M blocks of the first channel indicated by the first adjustment grouping information is the same as the number of transient blocks in the M blocks of the second channel indicated by the second adjustment grouping information. At this time, the positions (indices) of the transient blocks in the M blocks of the first channel indicated by the first adjustment grouping information can be the same as the positions (indices) of the transient blocks in the M blocks of the second channel indicated by the second adjustment grouping information, or the positions (indices) of the transient blocks in the M blocks of the first channel indicated by the first adjustment grouping information can be different from the positions (indices) of the transient blocks in the M blocks of the second channel indicated by the second adjustment grouping information.

[0246] In another embodiment, the number of transient blocks in the M blocks of the first channel indicated by the first adjustment grouping information is the same as the number of transient blocks in the M blocks of the second channel indicated by the second adjustment grouping information, and the positions (indices) of the transient blocks in the M blocks of the first channel indicated by the first adjustment grouping information are the same as the positions (indices) of the transient blocks in the M blocks of the second channel indicated by the second adjustment grouping information.

[0247] The current frame includes a first channel and a second channel. If the grouping information of the two channels satisfies a preset condition, the grouping information needs to be adjusted. The preset condition needs to be determined in combination with a specific application scenario, which is not limited here. By judging whether the first grouping information and the second grouping information satisfy the preset condition, at least one of the first grouping information and the second grouping information can be adjusted, so that the number of transient blocks of the first channel and the number of transient blocks of the second channel are the same, thereby facilitating subsequent encoding operations.

[0248] When the first grouping information and the second grouping information satisfy the preset condition, the encoding end needs to adjust at least one of the first grouping information and the second grouping information to obtain first adjusted grouping information and second adjusted grouping information. For example, only the first grouping information is adjusted, and the first adjusted grouping information is obtained based on the adjustment of the first grouping information, and the second adjusted grouping information is the same as the second grouping information. For another example, only the second grouping information is adjusted, the first adjusted grouping information is the same as the first grouping information, and the second adjusted grouping information is obtained based on the adjustment of the second grouping information. For another example, both the first grouping information and the second grouping information are adjusted, the first adjusted grouping information is obtained based on the adjustment of the first grouping information, and the second adjusted grouping information is obtained based on the adjustment of the second grouping information. The encoding end adjusts at least one of the first grouping information and the second grouping information, so that the adjusted grouping information can be used for grouping arrangement, thereby obtaining the to-be-encoded spectrum.

[0249] In some embodiments of the present application, the preset condition includes that the first grouping information is inconsistent with the second grouping information.

[0250] The inconsistency between the first grouping information and the second grouping information means that the first grouping information and the second grouping information are not completely consistent. When the first grouping information and the second grouping information are inconsistent, it can be considered that the first grouping information and the second grouping information satisfy the preset condition. When the first grouping information and the second grouping information are consistent, it can be considered that the first grouping information and the second grouping information do not satisfy the preset condition. For example, the number of groups of M blocks of the first grouping information is the same as the number of groups of M blocks of the second grouping information, but the M first transient identifiers included in the first grouping information are different from the M second transient identifiers included in the second grouping information. For another example, the number of groups of M blocks of the first grouping information is different from the number of groups of M blocks of the second grouping information. The preset condition needs to be determined in combination with a specific application scenario, which is not limited here. By setting the above preset condition, it can be judged whether to adjust the first grouping information and the second grouping information.

[0251] In some embodiments of the present application, the first grouping information and the second grouping information are inconsistent in a plurality of implementation manners, for example, the first grouping information and the second grouping information being inconsistent includes: the M first transient identifiers indicating that the M blocks of the first sound channel include transient blocks and non-transient blocks, the M second transient identifiers indicating that the M blocks of the second sound channel include transient blocks and non-transient blocks, and the M first transient identifiers and the M second transient identifiers being inconsistent;

[0252] Or,

[0253] The first grouping information and the second grouping information being inconsistent includes: the M first transient identifiers indicating that the M blocks of the first sound channel include transient blocks and non-transient blocks, the M second transient identifiers indicating that the M blocks of the second sound channel include transient blocks and non-transient blocks, and the number of transient blocks of the first sound channel and the number of transient blocks of the second sound channel being different;

[0254] Or,

[0255] The first grouping information and the second grouping information being inconsistent includes: the M first transient identifiers indicating that the M blocks of the first sound channel include transient blocks and non-transient blocks, the M second transient identifiers indicating that the M blocks of the second sound channel include transient blocks and non-transient blocks, the M first transient identifiers and the M second transient identifiers being inconsistent, and the Nth block of the M blocks of the first sound channel and the Nth block of the M blocks of the second sound channel are both transient, 0≤N

[0256] In an implementation manner, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks. Similarly, the M blocks of the second sound channel include transient blocks and non-transient blocks. The M first transient identifiers and the M second transient identifiers being inconsistent means that at least one of the M first transient identifiers and the transient identifier of the same index in the M second transient identifiers have different values. For example, there is one block A in the M blocks of the first sound channel, and there is one block B in the M blocks of the second sound channel. If the index of block A in the M blocks of the first sound channel is the same as the index of block B in the M blocks of the second sound channel, then the first transient identifier of block A and the second transient identifier of block B are consistent. For example, there is one block C in the M blocks of the first sound channel, and there is one block D in the M blocks of the second sound channel. If the index of block C in the M blocks of the first sound channel is the same as the index of block D in the M blocks of the second sound channel, then the first transient identifier of block A and the second transient identifier of block B are inconsistent. In the embodiments of the present application, when the M first transient identifiers and the M second transient identifiers are inconsistent, it can be determined that the first grouping information and the second grouping information satisfy the preset condition, and at this time, the adjustment of the grouping information is required. When the M first transient identifiers and the M second transient identifiers are completely consistent, it can be determined that the first grouping information and the second grouping information do not satisfy the preset condition, and at this time, the adjustment of the grouping information is not required.

[0257] In an implementation manner, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks, so that the number of transient blocks included in the first sound channel can be counted. Similarly, the M blocks of the second sound channel include transient blocks and non-transient blocks, so that the number of transient blocks included in the second sound channel can be counted. In the embodiment of the present application, when the number of transient blocks of the first sound channel is different from the number of transient blocks of the second sound channel, it can be determined that the first grouping information and the second grouping information satisfy the preset condition, and at this time, the adjustment of the grouping information is needed. When the number of transient blocks of the first sound channel is the same as the number of transient blocks of the second sound channel, it can be determined that the first grouping information and the second grouping information do not satisfy the preset condition, and at this time, the adjustment of the grouping information is not needed.

[0258] In an implementation manner, some of the M blocks of the first sound channel are transient blocks, and some of the M blocks of the first sound channel are non-transient blocks, and similarly, the M blocks of the second sound channel include transient blocks and non-transient blocks. The M first transient identifiers and the M second transient identifiers are inconsistent, which means that at least one of the M first transient identifiers is different from the transient identifier of the same index in the M second transient identifiers. For example, one of the M blocks of the first sound channel is a transient block A, and one of the M blocks of the second sound channel is a transient block B. If the index of block A in the M blocks of the first sound channel is the same as the index of block B in the M blocks of the second sound channel, the first transient identifier of block A is consistent with the second transient identifier of block B. For example, one of the M blocks of the first sound channel is a non-transient block C, and one of the M blocks of the second sound channel is a transient block D. If the index of block C in the M blocks of the first sound channel is the same as the index of block D in the M blocks of the second sound channel, the first transient identifier of block A is inconsistent with the second transient identifier of block B. The Nth block of the M blocks of the first sound channel and the Nth block of the M blocks of the second sound channel are both transient, 0≤N

[0259] Further, in some embodiments of the present application, the M blocks of the first channel have respective indexes, and the M blocks of the second channel have respective indexes;

[0260] When the first grouping information and the second grouping information are inconsistent, and the M first transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, and the number of transient blocks of the first channel and the number of transient blocks of the second channel are inconsistent, if the indexes of the transient blocks in the M blocks of the first channel and the indexes of the transient blocks in the M blocks of the second channel have no intersection, the step 405 of obtaining the first adjusted grouping information and the second adjusted grouping information according to the first grouping information and the second grouping information includes:

[0261] When the number of transient blocks of the first channel is less than the number of transient blocks of the second channel, the first grouping information is adjusted to obtain the first adjusted grouping information, and the first adjusted grouping information indicates that the number of transient blocks of the first channel is equal to the number of transient blocks of the second channel indicated by the second grouping information;

[0262] Or,

[0263] When the number of transient blocks of the first channel is greater than the number of transient blocks of the second channel, the second grouping information is adjusted to obtain the second adjusted grouping information, and the second adjusted grouping information indicates that the number of transient blocks of the second channel is equal to the number of transient blocks of the first channel indicated by the first grouping information.

[0264] Specifically, the M blocks of the first channel have indexes, for example, indexes from 0 to M-1 are indexes of the M blocks, and similarly, the M blocks of the second channel have indexes, for example, indexes from 0 to M-1 are indexes of the M blocks. The indexes of the transient blocks in the M blocks of the first channel have no intersection with the indexes of the transient blocks in the M blocks of the second channel, that is, the indexes of the transient blocks in the M blocks of the first channel are completely different from the indexes of the transient blocks in the M blocks of the second channel. For example, the transient identifier of the transient block is 0, and the transient identifier of the non-transient block is 1. For example, the value of M is 4, the transient identifiers of the 4 blocks (indexes are 0-3 respectively) of the first channel are 1011 (corresponding to indexes 0-3 respectively, that is, the value of the transient identifier of the block with index 0 is 1, the value of the transient identifier of the block with index 1 is 0, the value of the transient identifier of the block with index 2 is 1, and the value of the transient identifier of the block with index 3 is 1), and the transient identifiers of the 4 blocks (indexes are 0-3 respectively) of the second channel are 0110 (corresponding to indexes 0-3 respectively, that is, the value of the transient identifier of the block with index 0 is 0, the value of the transient identifier of the block with index 1 is 1, the value of the transient identifier of the block with index 2 is 1, and the value of the transient identifier of the block with index 3 is 0), then the first channel has one transient block, and the second channel has two transient blocks, the index of the transient block of the first channel is 1, and the indexes of the two transient blocks of the second channel are 0 and 3, and the indexes of the transient blocks in the 4 blocks of the first channel have no intersection with the indexes of the transient blocks in the 4 blocks of the second channel.

[0265] When the number of transient blocks of the first channel is inconsistent with the number of transient blocks of the second channel, and the indexes of the transient blocks in the M blocks of the first channel have no intersection with the indexes of the transient blocks in the M blocks of the second channel, then the grouping information of the channel with fewer transient blocks needs to be adjusted, and the grouping information of the channel with more transient blocks remains unchanged, and the number of transient blocks indicated by the grouping information of the two channels after adjustment is the same. Through this adjustment method, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel. Wherein, the indexes of the transient blocks in the M blocks of the first channel have no intersection with the indexes of the transient blocks in the M blocks of the second channel means that the transient identifiers of the two blocks corresponding to the same index in the M blocks of the first channel and the M blocks of the second channel are not the same, that is, taking M as 4 for example, the transient identifier of the block with index 0 in the M blocks of the first channel is not the same as the transient identifier of the block with index 0 in the M blocks of the second channel, the transient identifier of the block with index 1 in the M blocks of the first channel is not the same as the transient identifier of the block with index 1 in the M blocks of the second channel, the transient identifier of the block with index 2 in the M blocks of the first channel is not the same as the transient identifier of the block with index 2 in the M blocks of the second channel, and the transient identifier of the block with index 3 in the M blocks of the first channel is also not the same as the transient identifier of the block with index 3 in the M blocks of the second channel.

[0266] When the number of transient blocks of the first sound channel is less than the number of transient blocks of the second sound channel, the first grouping information is adjusted to obtain first adjusted grouping information. Specifically, the adjustment of the first grouping information can include adjusting the first transient identifier of the M blocks, for example, adjusting the first transient identifier of the first block in the M blocks from non-transient to transient, so that the number of transient blocks of the first sound channel is increased, and the number of transient blocks of the first sound channel in the first adjusted grouping information (i.e., the number of transient blocks of the first sound channel after adjustment) is equal to the number of transient blocks of the second sound channel indicated by the second grouping information.

[0267] When the number of transient blocks of the first sound channel is greater than the number of transient blocks of the second sound channel, the second grouping information is adjusted to obtain second adjusted grouping information. Specifically, the adjustment of the second grouping information can include adjusting the second transient identifier of the M blocks, for example, adjusting the second transient identifier of the second block in the M blocks from non-transient to transient, so that the number of transient blocks of the second sound channel is increased, and the number of transient blocks of the second sound channel in the second adjusted grouping information (i.e., the number of transient blocks of the second sound channel after adjustment) is equal to the number of transient blocks of the first sound channel indicated by the first grouping information.

[0268] Further, in some embodiments of the present application, the M blocks of the first sound channel have respective indexes, and the M blocks of the second sound channel have respective indexes.

[0269] When the first grouping information and the second grouping information are inconsistent, including that the M first transient identifiers indicate that the M blocks of the first sound channel include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound channel include transient blocks and non-transient blocks, and the number of transient blocks of the first sound channel and the number of transient blocks of the second sound channel are inconsistent, if the indexes of the transient blocks in the M blocks of the first sound channel and the indexes of the transient blocks in the M blocks of the second sound channel have an intersection, step 405 of obtaining the first adjusted grouping information and the second adjusted grouping information according to the first grouping information and the second grouping information includes:

[0270] When the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, and the indexes of all transient blocks indicated by the M first adjusted transient identifiers are the same as the indexes of all transient blocks indicated by the M second transient identifiers.

[0271] Or

[0272] When the indexes of the transient blocks indicated by the M second transient identifier are part of the indexes of the transient blocks indicated by the M first transient identifier, at least one of the M second transient identifier is adjusted to obtain M second adjusted transient identifier, the indexes of all the transient blocks indicated by the M second adjusted transient identifier are the same as the indexes of all the transient blocks indicated by the M first transient identifier.

[0273] Or

[0274] When the indexes of the transient blocks indicated by the M first transient identifier are part of the indexes of the transient blocks indicated by the M second transient identifier, at least one of the M first transient identifier is adjusted to obtain M first adjusted transient identifier, at least one of the M second transient identifier is adjusted to obtain M second adjusted transient identifier, the indexes of all the transient blocks indicated by the M first adjusted transient identifier are the same as the indexes of all the transient blocks indicated by the M second adjusted transient identifier.

[0275] Specifically, the M blocks of the first channel have indexes, for example, the indexes of the M blocks are from 0 to M-1, similarly, the M blocks of the second channel have indexes, for example, the indexes of the M blocks are from 0 to M-1. The indexes of the transient blocks in the M blocks of the first channel have intersection with the indexes of the transient blocks in the M blocks of the second channel, that is, the indexes of the transient blocks in the M blocks of the first channel are partially the same as the indexes of the transient blocks in the M blocks of the second channel, but not completely the same. For example, the transient identifier of the transient block is 0, and the transient identifier of the non-transient block is 1. For example, the value of M is 4, the transient identifier of the 4 blocks of the first channel is 0011, and the transient identifier of the 4 blocks of the second channel is 0111, then the first channel has two transient blocks, and the second channel has one transient block, the indexes of the two transient blocks of the first channel are 0 and 1, and the index of the transient block of the second channel is 0, the index of the transient block of the first channel is 0 and the index of the transient block of the second channel is 0, that is, the indexes of the transient blocks in the 4 blocks of the first channel have intersection with the indexes of the transient blocks in the 4 blocks of the second channel.

[0276] The indexes of the transient blocks in the M blocks of the first channel have intersection with the indexes of the transient blocks in the M blocks of the second channel, which has various implementation manners.

[0277] In an implementation, for example, the number of transient blocks of the first channel is less than the number of transient blocks of the second channel, i.e., the indexes of the transient blocks indicated by the M first transient identifiers are a part of the indexes of the transient blocks indicated by the M second transient identifiers, at this time, the first transient identifiers of the M blocks of the first channel need to be adjusted, the second transient identifiers of the M blocks of the second channel remain unchanged, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, the indexes of all the transient blocks indicated by the M first adjusted transient identifiers are the same as the indexes of all the transient blocks indicated by the M second transient identifiers, and the number of transient blocks indicated by the grouping information of the two channels after adjustment is the same. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0278] In an implementation, for example, the number of transient blocks of the second channel is less than the number of transient blocks of the first channel, i.e., the indexes of the transient blocks indicated by the M second transient identifiers are a part of the indexes of the transient blocks indicated by the M first transient identifiers, at this time, the second transient identifiers of the M blocks of the second channel need to be adjusted, the first transient identifiers of the M blocks of the first channel remain unchanged, at least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers, the indexes of all the transient blocks indicated by the M second adjusted transient identifiers are the same as the indexes of all the transient blocks indicated by the M first transient identifiers, and the number of transient blocks indicated by the grouping information of the two channels after adjustment is the same. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0279] In an implementation, for example, the number of transient blocks of the second channel is not equal to the number of transient blocks of the first channel, but the indexes of the transient blocks indicated by the M first transient identifiers are partially the same as the indexes of the transient blocks indicated by the M second transient identifiers, where partially the same means that the indexes of some transient blocks in the M blocks of the first channel are partially the same as the indexes of some transient blocks in the M blocks of the second channel, but not completely the same. At this time, the first transient identifiers of the M blocks of the first channel need to be adjusted, and the second transient identifiers of the M blocks of the second channel need to be adjusted, i.e., the transient identifiers of the M blocks of the two channels need to be adjusted, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, at least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers, and the indexes of all the transient blocks indicated by the M first adjusted transient identifiers are the same as the indexes of all the transient blocks indicated by the M second adjusted transient identifiers. The number of transient blocks indicated by the grouping information of the two channels after adjustment is the same. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0280] Next, the adjustment manner of the transient identifier in the embodiments of the present application is described. For example, at least one of the M first transient identifiers is adjusted to obtain M first adjusted transient identifiers, including:

[0281] When the first transient identifier of the first block indicates that the first block is a non-transient block, if the second transient identifier of the third block of the M blocks of the second channel indicates that the third block is a transient block, the first transient identifier of the first block is adjusted to be the first adjusted transient identifier of the first block, the first adjusted transient identifier of the first block indicates that the first block is a transient block, and the index of the first block is the same as the index of the third block;

[0282] Or

[0283] At least one of the M second transient identifiers is adjusted to obtain M second adjusted transient identifiers, including:

[0284] When the second transient identifier of the second block indicates that the second block is a non-transient block, if the first transient identifier of the fourth block of the M blocks of the first channel indicates that the fourth block is a transient block, the second transient identifier of the second block is adjusted to be the second adjusted transient identifier of the second block, the second adjusted transient identifier of the second block indicates that the second block is a transient block, and the index of the second block is the same as the index of the fourth block.

[0285] Wherein, the adjustment of the M first transient identifiers is similar to the adjustment of the M second transient identifiers, and next, the adjustment of the first transient identifier is taken as an example. When the first transient identifier of the first block indicates that the first block is a non-transient block, if the second transient identifier of the third block of the M blocks of the second channel indicates that the third block is a transient block, the first transient identifier of the first block is adjusted to be the first adjusted transient identifier of the first block, the first adjusted transient identifier of the first block indicates that the first block is a transient block, and the index of the first block is the same as the index of the third block. For example, the first transient identifier of the first block is 1, and the second transient identifier of the third block is 0, and the index of the first block and the index of the third block are both 4, then the first adjusted transient identifier of the first block is 0. Through this adjustment manner, the number of transient blocks of the first channel and the second channel can be made the same, thereby facilitating subsequent encoding of the spectrum of the first channel and the second channel.

[0286] In some embodiments of the present application, the method performed by the encoding end further includes:

[0287] A1. Encode the first adjusted grouping information and the second adjusted grouping information to obtain a grouping information encoding result.

[0288] A2. Write the grouping information encoding result into a bitstream.

[0289] The encoding end encodes the first adjustment grouping information and the second adjustment grouping information after obtaining the first adjustment grouping information and the second adjustment grouping information, and obtains a grouping information encoding result. The encoding manner used for the adjustment grouping information is not limited here. The grouping information encoding result can be obtained by encoding the adjustment grouping information. The grouping information encoding result can be written into a code stream, so that the code stream can carry the grouping information encoding result, so that the decoding end obtains the grouping information encoding result by analyzing the code stream, and obtains the first adjustment grouping information and the second adjustment grouping information by analysis.

[0290] It should be noted that there is no order between step A2 and subsequent step 409. Step 409 can be performed first, and then step A2 can be performed. Step A2 can be performed first, and then step 409 can be performed. Or step A2 and step 409 can be performed at the same time, which is not limited here.

[0291] 406. Obtain a first to-be-encoded spectrum according to the first adjustment grouping information and the spectrum of the M blocks of the first channel.

[0292] The first to-be-encoded spectrum is the first to-be-encoded spectrum of the first channel of the current frame, and the first to-be-encoded spectrum can also be referred to as the spectrum of the M blocks arranged in groups of the first channel.

[0293] Taking the case that the encoding end obtains the first adjustment grouping information as an example, after the encoding end obtains the first adjustment grouping information of the M blocks, the first adjustment grouping information of the M blocks can be used to process the spectrum of the M blocks of the current frame. The first adjustment grouping information can be used to adjust the arrangement order of the spectrum of the M blocks in the current frame. The first adjustment grouping information can be used to generate the first to-be-encoded spectrum.

[0294] In some embodiments of the present application, when the first adjustment grouping number is greater than 1 or the M first adjustment transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, obtaining the first to-be-encoded spectrum according to the first adjustment grouping information and the spectrum of the M blocks of the first channel includes:

[0295] Grouping and arranging the spectrum of the M blocks of the first channel according to the first adjustment grouping information to obtain the first to-be-encoded spectrum.

[0296] Taking the first adjustment grouping information obtained by the encoding end as an example, after the encoding end obtains the first adjustment grouping information of the M blocks, the first adjustment grouping information of the M blocks can be used to arrange and group the spectrum of the M blocks of the current frame, and by arranging and grouping the spectrum of the M blocks, the arrangement order of the spectrum of the M blocks in the current frame can be adjusted. The above arrangement and grouping is performed according to the first adjustment grouping information of the M blocks, and the first adjustment grouping information of the M blocks is obtained according to the M transient identifiers of the M blocks. After the above arrangement and grouping of the M blocks, the spectrum of the M blocks after the arrangement and grouping is obtained, and the spectrum of the M blocks after the arrangement and grouping is arranged and grouped according to the M transient identifiers of the M blocks. By arranging and grouping, the encoding order of the spectrum of the M blocks can be changed. It should be noted that the M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0297] 407. Obtain a second to-be-encoded spectrum according to the second adjustment grouping information and the spectrum of the M blocks of the second channel.

[0298] The second to-be-encoded spectrum is the second to-be-encoded spectrum of the second channel of the current frame, and the second to-be-encoded spectrum can also be referred to as the spectrum of the M blocks after the arrangement and grouping of the second channel.

[0299] In some embodiments of the present application, when the second adjustment grouping number is greater than 1 or the M second adjustment transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, obtaining the second to-be-encoded spectrum according to the second adjustment grouping information and the spectrum of the M blocks of the second channel includes:

[0300] Arranging and grouping the spectrum of the M blocks of the second channel according to the second adjustment grouping information to obtain the second to-be-encoded spectrum.

[0301] In some embodiments of the present application, arranging and grouping the spectrum of the M blocks of the first channel according to the first adjustment grouping information to obtain the first to-be-encoded spectrum includes:

[0302] B1. Dividing the spectrum of the M blocks of the first channel indicated as transient blocks by the first adjustment transient identifiers of the M blocks into a first transient group, and dividing the spectrum of the M blocks of the first channel indicated as non-transient blocks by the first adjustment transient identifiers of the M blocks into a first non-transient group; arranging the spectrum of the blocks in the first transient group before the spectrum of the blocks in the first non-transient group to obtain the first to-be-encoded spectrum.

[0303] Wherein, after the encoding end obtains the first adjustment grouping information of the M blocks, the M blocks are grouped based on the difference of the transient identifiers, so that the transient group and the non-transient group can be obtained, and then the positions of the M blocks in the spectrum of the current frame are arranged, the spectrum of the block in the transient group is arranged before the spectrum of the block in the non-transient group, so as to obtain the to-be-encoded spectrum. That is, in the to-be-encoded spectrum, the spectrum of all transient blocks is located before the spectrum of non-transient blocks, so that the spectrum of the transient block can be adjusted to a position with higher coding importance, so that the reconstructed audio signal after the neural network coding and decoding processing can better retain the transient characteristics. The above M blocks of the current frame can be M blocks of the first channel of the current frame.

[0304] Or, the spectrum of the M blocks of the second channel is grouped and arranged according to the second adjustment grouping information to obtain a second to-be-encoded spectrum, comprising:

[0305] B2. The spectrum of the M blocks of the second channel indicated as the transient block by the second adjustment transient identifier of the M blocks is divided into the second transient group, and the spectrum of the M blocks of the second channel indicated as the non-transient block by the second adjustment transient identifier of the M blocks is divided into the second non-transient group; the spectrum of the block in the second transient group is arranged before the spectrum of the block in the second non-transient group to obtain the second to-be-encoded spectrum.

[0306] In some embodiments of the present application, the spectrum of the M blocks of the first channel is grouped and arranged according to the first adjustment grouping information to obtain a first to-be-encoded spectrum, comprising:

[0307] C1. The spectrum of the M blocks of the first channel indicated as the transient block by the first adjustment transient identifier of the M blocks is arranged before the spectrum of the M blocks of the first channel indicated as the non-transient block by the first adjustment transient identifier of the M blocks to obtain the first to-be-encoded spectrum.

[0308] Wherein, after the encoding end obtains the first adjustment grouping information of the M blocks, the transient identifier of each block in the M blocks is determined according to the first adjustment grouping information, P transient blocks and Q non-transient blocks are found from the M blocks, and M=P+Q. The spectrum of the M blocks indicated as the transient block by the M first adjustment transient identifiers is arranged before the spectrum of the M blocks indicated as the non-transient block by the M transient identifiers to obtain the to-be-encoded spectrum. That is, in the to-be-encoded spectrum, the spectrum of all transient blocks is located before the spectrum of non-transient blocks, so that the spectrum of the transient block can be adjusted to a position with higher coding importance, so that the reconstructed audio signal after the neural network coding and decoding processing can better retain the transient characteristics. The above M blocks of the current frame can be M blocks of the first channel of the current frame.

[0309] Or, the spectrum of the M blocks of the second channel is grouped and arranged according to the second adjustment grouping information to obtain a second to-be-encoded spectrum, comprising:

[0310] arranging the spectrum of the M blocks in the second channel that are indicated as transient blocks by the second transient identification of the M blocks into the M blocks in the second channel before arranging the spectrum of the M blocks in the second channel that are indicated as non-transient blocks by the second transient identification of the M blocks into the M blocks in the second channel, to obtain second to-be-encoded spectrums.

[0311] 408. encoding the first to-be-encoded spectrums and the second to-be-encoded spectrums by using an encoding neural network to obtain a spectrum encoding result;

[0312] 409. writing the spectrum encoding result into a bitstream.

[0313] In the embodiments of the present application, after the encoding end obtains the first to-be-encoded spectrums and the second to-be-encoded spectrums, the encoding neural network can be used for encoding to generate a spectrum encoding result, and then the spectrum encoding result is written into a bitstream. The encoding end can send the bitstream to the decoding end.

[0314] One implementable way is that the encoding end takes the to-be-encoded spectrums as input data of the encoding neural network, or the to-be-encoded spectrums can be processed in other ways and then taken as input data of the encoding neural network. After processing by the encoding neural network, latent variables can be generated, which represent the characteristics of the spectrums of the M blocks after grouping arrangement.

[0315] In some embodiments of the present application, before step 408 encodes the first to-be-encoded spectrums and the second to-be-encoded spectrums by using the encoding neural network, the method executed by the encoding end further includes:

[0316] D1. performing in-group interleaving processing on the first to-be-encoded spectrums to obtain first spectrums after in-group interleaving processing;

[0317] D2. performing in-group interleaving processing on the second to-be-encoded spectrums to obtain second spectrums after in-group interleaving processing;

[0318] In this implementation scenario, step 408 encodes the first to-be-encoded spectrums and the second to-be-encoded spectrums by using the encoding neural network, including:

[0319] E1. encoding the first spectrums after in-group interleaving processing and the second spectrums after in-group interleaving processing by using the encoding neural network.

[0320] The encoding end can perform in-group interleaving processing on the M blocks of each channel according to the grouping of the M blocks, so as to obtain the spectrum of the M blocks after in-group interleaving processing. The spectrum of the M blocks after in-group interleaving processing can be the input data of the encoding neural network. The M blocks of the current frame can be the M blocks of the first channel of the current frame. Through in-group interleaving processing, the side information of encoding can be reduced, and the encoding efficiency can be improved.

[0321] In some embodiments of the present application, the number of the M blocks of the first channel indicated as transient blocks by the M first transient identifiers is P, the number of the M blocks of the first channel indicated as non-transient blocks by the M first transient identifiers is Q, and M=P+Q. The values of P and Q are not limited in the embodiments of the present application.

[0322] Specifically, step D1 performs in-group interleaving processing on the first to-be-encoded spectrum, including:

[0323] D11. Interleaving processing is performed on the spectrum of the P blocks to obtain the spectrum of the P blocks after interleaving processing;

[0324] D12. Interleaving processing is performed on the spectrum of the Q blocks to obtain the spectrum of the Q blocks after interleaving processing.

[0325] The interleaving processing on the spectrum of the P blocks includes interleaving processing on the spectrum of the P blocks as a whole. Similarly, the interleaving processing on the spectrum of the Q blocks includes interleaving processing on the spectrum of the Q blocks as a whole.

[0326] It should be noted that if the number of the adjusted grouping of the M blocks of the first channel is 1, in-group interleaving processing needs to be performed on the spectrum of the M blocks of the first channel to obtain the spectrum of the M blocks of the first channel after in-group interleaving processing.

[0327] In the case of performing steps D11 and D12, step E1 encodes the first spectrum after in-group interleaving processing and the second spectrum after in-group interleaving processing by using the encoding neural network, including:

[0328] The P blocks after interleaving processing and the Q blocks after interleaving processing are encoded by using the encoding neural network.

[0329] In D11 to D12, the encoding end can perform interleaving processing on the transient group and the non-transient group respectively, so as to obtain the spectrum of the P blocks after interleaving processing and the spectrum of the Q blocks after interleaving processing. The spectrum of the P blocks after interleaving processing and the spectrum of the Q blocks after interleaving processing can be the input data of the encoding neural network. Through in-group interleaving processing, the side information of encoding can be reduced, and the encoding efficiency can be improved.

[0330] In some embodiments of the present application, before the step 401 of obtaining the M first transient identifications of the M blocks of the first channel according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the method performed by the encoding end further comprises:

[0331] F1. obtaining a first window type of the first channel, the first window type being a short window type or a non-short window type;

[0332] F2. obtaining a second window type of the second channel, the second window type being a short window type or a non-short window type;

[0333] F3. when the first window type and the second window type are both short window types, the step of obtaining the M first transient identifications of the M blocks of the first channel according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded is executed.

[0334] Before the step 401 is executed, the encoding end can first determine the window type of the current frame, which can be a short window type or a non-short window type, for example, the encoding end determines the window type according to the current frame of the multi-channel signal to be encoded. Wherein, the short window can also be called a short frame, and the non-short window can also be called a non-short frame. When the window type is a short window type, the aforementioned step 401 is triggered to be executed. In the embodiments of the present application, the aforementioned encoding scheme is executed when the window type of the current frame is a short window type, so as to realize the encoding when the multi-channel signal is a transient signal.

[0335] In some embodiments of the present application, when the encoding end executes the aforementioned steps F1 to F3, the method performed by the encoding end further comprises:

[0336] G1. encoding the first window type and the second window type to obtain a window type encoding result;

[0337] G2. writing the window type encoding result into a bitstream.

[0338] Wherein, after obtaining the first window type of the first channel and the second window type of the second channel of the current frame, the encoding end can carry the window type in the bitstream, and first encode the window type. The encoding manner adopted for the window type is not limited here. Through the encoding of the window type, a window type encoding result can be obtained, which can be written into the bitstream, so that the bitstream can carry the window type encoding result. So that the decoding end can obtain the window type encoding result through the bitstream, and analyze the window type encoding result to obtain the first window type of the first channel and the second window type of the second channel of the current frame. According to the first window type of the first channel and the second window type of the second channel, it is determined whether to continue decoding the bitstream to obtain the first decoding grouping information of the M blocks of the first channel.

[0339] In some embodiments of the present application, step 401 obtains M first transient identifiers of M blocks of a first channel according to the spectra of the M blocks of the first channel of a current frame of the multi-channel signal to be encoded, comprising:

[0340] H1. obtaining M first spectral energies of the M blocks of the first channel according to the spectra of the M blocks of the first channel;

[0341] H2. obtaining a first spectral energy average of the M blocks of the first channel according to the M first spectral energies;

[0342] H3. obtaining the M first transient identifiers according to the M first spectral energies and the first spectral energy average.

[0343] After the encoding end obtains the M spectral energies, the M spectral energies can be averaged to obtain a spectral energy average, or the maximum value or the maximum values of the M spectral energies can be removed before averaging to obtain the spectral energy average. By comparing the spectral energy of each block with the spectral energy average, the change of the spectrum of each block compared with the spectra of other blocks in the M blocks is determined, and then the M transient identifiers of the M blocks are obtained, wherein the transient identifier of a block can be used to represent the transient feature of the block. The M blocks of the current frame can be the M blocks of the first channel of the current frame. According to the spectral energy of each block and the spectral energy average, the transient identifier of each block can be determined, so that the grouping information of the block can be determined by the transient identifier of the block.

[0344] Further, in some embodiments of the present application, when the first spectral energy of the first block is greater than K times of the first spectral energy average, the first transient identifier of the first block indicates that the first block is a transient block; or,

[0345] when the first spectral energy of the first block is less than or equal to K times of the first spectral energy average, the transient identifier of the first block indicates that the first block is a non-transient block;

[0346] wherein K is a real number greater than or equal to 1.

[0347] The value of K has multiple values, which are not limited here. Taking the determination process of the transient identifier of the first block in the M blocks as an example, when the spectral energy of the first block is greater than K times of the spectral energy average, it indicates that the spectral change of the first block is too large compared with other blocks in the M blocks, and the transient identifier of the first block indicates that the first block is a transient block. When the spectral energy of the first block is less than or equal to K times of the spectral energy average, it indicates that the spectral change of the first block is not large compared with other blocks in the M blocks, and the transient identifier of the first block indicates that the first block is a non-transient block. The M blocks of the current frame can be the M blocks of the first channel of the current frame.

[0348] Not limited, the encoding end can also obtain the M transient identifiers of the M blocks according to other manners, for example, obtaining the difference or ratio value of the spectral energy of the first block and the average value of the spectral energy, and determining the M transient identifiers of the M blocks according to the obtained difference or ratio value.

[0349] As can be known from the foregoing embodiments of the encoding end, the current frame of the multi-channel signal to be encoded includes a first channel and a second channel, each channel includes the spectrum of M blocks, the M first transient identifiers of the M blocks of the first channel are obtained according to the spectrum of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the first grouping information of the M blocks of the first channel is obtained according to the M first transient identifiers, and the second grouping information of the M blocks of the second channel can be obtained in the same manner. When the first grouping information and the second grouping information satisfy a preset condition, the first adjustment grouping information and the second adjustment grouping information are obtained according to the first grouping information and the second grouping information. Next, the first to-be-encoded spectrum is obtained according to the first adjustment grouping information and the spectrum of the M blocks of the first channel, and the second to-be-encoded spectrum can be obtained in the same manner. Finally, the first to-be-encoded spectrum and the second to-be-encoded are encoded by using the encoding neural network to obtain the spectrum encoding result, and the spectrum encoding result can be carried in the code stream. Therefore, in the embodiments of the present application, the grouping information of the M blocks of each channel is obtained according to the M transient identifiers of each channel of the current frame, the adjustment grouping information of the M blocks of each channel is obtained when the grouping information of the M blocks of each channel satisfies the preset condition, and the to-be-encoded spectrum is obtained according to the adjustment grouping information of the M blocks of each channel and the spectrum of the M blocks of each channel. Thus, grouping, adjustment and encoding can be performed on the blocks with different transient identifiers, and the encoding quality of the multi-channel signal can be improved.

[0350] The embodiments of the present application also provide a decoding method of a multi-channel signal, which can be executed by a terminal device, for example, the terminal device can be a decoding apparatus of a multi-channel signal (hereinafter referred to as a decoding end or a decoder, for example, the decoding end can be an AI decoder). As shown in the Figure 5 The method executed by the decoding end in the embodiments of the present application mainly includes:

[0351] 501. Obtain the first decoding grouping information of the M blocks of the first channel of the current frame of the multi-channel signal from the code stream, and the first decoding grouping information is used to indicate the first decoding transient identifier of the M blocks of the first channel.

[0352] The decoding end receives the code stream sent by the encoding end, the encoding end carries the grouping information coding result in the code stream, and the decoding end can obtain the first decoding grouping information of the M blocks of the current frame of the audio signal by analyzing the code stream. The decoding end can determine the M first decoding transient identifiers of the M blocks according to the first decoding grouping information of the M blocks. For example, the first decoding grouping information can include the number of groups and grouping flag information. For another example, the grouping information can include the grouping flag information, which is described in detail in the foregoing embodiment of the encoding end.

[0353] It should be noted that the first decoding grouping information is the grouping information obtained by the decoding end by decoding the code stream. For example, the encoding end carries the first adjusted grouping information in the code stream, and the first decoding grouping information obtained by the decoding end corresponds to the first adjusted grouping information. The first decoding grouping information is used to indicate the first decoding transient identifiers of the M blocks of the first channel, and the first decoding transient identifiers correspond to the first transient identifiers or the first adjusted transient identifiers of the encoding end. Similarly, the second decoding grouping information obtained in the subsequent steps corresponds to the second adjusted grouping information, and the second decoding transient identifiers correspond to the second transient identifiers or the second adjusted transient identifiers of the encoding end.

[0354] 502. Obtain the second decoding grouping information of the M blocks of the second channel of the current frame from the code stream, and the second decoding grouping information is used to indicate the second decoding transient identifiers of the M blocks of the second channel.

[0355] 503. Decode the code stream by using the decoding neural network to obtain the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel.

[0356] After the decoding end obtains the code stream, the decoding neural network is used to decode the code stream to obtain the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel. Since the encoding end encodes the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel after grouping and arranging, the encoding end carries the spectrum coding result in the code stream, and the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel correspond to the spectrum of the M blocks of the first channel and the spectrum of the M blocks of the second channel after grouping and arranging of the encoding end. The decoding neural network of the decoding end is opposite to the execution process of the encoding neural network of the encoding end, and the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel can be obtained by decoding.

[0357] 504. Obtain the first reconstructed signal of the first channel according to the first decoding grouping information and the decoding spectrum of the M blocks of the first channel.

[0358] The first decoded spectrum of the M blocks of the first channel corresponds to the spectrum of the M blocks of the first channel arranged by the grouping at the encoding end, and thus the first reconstructed signal of the first channel can be obtained by the first decoded grouping information. When reconstructing the signal, the blocks with different transient identifiers in the multi-channel signal can be decoded and reconstructed, and thus the reconstruction effect of the multi-channel signal can be improved.

[0359] 505. The second reconstructed signal of the second channel is obtained according to the second decoded grouping information and the decoded spectrum of the M blocks of the second channel.

[0360] The second decoded spectrum of the M blocks of the second channel corresponds to the spectrum of the M blocks of the second channel arranged by the grouping at the encoding end, and thus the second reconstructed signal of the second channel can be obtained by the second decoded grouping information. When reconstructing the signal, the blocks with different transient identifiers in the multi-channel signal can be decoded and reconstructed, and thus the reconstruction effect of the multi-channel signal can be improved.

[0361] In some embodiments of the present application, the first reconstructed signal of the first channel is obtained according to the first decoded grouping information and the decoded spectrum of the M blocks of the first channel, including:

[0362] When the first decoded grouping information indicates that the first decoded grouping number of the M blocks of the first channel is greater than 1, the decoded spectrum of the M blocks of the first channel is subjected to inverse grouping arrangement processing to obtain the spectrum of the M blocks of the first channel after inverse grouping arrangement processing;

[0363] The first reconstructed signal of the first channel is obtained according to the spectrum of the M blocks of the first channel after inverse grouping arrangement processing;

[0364] The second reconstructed signal of the second channel is obtained according to the second decoded grouping information and the decoded spectrum of the M blocks of the second channel, including:

[0365] When the second decoded grouping information indicates that the second decoded grouping number of the M blocks of the second channel is greater than 1, the decoded spectrum of the M blocks of the second channel is subjected to inverse grouping arrangement processing to obtain the spectrum of the M blocks of the second channel after inverse grouping arrangement processing;

[0366] The second reconstructed signal of the second channel is obtained according to the spectrum of the M blocks of the second channel after inverse grouping arrangement processing.

[0367] Taking the signal reconstruction process of the first channel as an example, the decoding end obtains the first decoding grouping information of the M blocks, and the decoding end further obtains the decoding spectrum of the M blocks of the first channel through the code stream. Since the encoding end has performed grouping arrangement processing on the decoding spectrum of the M blocks of the first channel, the decoding end needs to perform a process opposite to that of the encoding end, and therefore, inverse grouping arrangement processing is performed on the decoding spectrum of the M blocks of the first channel according to the first decoding grouping information of the M blocks, to obtain the spectrum of the M blocks of the first channel after inverse grouping arrangement processing, which is opposite to the grouping arrangement processing of the encoding end.

[0368] After obtaining the spectrum of the M blocks of the first channel after inverse grouping arrangement processing, the encoding end can obtain the first reconstructed signal of the first channel by performing frequency domain to time domain conversion on the spectrum of the M blocks of the first channel after inverse grouping arrangement processing.

[0369] The implementation manner of the decoding process of the second channel is similar to the process of decoding the first channel, which will not be described herein.

[0370] In some embodiments of the present application, step 504 obtains the first reconstructed signal of the first channel according to the first decoding grouping information and the decoding spectrum of the M blocks of the first channel, including:

[0371] I1. performing in-group de-interleaving processing on the decoding spectrum of the M blocks of the first channel, to obtain the spectrum of the M blocks of the first channel after in-group de-interleaving processing;

[0372] J1. obtaining the first reconstructed signal according to the spectrum of the M blocks of the first channel after in-group de-interleaving processing.

[0373] The in-group de-interleaving performed by the decoding end is the inverse process of the in-group interleaving of the encoding end, which will not be described in detail herein.

[0374] Step 505 obtains the second reconstructed signal of the second channel according to the second decoding grouping information and the decoding spectrum of the M blocks of the second channel, including:

[0375] performing in-group de-interleaving processing on the decoding spectrum of the M blocks of the second channel, to obtain the spectrum of the M blocks of the second channel after in-group de-interleaving processing;

[0376] obtaining the second reconstructed signal according to the spectrum of the M blocks of the second channel after in-group de-interleaving processing.

[0377] In some embodiments of the present application, the number of the M blocks of the first channel indicated as transient blocks by the M first decoding transient identifiers is P, and the number of the M blocks of the first channel indicated as non-transient blocks by the M first decoding transient identifiers is Q, wherein M=P+Q.

[0378] obtaining a first reconstructed signal of the first channel according to the first decoded grouping information and the decoded spectrum of the M blocks of the first channel, comprising:

[0379] performing in-group de-interleaving processing on the decoded spectrum of the P blocks of the first channel and performing in-group de-interleaving processing on the decoded spectrum of the Q blocks of the first channel to obtain in-group de-interleaved spectrum of the M blocks of the first channel;

[0380] performing inverse grouping arrangement processing on the in-group de-interleaved spectrum of the M blocks of the first channel according to the first decoded grouping information to obtain inverse grouping arrangement processed spectrum of the M blocks of the first channel;

[0381] obtaining the first reconstructed signal of the first channel according to the inverse grouping arrangement processed spectrum of the M blocks of the first channel.

[0382] wherein the de-interleaving processing on the spectrum of the P blocks comprises de-interleaving processing on the spectrum of the P blocks as a whole, and the de-interleaving processing on the spectrum of the Q blocks comprises de-interleaving processing on the spectrum of the Q blocks as a whole.

[0383] wherein the encoding end can perform interleaving processing according to the transient group and the non-transient group, so as to obtain the interleaving processed spectrum of the P blocks and the interleaving processed spectrum of the Q blocks. The interleaving processed spectrum of the P blocks and the interleaving processed spectrum of the Q blocks can be used as input data of the encoding neural network. Through the in-group interleaving processing, the side information of the encoding can be reduced, and the encoding efficiency can be improved. Since the encoding end performs in-group interleaving, the decoding end needs to perform a corresponding inverse process, i.e., the decoding end can perform de-interleaving processing.

[0384] It should be noted that if the adjusted grouping number of the M blocks of the first channel is 1, the decoded spectrum of the M blocks of the first channel needs to be subjected to in-group de-interleaving processing to obtain in-group de-interleaved spectrum of the M blocks of the first channel.

[0385] In some embodiments of the present application, the number of transient blocks indicated by the M first decoded transient identifiers in the M blocks of the first channel is P, and the number of non-transient blocks indicated by the M first decoded transient identifiers in the M blocks of the first channel is Q, M=P+Q;

[0386] performing inverse grouping arrangement processing on the decoded spectrum of the M blocks of the first channel according to the first decoded grouping information, comprising:

[0387] K1. obtaining the index of the P blocks of the first channel according to the first decoded grouping information;

[0388] K2. obtaining the index of the Q blocks of the first channel according to the first decoded grouping information;

[0389] K3. performing inverse grouping permutation on the decoded spectrum of the M blocks of the first channel according to the index of the P blocks and the index of the Q blocks.

[0390] wherein the index of the M blocks is continuous, for example, from 0 to M-1, before the grouping permutation is performed on the spectrum of the M blocks at the encoding end. The index of the M blocks is no longer continuous after the grouping permutation is performed at the encoding end. The index of the P blocks of the reconstructed grouped M blocks and the index of the Q blocks of the reconstructed grouped M blocks can be obtained according to the first decoded grouping information of the M blocks at the decoding end, and the index of the M blocks can be recovered to be continuous through the inverse grouping permutation.

[0391] In some embodiments of the present application, the method performed by the decoding end further comprises:

[0392] L1. obtaining the window type of the first channel of the current frame from the bitstream;

[0393] L2. obtaining the window type of the second channel of the current frame from the bitstream;

[0394] L2. performing the step of obtaining the first decoded grouping information of the M blocks of the first channel of the current frame from the bitstream only when the first window type and the second window type are both short window types.

[0395] wherein the aforementioned encoding scheme can be performed only when the first window type and the second window type of the current frame are both short window types in the embodiments of the present application, so as to realize the encoding when the multi-channel signal is a transient signal. The decoding end performs the inverse process of the encoding end, and thus the decoding end can also determine the first window type and the second window type of the current frame first, which can be a short window type or a non-short window type, for example, the decoding end obtains the window type of the current frame from the bitstream, and the current frame includes the first channel and the second channel, and then the first window type of the first channel and the second window type of the second channel can be obtained. The short window can also be referred to as a short frame, and the non-short window can also be referred to as a non-short frame. When the window type is a short window type, the aforementioned step 501 is triggered to be performed.

[0396] In some embodiments of the present application, the first decoded grouping information comprises: a first decoded grouping number of the M blocks of the first channel or a first decoded grouping number identifier, the first decoded grouping number identifier being used to indicate the first decoded grouping number, and when the first decoded grouping number is greater than 1, the first decoded grouping information further comprises: M first decoded transient identifiers; or the first decoded grouping information comprises: M first decoded transient identifiers.

[0397] and / or,

[0398] The second decoding grouping information includes: a second decoding grouping number or a second decoding grouping number identifier of the M blocks of the second channel, the second decoding grouping number identifier is used to indicate the second decoding grouping number, when the second decoding grouping number is greater than 1, the second decoding grouping information further includes: M second decoding transient identifiers; or the second decoding grouping information includes: M second decoding transient identifiers.

[0399] The encoding end carries grouping information coding results in the code stream, the grouping information coding results include first adjustment grouping information and second adjustment grouping information, the decoding end can obtain first decoding grouping information and second decoding grouping information by decoding the code stream, the first decoding grouping information corresponds to the first adjustment grouping information of the encoding end, and the second decoding grouping information corresponds to the second adjustment grouping information of the encoding end. For example, the first decoding grouping information includes: a first decoding grouping number or a first decoding grouping number identifier of the M blocks of the first channel, the first decoding grouping number represents a grouping number or an adjustment grouping number of the first channel, and the first decoding grouping number identifier is used to indicate the grouping number or the adjustment grouping number of the first channel. M first decoding transient identifiers are used to indicate the transient identifiers or the adjustment transient identifiers corresponding to the M blocks of the first channel. Similarly, the second decoding grouping information is similar to the description of the first decoding grouping information, and details are not described herein.

[0400] As can be known from the foregoing embodiments of the decoding end, the first decoding grouping information of the M blocks of the first channel of the current frame of the multi-channel signal is obtained from the code stream, the first decoding grouping information is used to indicate the first decoding transient identifiers of the M blocks of the first channel, the second decoding grouping information of the M blocks of the second channel is obtained from the code stream in the same way, the decoding neural network is used to decode the code stream, to obtain the decoding spectrum of the M blocks of the first channel and the decoding spectrum of the M blocks of the second channel; the first decoding grouping information and the decoding spectrum of the M blocks of the first channel are used to obtain the first reconstructed signal of the first channel, and similarly, the second decoding grouping information and the decoding spectrum of the M blocks of the second channel are used to obtain the second reconstructed signal of the second channel. The first decoding spectrum of the M blocks of the first channel and the second decoding spectrum of the M blocks of the second channel obtained by decoding the code stream correspond to the spectrum of the M blocks of the first channel arranged in groups and the spectrum of the M blocks of the second channel arranged in groups of the encoding end respectively, so that the first reconstructed signal of the first channel and the second reconstructed signal of the second channel can be obtained through the first decoding grouping information and the second decoding grouping information. When reconstructing the signal, the blocks of different transient identifiers in the multi-channel signal can be decoded and reconstructed, so that the reconstruction effect of the multi-channel signal can be improved.

[0401] In order to better understand and implement the above-mentioned scheme of the embodiments of the present application, the following will be specifically described by taking an example of a corresponding application scenario.

[0402] As Figure 6 shown, the system architecture diagram applied in the field of broadcast television provided by the embodiments of the present application, the embodiments of the present application can also be applied to the live broadcast scene and post-production scene of broadcast television, or applied to the three-dimensional sound codec in terminal media playback.

[0403] In the live broadcast scene, the three-dimensional sound signal produced by the three-dimensional sound production of the live program is obtained by applying the three-dimensional sound encoding of the embodiments of the present application, and is transmitted to the user side through the broadcast network, and the three-dimensional sound decoder in the set top box is used to decode and reconstruct the three-dimensional sound signal, and the loudspeaker group is used for playback. In the post-production scene, the three-dimensional sound signal produced by the three-dimensional sound production of the post-production program is obtained by applying the three-dimensional sound encoding of the embodiments of the present application, and is transmitted to the user side through the broadcast network or the Internet, and the three-dimensional sound decoder in the network receiver or mobile terminal is used to decode and reconstruct the three-dimensional sound signal, and the loudspeaker group or earphone is used for playback.

[0404] The embodiments of the present application provide an audio codec, which can specifically include a radio access network, a media gateway of a core network, a transcoding device, a media resource server, a mobile terminal, a fixed network terminal, etc. It can also be applied to the audio codec in broadcast television or terminal media playback, VR streaming service.

[0405] Next, the application scenarios of the encoding end and the decoding end in the embodiments of the present application are described respectively.

[0406] As Figure 7 shown, the encoder according to the embodiments of the present application performs the following encoding method of multi-channel signal, which includes:

[0407] S11. Determine the window type of the current frame.

[0408] Obtain the audio signal of the current frame, determine the window type of the current frame according to the audio signal of the current frame, and write the window type into the code stream.

[0409] A specific implementation includes the following three steps:

[0410] 1). Frame processing is performed on the audio signal to be encoded to obtain the audio signal of the current frame.

[0411] For example, the frame length of the current frame is L samples, and the audio signal of the current frame is an L-point time domain signal.

[0412] 2). Transient detection is performed according to the audio signal of the current frame to determine the transient information of the current frame.

[0413] There are various methods for transient detection, which are not limited in the embodiments of the present application. The transient information of the current frame can include one or more of the following: an identifier of whether the current frame is a transient signal, a position of transient occurrence in the current frame, and a parameter representing the degree of transient.

[0414] 3). According to the transient information of the current frame, determining the window type of the current frame, encoding the window type of the current frame and writing the encoding result into the bitstream.

[0415] If the transient information of the current frame represents that the current frame is a transient signal, the window type of the current frame is a short window.

[0416] If the transient information of the current frame represents that the current frame is a non-transient signal, the window type of the current frame is other window types except the short window. The embodiments of the present application do not limit other window types, which can include, for example: a long window, a cut-in window, a cut-out window, etc.

[0417] S12. If the window type of the current frame is a short window, performing windowing processing of the audio signal of the current frame with a short window and time-frequency transformation to obtain MDCT spectrum of M blocks of the current frame.

[0418] If the window type of the current frame is a short window, performing windowing processing of the audio signal of the current frame with a short window and time-frequency transformation to obtain MDCT spectrum of M blocks.

[0419] For example, if the window type of the current frame is a short window, M overlapping short window functions are used for windowing processing to obtain the audio signal of the M blocks after windowing, and M is a positive integer greater than or equal to 2. For example, the window length of the short window function is 2L / M, L is the frame length of the current frame, and the overlap length is L / M. For example, M is equal to 8, L is equal to 1024, the window length of the short window function is 256 sample points, and the overlap length is 128 sample points.

[0420] The audio signal of the M blocks after windowing is respectively subjected to time-frequency transformation to obtain MDCT spectrum of M blocks of the current frame.

[0421] For example, the length of the audio signal of the current block after windowing is 256 sample points, and after MDCT transformation, 128-point MDCT coefficients are obtained, which are the MDCT spectrum of the current block.

[0422] S13. According to the MDCT spectrum of the M blocks, obtaining the grouping number and grouping flag information of the current frame, encoding the grouping number and grouping flag information of the current frame and writing the encoding result into the bitstream.

[0423] Before obtaining the grouping number and grouping flag information of the current frame in step S13, in one implementation, first, the MDCT spectrums of the M blocks are interleaved to obtain interleaved MDCT spectrums of the M blocks; next, the interleaved MDCT spectrums of the M blocks are preprocessed to obtain preprocessed MDCT spectrums; then, the preprocessed MDCT spectrums are deinterleaved to obtain deinterleaved MDCT spectrums of the M blocks; finally, the grouping number and grouping flag information of the current frame are determined according to the deinterleaved MDCT spectrums of the M blocks.

[0424] The interleaving of the MDCT spectrums of the M blocks is interleaving the M MDCT spectrums each having a length of L / M into an MDCT spectrum having a length of L. The M spectral coefficients at frequency point position i in the MDCT spectrums of the M blocks are arranged in order according to the block sequence number from 0 to M-1, and then the M spectral coefficients at frequency point position i+1 in the MDCT spectrums of the M blocks are arranged in order according to the block sequence number from 0 to M-1, where i takes a value from 0 to L / M-1.

[0425] The encoding preprocessing operation can include frequency domain noise shaping (FDNS), temporal noise shaping (TNS), bandwidth extension (BWE), etc., which are not limited here.

[0426] The deinterleaving is the inverse process of the interleaving. The preprocessed MDCT spectrums have a length of L, and the preprocessed MDCT spectrums having a length of L are divided into M MDCT spectrums each having a length of L / M, and the MDCT spectrums in each block are arranged in order according to the frequency points from small to large, to obtain the deinterleaved MDCT spectrums of the M blocks. Preprocessing the spectrums interleaved can reduce the coding side information, thereby reducing the bit occupancy of the side information and improving the coding efficiency.

[0427] The grouping number and grouping flag information of the current frame are determined according to the deinterleaved MDCT spectrums of the M blocks. The specific method includes the following three steps:

[0428] a. Calculate the MDCT spectral energy of the M blocks.

[0429] Suppose the deinterleaved MDCT spectral coefficients of the M blocks are mdctSpectrum[8]

[128] , and the MDCT spectral energy of each block is calculated and denoted as enerMdct[8]. Where 8 is the value of M, and 128 represents the number of MDCT coefficients in a block.

[0430] b). Calculate the average of MDCT spectral energy according to the MDCT spectral energy of M blocks. Mainly includes the following two methods:

[0431] Method one: directly calculate the average of MDCT spectral energy of M blocks, that is, the average of enerMdct[8], as the average of MDCT spectral energy avgEner.

[0432] Method two: determine the block with the maximum MDCT spectral energy in M blocks; calculate the average of MDCT spectral energy of M-1 blocks other than the block with the maximum energy, as the average of MDCT spectral energy avgEner. Or calculate the average of MDCT spectral energy of blocks other than the blocks with the maximum energy, as the average of MDCT spectral energy avgEner.

[0433] c). Determine the grouping number and grouping flag information of the current frame according to the MDCT spectral energy of M blocks and the average of MDCT spectral energy, and write it into the bitstream.

[0434] Specifically, compare the MDCT spectral energy of each block with the average of MDCT spectral energy. If the MDCT spectral energy of the current block is greater than K times of the average of MDCT spectral energy, the current block is a transient block, and the transient identifier of the current block is 0; otherwise, the current block is a non-transient block, and the non-transient identifier of the current block is 1. Wherein, K is greater than or equal to 1, for example, K=2. According to the transient identifier of each block, M blocks are grouped to determine the grouping number and grouping flag information. Wherein, the same transient identifier value is a group, and M blocks are divided into N groups, and N is the grouping number. The grouping flag information is the information composed of the transient identifier value of each block in M blocks.

[0435] For example, the transient blocks constitute a transient group, and the non-transient blocks constitute a non-transient group. Specifically, if the transient identifiers of each block are not completely the same, the grouping number numGroups of the current frame is 2, otherwise it is 1. The grouping number can be represented by a grouping number identifier. For example, the grouping number identifier is 1, indicating that the grouping number of the current frame is 2; the grouping number identifier is 0, indicating that the grouping number of the current frame is 1. Determine the grouping flag information groupIndicator of the current frame according to the transient identifier of M blocks. For example, arrange the transient identifiers of M blocks in order to constitute the grouping flag information groupIndicator of the current frame.

[0436] Before obtaining the group number and group flag information in step S13, another implementation manner is: without interleaving and de-interleaving the MDCT spectrums of the M blocks, directly determining the group number and group flag information of the current frame according to the MDCT spectrums of the M blocks, encoding the group number and group flag information of the current frame and writing the encoding result into the bitstream.

[0437] Determining the group number and group flag information of the current frame according to the MDCT spectrums of the M blocks is similar to determining the group number and group flag information of the current frame according to the de-interleaved MDCT spectrums of the M blocks, which is not described here.

[0438] Writing the group number and group flag information of the current frame into the bitstream.

[0439] In addition, the non-transient group can be further divided into two or more other groups, which is not limited in the embodiments of the present application. For example, the non-transient group can be divided into a harmonic group and a non-harmonic group.

[0440] S14. Grouping and arranging the MDCT spectrums of the M blocks according to the group number and group flag information of the current frame to obtain the grouped and arranged MDCT spectrums. The grouped and arranged MDCT spectrums are the to-be-encoded spectrums of the current frame.

[0441] If the group number of the current frame is 2, the MDCT spectrums of the M blocks of the current frame need to be grouped and arranged. The arrangement manner is: adjusting some blocks belonging to the transient group in the M blocks to the front and adjusting some blocks belonging to the non-transient group to the rear. Among them, the encoding neural network of the encoder has better encoding effect on the spectrums arranged in the front, so adjusting the transient blocks to the front can ensure the encoding effect of the transient blocks, thereby preserving more spectral details of the transient blocks and improving the encoding quality.

[0442] According to the group number and group flag information of the current frame, the MDCT spectrums of the M blocks of the current frame can also be grouped and arranged, or the MDCT spectrums of the de-interleaved M blocks of the current frame can also be grouped and arranged according to the group number and group flag information of the current frame.

[0443] S15. Encoding the grouped and arranged MDCT spectrums by using the encoding neural network and writing the encoding result into the bitstream.

[0444] The MDCT spectrum arranged in groups is first subjected to intra-group interleaving processing to obtain an intra-group interleaved MDCT spectrum. Then, the intra-group interleaved MDCT spectrum is encoded using an encoding neural network. The intra-group interleaving processing is similar to the interleaving processing performed on the MDCT spectrum of the M blocks before the number of groups and the group flag information are obtained, except that the interleaving object is the MDCT spectrum belonging to the same group. For example, the MDCT spectrum blocks belonging to the transient group are subjected to interleaving processing. The MDCT spectrum blocks belonging to the non-transient group are subjected to interleaving processing.

[0445] The encoding neural network processing is pre-trained, and the specific network structure and training method of the encoding neural network are not limited in the embodiments of the present application. For example, the encoding neural network can be a fully connected network or a convolutional neural network (CNN).

[0446] As shown in FIG. 8, the decoding process corresponding to the encoding end includes the following steps. Figure 8

[0447] S21. The window type of the current frame is obtained by decoding the received code stream.

[0448] S22. If the window type of the current frame is a short window, the number of groups and the group flag information are obtained by decoding the received code stream.

[0449] The number of groups identification information in the code stream can be parsed to determine the number of groups of the current frame according to the number of groups identification information. For example, the number of groups identification is 1, indicating that the number of groups of the current frame is 2; the number of groups identification is 0, indicating that the number of groups of the current frame is 1.

[0450] If the number of groups of the current frame is greater than 1, the group flag information can be obtained by decoding the received code stream.

[0451] The group flag information can be obtained by decoding the received code stream, which can be reading M-bit group flag information from the code stream. The value of the i-th bit of the group flag information can determine whether the i-th block is a transient block. If the value of the i-th bit is 0, it indicates that the i-th block is a transient block; if the value of the i-th bit is 1, it indicates that the i-th block is a non-transient block.

[0452] S23. The decoded MDCT spectrum is obtained by using a decoding neural network according to the received code stream.

[0453] The decoding process of the decoding end corresponds to the encoding process of the encoding end. The specific steps include:

[0454] First, the decoded MDCT spectrum is obtained by using a decoding neural network according to the received code stream. ​

[0455] Then, according to the number of groups and the group flag information, the decoded MDCT spectra belonging to the same group can be determined. The MDCT spectra belonging to the same group are subjected to intra-group de-interleaving processing to obtain intra-group de-interleaving processed MDCT spectra. The process of the intra-group de-interleaving processing is the same as the de-interleaving processing of the interleaving processed MDCT spectra of the M blocks before the number of groups and the group flag information are obtained at the encoding end.

[0456] S24. According to the number of groups and the group flag information, the intra-group de-interleaving processed MDCT spectra are subjected to inverse group permutation processing to obtain inverse group permutation processed MDCT spectra.

[0457] If the number of groups of the current frame is greater than 1, the intra-group de-interleaving processed MDCT spectra need to be subjected to inverse group permutation processing according to the group flag information. The inverse group permutation processing at the decoding end is the inverse process of the group permutation processing at the encoding end.

[0458] For example, assume that the intra-group de-interleaving processed MDCT spectra are composed of M blocks of L / M-point MDCT spectra. According to the group flag information, the block index idx0(i) of the ith transient block is determined, and the MDCT spectrum of the ith block in the intra-group de-interleaving processed MDCT spectra is taken as the MDCT spectrum of the idx0(i)th block in the inverse group permutation processed MDCT spectra. The block index idx0(i) of the ith transient block is the block index corresponding to the block whose ith flag value is 0 in the group flag information, and i starts from 0. The number of transient blocks is the number of bits whose flag values are 0 in the group flag information, denoted as num0. After the transient blocks are processed, the non-transient blocks need to be processed. According to the group flag information, the block index idx1(j) of the jth non-transient block is determined, and the MDCT spectrum of the num0+jth block in the intra-group de-interleaving processed MDCT spectra is taken as the MDCT spectrum of the idx1(j)th block in the inverse group permutation processed MDCT spectra. The block index idx1(j) of the jth non-transient block is the block index corresponding to the block whose jth flag value is 1 in the group flag information, and j starts from 0.

[0459] S25. According to the inverse group permutation processed MDCT spectra, the reconstructed audio signal of the current frame is obtained.

[0460] According to the MDCT spectrum of the inverse grouping arrangement processing, a reconstructed audio signal is obtained. A specific implementation manner is as follows: first, the MDCT spectrums of the M blocks of the inverse grouping arrangement processing are subjected to interleaving processing to obtain M blocks of interleaving processed MDCT spectrums; next, the M blocks of interleaving processed MDCT spectrums are subjected to decoding post-processing operations, for example, the decoding post-processing can include inverse TNS, inverse FDNS, BWE processing and the like, the decoding post-processing corresponds to the encoding pre-processing manner of the encoding end one by one, to obtain decoding post-processed MDCT spectrums; then, the decoding post-processed MDCT spectrums are subjected to deinterleaving processing to obtain M blocks of deinterleaving processed MDCT spectrums; finally, the M blocks of deinterleaving processed MDCT spectrums are respectively subjected to frequency domain to time domain conversion, and subjected to de-windowing and overlap addition processing to obtain a reconstructed audio signal.

[0461] Another specific implementation manner of obtaining a reconstructed audio signal according to the MDCT spectrum of the inverse grouping arrangement processing is as follows: the MDCT spectrums of the M blocks are respectively subjected to frequency domain to time domain conversion, and subjected to de-windowing and overlap addition processing to obtain a reconstructed audio signal.

[0462] As shown in FIG. 1, an encoding method of a multi-channel signal performed by an encoding end includes: Figure 9

[0463] S31. Frame processing is performed on an input signal to obtain an input signal of a current frame.

[0464] For example, the frame length is 1024, and the input signal of the current frame is a 1024-point audio signal.

[0465] S32. Transient detection is performed according to the obtained input signal of the current frame to obtain a transient detection result.

[0466] For example, the input signal of the current frame is divided into L blocks, the signal energy in each block is calculated, and if the signal energy in adjacent blocks changes suddenly, the current frame is considered to be a transient signal. For example, L is a positive integer greater than 2, and L can be taken as 8. If the difference between the signal energies in adjacent blocks is greater than a pre-set threshold, the current frame is considered to be a non-transient signal.

[0467] S33. The window type of the current frame is determined according to the transient detection result.

[0468] If the transient detection result of the current frame is a transient signal, the window type of the current frame is a short window, otherwise it is a long window.

[0469] In addition to the short window and the long window, the window type of the current frame can also include a cut-in window and a cut-out window. Let the frame sequence number of the current frame be i, and the window type of the current frame is determined according to the transient detection results of the i-1 frame and the i-2 frame and the transient detection result of the current frame. ​

[0470] If the transient detection results of the i-th frame, the i-1-th frame and the i-2-th frame are all non-transient signals, the window type of the i-th frame is a long window.

[0471] If the transient detection result of the i-th frame is a transient signal, and the transient detection results of the i-1-th frame and the i-2-th frame are non-transient signals, the window type of the i-th frame is a cut-in window.

[0472] If the transient detection results of the i-th frame and the i-1-th frame are non-transient signals, and the transient detection result of the i-2-th frame is a transient signal, the window type of the i-th frame is a cut-out window.

[0473] If the transient detection results of the i-th frame, the i-1-th frame and the i-2-th frame are other than the above three cases, the window type of the i-th frame is a short window.

[0474] S34. According to the window type of the current frame, windowing and time-frequency conversion processing are performed to obtain the MDCT spectrum of the current frame.

[0475] According to the long window, the cut-in window, the cut-out window and the short window type, windowing and MDCT conversion are performed respectively: for the long window, the cut-in window and the cut-out window, if the length of the signal after windowing is 2048, 1024 MDCT coefficients are obtained; for the short window, 8 short windows with a length of 256 are added in series, and 128 MDCT coefficients are obtained for each short window. The 128-point MDCT coefficients of each short window are referred to as a block, and there are a total of 1024 MDCT coefficients.

[0476] It is determined whether the window type of the current frame is a short window. If yes, the following step S35 is performed, and if not, the following step S312 is performed.

[0477] S35. If the window type of the current frame is a short window, interleaving processing is performed on the MDCT spectrum of the current frame to obtain the interleaved MDCT spectrum.

[0478] If the window type of the current frame is a short window, interleaving processing is performed on the MDCT spectrum of the current frame to obtain the interleaved MDCT spectrum.

[0479] The interleaved spectrum form can be: block 0bin 0, block 1bin 0, block 2bin 0, …, block 7bin 0, block 0bin 1, block 1, bin 1, block 2bin 1, …, block 7bin 1, ….

[0480] Wherein, block 0bin 0 represents the 0th frequency point of the 0th block.

[0481] S36. Encode pre-process the interleaved MDCT spectrum to obtain a pre-processed MDCT spectrum.

[0482] The pre-processing can include FDNS, TNS, BWE, etc.

[0483] S37. De-interleave the pre-processed MDCT spectrum to obtain M blocks of MDCT spectrum.

[0484] De-interleave in the reverse manner of step S35 to obtain 8 blocks of MDCT spectrum, each of which is 128 points.

[0485] S38. Determine grouping information according to the M blocks of MDCT spectrum.

[0486] The information can include the number of groups numGroups and the grouping flag information groupIndicator. The specific scheme of determining the grouping information according to the M blocks of MDCT spectrum can be any one of the foregoing step S13 performed at the encoding end. For example, assuming that the 8 blocks of MDCT spectrum coefficients in a short frame are mdctSpectrum[8]

[128] , the MDCT spectrum energy of each block is calculated and denoted as enerMdct[8]. The average of the MDCT spectrum energy of the 8 blocks is calculated and denoted as avgEner. There are two methods of calculating the average of the MDCT spectrum energy:

[0487] Method 1: Directly calculate the average of the 8 blocks of MDCT spectrum energy, i.e., the average of enerMdct[8].

[0488] Method 2: In order to reduce the influence of the block with the maximum energy among the 8 blocks on the average calculation, the maximum block energy is removed before the average is calculated.

[0489] Compare the MDCT spectrum energy of each block with the average energy. If it is greater than a certain multiple of the average energy, the current block is considered to be a transient block (marked as 0), otherwise it is considered to be a non-transient block (marked as 1). All transient blocks form a transient group, and all non-transient blocks form a non-transient group.

[0490] For example, the window type of the current frame is a short window, and the grouping information obtained by preliminary judgment can be:

[0491] The number of groups numGroups: 2.

[0492] Block index: 0 1 2 3 4 5 6 7.

[0493] Grouping flag information groupIndicator: 1 1 1 0 0 0 0 1.

[0494] The number of groups and group flag information need to be written into the bitstream and transmitted to the decoding end.

[0495] S39. Based on the grouping information, group and arrange the MDCT spectra of the M blocks to obtain the grouped MDCT spectra.

[0496] The specific scheme for grouping and arranging the MDCT spectra of the M blocks according to the grouping information can be any of the aforementioned steps S14 executed at the encoding end.

[0497] For example, some blocks belonging to the transient group out of the eight blocks in a short frame are placed at the beginning, and some blocks belonging to other groups are placed at the end.

[0498] Taking the example from step S38 as an example, if the grouping information is:

[0499] Block index: 0 1 2 3 4 5 6 7.

[0500] Group indicator information: groupIndicator: 1 1 1 0 0 0 0 1.

[0501] The resulting spectrum arrangement is as follows:

[0502] Block index: 3 4 5 6 0 1 2 7.

[0503] That is, the spectrum of the 0th block after the arrangement is the spectrum of the 3rd block before the arrangement, the spectrum of the 1st block after the arrangement is the spectrum of the 4th block before the arrangement, the spectrum of the 2nd block after the arrangement is the spectrum of the 5th block before the arrangement, the spectrum of the 3rd block after the arrangement is the spectrum of the 6th block before the arrangement, the spectrum of the 4th block after the arrangement is the spectrum of the 0th block before the arrangement, the spectrum of the 5th block after the arrangement is the spectrum of the 1st block before the arrangement, the spectrum of the 6th block after the arrangement is the spectrum of the 2nd block before the arrangement, and the spectrum of the 7th block after the arrangement is the spectrum of the 7th block before the arrangement.

[0504] S310. Perform intra-group spectrum interleaving on the grouped MDCT spectrum to obtain the intra-group interleaved MDCT spectrum.

[0505] After the MDCT spectra are grouped and arranged, interleaving processing is performed on each group. The processing method is similar to step S35, except that the interleaving processing is limited to the MDCT spectra belonging to the same group.

[0506] Taking the above example again, in the arranged spectrum, the transient group (the 3rd, 4th, 5th, and 6th blocks before arrangement, i.e. the 0th, 1st, 2nd, and 3rd blocks after arrangement) is interleaved, and the other groups (the 0th, 1st, 2nd, and 7th blocks before arrangement, i.e. the 4th, 5th, 6th, and 7th blocks after arrangement) are interleaved.

[0507] S311. Encode the MDCT spectrum after intra-group interleaving using an encoding neural network.

[0508] The embodiments of the present application do not limit the specific method of using an encoding neural network to encode the MDCT spectrum after intra-group interleaving. For example, the MDCT spectrum after intra-group interleaving is processed by the encoding neural network to generate latent variables. The latent variables are quantized to obtain quantized latent variables. The quantized latent variables are arithmetically encoded, and the arithmetically encoded results are written into a bitstream.

[0509] S312. If the current frame is not a short frame, encode the MDCT spectrum of the current frame according to the encoding method corresponding to other types of frames.

[0510] For the encoding of other types of frames, grouping, arrangement, and intra-group interleaving processing can not be performed. For example, the MDCT spectrum of the current frame obtained in step S34 is directly encoded using an encoding neural network.

[0511] For example, a window function corresponding to the window type is determined, and the windowing processing is performed on the audio signal of the current frame to obtain a windowed signal; when the windows of adjacent frames overlap, the time-frequency positive transform, such as MDCT transform, is performed on the windowed signal to obtain the MDCT spectrum of the current frame; and the MDCT spectrum of the current frame is encoded.

[0512] As shown in FIG. 13, the decoding method of the multi-channel signal performed at the decoding end includes the following steps. Figure 10 S41. Decode according to the received bitstream to obtain the window type of the current frame.

[0513] Determine whether the window type of the current frame is a short window, if yes, perform the following step S42, and if not, perform the following step S410.

[0514] S42. If the window type of the current frame is a short window, decode according to the received bitstream to obtain the number of groups and group flag information.

[0515] S43. Decode according to the received bitstream to obtain a decoded MDCT spectrum using a decoding neural network.

[0516] The decoding neural network corresponds to the encoding neural network. For example, the specific method of decoding using a decoding neural network includes the following steps. According to the received bitstream, arithmetically decode to obtain quantized latent variables. The quantized latent variables are dequantized to obtain dequantized latent variables. The dequantized latent variables are input into the decoding neural network to generate a decoded MDCT spectrum.

[0517]

[0518] ​S44. Group-wise de-interleaving the decoded MDCT spectrum according to the number of groups and the group indicator information to obtain the group-wise de-interleaved MDCT spectrum.

[0519] According to the number of groups and the group indicator information, the MDCT spectrum blocks belonging to the same group are determined. For example, the decoded MDCT spectrum is divided into 8 blocks. The number of groups is equal to 2, and the group indicator information groupIndicator is 1 1 1 0 0 0 0 1. The number of bit positions with a flag value of 0 in the group indicator information is 4, so the MDCT spectrums of the first 4 blocks in the decoded MDCT spectrum are a group, which belongs to the transient group and needs to be group-wise de-interleaved. The number of bit positions with a flag value of 1 is 4, so the MDCT spectrums of the last 4 blocks are a group, which belongs to the non-transient group and needs to be group-wise de-interleaved. The 8 blocks of MDCT spectrums obtained by the group-wise de-interleaving are the group-wise de-interleaved MDCT spectrums of the 8 blocks.

[0520] S45. Inverse group-wise arrangement of the group-wise de-interleaved MDCT spectrum according to the number of groups and the group indicator information to obtain the inverse group-wise arranged MDCT spectrum.

[0521] According to the group indicator information groupIndicator, the group-wise de-interleaved MDCT spectrum is arranged into M blocks of spectrums sorted according to time.

[0522] For example, if the number of groups is equal to 2, and the group indicator information groupIndicator is 1 1 1 0 0 0 0 1, the MDCT spectrum of the 0th block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 3rd block (the element position index corresponding to the bit of the first flag value of 0 in the group indicator information is 3); the MDCT spectrum of the 1st block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 4th block (the element position index corresponding to the bit of the second flag value of 0 in the group indicator information is 4); the MDCT spectrum of the 2nd block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 5th block (the element position index corresponding to the bit of the third flag value of 0 in the group indicator information is 5); the MDCT spectrum of the 3rd block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 6th block (the element position index corresponding to the bit of the fourth flag value of 0 in the group indicator information is 6); the MDCT spectrum of the 4th block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 0th block (the element position index corresponding to the bit of the first flag value of 1 in the group indicator information is 0); the MDCT spectrum of the 5th block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 1st block (the element position index corresponding to the bit of the second flag value of 1 in the group indicator information is 1); the MDCT spectrum of the 6th block obtained by the intra-group de-interleaving processing needs to be adjusted to the MDCT spectrum of the 2nd block (the element position index corresponding to the bit of the third flag value of 1 in the group indicator information is 2); and the MDCT spectrum of the 7th block obtained by the intra-group de-interleaving processing is not adjusted and is directly taken as the MDCT spectrum of the 7th block.

[0523] At the encoding end, the spectrum of the short frame after the spectrum grouping is arranged as follows: Block index 3 4 5 6 0 1 2 7.

[0524] At the decoding end, the short frame spectrum after the inverse spectrum grouping arrangement is recovered to the 8 blocks of spectrum in time sequence: Block index 0 1 2 3 4 5 6 7.

[0525] S46. Interleaving processing is performed on the MDCT spectrum after the inverse spectrum grouping arrangement, to obtain interleaved MDCT spectrum.

[0526] If the window type of the current frame is a short window, the MDCT spectrum after the inverse spectrum grouping arrangement is interleaved processed in the same way as before.

[0527] S47. Decoding post-processing is performed on the interleaved MDCT spectrum, to obtain decoded post-processed MDCT spectrum.

[0528] The decoding post-processing can include BWE inverse processing, TNS inverse processing, FDNS inverse processing, etc.

[0529] S48. De-interleaving the decoded post-processed MDCT spectrum to obtain a reconstructed MDCT spectrum.

[0530] S49. Performing inverse MDCT transform on the reconstructed MDCT spectrum and windowing to obtain a reconstructed audio signal.

[0531] The reconstructed MDCT spectrum includes M blocks of MDCT spectrum, and inverse MDCT transform is performed on each block of MDCT spectrum. After windowing and overlap-add processing on the inverse-transformed signal, a short-frame reconstructed audio signal is obtained.

[0532] S410. If the window type of the current frame is other window type, decoding according to the decoding method corresponding to the other type frame to obtain a reconstructed audio signal.

[0533] For example, according to the received bitstream, a decoding neural network is used to obtain a reconstructed MDCT spectrum. According to the window type (long window, cut-in window, cut-out window), inverse transform and OLA are performed to obtain a reconstructed audio signal.

[0534] Using the method proposed in the embodiments of the present application, if the window type of the current frame is a short window, the number of groups and group flag information of the current frame are obtained according to the spectrum of the M blocks of the current frame; the M blocks of spectrum are arranged in groups according to the number of groups and group flag information of the current frame to obtain a group-arranged audio signal; and the group-arranged spectrum is encoded using an encoding neural network. When the current frame audio signal is a transient signal, the MDCT spectrum containing the transient characteristics can be adjusted to a position with higher coding importance, so that the reconstructed audio signal after neural network encoding and decoding processing can better preserve the transient characteristics.

[0535] The embodiments of the present application can also be used for stereo encoding, with the difference being that: first, the left-channel group-interleaved post-MDCT spectrum and the right-channel group-interleaved post-MDCT spectrum obtained after processing the left and right channels of the stereo sound according to the encoding end steps S31-310 in the foregoing embodiments. Then step S311 becomes: using an encoding neural network to encode the left-channel group-interleaved post-MDCT spectrum and the right-channel group-interleaved post-MDCT spectrum.

[0536] The input of the encoding neural network is no longer a single-channel group-interleaved post-MDCT spectrum, but the left-channel group-interleaved post-MDCT spectrum and the right-channel group-interleaved post-MDCT spectrum obtained after processing the left and right channels of the stereo sound according to the steps S31-310.

[0537] The encoding neural network can be a CNN network, and the left-channel group-interleaved post-MDCT spectrum and the right-channel group-interleaved post-MDCT spectrum are used as the input of two channels of the CNN network.

[0538] Correspondingly, the decoding end performs a process including:

[0539] According to the received code stream decoding, the window type of the left channel of the current frame and the grouping number and grouping flag information are obtained.

[0540] According to the received code stream decoding, the window type of the right channel of the current frame and the grouping number and grouping flag information are obtained.

[0541] According to the received code stream decoding, the decoded stereo MDCT spectrum is obtained by using the decoding neural network.

[0542] According to the window type of the left channel of the current frame and the grouping number and grouping flag information and the decoded left channel MDCT spectrum, the steps of the decoding side monaural decoding according to Embodiment One are processed to obtain the reconstructed left channel signal.

[0543] According to the window type of the right channel of the current frame and the grouping number and grouping flag information and the decoded right channel MDCT spectrum, the steps of the decoding side monaural decoding according to Embodiment One are processed to obtain the reconstructed right channel signal.

[0544] By using the method proposed in the embodiments of the present application, if the window type of the current frame is a short window, the grouping number and grouping flag information of the current frame are obtained according to the spectrum of the M blocks of the current frame; the grouped and arranged audio signal is obtained by grouping and arranging the spectrum of the M blocks of the current frame according to the grouping number and grouping flag information of the current frame; and the grouped and arranged spectrum is encoded by using the encoding neural network. When the current frame audio signal is a transient signal, the MDCT spectrum containing the transient characteristics can be adjusted to a position with higher encoding importance, so that the reconstructed audio signal after the neural network encoding and decoding processing can better preserve the transient characteristics.

[0545] The embodiments of the present application can also be used for stereo encoding. As shown in Figure 11 The encoding process of adjusting the grouping information of the left and right channels in the encoder proposed in the embodiments of the present application includes:

[0546] S51. Obtain the left channel spectrum of the M blocks and the right channel spectrum of the M blocks of the current frame stereo signal.

[0547] The stereo signal is frame-processed to obtain the current frame stereo signal. The current frame stereo signal includes the current frame left channel signal and the current frame right channel signal.

[0548] The current frame left channel signal is taken as the current frame audio signal, and the foregoing Figure 7The method shown in the encoding end steps S11 and S12 determines the window type of the left channel signal of the current frame; if the window type of the left channel signal of the current frame is a short frame, the left channel signal of the current frame is subjected to short frame windowing and time-frequency transformation to obtain the left channel spectrum of M blocks.

[0549] Similarly, the right channel signal of the current frame is taken as the audio signal of the current frame, and the foregoing method is used to determine the window type of the right channel signal of the current frame. Figure 7 The method shown in the encoding end step S11 and S12 determines the window type of the right channel signal of the current frame; if the window type of the right channel signal of the current frame is a short frame, the right channel signal of the current frame is subjected to short frame windowing and time-frequency transformation to obtain the right channel spectrum of M blocks.

[0550] S52. The grouping number and grouping flag information of the left channel are obtained according to the left channel spectrum of M blocks.

[0551] If the window type of the left channel signal of the current frame is a short frame, the foregoing method is used to obtain the grouping number and grouping flag information of the left channel according to the left channel spectrum of M blocks. Figure 7 The method shown in the encoding end step S13 obtains the grouping number and grouping flag information of the left channel.

[0552] S53. The grouping number and grouping flag information of the right channel are obtained according to the right channel spectrum of M blocks.

[0553] If the window type of the right channel signal of the current frame is a short frame, the foregoing method is used to obtain the grouping number and grouping flag information of the right channel according to the right channel spectrum of M blocks. Figure 7 The method shown in the encoding end step S13 obtains the grouping number and grouping flag information of the right channel.

[0554] S54. Whether grouping flag information adjustment is needed is determined according to the grouping flag information of the left and right channels; if adjustment is needed, the adjusted grouping flag information of the left and right channels is determined according to the grouping flag information of the left and right channels.

[0555] When the grouping number of the left channel and the grouping number of the right channel are equal, the flag values of the grouping flag information of the left and right channels are inconsistent, and the number of transient blocks indicated by the grouping flag information of the left channel and the number of transient blocks indicated by the grouping flag information of the right channel are different, the grouping flag information adjustment is performed according to the grouping flag information of the left channel and the grouping flag information of the right channel to obtain the adjusted grouping flag information; otherwise, the flag values of the grouping flag information of the left and right channels are completely consistent, or the grouping flag information is inconsistent but the number of transient blocks of the left and right channels is the same, and no adjustment is performed, and the grouping flag information of the left and right channels is directly taken as the adjusted grouping flag information of the left and right channels.

[0556] Complete consistency means that every flag value is equal. Inconsistency includes partial consistency or complete inconsistency, meaning some values ​​are equal while others are unequal, or all values ​​are unequal. Comparison is performed on corresponding positions. For example, 1 1 1 0 0 0 1 1 and 1 1 1 0 0 0 0 1 represent partial consistency. 1 1 1 0 0 0 1 1 and 1 1 1 0 0 0 1 1 represent complete consistency, and 11 1 0 0 0 1 1 and 0 0 0 1 1 1 0 0 represent complete inconsistency.

[0557] The specific method for adjustment can be to perform a bitwise AND operation between the grouping flag information of the left channel and the grouping flag information of the right channel according to the corresponding bits, and use the result as the value of the corresponding bit in the grouping flag information of the left and right channels for adjustment.

[0558] Another approach is to first determine whether to compare the grouping flags of the left and right channels based on the number of groups in each channel. If the number of groups in both channels is 2, then the grouping flags of the left and right channels are compared to determine whether to adjust the grouping flags; otherwise, no adjustment is needed.

[0559] The grouping flag information for left and right channel adjustment is encoded, written into the bitstream, and transmitted to the decoding end.

[0560] S55. Based on the grouping flag information of the left and right channels, group and arrange the left channel spectrum of M blocks and the right channel spectrum of M blocks to obtain the grouped stereo spectrum.

[0561] The specific method for grouping and arranging is the same as described above. Figure 7 The process is consistent with step S14 shown. Based on the adjusted grouping flag information, the left channel spectra of the M blocks and the right channel spectra of the M blocks are grouped and arranged to obtain the grouped left channel spectra and right channel spectra.

[0562] S56. Encode the grouped stereo spectrum using an encoding neural network.

[0563] One approach is to first perform intra-group interleaving on the left channel spectrum of the grouped arrangement based on the adjusted grouping flag information, obtaining the intra-group interleaved left channel spectrum. Similarly, based on the adjusted grouping flag information, first perform intra-group interleaving on the right channel spectrum of the grouped arrangement, obtaining the intra-group interleaved right channel spectrum. Then, an encoding neural network is used to encode the intra-group interleaved stereo spectrum and write it into the bitstream.

[0564] The coding neural network used for stereo coding can be a CNN network, where the left channel spectrum and the right channel spectrum are each used as the input signal for one channel in the CNN network.

[0565] As Figure 12 shown, the decoding process corresponding to the encoding process shown in the foregoing Figure 11 includes the following steps:

[0566] S61. According to the received code stream decoding, the number of groups and group flag information of the left and right channels of the current frame are obtained.

[0567] According to the received code stream decoding, the window type of the left and right channels of the current frame is obtained. If the window type of the left channel of the current frame is a short frame, the number of groups and group flag information of the left channel are obtained according to the received code stream decoding. If the window type of the right channel of the current frame is a short frame, the number of groups and group flag information of the right channel are obtained according to the received code stream decoding.

[0568] S62. According to the received code stream decoding using the decoding neural network, the stereo spectrum after group intra-deinterleaving processing is obtained.

[0569] The decoding end corresponds to the encoding end. The specific steps include:

[0570] First, according to the received code stream decoding, the left channel decoding spectrum and the right channel decoding spectrum are obtained using the decoding neural network.

[0571] Then, according to the number of groups and group flag information of the left channel, the spectrum belonging to the same group in the left channel decoding spectrum can be determined. The spectrum belonging to the same group is subjected to group intra-deinterleaving processing to obtain the left channel spectrum after group intra-deinterleaving processing. Similarly, according to the number of groups and group flag information of the right channel, the spectrum belonging to the same group in the right channel decoding spectrum can be determined. The spectrum belonging to the same group is subjected to group intra-deinterleaving processing to obtain the right channel spectrum after group intra-deinterleaving processing. The deinterleaving processing is the same as that of the encoding end.

[0572] S63. According to the number of groups and group flag information of the left and right channels, the stereo spectrum after group intra-deinterleaving processing is subjected to inverse group arrangement processing to obtain the stereo spectrum after inverse group arrangement processing.

[0573] According to the number of groups and group flag information of the left channel, the left channel spectrum after group intra-deinterleaving processing is subjected to inverse group arrangement processing to obtain the left channel spectrum after inverse group arrangement processing. Similarly, according to the number of groups and group flag information of the right channel, the right channel spectrum after group intra-deinterleaving processing is subjected to inverse group arrangement processing to obtain the right channel spectrum after inverse group arrangement processing. The specific method of inverse group arrangement processing is the inverse process of the group arrangement of step S55 of the encoding end shown in the foregoing Figure 11 , which will not be described in detail here.

[0574] S64. Obtain a reconstructed stereo signal according to the reconstructed stereo spectrum.

[0575] Obtain a reconstructed left channel signal according to the reconstructed left channel spectrum. Obtain a reconstructed right channel signal according to the reconstructed right channel spectrum. The specific method of obtaining the reconstructed stereo signal through the left and right channel spectra is the inverse process of the encoding of step S56 shown in the foregoing Figure 11

[0576] The foregoing embodiments are all short windows for the window types of the left and right channels of the stereo signal, but when the grouping flag information of the left and right channels is inconsistent, for the blocks with inconsistent left and right channel grouping flag values, the transient characteristics of the reconstructed audio signal cannot be well recovered after being encoded and decoded by the neural network. Therefore, the embodiments of the present application also include a scheme of adjusting the left and right channel grouping of the stereo signal.

[0577] In an embodiment of the present application, the encoding method is as shown in the following Figure 13

[0578] S71. Perform frame processing on the stereo signal to obtain a current frame of the stereo signal.

[0579] The current frame of the stereo signal includes a current frame of the left channel signal and a current frame of the right channel signal.

[0580] S72. Perform transient detection on the left and right channels respectively according to the current frame of the stereo signal to obtain transient detection results of the left and right channels.

[0581] The specific method of the transient detection of the left and right channels is the same as step S12 shown in the foregoing Figure 7

[0582] S73. Determine the window type of the current frame of the left and right channel signals respectively according to the transient detection results of the left and right channels.

[0583] The method of determining the window type according to the transient detection result is the same as step S13 shown in the foregoing Figure 7

[0584] S74. If the window type of the current frame of the left channel signal is a short frame, obtain the left channel spectrum of M blocks according to the current frame of the left channel signal.

[0585] ​​​​If the window type of the left channel signal of the current frame is short frame, the left channel signal of the current frame is windowed and MDCT transformed to obtain M blocks of left channel MDCT spectrum. The left channel MDCT spectrum is interleaved to obtain interleaved left channel MDCT spectrum. The interleaved left channel MDCT spectrum is pre-processed to obtain pre-processed left channel MDCT spectrum. The pre-processing can include FDNS, TNS, BWE and the like. The pre-processed left channel MDCT spectrum is de-interleaved to obtain M blocks of left channel MDCT spectrum.

[0586] S75. If the window type of the right channel signal of the current frame is short frame, M blocks of right channel spectrum are obtained according to the right channel signal of the current frame.

[0587] If the window type of the right channel signal of the current frame is short frame, the right channel signal of the current frame is windowed and MDCT transformed to obtain M blocks of right channel MDCT spectrum. The right channel MDCT spectrum is interleaved to obtain interleaved right channel MDCT spectrum. The interleaved right channel MDCT spectrum is pre-processed to obtain pre-processed right channel MDCT spectrum. The pre-processing can include FDNS, TNS, BWE and the like. The pre-processed right channel MDCT spectrum is de-interleaved to obtain M blocks of right channel MDCT spectrum.

[0588] S76. The grouping number and grouping flag information of the left channel are obtained according to the M blocks of left channel spectrum.

[0589] The specific method of obtaining the grouping number and grouping flag information is the same as the step S18 shown in the foregoing Figure 7 .

[0590] S77. The grouping number and grouping flag information of the right channel are obtained according to the M blocks of right channel spectrum.

[0591] The specific method of obtaining the grouping number and grouping flag information is the same as the step S18 shown in the foregoing Figure 7 .

[0592] S78. Whether to adjust the grouping flag information is determined according to the grouping flag information of the left and right channels. If adjustment is needed, the adjusted grouping flag information of the left and right channels is determined according to the grouping flag information of the left and right channels.

[0593] Case 1: If the grouping flag information of the left and right channels indicates that the positions of the spectral blocks contained in the transient groups of the left and right channels are completely the same, the grouping flag information of the left and right channels is not adjusted. That is, the number of blocks contained in the transient group of the left channel is the same as the number of blocks contained in the transient group of the right channel, and the positions of the blocks contained in the transient group of the left channel are the same as the positions of the blocks contained in the transient group of the right channel, then the grouping flag information of the left and right channels is not adjusted.

[0594] For example, the following is given:

[0595] The grouping flag information of the left channel is: 1 1 1 1 1 1 0 0.

[0596] The grouping flag information of the right channel is: 1 1 1 1 1 1 0 0.

[0597] The above grouping information indicates that the positions of the spectral blocks contained in the transient groups of the left and right channels are completely overlapped, and in this case, the grouping information of the left and right channels does not need to be adjusted.

[0598] Case 2: If the number of blocks contained in the transient group of the left channel is the same as the number of blocks contained in the transient group of the right channel, the grouping flag information of the left and right channels is not adjusted. That is, the number of blocks contained in the transient group of the left channel is the same as the number of blocks contained in the transient group of the right channel, and the positions of the blocks contained in the transient group of the left channel are not consistent with the positions of the blocks contained in the transient group of the right channel, then the grouping flag information of the left and right channels is not adjusted.

[0599] For example, the following is given:

[0600] The grouping flag information of the left channel is: 0 0 0 1 1 1 1 1.

[0601] The grouping flag information of the right channel is: 1 1 1 1 1 0 0 0.

[0602] The above grouping information indicates that the number of blocks contained in the transient groups of the left and right channels is the same, but the positions of the blocks contained in the transient group of the left channel are not consistent with the positions of the blocks contained in the transient group of the right channel, and in this case, the grouping flag information of the left and right channels does not need to be adjusted.

[0603] In the following cases 3 and 4, the number of transient blocks contained in the transient group of the left channel is not the same as the number of transient blocks contained in the transient group of the right channel, and then the grouping flag information of at least one of the left and right channels needs to be adjusted. Among them, the grouping flag information of one of the left and right channels is adjusted in the following case 3, and the grouping flag information of one of the left and right channels is adjusted or the grouping flag information of both channels is adjusted in case 4.

[0604] Case 3: If the grouping indicator information of the left and right channels indicates that the number of blocks contained in the transient group of the left channel is different from the number of blocks contained in the transient group of the right channel, and the positions of the blocks contained in the transient groups of the left and right channels are completely different, the grouping indicator information of the channel with the smaller number of blocks contained in the transient group is adjusted to ensure that the number of blocks contained in the transient groups of the left and right channels is the same.

[0605] For example, the following is an example:

[0606] The grouping indicator information of the left channel groupIndicator_L: 00011111.

[0607] The grouping indicator information of the right channel groupIndicator_R: 11110000.

[0608] The grouping indicator information of the left channel is adjusted so that the number of blocks in the transient group of the left channel is the same as the number of blocks in the transient group of the right channel, for example, the transient identifier of the block with serial number 3 (the serial number starts from 0) of the left channel can be changed to transient, and the adjusted grouping information is as follows:

[0609] The grouping indicator information of the left channel groupIndicator_L: 00011111.

[0610] The grouping indicator information of the right channel groupIndicator_R: 11110000.

[0611] Through the above adjustment, the number of blocks in the transient groups of the left and right channels can be ensured to be the same.

[0612] Case 4: If the grouping indicator information of the left and right channels indicates that the number of blocks contained in the transient group of the left channel is different from the number of blocks contained in the transient group of the right channel, and the positions of the blocks contained in the transient groups of the left and right channels are not completely the same, i.e., only part of the positions of the spectral blocks contained in the transient groups of the left and right channels are different, grouping information adjustment is needed. The adjustment method can be to perform a union set processing on the transient groups of the left and right channels, i.e., to expand the range of the transient group.

[0613] For example, the serial numbers of the grouping indicator information of the left and right channels are labeled from 0, and the grouping information of the right channel needs to be adjusted:

[0614] The grouping indicator information of the left channel groupIndicator_L: 11100001.

[0615] The grouping indicator information of the right channel groupIndicator_R: 11111100.

[0616] The transient groups of the left and right channels are processed by set union, i.e. the range of the transient groups is expanded, and the adjusted grouping information of the above example is as follows:

[0617] The grouping flag information groupIndicator_L of the left channel is: 1 1 1 0 0 0 0 1.

[0618] The grouping flag information groupIndicator_R of the right channel is: 1 1 1 0 0 0 0 1.

[0619] The block with the serial number 3 of the right channel is adjusted from the non-transient group to the transient group, so that the number of transient blocks of the left and right channels is the same, i.e. the positions of the spectral blocks contained in the transient groups of the left and right channels remain consistent. The adjusted grouping flag information of the left and right channels is encoded and written into the bitstream, and transmitted to the decoding end.

[0620] For example, the grouping information of the left and right channels needs to be adjusted as follows:

[0621] The grouping flag information groupIndicator_L of the left channel is: 1 1 0 0 0 0 11.

[0622] The grouping flag information groupIndicator_R of the right channel is: 1 1 1 1 0 0 0 1.

[0623] The transient groups of the left and right channels are processed by set union, i.e. the range of the transient groups is expanded, and the adjusted grouping information of the above example is as follows:

[0624] The grouping flag information groupIndicator_L of the left channel is: 1 1 0 0 0 0 0 1.

[0625] The grouping flag information groupIndicator_R of the right channel is: 1 1 0 0 0 0 0 1.

[0626] S79. According to the adjusted grouping flag information of the left and right channels, the left channel spectrum of M blocks and the right channel spectrum of M blocks are grouped and arranged to obtain a grouped and arranged stereo spectrum.

[0627] The specific method of the grouping and arranging processing is the same as the consistency shown in the foregoing Figure 7 According to the adjusted grouping flag information, the left channel spectrum of M blocks and the right channel spectrum of M blocks are grouped and arranged respectively to obtain a grouped and arranged left channel spectrum and a grouped and arranged right channel spectrum.

[0628] S710. The grouped and arranged stereo spectrum is encoded by using an encoding neural network, and written into the bitstream.

[0629] One method is: according to the adjusted grouping mark information, the left channel spectrum arranged in groups is first subjected to intra-group interleaving processing to obtain the intra-group interleaved left channel spectrum. Similarly, according to the adjusted grouping mark information, the right channel spectrum arranged in groups is first subjected to intra-group interleaving processing to obtain the intra-group interleaved right channel spectrum. Then, the intra-group interleaved stereo spectrum is encoded by using the encoding neural network.

[0630] The encoding neural network used in the stereo coding can be a CNN network, in which the left channel spectrum and the right channel spectrum are respectively taken as the input signals of one channel in the CNN network.

[0631] In some embodiments of the present application, the decoding method, as shown in Figure 14 mainly includes the following steps:

[0632] S81. According to the received code stream, the window type of the left channel of the current frame is obtained.

[0633] S82. According to the received code stream, the window type of the right channel of the current frame is obtained.

[0634] S83. If the window type of the left channel of the current frame is a short frame, then according to the received code stream, the grouping number and the grouping mark information of the left channel are obtained.

[0635] S84. If the window type of the right channel of the current frame is a short frame, then according to the received code stream, the grouping number and the grouping mark information of the right channel are obtained.

[0636] S85. According to the received code stream, the left channel decoded spectrum and the right channel decoded spectrum are obtained by using the decoding neural network.

[0637] S86. According to the grouping number and the grouping mark information of the left channel, the left channel decoded spectrum is subjected to intra-group de-interleaving processing to obtain the intra-group de-interleaved left channel spectrum.

[0638] Then, according to the grouping number and the grouping mark information of the left channel, the spectrum belonging to the same group in the left channel decoded spectrum can be determined. The spectrum belonging to the same group is subjected to intra-group de-interleaving processing to obtain the intra-group de-interleaved left channel spectrum.

[0639] S87. According to the grouping number and the grouping mark information of the right channel, the right channel decoded spectrum is subjected to intra-group de-interleaving processing to obtain the intra-group de-interleaved right channel spectrum.

[0640] Similarly, according to the number of groups of the right channel and the group flag information, the spectrums belonging to the same group in the decoded spectrum of the right channel can be determined. The spectrums belonging to the same group are subjected to in-group de-interleaving processing to obtain the right channel spectrum after in-group de-interleaving processing. The de-interleaving processing is the same as the de-interleaving processing at the encoding end.

[0641] S88. According to the number of groups of the left channel and the group flag information, the left channel spectrum after in-group de-interleaving processing is subjected to inverse group arrangement processing to obtain the left channel spectrum after inverse group processing.

[0642] The specific method of the inverse group arrangement processing is the same as that shown in step S24. Figure 8

[0643] S89. According to the number of groups of the right channel and the group flag information, the right channel spectrum after in-group de-interleaving processing is subjected to inverse group arrangement processing to obtain the right channel spectrum after inverse group processing.

[0644] The specific method of the inverse group arrangement processing is the same as that shown in step S24. Figure 8

[0645] S810. The left channel spectrum after inverse group processing is subjected to interleaving processing to obtain the left channel spectrum after interleaving processing.

[0646] If the window type of the left channel of the current frame is a short frame, the left channel spectrum after inverse group processing is subjected to interleaving processing.

[0647] S811. The right channel spectrum after inverse group processing is subjected to interleaving processing to obtain the right channel spectrum after interleaving processing.

[0648] If the window type of the right channel of the current frame is a short frame, the right channel spectrum after inverse group processing is subjected to interleaving processing.

[0649] S812. The left channel spectrum after interleaving processing is subjected to decoding post-processing to obtain the left channel spectrum after decoding post-processing.

[0650] S813. The right channel spectrum after interleaving processing is subjected to decoding post-processing to obtain the right channel spectrum after decoding post-processing.

[0651] The decoding post-processing can include BWE, TNS inverse processing, FDNS inverse processing, etc.

[0652] S814. The left channel spectrum after decoding post-processing is subjected to de-interleaving processing to obtain the reconstructed left channel spectrum.

[0653] S815. The right channel spectrum after decoding post-processing is subjected to de-interleaving processing to obtain the reconstructed right channel spectrum.

[0654] ​​S816. Perform inverse MDCT transform and de-windowing on the reconstructed left channel spectrum to obtain a reconstructed left channel signal.

[0655] S817. Perform inverse MDCT transform and de-windowing on the reconstructed right channel spectrum to obtain a reconstructed right channel signal.

[0656] In the embodiments of the present application, the grouping flag information adjustment is performed according to the grouping flag information of the left channel and the grouping flag information of the right channel, to obtain adjusted grouping flag information of the left and right channels; and the grouping arrangement of the left channel spectrum of the M blocks and the right channel spectrum of the M blocks is performed according to the adjusted grouping flag information of the left and right channels, to obtain a grouped stereo spectrum. By adjusting the grouping flag information of the left and right channels, it is ensured that the left and right channel groups are consistent when the grouped stereo spectrum is used as the input of the encoding neural network, so that the transient characteristics of the reconstructed stereo signal can be well restored.

[0657] It should be noted that, for each of the foregoing method embodiments, in order to simply describe, each is described as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0658] In order to better implement the above-mentioned scheme of the embodiments of the present application, the related device for implementing the above-mentioned scheme is also provided.

[0659] Please refer to Figure 15 As shown in FIG. 15, the encoding device 1500 for a multi-channel signal provided by the embodiments of the present application can include a transient identification obtaining module 1501, a grouping information obtaining module 1502, a grouping information adjusting module 1503, a spectrum obtaining module 1504, and an encoding module 1505, wherein,

[0660] The transient identification obtaining module is configured to obtain M first transient identifications of M blocks of a first channel according to the spectrum of the M blocks of the first channel of a current frame of a multi-channel signal to be encoded; the M blocks of the first channel include a first block of the first channel, and the first transient identification of the first block is used to indicate that the first block is a transient block or a non-transient block.

[0661] The grouping information obtaining module is configured to obtain first grouping information of the M blocks of the first channel according to the M first transient identifications.

[0662] The transient identifier obtaining module is configured to obtain M second transient identifiers of M blocks of a second channel according to spectrums of the M blocks of the second channel of the current frame; the M blocks of the second channel include a second block of the second channel, and the second transient identifier of the second block is used to indicate that the second block is a transient block or to indicate that the second block is a non-transient block;

[0663] The grouping information obtaining module is configured to obtain second grouping information of the M blocks of the second channel according to the M second transient identifiers;

[0664] The grouping information adjusting module is configured to obtain first adjusted grouping information and second adjusted grouping information according to the first grouping information and the second grouping information when the first grouping information and the second grouping information satisfy a preset condition, the first adjusted grouping information corresponds to the first grouping information, and the second adjusted grouping information corresponds to the second grouping information; the first adjusted grouping information is the same as the first grouping information, and the second adjusted grouping information is obtained based on adjustment of the second grouping information; or, the first adjusted grouping information is obtained based on adjustment of the first grouping information, and the second adjusted grouping information is the same as the second grouping information; or, the first adjusted grouping information is obtained based on adjustment of the first grouping information, and the second adjusted grouping information is obtained based on adjustment of the second grouping information;

[0665] The spectrum obtaining module is configured to obtain first to-be-encoded spectrums according to the first adjusted grouping information and spectrums of the M blocks of the first channel;

[0666] The spectrum obtaining module is configured to obtain second to-be-encoded spectrums according to the second adjusted grouping information and spectrums of the M blocks of the second channel;

[0667] The encoding module is configured to encode the first to-be-encoded spectrums and the second to-be-encoded spectrums by using an encoding neural network to obtain a spectrum encoding result, and write the spectrum encoding result into a bitstream.

[0668] Please refer to Figure 16 The multi-channel signal decoding device 1600 provided by the embodiment of the present application can include a grouping information obtaining module 1601, a decoding module 1602, a spectrum obtaining module 1603, and a reconstructed signal obtaining module 1604, wherein,

[0669] The grouping information obtaining module is configured to obtain first decoding grouping information of M blocks of a first channel of a current frame of a multi-channel signal from a bitstream, and the first decoding grouping information is used to indicate first decoding transient identifiers of the M blocks of the first channel;

[0670] The grouping information obtaining module is configured to obtain, from the code stream, second decoding grouping information of M blocks of a second channel of the current frame, the second decoding grouping information being used to indicate second decoding transient identifiers of the M blocks of the second channel.

[0671] The decoding module is configured to decode the code stream by using a decoding neural network to obtain decoded spectrums of the M blocks of the first channel and decoded spectrums of the M blocks of the second channel.

[0672] The reconstructed signal obtaining module is configured to obtain, according to the first decoding grouping information and the decoded spectrums of the M blocks of the first channel, a first reconstructed signal of the first channel.

[0673] The reconstructed signal obtaining module is configured to obtain, according to the second decoding grouping information and the decoded spectrums of the M blocks of the second channel, a second reconstructed signal of the second channel.

[0674] It should be noted that the information interaction and execution process between the modules / units of the above apparatus are based on the same concept as the method embodiments of the present application, and the technical effects brought by the same are the same as those of the method embodiments of the present application. For details, refer to the foregoing description of the method embodiments of the present application, which will not be repeated here.

[0675] The embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a program, and the program executes part or all of the steps recorded in the foregoing method embodiments.

[0676] Next, another multi-channel signal encoding apparatus provided by the embodiments of the present application is introduced. Referring to FIG. 17, Figure 17 The multi-channel signal encoding apparatus 1700 includes:

[0677] A receiver 1701, a transmitter 1702, a processor 1703 and a memory 1704 (wherein the number of the processor 1703 in the multi-channel signal encoding apparatus 1700 can be one or more, Figure 17 and the receiver 1701, the transmitter 1702, the processor 1703 and the memory 1704 can be connected by a bus or other means, wherein, Figure 17 the connection by the bus is taken as an example.

[0678] The memory 1704 can include read-only memory and random access memory, and provide the processor 1703 with instructions and data. A portion of the memory 1704 can also include non-volatile random access memory (NVRAM). The memory 1704 stores operating systems and operating instructions, executable modules or data structures, or subsets thereof, or expanded sets thereof, where the operating instructions can include various operating instructions for implementing various operations. The operating system can include various system programs for implementing various basic services and processing hardware-based tasks.

[0679] The processor 1703 controls the operation of the multi-channel signal encoding device, and can also be referred to as a central processing unit (CPU). In specific applications, various components of the multi-channel signal encoding device are coupled together through a bus system, which can include a data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, all buses are referred to as a bus system in the figure.

[0680] The method disclosed in the above embodiments of the present application can be applied in the processor 1703 or implemented by the processor 1703. The processor 1703 can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by integrated logic circuits or instructions in the form of software in the processor 1703. The processor 1703 described above can be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory 1704, and the processor 1703 reads the information in the memory 1704 and combines the hardware to complete the steps of the above method.

[0681] The receiver 1701 can be configured to receive inputted digital or character information, and to generate signal input related to the setting of the multi-channel signal encoding device and the function control. The transmitter 1702 can include a display device such as a display screen, and the transmitter 1702 can be configured to output digital or character information through an external interface.

[0682] In the embodiments of the present application, the processor 1703 is configured to execute the method performed by the multi-channel signal encoding device as shown in the foregoing embodiments. Figure 4 、 Figure 7 、 Figure 9 、 Figure 11 、 Figure 13

[0683] Next, another multi-channel signal decoding device provided by the embodiments of the present application is introduced. As shown in FIG. 18, the multi-channel signal decoding device 1800 includes: Figure 18

[0684] The receiver 1801, the transmitter 1802, the processor 1803 and the memory 1804 (wherein the number of the processor 1803 in the multi-channel signal decoding device 1800 can be one or more, and one processor is taken as an example in the embodiments of the present application). In some embodiments of the present application, the receiver 1801, the transmitter 1802, the processor 1803 and the memory 1804 can be connected through a bus or other means, wherein the connection through the bus is taken as an example in the embodiments of the present application. Figure 18 Figure 18

[0685] The memory 1804 can include a read-only memory and a random access memory, and provide the processor 1803 with instructions and data. A part of the memory 1804 can also include an NVRAM. The memory 1804 stores an operating system and operation instructions, executable modules or data structures, or a subset of them, or an extended set of them, wherein the operation instructions can include various operation instructions for implementing various operations. The operating system can include various system programs for implementing various basic services and processing hardware-based tasks.

[0686] The processor 1803 controls the operation of the multi-channel signal decoding device, and the processor 1803 can also be referred to as a CPU. In specific applications, various components of the multi-channel signal decoding device are coupled together through a bus system, wherein the bus system can include a data bus, a power supply bus, a control bus and a state signal bus, etc. However, for the purpose of clear illustration, all kinds of buses are referred to as a bus system in the figure.

[0687] ​​​​The method disclosed in the embodiments of the present application can be applied to the processor 1803 or implemented by the processor 1803. The processor 1803 can be an integrated circuit chip having a signal processing capability. In implementation, the steps of the above method can be completed by an integrated logic circuit or a software form of instruction in the processor 1803. The processor 1803 can be a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed by the processor 1803. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware code executed by the processor, or a combination of hardware and software modules in the processor. The software module can be located in a storage medium such as random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, or a storage device thereof. The storage medium is located in the storage 1804, and the processor 1803 reads information in the storage 1804 and combines the hardware to complete the steps of the above method.

[0688] In the embodiments of the present application, the processor 1803 is configured to perform the method performed by the multi-channel signal decoding device as shown in the above embodiments. Figure 5 、 Figure 8 、 Figure 10 、 Figure 12 、 Figure 14

[0689] In another possible design, when the multi-channel signal encoding device or the multi-channel signal decoding device is a chip in a terminal, the chip includes a processing unit, for example, a processor, and a communication unit, for example, an input / output interface, a pin or a circuit, etc. The processing unit can execute computer-executed instructions stored in a storage unit, so that the chip in the terminal performs the audio encoding method of any one of the first aspect or the audio decoding method of any one of the second aspect. Alternatively, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit in the terminal located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0690] In the embodiments of the present application, the processor mentioned in any of the above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of programs of the method of the first aspect or the second aspect.​

[0691] It should be noted that the above-described apparatus embodiments are only illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. In addition, the connection relationship between the modules in the apparatus embodiments provided in the present application indicates that there is a communication connection between them, which can be implemented as one or more communication buses or signal lines.

[0692] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary general hardware, and of course it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure for implementing the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the methods described in various embodiments of the present application.

[0693] In the above embodiments, all or part can be realized by software, hardware, firmware or any combination thereof. When realized by software, it can be realized in the form of a computer program product in whole or in part.

[0694] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be stored by the computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.

Claims

1. A method of encoding a multi-channel signal, characterized by, The method comprises: obtaining M first transient identifiers of M blocks of a first channel of a current frame of a multi-channel signal to be encoded according to spectrums of the M blocks of the first channel, the M blocks of the first channel comprising a first block of the first channel, a first transient identifier of the first block being used to indicate that the first block is a transient block or to indicate that the first block is a non-transient block; obtaining first grouping information of the M blocks of the first channel according to the M first transient identifiers, the first grouping information indicating a grouping manner of the M blocks of the first channel, blocks having a same first transient identifier being grouped into a group; obtaining M second transient identifiers of M blocks of a second channel of the current frame according to spectrums of the M blocks of the second channel, the M blocks of the second channel comprising a second block of the second channel, a second transient identifier of the second block being used to indicate that the second block is a transient block or to indicate that the second block is a non-transient block; obtaining second grouping information of the M blocks of the second channel according to the M second transient identifiers, the second grouping information indicating a grouping manner of the M blocks of the second channel, blocks having a same second transient identifier being grouped into a group; when the first grouping information and the second grouping information satisfy a preset condition, obtaining first adjustment grouping information and second adjustment grouping information according to the first grouping information and the second grouping information, the first adjustment grouping information corresponding to the first grouping information, and the second adjustment grouping information corresponding to the second grouping information; wherein the first adjustment grouping information is the same as the first grouping information and the second adjustment grouping information is obtained based on adjustment on the second grouping information; or the first adjustment grouping information is obtained based on adjustment on the first grouping information and the second adjustment grouping information is the same as the second grouping information; or the first adjustment grouping information is obtained based on adjustment on the first grouping information and the second adjustment grouping information is obtained based on adjustment on the second grouping information, wherein the preset condition comprises that the first grouping information is inconsistent with the second grouping information; obtaining a first to-be-encoded spectrum according to the first adjustment grouping information and the spectrums of the M blocks of the first channel; obtaining a second to-be-encoded spectrum according to the second adjustment grouping information and the spectrums of the M blocks of the second channel; encoding the first to-be-encoded spectrum and the second to-be-encoded spectrum by using an encoding neural network to obtain a spectrum encoding result; writing the spectrum encoding result into a bitstream.

2. The method of claim 1, wherein, The method further comprises: encoding the first adjustment grouping information and the second adjustment grouping information to obtain grouping information encoding result; writing the grouping information encoding result into the bitstream.

3. The method according to claim 1 or 2, characterized in that, The first grouping information comprises: a first grouping number or a first grouping number identifier of M blocks of the first channel, the first grouping number identifier being used for indicating the first grouping number, when the first grouping number is greater than 1, the first grouping information further comprises: the M first transient identifiers; or the first grouping information comprises: the M first transient identifiers. and / or, The second grouping information comprises: a second grouping number or a second grouping number identifier of M blocks of the second channel, the second grouping number identifier being used for indicating the second grouping number, when the second grouping number is greater than 1, the second grouping information further comprises: the M second transient identifiers; or the second grouping information comprises: the M second transient identifiers. and / or, The first adjustment grouping information comprises: a first adjustment grouping number or a first adjustment grouping number identifier of M blocks of the first channel, the first adjustment grouping number identifier being used for indicating the first adjustment grouping number, when the first adjustment grouping number is greater than 1, the first adjustment grouping information further comprises: M first adjustment transient identifiers of M blocks of the first channel, the first adjustment transient identifier of the first block being different from the first transient identifier of the first block or the first adjustment transient identifier of the first block being same as the first transient identifier of the first block; or the first adjustment grouping information comprises: the M first adjustment transient identifiers. and / or, The second adjustment grouping information comprises: a second adjustment grouping number or a second adjustment grouping number identifier of M blocks of the second channel, the second adjustment grouping number identifier being used for indicating the second adjustment grouping number, when the second adjustment grouping number is greater than 1, the second adjustment grouping information further comprises: M second adjustment transient identifiers of M blocks of the second channel, the second adjustment transient identifier of the second block being different from the second transient identifier of the second block or the second adjustment transient identifier of the second block being same as the second transient identifier of the second block; or the second adjustment grouping information comprises: the M second adjustment transient identifiers.

4. The method of claim 1, wherein, The first grouping information and the second grouping information being inconsistent comprises: the M first transient identifiers indicating that M blocks of the first channel comprise transient blocks and non-transient blocks, the M second transient identifiers indicating that M blocks of the second channel comprise transient blocks and non-transient blocks, and the M first transient identifiers and the M second transient identifiers being inconsistent; or, The first grouping information and the second grouping information being inconsistent comprises: the M first transient identifiers indicating that M blocks of the first channel comprise transient blocks and non-transient blocks, the M second transient identifiers indicating that M blocks of the second channel comprise transient blocks and non-transient blocks, and a number of transient blocks of the first channel and a number of transient blocks of the second channel being inconsistent; or, The first grouping information is inconsistent with the second grouping information includes that the M first transient identifiers indicate that the M blocks of the first sound track include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound track include transient blocks and non-transient blocks, the M first transient identifiers and the M second transient identifiers are inconsistent, and an Nth block of the M blocks of the first sound track and an Nth block of the M blocks of the second sound track are both transient, 0≤N 5. The method of claim 4, wherein, The M blocks of the first sound track have respective indexes, and the M blocks of the second sound track have respective indexes; When the first grouping information is inconsistent with the second grouping information includes that the M first transient identifiers indicate that the M blocks of the first sound track include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound track include transient blocks and non-transient blocks, and the number of transient blocks of the first sound track is inconsistent with the number of transient blocks of the second sound track, if indexes of the transient blocks in the M blocks of the first sound track and indexes of the transient blocks in the M blocks of the second sound track have no intersection, the obtaining of the first adjusted grouping information and the second adjusted grouping information according to the first grouping information and the second grouping information includes: When the number of transient blocks of the first sound track is less than the number of transient blocks of the second sound track, the first grouping information is adjusted to obtain the first adjusted grouping information, and the number of transient blocks of the first sound track indicated by the first adjusted grouping information is equal to the number of transient blocks of the second sound track indicated by the second grouping information; Or, When the number of transient blocks of the first sound track is greater than the number of transient blocks of the second sound track, the second grouping information is adjusted to obtain the second adjusted grouping information, and the number of transient blocks of the second sound track indicated by the second adjusted grouping information is equal to the number of transient blocks of the first sound track indicated by the first grouping information.

6. The method of claim 3, wherein, The M blocks of the first sound track have respective indexes, and the M blocks of the second sound track have respective indexes; When the first grouping information is inconsistent with the second grouping information includes that the M first transient identifiers indicate that the M blocks of the first sound track include transient blocks and non-transient blocks, the M second transient identifiers indicate that the M blocks of the second sound track include transient blocks and non-transient blocks, and the number of transient blocks of the first sound track is inconsistent with the number of transient blocks of the second sound track, if indexes of the transient blocks in the M blocks of the first sound track and indexes of the transient blocks in the M blocks of the second sound track have no intersection, the obtaining of the first adjusted grouping information and the second adjusted grouping information according to the first grouping information and the second grouping information includes: When the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, at least one of the M first transient identifiers is adjusted to obtain the M first adjusted transient identifiers, and indexes of all the transient blocks indicated by the M first adjusted transient identifiers are the same as indexes of all the transient blocks indicated by the M second transient identifiers; Or when the indexes of the transient blocks indicated by the M second transient identifiers are part of the indexes of the transient blocks indicated by the M first transient identifiers, adjusting at least one of the M second transient identifiers to obtain M second adjusted transient identifiers, indexes of all the transient blocks indicated by the M second adjusted transient identifiers being the same as indexes of all the transient blocks indicated by the M first transient identifiers; or when the indexes of the transient blocks indicated by the M first transient identifiers are part of the indexes of the transient blocks indicated by the M second transient identifiers, adjusting at least one of the M first transient identifiers to obtain M first adjusted transient identifiers and adjusting at least one of the M second transient identifiers to obtain M second adjusted transient identifiers, indexes of all the transient blocks indicated by the M first adjusted transient identifiers being the same as indexes of all the transient blocks indicated by the M second adjusted transient identifiers.

7. The method of claim 6, wherein, the adjusting at least one of the M first transient identifiers to obtain the M first adjusted transient identifiers comprises: when the first transient identifier of the first block indicates that the first block is a non-transient block, if the second transient identifier of a third block of the M blocks of the second channel indicates that the third block is a transient block, adjusting the first transient identifier of the first block to be a first adjusted transient identifier of the first block, the first adjusted transient identifier of the first block indicating that the first block is a transient block, the index of the first block being the same as the index of the third block; or the adjusting at least one of the M second transient identifiers to obtain the M second adjusted transient identifiers comprises: when the second transient identifier of the second block indicates that the second block is a non-transient block, if the first transient identifier of a fourth block of the M blocks of the first channel indicates that the fourth block is a transient block, adjusting the second transient identifier of the second block to be a second adjusted transient identifier of the second block, the second adjusted transient identifier of the second block indicating that the second block is a transient block, the index of the second block being the same as the index of the fourth block.

8. The method of claim 3, wherein, when the first adjusted grouping number is greater than 1 or the M first adjusted transient identifiers indicate that the M blocks of the first channel include transient blocks and non-transient blocks, the obtaining the first to-be-encoded spectrum according to the first adjusted grouping information and the spectrum of the M blocks of the first channel comprises: grouping and arranging the spectrum of the M blocks of the first channel according to the first adjusted grouping information to obtain the first to-be-encoded spectrum; when the second adjusted grouping number is greater than 1 or the M second adjusted transient identifiers indicate that the M blocks of the second channel include transient blocks and non-transient blocks, the obtaining the second to-be-encoded spectrum according to the second adjusted grouping information and the spectrum of the M blocks of the second channel comprises: grouping and arranging the spectrum of the M blocks of the second channel according to the second adjusted grouping information to obtain the second to-be-encoded spectrum.

9. The method of claim 8, wherein, the grouping and arranging the spectrum of the M blocks of the first channel according to the first adjusted grouping information to obtain the first to-be-encoded spectrum comprises: arranging the spectrum of the blocks in the first transient group in front of the spectrum of the blocks in the first non-transient group to obtain the first to-be-encoded spectrum; or, the grouping and arranging the spectrum of the M blocks of the second channel according to the second adjustment grouping information to obtain a second to-be-encoded spectrum, comprising: arranging the spectrum of the blocks in the second transient group in front of the spectrum of the blocks in the second non-transient group to obtain the second to-be-encoded spectrum.

10. The method of claim 8, wherein, the grouping and arranging the spectrum of the M blocks of the first channel according to the first adjustment grouping information to obtain a first to-be-encoded spectrum, comprising: arranging the spectrum of the blocks in the first transient group in front of the spectrum of the blocks in the first non-transient group to obtain the first to-be-encoded spectrum; or, the grouping and arranging the spectrum of the M blocks of the second channel according to the second adjustment grouping information to obtain a second to-be-encoded spectrum, comprising: arranging the spectrum of the blocks in the second transient group in front of the spectrum of the blocks in the second non-transient group to obtain the second to-be-encoded spectrum.

11. The method of claim 3, wherein, before the encoding of the first to-be-encoded spectrum and the second to-be-encoded spectrum by the encoding neural network, the method further comprises: performing in-group interleaving processing on the first to-be-encoded spectrum to obtain an in-group interleaving processed first spectrum; performing in-group interleaving processing on the second to-be-encoded spectrum to obtain an in-group interleaving processed second spectrum; the encoding of the first to-be-encoded spectrum and the second to-be-encoded spectrum by the encoding neural network, comprising: encoding the in-group interleaving processed first spectrum and the in-group interleaving processed second spectrum by the encoding neural network.

12. The method of claim 11, wherein, the number of the M blocks of the first channel indicated as transient blocks by the M first adjustment transient identifiers is P, and the number of the M blocks of the first channel indicated as non-transient blocks by the M first adjustment transient identifiers is Q, M=P+Q; the in-group interleaving processing on the first to-be-encoded spectrum, comprising: performing interleaving processing on the spectrum of the P blocks to obtain the interleaving processed spectrum of the P blocks; performing interleaving processing on the spectrum of the Q blocks to obtain the interleaving processed spectrum of the Q blocks.

13. The method of any one of claims 1 to 2, wherein, Before the M first transient identifiers of the M blocks of the first channel are obtained according to the spectra of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded, the method further comprises: obtaining a first window type of the first channel, the first window type being a short window type or a non-short window type; obtaining a second window type of the second channel, the second window type being a short window type or a non-short window type; only when the first window type and the second window type are both short window types, the step of obtaining the M first transient identifiers of the M blocks of the first channel according to the spectra of the M blocks of the first channel of the current frame of the multi-channel signal to be encoded is performed.

14. The method of claim 13, wherein, The method further comprises: encoding the first window type and the second window type to obtain a window type encoding result; writing the window type encoding result into the code stream.

15. The method of any one of claims 1 to 2, wherein, The M first transient identifiers of the M blocks of the first channel are obtained according to the spectra of the M blocks of the first channel, comprising: obtaining M first spectral energies of the M blocks of the first channel according to the spectra of the M blocks of the first channel; obtaining a first spectral energy average of the M blocks of the first channel according to the M first spectral energies; obtaining the M first transient identifiers according to the M first spectral energies and the first spectral energy average.

16. The method of claim 15, wherein, When the first spectral energy of the first block is greater than K times of the first spectral energy average, the first transient identifier of the first block indicates that the first block is a transient block; or, When the first spectral energy of the first block is less than or equal to K times of the first spectral energy average, the first transient identifier of the first block indicates that the first block is a non-transient block; wherein the K is a real number greater than or equal to 1.

17. A method of decoding a multi-channel signal, characterized by, comprising: obtaining, from a code stream, first decoding grouping information of M blocks of a first channel of a current frame of a multi-channel signal, the first decoding grouping information being used to indicate first decoding transient identifiers of the M blocks of the first channel, and being used to indicate a grouping manner of the M blocks of the first channel, blocks having a same first transient identifier being grouped into a group; obtaining, from the code stream, second decoding grouping information of M blocks of a second channel of the current frame, the second decoding grouping information being used to indicate second decoding transient identifiers of the M blocks of the second channel, and being used to indicate a grouping manner of the M blocks of the second channel, blocks having a same second transient identifier being grouped into a group; decoding the code stream by using a decoding neural network to obtain decoded spectra of the M blocks of the first channel and decoded spectra of the M blocks of the second channel; obtaining a first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectra of the M blocks of the first channel; obtaining a second reconstructed signal of the second channel according to the second decoding grouping information and the decoded spectra of the M blocks of the second channel.

18. The method of claim 17, wherein, The obtaining of the first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectra of the M blocks of the first channel comprises: when the first decoding grouping information indicates that a first decoding grouping number of the M blocks of the first channel is greater than 1, performing inverse grouping permutation processing on the decoded spectrum of the M blocks of the first channel to obtain a spectrum after inverse grouping permutation processing of the M blocks of the first channel; obtaining the first reconstructed signal of the first channel according to the spectrum after inverse grouping permutation processing of the M blocks of the first channel; the obtaining the second reconstructed signal of the second channel according to the second decoding grouping information and the decoded spectrum of the M blocks of the second channel comprises: when the second decoding grouping information indicates that a second decoding grouping number of the M blocks of the second channel is greater than 1, performing inverse grouping permutation processing on the decoded spectrum of the M blocks of the second channel to obtain a spectrum after inverse grouping permutation processing of the M blocks of the second channel; obtaining the second reconstructed signal of the second channel according to the spectrum after inverse grouping permutation processing of the M blocks of the second channel.

19. The method of claim 17, wherein, the obtaining the first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectrum of the M blocks of the first channel comprises: performing in-group de-interleaving processing on the decoded spectrum of the M blocks of the first channel to obtain a spectrum after in-group de-interleaving processing of the M blocks of the first channel; obtaining the first reconstructed signal according to the spectrum after in-group de-interleaving processing of the M blocks of the first channel; the obtaining the second reconstructed signal of the second channel according to the second decoding grouping information and the decoded spectrum of the M blocks of the second channel comprises: performing in-group de-interleaving processing on the decoded spectrum of the M blocks of the second channel to obtain a spectrum after in-group de-interleaving processing of the M blocks of the second channel; obtaining the second reconstructed signal according to the spectrum after in-group de-interleaving processing of the M blocks of the second channel.

20. The method of claim 17, wherein, a number of the M blocks of the first channel indicated as transient blocks by the first decoding transient identification of the M blocks is P, and a number of the M blocks of the first channel indicated as non-transient blocks by the first decoding transient identification of the M blocks is Q, wherein M = P + Q; the obtaining the first reconstructed signal of the first channel according to the first decoding grouping information and the decoded spectrum of the M blocks of the first channel comprises: performing in-group de-interleaving processing on the decoded spectrum of the P blocks of the first channel and performing in-group de-interleaving processing on the decoded spectrum of the Q blocks of the first channel to obtain a spectrum after in-group de-interleaving processing of the M blocks of the first channel; performing inverse grouping permutation processing on the spectrum after in-group de-interleaving processing of the M blocks of the first channel according to the first decoding grouping information to obtain a spectrum after inverse grouping permutation processing of the M blocks of the first channel; obtaining the first reconstructed signal of the first channel according to the spectrum after inverse grouping permutation processing of the M blocks of the first channel.

21. The method of claim 20, wherein the performing inverse grouping permutation processing on the spectrum after in-group de-interleaving processing of the M blocks of the first channel according to the first decoding grouping information comprises: obtaining indexes of the P blocks of the first channel according to the first decoding grouping information; obtaining indexes of the Q blocks of the second channel according to the second decoding grouping information; performing the inverse grouping arrangement processing on the in-group de-interleaving processed spectrum of the M blocks of the first channel according to the indexes of the P blocks and the indexes of the Q blocks.

22. The method of any one of claims 17-21, wherein, The method further comprises: obtaining a first window type of a first channel of a current frame from the bitstream; obtaining a second window type of a second channel of the current frame from the bitstream; only when the first window type and the second window type are both short window types, performing the step of obtaining first decoding grouping information of M blocks of the first channel of the current frame of the multi-channel signal from the bitstream.

23. The method of any one of claims 17-21, wherein, The first decoding grouping information comprises: a first decoding grouping number of the M blocks of the first channel or a first decoding grouping number identifier, the first decoding grouping number identifier being used to indicate the first decoding grouping number, when the first decoding grouping number is greater than 1, the first decoding grouping information further comprises: M first decoding transient identifiers; or, the first decoding grouping information comprises: the M first decoding transient identifiers. and / or, The second decoding grouping information comprises: a second decoding grouping number of the M blocks of the second channel or a second decoding grouping number identifier, the second decoding grouping number identifier being used to indicate the second decoding grouping number, when the second decoding grouping number is greater than 1, the second decoding grouping information further comprises: M second decoding transient identifiers; or, the second decoding grouping information comprises: the M second decoding transient identifiers.

24. An apparatus for encoding a multi-channel signal, characterized by comprises: a transient identifier obtaining module, configured to obtain M first transient identifiers of M blocks of a first channel of a current frame of a multi-channel signal to be encoded according to spectrum of the M blocks of the first channel, the M blocks of the first channel comprising a first block of the first channel, a first transient identifier of the first block being used to indicate that the first block is a transient block or to indicate that the first block is a non-transient block; a grouping information obtaining module, configured to obtain first grouping information of the M blocks of the first channel according to the M first transient identifiers, the first grouping information indicating a grouping manner of the M blocks of the first channel, blocks with the same first transient identifier being grouped into one group; the transient identifier obtaining module, configured to obtain M second transient identifiers of M blocks of a second channel of the current frame according to spectrum of the M blocks of the second channel, the M blocks of the second channel comprising a second block of the second channel, a second transient identifier of the second block being used to indicate that the second block is a transient block or to indicate that the second block is a non-transient block; the grouping information obtaining module, configured to obtain second grouping information of the M blocks of the second channel according to the M second transient identifiers, the second grouping information indicating a grouping manner of the M blocks of the second channel, blocks with the same second transient identifier being grouped into one group; The packet information adjustment module is configured to, when the first packet information and the second packet information satisfy a preset condition, obtain first adjustment packet information and second adjustment packet information according to the first packet information and the second packet information, the first adjustment packet information corresponding to the first packet information, and the second adjustment packet information corresponding to the second packet information; wherein the first adjustment packet information is the same as the first packet information, and the second adjustment packet information is obtained based on adjustment on the second packet information; or the first adjustment packet information is obtained based on adjustment on the first packet information, and the second adjustment packet information is the same as the second packet information; or the first adjustment packet information is obtained based on adjustment on the first packet information, and the second adjustment packet information is obtained based on adjustment on the second packet information, and the preset condition includes that the first packet information is inconsistent with the second packet information. The spectrum obtaining module is configured to obtain first to-be-encoded spectrum according to the first adjustment packet information and spectrum of the M blocks of the first channel. The spectrum obtaining module is configured to obtain second to-be-encoded spectrum according to the second adjustment packet information and spectrum of the M blocks of the second channel. The encoding module is configured to encode the first to-be-encoded spectrum and the second to-be-encoded spectrum by using an encoding neural network to obtain a spectrum encoding result, and write the spectrum encoding result into a bitstream.

25. A decoding apparatus of a multi-channel signal, characterized by comprising: Comprise: The packet information obtaining module is configured to obtain, from a bitstream, first decoded packet information of M blocks of a first channel of a current frame of a multi-channel signal, the first decoded packet information being used to indicate first decoded transient identifiers of the M blocks of the first channel, and being used to indicate a grouping manner of the M blocks of the first channel, blocks with the same first transient identifier being grouped into a group. The packet information obtaining module is configured to obtain, from the bitstream, second decoded packet information of M blocks of a second channel of the current frame, the second decoded packet information being used to indicate second decoded transient identifiers of the M blocks of the second channel, and being used to indicate a grouping manner of the M blocks of the second channel, blocks with the same second transient identifier being grouped into a group. The decoding module is configured to decode the bitstream by using a decoding neural network to obtain decoded spectrum of the M blocks of the first channel and decoded spectrum of the M blocks of the second channel. The reconstructed signal obtaining module is configured to obtain a first reconstructed signal of the first channel according to the first decoded packet information and the decoded spectrum of the M blocks of the first channel. The reconstructed signal obtaining module is configured to obtain a second reconstructed signal of the second channel according to the second decoded packet information and the decoded spectrum of the M blocks of the second channel.

26. An apparatus for encoding a multi-channel signal, characterized by The encoding device of the multi-channel signal comprises at least one processor, which is coupled with a memory, reads and executes instructions in the memory to implement the method in any one of claims 1 to 16.

27. The encoding apparatus of claim 26, wherein The encoding device of the multi-channel signal further comprises the memory.

28. A decoding apparatus of a multi-channel signal, characterized by comprising: The decoding apparatus of the multi-channel signal further comprises the memory.

29. The decoding apparatus of a multi-channel signal according to claim 28, characterized by The decoding apparatus of the multi-channel signal further comprises the memory.

30. A computer readable storage medium comprising instructions which, when executed on a computer, cause the computer to carry out the method of any one of claims 1 to 16, or 17 to 23.

31. A computer readable storage medium comprising a bitstream generated by the method of any one of claims 1 to 16.

Citation Information

Patent Citations

  • Multichannel audio coding

    CA2808226A1

  • Audio encoding

    CN101127212A