A method for digital filter reconstruction for lossless audio

By using frame segmentation, transient feature extraction, and dynamic filter coefficient generation, and adaptively adjusting filter asymmetry, the problems of pre-ringing effect and phase distortion in lossless audio are solved, achieving efficient and low-power audio reconstruction.

CN122177143APending Publication Date: 2026-06-09SHENZHEN CANJING ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610365817.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-24
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing lossless audio digital filtering and reconstruction schemes are prone to pre-ringing effects and full-band phase distortion when processing steep transient signals. Furthermore, traditional schemes consume too much computational memory and power, making it difficult to balance both under tight budget constraints.

Method used

By employing frame segmentation, transient feature extraction, nonlinear mapping, and dynamic filter coefficient generation, the asymmetry of the filter is adaptively adjusted. Combined with cross-gradient splicing technology, audio data is dynamically reconstructed to eliminate pre-ringing effects and maintain linear phase.

Benefits of technology

Under limited computing memory and power consumption, the pre-ringing effect was effectively eliminated, phase distortion across the entire frequency band was avoided, and high-fidelity reconstruction of lossless audio was achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122177143A_ABST
    Figure CN122177143A_ABST
Patent Text Reader

Abstract

The application discloses a digital filtering reconstruction method for lossless audio, and relates to the field of audio filtering reconstruction. Firstly, the transient vibration intensity of the segmented audio frame is extracted in real time to obtain a transient index value, and the transient index value is mapped into a window asymmetry factor by using a nonlinear control curve. According to the factor, a front half cycle attenuation compression and a rear half cycle stretching are applied to a reference window function to generate a dynamic asymmetric window and further obtain dynamic filter coefficients. Finally, the audio is weighted and convoluted by using the dynamic coefficients, and a cross-fading splicing technology is combined to eliminate frame boundary artifacts caused by dynamic adjustment. In this way, dynamic reconstruction can be realized only by relying on time-domain point-by-point modulation of a single set of filters, and the storage of a large number of filter banks or complex offline conversion requirements are completely eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of audio filtering and reconstruction, and more specifically, to a digital filtering and reconstruction method for lossless audio. Background Technology

[0002] With the rapid popularization of digital audio technology, lossless audio has gained widespread popularity due to its excellent sound quality reproduction. In the audio processing workflow of portable playback devices or smart audio terminals, digital decoding and analog amplification (DAC) are key steps in achieving high-fidelity audio output. To convert discrete digital samples into continuous analog signals, a digital filtering and reconstruction scheme is needed to achieve band-limited filtering of high-frequency image signals, thereby ensuring the purity of the sound. Therefore, constructing a digital filtering and reconstruction scheme for lossless audio is of paramount importance.

[0003] However, in existing digital filtering and reconstruction schemes for lossless audio, the reconstruction filter typically employs a linear-phase FIR filter with strict central symmetry. Due to the inherent mathematical mutual exclusion among the causality of the FIR system response, perfect linear phase, and brick-wall frequency cutoff, according to the Fourier transform principle, when there are steep transient steps in the audio input (such as the instantaneous drum beat in lossless audio), this frequency band-limiting processing for transient changes will inevitably produce ripples in the time domain, triggering the Gibbs phenomenon. Limited by the symmetry of existing filters, half of the ripple energy flows backward and appears before the transient occurs, producing a pre-ringing effect that the human ear is extremely sensitive to. To address this issue, existing technologies that abandon symmetry and use minimum phase filters can eliminate pre-ringing, but this leads to inconsistent arrival times of different frequencies at the ear, causing severe phase distortion across the entire frequency band. If traditional dual-filter bank switching methods are used or a large offline fast Fourier transform parallel system is relied upon, a large number of coefficient tables need to be called, which severely consumes computing memory and power consumption, far exceeding the system capacity of low-power SoCs and other hardware. As a result, traditional solutions often have to compromise between pre-echo and phase distortion.

[0004] Therefore, how to adaptively and dynamically eliminate the pre-ringing effect generated during digital reconstruction of lossless audio under strict constraints on computing memory and power consumption budgets, without causing severe phase distortion across the entire frequency band, has become a pressing technical challenge in the field of audio processing. Summary of the Invention

[0005] To address the aforementioned problems in the existing technology, this application provides a digital filtering and reconstruction method for lossless audio, comprising: Step 1: Based on a preset frame segmentation length, performing equal-length time slot segmentation on the pulse code modulation sampling data, sampling rate, and bit depth contained in the original audio stream to obtain the current audio frame; Step 2: Extracting transient features from the current audio frame to obtain a transient index value characterizing the transient onset intensity in the current audio frame; Step 3: Based on a threshold truncation nonlinear control curve constructed using preset kurtosis parameters and noise immunity thresholds, performing asymmetric mapping on the transient index value to... Step 4: Based on the window asymmetry factor, apply attenuation compression to the first half-cycle of the even-symmetric reference window function and stretch it to the second half-cycle to obtain a dynamic asymmetric window. Then, multiply the dynamic asymmetric window with a predefined ideal low-pass impulse response sequence point by point in the time domain to obtain the dynamic filter coefficients. Step 5: Based on the dynamic filter coefficients, perform array-weighted convolution on the current audio frame to obtain the filtered audio data. Step 6: Perform cross-gradient superposition and smooth splicing on the tail and head segments of the filtered audio data of adjacent frames to obtain the reconstructed audio stream that eliminates frame boundary artifacts.

[0006] Compared with existing technologies, this application provides a digital filtering reconstruction method for lossless audio, addressing the technical challenges of existing digital audio reconstruction methods, such as the difficulty in simultaneously addressing pre-ringing effects and full-band phase distortion, and the high memory and power consumption of traditional hardware solutions. First, the transient onset intensity is extracted in real-time from the segmented audio frames to obtain the transient index value, which is then mapped to a window asymmetry factor using a nonlinear control curve. Based on this factor, a first-half-cycle attenuation compression and a second-half-cycle stretching are applied to a reference window function to generate a dynamic asymmetric window, thereby obtaining dynamic filter coefficients. By adaptively breaking the central symmetry of the filter when encountering transient signals, the forward backflow of ripple energy is effectively suppressed, fundamentally eliminating the pre-ringing effect that is sensitive to the human ear, while preserving linear phase to the greatest extent possible in non-transient segments to avoid distortion. Finally, the audio is weighted and convolved using these dynamic coefficients, and a cross-gradient stitching technique is combined to eliminate frame boundary artifacts caused by dynamic adjustments. This approach enables dynamic reconstruction by relying solely on point-by-point modulation of a single filter in the time domain, completely eliminating the need for massive storage of multiple filter banks or complex offline transformations. It perfectly solves the aforementioned technical problems under stringent limitations in computing memory and power consumption budgets. Attached Figure Description

[0007] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings.

[0008] Figure 1 This is a flowchart of a digital filtering reconstruction method for lossless audio according to an embodiment of this application.

[0009] Figure 2 This is a schematic diagram of the data flow in a digital filtering reconstruction method for lossless audio according to an embodiment of this application.

[0010] Figure 3 This is a flowchart of step 4 in the digital filtering reconstruction method for lossless audio according to an embodiment of this application.

[0011] Figure 4 This is a schematic diagram of the data flow in step 5 of the digital filtering reconstruction method for lossless audio according to an embodiment of this application. Detailed Implementation

