OPTIMIZED CODING OF ROTATIONAL MATRICS FOR CODING A MULTI-CHANNEL AUDIO SIGNAL

DE602021047209T2Active Publication Date: 2026-01-28ORANGE SA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE602021047209
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-12-22
Filing Date
2021-12-09
Publication Date
2026-01-28
Estimated Expiration
2041-12-09

AI Technical Summary

Technical Problem

Existing ambisonic encoding methods, such as multi-mono and quantization of rotation matrices using Euler angles, result in spatial distortions and artifacts at low bitrates, particularly in immersive audio applications.

Method used

Encoding and decoding ambisonic signals using quaternion domain quantization, where one quaternion component is forced to be positive, simplifying conversions and reducing complexity by using spherical coordinates and optimized quantization methods.

Benefits of technology

This approach minimizes spatial distortions and artifacts, optimizing throughput and reducing processing power and memory requirements while maintaining high-quality spatialization.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to the encoding / decoding of spatialized sound data, particularly in an ambisonic context (hereafter also referred to as "ambisonic").

[0002] The encoders / decoders (hereinafter referred to as "codecs") currently used in mobile telephony are mono (a single signal channel for playback on a single speaker). The 3GPP EVS codec (for "Enhanced Voice Services") offers "Super-HD" quality (also called "High Definition Plus" or HD+ voice) with super-wideband (SWB) audio for signals sampled at 32 or 48 kHz, or fullband (FB) for signals sampled at 48 kHz; the audio bandwidth is 14.4 to 16 kHz in SWB mode (9.6 to 128 kbit / s) and 20 kHz in FB mode (16.4 to 128 kbit / s).

[0003] The next evolution in quality for conversational services offered by operators should be immersive services, using devices such as smartphones equipped with multiple microphones, spatial audio conferencing equipment, video conferencing systems like telepresence or 360° video, or even live audio sharing equipment, with 3D spatialized sound rendering that is far more immersive than simple 2D stereo playback. With the increasingly widespread use of mobile phones for listening with headphones and the emergence of advanced audio equipment (accessories such as 3D microphones, voice assistants with acoustic antennas, virtual reality headsets, etc.), the capture and rendering of spatialized soundscapes are now widespread enough to offer an immersive communication experience.

[0004] As such, the future 3GPP standard "IVAS" (for "Immersive Voice And Audio Services") proposes the extension of the EVS codec to immersive audio by accepting as input format for the codec at least the spatialized sound formats listed below (and their combinations): Multichannel (channel-based) format of stereo or 5.1 type where each channel feeds a speaker (for example L and R in stereo or L, R, Ls, Rs and C in 5.1); Object-based format where sound objects are described as an audio signal (generally mono) associated with metadata describing the attributes of this object (position in space, spatial width of the source, etc.); Ambisonic (scene-based) format which describes the sound field at a given point, generally captured by a spherical microphone or synthesized in the spherical harmonic domain.

[0005] We are typically interested below in the coding of a sound in ambisonic format, as an example of an embodiment (at least some aspects presented in connection with the invention below can also be applied to formats other than ambisonic).

[0006] Ambisonics is a method for recording (acoustically "encoding") spatialized sound and a system for reproducing it (acoustically "decoding"). A first-order ambisonic microphone comprises at least four capsules (typically cardioid or subcardioid) arranged on a spherical grid, such as the vertices of a regular tetrahedron. The audio channels associated with these capsules are called the "A-format." This format is converted into a "B-format," in which the sound field is decomposed into four components (spherical harmonics) denoted W, X, Y, and Z, which correspond to four virtual coincident microphones. The W component corresponds to an omnidirectional capture of the sound field, while the more directional X, Y, and Z components can be likened to pressure-gradient microphones oriented along the three orthogonal axes of space.An ambisonic system is flexible in that recording and playback are separate and decoupled. It allows for decoding (in the acoustic sense) on any loudspeaker configuration (for example, binaural, 5.1 surround sound, or 7.1.4 periphery (with elevation)). The ambisonic approach can be generalized to more than four channels in B-format, and this generalized representation is commonly called "HOA" (for "Higher-Order Ambisonics"). Decomposing the sound into more spherical harmonics improves the spatial accuracy of playback when rendered on loudspeakers.

[0007] An ambisonic signal of order M comprises K = (M + 1) 2< components, and at order 1 (if M = 1), we find the four components W, X, Y, and Z, commonly called FOA (for First-Order Ambisonics). There is also a so-called "planar" variant of ambisonics (W, X, Y) which decomposes the sound defined in a plane that is generally the horizontal plane (where Z = 0). In this case, the number of components is K = 2M + 1 channels. First-order ambisonics (4 channels: W, X, Y, Z), planar first-order ambisonics (3 channels: W, X, Y), and higher-order ambisonics are all referred to hereafter as "ambisonics" interchangeably for ease of reading, as the processing described is applicable regardless of whether it is planar or not and the number of ambisonic components. If, however, in certain passages it is necessary to make a distinction, the terms "1st order ambisonic" and "planar 1st order ambisonic" are used.

[0008] Hereafter, an "ambisonic signal" will be defined as a B-format signal with a predetermined order and a number of ambisonic components. In some variations, the ambisonic signal may be defined in another format, such as A-format or pre-combined channels using fixed matrixing.

[0009] The signals to be processed by the encoder / decoder are presented as successions of blocks of sound samples called "frames" or "subframes" below.

[0010] Furthermore, the mathematical notations below follow the following convention: Scalar: s or N (lowercase for variables or uppercase for constants) Vector: q (lowercase, bold, and italics) Matrix: M (capital letters, bold and italics)

[0011] The simplest approach to encoding an ambisonic signal is to use a mono encoder (e.g., EVS) and apply this mono encoder in parallel to all channels, possibly with a different bit allocation for each input channel. This approach is referred to here as "multi-mono." The multi-mono approach can be extended to multi-stereo encoding (where pairs of channels are encoded separately by a stereo codec) or, more generally, to the use of multiple parallel instances of the same core codec.

[0012] In multi-mono encoding, the input signal is divided into (mono) channels, which are individually encoded. After decoding, the channels are recombined. The resulting quality varies depending on the mono encoding used and is generally only satisfactory at very high bit rates, for example, with a bit rate of at least 48 kbit / s per mono channel for EVS encoding. Thus, at first order, a minimum bit rate of 4 x 48 = 192 kbit / s is obtained.

[0013] Because the multi-mono coding approach does not account for channel correlation, it produces spatial distortions at low bitrates, introducing various artifacts such as the appearance of ghost sound sources, background noise, or shifts in sound source trajectories. Therefore, encoding an ambisonic signal using this approach results in degraded spatialization.

[0014] Various more advanced solutions have been proposed for encoding ambisonic signals. The invention focuses on a particular approach to ambisonic coding, using the quantization and interpolation of rotation matrices, as described for example in patent application WO2020177981.

[0015] In this approach, 4x4 rotation matrices (obtained from a PCA / KLT analysis such as that described, for example, in the aforementioned patent application) are converted, for instance, into 6 generalized Euler angles, which are encoded by uniform scalar quantization. An inverse conversion is then applied to recover the decoded rotation matrices, followed by subframe interpolation in the quaternion domain. It is worth recalling that a method for converting a rotation matrix into generalized Euler angles is given in the article "Generalization of Euler Angles to N-Dimensional Orthogonal Matrices" by David K. Hoffman, Richard C. Raffenetti, and Klaus Ruedenberg, published in the Journal of Mathematical Physics 13, 528 (1972).

