Multi-channel audio signal IIR filtering method and device, equipment and storage medium

By storing multi-channel audio signals and filtering parameters in the NEON register and using NEON SIMD instructions for parallel calculation, the problem of slow filtering processing of multi-channel audio signals IIR is solved, and efficient audio signal processing is achieved.

CN119943088APending Publication Date: 2025-05-06GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510062400.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the IIR filtering method of multi-channel audio signals is slow to process, and computing power and storage resources become performance bottlenecks.

Method used

By obtaining multi-channel audio signals and IIR filtering parameters, storing them in the NEON register, and using NEON SIMD instructions for parallel calculations, multiple data are simultaneously processed in one clock cycle.

Benefits of technology

It significantly improves the execution efficiency of the filtering process, can process audio signals of multiple channels in one clock cycle, and improves the efficiency and quality of audio signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943088A_ABST
    Figure CN119943088A_ABST
Patent Text Reader

Abstract

The invention provides an IIR (Infinite Impulse Response) filtering method and device for a multichannel audio signal, equipment and a storage medium. The IIR filtering method comprises the following steps: acquiring a to-be-processed multichannel audio signal and IIR filtering parameters; the multi-channel audio signals and the IIR filtering parameters are stored in an NEON register of an IIR filter; determining an output audio signal of each sound channel through the IIR filter according to the multi-sound-channel audio signal and the IIR filtering parameter; and sending the output audio signal of each sound channel to audio output equipment so as to output the output audio signal. According to the method, the audio signals, the filtering coefficients and the state values of the multiple sound channels are stored in the NEON register, parallel computing is carried out through the NEON SIMD instruction, multiple pieces of data can be processed at the same time in one clock period, and the execution efficiency of the filtering process is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal filtering technology, and in particular to an IIR filtering method, device, equipment and storage medium for multi-channel audio signals. Background Art

[0002] In modern audio signal processing, especially in multi-channel audio systems, how to efficiently filter audio signals of multiple channels to achieve clear, high-quality audio output is a very important technical issue. As a common digital filter, IIR (Infinite Impulse Response) filter has been widely used in audio processing, communication and other real-time signal processing due to its low latency and high efficiency.

[0003] Traditional IIR filtering methods usually rely on channel-by-channel processing, which can result in slow processing speeds, especially in multi-channel audio systems. At the same time, processor computing power and memory resources often become bottlenecks that restrict filter performance.

[0004] In summary, the problems existing in the prior art need to be solved urgently. Summary of the invention

[0005] The present invention provides an IIR filtering method, device, equipment and storage medium for multi-channel audio signals, which are used to solve the defects in the prior art, realize simultaneous processing of multiple data within one clock cycle, and greatly improve the execution efficiency of the filtering process.

[0006] The present invention provides an IIR filtering method for a multi-channel audio signal, comprising: Obtain the multi-channel audio signal and IIR filter parameters to be processed; Storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; Determine, by the IIR filter, an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter; The output audio signals of the respective channels are sent to an audio output device to output the output audio signals.

[0007] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, after the step of obtaining the multi-channel audio signal to be processed and the IIR filtering parameters, the method further includes: The multi-channel audio signal to be processed is normalized.

[0008] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, the step of storing the multi-channel audio signal and the IIR filtering parameters in a NEON register of the IIR filter specifically includes: Convert the data format of the multi-channel audio signal and the IIR filter parameter into a NEON vector data format; The format-converted multi-channel audio signal and IIR filter parameters are saved in NEON registers.

[0009] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, the step of converting the data format of the multi-channel audio signal and the IIR filtering parameter into a NEON vector data format specifically includes: The multi-channel audio signal and the IIR filter parameters are passed through NEON instructions, and the data of each channel is stored in sequence into a NEON vector data format; Among them, the data format of the multi-channel audio signal and the IIR filter parameter is float32_t, the NEON vector data format is specifically float32x4_t, and the NEON instruction is specifically a vld1q_s32 instruction.

[0010] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, after the step of determining the output audio signal of each channel according to the multi-channel audio signal and the IIR filtering parameter through the IIR filter, the method further includes: Determine the current state value of each channel according to the output audio signal of each channel; The IIR filter parameters are updated according to the current state value.