[0012] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0013] In view of the shortcomings in the above-mentioned technical field, this application proposes a digital filtering reconstruction method for lossless audio. Figure 1 This is a flowchart of a digital filtering reconstruction method for lossless audio according to an embodiment of this application. Figure 2 This is a schematic diagram of the data flow in a digital filtering reconstruction method for lossless audio according to an embodiment of this application. Figure 1 and Figure 2 As shown, the digital filtering and reconstruction method for lossless audio according to an embodiment of this application includes: Step 1: Based on a preset frame segmentation length, the pulse code modulation sampling data, sampling rate, and bit depth contained in the original audio stream are divided into equal-length time slots to obtain the current audio frame; Step 2: Transient feature extraction is performed on the current audio frame to obtain a transient index value characterizing the transient onset intensity in the current audio frame; Step 3: Based on a threshold truncation nonlinear control curve constructed using a preset kurtosis parameter and noise immunity threshold, the transient index value is asymmetrically mapped to obtain a window asymmetry factor. Step 4: Based on the window asymmetry factor, apply attenuation compression to the first half-cycle of the even-symmetric reference window function and stretch it to the second half-cycle to obtain a dynamic asymmetric window. Then, multiply the dynamic asymmetric window with a predefined ideal low-pass impulse response sequence point by point in the time domain to obtain the dynamic filter coefficients. Step 5: Based on the dynamic filter coefficients, perform array-weighted convolution on the current audio frame to obtain the filtered audio data. Step 6: Perform cross-gradient superposition and smooth splicing on the tail and head segments of the filtered audio data of adjacent frames to obtain the reconstructed audio stream that eliminates frame boundary artifacts.

[0014] In step 1, based on a preset frame segmentation length, the pulse code modulation sampling data, sampling rate, and bit depth contained in the original audio stream are divided into equal-length time slots to obtain the current audio frame. It should be understood that in real-time decoding and analog amplification of digital audio, the continuous audio data stream is extremely large. Directly filtering the entire long sequence would not only lead to extremely high computational latency but also far exceed the memory and cache capacity limits of low-power microprocessors. Furthermore, transient features in audio appear dynamically over time, and global processing cannot accurately locate and adaptively modulate local transients using filter deformation modulation. Therefore, this application uses step 1 to transform an infinitely long or ultra-long continuous original audio stream into a discrete short sequence suitable for processing with limited memory in a hardware pipeline. By using equal-length time slot segmentation, standardized basic processing units are constructed, thus laying the data foundation for subsequent real-time and low-latency extraction of local transient oscillation intensity and dynamic modulation reconstruction of filter coefficients.

[0015] In one implementation, step 1 specifically involves the following processing: The original audio stream is a continuous digital audio signal obtained after digital decoding of an audio file, without digital-to-analog conversion. It consists of continuous pulse-code modulation (PMC) sample data, along with matching sampling rate and bit depth information. The PMC sample data represents the discretized sound wave amplitude values; common bit depths include 16 bits or 24 bits, and sampling rates are typically 44.1 kHz or higher. The preset frame segmentation length defines the sample window size used for real-time processing. Its setting is primarily based on the size of the underlying hardware's direct memory access buffer and the human ear's perception threshold for processing latency. For example, under a tight computational memory budget, the preset frame segmentation length can be set to 256 sampling points to balance real-time responsiveness with the data integrity of transient feature extraction.

[0016] In the specific implementation process, the data processing device receives the continuously input raw audio stream and parses the current sampling rate and bit depth parameters from it in real time. Then, based on the sample window scale defined by the preset frame segmentation length, the continuous pulse-code modulation sampled data in the raw audio stream is truncated to an equal length. The mathematical expression of this equal-length time slot segmentation operation is as follows:

[0017]

[0018] in, This represents the global pulse code modulation sampled data sequence in the original audio stream. This is the index of the current audio frame being processed (its value is a non-negative integer). The preset frame segmentation length, such as a constant value of 256. The index of a local sample within the segmented current audio frame, whose value range satisfies , Let $k$ be the k-th discrete sample amplitude value in the current frame data block obtained by segmentation. Through the linear time shift and truncation operation of the above formula, the infinitely long continuous audio sample sequence is strictly and orderly divided into short sequence data blocks that are independent of each other and have completely consistent lengths.

[0019] After completing the equal-length truncation extraction, the extracted independent data blocks need to be encapsulated and packaged. Specifically, the truncated short sequence pulse-code modulation sampling data block is used as the payload of the current packet, and a dedicated packet header is constructed in the initial memory space of this data packet. The packet header sequentially writes the number of frame samples contained in the current data block, the previously parsed sampling rate, and the bit depth value. Taking a sampling rate of 44.1kHz, a bit depth of 24 bits, and a frame segment length of 256 as an example, the packaged packet header will record basic attribute control information such as the number of frame samples of 256, the bit depth of 24, and the sampling rate of 44100, followed by 256 actual audio amplitude sampling point data, thus obtaining the current audio frame completely.

[0020] In step 2, transient features are extracted from the current audio frame to obtain the transient index value, which characterizes the transient onset intensity in the current audio frame. Correspondingly, in the filtering and reconstruction process of digital audio, the pre-ringing effect originates from the fact that when a linear phase filter with strict central symmetry processes steep transient abrupt changes, the resulting time-domain ripples inevitably flow backward. Applying a single, fixed band-limited filter to a continuous audio stream not only fails to maintain the purity of stable signals but also easily produces severe, perceptible echo distortion when encountering abrupt waveforms such as those from percussion instruments. Therefore, this application quantifies the amplitude fluctuation gradient and local energy peaks between adjacent sampling points by performing in-depth time-domain waveform feature analysis on the extracted discrete short-sequence data blocks. This transforms the complex and variable local waveform envelope changes into a standardized, single scalar measure independent of the absolute volume, thereby accurately capturing the location of sudden transients.

[0021] In one embodiment, step 2 includes: step 21, performing forward differencing and extremum extraction on the current audio frame to obtain the upper limit of frame extrema and the sum of the absolute values ​​of the first-order differences; step 22, based on the number of frame samples and the upper limit of frame extrema of the current audio frame, performing extremum normalization and transient exponent synthesis on the sum of the absolute values ​​of the first-order differences to obtain the transient exponent value.

[0022] The specific processing is as follows: Entering the first stage, step 21: After receiving the current audio frame that has been segmented and encapsulated by the previous steps, the processing device extracts the frame sample count, sampling rate, and bit depth parameters from the encapsulation header of the current audio frame, and simultaneously reads the payload within the packet, i.e., the continuous pulse code modulation sampling data. The specific operation process for forward differencing and extreme value extraction for the current audio frame is as follows: a depth-first traversal operation is performed on all continuous temporal sampling point data in the input current audio frame. First, the absolute difference of the amplitude between all temporally adjacent sampling points is calculated using the first-order forward differencing operator, and these absolute differences are globally accumulated to obtain the sum of the absolute values ​​of the first-order differences. This sum of the absolute values ​​of the first-order differences can accurately capture the abrupt change in the audio envelope in the time domain. In this operation, the mathematical operation logic corresponding to the formula is expressed as:

[0023]

[0024] in, This represents the sum of the absolute values ​​of the calculated first-order differences. This represents the number of frame samples read from the current audio frame header. In a typical low-latency configuration scenario, The value is preset and read as 256. This represents the actual amplitude value of the pulse code modulation sampling point at index i within the current audio frame, i.e., the current audio frame. discrete sampling points, This refers to the amplitude value of the sampling point that is immediately adjacent to it in time. By traversing all sampling point positions with indices from 1 to 255, calculating the difference between adjacent amplitudes sequentially, and performing unsigned accumulation, the high-frequency jumps and violent fluctuations of the waveform within the entire data frame can be comprehensively reflected. Simultaneously, within the same cycle of traversing and calculating the continuous time-series sampling point data, the maximum absolute amplitude value in this set of sampling points is synchronously scanned and extracted to obtain the upper limit of the frame extreme value, thereby capturing the local energy peak within the current data window. The formula is expressed as:

[0025]

[0026] in, This represents the upper limit of the extracted frame extreme values. Operators represent operations that search for the maximum value within a given set of indices; symbols... This represents the absolute value of the amplitude at the sampling point with index i.

[0027] After obtaining the upper limit of frame extreme values ​​and the sum of the absolute values ​​of first-order differences, the process proceeds to step 22 of the second stage. In actual audio playback scenarios, the overall absolute volume of the audio signal can change drastically due to user adjustments or dynamic compression processing of the master tape itself. If only the sum of the absolute values ​​of first-order differences is used as the basis for transient judgment, when a smooth audio input with significantly amplified overall volume is used, the absolute difference between adjacent points will also increase proportionally and drastically, leading to misjudgment by the transient detection module. To completely eliminate detection misjudgment caused by changes in the overall absolute volume of the audio, in this implementation step, the sum of the absolute values ​​of first-order differences is used as the numerator operation unit, and the product of the upper limit of frame extreme values ​​and the number of frame samples is used as the denominator scale factor for division mapping calculation, thereby achieving normalization of the differential gradient. The formula is expressed as:

