Three-dimensional audio signal encoding method, device and encoder
By selecting a virtual speaker method and using representative coefficients to encode three-dimensional audio signals, the problem of high computational complexity in the existing technology is solved, and efficient data compression and sound quality stability are achieved.
Patent Information
- Application Number
- CN202110536631.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-17
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2041-05-17
AI Technical Summary
The computational complexity of three-dimensional audio signal encoding in the existing technology is high, resulting in a heavy computational burden on the encoder and making it difficult to achieve efficient data compression.
By selecting a virtual speaker, a smaller number of representative coefficients are used to replace all the coefficients of the current frame, voting is performed on each virtual speaker in the candidate virtual speaker set, and the representative virtual speaker of the current frame is selected for encoding, which reduces the calculation of the encoder Complexity and computational burden.
It effectively improves the compression rate of three-dimensional audio signals, reduces the computational complexity and bandwidth occupation of the encoder, enhances the representation of sound field information and the accuracy of coding, and ensures the stability of sound quality after reconstruction.
Smart Images

Figure CN115376529B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of multimedia, and in particular to a three-dimensional audio signal encoding method, device and encoder. Background Art
[0002] With the rapid development of high-performance computers and signal processing technology, listeners have put forward higher and higher requirements for voice and audio experience, and immersive audio can meet people's needs in this regard. For example, three-dimensional audio technology has been widely used in wireless communications (such as 4G / 5G, etc.), voice, virtual reality / augmented reality, and media audio. Three-dimensional audio technology is an audio technology that acquires, processes, transmits, renders and plays back sounds and three-dimensional sound field information in the real world, giving the sound a strong sense of space, envelopment and immersion, giving the listener an extraordinary "immersive" auditory experience.
[0003] Usually, an acquisition device (such as a microphone) collects a large amount of data to record three-dimensional sound field information, and transmits a three-dimensional audio signal to a playback device (such as a speaker, headphones, etc.) so that the playback device can play the three-dimensional audio. Due to the large amount of data of the three-dimensional sound field information, a large amount of storage space is required to store the data, and the bandwidth requirement for transmitting the three-dimensional audio signal is high. In order to solve the above problems, the three-dimensional audio signal can be compressed, and the compressed data can be stored or transmitted. At present, the encoder can use a plurality of pre-configured virtual speakers to compress the three-dimensional audio signal. However, the computational complexity of the encoder for compressing and encoding the three-dimensional audio signal is high. Therefore, how to reduce the computational complexity of compressing and encoding the three-dimensional audio signal is a problem that needs to be solved urgently. Summary of the invention
[0004] The present application provides a three-dimensional audio signal encoding method, device and encoder, thereby reducing the computational complexity of compressing and encoding three-dimensional audio signals.
[0005] In a first aspect, the present application provides a three-dimensional audio signal encoding method, which can be performed by an encoder, and specifically includes the following steps: after the encoder determines a first number of virtual speakers and a first number of voting values according to the current frame of the three-dimensional audio signal, a candidate virtual speaker set and a number of voting rounds, according to the first number of voting values, a second number of representative virtual speakers of the current frame are selected from the first number of virtual speakers, and then, the current frame is encoded according to the second number of representative virtual speakers of the current frame to obtain a code stream. Wherein, the second number is less than the first number, indicating that the second number of representative virtual speakers of the current frame are some virtual speakers in the candidate virtual speaker set. It can be understood that the virtual speakers correspond to the voting values one by one. For example, the first number of virtual speakers includes the first virtual speaker, the first number of voting values includes the voting value of the first virtual speaker, and the first virtual speaker corresponds to the voting value of the first virtual speaker. The voting value of the first virtual speaker is used to characterize the priority of using the first virtual speaker when encoding the current frame. The candidate virtual speaker set includes a fifth number of virtual speakers, the fifth number of virtual speakers includes a first number of virtual speakers, the first number is less than or equal to the fifth number, the number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number.
[0006] At present, in the process of searching for virtual speakers, the encoder uses the result of the correlation calculation between the three-dimensional audio signal to be encoded and the virtual speaker as a selection criterion for the virtual speaker. Moreover, if the encoder transmits a virtual speaker for each coefficient, the purpose of efficient data compression cannot be achieved, and a heavy computational burden will be imposed on the encoder. In the method for selecting virtual speakers provided in an embodiment of the present application, the encoder uses a smaller number of representative coefficients to replace all coefficients of the current frame to vote for each virtual speaker in the candidate virtual speaker set, and selects the representative virtual speaker of the current frame according to the voting value. Furthermore, the encoder uses the representative virtual speaker of the current frame to compress and encode the three-dimensional audio signal to be encoded, which not only effectively improves the compression rate of the compression encoding of the three-dimensional audio signal, but also reduces the computational complexity of the encoder's search for virtual speakers, thereby reducing the computational complexity of the compression encoding of the three-dimensional audio signal and alleviating the computational burden of the encoder.
[0007] The second number is used to characterize the number of representative virtual speakers of the current frame selected by the encoder. The larger the second number, the larger the number of representative virtual speakers of the current frame, and the more sound field information of the three-dimensional audio signal; the smaller the second number, the smaller the number of representative virtual speakers of the current frame, and the less sound field information of the three-dimensional audio signal. Therefore, the number of representative virtual speakers of the current frame selected by the encoder can be controlled by setting the second number. For example, the second number can be preset, or, as another example, the second number can be determined based on the current frame. By way of example, the value of the second number can be 1, 2, 4, or 8.
[0008] Specifically, the encoder may select a second number of representative virtual speakers of the current frame according to any one of the following two methods.
[0009] Method 1: The encoder selects a second number of representative virtual speakers for the current frame from the first number of virtual speakers according to the first number of voting values. Specifically includes: selecting a second number of representative virtual speakers for the current frame from the first number of virtual speakers according to the first number of voting values and a preset threshold.
[0010] Method 2, the encoder selects a second number of representative virtual speakers for the current frame from the first number of virtual speakers according to the first number of voting values, specifically including: determining a second number of voting values from the first number of voting values according to the first number of voting values, and using the second number of virtual speakers corresponding to the second number of voting values in the first number of virtual speakers as the representative virtual speakers for the second number of current frames.
[0011] In addition, the number of voting rounds may be determined based on at least one of the number of directional sound sources in the current frame of the three-dimensional audio signal, the encoding rate for encoding the current frame, and the encoding complexity for encoding the current frame. The higher the value of the number of voting rounds, the more the encoder can use a smaller number of representative coefficients to perform multiple iterations of voting on the virtual speakers in the candidate virtual speaker set, and the representative virtual speaker of the current frame is selected based on the voting values of multiple voting rounds, which can improve the accuracy of selecting the representative virtual speaker of the current frame.
[0012] In one possible implementation, the encoder may determine a first number of virtual speakers and a first number of voting values based on voting values of all virtual speakers in the candidate virtual speaker set.
[0013] Specifically, when the first number is equal to the fifth number, the encoder determines the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, specifically including: assuming that the encoder obtains the third number of representative coefficients of the current frame, and the third number of representative coefficients includes the first representative coefficient and the second representative coefficient. The encoder obtains the fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, and the fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds. Among them, the fifth number of first voting values includes the first voting value of the first virtual speaker. The fifth number of second voting values includes the second voting value of the first virtual speaker. Furthermore, the encoder obtains the voting values of the fifth number of virtual speakers based on the fifth number of first voting values and the fifth number of second voting values. It can be understood that the voting value of the first virtual speaker is obtained based on the sum of the first voting value of the first virtual speaker and the second voting value of the first virtual speaker, and the fifth number is equal to the first number. Thus, the encoder votes for the fifth number of virtual speakers included in the candidate virtual speaker set for each coefficient of the current frame, and uses the voting values of the fifth number of virtual speakers included in the candidate virtual speaker set as the basis for selection, comprehensively covering the fifth number of virtual speakers, and ensuring the accuracy of the representative virtual speakers selected by the encoder for the current frame.
[0014] For example, the encoder obtains the fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, including: determining the fifth number of first voting values according to the coefficients of the fifth number of virtual speakers and the first representative coefficient.
[0015] In another possible implementation, the encoder may determine the first number of virtual speakers and the first number of voting values based on voting values of some virtual speakers in the candidate virtual speaker set.
[0016] Specifically, when the first number is less than or equal to the fifth number, when the first number of virtual speakers and the first number of voting values are determined according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, the difference from the above possible implementation is that after the encoder obtains the fifth number of first voting values and the fifth number of second voting values, the encoder selects the eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values, and the eighth number is less than the fifth number, indicating that the eighth number of virtual speakers are part of the fifth number of virtual speakers; and the encoder selects the ninth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of second voting values, and the ninth number is less than the fifth number, indicating that the ninth number of virtual speakers are part of the fifth number of virtual speakers. Furthermore, the encoder obtains the tenth number of third voting values of the tenth number of virtual speakers based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers, that is, the encoder accumulates and obtains the voting values of the virtual speakers with the same numbers in the eighth number of virtual speakers and the ninth number of virtual speakers. Thus, the encoder obtains the first number of virtual speakers and the first number of voting values based on the eighth number of first voting values, the ninth number of second voting values, and the tenth number of third voting values. It is understandable that the first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers. The eighth number of virtual speakers includes the tenth number of virtual speakers, and the ninth number of virtual speakers includes the tenth number of virtual speakers. The tenth number of virtual speakers includes the second virtual speaker, and the third voting value of the second virtual speaker is obtained based on the sum of the first voting value of the second virtual speaker and the second voting value of the second virtual speaker, the tenth number is less than or equal to the eighth number, and the tenth number is less than or equal to the ninth number. Moreover, the tenth number can be an integer greater than or equal to 1.
[0017] Optionally, there are no virtual speakers with the same number in the eighth number of virtual speakers and the ninth number of virtual speakers, that is, the tenth number may be equal to 0. The encoder obtains the first number of virtual speakers and the first number of voting values based on the eighth number of first voting values and the ninth number of second voting values.
[0018] In this way, the encoder selects a larger voting value from the voting values of the fifth number of virtual speakers included in the candidate virtual speaker set for each coefficient of the current frame, and uses the larger voting value to determine the first number of virtual speakers and the first number of voting values, thereby reducing the computational complexity of the encoder's search for virtual speakers while ensuring the accuracy of the representative virtual speakers of the current frame selected by the encoder.
[0019] In addition, the encoder obtains the third number of representative coefficients of the current frame, including: obtaining a fourth number of coefficients of the current frame, and frequency domain eigenvalues of the fourth number of coefficients; selecting a third number of representative coefficients from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, the third number being less than the fourth number, indicating that the third number of representative coefficients are part of the fourth number of coefficients. The current frame of the three-dimensional audio signal may refer to a higher order ambisonics (HOA) signal; the frequency domain eigenvalues of the coefficients of the current frame are determined based on the coefficients of the HOA signal.
[0020] In this way, since the encoder selects part of the coefficients from all the coefficients of the current frame as representative coefficients and uses a smaller number of representative coefficients instead of all the coefficients of the current frame to select representative virtual speakers from the candidate virtual speaker set, the computational complexity of the encoder's search for virtual speakers is effectively reduced, thereby reducing the computational complexity of compressing and encoding three-dimensional audio signals and alleviating the computational burden of the encoder.
[0021] The encoder encodes the current frame according to the second number of representative virtual speakers of the current frames to obtain a code stream, including: the encoder generates a virtual speaker signal according to the second number of representative virtual speakers of the current frames and the current frame; and encodes the virtual speaker signal to obtain the code stream.
[0022] Since the frequency domain eigenvalues of the coefficients of the current frame represent the sound field characteristics of the three-dimensional audio signal, the encoder selects representative coefficients of the representative sound field components of the current frame according to the frequency domain eigenvalues of the coefficients of the current frame, and the representative virtual speakers of the current frame selected from the candidate virtual speaker set using the representative coefficients can fully represent the sound field characteristics of the three-dimensional audio signal, thereby further improving the accuracy of the encoder in generating a virtual speaker signal when compressing and encoding the three-dimensional audio signal to be encoded using the representative virtual speakers of the current frame, so as to improve the compression rate of the compression encoding of the three-dimensional audio signal and reduce the bandwidth occupied by the encoder transmission code stream.
[0023] Optionally, before the encoder selects the third number of representative coefficients from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, the method further includes: obtaining a first correlation between the current frame and the representative virtual speaker set of the previous frame, and if the first correlation does not meet the reuse condition, obtaining the fourth number of coefficients of the current frame of the three-dimensional audio signal and the frequency domain eigenvalues of the fourth number of coefficients. The representative virtual speaker set of the previous frame includes a sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal. The first correlation is used to determine whether to reuse the representative virtual speaker set of the previous frame when encoding the current frame.
[0024] In this way, the encoder can first determine whether the representative virtual speaker set of the previous frame can be reused to encode the current frame. If the encoder reuses the representative virtual speaker set of the previous frame to encode the current frame, the encoder is prevented from executing the process of searching for virtual speakers again, which effectively reduces the computational complexity of the encoder searching for virtual speakers, thereby reducing the computational complexity of compressing and encoding the three-dimensional audio signal and reducing the computational burden of the encoder. In addition, the frequent jumps of virtual speakers between frames can be reduced, the continuity of the orientation between frames is enhanced, the stability of the sound image of the reconstructed three-dimensional audio signal is improved, and the sound quality of the reconstructed three-dimensional audio signal is ensured. If the encoder cannot reuse the representative virtual speaker set of the previous frame to encode the current frame, the encoder selects the representative coefficient again, uses the representative coefficient of the current frame to vote for each virtual speaker in the candidate virtual speaker set, and selects the representative virtual speaker of the current frame according to the voting value, so as to achieve the purpose of reducing the computational complexity of compressing and encoding the three-dimensional audio signal and reducing the computational burden of the encoder.
[0025] Optionally, the encoder selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, including: obtaining the seventh number of final voting values of the current frame corresponding to the seventh number of virtual speakers and the current frame according to the first number of voting values and the sixth number of final voting values of the previous frame, and selecting the second number of representative virtual speakers of the current frame from the seventh number of virtual speakers according to the seventh number of final voting values of the current frame, the second number is less than the seventh number, indicating that the second number of representative virtual speakers of the current frame are some of the virtual speakers in the seventh number of virtual speakers. Among them, the seventh number of virtual speakers includes the first number of virtual speakers, and the seventh number of virtual speakers includes the sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are the representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal. The sixth number of virtual speakers included in the representative virtual speaker set of the previous frame corresponds one-to-one to the sixth number of final voting values of the previous frame.
[0026] In the process of searching for virtual speakers, since the position of the real sound source and the position of the virtual speaker may not necessarily coincide, the virtual speaker may not necessarily form a one-to-one correspondence with the real sound source, and since in actual complex scenes, a limited number of virtual speaker sets may not be able to represent all sound sources in the sound field, at this time, the virtual speakers searched between frames may frequently jump, and this jump will significantly affect the listener's auditory perception, resulting in obvious discontinuity and noise in the three-dimensional audio signal after decoding and reconstruction. The method for selecting virtual speakers provided in the embodiment of the present application inherits the representative virtual speakers of the previous frame, that is, for virtual speakers with the same number, the final voting value of the previous frame is used to adjust the initial voting value of the current frame, so that the encoder is more inclined to select the representative virtual speakers of the previous frame, thereby reducing the frequent jumps of virtual speakers between frames, enhancing the continuity of the signal orientation between frames, improving the stability of the sound image of the reconstructed three-dimensional audio signal, and ensuring the sound quality of the reconstructed three-dimensional audio signal.
[0027] Optionally, the method further includes: the encoder may also collect a current frame of the three-dimensional audio signal, so as to compress and encode the current frame of the three-dimensional audio signal to obtain a code stream, and transmit the code stream to the decoding end.
[0028] In a second aspect, the present application provides a three-dimensional audio signal encoding device, the device comprising various modules for executing the three-dimensional audio signal encoding method in the first aspect or any possible design of the first aspect. For example, the three-dimensional audio signal encoding device comprises a virtual speaker selection module and an encoding module. The virtual speaker selection module is used to determine a first number of virtual speakers and a first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, the virtual speakers correspond to the voting values one by one, the first number of virtual speakers includes the first virtual speaker, the first number of voting values includes the voting value of the first virtual speaker, the first virtual speaker corresponds to the voting value of the first virtual speaker, the voting value of the first virtual speaker is used to characterize the priority of using the first virtual speaker when encoding the current frame, the candidate virtual speaker set includes a fifth number of virtual speakers, the fifth number of virtual speakers includes the first number of virtual speakers, the number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number. The virtual speaker selection module is also used to select a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, and the second number is less than the first number. The encoding module is used to encode the current frame according to the second number of representative virtual speakers of the current frame to obtain a bit stream. These modules can perform the corresponding functions in the above-mentioned first aspect method example, and refer to the detailed description in the method example for details, which will not be repeated here.
[0029] In a third aspect, the present application provides an encoder, comprising at least one processor and a memory, wherein the memory is used to store a set of computer instructions; when the processor executes the set of computer instructions, the operating steps of the three-dimensional audio signal encoding method in the first aspect or any possible implementation of the first aspect are performed.
[0030] In a fourth aspect, the present application provides a system, comprising an encoder as described in the third aspect, and a decoder, wherein the encoder is used to execute the operation steps of the three-dimensional audio signal encoding method in the first aspect or any possible implementation of the first aspect, and the decoder is used to decode the code stream generated by the encoder.
[0031] In a fifth aspect, the present application provides a computer-readable storage medium, comprising: computer software instructions; when the computer software instructions are executed in an encoder, the encoder executes the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0032] In a sixth aspect, the present application provides a computer program product. When the computer program product runs on an encoder, the encoder executes the operating steps of the method described in the first aspect or any possible implementation of the first aspect.
[0033] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of the structure of an audio codec system provided in an embodiment of the present application;
[0035] Figure 2 A schematic diagram of a scenario of an audio encoding and decoding system provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of a flow chart of a three-dimensional audio signal encoding and decoding method provided in an embodiment of the present application;
[0038] Figure 5 A flowchart of a method for selecting a virtual speaker provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of a flow chart of a three-dimensional audio signal encoding method provided in an embodiment of the present application;
[0040] Figure 7 A flowchart of another method for selecting a virtual speaker provided in an embodiment of the present application;
[0041] Figure 8 A flowchart of another method for selecting a virtual speaker provided in an embodiment of the present application;
[0042] Fig. 9 A flowchart of another method for selecting a virtual speaker provided in an embodiment of the present application;
[0043] Fig.10 A schematic diagram of the structure of an encoding device provided in this application;
[0044] Fig.11 A schematic diagram of the structure of an encoder provided in this application. DETAILED DESCRIPTION
[0045] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given.
[0046] Sound is a continuous wave generated by the vibration of an object. The object that vibrates and emits sound waves is called a sound source. When sound waves propagate through a medium (such as air, solid or liquid), the auditory organs of humans or animals can perceive the sound.
[0047] The characteristics of sound waves include pitch, intensity and timbre. Pitch refers to the high or low pitch of a sound. Intensity refers to the size of a sound. Intensity can also be called loudness or volume. The unit of intensity is decibel (dB). Timbre is also called timbre quality.
[0048] The frequency of sound waves determines the pitch of the sound. 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 sound that the human ear can recognize is between 20Hz and 20,000Hz.
[0049] The amplitude of the sound wave determines the intensity of the sound. The greater the amplitude, the greater the sound intensity. The closer to the sound source, the greater the sound intensity.
[0050] The waveform of the sound wave determines the timbre, and the waveforms of the sound wave include square wave, sawtooth wave, sine wave and pulse wave.
[0051] According to the characteristics of sound waves, sounds can be divided into regular sounds and irregular sounds. Irregular sounds refer to sounds produced by irregular vibrations of the sound source. Irregular sounds are, for example, noises that affect people's work, study, and rest. Regular sounds refer to sounds produced by regular vibrations of the sound source. Regular sounds include speech and music. When sound is represented by electricity, regular sounds are analog signals that continuously change in the time-frequency domain. This analog signal can be called an audio signal. An audio signal is an information carrier that carries speech, music, and sound effects.
[0052] Since human hearing has the ability to distinguish the positional distribution of sound sources in space, when listeners hear sounds in space, in addition to being able to feel the pitch, volume and timbre of the sounds, they can also feel the direction of the sounds.
[0053] As people pay more and more attention to the experience of auditory systems and demand more quality, three-dimensional audio technology has emerged to enhance the depth, presence and spatial sense of sound. Therefore, listeners can not only feel the sound from the front, back, left and right sound sources, but also feel the space they are in is surrounded by the spatial sound field (referred to as "sound field") generated by these sound sources, and the sound spreads around, creating an "immersive" sound effect that makes listeners feel like they are in a theater or concert hall.
[0054] Three-dimensional audio technology refers to assuming that the space outside the human ear is a system, and the signal received at the eardrum is a three-dimensional audio signal output by filtering the sound emitted by the sound source through the system outside the ear. For example, the system outside the human ear can be defined as the system impulse response h(n), any sound source can be defined as x(n), and the signal received at the eardrum is the convolution result of x(n) and h(n). The three-dimensional audio signal described in the embodiment of the present application may refer to a higher order ambisonics (HOA) signal. Three-dimensional audio can also be called three-dimensional sound effects, spatial audio, three-dimensional sound field reconstruction, virtual 3D audio or binaural audio, etc.
[0055] As we all know, when sound waves propagate in an ideal medium, the wave number is k = w / c and the angular frequency is w = 2πf, where f is the sound wave frequency and c is the sound speed. The sound pressure p satisfies formula (1), is the Laplace operator.
[0056]
[0057] Assume that the space system outside the human ear is a sphere, the listener is at the center of the sphere, the sound coming from outside the sphere has a projection on the sphere, and the sound outside the sphere is filtered out. Assume that the sound source is distributed on this sphere, and the sound field generated by the sound source on the sphere is used to fit the sound field generated by the original sound source. That is, three-dimensional audio technology is a method of fitting the sound field. Specifically, solve the equation of formula (1) in the spherical coordinate system. In the passive spherical region, the solution of the equation of formula (1) is the following formula (2).
[0058]
[0059] Where r is the radius of the sphere, θ is the horizontal angle, represents the pitch angle, k represents the wave number, s represents the amplitude of the ideal plane wave, and m represents the order number of the three-dimensional audio signal (or the order number of the HOA signal). represents the spherical Bessel function, which is also called the radial basis function, where the first j represents the imaginary unit, Does not vary with angle. represents θ, Spherical harmonics of the direction, The spherical harmonics representing the direction of the sound source. The three-dimensional audio signal coefficients satisfy formula (3).
[0060]
[0061] Substituting formula (3) into formula (2), formula (2) can be transformed into formula (4).
[0062]
[0063] in, Represents the coefficients of a three-dimensional audio signal of order N, which is used to approximately describe the sound field. A sound field refers to an area in a medium where sound waves exist. N is an integer greater than or equal to 1. For example, the value range of N is an integer from 2 to 6. The coefficients of the three-dimensional audio signal described in the embodiments of the present application may refer to HOA coefficients or ambisonic coefficients.
[0064] A three-dimensional audio signal is an information carrier that carries the spatial position information of the sound source in the sound field, and describes the sound field of the listener in space. Formula (4) shows that the sound field can be expanded on a sphere according to spherical harmonics, that is, the sound field can be decomposed into the superposition of multiple plane waves. Therefore, the sound field described by the three-dimensional audio signal can be expressed by the superposition of multiple plane waves, and the sound field can be reconstructed by the three-dimensional audio signal coefficients.
[0065] Compared with 5.1-channel audio signals or 7.1-channel audio signals, since the N-order HOA signal has (N+1) 2If there are multiple channels, the HOA signal includes a large amount of data for describing the spatial information of the sound field. If the acquisition device (such as a microphone) transmits the three-dimensional audio signal to the playback device (such as a speaker), a large bandwidth is consumed. At present, the encoder can use spatial squeezed surround audio coding (S3AC) or directional audio coding (DirAC) to compress and encode the three-dimensional audio signal to obtain a code stream, and transmit the code stream to the playback device. The playback device decodes the code stream, reconstructs the three-dimensional audio signal, and plays the reconstructed three-dimensional audio signal. This reduces the amount of data transmitted to the playback device and the bandwidth occupied. However, the computational complexity of the encoder for compressing and encoding the three-dimensional audio signal is high, which occupies too many computing resources of the encoder. Therefore, how to reduce the computational complexity of compressing and encoding the three-dimensional audio signal is an urgent problem to be solved.
[0066] The embodiment of the present application provides an audio coding and decoding technology, in particular, provides a three-dimensional audio coding and decoding technology for three-dimensional audio signals, and specifically provides a coding and decoding technology that uses fewer channels to represent three-dimensional audio signals to improve traditional audio coding and decoding systems. Audio coding (or commonly referred to as coding) includes two parts: audio coding and audio decoding. Audio coding is performed on the source side, and generally includes processing (for example, compressing) the original audio to reduce the amount of data required to represent the original audio, so as to store and / or transmit it more efficiently. Audio decoding is performed on the destination side, and generally includes inverse processing relative to the encoder to reconstruct the original audio. The coding part and the decoding part are also collectively referred to as coding and decoding. The implementation method of the embodiment of the present application will be described in detail below in conjunction with the accompanying drawings.
[0067] Figure 1 The present invention is a structural diagram of an audio codec system provided in an embodiment of the present application. The audio codec system 100 includes a source device 110 and a destination device 120. The source device 110 is used to compress and encode a three-dimensional audio signal to obtain a code stream, and transmit the code stream to the destination device 120. The destination device 120 decodes the code stream, reconstructs the three-dimensional audio signal, and plays the reconstructed three-dimensional audio signal.
[0068] Specifically, the source device 110 includes an audio acquirer 111 , a preprocessor 112 , an encoder 113 , and a communication interface 114 .
[0069] The audio acquirer 111 is used to acquire original audio. The audio acquirer 111 can be any type of audio acquisition device for capturing real-world sounds, and / or any type of audio generation device. The audio acquirer 111 is, for example, a computer audio processor for generating computer audio. The audio acquirer 111 can also be any type of memory or storage for storing audio. The audio includes real-world sounds, virtual scene (such as VR or augmented reality (AR)) sounds, and / or any combination thereof.
[0070] The preprocessor 112 is used to receive the original audio collected by the audio acquirer 111 and preprocess the original audio to obtain a three-dimensional audio signal. For example, the preprocessing performed by the preprocessor 112 includes channel conversion, audio format conversion or noise removal.
[0071] The encoder 113 is used to receive the three-dimensional audio signal generated by the preprocessor 112, and compress and encode the three-dimensional audio signal to obtain a code stream. For example, the encoder 113 may include a spatial encoder 1131 and a core encoder 1132. The spatial encoder 1131 is used to select (or search) a virtual speaker from a candidate virtual speaker set according to the three-dimensional audio signal, and generate a virtual speaker signal according to the three-dimensional audio signal and the virtual speaker. The virtual speaker signal can also be called a playback signal. The core encoder 1132 is used to encode the virtual speaker signal to obtain a code stream.
[0072] The communication interface 114 is used to receive the code stream generated by the encoder 113, and send the code stream to the destination device 120 through the communication channel 130, so that the destination device 120 reconstructs the three-dimensional audio signal according to the code stream.
[0073] The destination device 120 includes a player 121 , a post-processor 122 , a decoder 123 , and a communication interface 124 .
[0074] The communication interface 124 is used to receive the code stream sent by the communication interface 114 and transmit the code stream to the decoder 123, so that the decoder 123 can reconstruct the three-dimensional audio signal according to the code stream.
[0075] The communication interface 114 and the communication interface 124 may be used to send or receive data related to the original audio through a direct communication link between the source device 110 and the destination device 120, such as a direct wired or wireless connection, or through any type of network, such as a wired network, a wireless network or any combination thereof, any type of private network and public network or any combination thereof.
[0076] Both the communication interface 114 and the communication interface 124 can be configured as follows: Figure 1The unidirectional communication interface or the bidirectional communication interface indicated by the arrow pointing from the source device 110 to the corresponding communication channel 130 of the destination device 120 can be used to send and receive messages, etc. to establish a connection, confirm and exchange any other information related to the communication link and / or data transmission such as encoded code stream transmission, etc.
[0077] The decoder 123 is used to decode the code stream and reconstruct the three-dimensional audio signal. For example, the decoder 123 includes a core decoder 1231 and a spatial decoder 1232. The core decoder 1231 is used to decode the code stream to obtain a virtual speaker signal. The spatial decoder 1232 is used to reconstruct the three-dimensional audio signal according to the candidate virtual speaker set and the virtual speaker signal to obtain a reconstructed three-dimensional audio signal.
[0078] The post-processor 122 is used to receive the reconstructed 3D audio signal generated by the decoder 123 and perform post-processing on the reconstructed 3D audio signal. For example, the post-processing performed by the post-processor 122 includes audio rendering, loudness normalization, user interaction, audio format conversion or noise removal.
[0079] The player 121 is used to play the reconstructed sound according to the reconstructed 3D audio signal.
[0080] It should be noted that the audio acquirer 111 and the encoder 113 may be integrated into one physical device or may be arranged on different physical devices, without limitation. Figure 1 The source device 110 shown includes an audio acquirer 111 and an encoder 113, indicating that the audio acquirer 111 and the encoder 113 are integrated into one physical device, and the source device 110 may also be referred to as a capture device. The source device 110 is, for example, a media gateway of a wireless access network, a media gateway of a core network, a transcoding device, a media resource server, an AR device, a VR device, a microphone, or other audio capture device. If the source device 110 does not include the audio acquirer 111, it means that the audio acquirer 111 and the encoder 113 are two different physical devices, and the source device 110 can obtain the original audio from other devices (such as an audio capture device or an audio storage device).
[0081] In addition, the player 121 and the decoder 123 may be integrated into one physical device, or may be arranged on different physical devices, without limitation. Figure 1The destination device 120 shown includes a player 121 and a decoder 123, which means that the player 121 and the decoder 123 are integrated into one physical device. The destination device 120 can also be called a playback device, and the destination device 120 has the function of decoding and playing the reconstructed audio. The destination device 120 is, for example, a speaker, a headset, or other device for playing audio. If the destination device 120 does not include the player 121, it means that the player 121 and the decoder 123 are two different physical devices. After the destination device 120 decodes the code stream to reconstruct the three-dimensional audio signal, it transmits the reconstructed three-dimensional audio signal to other playback devices (such as speakers or headphones), and the other playback devices play back the reconstructed three-dimensional audio signal.
[0082] also, Figure 1 It is shown that the source device 110 and the destination device 120 can be integrated into one physical device, or can be set on different physical devices, which is not limited.
[0083] For example, Figure 2 As shown in (a) in FIG. 1 , the source device 110 may be a microphone in a recording studio, and the destination device 120 may be a speaker. The source device 110 may collect original audio of various musical instruments, transmit the original audio to a codec device, and the codec device performs codec processing on the original audio to obtain a reconstructed 3D audio signal, which is then played back by the destination device 120. As another example, the source device 110 may be a microphone in a terminal device, and the destination device 120 may be a headset. The source device 110 may collect external sounds or audio synthesized by the terminal device.
[0084] For example, Figure 2 As shown in (b) in FIG. 1 , the source device 110 and the destination device 120 are integrated in a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, or an extended reality (XR) device, and the VR / AR / MR / XR device has the functions of collecting original audio, playing back audio, and encoding and decoding. The source device 110 can collect the sound emitted by the user and the sound emitted by the virtual objects in the virtual environment where the user is located.
[0085] In these embodiments, the source device 110 or its corresponding functions and the destination device 120 or its corresponding functions may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof. Figure 1 The existence and division of different units or functions in the source device 110 and / or the destination device 120 shown may vary according to actual devices and applications, which is obvious to those skilled in the art.
[0086] The structure of the above audio codec system is only a schematic illustration. In some possible implementations, the audio codec system may also include other devices, for example, the audio codec system may also include a terminal device or a cloud device. After the source device 110 collects the original audio, it pre-processes the original audio to obtain a three-dimensional audio signal; and transmits the three-dimensional audio to the terminal device or the cloud device, which implements the function of encoding and decoding the three-dimensional audio signal.
[0087] The audio signal encoding and decoding method provided in the embodiment of the present application is mainly applied to the encoding end. Figure 3 The structure of the encoder is described in detail. Figure 3 As shown, the encoder 300 includes a virtual speaker configuration unit 310 , a virtual speaker set generation unit 320 , an encoding analysis unit 330 , a virtual speaker selection unit 340 , a virtual speaker signal generation unit 350 and an encoding unit 360 .
[0088] The virtual speaker configuration unit 310 is used to generate virtual speaker configuration parameters according to the encoder configuration information so as to obtain multiple virtual speakers. The encoder configuration information includes but is not limited to: the order of the three-dimensional audio signal (or commonly referred to as the HOA order), the encoding bit rate, user-defined information, etc. The virtual speaker configuration parameters include but are not limited to: the number of virtual speakers, the order of virtual speakers, the position coordinates of virtual speakers, etc. The number of virtual speakers is, for example, 2048, 1669, 1343, 1024, 530, 512, 256, 128 or 64. The order of the virtual speaker can be any one of the 2nd to 6th order. The position coordinates of the virtual speaker include the horizontal angle and the pitch angle.
[0089] The virtual speaker configuration parameters output by the virtual speaker configuration unit 310 serve as input to the virtual speaker set generation unit 320 .
[0090] The virtual speaker set generation unit 320 is used to generate a candidate virtual speaker set according to the virtual speaker configuration parameters, and the candidate virtual speaker set includes multiple virtual speakers. Specifically, the virtual speaker set generation unit 320 determines the multiple virtual speakers included in the candidate virtual speaker set according to the number of virtual speakers, and determines the coefficients of the virtual speakers according to the position information (such as coordinates) of the virtual speakers and the order of the virtual speakers. For example, the method for determining the coordinates of the virtual speakers includes but is not limited to: generating multiple virtual speakers according to the equidistant rule, or generating multiple virtual speakers with non-uniform distribution according to the principle of auditory perception; then, generating the coordinates of the virtual speakers according to the number of virtual speakers.
[0091] According to the above principle of generating three-dimensional audio signals, the coefficients of virtual speakers can also be generated. s and are respectively set as the position coordinates of the virtual speakers, Represents the coefficient of a virtual speaker of order N. The coefficient of a virtual speaker can also be called an ambisonics coefficient.
[0092] The coding analysis unit 330 is used to perform coding analysis on the 3D audio signal, for example, analyzing the sound field distribution characteristics of the 3D audio signal, that is, the number of sound sources, the directionality of the sound sources, and the dispersion of the sound sources of the 3D audio signal.
[0093] The coefficients of the plurality of virtual speakers included in the candidate virtual speaker set output by the virtual speaker set generation unit 320 serve as input to the virtual speaker selection unit 340 .
[0094] The sound field distribution feature of the three-dimensional audio signal output by the encoding analysis unit 330 is used as an input of the virtual speaker selection unit 340 .
[0095] The virtual speaker selection unit 340 is used to determine a representative virtual speaker matching the three-dimensional audio signal according to the three-dimensional audio signal to be encoded, the sound field distribution characteristics of the three-dimensional audio signal, and the coefficients of multiple virtual speakers.
[0096] It is not limited that the encoder 300 of the embodiment of the present application may not include the encoding analysis unit 330, that is, the encoder 300 may not analyze the input signal, and the virtual speaker selection unit 340 uses a default configuration to determine the representative virtual speaker. For example, the virtual speaker selection unit 340 determines the representative virtual speaker matching the three-dimensional audio signal only based on the three-dimensional audio signal and the coefficients of the multiple virtual speakers.
[0097] The encoder 300 may use a 3D audio signal obtained from a capture device or a 3D audio signal synthesized using an artificial audio object as input to the encoder 300. In addition, the 3D audio signal input to the encoder 300 may be a time domain 3D audio signal or a frequency domain 3D audio signal, which is not limited.
[0098] The position information representing the virtual speaker and the coefficient representing the virtual speaker output by the virtual speaker selection unit 340 are input to the virtual speaker signal generation unit 350 and the encoding unit 360 .
[0099] The virtual speaker signal generating unit 350 is used to generate a virtual speaker signal according to the three-dimensional audio signal and the attribute information representing the virtual speaker. The attribute information representing the virtual speaker includes at least one of the position information representing the virtual speaker, the coefficient representing the virtual speaker, and the coefficient of the three-dimensional audio signal. If the attribute information is the position information representing the virtual speaker, the coefficient representing the virtual speaker is determined according to the position information representing the virtual speaker; if the attribute information includes the coefficient of the three-dimensional audio signal, the coefficient representing the virtual speaker is obtained according to the coefficient of the three-dimensional audio signal. Specifically, the virtual speaker signal generating unit 350 calculates the virtual speaker signal according to the coefficient of the three-dimensional audio signal and the coefficient representing the virtual speaker.
[0100] For example, it is assumed that matrix A represents the coefficients of the virtual speaker and matrix X represents the coefficients of the HOA signal. Matrix X is the inverse matrix of matrix A. The theoretical optimal solution w is obtained by the least square method, where w represents the virtual speaker signal. The virtual speaker signal satisfies formula (5).
[0101] w=A -1 X formula (5)
[0102] Among them, A -1 represents the inverse matrix of matrix A. The size of matrix A is (M×C), C represents the number of virtual speakers, M represents the number of channels of the N-order HOA signal, a represents the coefficient representing the virtual speaker, and the size of matrix X is (M×L), L represents the number of coefficients of the HOA signal, and x represents the coefficient of the HOA signal. The coefficient representing the virtual speaker may refer to the HOA coefficient representing the virtual speaker or the ambisonics coefficient representing the virtual speaker. For example,
[0103] The virtual speaker signal output by the virtual speaker signal generating unit 350 is input to the encoding unit 360 .
[0104] The encoding unit 360 is used to perform core encoding processing on the virtual speaker signal to obtain a bit stream. The core encoding processing includes but is not limited to: transformation, quantization, psychoacoustic model, noise shaping, bandwidth extension, downmixing, arithmetic coding, bit stream generation, etc.
[0105] It is worth noting that the spatial encoder 1131 may include a virtual speaker configuration unit 310, a virtual speaker set generation unit 320, a coding analysis unit 330, a virtual speaker selection unit 340, and a virtual speaker signal generation unit 350, that is, the virtual speaker configuration unit 310, the virtual speaker set generation unit 320, the coding analysis unit 330, the virtual speaker selection unit 340, and the virtual speaker signal generation unit 350 implement the function of the spatial encoder 1131. The core encoder 1132 may include an encoding unit 360, that is, the encoding unit 360 implements the function of the core encoder 1132.
[0106] Figure 3 The encoder shown can generate one virtual speaker signal or multiple virtual speaker signals. Multiple virtual speaker signals can be generated by Figure 3 The encoder shown is executed multiple times, or it can be obtained by Figure 3 The encoder shown is obtained by one execution.
[0107] Next, the encoding and decoding process of the three-dimensional audio signal is described with reference to the accompanying drawings. Figure 4 A schematic diagram of a flow chart of a three-dimensional audio signal encoding and decoding method provided in an embodiment of the present application. Figure 1 The source device 110 and the destination device 120 perform a three-dimensional audio signal encoding and decoding process as an example for explanation. Figure 4 As shown, the method includes the following steps.
[0108] S410: The source device 110 obtains a current frame of a 3D audio signal.
[0109] As described in the above embodiment, if the source device 110 carries the audio acquirer 111, the source device 110 can collect the original audio through the audio acquirer 111. Optionally, the source device 110 can also receive the original audio collected by other devices; or obtain the original audio from the memory or other memory in the source device 110. The original audio may include at least one of the real-world sound collected in real time, the audio stored in the device, and the audio synthesized from multiple audios. This embodiment does not limit the method for obtaining the original audio and the type of the original audio.
[0110] After the source device 110 obtains the original audio, it generates a three-dimensional audio signal based on the three-dimensional audio technology and the original audio, so as to provide the listener with an "immersive" sound effect when the original audio is played back. The specific method of generating the three-dimensional audio signal can refer to the description of the preprocessor 112 in the above embodiment and the description of the prior art.
[0111] In addition, the audio signal is a continuous analog signal. In the process of audio signal processing, the audio signal can be sampled first to generate a digital signal of a frame sequence. A frame can include multiple sampling points. A frame can also refer to a sampling point obtained by sampling. A frame can also include a subframe obtained by dividing a frame. A frame can also refer to a subframe obtained by dividing a frame. For example, a frame length is L sampling points, which is divided into N subframes, then each subframe corresponds to L / N sampling points. Audio encoding and decoding usually refers to processing an audio frame sequence containing multiple sampling points.
[0112] The audio frame may include a current frame or a previous frame. The current frame or previous frame described in various embodiments of the present application may refer to a frame or a subframe. The current frame refers to a frame that is being coded and decoded at the current moment. The previous frame refers to a frame that has been coded and decoded at a moment before the current moment. The previous frame may be a frame at a moment before the current moment or at multiple moments before the current moment. In an embodiment of the present application, the current frame of a three-dimensional audio signal refers to a frame of a three-dimensional audio signal that is being coded and decoded at the current moment. The previous frame refers to a frame of a three-dimensional audio signal that has been coded and decoded at a moment before the current moment. The current frame of a three-dimensional audio signal may refer to a current frame to be encoded of a three-dimensional audio signal. The current frame of a three-dimensional audio signal may be referred to as a current frame. The previous frame of a three-dimensional audio signal may be referred to as a previous frame.
[0113] S420 : The source device 110 determines a candidate virtual speaker set.
[0114] In one case, a candidate virtual speaker set is pre-configured in the memory of the source device 110. The source device 110 can read the candidate virtual speaker set from the memory. The candidate virtual speaker set includes a plurality of virtual speakers. The virtual speaker represents a speaker that exists virtually in the spatial sound field. The virtual speaker is used to calculate a virtual speaker signal based on the three-dimensional audio signal so that the destination device 120 can play back the reconstructed three-dimensional audio signal.
[0115] In another case, virtual speaker configuration parameters are pre-configured in the memory of the source device 110. The source device 110 generates a candidate virtual speaker set according to the virtual speaker configuration parameters. Optionally, the source device 110 generates a candidate virtual speaker set in real time according to its own computing resources (such as processor) capabilities and the characteristics of the current frame (such as channels and data volume).
[0116] The specific method for generating a candidate virtual speaker set may refer to the prior art, as well as the description of the virtual speaker configuration unit 310 and the virtual speaker set generation unit 320 in the above embodiments.
[0117] S430 : The source device 110 selects a representative virtual speaker of the current frame from the candidate virtual speaker set according to the current frame of the three-dimensional audio signal.
[0118] The source device 110 votes for the virtual speaker according to the coefficients of the current frame and the coefficients of the virtual speaker, and selects a representative virtual speaker of the current frame from the candidate virtual speaker set according to the voting value of the virtual speaker. A limited number of representative virtual speakers of the current frame are searched from the candidate virtual speaker set as the best matching virtual speakers of the current frame to be encoded, thereby achieving the purpose of data compression of the three-dimensional audio signal to be encoded.
[0119] Figure 5 A flowchart of a method for selecting a virtual speaker provided in an embodiment of the present application. Figure 5 The method flow described is Figure 4 The specific operation process included in S430 is described here. Figure 1 The encoder 113 in the source device 110 shown in the figure performs the process of selecting a virtual speaker as an example. Specifically, the function of the virtual speaker selection unit 340 is implemented. Figure 5 As shown, the method includes the following steps.
[0120] S510 , the encoder 113 obtains representative coefficients of the current frame.
[0121] The representative coefficient may refer to the frequency domain representative coefficient or the time domain representative coefficient. The frequency domain representative coefficient may also be called the frequency domain representative frequency point or the spectrum representative coefficient. The time domain representative coefficient may also be called the time domain representative sampling point. The specific method for obtaining the representative coefficient of the current frame can refer to the following Figure 7 Description of the S6101.
[0122] S520: The encoder 113 selects a representative virtual speaker for the current frame from the candidate virtual speaker set according to the voting values of the virtual speakers in the candidate virtual speaker set by the representative coefficients of the current frame. Execute S440 to S460.
[0123] The encoder 113 votes for the virtual speakers in the candidate virtual speaker set according to the representative coefficients of the current frame and the coefficients of the virtual speakers, and selects (searches) the representative virtual speaker of the current frame from the candidate virtual speaker set according to the final voting value of the virtual speaker in the current frame. The specific method of selecting the representative virtual speaker of the current frame can be referred to as follows Figure 6 and Figure 7 The description of S610 to S620.
[0124] It should be noted that the encoder first traverses the virtual speakers included in the candidate virtual speaker set, and compresses the current frame using the representative virtual speakers of the current frame selected from the candidate virtual speaker set. However, if the results of the virtual speakers selected in consecutive frames are very different, the sound image of the reconstructed three-dimensional audio signal will be unstable, and the sound quality of the reconstructed three-dimensional audio signal will be reduced. In an embodiment of the present application, the encoder 113 can update the initial voting value of the current frame of the virtual speakers included in the candidate virtual speaker set according to the final voting value of the previous frame of the representative virtual speaker of the previous frame, and obtain the final voting value of the current frame of the virtual speaker, and then select the representative virtual speaker of the current frame from the candidate virtual speaker set according to the final voting value of the current frame of the virtual speaker. Thus, by referring to the representative virtual speaker of the previous frame to select the representative virtual speaker of the current frame, the encoder tends to select the same virtual speaker as the representative virtual speaker of the previous frame when selecting the representative virtual speaker of the current frame, thereby increasing the continuity of the orientation between consecutive frames and overcoming the problem that the results of the virtual speakers selected in consecutive frames are very different. Therefore, an embodiment of the present application may also include S530.
[0125] S530 , the encoder 113 adjusts the current frame initial voting value of the virtual speaker in the candidate virtual speaker set according to the previous frame final voting value of the representative virtual speaker in the previous frame to obtain the current frame final voting value of the virtual speaker.
[0126] The encoder 113 votes for the virtual speakers in the candidate virtual speaker set according to the representative coefficients of the current frame and the coefficients of the virtual speakers. After obtaining the initial voting value of the virtual speakers in the current frame, the encoder 113 adjusts the initial voting value of the virtual speakers in the candidate virtual speaker set in the current frame according to the final voting value of the representative virtual speakers in the previous frame in the previous frame to obtain the final voting value of the virtual speakers in the current frame. The representative virtual speakers in the previous frame are the virtual speakers used by the encoder 113 when encoding the previous frame. The specific method of adjusting the initial voting value of the virtual speakers in the candidate virtual speaker set in the current frame can be referred to as follows Figure 8 Description of S6201 to S6202.
[0127] In some embodiments, if the current frame is the first frame in the original audio, the encoder 113 executes S510 to S520. If the current frame is any frame above the second frame in the original audio, the encoder 113 can first determine whether to reuse the representative virtual speaker of the previous frame to encode the current frame or determine whether to perform a virtual speaker search to ensure the continuity of the orientation between consecutive frames and reduce the encoding complexity. The embodiment of the present application may also include S540.
[0128] S540: The encoder 113 determines whether to perform a virtual speaker search based on the representative virtual speaker of the previous frame and the current frame.
[0129] If the encoder 113 determines to perform a virtual speaker search, S510 to S530 are executed. Optionally, the encoder 113 may first execute S510, that is, the encoder 113 obtains the representative coefficients of the current frame, and the encoder 113 determines whether to perform a virtual speaker search based on the representative coefficients of the current frame and the coefficients of the representative virtual speakers of the previous frame. If the encoder 113 determines to perform a virtual speaker search, S520 to S530 are executed.
[0130] If the encoder 113 determines not to perform a virtual speaker search, S550 is executed.
[0131] S550 : The encoder 113 determines to reuse the representative virtual speaker of the previous frame to encode the current frame.
[0132] The encoder 113 multiplexes the representative virtual speaker of the previous frame and the current frame to generate a virtual speaker signal, encodes the virtual speaker signal to obtain a code stream, and sends the code stream to the destination device 120, that is, executing S450 and S460.
[0133] The specific method for determining whether to perform a virtual speaker search can refer to the following Fig. 9 Elaboration of S640 to S670.
[0134] S440: The source device 110 generates a virtual speaker signal according to the current frame of the 3D audio signal and the representative virtual speaker of the current frame.
[0135] The source device 110 generates a virtual speaker signal according to the coefficients of the current frame and the coefficients representing the virtual speakers of the current frame. The specific method of generating the virtual speaker signal can refer to the prior art and the description of the virtual speaker signal generating unit 350 in the above embodiment.
[0136] S450 : The source device 110 encodes the virtual speaker signal to obtain a bit stream.
[0137] The source device 110 can perform encoding operations such as transformation or quantization on the virtual speaker signal to generate a bitstream, thereby achieving the purpose of data compression of the 3D audio signal to be encoded. The specific method of generating the bitstream can refer to the prior art and the description of the encoding unit 360 in the above embodiment.
[0138] S460 : The source device 110 sends a code stream to the destination device 120 .
[0139] After the source device 110 has completely encoded the original audio, it can send the code stream of the original audio to the destination device 120. Alternatively, the source device 110 can also encode the three-dimensional audio signal in real time in units of frames, and send the code stream of one frame after encoding one frame. The specific method of sending the code stream can refer to the prior art and the description of the communication interface 114 and the communication interface 124 in the above embodiment.
[0140] S470: The destination device 120 decodes the code stream sent by the source device 110, reconstructs the 3D audio signal, and obtains a reconstructed 3D audio signal.
[0141] After receiving the code stream, the destination device 120 decodes the code stream to obtain a virtual speaker signal, and then reconstructs the three-dimensional audio signal according to the candidate virtual speaker set and the virtual speaker signal to obtain a reconstructed three-dimensional audio signal. The destination device 120 plays back the reconstructed three-dimensional audio signal. Alternatively, the destination device 120 transmits the reconstructed three-dimensional audio signal to other playback devices, which play the reconstructed three-dimensional audio signal, so that the listener's "immersive" sound effect in a theater, concert hall, virtual scene, etc. is more realistic.
[0142] At present, in the process of searching for virtual speakers, the encoder uses the result of the correlation calculation between the three-dimensional audio signal to be encoded and the virtual speaker as a selection criterion for the virtual speaker. If the encoder transmits a virtual speaker for each coefficient, the purpose of data compression cannot be achieved, and a heavy computational burden will be imposed on the encoder. An embodiment of the present application provides a method for selecting a virtual speaker, in which the encoder uses the representative coefficient of the current frame to vote for each virtual speaker in the candidate virtual speaker set, and selects the representative virtual speaker of the current frame according to the voting value, thereby reducing the computational complexity of the virtual speaker search and alleviating the computational burden of the encoder.
[0143] Next, the process of selecting a virtual speaker is described in detail with reference to the accompanying drawings. Figure 6 A schematic diagram of a flow chart of a three-dimensional audio signal encoding method provided in an embodiment of the present application. Figure 1 The following description is given by taking the process of selecting a virtual speaker performed by the encoder 113 in the source device 110 as an example. Figure 6 The method flow described is Figure 5 The specific operation process included in S520 is described. Figure 6 As shown, the method includes the following steps.
[0144] S610: The encoder 113 determines a first number of virtual speakers and a first number of voting values according to a current frame of the 3D audio signal, a candidate virtual speaker set, and a number of voting rounds.
[0145] The number of voting rounds is used to limit the number of times the virtual speaker is voted. The number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the number of virtual speakers included in the candidate virtual speaker set, and the number of voting rounds is less than or equal to the number of virtual speaker signals transmitted by the encoder. For example, the candidate virtual speaker set includes a fifth number of virtual speakers, the fifth number of virtual speakers includes a first number of virtual speakers, the first number is less than or equal to the fifth number, the number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number. The virtual speaker signal also refers to the transmission channel representing the virtual speaker of the current frame corresponding to the current frame. Normally, the number of virtual speaker signals is less than or equal to the number of virtual speakers.
[0146] In a possible implementation, the number of voting rounds may be preconfigured or determined based on the computing capability of the encoder. For example, the number of voting rounds is determined based on the encoding rate and / or encoding application scenario at which the encoder encodes the current frame.
[0147] For example, if the encoding rate of the encoder is low (such as the 3rd order HOA signal is encoded and transmitted at a rate less than or equal to 128 kbps), the number of voting rounds is 1. If the encoding rate of the encoder is medium (such as the 3rd order HOA signal is encoded and transmitted at a rate of 192 kbps to 512 kbps), the number of voting rounds is 4. If the encoding rate of the encoder is high (such as the 3rd order HOA signal is encoded and transmitted at a rate greater than or equal to 768 kbps), the number of voting rounds is 7.
[0148] For example, if the encoder is used for real-time communication, the encoding complexity is required to be low, and the number of voting rounds is 1. If the encoder is used for broadcast streaming media, the encoding complexity is required to be medium, and the number of voting rounds is 2. If the encoder is used for high-quality data storage, the encoding complexity is required to be high, and the number of voting rounds is 6.
[0149] For another example, if the encoding rate of the encoder is 128 kbps and the encoding complexity requirement is low, the number of voting rounds is 1.
[0150] In another possible implementation, the number of voting rounds is determined according to the number of directional sound sources in the current frame. For example, when the number of directional sound sources in the sound field is 2, the number of voting rounds is set to 2.
[0151] The embodiment of the present application provides three possible implementation methods for determining the first number of virtual speakers and the first number of voting values. The three methods are described in detail below.
[0152] In a first possible implementation, the number of voting rounds is equal to 1. After the encoder 113 samples multiple representative coefficients, it obtains the voting value of each representative coefficient of the current frame for all virtual speakers in the candidate virtual speaker set, and accumulates the voting values of virtual speakers with the same number to obtain a first number of virtual speakers and a first number of voting values. For example, referring to the following Figure 7 Elaboration of S6101 to S6105.
[0153] It is understandable that the candidate virtual speaker set includes a first number of virtual speakers. The first number of virtual speakers is equal to the number of virtual speakers included in the candidate virtual speaker set. Assuming that the candidate virtual speaker set includes a fifth number of virtual speakers, the first number is equal to the fifth number. The first number of voting values include the voting values of all virtual speakers in the candidate virtual speaker set. The encoder 113 can use the first number of voting values as the final voting values of the current frame of the first number of virtual speakers, and execute S620, that is, the encoder 113 selects the second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values.
[0154] Among them, the virtual speakers correspond to the voting values one by one, that is, one virtual speaker corresponds to one voting value. For example, the first number of virtual speakers includes the first virtual speaker, the first number of voting values includes the voting value of the first virtual speaker, and the first virtual speaker corresponds to the voting value of the first virtual speaker. The voting value of the first virtual speaker is used to characterize the priority of using the first virtual speaker when encoding the current frame. The priority can also be replaced by the tendency, that is, the voting value of the first virtual speaker is used to characterize the tendency to use the first virtual speaker when encoding the current frame. It can be understood that the larger the voting value of the first virtual speaker, the higher the priority or tendency of the first virtual speaker, and relative to the virtual speaker with a smaller voting value than the first virtual speaker in the candidate virtual speaker set, the encoder 113 is more inclined to select the first virtual speaker to encode the current frame.
[0155] In a second possible implementation, the difference from the first possible implementation is that after the encoder 113 obtains the voting values of each representative coefficient of the current frame for all virtual speakers in the candidate virtual speaker set, it selects part of the voting values from the voting values of each representative coefficient for all virtual speakers in the candidate virtual speaker set, and accumulates the voting values of virtual speakers with the same number in the virtual speakers corresponding to the part of the voting values to obtain a first number of virtual speakers and a first number of voting values. It is understandable that the first number is less than or equal to the number of virtual speakers included in the candidate virtual speaker set. The first number of voting values includes the voting values of some virtual speakers included in the candidate virtual speaker set, or the first number of voting values includes the voting values of all virtual speakers included in the candidate virtual speaker set. For example, refer to the following Figure 7 The description of S6101 to S6104, and S6106 to S6110.
[0156] In a third possible implementation manner, the difference from the second possible implementation manner is that the number of voting rounds is an integer greater than or equal to 2, and for each representative coefficient of the current frame, the encoder 113 performs at least two rounds of voting on all virtual speakers in the candidate virtual speaker set, and selects a virtual speaker with a maximum voting value in each round. After performing at least two rounds of voting on all virtual speakers for each representative coefficient of the current frame, the voting values of the virtual speakers with the same number are accumulated to obtain a first number of virtual speakers and a first number of voting values.
[0157] Assuming that the number of voting rounds is 2, the fifth number of virtual speakers includes a first virtual speaker, a second virtual speaker, and a third virtual speaker. The representative coefficient of the current frame includes a first representative coefficient and a second representative coefficient.
[0158] The encoder 113 first performs two rounds of voting on the three virtual speakers according to the first representative coefficient. In the first voting round, the encoder 113 votes on the three virtual speakers according to the first representative coefficient, and assuming that the maximum voting value is the voting value of the first virtual speaker, the first virtual speaker is selected. In the second voting round, the encoder 113 votes on the second virtual speaker and the third virtual speaker respectively according to the first representative coefficient, and assuming that the maximum voting value is the voting value of the second virtual speaker, the second virtual speaker is selected.
[0159] Furthermore, the encoder 113 performs two rounds of voting on the three virtual speakers according to the second representative coefficients. In the first voting round, the encoder 113 votes on the three virtual speakers according to the second representative coefficients, and assuming that the maximum voting value is the voting value of the second virtual speaker, the second virtual speaker is selected. In the second voting round, the encoder 113 votes on the first virtual speaker and the third virtual speaker respectively according to the second representative coefficients, and assuming that the maximum voting value is the voting value of the third virtual speaker, the third virtual speaker is selected.
[0160] Finally, the first number of virtual speakers includes a first virtual speaker, a second virtual speaker, and a third virtual speaker. The voting value of the first virtual speaker is equal to the voting value of the first virtual speaker of the first representative coefficient in the first voting round. The voting value of the second virtual speaker is equal to the sum of the voting value of the second virtual speaker of the first representative coefficient in the second voting round and the voting value of the second virtual speaker of the second representative coefficient in the first voting round. The voting value of the third virtual speaker is equal to the voting value of the third virtual speaker of the second representative coefficient in the second voting round.
[0161] S620: The encoder 113 selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values.
[0162] The encoder 113 selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, and the voting values of the second number of representative virtual speakers of the current frame are greater than a preset threshold.
[0163] The encoder 113 may also select a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values. For example, the second number of voting values may be determined from the first number of voting values in descending order of the first number of voting values, and the virtual speakers corresponding to the second number of voting values from the first number of virtual speakers may be used as the representative virtual speakers of the second number of current frames.
[0164] Optionally, if the voting values of virtual speakers with different numbers in the first number of virtual speakers are the same and the voting values of the virtual speakers with different numbers are greater than a preset threshold, the encoder 113 may use the virtual speakers with different numbers as representative virtual speakers of the current frame.
[0165] It should be noted that the second number is less than the first number. The first number of virtual speakers includes a second number of representative virtual speakers of the current frame. The second number may be preset, or the second number may be determined based on the number of sound sources in the sound field of the current frame. For example, the second number may be directly equal to the number of sound sources in the sound field of the current frame, or the number of sound sources in the sound field of the current frame may be processed according to a preset algorithm, and the number obtained by the processing may be used as the second number; wherein the preset algorithm may be designed as needed, for example, the preset algorithm may be: the second number = the number of sound sources in the sound field of the current frame + 1, or the second number = the number of sound sources in the sound field of the current frame - 1, and so on.
[0166] S630: The encoder 113 encodes the current frame according to the second number of representative virtual speakers of the current frame to obtain a code stream.
[0167] The encoder 113 generates a virtual speaker signal according to the second number of representative virtual speakers of the current frames and the current frame; and encodes the virtual speaker signal to obtain a bit stream.
[0168] Since the encoder selects some coefficients from all the coefficients of the current frame as representative coefficients, and uses a smaller number of representative coefficients to replace all the coefficients of the current frame to select representative virtual speakers from the candidate virtual speaker set, the computational complexity of the encoder searching for virtual speakers is effectively reduced, thereby reducing the computational complexity of compressing and encoding three-dimensional audio signals and alleviating the computational burden of the encoder. For example, a frame of N-order HOA signal has 960·(N+1) 2 coefficients, this embodiment can select the first 10% of the coefficients to participate in the virtual speaker search. In this case, the encoding complexity is reduced by 90% compared with the encoding complexity of all coefficients participating in the virtual speaker search.
[0169] Figure 7 A flowchart of another method for selecting a virtual speaker provided in an embodiment of the present application. Figure 7 The method flow described is Figure 6 The specific operation process included in S610 is described in detail. Assume that the candidate virtual speaker set includes a fifth number of virtual speakers, and the fifth number of virtual speakers includes the first virtual speaker.
[0170] S6101. The encoder 113 obtains a fourth number of coefficients of the current frame and frequency domain eigenvalues of the fourth number of coefficients.
[0171] Assuming that the three-dimensional audio signal is an HOA signal, the encoder 113 may sample the current frame of the HOA signal to obtain L·(N+1) 2sampling points, that is, the fourth number of coefficients is obtained. N represents the order of the HOA signal. For example, assuming that the duration of the current frame of the HOA signal is 20 milliseconds, the encoder 113 samples the current frame according to the 48KHz frequency, and obtains 960·(N+1) in the time domain 2 Sampling points. Sampling points can also be called time domain coefficients.
[0172] The frequency domain coefficients of the current frame of the three-dimensional audio signal can be obtained by performing time-frequency conversion based on the time domain coefficients of the current frame of the three-dimensional audio signal. The method of converting the time domain to the frequency domain is not limited. The method of converting the time domain to the frequency domain is, for example, a modified discrete cosine transform (MDCT), which can obtain 960·(N+1) in the frequency domain. 2 Frequency domain coefficients. Frequency domain coefficients can also be called spectrum coefficients or frequency points.
[0173] The frequency domain eigenvalues of the sampling points satisfy p(j)=norm(x(j)), where j=1,2…L, L represents the number of sampling moments, x represents the frequency domain coefficients of the current frame of the three-dimensional audio signal, such as MDCT coefficients, and norm is the operation of obtaining the second norm; x(j) represents the (N+1) at the jth sampling moment. 2 The frequency domain coefficients of the sampling points.
[0174] S6102. The encoder 113 selects a third number of representative coefficients from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients.
[0175] The encoder 113 divides the frequency spectrum range indicated by the fourth number of coefficients into at least one sub-band. The encoder 113 divides the frequency spectrum range indicated by the fourth number of coefficients into one sub-band. It can be understood that the frequency spectrum range of the one sub-band is equal to the frequency spectrum range indicated by the fourth number of coefficients, which is equivalent to the encoder 113 not dividing the frequency spectrum range indicated by the fourth number of coefficients.
[0176] If the encoder 113 divides the spectral range indicated by the fourth number of coefficients into at least two frequency band sub-bands, in one case, the encoder 113 equally divides the spectral range indicated by the fourth number of coefficients into at least two sub-bands, and each of the at least two sub-bands contains the same number of coefficients.
[0177] In another case, the encoder 113 divides the spectrum range indicated by the fourth number of coefficients unequally, and the number of coefficients contained in the at least two sub-bands obtained by the division is different, or the number of coefficients contained in each of the at least two sub-bands obtained by the division is different. For example, the encoder 113 can divide the spectrum range indicated by the fourth number of coefficients unequally according to the low frequency range, the medium frequency range and the high frequency range in the spectrum range indicated by the fourth number of coefficients, so that each spectrum range in the low frequency range, the medium frequency range and the high frequency range includes at least one sub-band. Each sub-band in at least one sub-band in the low frequency range contains the same number of coefficients. Each sub-band in at least one sub-band in the medium frequency range contains the same number of coefficients. Each sub-band in at least one sub-band in the high frequency range contains the same number of coefficients. The sub-bands in the three spectrum ranges of the low frequency range, the medium frequency range and the high frequency range may contain different numbers of coefficients.
[0178] Further, the encoder 113 selects representative coefficients from at least one subband included in the spectrum range indicated by the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients to obtain a third number of representative coefficients. The third number is less than the fourth number, and the fourth number of coefficients includes the third number of representative coefficients.
[0179] For example, the encoder 113 selects Z representative coefficients from each subband according to the descending order of the frequency domain characteristic values of the coefficients in at least one subband contained in the spectrum range indicated by the fourth number of coefficients, and combines the Z representative coefficients in at least one subband to obtain a third number of representative coefficients, where Z is a positive integer.
[0180] For another example, when at least one subband includes at least two subbands, the encoder 113 determines the weight of each subband according to the frequency domain feature value of the first candidate coefficient in each subband of the at least two subbands; and adjusts the frequency domain feature value of the second candidate coefficient in each subband according to the weight of each subband, to obtain the adjusted frequency domain feature value of the second candidate coefficient in each subband, and the first candidate coefficient and the second candidate coefficient are partial coefficients in the subband. The encoder 113 determines the third number of representative coefficients according to the adjusted frequency domain feature value of the second candidate coefficient in the at least two subbands and the frequency domain feature value of the coefficients other than the second candidate coefficient in the at least two subbands.
[0181] Since the encoder selects part of the coefficients from all the coefficients of the current frame as representative coefficients and uses a smaller number of representative coefficients to replace all the coefficients of the current frame to select representative virtual speakers from the candidate virtual speaker set, the computational complexity of the encoder's search for virtual speakers is effectively reduced, thereby reducing the computational complexity of compressing and encoding three-dimensional audio signals and alleviating the computational burden of the encoder.
[0182] Assuming that the third number of representative coefficients includes the first representative coefficient and the second representative coefficient, S6103 to S6110 are performed.
[0183] S6103 , the encoder 113 obtains a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficients after a number of voting rounds.
[0184] The encoder 113 represents the current frame with the first representative coefficient, uses the fifth number of virtual speakers to vote for encoding the current frame, and determines the fifth number of first voting values according to the coefficients of the fifth number of virtual speakers and the first representative coefficient. The fifth number of first voting values includes the first voting value of the first virtual speaker.
[0185] S6104 , the encoder 113 obtains a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficients after a number of voting rounds.
[0186] The encoder 113 represents the current frame with the second representative coefficient, uses the fifth number of virtual speakers to vote for encoding the current frame, and determines the fifth number of second voting values according to the coefficients of the fifth number of virtual speakers and the second representative coefficient. The fifth number of second voting values includes the second voting value of the first virtual speaker.
[0187] S6105. The encoder 113 obtains voting values of the fifth number of virtual speakers based on the fifth number of first voting values and the fifth number of second voting values, to obtain the first number of virtual speakers and the first number of voting values.
[0188] For the virtual speakers with the same number among the fifth number of virtual speakers, the encoder 113 accumulates the first voting value and the second voting value of the virtual speakers. The voting value of the first virtual speaker is equal to the sum of the first voting value of the first virtual speaker and the second voting value of the first virtual speaker. For example, the first voting value of the first virtual speaker is 10, the second voting value of the first virtual speaker is 15, and the voting value of the first virtual speaker is 25.
[0189] It is understandable that the fifth number is equal to the first number, and the first number of virtual speakers obtained after the encoder 113 votes is the fifth number of virtual speakers. The first number of voting values is the voting value of the fifth number of virtual speakers.
[0190] Thus, the encoder votes for the fifth number of virtual speakers included in the candidate virtual speaker set for each coefficient of the current frame, and uses the voting values of the fifth number of virtual speakers included in the candidate virtual speaker set as the basis for selection, comprehensively covering the fifth number of virtual speakers, and ensuring the accuracy of the representative virtual speakers selected by the encoder for the current frame.
[0191] In some other embodiments, the encoder may determine the first number of virtual speakers and the first number of voting values based on the voting values of some virtual speakers in the candidate virtual speaker set. After S6103 and S6104, the embodiment of the present application may further include S6106 to S6110.
[0192] S6106. The encoder 113 selects an eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values.
[0193] The encoder 113 sorts the fifth number of first voting values, and selects an eighth number of virtual speakers from the fifth number of virtual speakers according to the order of the fifth number of first voting values from large to small, starting from the largest first voting value. The eighth number is less than the fifth number. The fifth number of first voting values includes the eighth number of first voting values. The eighth number is an integer greater than or equal to 1.
[0194] S6107 . The encoder 113 selects a ninth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of second voting values.
[0195] The encoder 113 sorts the fifth number of second voting values, and selects a ninth number of virtual speakers from the fifth number of virtual speakers according to the order of the fifth number of second voting values from large to small, starting from the largest second voting value. The ninth number is less than the fifth number. The fifth number of second voting values includes the ninth number of second voting values. The ninth number is an integer greater than or equal to 1.
[0196] S6108: The encoder 113 obtains a tenth number of third voting values of the tenth number of virtual speakers based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers.
[0197] If there is a virtual speaker with the same number in the eighth number of virtual speakers and the ninth number of virtual speakers, the encoder 113 accumulates the first voting value and the second voting value of the same virtual speaker to obtain the tenth third voting value of the tenth number of virtual speakers. For example, assuming that the eighth number of virtual speakers includes the second virtual speaker and the ninth number of virtual speakers includes the second virtual speaker, the third voting value of the second virtual speaker is equal to the sum of the first voting value of the first virtual speaker and the second voting value of the first virtual speaker.
[0198] It is understandable that the tenth number is less than or equal to the eighth number, indicating that the eighth number of virtual speakers includes the tenth number of virtual speakers, and the tenth number is less than or equal to the ninth number, indicating that the ninth number of virtual speakers includes the tenth number of virtual speakers. Moreover, the tenth number is an integer greater than or equal to 1.
[0199] S6109: The encoder 113 obtains the first number of virtual speakers and the first number of voting values based on the first voting values of the eighth number of virtual speakers, the second voting values of the ninth number of virtual speakers, and the tenth number of third voting values.
[0200] The first number of virtual speakers includes an eighth number of virtual speakers and a ninth number of virtual speakers. The fifth number of virtual speakers includes the first number of virtual speakers. The first number is less than or equal to the fifth number.
[0201] For example, assuming that the fifth number of virtual speakers includes a first virtual speaker, a second virtual speaker, a third virtual speaker, a fourth virtual speaker and a fifth virtual speaker, the eighth number of virtual speakers includes a first virtual speaker and a second virtual speaker, the ninth number of virtual speakers includes a first virtual speaker and a third virtual speaker, and the first number of virtual speakers includes a first virtual speaker, a second virtual speaker and a third virtual speaker, then the first number is less than the fifth number.
[0202] For another example, assuming that the fifth number of virtual speakers includes the first virtual speaker, the second virtual speaker, the third virtual speaker, the fourth virtual speaker and the fifth virtual speaker, the eighth number of virtual speakers includes the first virtual speaker, the second virtual speaker and the third virtual speaker, the ninth number of virtual speakers includes the first virtual speaker, the fourth virtual speaker and the fifth virtual speaker, and the first number of virtual speakers includes the first virtual speaker, the second virtual speaker, the third virtual speaker, the fourth virtual speaker and the fifth virtual speaker, then the first number is equal to the fifth number.
[0203] In some embodiments, if there are virtual speakers with the same number in the eighth number of virtual speakers and the ninth number of virtual speakers, the first number of virtual speakers includes a tenth number of virtual speakers.
[0204] In one case, the number of the eighth number of virtual speakers is exactly the same as the number of the ninth number of virtual speakers. The eighth number is equal to the ninth number, the tenth number is equal to the eighth number, and the tenth number is equal to the ninth number. Therefore, the number of the first number of virtual speakers is equal to the number of the tenth number of virtual speakers. The first number of voting values is equal to the tenth number of third voting values.
[0205] In another case, the eighth number of virtual speakers and the ninth number of virtual speakers are not identical. For example, the eighth number of virtual speakers includes the ninth number of virtual speakers, and the eighth number of virtual speakers also includes virtual speakers with numbers different from the ninth number of virtual speakers. The eighth number is greater than the ninth number, the tenth number is less than the eighth number, and the tenth number is equal to the ninth number. The first number of voting values includes the tenth number of third voting values and the first voting value of the virtual speaker with a number different from the ninth number of virtual speakers.
[0206] For another example, the ninth number of virtual speakers includes the eighth number of virtual speakers, and the ninth number of virtual speakers also includes virtual speakers with numbers different from the eighth number of virtual speakers. The eighth number is less than the ninth number, the tenth number is equal to the eighth number, and the tenth number is less than the ninth number. The first number of voting values includes the tenth number of third voting values and the second voting value of the virtual speaker with a number different from the eighth number of virtual speakers.
[0207] For another example, the eighth number of virtual speakers includes the tenth number of virtual speakers, and the eighth number of virtual speakers also includes virtual speakers with numbers different from the ninth number of virtual speakers; the ninth number of virtual speakers includes the tenth number of virtual speakers, and the ninth number of virtual speakers also includes virtual speakers with numbers different from the eighth number of virtual speakers. The tenth number is less than the eighth number, and the tenth number is less than the ninth number. The first number of voting values includes the tenth number of third voting values, the first voting value of the virtual speakers with numbers different from the ninth number of virtual speakers, and the second voting value of the virtual speakers with numbers different from the eighth number of virtual speakers.
[0208] In some other embodiments, if there is no virtual speaker with the same number in the eighth number of virtual speakers and the ninth number of virtual speakers, the tenth number is equal to 0, and the first number of virtual speakers does not include the tenth number of virtual speakers. After executing S6106 and S6107, the encoder 113 can directly execute S6110.
[0209] S6110: The encoder 113 obtains a first number of virtual speakers and a first number of voting values based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers.
[0210] The eighth number of virtual speakers and the ninth number of virtual speakers are completely different. For example, the eighth number of virtual speakers does not include the ninth number of virtual speakers, and the ninth number of virtual speakers does not include the eighth number of virtual speakers. The first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers, and the first number of voting values includes the first voting value of the eighth number of virtual speakers and the second voting value of the ninth number of virtual speakers.
[0211] In this way, the encoder selects a larger voting value from the voting values of the fifth number of virtual speakers included in the candidate virtual speaker set for each coefficient of the current frame, and uses the larger voting value to determine the first number of virtual speakers and the first number of voting values, thereby reducing the computational complexity of the encoder's search for virtual speakers while ensuring the accuracy of the representative virtual speakers of the current frame selected by the encoder.
[0212] The following is an explanation of the method for calculating the voting value in conjunction with the formula. First, the encoder 113 performs step 1 to determine the voting value P of the jth representative coefficient of the lth virtual speaker in the i-th round according to the correlation value between the jth representative coefficient of the HOA signal and the coefficient of the lth virtual speaker. jil The jth representative coefficient can be any one of the third number of representative coefficients. l=1,2…Q, indicating that the value range of l is 1 to Q, and Q represents the number of virtual speakers in the candidate virtual speaker set. j=1,2…L, L represents the number of representative coefficients. i=1,2…I, I represents the number of voting rounds. The voting value P of the lth virtual speaker is jil Satisfies formula (6).
[0213]
[0214] Where θ represents the horizontal angle, represents the pitch angle, represents the jth representative coefficient of the HOA signal, Represents the coefficient of the lth virtual speaker.
[0215] Next, the encoder 113 performs step 2, according to the voting values P of the Q virtual speakers. jil Get the jth representative coefficient of the virtual speaker in the i-th round.
[0216] For example, the selection criterion of the virtual speaker with the jth representative coefficient in the i-th round is to select the virtual speaker with the largest absolute value of the vote value from the vote values of the Q virtual speakers with the jth representative coefficient in the i-th round, and the number of the virtual speaker with the jth representative coefficient in the i-th round is recorded as g ji , when l = g ji hour,
[0217] If i is less than the number of voting rounds I, that is, the number of voting rounds I is the cycle completed, the encoder 113 executes step 3, subtracts the coefficient of the virtual speaker selected in the i-th round of the j-th representative coefficient from the HOA signal of the j-th representative coefficient to be encoded, and uses the remaining virtual speakers in the candidate virtual speaker set as the HOA signal to be encoded required for calculating the voting value of the virtual speaker in the next round of the j-th representative coefficient. The coefficients of the remaining virtual speakers in the candidate virtual speaker set satisfy formula (7).
[0218]
[0219] Among them, E jig represents the voting value of the jth representative coefficient of the lth virtual speaker in the i-th round. represents the coefficient of the jth representative coefficient in the i-th round of the HOA signal to be encoded. represents the coefficient of the j-th representative coefficient in the HOA signal to be encoded in the i+1-th round, w is a weight, and a value that can be preset satisfies 0≤w≤1. In addition, the weight can also satisfy formula (8).
[0220]
[0221] Among them, norm is the operation of obtaining the bi-norm.
[0222] The encoder 113 executes step 4, that is, the encoder 113 repeats steps 1 to 3 until the voting values of the virtual speakers of each round of the j-th representative coefficient are calculated.
[0223] The encoder 113 repeats steps 1 to 4 until the voting values of the virtual speakers of all rounds representing the coefficients are calculated.
[0224] Finally, the encoder 113 generates a virtual speaker number g according to the number of each representative frequency point in each round. j,i and its corresponding voting value Calculate the final voting value of each virtual speaker in the current frame. For example, the encoder 113 accumulates the voting values of virtual speakers with the same number to obtain the final voting value of the current frame corresponding to the virtual speaker. g Satisfies formula (9).
[0225] VOTE g =∑P jig or VOTE g =VOTE g +P jigFormula (9)
[0226] In order to increase the continuity of the orientation between consecutive frames and overcome the problem of large differences in the results of virtual speakers selected in consecutive frames, the encoder 113 adjusts the initial voting value of the current frame of the virtual speaker in the candidate virtual speaker set according to the final voting value of the previous frame of the representative virtual speaker of the previous frame to obtain the final voting value of the current frame of the virtual speaker. Figure 8 FIG. 1 is a flow chart of another method for selecting a virtual speaker provided in an embodiment of the present application. Figure 8 The method flow described is Figure 6 An explanation of the specific operation process included in S620.
[0227] S6201. The encoder 113 obtains a seventh number of current frame final voting values corresponding to a seventh number of virtual speakers and the current frame according to a first number of current frame initial voting values and a sixth number of previous frame final voting values.
[0228] The encoder 113 can determine a first number of virtual speakers and a first number of voting values according to the method described in S610 above, based on the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, and then use the first number of voting values as the initial voting values of the first number of virtual speakers for the current frame.
[0229] The virtual speakers correspond to the initial voting values of the current frame one by one, that is, one virtual speaker corresponds to one initial voting value of the current frame. For example, the first number of virtual speakers includes the first virtual speaker, the first number of initial voting values of the current frame includes the initial voting value of the current frame of the first virtual speaker, and the first virtual speaker corresponds to the initial voting value of the current frame of the first virtual speaker. The initial voting value of the current frame of the first virtual speaker is used to represent the priority of using the first virtual speaker when encoding the current frame.
[0230] The sixth number of virtual speakers included in the representative virtual speaker set of the previous frame has a one-to-one correspondence with the sixth number of final voting values of the previous frame. The sixth number of virtual speakers may be representative virtual speakers of the previous frame used by the encoder 113 to encode the previous frame of the 3D audio signal.
[0231] Specifically, the encoder 113 updates the first number of initial voting values of the current frames according to the sixth number of final voting values of the previous frames, that is, the encoder 113 calculates the sum of the initial voting values of the current frame and the final voting values of the previous frames of the first number of virtual speakers and the virtual speakers with the same numbers in the sixth number of virtual speakers, and obtains the seventh number of final voting values of the current frame corresponding to the seventh number of virtual speakers and the current frame.
[0232] S6202: The encoder 113 selects a second number of representative virtual speakers of the current frames from the seventh number of virtual speakers according to the final voting values of the seventh number of current frames.
[0233] The encoder 113 selects a second number of representative virtual speakers of the current frames from the seventh number of virtual speakers according to the final voting values of the seventh number of current frames, and the final voting values of the current frames of the representative virtual speakers of the second number of current frames are greater than a preset threshold.
[0234] The encoder 113 may also select representative virtual speakers of the second number of current frames from the seventh number of virtual speakers according to the final voting values of the seventh number of current frames. For example, the final voting values of the second number of current frames are determined from the final voting values of the seventh number of current frames in descending order of the final voting values of the seventh number of current frames, and the virtual speakers associated with the final voting values of the second number of current frames in the seventh number of virtual speakers are used as representative virtual speakers of the second number of current frames.
[0235] Optionally, if the voting values of virtual speakers with different numbers among the seventh number of virtual speakers are the same and the voting values of the virtual speakers with different numbers are greater than a preset threshold, the encoder 113 may use the virtual speakers with different numbers as representative virtual speakers for the current frame.
[0236] It should be noted that the second number is smaller than the seventh number. The seventh number of virtual speakers includes the second number of representative virtual speakers of the current frame. The second number may be preset, or the second number may be determined according to the number of sound sources in the sound field of the current frame.
[0237] In addition, before the encoder 113 encodes the next frame of the current frame, if the encoder 113 determines to reuse the representative virtual speakers of the previous frame to encode the next frame, the encoder 113 can use the second number of representative virtual speakers of the current frame as the second number of representative virtual speakers of the previous frame, and use the second number of representative virtual speakers of the previous frame to encode the next frame of the current frame.
[0238] In the process of searching for virtual speakers, since the position of the real sound source and the position of the virtual speaker may not necessarily coincide, the virtual speaker may not necessarily form a one-to-one correspondence with the real sound source, and since in actual complex scenes, a limited number of virtual speaker sets may not be able to represent all sound sources in the sound field, at this time, the virtual speakers searched between frames may frequently jump, and this jump will significantly affect the auditory perception of the listener, resulting in obvious discontinuity and noise in the three-dimensional audio signal after decoding and reconstruction. The method for selecting a virtual speaker provided in an embodiment of the present application inherits the representative virtual speaker of the previous frame, that is, for virtual speakers with the same number, the initial voting value of the current frame is adjusted with the final voting value of the previous frame, so that the encoder is more inclined to select the representative virtual speaker of the previous frame, thereby reducing the frequent jumps of the virtual speakers between frames, enhancing the continuity of the signal orientation between frames, improving the stability of the sound image of the reconstructed three-dimensional audio signal, and ensuring the sound quality of the reconstructed three-dimensional audio signal. In addition, the parameters are adjusted to ensure that the final voting value of the previous frame will not be inherited too long, so as to avoid the algorithm from being unable to adapt to the scene of sound field changes such as sound source movement.
[0239] In addition, the embodiment of the present application provides a method for selecting a virtual speaker. The encoder can first determine whether the representative virtual speaker set of the previous frame can be reused to encode the current frame. If the encoder reuses the representative virtual speaker set of the previous frame to encode the current frame, the encoder is prevented from performing the virtual speaker search process again, which effectively reduces the computational complexity of the encoder searching for virtual speakers, thereby reducing the computational complexity of compressing and encoding three-dimensional audio signals and reducing the computational burden of the encoder. If the encoder cannot reuse the representative virtual speaker set of the previous frame to encode the current frame, the encoder selects a representative coefficient, uses the representative coefficient of the current frame to vote for each virtual speaker in the candidate virtual speaker set, and selects the representative virtual speaker of the current frame based on the voting value, so as to achieve the purpose of reducing the computational complexity of compressing and encoding three-dimensional audio signals and reducing the computational burden of the encoder. Fig. 9 A flowchart of a method for selecting a virtual speaker provided by an embodiment of the present application. Before the encoder 113 obtains the fourth number of coefficients of the current frame of the three-dimensional audio signal and the frequency domain eigenvalues of the fourth number of coefficients, that is, before S610, Fig. 9 As shown, the method includes the following steps.
[0240] S640: The encoder 113 obtains a first correlation between a current frame and a representative virtual speaker set of a previous frame of the 3D audio signal.
[0241] The representative virtual speaker set of the previous frame includes a sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are the representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal. The first correlation is used to characterize the priority of reusing the representative virtual speaker set of the previous frame when encoding the current frame. The priority can also be replaced by the tendency, that is, the first correlation is used to determine whether to reuse the representative virtual speaker set of the previous frame when encoding the current frame. It can be understood that the larger the first correlation of the representative virtual speaker set of the previous frame, the higher the tendency of the representative virtual speaker set of the previous frame, and the encoder 113 is more inclined to select the representative virtual speakers of the previous frame to encode the current frame.
[0242] S650: The encoder 113 determines whether the first correlation satisfies a multiplexing condition.
[0243] If the first correlation does not meet the multiplexing condition, it means that the encoder 113 is more inclined to perform a virtual speaker search, encode the current frame according to the representative virtual speaker of the current frame, and execute S610. The encoder 113 obtains the fourth number of coefficients of the current frame of the three-dimensional audio signal and the frequency domain eigenvalues of the fourth number of coefficients.
[0244] Optionally, the encoder 113 may also select a third number of representative coefficients from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, and use the largest representative coefficient among the third number of representative coefficients as the coefficient of the current frame for obtaining the first correlation. The encoder 113 then obtains the first correlation between the largest representative coefficient among the third number of representative coefficients of the current frame and the representative virtual speaker set of the previous frame. If the first correlation does not meet the multiplexing condition, S620 is executed, that is, the encoder 113 selects a second number of representative virtual speakers for the current frame from the first number of virtual speakers according to the first number of voting values.
[0245] If the first correlation satisfies the multiplexing condition, it means that the encoder 113 prefers to select the representative virtual speaker of the previous frame to encode the current frame, and the encoder 113 executes S660 and S670.
[0246] S660 : The encoder 113 generates a virtual speaker signal according to the representative virtual speaker set of the previous frame and the current frame.
[0247] S670 : The encoder 113 encodes the virtual speaker signal to obtain a bit stream.
[0248] The method for selecting a virtual speaker provided in an embodiment of the present application utilizes the correlation between the representative coefficient of the current frame and the representative virtual speaker of the previous frame to determine whether to perform a virtual speaker search, thereby effectively reducing the complexity of the encoding end while ensuring the accuracy of the selection of the correlation of the representative virtual speaker of the current frame.
[0249] It is understandable that, in order to implement the functions in the above-mentioned embodiments, the encoder includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0250] Combined with the above Figures 1 to 9 , describes in detail the three-dimensional audio signal encoding method provided by this embodiment, and will now be combined with Fig.10 and Fig.11 , describing a three-dimensional audio signal encoding device and an encoder provided according to this embodiment.
[0251] Fig.10 Schematic diagram of the structure of a possible 3D audio signal encoding device provided in this embodiment. These 3D audio signal encoding devices can be used to implement the function of encoding 3D audio signals in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments. In this embodiment, the 3D audio signal encoding device can be as follows: Figure 1 The encoder 113 shown, or Figure 3 The encoder 300 shown may also be a module (such as a chip) applied to a terminal device or a server.
[0252] like Fig.10 As shown, the three-dimensional audio signal encoding device 1000 includes a communication module 1010, a coefficient selection module 1020, a virtual speaker selection module 1030, an encoding module 1040 and a storage module 1050. The three-dimensional audio signal encoding device 1000 is used to implement the above Figures 6 to 9 The functionality of the encoder 113 in the method embodiment shown in FIG.
[0253] The communication module 1010 is used to obtain a current frame of a three-dimensional audio signal. Optionally, the communication module 1010 may also receive a current frame of a three-dimensional audio signal obtained by other devices; or obtain the current frame of a three-dimensional audio signal from the storage module 1050. The current frame of the three-dimensional audio signal is an HOA signal; the frequency domain eigenvalue of the coefficient is determined based on a two-dimensional vector, and the two-dimensional vector includes the HOA coefficient of the HOA signal.
[0254] The virtual speaker selection module 1030 is used to determine a first number of virtual speakers and a first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds. The virtual speakers correspond to the voting values one by one. The first number of virtual speakers includes the first virtual speaker. The first number of voting values includes the voting value of the first virtual speaker. The first virtual speaker corresponds to the voting value of the first virtual speaker. The voting value of the first virtual speaker is used to characterize the priority of using the first virtual speaker when encoding the current frame. The candidate virtual speaker set includes a fifth number of virtual speakers. The fifth number of virtual speakers includes the first number of virtual speakers. The number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number.
[0255] The virtual speaker selection module 1030 is further configured to select a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, where the second number is smaller than the first number.
[0256] The number of voting rounds is determined based on at least one of the number of directional sound sources, coding rate and coding complexity in the current frame of the three-dimensional audio signal. The second number is preset, or the second number is determined based on the current frame.
[0257] When the 3D audio signal encoding device 1000 is used to implement Figures 6 to 9 When the encoder 113 in the method embodiment is used, the virtual speaker selection module 1030 is used to implement the related functions of S610 and S620.
[0258] For example, when the virtual speaker selection module 1030 selects a second number of representative virtual speakers of the current frame from a first number of virtual speakers based on a first number of voting values, it is specifically used to: select a second number of representative virtual speakers of the current frame from the first number of virtual speakers based on the first number of voting values and a preset threshold.
[0259] For another example, when the virtual speaker selection module 1030 selects a second number of representative virtual speakers for the current frame from the first number of virtual speakers based on the first number of voting values, it is specifically used to: determine the second number of voting values from the first number of voting values in descending order of the first number of voting values, and use the second number of virtual speakers associated with the second number of voting values in the first number of virtual speakers as the representative virtual speakers for the second number of current frames.
[0260] Optionally, when the three-dimensional audio signal encoding apparatus 1000 is used to implement Fig. 9When the encoder 113 in the method embodiment shown is used, the virtual speaker selection module 1030 is used to implement the related functions of S640 and S670. Specifically, the virtual speaker selection module 1030 is also used to: obtain the first correlation between the current frame and the representative virtual speaker set of the previous frame, and if the first correlation does not meet the multiplexing condition, obtain the fourth number of coefficients of the current frame of the three-dimensional audio signal, and the frequency domain eigenvalues of the fourth number of coefficients. Among them, the representative virtual speaker set of the previous frame includes the sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are the representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal. The first correlation is used to represent the priority of multiplexing the sixth number of virtual speakers when encoding the current frame.
[0261] When the 3D audio signal encoding device 1000 is used to implement Figure 8 When the encoder 113 in the method embodiment shown is used, the virtual speaker selection module 1030 is used to implement the related functions of S620. Specifically, when the virtual speaker selection module 1030 selects the second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, it is specifically used to: obtain the seventh number of final voting values of the current frame corresponding to the seventh number of virtual speakers and the current frame according to the first number of voting values and the sixth number of final voting values of the previous frame corresponding to the sixth number of virtual speakers included in the representative virtual speaker set of the previous frame of the three-dimensional audio signal, and select the second number of representative virtual speakers of the current frame from the seventh number of virtual speakers according to the seventh number of final voting values of the current frame, and the second number is less than the seventh number. Among them, the seventh number of virtual speakers includes the first number of virtual speakers, and the seventh number of virtual speakers includes the sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are the representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal.
[0262] When the 3D audio signal encoding device 1000 is used to implement Figure 7 When the encoder 113 in the method embodiment shown is used, the coefficient selection module 1020 is used to implement the related functions of S6101. Specifically, when the coefficient selection module 1020 obtains the third number of representative coefficients of the current frame, it is specifically used to: obtain the fourth number of coefficients of the current frame, and the frequency domain feature values of the fourth number of coefficients; according to the frequency domain feature values of the fourth number of coefficients, select the third number of representative coefficients from the fourth number of coefficients, and the third number is less than the fourth number.
[0263] The encoding module 1140 is configured to encode the current frame according to the second number of representative virtual speakers of the current frame to obtain a code stream.
[0264] When the 3D audio signal encoding device 1000 is used to implement Figures 6 to 9 When the encoder 113 in the method embodiment is used, the encoding module 1140 is used to implement the related functions of S630. For example, the encoding module 1140 is specifically used to generate a virtual speaker signal according to the second number of representative virtual speakers of the current frame and the current frame; and encode the virtual speaker signal to obtain a bit stream.
[0265] The storage module 1050 is used to store coefficients related to the three-dimensional audio signal, a candidate virtual speaker set, a representative virtual speaker set of the previous frame, and selected coefficients and virtual speakers, etc., so that the encoding module 1040 can encode the current frame to obtain a bit stream and transmit the bit stream to the decoder.
[0266] It should be understood that the three-dimensional audio signal encoding device 1000 of the embodiment of the present application can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. It can also be implemented by software. Figures 6 to 9 When the 3D audio signal encoding method is shown, the 3D audio signal encoding apparatus 1000 and its modules may also be software modules.
[0267] For a more detailed description of the communication module 1010, the coefficient selection module 1020, the virtual speaker selection module 1030, the encoding module 1040 and the storage module 1050, please refer to Figures 6 to 9 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0268] Fig.11 1 is a schematic diagram of the structure of an encoder 1100 provided in this embodiment. Fig.11 As shown, the encoder 1100 includes a processor 1110 , a bus 1120 , a memory 1130 , and a communication interface 1140 .
[0269] It should be understood that in this embodiment, the processor 1110 may be a central processing unit (CPU), and the processor 1110 may also be other general-purpose processors, digital signal processors (DSP), ASICs, FPGAs or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0270] The processor may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, or one or more integrated circuits for controlling the execution of the program of the present application.
[0271] The communication interface 1140 is used to implement communication between the encoder 1100 and an external device or component. In this embodiment, the communication interface 1140 is used to receive a three-dimensional audio signal.
[0272] The bus 1120 may include a path for transmitting information between the above components (such as the processor 1110 and the memory 1130). In addition to the data bus, the bus 1120 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 1120 in the figure.
[0273] As an example, the encoder 1100 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions). The processor 1110 may call the coefficients related to the three-dimensional audio signal, the candidate virtual speaker set, the representative virtual speaker set of the previous frame, and the selected coefficients and virtual speakers, etc. stored in the memory 1130.
[0274] It is worth mentioning that Fig.11 In the example, the encoder 1100 includes one processor 1110 and one memory 1130. Here, the processor 1110 and the memory 1130 are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to business requirements.
[0275] The memory 1130 may correspond to a storage medium for storing information such as coefficients related to three-dimensional audio signals, a set of candidate virtual speakers, a representative set of virtual speakers in a previous frame, and selected coefficients and virtual speakers in the above-mentioned method embodiment, for example, a disk such as a mechanical hard disk or a solid-state hard disk.
[0276] The encoder 1100 may be a general purpose device or a dedicated device. For example, the encoder 1100 may be a server based on X86 or ARM, or may be other dedicated servers, such as a policy control and charging (PCC) server. The embodiment of the present application does not limit the type of the encoder 1100.
[0277] It should be understood that the encoder 1100 according to this embodiment may correspond to the three-dimensional audio signal encoding device 1100 in this embodiment, and may correspond to the method for executing the three-dimensional audio signal encoding device 1100 according to the embodiment. Figures 6 to 9 The corresponding subject in any method, and the above and other operations and / or functions of each module in the three-dimensional audio signal encoding device 1100 are respectively implemented Figures 6 to 9 For the sake of brevity, the corresponding processes of each method in are not repeated here.
[0278] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a network device or a terminal device. Of course, the processor and the storage medium can also exist in a network device or a terminal device as discrete components.
[0279] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0280] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A three-dimensional audio signal encoding method, characterized in that: include: Determine a first number of virtual speakers and a first number of voting values according to a current frame of the three-dimensional audio signal, a candidate virtual speaker set, and a number of voting rounds, the virtual speakers and the voting values correspond one to one, the first number of virtual speakers include a first virtual speaker, the voting value of the first virtual speaker is used to characterize the priority of the first virtual speaker, the candidate virtual speaker set includes a fifth number of virtual speakers, the fifth number of virtual speakers includes the first number of virtual speakers, the first number is less than or equal to the fifth number, the number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number; Selecting a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, wherein the second number is smaller than the first number; The current frame is encoded according to the second number of representative virtual speakers of the current frame to obtain a code stream.
2. The method according to claim 1, characterized in that The number of voting rounds is determined according to at least one of the number of directional sound sources in a current frame of the three-dimensional audio signal, a coding rate for encoding the current frame, and a coding complexity for encoding the current frame.
3. The method according to claim 1 or 2, characterized in that: The second number is preset, or the second number is determined according to the current frame.
4. The method according to claim 1, characterized in that: The selecting a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values comprises: The second number of representative virtual speakers of the current frame are selected from the first number of virtual speakers according to the first number of voting values and a preset threshold.
5. The method according to claim 1, characterized in that The selecting a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values comprises: According to the first number of voting values, a second number of voting values are determined from the first number of voting values, and a second number of virtual speakers in the first number of virtual speakers corresponding to the second number of voting values are representative virtual speakers of the second number of current frames.
6. The method according to claim 1, characterized in that When the first number is equal to the fifth number, determining the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set, and the number of voting rounds includes: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; The voting values of the fifth number of virtual speakers are obtained based on the fifth number of first voting values and the fifth number of second voting values, wherein the voting value of the first virtual speaker is obtained based on the first voting value of the first virtual speaker and the second voting value of the first virtual speaker.
7. The method according to claim 1, characterized in that When the first number is less than or equal to the fifth number, determining the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set, and the number of voting rounds includes: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; selecting an eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values, the eighth number being smaller than the fifth number; selecting a ninth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of second voting values, the ninth number being smaller than the fifth number; Based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers, a tenth number of third voting values of the tenth number of virtual speakers is obtained, the eighth number of virtual speakers includes the tenth number of virtual speakers, the ninth number of virtual speakers includes the tenth number of virtual speakers, the tenth number of virtual speakers includes the second virtual speaker, the third voting value of the second virtual speaker is obtained based on the first voting value of the second virtual speaker and the second voting value of the second virtual speaker, the tenth number is less than or equal to the eighth number, the tenth number is less than or equal to the ninth number, and the tenth number is an integer greater than or equal to 1; The first number of virtual speakers and the first number of voting values are obtained based on the first voting values of the eighth number of virtual speakers, the second voting values of the ninth number of virtual speakers and the third voting values of the tenth number, wherein the first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers.
8. The method according to claim 1, characterized in that When the first number is less than or equal to the fifth number, determining the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set, and the number of voting rounds includes: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; selecting an eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values, the eighth number being smaller than the fifth number; According to the fifth number of second voting values, selecting a ninth number of virtual speakers from the fifth number of virtual speakers, the ninth number being smaller than the fifth number, and the eighth number of virtual speakers having no intersection with the ninth number of virtual speakers; The first number of virtual speakers and the first number of voting values are obtained based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers, wherein the first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers.
9. The method according to any one of claims 6 to 8, characterized in that: The step of obtaining the fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds comprises: The fifth number of first voting values are determined according to the coefficients of the fifth number of virtual speakers and the first representative coefficient.
10. The method according to any one of claims 6 to 8, characterized in that: The obtaining of a third number of representative coefficients of the current frame comprises: Obtaining a fourth number of coefficients of the current frame and frequency domain eigenvalues of the fourth number of coefficients; The third number of representative coefficients are selected from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, and the third number is smaller than the fourth number.
11. The method according to claim 10, characterized in that Before selecting a third number of representative coefficients from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, the method further includes: Acquire a first correlation between the current frame and a representative virtual speaker set of a previous frame, wherein the representative virtual speaker set of the previous frame includes a sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal, and the first correlation is used to determine whether to reuse the representative virtual speaker set of the previous frame when encoding the current frame; If the first correlation does not satisfy the multiplexing condition, a fourth number of coefficients of the current frame of the three-dimensional audio signal and frequency domain eigenvalues of the fourth number of coefficients are obtained.
12. The method according to claim 1, characterized in that The selecting a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values comprises: According to the first number of voting values and the sixth number of final voting values of the previous frame, obtaining a seventh number of final voting values of the current frame corresponding to a seventh number of virtual speakers and the current frame, the seventh number of virtual speakers includes the first number of virtual speakers, and the seventh number of virtual speakers includes the sixth number of virtual speakers, the sixth number of virtual speakers included in the representative virtual speaker set of the previous frame corresponds one-to-one to the sixth number of final voting values of the previous frame, and the sixth number of virtual speakers are virtual speakers used when encoding the previous frame of the three-dimensional audio signal; According to the final voting values of the seventh number of current frames, the second number of representative virtual speakers of the current frames are selected from the seventh number of virtual speakers, and the second number is smaller than the seventh number.
13. The method according to claim 1, characterized in that The current frame of the three-dimensional audio signal is a high-order ambisonics (HOA) signal; the frequency domain eigenvalues of the coefficients of the current frame are determined based on the coefficients of the HOA signal.
14. A three-dimensional audio signal encoding device, characterized in that: include: a virtual speaker selection module, configured to determine a first number of virtual speakers and a first number of voting values according to a current frame of a three-dimensional audio signal, a candidate virtual speaker set, and a number of voting rounds, wherein the virtual speakers correspond to the voting values one by one, the first number of virtual speakers includes a first virtual speaker, the voting value of the first virtual speaker is used to characterize a priority of the first virtual speaker, the candidate virtual speaker set includes a fifth number of virtual speakers, the fifth number of virtual speakers includes the first number of virtual speakers, the first number is less than or equal to the fifth number, the number of voting rounds is an integer greater than or equal to 1, and the number of voting rounds is less than or equal to the fifth number; The virtual speaker selection module is further used to select a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, where the second number is smaller than the first number; The encoding module is used to encode the current frame according to the representative virtual speakers of the second number of current frames to obtain a code stream.
15. The device according to claim 14, characterized in that The number of voting rounds is determined according to at least one of the number of directional sound sources in a current frame of the three-dimensional audio signal, a coding rate for encoding the current frame, and a coding complexity for encoding the current frame.
16. The device according to claim 14 or 15, characterized in that The second number is preset, or the second number is determined according to the current frame.
17. The device according to claim 14, characterized in that When the virtual speaker selection module selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, it is specifically used to: The second number of representative virtual speakers of the current frame are selected from the first number of virtual speakers according to the first number of voting values and a preset threshold.
18. The device according to claim 14, characterized in that When the virtual speaker selection module selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, it is specifically used to: According to the first number of voting values, a second number of voting values are determined from the first number of voting values, and a second number of virtual speakers in the first number of virtual speakers corresponding to the second number of voting values are used as representative virtual speakers of the second number of current frames.
19. The device according to claim 14, characterized in that When the first number is equal to the fifth number, the virtual speaker selection module determines the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, specifically for: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; The voting values of the fifth number of virtual speakers are obtained based on the fifth number of first voting values and the fifth number of second voting values, wherein the voting value of the first virtual speaker is obtained based on the first voting value of the first virtual speaker and the second voting value of the first virtual speaker.
20. The device according to claim 14, characterized in that When the first number is less than or equal to the fifth number, the virtual speaker selection module determines the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set and the number of voting rounds, specifically for: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; selecting an eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values, the eighth number being smaller than the fifth number; selecting a ninth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of second voting values, the ninth number being smaller than the fifth number; Based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers, a tenth number of third voting values of the tenth number of virtual speakers is obtained, the eighth number of virtual speakers includes the tenth number of virtual speakers, the ninth number of virtual speakers includes the tenth number of virtual speakers, the tenth number of virtual speakers includes the second virtual speaker, the third voting value of the second virtual speaker is obtained based on the first voting value of the second virtual speaker and the second voting value of the second virtual speaker, the tenth number is less than or equal to the eighth number, the tenth number is less than or equal to the ninth number, and the tenth number is an integer greater than or equal to 1; The first number of virtual speakers and the first number of voting values are obtained based on the eighth number of first voting values, the ninth number of second voting values and the tenth number of third voting values, wherein the first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers.
21. The device according to claim 14, characterized in that When the first number is less than or equal to the fifth number, determining the first number of virtual speakers and the first number of voting values according to the current frame of the three-dimensional audio signal, the candidate virtual speaker set, and the number of voting rounds includes: Acquire a third number of representative coefficients of the current frame, wherein the third number of representative coefficients includes a first representative coefficient and a second representative coefficient; Obtaining a fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, wherein the fifth number of first voting values includes the first voting value of the first virtual speaker; Obtaining a fifth number of second voting values of the fifth number of virtual speakers and the second representative coefficient after the number of voting rounds, wherein the fifth number of second voting values includes the second voting value of the first virtual speaker; selecting an eighth number of virtual speakers from the fifth number of virtual speakers according to the fifth number of first voting values, the eighth number being smaller than the fifth number; According to the fifth number of second voting values, selecting a ninth number of virtual speakers from the fifth number of virtual speakers, the ninth number being smaller than the fifth number, and the eighth number of virtual speakers having no intersection with the ninth number of virtual speakers; The first number of virtual speakers and the first number of voting values are obtained based on the first voting values of the eighth number of virtual speakers and the second voting values of the ninth number of virtual speakers, wherein the first number of virtual speakers includes the eighth number of virtual speakers and the ninth number of virtual speakers.
22. The device according to any one of claims 19 to 21, characterized in that When the virtual speaker selection module obtains the fifth number of first voting values of the fifth number of virtual speakers and the first representative coefficient after the number of voting rounds, it is specifically used to: The fifth number of first voting values are determined according to the coefficients of the fifth number of virtual speakers and the first representative coefficient.
23. The device according to any one of claims 19 to 21, characterized in that The device further includes a coefficient selection module; when the coefficient selection module obtains the third number of representative coefficients of the current frame, it is specifically used to: Obtaining a fourth number of coefficients of the current frame and frequency domain eigenvalues of the fourth number of coefficients; The third number of representative coefficients are selected from the fourth number of coefficients according to the frequency domain eigenvalues of the fourth number of coefficients, and the third number is smaller than the fourth number.
24. The device according to claim 23, characterized in that The virtual speaker selection module is further used for: Acquire a first correlation between the current frame and a representative virtual speaker set of a previous frame, wherein the representative virtual speaker set of the previous frame includes a sixth number of virtual speakers, and the virtual speakers included in the sixth number of virtual speakers are representative virtual speakers of the previous frame used to encode the previous frame of the three-dimensional audio signal, and the first correlation is used to determine whether to reuse the representative virtual speaker set of the previous frame when encoding the current frame; If the first correlation does not satisfy the multiplexing condition, a fourth number of coefficients of the current frame of the three-dimensional audio signal and frequency domain eigenvalues of the fourth number of coefficients are obtained.
25. The device according to claim 14, characterized in that When the virtual speaker selection module selects a second number of representative virtual speakers of the current frame from the first number of virtual speakers according to the first number of voting values, it is specifically used to: According to the first number of voting values and the sixth number of final voting values of the previous frame, obtaining a seventh number of final voting values of the current frame corresponding to a seventh number of virtual speakers and the current frame, the seventh number of virtual speakers includes the first number of virtual speakers, and the seventh number of virtual speakers includes the sixth number of virtual speakers, the sixth number of virtual speakers included in the representative virtual speaker set of the previous frame corresponds one-to-one to the sixth number of final voting values of the previous frame, and the sixth number of virtual speakers are virtual speakers used when encoding the previous frame of the three-dimensional audio signal; According to the final voting values of the seventh number of current frames, the second number of representative virtual speakers of the current frames are selected from the seventh number of virtual speakers, and the second number is smaller than the seventh number.
26. The device according to claim 14, characterized in that The current frame of the three-dimensional audio signal is a high-order ambisonics (HOA) signal; the frequency domain eigenvalues of the coefficients of the current frame are determined based on the coefficients of the HOA signal.
27. An encoder, characterized in that The encoder comprises at least one processor and a memory, wherein the memory is used to store a computer program, so that when the computer program is executed by the at least one processor, the three-dimensional audio signal encoding method according to any one of claims 1 to 13 is implemented.
28. A system, characterized in that: The system comprises an encoder as claimed in claim 27, and a decoder, wherein the encoder is used to execute the operation steps of the method according to any one of claims 1 to 13, and the decoder is used to decode the code stream generated by the encoder.
29. A computer program product, characterized in that The computer program product comprises a computer program or instructions, and when the computer program or instructions are executed by an encoder, the steps of the three-dimensional audio signal encoding method according to any one of claims 1 to 13 are implemented.
30. A computer-readable storage medium, characterized in that: The method comprises computer software instructions; when the computer software instructions are executed in an encoder, the encoder is enabled to perform the three-dimensional audio signal encoding method according to any one of claims 1 to 13.
31. A computer-readable storage medium, characterized in that: The method comprises a code stream obtained by the three-dimensional audio signal encoding method according to any one of claims 1 to 13.