[0011] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, the IIR filtering parameters include filtering coefficients and state values ​​of each channel.

[0012] According to an IIR filtering method for a multi-channel audio signal provided by the present invention, the audio output device includes headphones, a sound card and speakers.

[0013] The present invention also provides an IIR filtering device for a multi-channel audio signal, comprising: A parameter acquisition module, used to obtain the multi-channel audio signal and IIR filter parameters to be processed; A parameter storage module, used for storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; A signal determination module, configured to determine an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameters through the IIR filter; The signal output module is used to send the output audio signal of each channel to the audio output device to output the output audio signal.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the IIR filtering method for a multi-channel audio signal as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the IIR filtering method for a multi-channel audio signal as described above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned IIR filtering methods for multi-channel audio signals.

[0017] The IIR filtering method, device, equipment and storage medium of a multi-channel audio signal provided by the present invention obtain the multi-channel audio signal to be processed and the IIR filtering parameters; store the multi-channel audio signal and the IIR filtering parameters in the NEON register of the IIR filter; determine the output audio signal of each channel according to the multi-channel audio signal and the IIR filtering parameters through the IIR filter; send the output audio signal of each channel to the audio output device to output the output audio signal. The present invention stores the audio signals, filtering coefficients and state values ​​of multiple channels in the NEON register, and uses the NEON SIMD instructions for parallel calculation, so that multiple data can be processed simultaneously within one clock cycle, which greatly improves the execution efficiency of the filtering process. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of the IIR filtering method for multi-channel audio signals provided by the present invention; Figure 2 It is a structural schematic diagram of an IIR filtering device for multi-channel audio signals provided by the present invention; Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] In order to solve the problems in the prior art, the present invention proposes an IIR filtering method for multi-channel audio signals to realize simultaneous processing of multiple data in one clock cycle, greatly improving the execution efficiency of the filtering process. The IIR filtering method for multi-channel audio signals is described below. Figure 1 As shown, including but not limited to the following steps: Step 110: Obtain a multi-channel audio signal to be processed and IIR filter parameters.

[0022] In step 110, it is first necessary to obtain a multi-channel audio signal to be processed. The multi-channel audio signal usually comes from an audio input device (such as a microphone array, an audio player or other audio signal source), and its signal is a plurality of independent audio channels (such as four channels or more). The audio signal of each channel is a one-dimensional continuous time signal, which can be converted into a digital audio signal (such as a 16-bit PCM signal with a sampling rate of 44.1kHz) by discretization.

[0023] In addition to the audio signal, it is also necessary to obtain the filter parameters corresponding to the IIR filter. These filter parameters usually include filter coefficients (such as feedback coefficients, forward coefficients) and state values ​​(such as previous outputs and intermediate state values ​​of the filter). These filter parameters are usually provided by external algorithms or pre-set system configurations, in the form of digital constants or values ​​calculated in real time.

[0024] Step 120: Store the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter.

[0025] After the audio signal and the filter parameters are obtained in step 110, these data need to be stored in NEON registers for subsequent processing.

[0026] First, in order to improve processing efficiency, the audio signal and filter parameters need to be converted to NEON vector format. The floating-point data type float32x4_t provided by the NEON instruction set allows multiple audio signal values ​​to be stored in one register. Each float32x4_t type register can store four single-precision floating-point numbers, which is suitable for storing four-channel audio signals.

[0027] The specific steps include: Convert the acquired audio signal data (for example, audio samples of four channels) to the float32x4_t data type.

[0028] Use NEON instructions, such as vld1q_f32, to store these data into NEON registers.

[0029] Similarly, filter parameters (such as filter coefficients and status values) also need to be converted into NEON vector format and stored in corresponding registers for subsequent calculations.

[0030] The purpose of these operations is to utilize the parallel computing capability of the NEON instruction set to load the audio signals and filter parameters of the four channels into registers simultaneously to accelerate subsequent filtering operations.

[0031] Step 130: Determine the output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameters through the IIR filter.

[0032] In this step, the multi-channel audio signal is processed using an IIR filter, which calculates the output signal using a differential equation based on the input audio signal and filter parameters.