[0028]

[0029] in, This represents the final synthesized transient exponent value. The formula maps the original difference values, which were originally in a continuous unbounded fluctuation domain, to a single scalar metric within a quantization interval with a typical upper limit of 1 by dividing the total sum of differential fluctuations by the maximum possible scalar area of ​​fluctuations formed by the number of samples and the upper limit of frame extrema. In extremely ill-conditioned high-frequency square wave models, it can reach up to 2, but in real musical acoustic models, its actual distribution is constrained to between 0 and 1 with a very high probability. For example, when processing a smooth, sustained string note, although its upper limit of extreme values ​​may be relatively large due to volume settings, the smooth and continuous waveform and the small differences between adjacent sampling points result in a very small sum of the absolute values ​​of the first-order differences. Therefore, the transient exponent value obtained after the above division mapping calculation often approaches 0.01. Conversely, when processing an audio frame containing a strong drumbeat or cymbal impact, the waveform spikes from extremely low amplitude to energy peaks in a very short time, accompanied by dense high-frequency oscillations. In this case, the sum of the absolute values ​​of the first-order differences expands dramatically, and the transient exponent value calculated after normalization by the denominator scaling factor may jump to 0.4 or higher. This operational logic successfully achieves an objective and stable measurement of only the true relative proportion of transient changes within the waveform, regardless of fluctuations in the macroscopic volume of the audio.

[0030] In step 3, a threshold truncation nonlinear control curve, constructed based on preset kurtosis parameters and noise immunity thresholds, is used to perform an asymmetric mapping on the transient exponent value to obtain the window asymmetry factor. It is understandable that in the underlying logic of digital audio processing, although the front-end can quantify and extract values ​​reflecting the local oscillation intensity of the waveform, these directly extracted values ​​are often mixed with the inherent low-level background noise of portable device simulation front-ends or the background white noise of the music itself. More importantly, the physical intensity of the audio transient and the degree of asymmetric distortion required for the reconstruction filter are not simply linearly proportional. If the unmodified raw transient exponent is directly used for dynamic adjustment of the filter shape, even minor noise interference can easily cause frequent and irregular jittering of the filter shape between symmetry and asymmetry, leading to modulation noise that is easily perceptible to the human ear and severe phase distortion across the entire frequency band. Based on this, this application constructs a smooth and highly noise-resistant nonlinear conversion channel between transient characteristics and filter control parameters, accurately mapping the linearly distributed and easily disturbed original transient exponent values ​​to a strictly constrained and smoothly transitioning control scalar, thereby ensuring that appropriate asymmetric deformation is applied to the reconstruction filter only when real and strong transient changes occur.

[0031] In one embodiment, step 3 includes: step 31, performing transient background noise separation on the transient exponent value based on the noise immunity threshold to obtain an effective transient offset; step 32, adjusting the kurtosis of the effective transient offset based on the negative value of the kurtosis parameter to obtain a nonlinear exponent mapping value; and step 33, performing fractional inverse compression on the nonlinear exponent mapping value to obtain a window asymmetry factor.

[0032] The specific processing is as follows: After receiving the transient index value, which represents the transient oscillation intensity of the current audio frame, transmitted in parallel from the previous processing stage, the process proceeds to the first stage, step 31. In this process, a noise immunity threshold is introduced as a hard lower bound parameter. Its physical essence represents the boundary reference value that distinguishes between real music transient oscillations and meaningless background noise fluctuations. This parameter is preset based on the signal-to-noise ratio of the underlying digital-to-analog converter of the target hardware platform, combined with the normal ambient noise level, through extensive subjective listening experiments and waveform statistics. For example, in typical low-power portable audio decoding hardware, the preset noise immunity threshold can be fixed at 0.15. To eliminate pseudo-transient interference caused by simulated front-end noise or background white noise in portable audio devices, the processing device performs amplitude constraint operations on the input transient index value. Specifically, by directly subtracting the preset noise immunity threshold from the input transient index value, the center zero point of the subsequent activation function is dynamically shifted. The specific formula is expressed as follows:

[0033]

[0034] in, This represents the effective transient offset obtained from the calculation. It is the transient exponential value input from the previous stage. This represents the preset noise immunity threshold. When inputting an extremely smooth string piece with slight background noise, the transient index value extracted by the front end may be only 0.01. Substituting this into the above formula and subtracting the noise immunity threshold of 0.15, the resulting effective transient offset is -0.14. This negative value clearly indicates that the fluctuation of the current waveform has not reached the condition for triggering transient adjustment, thus effectively shielding against pseudo-transient interference. Conversely, when inputting a transient audio frame containing strong cymbal strikes, the transient index value may be as high as 0.4. In this case, the calculated effective transient offset is positive 0.25, successfully crossing the hard lower bound and activating the subsequent nonlinear mapping logic.

[0035] After completing the transient background noise separation operation, the process proceeds to the second stage, step 32. The preset kurtosis parameter involved here is a core adjustment constant controlling the transition band sensitivity slope when the reconstruction filter switches from a linear phase state to a minimum phase state. This parameter determines the rate at which the asymmetry factor approaches the limit value after the effective transient offset crosses zero. Its value is also predetermined through acoustic characteristic simulation and human ear tolerance to phase distortion tests, and can be set to 10. The digital signal processing core inside the processing device uses this parameter to construct an exponential mapping transformer. First, the input effective transient offset is multiplied by the negative value of the preset kurtosis parameter to determine the transition band slope constraint; then, this product is strictly used as the exponent, and a natural exponential operation is performed with the mathematical constant e as the base. This process transforms the original fluctuation relationship based on linear difference into a nonlinear logarithmic perceptual domain that conforms to the characteristics of human auditory perception. The mathematical expression for this operation step is as follows:

[0036]

[0037] in, This represents the calculated nonlinear exponential mapping value. It is the base of the natural logarithm (approximately 2.718). The sign represents the preset steepness parameter, and the negative sign gives the parameter the opposite polarity for adjustment. This represents the effective transient offset passed from the previous step. Referring to the specific numerical example above, when facing a strong cymbal strike signal and the effective transient offset is 0.25, multiplying by the negative value of the kurtosis parameter -10, the exponent becomes -2.5. After performing a natural exponentiation operation, the resulting nonlinear exponential mapping value is approximately 0.082. Here, the negative multiplication operation transforms the originally large positive offset into a nonlinear exponential mapping value that is extremely close to zero.

[0038] Next, the process proceeds to step 33 of the third stage. The processing unit utilizes rational fraction normalization activation logic to perform fractional inverse compression on the nonlinear exponential mapping value to ultimately obtain the window asymmetry factor. While the aforementioned natural exponential operation achieves nonlinear torsion, its output value tends towards infinity when facing extreme negative offsets, making it unsuitable for direct application in digital filter tap coefficient modulation, which demands extremely high absolute stability. To constrain the infinite boundary output of the previous stage within a strict and secure digital control space, the processing unit adds a mathematical constant 1 to the input nonlinear exponential mapping value to construct the denominator, and then performs division with the mathematical constant 1 as the numerator, taking the reciprocal. This nonlinear truncation process ultimately outputs a scalar factor signal that is absolutely confined within a closed interval. The corresponding formula is expressed as:

[0039]

[0040] in, This represents the final window asymmetry factor, with the 1 in the denominator being a fixed mathematical constant bias. This is the nonlinear exponential mapping value generated beforehand. This formula completely constructs a threshold-truncation nonlinear control curve with a specific offset and slope at the underlying architecture. Continuing with the numerical example of strong transients above, substituting the nonlinear exponential mapping value of 0.082 into the formula, the calculated window asymmetry factor is approximately 0.924. This extremely high value intuitively and accurately characterizes the need for strong right-tilt distortion processing of the current waveform window in order to completely suppress the pre-ringing effect through the asymmetric shape. However, when the input is a smooth string and the effective transient offset is -0.14, the exponent becomes 1.4, the nonlinear exponential mapping value surges to approximately 4.055, and the window asymmetry factor obtained after substituting into the fractional reciprocal operation drops sharply to 0.198. This low value means that the deformation effect of the dual-symmetric reference window is minimal, thereby maintaining the linear phase characteristics of the original filter to the greatest extent to avoid full-band distortion.