[0016] The strategy for this type of ambisonic coding is to decorrelate the channels of the ambisonic signal as much as possible and then encode them separately with a core codec (e.g., multi-mono). This strategy helps to limit artifacts in the decoded ambisonic signal. More specifically, optimized decorrelation of the input signals is applied before encoding (e.g., multi-mono). Furthermore, the quaternion domain allows for the interpolation of transformation matrices calculated for PCA / KLT analysis rather than repeating an eigenvalue and eigenvector decomposition multiple times per frame; since the transformation matrices are rotation matrices, the inverse matrixing operation during decoding is simply performed by transposing the matrix applied during encoding.

[0017] There figure 1 illustrates coding according to this state-of-the-art approach. Coding takes place in several stages: The channel signals (e.g., W, Y, Z, X for the FOA case) are assumed to be in matrix form X with an n × matrix L (for n ambisonic channels (here 4) and L samples per frame). These channels can optionally be pre-processed, for example, by a high-pass filter. A principal component analysis (PCA) or, equivalently, a Karhunen-Loeve transform (KLT) is applied to these signals, with covariance matrix estimation (block 100) and eigenvalue decomposition (EVD) for " Eigen Value Decomposition » in English (block 110), to obtain eigenvalues ​​and an eigenvector matrix from a covariance matrix of the n signals. The eigenvector matrix, obtained for the current frame t, undergoes signed permutations (block 120) to align it as closely as possible with the eigenvector matrix of the same type from the previous frame t - 1, in order to ensure maximum consistency between the matrices between two frames. Block 120 also verifies that the eigenvector matrix of the current frame t, thus corrected by signed permutations, accurately represents the application of a rotation. The eigenvector matrix for the current frame t (which is a rotation matrix) is converted into an appropriate domain of quantization parameters (block 130). In an example of an embodiment of patent application WO2020177981, the parameters correspond to 6 generalized Euler angles for a 4x4 matrix; We would have 3 Euler angles for a 3x3 matrix.

[0018] These parameters are then encoded (block 140) using a number of bits allocated for parameter quantization. For example, a scalar quantization of generalized Euler angles can be used, with the same quantization step for each angle. In an example of an embodiment of patent application WO2020177981, the decoded parameters (in the form of generalized Euler angles) are converted into a rotation matrix (block 142), and then the resulting rotation matrix is ​​converted into quaternions (block 143). The current frame is divided into subframes, the number of which can be fixed or adaptive—in the latter case, this number can be determined based on information from PCA / KLT analysis and can be optionally transmitted (block 150). The quaternion representation is interpolated (block 160) by successive subframes from the previous frame. t - 1 up to the current frame t,to smooth out the difference between matrixing over time. The quaternions interpolated in each subframe are converted into rotation matrices (block 162), and then the resulting decoded and interpolated rotation matrices are applied (block 170). In each frame, block 170 outputs a matrix n × ( L / K ) representing each of the K Subframes of the ambisonic channel signals are used to decorrelate these signals as much as possible before encoding (e.g., multi-mono encoding). Binary allocation to the separate channels is also performed.

[0019] There figure 2 illustrates the corresponding decoding.

[0020] The quantization indices of the rotation matrix quantization parameters in the current frame are decoded in block 200. The decoder's conversion and interpolation steps (blocks 242, 243, 260, 262) are identical to those performed in the encoder (blocks 142, 143, 160, and 162). If the number of interpolation subframes is adaptive, it is decoded (block 210); otherwise, the number of interpolation subframes is fixed to a predetermined value.

[0021] Block 220 applies by subframe the inverse matrixing from block 262 to the decoded signals of the ambisonic channels, recalling that the inverse of a rotation matrix is ​​its transpose.

[0022] In the aforementioned patent application, the quantization of 3x3 or 4x4 rotation matrices is preferentially performed in the domain of Euler angles (3x3 case) or generalized Euler angles (4x4 case), and the interpolation is performed in the domain of quaternions. This implies multiple conversions between different matrices and parameters, thus increasing complexity because two different types of parameters are used for quantization and interpolation. Furthermore, the conversion to Euler angles—in particular to generalized Euler angles according to the method described in the article by Hoffman et al.—is complex.- can pose some problems in practice, because it can be numerically 'unstable', in the sense that the combination of the direct and inverse conversion (of matrix to Euler angles followed by the inverse conversion) may not exactly give back the original matrix (even in the absence of quantization of the angles) and quantization can induce problems such as gimbal lock which consists of the loss of a degree of freedom, which occurs when the axes of two of the three gimbals needed to apply or compensate for rotations in three-dimensional space are carried in the same direction; in such cases, decorrelation by PCA / KLT is no longer optimal.

[0023] It would be more advantageous to use only one type of parameter for encoding and interpolating rotation matrices. A conversion of the rotation matrix can be performed in the quaternion domain, and parameter quantization resulting from this conversion can be used to replace the quantization of parameters such as Euler angles (generalized or not). The literature does not provide efficient methods for encoding a quaternion or double quaternion while constrained to represent a rotation matrix with a precision similar to the quantization of Euler angles (generalized or not) and within a given bit budget—for example, around 25 bits per quaternion or 50 bits per double quaternion.

[0024] Therefore, there is a need to optimize this quantification of parameters in terms of throughput and / or complexity and / or information storage.

[0025] The invention improves upon the existing state of the art.

[0026] To this end, the invention relates to a method for encoding a multichannel sound signal, comprising the formation of a transformation matrix in the form of a rotation matrix to be applied to the input signals, a quantization of the rotation matrix and an encoding of the transformed signals after application of the rotation matrix, in which the quantization of the rotation matrix comprises the following operations: convert the rotation matrix in the quaternion domain with at least one first quaternion; force said first quaternion to have a positive component; convert the at least one first quaternion into spherical coordinates, one of the spherical coordinates being associated with the forced positive component of the first quaternion; quantize the spherical coordinates obtained, the spherical coordinate associated with the forced positive component of the first quaternion being quantized over a half-length interval.

[0027] The quantization of quaternions to encode the rotation matrix avoids multiple conversions since the quaternion domain is also used to perform an interpolation of the rotation matrix before applying this matrix to the multichannel signal.

[0028] This quantization method is further optimized to restrict the data rate by forcing one of a quaternion's parameters to be positive, thus encoding only the relevant positive quaternion, with the negative quaternion corresponding to the same rotation. Conversion to spherical coordinates and quantization of these spherical coordinates allows the use of a quantization method that does not require costly dictionaries, both in terms of memory space and processing power. Quantization over half the interval also provides a further data rate improvement.

[0029] In a particular embodiment, the positive component of said first quaternion is its real component.

[0030] Simply put, the real component (a 1 ) of the first quaternion is chosen by convention.

[0031] In one embodiment, the rotation matrix is ​​converted into a double quaternion, a first quaternion for which one component is forced to be positive and a second quaternion.

[0032] According to one embodiment, the quantization of the first quaternion uses one less bit than the quantization of the second quaternion. The throughput is thus optimized.

[0033] In one embodiment, the conversion to spherical coordinates of each of the two quaternions of the double quaternion gives three angles, and the quantization of the angle associated with the positive component of the first quaternion is carried out according to a half-length interval with respect to the interval used to quantify the same component in the second quaternion.

[0034] Obtaining these angles for each quaternion allows for less complex parameter quantification. Indeed, quantifying the angles thus obtained, rather than quantifying the quaternion itself, is less complex because it does not necessarily require the use of costly dictionaries, both in terms of memory space and processing power.

[0035] Taking into account the positive component of the first quaternion allows for quantification over a restricted interval on this quaternion, which minimizes the throughput to be allocated for the quantification of this quaternion.

[0036] In a particular embodiment of this mode, the quantification of the six angles obtained is carried out by uniform scalar quantization.

[0037] This method of quantification is simple and not very complex.

[0038] In another particular embodiment, the quantification of the six angles obtained is carried out by vector quantization with hyper-rectangular support.

[0039] This quantization method is another simple and uncomplicated alternative. In one particular embodiment, a binary indicator is further coded to show whether at least one first quaternion takes default values.