[0033] Since the data has been loaded into NEON registers, it can be calculated in parallel using NEON instructions. During this process, the IIR filter generates the output signal for each channel according to the following process: Feedback calculation: For each channel, the filter calculation is performed using the stored filter coefficients and the previous state values ​​(stored in NEON registers). This step usually involves a weighted average of the historical values ​​of the audio signal (i.e., the feedback coefficients are multiplied and accumulated by the state values).

[0034] Forward calculation: According to the input current audio signal and filter coefficient, weighted summation is performed to obtain the output signal of the current channel.

[0035] State update: Update the state value of the filter and prepare a new state for the next filtering.

[0036] All calculations can be processed in parallel through NEON SIMD instructions, ensuring that data from multiple channels can be processed simultaneously. Ultimately, the output signal of each channel will be stored in the NEON register and provide input data for the next audio output.

[0037] Step 140: Send the output audio signal of each channel to an audio output device to output the output audio signal.

[0038] After step 130 is completed, the obtained output audio signal of each channel will be transmitted to the audio output device for actual audio playback.

[0039] Output processing: The output audio signal of each channel is converted to an analog signal through a DAC (digital-to-analog converter) or other audio interface (if the audio output device is an analog device), or sent directly as a digital signal to a device that supports digital input (such as headphones, sound card or sound system).

[0040] Synchronous playback: Since the audio signals of multiple channels are processed in parallel, the audio signals of each channel can be played synchronously on the audio output device to ensure the multi-channel effect of the audio signal.

[0041] In this step, the NEON instruction set is not directly involved in the transmission of the output signal, but due to the aforementioned parallel processing and optimization, the entire audio processing chain can achieve low latency and high efficiency, thereby improving the overall performance of the audio system.

[0042] In practical applications, according to the hardware configuration and requirements of the device, steps 110 to 140 can be adjusted according to different audio processing requirements. For example, for a specific application scenario, preprocessing of the audio signal (such as normalization processing, gain adjustment, etc.) can be performed after step 110 to ensure that the audio signal will not affect the filtering effect due to excessive or insufficient signal amplitude during the filtering process.

[0043] In addition, according to actual needs, the structure of the IIR filter (such as filter order, filter type, etc.) can also be flexibly configured according to the specific implementation to meet the needs of different audio systems.

[0044] In this way, the present invention provides an efficient multi-channel audio signal IIR filtering method, which can utilize the parallel processing capability of the NEON instruction set to significantly improve the efficiency and quality of audio signal processing, and is particularly suitable for applications in real-time audio processing and multi-channel audio systems.

[0045] As a further optional embodiment, after the step of obtaining the multi-channel audio signal to be processed and the IIR filter parameters, the method further includes: The multi-channel audio signal to be processed is normalized.

[0046] As a further optional embodiment, after the step of acquiring the multi-channel audio signal to be processed and the IIR filter parameters, the method of the present invention may further include performing normalization processing on the multi-channel audio signal to be processed.

[0047] Audio signals usually vary within a certain dynamic range. In practical applications, the amplitude of audio signals may fluctuate, which may affect the filtering effect. Especially when performing IIR filtering, if the amplitude of the input signal is too large, it may cause overflow or distortion; if the amplitude is too small, the filter response may not be obvious, affecting the audio quality.

[0048] After obtaining the multi-channel audio signal to be processed and the IIR filter parameters, the method further includes normalizing the multi-channel audio signal to be processed. The specific implementation of this step is as follows: Calculate the maximum value of the audio signal: For each channel of the audio signal, first calculate the maximum absolute value of the channel. You can get the maximum value of the channel signal by traversing the audio samples of each channel.

[0049] For each channel audio signal: max_value=max(∣x1∣,∣x2∣,...,∣xn∣) Among them, x1, x2, ..., xn are the sample values ​​of the audio signal, and max_value is the maximum absolute value of the audio signal of the channel.

[0050] Therefore, normalizing the audio signal can ensure that the amplitude range of the input signal is moderate, avoiding poor filtering effects or calculation errors caused by excessive or small signal amplitudes.

[0051] By dividing the audio signal of each channel by the maximum absolute value of the channel, the amplitude of all audio signals is normalized to a predetermined range. The audio signal can usually be normalized to between -1 and 1 to prevent excessive or small values ​​from affecting the subsequent filtering process.