[0041] In particular, in the dynamic control of lossless audio reconstruction, although the transient index value extracted by the front end can quantify the energy level of the waveform oscillation within an audio frame, it is essentially only a one-dimensional intensity scalar and cannot fully characterize the temporal distribution of transient energy in complex music signals. In actual audio scenarios, the acoustic characteristics of different instruments vary greatly. For example, the transient energy produced by the striking of a snare drum is extremely concentrated, with a very high peak and a very short duration, presenting a sharp physical form; while the transient energy of the organ or string ensemble, although equally large, has a relatively smooth energy accumulation process, presenting a gentle form. If the above-mentioned nonlinear function with fixed parameters is directly used for mapping, it is very easy to output almost the same control quantity when the transient intensity is similar, resulting in insufficient pre-ringing suppression of sharp impact sounds or over-processing of the onset of gentle instruments, thereby destroying the natural acoustic envelope of the music. Therefore, it is necessary to introduce a new dimension for measuring transient form in the deformation control of the reconstruction filter. By realizing two-dimensional energy and form joint perception, the steepness of the nonlinear mapping can be dynamically adjusted according to the sharpness of the waveform, so as to preserve the true texture of the instrument's onset to the greatest extent while ensuring a strong transient suppression effect.

[0042] In a preferred embodiment, step 3 includes:

[0043] Based on the first-order difference absolute value sequence of the current audio frame, the transient sharpness factor is obtained by calculating the morphological sharpness feature. It should be understood that the morphological characteristics of an audio waveform can be objectively reflected by the fluctuation ratio of the gradient between adjacent sampling points. The extraction of the morphological sharpness feature aims to quantify the concentration of this waveform fluctuation. The specific implementation process is as follows: Obtain the absolute difference of the amplitudes of all adjacent sampling points generated by the forward difference operator within the current audio frame, forming a first-order difference absolute value sequence. Subsequently, the ratio of the peak value of the difference signal to the overall energy level of the sequence (i.e., the peak-to-average power ratio) is used as a measure of sharpness. The mathematical logic corresponding to this process is as follows:

[0044]

[0045] in, This represents the calculated transient sharpness factor; a higher value indicates a sharper transient. Let i be the value of the i-th element in the first-order difference absolute value sequence obtained in the preceding steps. ; This represents the local maximum fluctuation peak that is searched and extracted in the difference sequence; The preset number of frame samples is 256; the denominator is the root mean square operation on the difference sequence, used to characterize the average energy intensity of the audio waveform variation in that frame. This formula eliminates the influence of absolute volume by comparing local extreme fluctuations with global average fluctuations, and its output transient sharpness factor can accurately distinguish between sharp pulses and smooth onsets. For example, when the input is a snare drum beat signal, because the gradient is highly concentrated at a very small number of sampling points... Much larger than the average fluctuation, calculated It may reach 8.5; however, for the same energy level of pipe organ attenuation, due to the relatively uniform gradient distribution, its... It may only be 2.2.

[0046] Based on the transient sharpness factor and kurtosis parameter, a dynamic kurtosis parameter is synthesized. After obtaining the transient sharpness factor, the processing device then synthesizes the dynamic kurtosis parameter based on the transient sharpness factor and kurtosis parameter. Accordingly, in order to adapt the subsequent nonlinear response curve to the listening requirements of different instruments, the response slope of the Sigmoid function must be dynamically adjusted in real time according to the sharpness of the transient. The specific implementation of this process is as follows: a preset base kurtosis is retrieved as the reference response level of the system, and a sharpness sensitivity coefficient is introduced to control the intensity of the intervention of morphological features on the final control quantity. Subsequently, a logarithmic function is used to numerically compress the transient sharpness factor with a high dynamic range, making its influence smoother and more controllable. The corresponding mathematical synthesis formula is as follows:

[0047]

[0048] in, This indicates the dynamic kurtosis parameter of the output; The steepness parameter is a preset value, which is based on the basic tolerance setting of the underlying filter for phase, for example, set to 10; The preset sharpness sensitivity coefficient is used to adjust the weight of shape perception in the overall control, for example, it is set to 0.5; This represents a logarithmic operation with base 2. The formula dynamically adjusts the kurtosis: when... When the value is large, it produces a positive gain on the logarithmic terms, making A significant increase in sensitivity raises the sensitivity of the response curve; conversely, a decrease in sensitivity lowers it. It remains at a low level. Continuing from the previous example, the snare drum signal corresponds to... Calculations suggest it could jump to 25.4, while the organ signal corresponds to... It will only remain around 15.7.

[0049] The transient exponent value is calculated using the Sigmoid function based on the noise immunity threshold and dynamic kurtosis parameter to obtain the window asymmetry factor. Finally, utilizing the nonlinear truncation characteristic, the joint sensing result of transient intensity and morphology is transformed into a normalized weight scalar value that ultimately guides the deformation of the filter window function. During implementation, the transient exponent value transmitted from the front end is subtracted from the preset noise immunity threshold to eliminate background interference. Then, this offset is multiplied by the dynamic kurtosis parameter as a power factor of the natural exponent, and the reciprocal of the rational fraction is performed. The final mapping formula is as follows:

[0050]

[0051] in, The final generated window asymmetry factor is strictly within a closed interval between 0 and 1; The input is the transient exponential value; The preset noise immunity threshold is, for example, 0.15. This refers to the dynamic steepness parameter generated in real time in the previous step. This formula, by introducing a dynamically changing slope factor, makes the window asymmetry factor's response to transient intensity no longer singular. For the small drum signal, since... Extremely high, even the transient exponential value Even slightly above the threshold, the formula produces an extremely fast response, outputting a window asymmetry factor approaching 0.98, thus triggering powerful asymmetric filtering to completely suppress prering; however, for organ signals, due to With a smaller window asymmetry factor and a smoother curve response, even at the same intensity, the output window asymmetry factor may be only 0.75, thus reconstructing in a gentler way and preserving the natural and complete envelope details of the attack. Through this series of morphology-aware adaptive mappings, a substantial improvement in the accuracy of lossless audio transient reconstruction is achieved under demanding computational conditions.

[0052] In step 4, based on the window asymmetry factor, attenuation compression is applied to the first half-cycle of the even-symmetric reference window function, and stretching is applied to the second half-cycle to obtain a dynamic asymmetric window. The dynamic asymmetric window is then multiplied point-by-point in the time domain with a predefined ideal low-pass impulse response sequence to obtain the dynamic filter coefficients. It should be understood that in the analog amplification front-end processing of digital audio, since the ideal low-pass frequency domain filter maps to a mathematical oscillation curve with infinitely long delay characteristics in the time domain, traditional windowing truncation methods often employ strictly centrally symmetric even-symmetric window functions to maintain linear phase characteristics. However, when faced with steep audio abrupt changes, this symmetric processing inevitably pushes half of the filter ripple energy before the actual sound occurs, resulting in pre-ringing distortion, which is extremely sensitive to the human ear and severely damages the auditory experience. Therefore, by utilizing the window asymmetry factor extracted from the preceding calculation stage, the central symmetry of the traditional reconstruction filter core is dynamically and precisely broken to implement spatial polarity modulation on the reference window function. Under the premise of ensuring out-of-band noise suppression capability, the energy distribution of the first half-cycle is suppressed in a targeted manner and the second half-cycle is stretched accordingly, thereby completely blocking the generation of pre-ringing effect on the physical time axis, and finally synthesizing dynamic filter coefficients that can adapt to the local waveform characteristics of the current audio frame.