[0040] The default values ​​of the quaternions are typically such as q=(1,0,0,0), indicating that the transformation matrix is ​​an identity matrix. In this case, if the binary indication shows that the quaternions take these default values, it indicates that the transformation is disabled for the current frame.

[0041] The invention also relates to a method for decoding a multichannel audio signal, comprising the reception of coded signals from a multichannel signal and further comprising the following operations: receive quantized spherical coordinate parameters of a set of at least one first quaternion and an indication of the existence of a positive component; decode the at least one first quaternion from the received quantized parameters by taking a half-length quantization interval to decode a spherical coordinate associated with the indicated positive component; construct an inverse rotation matrix from the decoded at least one first quaternion; apply said inverse rotation matrix to the received coded signals, before decoding said signals.

[0042] Thus, the decoder can receive and decode a set of quaternions which allows the reconstruction of a rotation matrix useful for decoding the multichannel signal.

[0043] Obtaining a positivity index for a component of at least one quaternion allows for the application of an appropriate decoding, decoding only the positive quaternion to deduce the negative quaternion.

[0044] This set of quaternions also allows its use to interpolate the resulting rotation matrix, without having to perform other conversions of this matrix, in order to obtain an interpolated matrix applicable to the signals of the multichannel signal.

[0045] Decoding this set of quaternions can be done with less complexity, especially when the coded parameters are angles from a double quaternion.

[0046] An inverse scalar quantization method can, for example, be implemented in this case.

[0047] The invention also relates to an encoding device comprising a processing circuit for implementing the encoding method as described above. The invention also relates to a decoding device comprising a processing circuit for implementing the decoding method as described above. The invention further relates to a computer program comprising instructions for implementing the encoding or decoding methods as described above, when executed by a processor.

[0048] Finally, the invention relates to a processor-readable storage medium that stores a computer program containing instructions for executing the coding or decoding processes described above.

[0049] Other features and advantages of the invention will become clearer upon reading the following description of particular embodiments, given by way of simple illustrative and non-limiting examples, and the accompanying drawings, among which: [ Fig 1 ] There figure 1 illustrates an embodiment of an encoder and an coding process according to a state-of-the-art method; [ Fig 2 ] There figure 2 illustrates an embodiment of a decoder and a decoding process according to a state-of-the-art method; [ Fig 3 ] There figure 3 illustrates an embodiment of an encoder and an coding method according to the invention; [ Fig 4 ] There figure 4 illustrates an embodiment of a decoder and a decoding method according to the invention; [ Fig 5a ] There figure 5a illustrates in flowchart form the steps implemented by the conversion and quantization blocks during the encoding of a multichannel audio signal according to an embodiment of the invention; [ Fig 5b ] There figure 5b illustrates in flowchart form the steps implemented during the quantification of a double quaternion according to one embodiment of the invention; [ Fig 5c ] There figure 5c illustrates in flowchart form the steps implemented during the quantification of a quaternion according to a first embodiment of the invention; [ Fig 5d ] There figure 5d illustrates in flowchart form the steps implemented during the quantification of angles from a quaternion according to a first embodiment of the invention; [ Fig 5e ] There figure 5e illustrates in flowchart form the steps implemented during the quantification of an angle according to a particular embodiment of the invention; [ Fig 6a ] There figure 6a illustrates in flowchart form the steps implemented during the inverse quantization of a double quaternion during the decoding of a multichannel audio signal, according to an embodiment of the invention; [ Fig 6b ] There figure 6b illustrates in flowchart form the steps implemented during the inverse quantization of an angle defining a quaternion, according to one embodiment of the invention; and [ Fig 7 ] There figure 7 illustrates examples of structural realization of an encoder and a decoder according to an embodiment of the invention.

[0050] There figure 3 illustrates an example of an embodiment of the coding method and an encoder according to the invention. The KLT / PCA analysis blocks 300, 310, and 320 per frame are, in one embodiment, identical to blocks 100, 110, and 120 of the figure 1 previously described; the quaternion interpolation blocks 350, 360 are identical to blocks 150 and 160 of the figure 1 and the inverse conversion block 362 and matrixing block 370 are identical to blocks 162 and 170 of the figure 1 However, the invention applies to cases where a different implementation is used for each of these blocks.

[0051] A more detailed description of these blocks can be found in the patent application cited above. Here, we have explicitly added the transformed signal coding block (block 380), which can be multi-mono coding or any other type of multichannel coding, and the multiplexing block (block 390), which forms the binary stream or payload of a coded data packet. The difference with the figure 1 resides in particular in the quaternion conversion (block 330) followed by optimized quantization (block 340) which is described later with reference to figures 5a à 5e , and in the multiplexing (block 390).

[0052] There figure 4 illustrates the corresponding decoding. Here again, we find the quaternion interpolation blocks (blocks 410 and 460) identical to blocks 210 and 260 of the figure 2 , the reverse conversion block 462 is identical to block 262 of the figure 2 and the 420 die-making block, identical to the 220 block of the figure 2 Here too, the decoding blocks for the transformed signals (block 480) and the demultiplexing block 490 have been explicitly added. The invention lies in the optimized decoding of quaternions in block 400, described later with reference to the figures 6a And 6b , and in the demultiplexing (block 490).

[0053] We recall here some explanatory concepts concerning rotations in dimension n and their conversion to quaternions in the 3x3 case and double quaternions in the 4x4 case. As described in the patent application cited above, the coding method uses a representation of rotations in dimension n=3 or 4 with parameters adapted for frame quantization and efficient subframe interpolation. We define below some rotation representations that can be used in dimensions 3 and 4, and we focus on dimension 4 in the preferred embodiment.

[0054] A rotation (around the origin) is a transformation of space in dimension n that changes one vector into another vector, such that: The magnitude of the vector is preserved; The cross product of vectors defining an orthonormal frame before rotation is preserved after rotation (there is no reflection).

[0055] A matrix M size n × n is a rotation matrix if and only if M T< M = I n Or I n denotes the identity matrix of size n × n (that is to say that M is a unitary matrix, M T< designating the transposition of M ) and its determinant is +1. Note in passing that the inverse of M is its transposition.

[0056] There are several representations equivalent to the rotation matrix representation.

[0057] In three-dimensional (3D) space (n = 3): Euler angles, unit quaternions, or an axis-angle representation are often used to represent a 3D rotation—the latter is not described here. The three-angle Euler representation stems from the fact that a 3x3 rotation matrix can be decomposed into a product of three elementary rotation matrices; the elementary rotation matrices with angle θ along the axes x, y, Or z are given below: M 3 , x θ = 1 0 0 0 cos θ − sin θ 0 sin θ cos θ M 3 , y θ = cos θ 0 sin θ 0 1 0 − sin θ 0 cos θ M 3 , z θ = cos θ − sin θ 0 sin θ cos θ 0 0 0 1

[0058] Depending on the combinations of axes and whether the axes are defined in absolute or relative terms, the angles are called Euler angles or Cardan angles.

[0059] A 3D rotation can also be represented by a quaternion. Quaternions are a generalization of complex numbers with four components in the form of a number q = a + bi + cj + dk Or i 2<= j 2< = k 2< = ijk = -1.

[0060] The real a is called scalar and the three imaginary parts ( b, c, d ) form a 3D vector. The norm of a quaternion is q = a 2 + b 2 + c 2 + d 2 Unit quaternions (of norm 1) represent rotations - however, this representation is not unique; thus, if q represents a rotation, -q represents the same rotation. In the following, the term quaternion is to be taken in the sense of unitary quaternion, and the qualifier "unitary" is not systematically repeated - except for occasional reminders - so as not to make the text cumbersome.