[0052] For each sample x i :

[0053] Among them, x i ′ is the normalized audio sample value. The normalized signal range will be limited to [-1,1] to ensure that subsequent processing will not cause calculation overflow due to excessive signal amplitude.

[0054] After normalizing the audio signals of all channels, the results can be directly stored in NEON registers for subsequent IIR filtering. Before storage, the normalized audio signals need to be converted into a format suitable for NEON registers, usually using float32x4_t data types, and the signal data of the four channels are processed in parallel to improve computing efficiency.

[0055] As a further optional embodiment, the step of storing the multi-channel audio signal and the IIR filter parameter in a NEON register of the IIR filter specifically includes: Convert the data format of the multi-channel audio signal and the IIR filter parameter into a NEON vector data format; The format-converted multi-channel audio signal and IIR filter parameters are saved in NEON registers.

[0056] In a further optional embodiment of the present invention, the step of storing the multi-channel audio signal and the IIR filter parameters in the NEON register of the IIR filter specifically includes the following contents: Convert the data format of multi-channel audio signals and IIR filter parameters into NEON vector data format; The format-converted multi-channel audio signal and IIR filter parameters are saved in NEON registers.

[0057] NEON is a SIMD (Single Instruction Multiple Data) extension in the ARM architecture, which allows multiple data to be processed in parallel within one cycle. When using the NEON instruction set to process audio signals, the data format of the audio signal and filter parameters needs to be converted into a vector format supported by the NEON instruction set in order to perform parallel computing more efficiently.

[0058] Specifically, audio signals and filter parameters are usually stored in scalar data formats (for example, the audio signal of each channel is stored in float32_t type), while the NEON instruction set requires data to be stored in vector format so that multiple data can be processed simultaneously in the same clock cycle. For example, one of the vector data types supported by NEON is float32x4_t, which can hold 4 32-bit floating-point numbers, so four channels of audio signals or filter coefficients can be processed simultaneously.

[0059] For each audio signal and filter parameter, they can be packed into a vector containing four elements (ie, float32x4_t type). These four elements can be audio signals of four channels or four filter coefficients.

[0060] For example, suppose there are 4-channel audio signals x1, x2, x3, x4 and corresponding filter coefficients a1, a2, a3, a4, which are stored in float32_t type respectively. Then they can be converted into a float32x4_t type vector through NEON instructions, expressed as: signal_vector=vld1q_f32([x1,x2,x3,x4]) vld1q_f32 is a NEON instruction that loads four 32-bit floating point numbers into a NEON register.

[0061] Similarly, IIR filter parameters also need to be converted into NEON vector format for parallel calculation. Filter coefficients are usually stored as floating point numbers, and the conversion process is similar to that of audio signals.

[0062] Use NEON instructions to store the converted multi-channel audio signal and IIR filter parameters into NEON registers. For example, for the audio signal and filter parameters that have been converted into float32x4_t format, use the following instructions to store them into NEON registers: vld1q_f32(signal_vector,register) Where register represents a NEON register (such as Q0, Q1, etc.). This step will store the converted data in the NEON register for subsequent parallel computing.

[0063] The audio signal and the filter coefficient are stored in different NEON registers, for example, the audio signal is stored in the Q0 register and the filter coefficient is stored in the Q1 register. In this way, the multi-channel audio signal can be processed and the filter coefficient can be calculated at the same time.

[0064] As a further optional embodiment, the step of converting the data format of the multi-channel audio signal and the IIR filter parameter into a NEON vector data format specifically includes: The multi-channel audio signal and the IIR filter parameters are passed through NEON instructions, and the data of each channel is stored in sequence into a NEON vector data format; Among them, the data format of the multi-channel audio signal and the IIR filter parameter is float32_t, the NEON vector data format is specifically float32x4_t, and the NEON instruction is specifically a vld1q_s32 instruction.

[0065] In this embodiment, in audio signal processing, the NEON instruction set can improve data processing speed through parallel processing. In this embodiment, the multi-channel audio signal and IIR filter parameters are first converted from the traditional scalar data format (such as float32_t) to the NEON vector data format (such as float32x4_t) so that the NEON instruction can efficiently process these data.