[0053] Figure 3 This is a flowchart of step 4 in the digital filtering reconstruction method for lossless audio according to an embodiment of this application. Figure 3 As shown, in one embodiment, step 4 includes: step 41, determining the distortion polarity adjustment vector based on the number of transverse taps of the filter; step 42, performing point-by-point multiplication modulation on the even-symmetric reference window function based on the distortion polarity adjustment vector, so that the first half-cycle is attenuated and compressed and the second half-cycle is stretched and expanded, to obtain a dynamic asymmetric window; step 43, performing point-by-point weighted truncation projection on the ideal low-pass impulse response sequence based on the dynamic asymmetric window to obtain the dynamic filter coefficients.

[0054] The specific processing is as follows: Proceed to step 41 of the first stage. Before delving into the calculation of the distortion polarity adjustment vector, the processing device first needs to retrieve the basic parameters and predefined function sequences from the read-only memory. The number of filter lateral taps involved here represents the total data node length of the finite-length unit impulse response filter, which directly determines the fineness of the frequency resolution and the depth of the stopband attenuation. This value is preset during the hardware initialization stage based on the processor's computational bit width, internal cache capacity, and global latency budget. For example, in typical low-power portable audio decoding hardware, to balance computational performance and reconstruction quality, this number of taps can be set to 128 discrete sampling nodes. The even-symmetric reference window function is a classic mathematical envelope window used to smoothly truncate infinitely long discrete sequences to suppress spectral leakage. Its specific architecture includes a smoothly asymmetric rising edge interval, a flat top transition, and a smoothly asymmetric falling edge interval. The overall physical shape presents a perfect mirror symmetry state with the geometric midpoint as the axis. The reference window function was generated during the early algorithm development phase through iterative optimization training of a mathematical model based on specific out-of-band suppression ratio requirements. After being acquired and burned into a static lookup table in the hardware, it is used for real-time mapping and retrieval. The ideal low-pass impulse response sequence represents the fundamental mathematical oscillation data with a pure brick-wall frequency response characteristic possessing the target cutoff frequency. In the time domain, it exhibits an endless oscillating ripple with the highest central amplitude gradually decaying towards both sides. This sequence is obtained by performing an inverse discrete Fourier transform on the target characteristics of the desired passband and, after removing the infinitely long tail with minute energy, is stored in the underlying memory block awaiting weighted clipping. Once all basic operational parameters are loaded and the window asymmetry factor successfully received from the previous stage, the digital front-end of the processing device initiates a pipelined operation process based on the number of filter lateral taps to determine the distortion polarity adjustment vector. The core of this process lies in calculating the scalar envelope used to control the direction of linear phase distortion. Within the read-only loading environment of the read-only memory, the physical center point of the discrete sequence is precisely determined based on the input number of filter lateral taps. Subsequently, through specific sign-based determination logic, when traversing all horizontal tap indices, the current processing point is strictly defined to belong to either the first half-cycle representing time advancement or the second half-cycle representing time lag. To construct a compensated envelope array where the first half is suppressed and contracted, and the second half is expanded, the polarity determination logic here is precisely defined: a positive polarity of 1 is output for the first half-cycle index representing time advancement, and a negative polarity of 1 is output for the second half-cycle index representing time lag. Next, this polarity determination value is combined with the input window asymmetry factor, and the combined product value is subtracted by a constant 1, thereby deriving the distortion polarity adjustment vector covering the entire node span. The formula is explicitly expressed as:

[0055]

[0056] in, This represents the specific node value of the distortion polarity adjustment vector generated when the current index is n. This is the window asymmetry factor, calibrated in the interval of 0 to 1, which is the stable output after fractional inverse compression of the preceding operations. The preset number of 128 filter lateral taps is a constant value. To specifically adapt to the polarity determination function of the current asymmetric reconstruction logic, its inherent mapping rule is set to be when the index When the value is less than the physical center point, the polarity is determined by positive output +1; when the index... When the value is greater than the physical center point, the polarity is determined to be negative, and the output is -1. Taking the extremely high window asymmetry factor of 0.924 extracted from the transient response to a strong metal impact as an example, when the leading sample (discrete index) at the front end of the scan is less than 64, the polarity function output is +1. After combining the product with the asymmetry factor, it is subtracted by the constant 1, resulting in an extremely low envelope correction value of 0.076 for the first half. However, when the scan enters the lagging sample domain at the back end, the polarity function output is -1, and the negatives cancel each other out, turning into addition. The resulting envelope correction value for the second half expands significantly to 1.924. This drastic imbalance difference envelope perfectly maps the urgent need for forced energy correction of the time-domain characteristics of strong transient waveforms in the digital space.

[0057] After obtaining the distortion polarity adjustment vector covering the entire filter length, the process proceeds to the second stage, step 42. This step fully activates the point-by-point multiplier logic array of the digital front end. The computational core performs an Hadamard integral product operation on the input even-symmetric reference window function queue with the distortion polarity adjustment vector generated in the previous step, strictly following the ascending order of the discrete spatial coordinates. This multiplication operation is not a conventional cross matrix operation, but rather an independent scaling and weighting operation for corresponding elements in space. The formula for its digital processing is expressed as:

[0058]

[0059] in, The dynamic asymmetric window obtained after modulation and synthesis is represented in the discrete index. The amplitude at that point, This is the preset amplitude of the even-symmetric reference window function extracted from the static lookup table at the same corresponding position. This product process can significantly shift the energy center of the window function from its original absolute temporal symmetry point to the right without compromising its overall window function's attenuation performance against out-of-band high-frequency noise. Continuing with the specific numerical state of the aforementioned strong transient, the smooth segment originally at a height of 0.5 on the left side of the symmetrical window is directly multiplied by a very small weight of 0.076, causing its amplitude to plummet to a near-absolute noise floor level; while the smooth segment at the mirror position on the right side is stretched and amplified many times over due to being multiplied by a high weight of 1.924, thus precisely synthesizing a forced suppression of pre-ringing over the physical time span, which manifests as an extremely smooth initiation envelope and a tolerant unbalanced asymmetrical window with subsequent ringing. In contrast, when the processing device is faced with a stable string signal without sudden changes, and the window asymmetry factor of the previous stage is only 0.198, the compression envelope coefficient on the left is 0.802 and the stretching envelope coefficient on the right is 1.198. The resulting dynamic asymmetric window is extremely close to the original even-symmetric physical form, thus maintaining a high-fidelity linear phase response across the entire frequency band without interfering with transients.

[0060] After completing the deformation shaping of the adaptive dynamic window, the rigid blocking relying solely on the frequency domain will inevitably result in a mathematical oscillation curve with infinitely long delay characteristics in the time domain. Therefore, digital filtering reconstruction must undergo a final time-domain truncation and constraint process to adapt to the finite boundaries of the underlying hardware execution. Thus, proceed to step 43 of the third stage. This final assembly step strictly adheres to the physical truncation boundaries defined by the number of filter lateral taps. The fundamental mathematical oscillation data containing the target frequency band characteristics of the audio reconstruction—i.e., the ideal low-pass impulse response sequence—is used in a point-to-point weighted projection multiplication truncation operation with the dynamically asymmetric window synthesized in the previous step. The final truncation mathematical formula for this step is expressed as:

[0061]

[0062] in, This represents the dynamic filter coefficients after final assembly and with direct execution capability. The node amplitude values ​​are the original ideal low-pass impulse response sequence pre-read from the static data bus. Through the forced overlay mapping of this asymmetric modulation window, the original infinitely extending oscillation ripples are not only smoothly contracted at their physical boundaries to completely eliminate the Gibbs effect of high-frequency ripples caused by hard physical truncation, but more importantly, the energy that would normally easily backflow and cause auditory prering distortion within its leading ripple domain is completely erased due to the strong suppression by the asymmetric window on the left side, which is rapidly contracted. The discrete numerical set assembled in this way ultimately forms a finite-length unit impulse response execution scalar set with extremely smooth frequency roll-off characteristics and highly adaptive non-equilibrium phase characteristics.