[0061] It should be noted that in literature the quaternion q = a + bi + cj + dk is generally seen as a vector ( a, b, c, d ) of dimension 4; sometimes the real part is permuted into ( b, c, d, a) - we subsequently assume, without loss of generality, the convention on the order of elements in the form ( a, b, c, d ). Subsequently, we will call composante of a quaternion each of the elements a, b, c, d. So, a is also subsequently referred to as the real component of q.

[0062] Given a unit quaternion q = a + bi + cj + dk (with a 2< + b 2< + c 2< + d 2 < = 1), the associated 3D rotation matrix is: M 3 , quat q = a 2 + b 2 − c 2 − d 2 2 bc − ad 2 ac + bd 2 ad + bc a 2 − b 2 + c 2 − d 2 2 cd − ab 2 bd − ac 2 ab + cd a 2 − b 2 − c 2 + d 2

[0063] Conversely, for a 3x3 rotation matrix, we can determine an associated quaternion (up to a sign); indeed, q And -q represent the same matrix M 3 ,quat ( q ) = M 3, quat (- q ). A method for converting M 3 ,quat ( q ) at ± q is described further on in relation to block 330.

[0064] Euler angles are not suitable for properly interpolating 3D rotations; quaternions are used instead. The SLERP (spherical linear interpolation) method involves interpolating according to the formula: slerp q 1 q 2 α = sin 1 − α Ω sin Ω q 1 + sin α Ω sin Ω q 2 where 0 ≤ α ≤ 1 is the interpolation factor for going from q 1 to q 2 and Ω is the angle between the two quaternions: Ω = arccos q 1 . q 2 Or q 1 . q 2 denotes the dot product between two quaternions (identical to the dot product between two 4-dimensional vectors). This is equivalent to interpolating along a great circle on a 4D sphere with a constant angular velocity as a function of α It is important to ensure that the shortest path is used for the interpolant by changing the sign of one of the quaternions when q 1. q 2 < 0.Note that other quaternion interpolation methods can be used (NLERP for "normalized linear interpolation" which amounts to interpolating on a string and renormalizing the result, splines, etc.).

[0065] In dimension 4 (n = 4), a rotation can be parameterized by n n − 1 2 = 6 generalized Euler angles as indicated in the patent application cited above.

[0066] We are interested here in the double quaternion representation. This representation requires the use of the matrix form of a quaternion.

[0067] We define 4x4 matrices, called quaternions here. (Q) and antiquaternion ( Q ★< ), associated with a (unit) quaternion q = a + bi + cj + dk by: Q = a − b − c − d b a − d c c d a − b d − c b a And Q ⋆ = a − b − c − d b a d − c c − d a b d c − b a which corresponds to the "column convention", because a quaternion is then represented as a vecteur 4D colonne. Matrices Q And Q*correspond respectively to a left multiplication by q and a multiplication on the right by q .

[0068] We can verify that the product of the two quaternions q 1 q 2 is obtained equivalently in matrix form: q 1 q 2 = Q 1 a 2 b 2 c 2 d 2 = Q 2 ⋆ a 1 b 1 c 1 d 1 where, for quaternions q 1 = a 1 + b 1 i + c 1 j + d 1 k And q 2 = a 2 + b 2 i + c 2 j + d 2 k, with : Q 1 = a 1 − b 1 − c 1 − d 1 b 1 a 1 − d 1 c 1 c 1 d 1 a 1 − b 1 d 1 − c 1 b 1 a 1 And Q 2 ⋆ = a 2 − b 2 − c 2 − d 2 b 2 a 2 d 2 − c 2 c 2 − d 2 a 2 b 2 d 2 c 2 − b 2 a 2

[0069] Given two unit quaternions q 1 and q 2 , the product of Q 1 And Q 2 ⋆ gives a 4x4 matrix that satisfies the properties of a rotation matrix (unitary matrix and determinant equal to 1): M 4 , quat q 1 q 2 = Q 1 Q 2 ⋆

[0070] It should be noted that M 4 ,quat ( q 1 , q 2) = M 4, quat ( q 2 , q 1)

[0071] Conversely, given a 4x4 rotation matrix, it is possible to find an associated double quaternion ( q 1 , q 2) and the corresponding quaternion and antiquaternion matrices. In other words, this matrix can be factored into a matrix product of the form Q 1 Q 2 ⋆ , for example with the so-called "Cayley factorization" method. This generally involves calculating an intermediate matrix called the "associated matrix" (or "tetragonal transform") and deducing the quaternions up to an indeterminate sign of the two quaternions. Note that M 4, quat ( q 1 , q 2 ) = M 4, quat (- q 1 , - q 2 ); this property is used in the context of the invention to more efficiently encode quaternions.

[0072] In some variations, the definition of quaternion and antiquaternion matrices may follow different conventions. For example: convention line: Q = a b c d − b a − d c − c d a − b − d − c b a And Q ⋆ = a − b − c − d b a − d c c d a − b d − c b a convention of the article which permutes certain components and changes certain signs: Q 1 = a 1 − d 1 c 1 − b 1 d 1 a 1 − b 1 − c 1 − c 1 b 1 a 1 − d 1 b 1 c 1 d 1 a 1 And Q2⋆=a2−d2c2b2d2a2−b2c2−c2b2a2d2−b2−c2−d2a2

[0073] In general, it is possible to insert a signed permutation matrix into the Cayley factorization, and the invention applies in all such cases. To simplify and without loss of generality, we subsequently describe only one example of a convention (the "column convention" described previously) at the output of block 330, which allows us to obtain a double quaternion ( q 1 , q 2 ) in the form of two 4D vectors to be coded.

[0074] These alternative conventions have an impact on block 330, which converts matrices to double quaternions (in particular on the calculation of the "associated matrix"), and on the inverse blocks 362 and 462, which calculate (explicitly or in an optimized way) the matrix product in the form Q 1 Q 2 ⋆ The expert will be able to adapt this calculation according to the adopted convention.

[0075] The 3x3 and 4x4 cases are linked by the fact that a 3D rotation can be viewed as a 4x4 rotation with the constraint: q 1 = q And q 2 = -q. In this case, M 4 , quat q , − q = Q Q ⋆ = 1 0 0 M 3 , quat q

[0076] As with the 4x4 case, to simplify and without loss of generality we subsequently describe only one example of a convention (the "column convention" described previously).

[0077] As described with reference to the figure 3 The invention relates to an encoder and an encoding method, in which blocks 330 and 340 implement a conversion of the rotation matrix from a KLT / PCA analysis and a quantification of the parameters of this matrix in an optimized manner.

[0078] The invention makes it possible to avoid obtaining a representation different from that used in block 360 for interpolation.

[0079] According to the invention, it is therefore preferentially chosen to quantify the 3- and 4-dimensional matrices in the domain of quaternions and double quaternions (respectively), which allows us to remain in the same domain for quantization and interpolation.

[0080] We are particularly interested in the case of a 4-dimensional matrix in the embodiment described now.

[0081] The PCA / KLT analysis and PCA / KLT transformation as described in patent application WO2020177981 are performed in the time domain. However, the invention also applies to cases where a PCA / KLT analysis is performed, for example, in the frequency domain with estimation of a (real) covariance matrix by sub-bands.

[0082] The coding method according to the invention implements the steps described with reference to the figure 3 Block 330 converts the rotation matrix into a double quaternion for the 4D case.

[0083] This conversion can be performed as follows for a rotation matrix M 4, quat ( q 1, q 2) noted here M = ( m ij ) i,j =0,..,3 To simplify the developments: We seek to factorize M in the form M = Q 1 Q 2 ⋆ ; Q 1 = a 1 b 1 c 1 d 1 − b 1 a 1 − d 1 c 1 − c 1 d 1 a 1 − b 1 − d 1 − c 1 b 1 a 1 And Q 2 ⋆ = a 2 − b 2 − c 2 − d 2 b 2 a 2 − d 2 c 2 c 2 d 2 a 2 − b 2 d 2 − c 2 b 2 a 2

