Patent ID: 7930170

Claim:
An improved method for detecting an attack in an input audio signal to reduce a pre-echo artifact caused by an attack during compression encoding of the input audio signal, comprising: converting, by a processor, the input audio signal into a digital audio signal; dividing the digital audio signal into large frames having a long-block frame length; partitioning each of the large frames into multiple short-blocks; computing short-block audio signal characteristics for each of the short-blocks based on changes in the input audio signal; comparing the computed short-block audio signal characteristics to a set of threshold values to detect a presence of the attack in each of the short-blocks; and changing the long-block frame length of one or more large frames based on the outcome of the comparison to reduce the pre-echo artifact caused by the attack; wherein detecting the attack comprises detecting a sudden increase in amplitude within the long-block frame length; wherein the long-block frame length comprises 1024 samples of digital audio signal; wherein the long-block frame length comprises a frame length used when there is no attack in the input audio signal; wherein computing the short-block audio signal characteristics further comprises computing inter-block differences and determining a maximum inter-block difference from the computed inter-block differences; wherein computing the short-block audio signal characteristics further comprises computing inter-block ratios and determining a maximum inter-block ratio from the computed inter-block ratios; wherein computing the inter-block differences comprises summing a square of differences between samples in adjacent short-blocks; and wherein computing the inter-block ratios comprises dividing the adjacent computed inter-block differences.