[0066] Multi-channel audio signals: The audio signals of each channel are usually in float32_t data format. In order to process 4 channels of audio signals in parallel in NEON registers, these signals are packed into a float32x4_t vector containing 4 32-bit floating point numbers.

[0067] Assuming there are 4 channels of audio signals x1, x2, x3, x4, they can be stored in sequence into a float32x4_t type vector through NEON instructions. The vector is stored in a NEON register, and instructions such as vld1q_f32 can load 4 floating point numbers into a NEON register.

[0068] IIR filter parameters: Similarly, the filter coefficients of the IIR filter (such as a1, a2, a3, a4) are also in float32_t format. For parallel processing, they also need to be converted into NEON vector format. Every 4 filter coefficients will be packed into a float32x4_t type vector.

[0069] After converting the data format, use NEON instructions to store the converted data into NEON registers. Specifically, you can use the vld1q_s32 instruction to load four 32-bit data into a NEON register. Although vld1q_s32 is originally used for integer data types (int32_t), when processing audio signals and filter parameters, you can also combine the corresponding data conversion to load float32_t data into NEON registers.

[0070] As a further optional embodiment, after the step of determining the output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter through the IIR filter, the method further includes: Determine the current state value of each channel according to the output audio signal of each channel; The IIR filter parameters are updated according to the current state value.

[0071] In the working principle of IIR filter, the output audio signal at the current moment depends not only on the current input signal, but also on the previous state value (i.e. the historical output signal). Therefore, after each audio signal is processed by IIR filter, the state value of each channel needs to be updated according to the output audio signal of each channel.

[0072] Specifically, the state value of each channel usually includes the intermediate state of the filter (for example, the output signal at the previous moment). For IIR filters, these state values ​​are usually directly related to the recursive relationship of the filter. Each time the output is calculated, the current output signal needs to be used as one of the inputs of the next filtering operation.

[0073] According to the basic working principle of IIR filter, the output of each channel can be expressed by the following recursive formula:

[0074] Among them, y(n) is the current output audio signal, x(n−k) is the input audio signal, and a k and b k are the feedback and feedforward coefficients of the filter, and M and N are the orders of feedforward and feedback, respectively.

[0075] According to the above recursive relationship, after each calculation of the output audio signal, the current output value y(n) can be stored as the new state value of the channel, which will continue to be used in the next filtering process.

[0076] In the recursive calculation of IIR filters, in addition to updating the state value, the filter parameters (such as filter coefficients) may also need to be dynamically adjusted according to the current state value. Some types of IIR filters use adaptive filtering algorithms to adjust the filter coefficients by continuously monitoring the changes in the output signal and state value, thereby optimizing the performance of the filter.

[0077] As a further optional embodiment, the IIR filter parameters include filter coefficients and state values ​​of each channel.

[0078] In a further optional embodiment of the present invention, the IIR filter parameters include a filter coefficient and a state value for each channel.

[0079] Filter coefficient The core part of the IIR filter is its filter coefficient, which is usually composed of a feedforward coefficient and a feedback coefficient. The filter coefficient determines the performance and frequency response characteristics of the filter. The audio signal of each channel may have different frequency characteristics, so it is necessary to set independent filter coefficients for each channel.

[0080] Feedforward coefficient: The feedforward coefficient determines the effect of the current input signal on the output. Usually expressed as ak , where k is the order of the feedforward filter.

[0081] Feedback coefficient: The feedback coefficient determines the impact of the previous output signal on the current output. Usually expressed as b k , where k is the order of the feedback filter.

[0082] For multi-channel audio signals, the input signal and corresponding filter coefficients of each channel may be different, so each channel will have an independent set of feedforward and feedback coefficients.

[0083] These filter coefficients are generally stored in memory and continuously participate in the recursive calculation during the filtering process. Depending on the characteristics of the audio signal, these coefficients can be static or dynamically adjusted according to the needs of audio processing (such as the dynamic adjustment process in adaptive filtering).

[0084] In an IIR filter, the state value is used to represent the historical output information of the filter and plays an important role in each calculation of the filter. The IIR filter has a recursive nature, and the output at the current moment depends not only on the current input, but also on the output at the previous moment. Therefore, the state value is generally the output value of the filter at the previous moment.