[0084] It can be shown that this factorization is equivalent to solving: a 1 a 2 a 1 b 2 a 1 c 2 a 1 d 2 b 1 a 2 b 1 b 2 b 1 c 2 b 1 d 2 c 1 a 2 c 1 b 2 c 1 c 2 c 1 d 2 d 1 a 2 d 1 b 2 d 1 c 2 d 1 d 2 = U Or u is the "associated matrix" of M obtained from the coefficients m ij of M as follows: U ∥ 1 4 m 00 + m 11 + m 22 + m 33 m 10 − m 01 − m 32 + m 23 m 20 + m 31 − m 02 − m 13 m 30 − m 21 + m 12 − m 03 m 10 − m 01 + m 32 − m 23 − m 00 − m 11 + m 22 + m 33 m 30 − m 21 − m 12 + m 03 − m 20 − m 31 − m 02 − m 13 m 20 − m 31 − m 02 + m 13 − m 30 − m 21 − m 12 − m 03 − m 00 + m 11 − m 22 + ml 33 m 10 + m 01 − m 32 − m 23 m 30 + m 21 − m 12 − m 03 m 20 − m 31 − m 02 − m 13 − m 10 − m 01 − m 32 − m 23 − m 00 + m 11 + m 22 − m 33

[0085] Given the coefficients U = ( u ij ) ij =0,..,3' We find, line by line, after squaring and summing all the coefficients for each line: a 1 2 a 2 2 + b 2 2 + c 2 2 + d 2 2 = ∑ j = 0 3 u Oj 2 b 1 2 a 2 2 + b 2 2 + c 2 2 + d 2 2 = ∑ j = 0 3 u 1 j 2 c 1 2 a 2 2 + b 2 2 + c 2 2 + d 2 2 = ∑ j = 0 3 u 2 j 2 d 1 2 a 2 2 + b 2 2 + c 2 2 + d 2 2 = ∑ j = 0 3 u 3 j 2

[0086] Which gives, like the quaternion q 2 is unitary (that is a 2 2< + b 2 2< + c 2 2< + d 2 2< = 1): a 1 = sign u 0 k ∑ j = 0 3 u 0 j 2 b 1 = sign u 1 k ∑ j = 0 3 u 1 j 2 c 1 = sign u 2 k ∑ j = 0 3 u 2 j 2 d 1 = sign u 3 k ∑ j = 0 3 u 3 j 2

[0087] By convention, the sign of the components a 1, b 1, c 1, d 1 is given respectively by the sign of u 0 k , u 1 k ,u 2 k , u 3k where k is chosen on the interval 0, ..,3. Note that the factorization has two possible solutions, since the opposite convention would also be a solution.

[0088] By choosing the component with the maximum absolute value (guaranteed non-zero because the quaternion q 1 is unitary) among a 1, b 1, c 1, d 1, for example, and without loss of generality a Since 1 ≠ 0, we deduce: a 2 b 2 c 2 d 2 = 1 a 1 u 00 u 01 u 02 u 03 (if another component than a 1 is selected, for example b 1, we would have 1 b 1 u 10 u 11 u 12 u 13 ).

[0089] Therefore, we obtain two 4D vectors at the output of block 330 ( a 1, b 1, c 1, d 1) and ( a 2, b 2, c 2, d 2) representing the double quaternion ( q 1 , q 2 ).

[0090] The quaternion conversion for the 3D case can be performed as follows for a matrix M 3 ,quat ( q ) noted M = ( a ij ) i,j = 0,..,2 We reuse the 4x4 case starting from the extended rotation matrix: M 4 , quat q , − q = QQ * = 1 0 0 M 3 , quat q

[0091] The associated matrix simplifies to: U ∥ 1 4 m 00 + m 11 + m 22 + a 33 − m 21 + m 12 m 20 − m 02 − m 10 + m 01 m 21 − m 12 − 1 − m 00 + m 11 + m 22 − m 10 − m 01 − m 20 − m 02 − m 20 + m 02 − m 10 − m 01 − 1 + m 00 − m 11 + m 22 − m 21 − m 12 m 10 − m 01 − m 20 − m 02 − m 21 − m 12 − 1 + m 00 + m 11 − m 22

[0092] The rest of the factorization method remains the same, except that it is sufficient to determine only one quaternion, for example, q 1 , the other ( q 2 ) being opposite - we therefore determine a 1, b 1, c 1, d 1 by the square root of partial sums of squared terms U , with a sign determination according to the designated convention.

[0093] Therefore, the output of block 330 is a 3D vector ( a 1, b 1, c 1, d 1) representing the quaternion q 1 = q.

[0094] According to the invention, block 340 performs the coding of the quaternions obtained, in the embodiment described here, of a double quaternion for the 4x4 case.

[0095] We now refer to the figure 5a to describe, according to an embodiment of the invention, this operation of quantifying the double quaternion obtained.

[0096] With reference to the figure 5a given two unit quaternions q i = ( a i ,b i ,c i ,d i ), i = 1, 2, obtained by the conversion block 330, at step E300, an operation consisting of forcing a first quaternion, for example q 1 , in the double quaternion ( q 1 , q 2 ) to have a positive component is carried out in E310 and E320. In a particular embodiment, it is the real component ( a 1) of the first quaternion which is forced to be positive, by convention.

[0097] To do this, we check in E310 if the real component a i is negative. If so, we replace the two quaternions in E320 q 1 And q 2 by their opposites - q 1 And - q 2 It is worth noting that this operation does not change the 4D rotation matrix associated with the double quaternion.

[0098] These two quaternions are then encoded by quantization in step E330.

[0099] In a first embodiment, in order to minimize complexity, we quantify in E330, q 1 And q 2 by the quantification device represented by block 340 of the figure 3 and by a method such as that described with reference to the figure 5b described now.

[0100] Given two unit quaternions in E380 q i = ( a i ,b i ,c i ,d i ), i = 1, 2 with a first quaternion q 1. For which a component has been forced positive. For this quaternion, an indicator of the absence of a positive component (denoted F1) is set to 0 (since a positive component does exist). This indicator is set to 1 (F2 = 1) for the second quaternion. q 2 The parameter F (for "Full range" in English) allows us to distinguish between the intervals [0, π / 2] (F=0) and [0, π] (F=1).

[0101] A coding step of the first quaternion q 1 is performed E381 (Cod. q 1 ) taking into account the indication of absence of positive component F 1 =0 given for q 1 and a coding step of the second quaternion q 2 is performed E382 (Cod. q 2 ) taking into account the indication of absence of positive component F 2 =1 given for q 2 .

[0102] These two steps are now detailed with reference to the figure 5c , in a particular mode of embodiment.

[0103] Starting from a unitary quaternion q i = ( a i ,b i ,c i ,d i ), in E510, this quaternion is converted into E520 in three angles ( ω i ,θ i ,φ i ), which can be approximated by spherical coordinates. These three angles are defined as follows for a quaternion q i : ω i = arccos a i θ i = arctan 2 c i b i φ i = arccos d i b i 2 + c i 2 + d i 2 where arccos is the arccosine function (with values ​​between [0, π]) and arctan 2 is the arctangent on the 4 quadrants to obtain an angle on [-π, π]. In variants, other definitions of angles ω i , θ i Or φ i can be adopted (for example from an arcsine function denoted arcsin); in this case, the quantification must take into account a different interval (e.g. [-π / 2, π / 2] instead of [0, π]) and the formulas given above for the determination of the 3 angles must also be adapted accordingly (such as the inverse conversion).

[0104] The three angles ω i , θ i And φ i such as defined above have values ​​on the interval [0, π], [-π, π] and [0, π] respectively.

[0105] In order to minimize complexity, the three angles are quantized in E530, for example by uniform scalar quantization, taking into account the index F i as defined above, given in E531, for a quaternion q i .