[0063] In step 5, array-weighted convolution is performed on the current audio frame based on the dynamic filter coefficients to obtain filtered audio data. Correspondingly, after a series of transient analyses and nonlinear mappings of the local waveforms, the processing device has successfully synthesized an asymmetric reconstruction kernel highly adapted to the current audio characteristics. However, this set of isolated coefficients with specific time-frequency response characteristics cannot produce any substantial filtering performance if it does not physically interact with the actual sound waveform. This step is introduced to truly apply this adaptively dynamically tuned filter form to the original audio stream. Using the multiply-accumulate operation matrix of the underlying hardware, the pre-generated dynamic filter coefficients are coupled point-by-point with the continuous discrete waveform data to form an inner product, thereby thoroughly filtering out high-frequency image energy that exceeds the limits of human hearing on the physical time axis. At the same time, by leveraging the asymmetric suppression bias characteristics generated by the coefficients when encountering transient changes, the pre-ringing oscillation energy at the edge of the target acoustic frequency band is accurately predicted and canceled, robustly reconstructing the harsh discrete samples into continuous, smooth, distortion-free, and clean digital audio data that can be directly read by the back-end digital-to-analog converter circuit.

[0064] Figure 4 This is a schematic diagram of the data flow in step 5 of the digital filtering reconstruction method for lossless audio according to an embodiment of this application. Figure 4 As shown, in one embodiment, step 5 includes: step 51, taking the current processing time as the time anchor point, and based on the tap length of the dynamic filter coefficients, tracing back along the time axis of the current audio frame and performing delay line truncation and boundary zero-padding to obtain a local sampling data window; step 52, based on the dynamic filter coefficients, performing point-by-point multiplication and global accumulation inner product operation on each corresponding position in the local sampling data window to obtain a single-point filtered reconstruction sample; step 53, sequentially filling the successively generated single-point filtered reconstruction samples to obtain filtered audio data.

[0065] The specific processing is as follows: After receiving the dynamic filter coefficients containing 128 tap nodes, precisely assembled from the previous processing stage, and the current audio frame containing 256 consecutive discrete samples packaged in the initial segmentation step, the first stage, step 51, is entered. The processing device then starts the filter reconstruction pipeline based on array-weighted convolution. The first operation performed is to use the current processing moment as the time anchor point, based on the tap length of the dynamic filter coefficients, to trace back along the time axis of the current audio frame and perform delay line truncation and boundary zero-padding to obtain a local sampling data window. In order to ensure that the continuously sampled audio data points can form a strict one-to-one correspondence with the filter weight matrix in spatial coordinates, the core of the algorithm needs to use the specific moment being processed as a rigid time anchor point to construct a delay line observation window containing historical states on the input current audio frame. Specifically, for any sampling anchor point in the range of 0 to 255 in the current audio frame sequence, the processing device will trace back along the physical time axis and strictly extract the discrete sampling segment that is completely consistent with the 128 tap lengths of the dynamic filter coefficients from the buffer. Because the reverse tracing process may encounter situations exceeding the physical boundaries of the current buffer or frame header—that is, when the index points to an undefined region less than 0—the processing module triggers boundary zero-padding normalization logic. This logic uses the continuous trailing historical nodes of the previous audio frame in the internal buffer for smooth patching. Only when processing the first frame of the global audio output and having absolutely no preceding historical data will it use an absolutely silent 0 amplitude value for cold start boundary zero-padding. The corresponding mathematical formula is:

[0066]

[0067] in, This represents the j-th discrete sample node within a local sampling data window that has been generated and aligned based on the t-th time anchor point. This is the original one-dimensional discrete sampled sequence of the current audio frame obtained from the input buffer. This is the index of the currently being processed time anchor point, and its value ranges from 0 to 255. For the sliding fetch index inside the delay line, This represents the preset tap length constant of 128 for the dynamic filter coefficients. For example, when processing the 50th time anchor point of the current audio frame, the processing device traces back 128 nodes in the historical direction. Since 50 minus 128 results in a negative out-of-bounds error, the actual audio sample amplitude is extracted from the 50th point to the 0th point. The remaining 77 historical positions that exceed the left boundary are uniformly processed by sequentially picking them up in reverse from the end of the previous audio frame buffer. In this way, it is ensured that a highly standardized local sample data window with an absolutely constant length of 128 can be generated for each processing beat, providing a seamless input prerequisite for the smooth execution of subsequent pipeline matrix multiplication and addition.

[0068] After aligning and extracting the local sampled data windows, the process proceeds to the second stage, step 52. In this core execution stage, the processing device directly calls the hardware multiply-accumulate link unit or highly parallel computing threads within the underlying digital signal processor. For each aligned local sampled data window, the computing array performs a rigorous standard inner product operation on the 128 actual audio samples containing historical beats and the 128 dynamic filter coefficients representing the transient characteristics of the current physical waveform generated in the previous stage. By precisely multiplying each corresponding historical node in a high-order spatial vector domain of finite dimensions, and then calculating the global sum of these 128 multiplication operations in the subsequent addition tree logic, a comprehensive output signal for a single processing cycle is generated. This process not only achieves strict blocking of high-frequency image energy exceeding the audible limit caused by discretization in the original samples, but also utilizes the principle of asymmetric suppression to pre-emptively offset and cancel the ripple oscillations at the edge of the target acoustic frequency band at this moment. The relevant physical formulas are as follows:

[0069]

[0070] In the formula, This represents a single-point filtered and reconstructed sample generated at the nth time anchor point after undergoing full convolution operations. The operator defines the global accumulation operation logic based on the hardware addition tree. The j-th weight parameter is generated in the dynamic filter coefficient sequence with targeted unbalanced phase based on the dynamic modulation of the mutation intensity in the preceding sequence. This refers to the locally discrete sampling point data extracted synchronously at the corresponding location. The maximum number of taps is also 128. In a deeper analysis of the specific scenario of strong transient impact, when audio encounters a sudden high-energy change, the front end of the generated asymmetric dynamic filter coefficient sequence is subjected to extremely strong attenuation and compression. This means that samples representing the lead time at the rear of the local data window are given a very low contribution weight, approaching zero, when participating in the inner product operation. Therefore, the leading oscillation energy that would normally cause pre-ringing backflow echoes is strongly filtered out and silenced during the multiplication stage. Conversely, the stretching characteristics of the back end of the filter coefficients allow historical samples in lagging positions to be amplified with tolerance, thus safely releasing physical energy to the rear ringing region where the human ear has a forward-masking physiological effect. For stable string frames without sudden changes, because the dynamic filter coefficients maintain a highly even-symmetric distribution, the inner product operation at this time perfectly preserves the linear phase response of the original full-frequency sound while filtering out high-frequency images, avoiding dispersion and timbre distortion.

[0071] As the underlying clock ticks continue to advance, we enter the third stage, step 53. To thoroughly restore the audio information data structure so that external storage interfaces or subsequent analog-to-digital converters at the pre-amplification stage can smoothly read and allocate it, the isolated scalar signals output sequentially in a tick-by-tick manner need to be rigorously encapsulated and repositioned. After each tick inner product operation generates a single-point filtered reconstruction sample, the processing device fills it into a newly defined empty multidimensional array queue in the internal high-speed memory, strictly according to the physical occurrence sequence of the processed data. In this loading pipeline, the memory address cursor increases linearly with the advancement of the time anchor. Once the complete cyclic boundary defined under the entire input frame domain is reached—that is, after completing the full convolution operation from index 0 to index 255 (a total of 256 points) and filling the 256-point data queue—the microinstruction sequencer immediately executes a pointer cursor locking operation and marks the end of the data block with a clear frame end mark. This constitutes a complete, seamless, and deeply adaptively reconstructed smooth new temporal block. The array integration formula corresponding to the output logic of this package is:

[0072]

[0073] in, This represents the final output, which is filtered audio data containing the entire continuous time-series waveform. to This represents the discrete single-point filtered reconstruction samples extracted and processed iteratively at each time anchor point. This refers to the preset number of frame samples, 256, read from the frame header information. It's important to note that although the array integration formula explicitly cyclically outputs a length corresponding to the input within this cycle... A collection of core samples within the same temporal frame However, because the underlying continuous bitstream system executes a length of The finite impulse response convolution operation, physically, will inevitably overflow backward by a span of [missing information]. The trailing aftershock data. Therefore, these 256 The main sample and the 127 trailing residual samples that follow will be automatically concatenated and combined in the underlying continuous memory stream to form filtered audio data with a total physical length extending to N+M-1, which will then be transmitted to the communication bus in the next stage. After the above series of reverse truncation, multiplication-addition inner products, and ordered recombination, the original pulse code modulation data frame, which initially carried harsh discrete steps and potential risks of image aliasing, has not only been successfully subjected to high-quality low-pass blocking, but has also been transformed into filtered audio data with smooth fluctuations and extremely high fidelity while completely eliminating all pre-ringing artifacts.