[0085] State value: After each filter calculation, the current output value will be saved as the state value and become the input for the next calculation. The state value usually includes the intermediate state of the filter (such as historical output) and temporary data related to the filter.

[0086] For multi-channel audio signals, the state value also needs to be stored independently for each channel so that the output signal of each channel can be calculated based on its own historical output data.

[0087] In this embodiment, the filter parameters of each channel include a filter coefficient and a state value, which together determine the output of the filter. The specific functions are as follows: Filter coefficient: controls the frequency response, gain, attenuation and other parameters of the filter. By properly adjusting the filter coefficient, the filter can be adapted to audio signals with different frequency characteristics, such as enhancing certain frequency components or attenuating other frequency components.

[0088] State value: retains the filter's historical information, ensures the recursive nature of the IIR filter, and enables the filter to process signals with long-term dependencies. By continuously updating the state value, the IIR filter can better adapt to changes in multi-channel audio signals.

[0089] As a further optional embodiment, the audio output device includes headphones, a sound card and speakers.

[0090] In a further optional embodiment of the present invention, the audio output device includes earphones, a sound card and a speaker. These audio output devices are used to receive the audio signal after the IIR filtering process and convert it into audible sound to output to the user.

[0091] Headphones are common personal audio output devices, widely used in music playback, voice calls, games, etc. Headphones can provide a private audio experience and directly convert electrical signals into sound signals through the headphone speakers for users to listen to.

[0092] Application scenarios of headphones: Headphones are often used in environments that require private listening, such as on public transportation, in office environments, or for personal entertainment. Through headphones, users can clearly hear the audio signal of each channel, especially in stereo or surround sound systems, and can perceive the sense of space and direction brought by different channels.

[0093] Relationship with filters: By using the IIR filtering method of the present invention, the earphone can receive an optimized audio signal, thereby improving the sound quality. For example, the earphone can better reproduce low-frequency or high-frequency signals and provide clearer audio output, especially in multi-channel audio processing, the signal of each channel will produce a more balanced sound after filtering.

[0094] A sound card is a hardware module used for audio signal processing in a computer or other electronic device. It is responsible for the input and output of audio signals and the conversion between digital and analog signals. A sound card usually provides audio output to users by connecting to devices such as computers, sound systems or headphones.

[0095] Application scenarios of sound cards: Sound cards are widely used in personal computers, audio production workstations, professional recording equipment and other fields. In these devices, sound cards undertake tasks such as conversion, processing, and mixing of audio signals. Through the output end of the sound card, the filtered audio signal is finally transmitted to the audio output device.

[0096] Relationship with filters: By adopting the IIR filtering method in the present invention, the sound card can obtain a more accurate audio signal output. After the audio signal is received at the input end of the sound card, it is processed and filtered, and the sound card converts the optimized signal into an analog signal and outputs it to headphones, speakers and other devices. Especially in the process of processing multi-channel audio signals, the sound card can accurately process the signal of each channel, providing a more realistic and high-quality audio experience.

[0097] Audio systems (including home audio, car audio, professional audio, etc.) are large audio output devices used to play audio signals in a large space. Audio systems are generally composed of speakers, amplifiers, power supplies, etc., and can output high-quality audio signals and cover a wide range.

[0098] Application scenarios of audio: Audio is widely used in home theaters, entertainment venues, concerts, public broadcasting and other places. In these scenarios, the audio system is used to provide high-quality audio output, allowing multiple people to enjoy the sound effects brought by the audio signal at the same time. For the output of multi-channel audio signals, the audio system can restore richer sound effects based on the signal of each channel, especially in surround sound or 3D sound systems, the audio signals of multiple channels can bring an immersive auditory experience.

[0099] Relationship with filters: By applying the IIR filtering method of the present invention, the sound system can output more balanced and high-quality sound. The sound quality and performance of the sound system are directly related to the processing effect of the audio signal. By performing IIR filtering on the audio signal, noise can be effectively removed, and the clarity and detail of the signal can be improved, thereby optimizing the performance of the sound system and enhancing the user's auditory experience.

[0100] The IIR filtering device for multi-channel audio signals provided by the present invention is described below. Figure 2 As shown, the IIR filtering device for a multi-channel audio signal described below and the IIR filtering method for a multi-channel audio signal described above can correspond to each other.