[0106] There figure 5d now describes the steps implemented in E530 to quantify these 3 angles.

[0107] Given in E540 the three angles ω i , θ i And φ i , and in E531 the indication Fi, these angles are quantized respectively in E541, E542 and E543 to obtain three quantization indices (idx i1 , idx i2 , idx i3 ) in E551, E552 and E553, for a quaternion q i .

[0108] For this, a parameter F (for "Full range") defining the width of the quantization interval and T (for "two sided") defining the existence of positive and negative values ​​in the interval are defined for each of the angles.

[0109] In the case of the angle ω i , The value of F corresponds to the value of Fi, that is, the indication of the absence of a positive component. In the case of a first quaternion for which the value of a component has been forced positive, this value will be 0, that is, the width of the quantization interval will be reduced to half the interval.

[0110] Conversely, for a second quaternion, whose value of F i is 1, the entire quantization interval is used (F=1).

[0111] In the case of the angle ω i , The value of T is set to 0, meaning that the quantization interval does not include negative values. Indeed, the quantization interval is [0, π / 2] or [0, π] for this angle.

[0112] In the case of the angle θ i The quantization interval is [-π, π]. The value of F is defined as 1 and that of T as 1.

[0113] In the case of the angle φ i , The quantization interval is [0, π]. The value of F is defined as 1 and that of T as 0.

[0114] The step of quantifying an angle noted a generically, such as step E541, E542 or E543, which is now detailed in the flowchart of the figure 5e .

[0115] Starting from the respective values ​​of E560 a (angle value ω i , θ i And φ i ), T and F as defined above, the parameters N and N' are defined in E561.

[0116] N= 2 R< and N'=N / 2 where R is the number of bits fixed for example to 8 bits.

[0117] In E562, we check the value of F. If F=0, the width of the quantization interval is halved and therefore has a maximum value ( maxval ) of π / 2 in E563. Otherwise, if F=1, the quantization interval is not reduced and its maximum value ( maxval ) is of π.

[0118] In E565, the value of the quantization index idx is initialized to the value 0.