[0074] In step 6, the tail and head segments of the filtered audio data from adjacent frames are cross-layered and smoothly spliced ​​to obtain a reconstructed audio stream that eliminates frame boundary artifacts. In other words, in the finite-length sequence block processing pipeline of digital audio, to overcome hardware memory limitations, continuous audio is often divided into discrete data frames for independent processing. However, finite-length unit impulse response filters have inherent convolutional memory and energy broadening effects in the time domain. This means that after filtering the current discrete audio frame, its response will inevitably overflow the physical time boundary of the original frame, forming a significant tail-end energy leakage. If these processed discrete blocks are simply and crudely concatenated end-to-end in time, the edges of adjacent blocks will inevitably experience severe phase jumps and physical waveform cliffs due to the forced truncation of transient responses, resulting in extremely sensitive and sharp boundary click artifacts in the final amplified acoustic output. Therefore, this application ultimately utilizes cross-gradient operation to perform energy conservation and overlap and merge the residual energy overflowing from the previous frame with the starting oscillation segment of the current frame. By smoothing the gaps between frames through complementary weighting, the scattered discrete data blocks are seamlessly stitched into a continuous reconstructed waveform that completely eliminates frame boundary artifacts and has an extremely smooth listening experience.

[0075] In one embodiment, step 6 includes: step 61, segmenting the filtered audio data based on a preset overlap length to obtain the current frame header segment, the current frame core segment, and the current frame tail segment; step 62, applying weight to the current frame header segment based on the rising edge of the overlapping window function, and applying weight to the historical frame tail buffer based on the falling edge of the overlapping window function, performing a point-by-point superposition cross-gradient operation on the weighted two to obtain smooth splicing header data, and simultaneously writing the current frame tail segment into memory to update the historical frame tail buffer; step 63, concatenating the smooth splicing header data and the current frame core segment according to the time sequence to obtain the reconstructed audio stream.