[0101] An IIR filtering device for multi-channel audio signals, comprising: A parameter acquisition module 210, used to acquire a multi-channel audio signal to be processed and IIR filter parameters; A parameter storage module 220, used for storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; A signal determination module 230, configured to determine an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameters through the IIR filter; The signal output module 240 is used to send the output audio signal of each channel to the audio output device to output the output audio signal.

[0102] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the IIR filtering method of the multi-channel audio signal, and the method includes: Obtain the multi-channel audio signal and IIR filter parameters to be processed; Storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; Determine, by the IIR filter, an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter; The output audio signals of the respective channels are sent to an audio output device to output the output audio signals.

[0103] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0104] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can perform the IIR filtering method of the multi-channel audio signal provided by the above methods, the method comprising: Obtain the multi-channel audio signal and IIR filter parameters to be processed; Storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; Determine, by the IIR filter, an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter; The output audio signals of the respective channels are sent to an audio output device to output the output audio signals.

[0105] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the IIR filtering method of the multi-channel audio signal provided by the above methods, the method comprising: Obtain the multi-channel audio signal and IIR filter parameters to be processed; Storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; Determine, by the IIR filter, an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter; The output audio signals of the respective channels are sent to an audio output device to output the output audio signals.

[0106] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An IIR filtering method for a multi-channel audio signal, characterized in that: include: Obtain the multi-channel audio signal and IIR filter parameters to be processed; Storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; Determine, by the IIR filter, an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter; The output audio signals of the respective channels are sent to an audio output device to output the output audio signals.

2. The IIR filtering method for multi-channel audio signals according to claim 1, characterized in that: After the step of obtaining the multi-channel audio signal to be processed and the IIR filter parameters, the method further includes: The multi-channel audio signal to be processed is normalized.

3. The IIR filtering method for multi-channel audio signals according to claim 1, characterized in that: The step of storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter specifically includes: Convert the data format of the multi-channel audio signal and the IIR filter parameter into a NEON vector data format; The format-converted multi-channel audio signal and IIR filter parameters are saved in NEON registers.

4. The IIR filtering method for multi-channel audio signals according to claim 3, characterized in that: The step of converting the data format of the multi-channel audio signal and the IIR filter parameter into a NEON vector data format specifically includes: The multi-channel audio signal and the IIR filter parameters are passed through NEON instructions, and the data of each channel is stored in sequence into a NEON vector data format; Among them, the data format of the multi-channel audio signal and the IIR filter parameter is float32_t, the NEON vector data format is specifically float32x4_t, and the NEON instruction is specifically a vld1q_s32 instruction.

5. The IIR filtering method for multi-channel audio signals according to claim 1, characterized in that: After the step of determining the output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameter through the IIR filter, the method further includes: Determine the current state value of each channel according to the output audio signal of each channel; The IIR filter parameters are updated according to the current state value.

6. The IIR filtering method for multi-channel audio signals according to claim 1, characterized in that: The IIR filter parameters include filter coefficients and state values ​​of each channel.

7. The IIR filtering method for multi-channel audio signals according to claim 1, characterized in that: The audio output device includes earphones, sound cards and speakers.

8. An IIR filtering device for multi-channel audio signals, characterized in that: include: A parameter acquisition module, used to obtain the multi-channel audio signal and IIR filter parameters to be processed; A parameter storage module, used for storing the multi-channel audio signal and the IIR filter parameters in a NEON register of the IIR filter; A signal determination module, configured to determine an output audio signal of each channel according to the multi-channel audio signal and the IIR filter parameters through the IIR filter; The signal output module is used to send the output audio signal of each channel to the audio output device to output the output audio signal.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the IIR filtering method for a multi-channel audio signal according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the IIR filtering method for a multi-channel audio signal according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Real-time audio processing method and system for multi-channel digital audio signal

    CN106569780A

  • Depth separable convolution acceleration method, storage medium and application

    CN111079904A

  • Copying method and device based on video hardware acceleration interface and storage medium

    CN117435532A

  • Parallel digital filtering of an audio channel

    US20140067100A1

  • Apparatus, methods, and systems with a configurable spatial accelerator

    US20190205263A1