[0119] In E566, the value of T is checked. If T is equal to 1, in step E567, it is checked whether the value of a is negative. If so, the absolute value of the angle a is taken in E568, and an offset (N') is added to the quantization index.

[0120] We update the value of N in E569 (N=N') to indicate that half of the quantization indices are reserved for positive values.

[0121] In the event thata is positive in E567, we go directly to step E569.

[0122] In E570, a quantization step d is defined as the maximum value ( maxval ) of the interval on N - 1.

[0123] In the case where T is equal to 0 in E566, we go directly to step E570.

[0124] In E571, we check the value of a by comparing it to the maximum value of the interval. In the case where a is greater than this maximum value ( maxval ), step E572 defined as a quantified value m = N - 1, otherwise, this quantified value is defined as a rounded value: m = a d + 0.5 In E574, the quantization index value is updated with this quantized value m.

[0125] This yields the quantization value idx of the angle encoded in E575, which can then be sent to a decoder. In variations, other forms of scalar quantization can be implemented (e.g., different quantization steps, decision thresholds, or reconstruction levels), and the binary allocation R can be different from 8 bits for each angle. ω i , θ i And φ i in order to have a specific bit budget for each of the angles.

[0126] It should be noted that, according to the invention, the coding of q 1 requires one less bit than the encoding of q 2 because we are exploiting the constraint a 1 ≥ 0 by defining ω 1 on [0, π / 2] instead of [0, π]. Indeed, for the case of uniform scalar quantization on R bits (for example R=8 bits), with N = 2 R< quantization values ​​(or reconstruction levels), if the quantization step d is fixed at d = ( π / 2) / ( N - 1) to cover the half-length interval from 0 to π / 2 (inclusive) with N - 1 subinterval, we will need N - 2 additional sub-intervals of the same width d to cover the entire range from 0 to π, which requires 1 more bit. To avoid leaving an unused value, the step size can also be slightly adjusted to d' = π / ( N - 1) where N = 2 R +1< . For R=8 bits, the difference d - d' is negligible, it is ( π / 2) / 255 - π / 511, on the order of 0.0007 degrees.

[0127] Thus, for the coding of q 1 8 bits are used for ω 1, 9 bits for θ 1 and 8 bits for φ 1, or 25 bits. For the encoding of q 2 9 bits are used for ω 2, 9 bits for θ 2, 8 bits for φ 2, or 26 bits. In total, the budget used is therefore 51 bits. The roles of q 1 and q 2 can obviously be swapped to force a component to be positive and for quantification.

[0128] The coding process as described for the figure 3 This process includes an interpolation step performed by block 360, which is calculated for the two resulting quaternions. It is not necessary here to perform a conversion between different domains, for example between the domain of generalized Euler angles and that of quaternions, since the double quaternions used for quantization are already obtained after decoding.

[0129] In the embodiment presented here, the quaternions used in the interpolation step of block 360 of the figure 3 come from a local decoding of the quantized quaternions in block 340. This local decoding is indeed carried out so that the interpolation step is carried out in the same way on the encoder side as on the decoder side in order to obtain a perfect reconstruction at the decoder (in the absence of coding noise introduced by blocks 380 and 480).

[0130] However, in one embodiment, the quaternions used for the interpolation step of block 360 can come directly from the conversion step of block 330 without going through the quantization and inverse quantization steps. This interpolation can be performed as described in the patent application cited above. Other embodiments of the interpolation are possible.

[0131] Once the interpolation has been calculated separately for the two quaternions q 1 and q 2 , a 4x4 rotation matrix is ​​calculated, for example by explicitly calculating the matrix product M = Q 1 Q 2 ⋆ = Q 2 Q 1 ⋆ after forming the matrices Q 1 and Q 2 ⋆ (Or Q 2 and Q 1 ⋆ ) as defined previously.

[0132] In one alternative implementation, the 6 angles, ω 1, θ 1, φ 1, ω 2, θ 2, φ 2 obtained can be quantified by a vector quantization method with "hyper-rectangular" support ([0,π / 2]x[-π,π]x[0,π]x[0,π]x[-π,π]x[0,π]), taking into account the respective intervals as defined above, for example according to the TCQ method described in JP Adoul, Lattice and Trellis Coded Quantizations for efficient Coding of Speech, In: Ayuso, Soler (eds), Speech Recognition and Coding, NATO ASI Series, 1995.

[0133] In another example of implementation, scalar quantization could be applied to both angles. ω 1 and ω 2 (corresponding to the real part of the quaternions) and a separate 3-dimensional spherical quantization can be performed for the other angles, θ 1 , φ 1 and θ 2, φ 2, corresponding to the imaginary parts of the quaternions. The quantization dictionary can generally be any discretization of the sphere by a finite number of points, but it is advantageous to take a quasi-uniform discretization (of the Lebedev type, t-design, etc.) for better performance, and in variants a lat-long (latitude-longitude) type discretization can also be used.

[0134] A long-latitude approach is described below: The components ( b i ,c i ,d i ) are viewed as a 3D Cartesian vector, which can be put into the form of spherical coordinates ( r i , θ i , φ i The radius r i is given by r i = sin ( ω i The angles θ i , φ i are determined as described in the invention; they correspond respectively to longitude and latitude. These angles can be quantified according to the dictionary (with angles in degrees) as described in section 3.2 in the article Perotin et al., CRNN-based multiple DoA estimation using acoustic intensity features for Ambisonics recordings, IEEE Journal of Selected Topics in Signal Processing, 2019: φ ^ n = − 90 + n I α 180 , n = 0 , … , I α θ ^ m n = − 180 + m J n α + 1 360 , m = 0 , … , J n α Or où I α = 180 α et J n α = 360 α cos φ ^ n

[0135] Note, however, that latitude is defined in the article by Perotin et al. using an arcsin function, so the conversion 90 - φ̂ n to code the angle φ i defined here - without loss of generality - with an arccos function.

[0136] This involves a conditional quantification of 2 angles where the latitude is coded first φ i by finding the nearest neighbor among 90 - φ̂ n , n = 0, ... , I ( α ) and then we code the longitude θ i by finding the nearest neighbor among θ ^ m n depending on the selected index n.

[0137] The number of bits needed is log 2 N α Or N α = ∑ n = 0 I α J n α

[0138] The dictionary, for example, is of a certain size. N ( α ) = 429, 1687 or 4645 for α =10, 5, or 3 degrees (respectively), or 9, 11, or 13 bits (rounded up to the nearest integer). Other reconstruction levels 90 - φ̂ n and / or θ̂ m (and other decision thresholds) can be used for a dictionary of size N ( α ) given.

[0139] In variants of the invention, a unit quaternion is coded at step E330 q i = ( a i ,b i ,c i ,d i ), using spherical coordinates in 4 dimensions (noting here that the radius is fixed at 1 because the quaternion q i is unitary): a i = cos ϕ i 0 b i = sin ϕ i 0 cos ϕ i 1 c i = sin ϕ i 0 sin ϕ i 1 cos ϕ i 2 d i = sin ϕ i 0 sin ϕ i 1 sin ϕ i 2 Or ϕ i 0 is on [0, π] or [0, π / 2] according to the invention, ϕ i 1 on [0, π] and ϕ i 2 on [0, 2π].

[0140] Spherical coordinates can be determined by: ϕ i 0 = arc cos a i ϕi 1 = arccos b i / b i 2 + c i 2 + d i 2 ϕi 2 = arccos c i / c i 2 + d i 2 d i ≥ 0 2 π − arccos c i / c 2 + d i 2 d i < 0

[0141] Special cases where some components are zero (e.g., c i = 0, d i = 0) are not dealt with here but by convention the angle corresponding to zero values ​​can be set to 0.

[0142] For this variant, all the embodiments described previously for the coding of 6 angles (separate or conjunct) apply.

[0143] In variants, other definitions of spherical coordinates may be used.

[0144] In a second embodiment, a spherical vector quantization of dimension 4 is implemented.

[0145] Forcing a component of the first quaternion to be positive allows us to determine the sign of that quaternion and to encode only the positive quaternion, the negative quaternion corresponding to the same rotation. Thus, for the first quaternion, hemispherical vector quantization is sufficient and reduces the data rate compared to spherical quantization.

[0146] So q 1 can be quantified with a hemispheric dictionary (in which the first component of each codeword is positive) and q 2 with a spherical dictionary. The roles of q 1 And q 2 can obviously be interchanged to force a component to be positive and for quantification.

[0147] Examples of dictionaries can be given by predefined points in regular or irregular 4-dimensional polyhedra. A simple example of a 4-dimensional, 7-bit spherical dictionary is given by the 120 vertices of a "600-cell" which correspond to the combination of the following points: 8 signed permutations of (±1, 0, 0, 0) 16 signed permutations of (±½, ±½, ±½, ±½) 96 even permutations of ( ± 5 + 1 4 , ± 5 − 1 4 ( , ±½, 0)

[0148] The hemispherical version of such a dictionary includes the following 60 points (on 6 bits): 4 signed permutations of the "leader vector" (±1, 0, 0, 0) with the first component positive; 8 signed permutations of the leader (±½, ±½, ±½, ±½) with the first component positive; 48 even signed permutations of the leader ( ± 5 + 1 4 , ± 5 − 1 4 ,±½, 0) with the first component positive

[0149] Given a spherical or hemispherical dictionary, quantization consists of first finding the nearest neighbor of the quaternion to be encoded; generally, this operation can be optimized by exploiting the underlying algebraic structure and comparing only "absolute vectors" by dot product. Quantization also includes an explicit indexing step (calculating the quantization index identifying the nearest codeword), and generally the index is calculated using a (signed) permutation index and an offset that depends on the absolute vector representing the nearest neighbor. These concepts are considered to be already known to those skilled in the art. This vector quantization implementation has the disadvantage of requiring the explicit determination of the quantization index and also necessitating the storage of certain elements describing the quantization dictionary.To encode a quaternion with a budget of around 25 bits, the 4-dimensional dictionary must combine a very large number of combinations of representative (leader) points. Also, in other variants, conditional scalar quantization can be applied.

[0150] We will now return to the definition of spherical coordinates in 4 dimensions: a i = cos ϕ i 0 b i = sin ϕ i 0 cos ϕ i 1 c i = sin ϕ i 0 sin ϕ i 1 cos ϕ i 2 d i = sin ϕ i 0 sin ϕ i 1 sin ϕ i 2 Or ϕ i 0 is on [0, π] or [0, π / 2] according to the invention, ϕ i 1 on [0, π] and ϕ i 2 on [0, 2π].

[0151] The principle of spherical quantization in 3 dimensions is generalized to 4 dimensions using a lat-long dictionary. To do this, the angle ϕ i 0 is converted to degrees and quantized with a uniform-step scalar dictionary that depends on the interval: over an interval [0, 180]: ϕ ^ i 0 = n I α 180 , n = 0 , … , I α Or I α = 180 α . on an interval [0, 90]: ϕ ^ i 0 = n I α 90 , n = 0 , … , I α Or I α = 90 α The parameter α indicates the angular resolution (for example α (=5 degrees).

[0152] Next, the angle ϕ i 1 is converted into degrees and quantified with a scalar dictionary on the interval [0, π] whose number of subintervals (and reconstruction levels) ϕ̂ i 1) depends on the value of ϕ̂ i 0. Finally, the angle ϕ i 2 is converted into degrees and quantified with a scalar dictionary on the interval [0, 2π] whose number of subintervals (and reconstruction levels) ϕ̂ i 2) depends on the value of ϕ̂ i 0 and ϕ̂ i 1. Separate quantification dictionaries defining ϕ̂ i 1 and ϕ̂ i2 can be, in an example, defined from a 3-dimensional spherical quantization dictionary of type lat-long such that their size N ( α' ) is adapted according to the value of ϕ̂ i 0. The advantage of this variant is, in particular, that it has an element of the vector quantization dictionary that corresponds to q 1 = q 2 = (1,0,0,0) and also to be able to distribute the elements of the quantization dictionary more evenly in dimension 4 compared to an independent scalar quantization for each of the angles ϕ i 0, ϕ i 1, ϕ i 2.

[0153] In another variant of variable-rate coding, a step is added to select the coding type and decide on index multiplexing. A bit is defined that can indicate that the double quaternion is encoded by q 1 = q 2 = (1,0,0,0) (defined as default values) - which also indicates that the transformation matrix is ​​an identity matrix. In this case, the bit budget for encoding a double quaternion according to the main embodiment varies between two possible values: 1 bit if the double quaternion is encoded by the values q 1 = q 2 = (1,0,0,0) and 52 bits (1+51) otherwise; in the latter case, the invention described above is applied, and in variants, the quantization dictionary used may not contain the case q 1 = q 2 = (1,0,0,0) since this case is covered when only one bit is coded.

[0154] In addition, the multiplexing block (390) adds an extra bit to indicate the encoding mode used.

[0155] We now present an embodiment specific to the case of a 3x3 rotation matrix. The invention described above also applies with, in this case, q 1 = q And q 2 = -q. Therefore, we only code a single quaternion (for example q 1 Advantageously, the indication of the absence of a positive component F1 = 0 is used to save a bit. With the budget described in the embodiment, a 25-bit encoding is thus obtained. All possible encoding variants are found in the 3x3 case (spherical vector quantization with a hemispherical dictionary, conversion to spherical coordinates and angle quantization, etc.).

[0156] In a variant of this embodiment, a step for selecting the encoding type and deciding on index multiplexing can also be added. A global bit is defined that can indicate whether the quaternion is encoded by q = (1,0,0,0). In this case, the bit budget for encoding a quaternion according to this variant varies between two possible values: 1 bit if the quaternion is encoded by q = (1,0,0,0) and 26 bits (1+25) otherwise.

[0157] In all the variants described above for coding, it is also possible to optionally use entropic coding (e.g. Huffman or arithmetic type) after quantization, which can generally reduce the average throughput at the cost of a variable throughput.

[0158] We now describe the decoding process and in particular the inverse quantization step performed by block 400 of the figure 4 . There figure 6a It describes a method of implementation.

[0159] The quantization indices idx1, idx2 and idx3 for each of the quaternions i are received at the decoder in E601, E602 and E603 and decoded in E611, E612, e613 respectively.

[0160] The parameters of quantization interval width F and existence of positive and negative values ​​of the interval T are also obtained in E611, E612 and E613. The indication of absence of positive component F i is also obtained in E611.

[0161] Thus, in E611, we obtain F i as the value of F and 0 as the value of T. In E612, we obtain 1 as the value of F and 1 as the value of T and in E613, we obtain 1 as the value of F and 0 as the value of T.

[0162] The inverse quantization steps performed in E611, E612 and E613 allow us to decode the angles ω i in E621, θ i in E622 and φ i in E623.

[0163] The components of the respective quaternions a i , b i ,c i , d i are then decoded into E630 from the angles thus decoded, according to the following formulas: a i = cos ω i b i = cos θ i sin φ i sin ω i c i = sin θ i sin φ i sin ω i d i = cos φ i sin ω i

[0164] The inverse quantization step of an angle, such as step E611, E612 or E613, is now detailed in the flowchart of the figure 6b .

[0165] Starting from the respective values ​​of idx (index that quantizes an angle), T, and F as defined above in E640, the parameters N and N' are defined in E641. N = 2R< and N' = N / 2, where R is a fixed bit value of 8 bits in this implementation. In E642, the value of F is checked. If F = 0, the width of the quantization interval is halved and therefore has a maximum value of π / 2 in E643. Otherwise, if F = 1, the quantization interval is not reduced, and its maximum value in E644 is π.

[0166] In E645, the value of a sign parameter s is initialized to the value 0.

[0167] In E646, the value of T is checked. If T is equal to 1, the value of N in E648 (N=N').

[0168] In step E649, the value of idx is checked. If it is not greater than or equal to N', then in step E670, the value of s is set to 1 and the value of idx is updated by subtracting it from N'. Indeed, the indices from 0 to N'-1 correspond to positive values ​​and the indices of N' has N - 1 to negative values.

[0169] In E671, a quantization step d is defined as the maximum value of the interval on N - 1.

[0170] In the case where T is equal to 0 in E646, we go directly to step E671.

[0171] In the case where idx is greater than or equal to N' in E649, we go directly to step E671.

[0172] In E672, the value of a is calculated as follows: (-1) s < .idx.d

[0173] This is how we decode the value of a, that is to say the value of the angle in E673.

[0174] We illustrated on the figure 7 a DCOD encoding device and a DDEC decoding device, as defined in the invention, these devices being dual to each other (in the sense of "reversible") and connected to each other by a communication network RES.

[0175] In other embodiments, the inverse quantization step of the decoding process, performed by block 400 of the figure 4 is adapted to the quantification method performed during coding.

[0176] Thus, inverse spherical vector quantization can be performed. The presence of a positive component during decoding indicates whether hemispherical quantization was used during encoding to encode the first quaternion. In this case, the inverse quantization used to decode this first quaternion will be inverse hemispherical vector quantization.

[0177] Similarly, in the case where conditional scalar quantization using spherical coordinates is used at the encoder, the decoder will perform inverse quantization to recover these spherical coordinates and decode the corresponding quaternions.

[0178] The DCOD coding device includes a processing circuit typically comprising: a MEM1 memory for storing instruction data from a computer program as defined in the invention (these instructions being distributed between the DCOD encoder and the DDEC decoder); an INT1 interface for receiving a multichannel signal of origin B,for example an ambisonic signal distributed over different channels (for example four channels W, Y, Z, X of order 1) for the purpose of its compression encoding in the sense of the invention; a PROC1 processor to receive this signal and process it by executing the computer program instructions stored in the MEM1 memory, for the purpose of its encoding; and a COM 1 communication interface to transmit the encoded signals via the network.

[0179] The DDEC decoding device includes its own processing circuit, typically including: a MEM2 memory for storing instruction data of a computer program as defined in the invention (these instructions being able to be distributed between the DCOD encoder and the DDEC decoder as previously indicated); a COM2 interface for receiving the coded signals from the RES network for decoding by compression as defined in the invention; a PROC2 processor for processing these signals by executing the computer program instructions stored in the MEM2 memory, for decoding purposes; and an INT2 output interface for delivering the decoded signals, for example in the form of W...X ambisonic channels, for playback purposes.

[0180] Of course, this figure 7 illustrates an example of a structural implementation of a codec (coder or decoder) as defined in the invention. figures 3 to 6 The comments above describe in detail rather functional implementations of these codecs.

Claims

1. Method for encoding a multichannel audio signal, comprising forming a transformation matrix in the form of a rotation matrix to be applied to the input signals, quantizing the rotation matrix, encoding the transformed signals after applying the rotation matrix, wherein quantizing the rotation matrix comprises the following operations: - converting (E300) the rotation matrix in the quaternion domain with at least one first quaternion; - forcing (E320) said first quaternion to have a positive component; - converting the at least one first quaternion into spherical coordinates, with one of the spherical coordinates being associated with the positive forced component of the first quaternion; - quantizing (E330) the acquired spherical coordinates, with the spherical coordinate associated with the positive forced component of the first quaternion being quantized over a half-length interval.

2. Method according to Claim 2, wherein the positive component of said first quaternion is its real component.

3. Method according to any of Claims 1 to 2, wherein the rotation matrix is converted into a dual quaternion, a first quaternion for which a component is forced to be positive and a second quaternion.

4. Method according to Claim 3, wherein the quantization of the first quaternion uses one bit less than the quantization of the second quaternion.

5. Method according to Claim 3, wherein converting each of the two quaternions of the dual quaternion into spherical coordinates yields three angles, and the quantization of the angle associated with the positive component of the first quaternion is carried out at a half-length interval relative to the interval used to quantize the same component in the second quaternion.

6. Method according to Claim 5, wherein the quantization of the six acquired angles is carried out by uniform scalar quantization.

7. Method according to Claim 5, wherein the quantization of the six acquired angles is carried out by vector quantization with a hyper-rectangular support.

8. Method according to any of the preceding claims, wherein a binary indication is also encoded in order to indicate whether the at least one first quaternion assumes default values.

9. Method for decoding a multichannel audio signal, comprising receiving encoded signals from a multichannel signal and further comprising the following operations: - receiving (E601, E602, E603) parameters of quantized spherical coordinates of a set of at least one first quaternion and an indication of the existence of a positive component (E611); - decoding (E611, E612, E613) the at least one first quaternion from the received quantized parameters by taking a half-length quantization interval in order to decode a spherical coordinate associated with the indicated positive component; - constructing (462) an inverse rotation matrix from the at least one first decoded quaternion; - applying (420) said inverse rotation matrix to the received issued encoded signals, before decoding said signals.

10. Encoding device comprising a processing circuit for implementing the steps of the encoding method according to any of Claims 1 to 8.

11. Decoding device comprising a processing circuit for implementing the steps of the decoding method according to Claim 9.

12. Processor-readable storage medium storing a computer program comprising instructions for executing the encoding method according to any of Claims 1 to 8 or the decoding method according to Claim 9.