[0076] The specific processing is as follows: After successfully receiving the filtered audio data output by the array-weighted convolution stage, the process proceeds to the first stage, step 61. Due to the inherent characteristics of the convolution inner product operation in the preceding stage, the total length of the output data frame will be significantly longer than the input original audio frame. This phenomenon physically manifests as the leakage and extension of transient energy along the time axis. Taking the preset frame sample number of 256 and the previously calculated dynamic filter tap step size parameter of 128 as an example, the actually generated filtered audio data contains 256 effective main samples corresponding to the original time sequence and 127 additional trailing samples. In this embodiment, the expected overlap length constant is precisely set to 127 sampling beats that are completely identical in dimension to the length of the filter trailing energy (i.e., To prepare for precise splicing of this long sequence, the processing unit first performs discrete spatial segmentation on the input filtered audio data based on a preset overlap length, thereby obtaining the current frame header segment, the current frame core segment, and the current frame tail segment. The preset overlap length defines the physical window span for adjacent data frames to overlap and permeate each other on the time axis. Its value is mainly determined by the direct access read / write rhythm of the underlying memory and the typical time required for the energy at the end of the filter to naturally decay to the silence threshold. In the specific array extraction operation, the processing unit, according to the spatial index, truncates the samples within the preset overlap length at the very beginning of the input data column as the header to be cross-fused; truncates the excess tail samples extending after the core body to be identified as the tail for the next loop of overlapping processing; and the remaining central main sequence is established as the core unprocessed region free from any additional modulation interference. In one embodiment, step 61, based on a preset overlap length, segments the filtered audio data to obtain the current frame header segment, the current frame core segment, and the current frame tail segment, including: segmenting the filtered audio data using the following formula, wherein the formula is:

[0077]

[0078] in, This is the i-th data point in the header segment of the current frame. The first one in the filtered audio data Data points, index Covering a closed range from 0 to 126, it precisely isolates the 127 discrete amplitudes at the very beginning. For the k-th data point in the core segment of the current frame, the index is... The range of values ​​starts from zero and extends to the full length of the original frame. Subtract the overlap window width constant That is, for the aforementioned preset values, the core segment spans a total of 129 consecutive high-fidelity reconstruction samples from index 127 to 255. The first segment at the end of the current frame Each data point corresponds to a truncation starting point at the original frame boundary. That is, index 256, extending all the way to the tap parameter. Subtract one decision at the end of the trail. , , These are the total length of the original frame, the constant width of the overlap window, and the number of horizontal taps of the filter. This precise set of segmentation constraints divides the large and lengthy sequence of single operations into three independent data containers with distinct functions in a highly regular manner.

[0079] After segment separation and cutting, the process proceeds to the second stage, step 62. During this clock cycle, the core input elements of the digital mixer logic, besides the current frame header segment, also include the historical frame tail buffer and the overlapping window function. The historical frame tail buffer is an independently allocated internal high-speed volatile storage area used to temporarily store the residual energy data at the tail end of the previous consecutive time frame after full convolution, which has been stripped by the same cutting logic; its essence is the delayed trailing echo of the previous cycle. The overlapping window function is a mathematical amplitude modulation control curve pre-fixed in a read-only memory matrix. Its specific architecture includes an asymmetric rising edge that smoothly ascends from absolute zero to full amplitude, and a complementary asymmetric falling edge that satisfies the sum of amplitudes equal to one at any corresponding time point. Because the dynamic filter tap coefficients used in adjacent frames undergo significant spatial asymmetric real-time deformation due to differences in transient intensity, direct traditional linear superposition (Overlap-Add) would cause phase discontinuities and high-frequency stuttering at the junction due to the physical abrupt changes in the envelopes of different filter responses. Therefore, a constant-power overlapping window function design is introduced for weighted processing to ensure that not only is fault resonance avoided, but also the system state transitions caused by real-time switching of dynamic convolution kernels due to sudden environmental transients are perfectly smoothed. This constant-power overlapping window function design is pre-tuned and generated based on the raised cosine or Hanning algorithm framework to ensure that there is no abrupt increase in volume due to gain resonance in the energy superposition region. In the specific cross-fusion process, the underlying computing array first performs a high-precision point-by-point multiplication operation between the current frame header segment in the current processing cycle and the overlapping window function with a gradual rising edge characteristic, thereby suppressing the high-frequency jitter caused by abrupt truncation at the beginning of the new data frame; simultaneously, another parallel computing branch multiplies the historical frame tail buffer representing the residual acoustic energy of the previous set of frames by the complementary gradual falling edge of the overlapping window function for forced blanking mapping. Subsequently, a point-by-point superposition cross-gradient operation was performed on the corresponding points of these two parallel weighted and spatially aligned pairs using a hardware addition tree. This effectively compensated for the energy discontinuity at the physical splicing seam by utilizing the sophisticated complementary gain characteristics, successfully extracting the smooth splicing section data. The mathematical expression corresponding to this mixing operation is:

[0080]

[0081] in, This represents the i-th pure transition sample in the smooth spliced ​​header data generated after interleaving and fusion. The current frame header segment is segmented into samples. This is the weight value extracted from the asymptotic rising edge of the overlapping window function, and its value increases strictly monotonically along the time axis with index i. It is a historical residual delay sample read synchronously from the historical frame tail buffer. This naturally creates a corresponding fade-out falling edge attenuation weight. For example, when processing the 63rd or 64th data point at the very center of the overlapping region, the rising edge weight is exactly 0.5, and the falling edge weight is also 0.5. At this point, the energy of the current new audio frame and the residual energy of the previous audio frame's trailing edge are added and mixed in equal proportions of 50%, thus completely replacing the original abrupt and jarring splicing with a physically extremely smooth transition. At the same time, in another parallel direct memory addressing operation, the data bus directly overwrites the 127 discrete amplitude values ​​contained in the previously cut-out tail segment of the current frame into the specified register address space, thereby completing the forced update operation of the historical frame tail cache.

[0082] After the frame beginning's gradual blending and the frame end's buffer refresh are both perfectly completed, the third stage, step 63, begins. Its core objective is to accurately restore the discrete array data, which has just been segmented and fused in the multi-dimensional parallel space, into a continuous bitstream conforming to the clock calibration of the external analog-to-digital converter's serial bus. In this final step, the controller strictly follows the chronological order of the audio waveform on the absolute physical time axis, initiating the underlying matrix serial transport operation. First, the controller captures the smooth splicing header data, which serves as the perfect component for overlap correction—the 127 composite scalars that have undergone deep fusion at the historical tail—and sequentially pushes them into the dedicated first-in-first-out (FIFO) data queue of the underlying communication interface. Next, the controller seamlessly switches the target read pointer to the lossless main component following the smooth header segment—the core segment of the current frame, which was previously independently sealed and unaffected by any additional window modulation interference—and pushes these 129 highly preserved original sound timbre and dynamics filtered samples into the same FIFO data queue. This sequential push-in action, based on occurrence time stamps, automatically completes a high-density, zero-gap concatenation of data blocks within the physical memory link. The mathematical structure of the resulting macroscopic contiguous queue is expressed as follows:

[0083]

[0084] in, This refers to the final, continuously generated waveform, which is essentially a reconstructed audio stream. (Symbol) This indicates that the first and last sequential queues are concatenated. As the vanguard, it forms the starting transition zone for each independently processed block, smoothly and gradually entering, that is, smoothly splicing together the initial data, and This is the core backbone supporting the overall acoustic feature thickness and audio detail, namely the core segment of the current frame. After undergoing this blanking and concatenation process, the periodic phase breaks that were inevitably caused by the conflict between discrete data truncation and long-term convolution operators are completely smoothed and healed. At the same time, given that an asymmetric blocking kernel has been adaptively synthesized for the transient characteristics of audio in the preceding stage, this final reconstructed audio stream has been completely stripped of all destructive factors that cause auditory prering echo distortion. Finally, this full, clear, and structurally rigorous digital audio stream will be continuously delivered to the back-end analog sound generation link at a fixed sampling baud rate.

[0085] In summary, a digital filtering reconstruction method for lossless audio based on embodiments of this application has been clarified. This method addresses the technical challenges of existing digital audio reconstruction methods, which struggle to simultaneously address pre-ringing effects and full-band phase distortion, and the high memory and power consumption of traditional hardware solutions. First, the transient onset intensity of the segmented audio frames is extracted in real-time to obtain the transient index value, which is then mapped to a window asymmetry factor using a nonlinear control curve. Based on this factor, a first-half-cycle attenuation compression and a second-half-cycle stretching are applied to a reference window function to generate a dynamic asymmetric window, thereby obtaining dynamic filter coefficients. By adaptively breaking the central symmetry of the filter when encountering transient signals, the forward backflow of ripple energy is effectively suppressed, fundamentally eliminating the pre-ringing effect that is sensitive to the human ear. Simultaneously, linear phase is preserved to the greatest extent possible in non-transient segments to avoid distortion. Finally, the audio is weighted and convolved using these dynamic coefficients, and cross-gradient stitching technology is combined to eliminate frame boundary artifacts caused by dynamic adjustments. This approach enables dynamic reconstruction by relying solely on point-by-point modulation of a single filter in the time domain, completely eliminating the need for massive storage of multiple filter banks or complex offline transformations. It perfectly solves the aforementioned technical problems under stringent limitations in computing memory and power consumption budgets.

Claims

1. A digital filtering and reconstruction method for lossless audio, characterized in that, include: Step 1: Based on the preset frame segmentation length, the pulse code modulation sampling data, sampling rate and bit depth contained in the original audio stream are divided into equal-length time slots to obtain the current audio frame; Step 2: Extract transient features from the current audio frame to obtain the transient index value that characterizes the transient onset intensity in the current audio frame; Step 3: Based on the threshold truncation nonlinear control curve constructed using preset steepness parameters and noise immunity thresholds, perform asymmetric mapping on the transient exponential value to obtain the window asymmetry factor; Step 4: Based on the window asymmetry factor, apply attenuation compression to the first half-cycle of the even symmetric reference window function and stretch it to the second half-cycle to obtain the dynamic asymmetric window. Then, multiply the dynamic asymmetric window with the predefined ideal low-pass impulse response sequence point by point in the time domain to obtain the dynamic filter coefficients. Step 5: Based on the dynamic filter coefficients, perform array-weighted convolution on the current audio frame to obtain the filtered audio data; Step 6: Perform cross-gradient overlay and smooth splicing on the tail and head segments of the filtered audio data of adjacent frames to obtain a reconstructed audio stream that eliminates frame boundary artifacts.

2. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 2 includes: Perform forward differencing and extremum extraction on the current audio frame to obtain the upper limit of frame extremum and the sum of the absolute values ​​of the first-order differences; Based on the number of frame samples and the upper limit of frame extreme values ​​of the current audio frame, extreme value normalization and transient exponent synthesis are performed on the sum of the absolute values ​​of the first-order differences to obtain the transient exponent value.

3. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 3 includes: Based on the noise immunity threshold, transient background noise separation is performed on the transient index value to obtain the effective transient offset; Based on the negative value of the kurtosis parameter, the effective transient offset is adjusted for kurtosis to obtain the nonlinear exponential mapping value; The nonlinear exponential mapping value is subjected to fractional inverse compression to obtain the window asymmetry factor.

4. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 3 includes: Based on the first-order difference absolute value sequence of the current audio frame, the transient sharpness factor is obtained by calculating the morphological sharpness feature; Based on the transient sharpness factor and kurtosis parameter, a dynamic kurtosis parameter is synthesized; The transient exponent value is calculated using the Sigmoid function based on the noise immunity threshold and dynamic steepness parameter to obtain the window asymmetry factor.

5. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 4 includes: The distortion polarity adjustment vector is determined based on the number of transverse taps of the filter. Based on the distortion polarity adjustment vector, the dual-symmetric reference window function is multiplied point by point to modulate it so that the first half-cycle is attenuated and compressed and the second half-cycle is stretched and expanded, thus obtaining a dynamic asymmetric window. Based on a dynamic asymmetric window, the ideal low-pass impulse response sequence is subjected to point-by-point weighted truncation projection to obtain the dynamic filter coefficients.

6. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 5 includes: Using the current processing moment as the time anchor point, based on the tap length of the dynamic filter coefficients, the current audio frame is traced backward along the time axis and the delay line is truncated and the boundary zero-padding is performed to obtain the local sampling data window. Based on the dynamic filter coefficients, point-by-point multiplication and global accumulation of inner product operations are performed on corresponding positions in the local sampling data window to obtain single-point filtered reconstructed samples. The single-point filtered reconstruction samples generated in successive iterations are sequentially filled to obtain the filtered audio data.

7. The digital filtering and reconstruction method for lossless audio according to claim 1, characterized in that, Step 6 includes: Based on the preset overlap length, the filtered audio data is segmented and cut to obtain the head segment, the core segment, and the tail segment of the current frame. The current frame header segment is weighted based on the rising edge of the overlapping window function, and the historical frame tail buffer is weighted based on the falling edge of the overlapping window function. The two weighted segments are then subjected to a point-by-point superposition cross-gradient operation to obtain smooth splicing header data. At the same time, the current frame tail segment is written to memory to update the historical frame tail buffer. According to the chronological order, the smooth splicing header data is concatenated and spliced ​​with the core segment of the current frame to obtain the reconstructed audio stream.

8. The digital filtering and reconstruction method for lossless audio according to claim 7, characterized in that, Based on a preset overlap length, the filtered audio data is segmented to obtain the current frame header segment, the current frame core segment, and the current frame tail segment. This includes segmenting the filtered audio data using the following formula: in, This is the i-th data point in the header segment of the current frame. The first one in the filtered audio data Data points, This is the k-th data point in the core segment of the current frame. The first segment at the end of the current frame Data points, , , These represent the total length of the original frame, the constant width of the overlap window, and the number of horizontal taps in the filter, respectively.