The following description will explain an embodiment of the present invention with reference to the drawings.
A coded acoustic signal read out from recording medium, a coded acoustic signal received by a digital tuner or the like is inputted into the acoustic signal input unit 21, and the inputted coded acoustic signal is outputted to the unpacking circuit (demultiplexer) 22. The unpacking circuit 22 unpacks the quantization coefficient, the scale factor, the scale factor multiplexer, the global gain and the subblock gain respectively from frame information of the acoustic signal. The coded acoustic signal is dequantized into an IMDCT coefficient at the dequantizing circuit 23 using the unpacked quantization coefficient, the quantization bit rate, the scale factor, the scale factor multiplexer, the global gain and the subblock gain. The dequantizing circuit 23 outputs an IMDCT coefficient expressed by the next expression (1) for each frequency band depending on the block length (a long block or a short block).
The variable “m” in the expression (1) indicates the index of the IMDCT coefficient, “MK(m)” indicates the quantization coefficient (Huffman decoding value), “sgn(MK(m))” indicates the sign of the quantization coefficient, “scalefac_multiplier” indicates 1 or 0.5, “gr” indicates the index of granule, “wnd” indicates the index of the form of the window, “sfb” indicates the index of the scale factor band, “preflag[gr]” indicates an existence flag of the preemphasis which is 0 or 1, and “pretab[sfb]” indicates a value obtained by a predetermined preemphasis table. It should be noted that the scale factor (which can be represented by each six bits and designated by approximately 2 dB, for example) in ATRAC is the same as a value relating to the scale factor in MP3. The value relating to the scale factor in MP3 is computed using the scale factor, the scale factor multiplexer, the global gain, the subblock gain (a part of the expression (1) after the multiplier of 2), the existence flag of the preemphasis and a value obtained by the preemphasis table, as shown in the expression (1). The following description will explain the scale factor in ATRAC and values relating to the scale factor in MP3 collectively as a scale factor. Here, the scale factor means a characteristic part represented by a mantissa part and an exponent part in order to represent a spectrum of each predetermined frequency band which is divided. For example, in MP3, a spectrum of each predetermined frequency band which is divided is normalized to have the maximum value of 1.0, and the characteristic part thereof is coded as a scale factor, a global gain and a subblock gain. The scale factor, the global gain and the exponent part of the subblock gain mentioned above are named generically as a value relating to a scale factor.
In the present embodiment, IMDCT coefficients I(0), I(1), . . . , I(m), . . . , I(575) are outputted for each of 32 frequency bands block (0)-block (31) as shown in the figure. When the sampling frequency is 44.1 kHz, the frequency of a block (0) is 0 Hz-689.0625 Hz, a block (1) is 689.0625 Hz-1378.125 Hz and a block (31) is 21360.9375 Hz-22050 Hz. It should be noted that a block of an arbitrary frequency band is hereinafter referred to as a block (k). Here, “k” is an integer and satisfies 0≦k≦31. The IMDCT coefficients I(0)-I(575) for each frequency band are inputted into the interpolation processor 1.
An IMDCT coefficient for each frequency band is composed of a plurality of coefficients (spectrums) depending on the block length. An IMDCT coefficient of a long block is composed of 18 coefficients and an IMDCT coefficient of a short block is composed of 6 coefficients. It should be noted that the following description will explain the present embodiment using an example wherein the block length is a long block.
In
The quantization bit rate detecting circuit 11 outputs the detected quantization bit rate to the interpolation judging circuit 12 and the computing circuit 14. The interpolation judging circuit 12 determines whether there is a coefficient I(m) having a quantization bit rate equal to or smaller than a predetermined bit rate in a frequency band or not. The interpolation judging circuit 12 may determine, for example, whether there is a coefficient I(m) having a quantization bit rate equal to or smaller than 4 in a frequency band or not. Then, when determining that there is a coefficient I(m) having a quantization bit rate equal to or smaller than a predetermined bit rate in an inputted frequency band, the interpolation judging circuit 12 outputs a coefficient I(m) of said frequency band to the selecting circuit 13 in order to apply an interpolation process. On the other hand, when determining that there is not a coefficient I(m) having a quantization bit rate equal to or smaller than a predetermined quantization bit rate in an inputted frequency band, the interpolation judging circuit 12 outputs a corrected coefficient I′(m) to the frequency-time transforming circuit 24 without applying an interpolation process to the coefficient I(m) of said frequency band.
The selecting circuit 13 selects a plurality of coefficients from coefficients in a frequency band. Here, for example, selected are at least coefficients at both ends of coefficients in a frequency band, i.e., a frequency at the lowest region and a frequency at the highest region. In the example of
The computing circuit 14 computes an interpolation coefficient of a coefficient, which is not selected, by an interpolation method using the coefficients selected by the selecting circuit 13. In this case, the computing circuit 14 may compute an interpolation coefficient only for a coefficient having a quantization bit rate equal to or smaller than a predetermined quantization bit rate, based on the quantization bit rate of the coefficient outputted from the quantization bit rate detecting circuit 11. As the interpolation method, a Lagrange's interpolation method or a spline interpolation method is used. The following description will explain an example wherein the spline interpolation method is used.
N+1 points (x0, y0), (x1, y1), . . . , (xN, yN) are given. Here, x0<x1< . . . xN is satisfied. The spline interpolation for connecting these points smoothly will be described. A curve to be obtained by a cubic spline interpolation is expressed by y=S(x). S(x) is defined piecewise by each section [xj, yj]. S(x)=Sj(x) is satisfied in each section xj≦x≦xj+1. Sj(x) is given by a cubic polynomial expressed by the expression (2).
S
j(x)=aj(x−xj)3+bj(x−xj)2+cj(x−xj)+dj (2)
Coefficients aj, bj, cj and dj are decided by the following conditions. That is, the curve y=S(x) is continuous and passes all the points (xJ, yJ)(j=0, 1, . . . , N) (condition 1). Moreover, the first-order differential coefficient and the second-order differential coefficient of y=S(x) are continuous at boundaries of sections x=xj(j=1, 2, . . . , N−1) (condition 2). From the condition 1, the expression (3) is derived.
S
j(xj)=yj(j=0,1, . . . ,N−1) Sj(xj+1)=yj+1(j=0,1, . . . ,N−1) (3)
From the condition 2, the expression (4) is derived.
S′
j(xj+1)=S′j+1(xj+1) (j=0,1, . . . ,N−1) S″j(xj+1)=S″j+1(xj+1) (j=0,1, . . . ,N−1) (4)
Using these expressions (3) and (4), the coefficients aj, bj, cj and dj are decided. First, the second-order differential coefficient of S(x) at x=xj(j=1, 2, . . . , N−1) is expressed as the expression (5).
uj=S″(xj) (5)
Since the definition of the cubic spline is the expression (2), the second-order differential coefficient thereof is expressed by the expression (6).
S″
j(xj)=2bj=uj (6)
Thus, bj=uj/2 is obtained. Furthermore, the second-order differential coefficient can be expressed by the expression (7).
S″
j(xj+1)=6aj(xj+1−xj)+2bj=uj+1 (7)
From the expression (7), the expression (8) is derived.
From the above expression, the conditions of the expression (9) is satisfied automatically.
S″
j(xj+1)=uj+1=S″j+1(xj+1) (9)
Since dj=yj is clear, the expression (10) is derived using the condition 1.
a
j(xj+1−xj)3+bj(xj+1−xj)2+cj(xj+1−xj)+dj=yj (10)
Furthermore, the expression (11) is obtained finally from the expression (10).
Here, the last condition expressed by the expression (12) is used.
S″
j(xj+1)=S′j+1(xj+1) (12)
The expression (12) can be expressed as the expression (13) from a cubic polynomial.
3aj(xj+1−xj)2+2bj(xj+1−xj)+cj=cj+1 (13)
By assigning aj, bj and cj into the expression (13), the expression (14) is derived.
When these are arranged in order, simultaneous equations expressed by the expression (15) are satisfied.
Here, hj and vj satisfy the condition expressed by the following expression (16). It should be noted that hj and vj are known constants which can be computed only from xj and yj which are given at first.
Though the number of unknown variables uj is N+1, the number of the simultaneous linear equations described above is N−1. Accordingly, uj cannot be decided uniquely from the simultaneous linear equation. Therefore, a boundary condition is added at each of the points (x0, y0) and (xN, yN) at both ends of the curve. Though some boundary conditions are possible, a condition that the rate of change in slope of the curve is 0 at both ends is employed here. Since the second-order differential is 0, the expression (17) is derived.
S″(x0)=S″(xN)=0 (17)
From the expression (17), the expression (18) is derived.
S″(x0)=S″N−1(xN)=0 (18)
Since u0=uN=0 is satisfied, the simultaneous linear equation relating to u1 to uN−1 expressed by the expression (19) is obtained.
Next, the following description will explain the algorithm of the spline interpolation. First, N+1 points (xJ, yJ) (j=0, 1, . . . , N) are given and it is assumed that the cubic spline satisfies the expressions (20) and (21) piecewise.
S(x)=Sj(x)=aj(x−xj)3+bj(x−xj)2+cj(x−xj)+dj(xj≦x≦xj+1) (20)
S″(xj)=uj(j=0,1, . . . , N) (21)
When the boundary condition at both ends of the curve is the expression (22), u0=uN=0 is satisfied.
S″(x0)=S″(xN)=0 (22)
By computing hj (j=0, 1, . . . , N) and uj (j=0, 1, . . . , N) and solving the simultaneous linear equation, u1 to uN−1 are obtained. At last, coefficients aj, bj, cj and dj are obtained and the curve S(x) is decided. The computing circuit 14 obtains coefficients aj, bj, cj and dj of the curve Sj(x) based on the coefficients selected by the selecting circuit 13. Regarding a coefficient which is not selected and has a quantization bit rate equal to or smaller than a predetermined value, an interpolation coefficient Sj(x) is computed and a corrected interpolation coefficient Sj(x) and a coefficient which is not interpolated are outputted to the frequency-time transforming circuit 24 as coefficients I′(m).
On the other hand, when determining that there is a coefficient having a quantization bit rate equal to or smaller than a predetermined value (YES in the step S42), the interpolation judging circuit 12 outputs coefficients of said frequency band to the selecting circuit 13. The selecting circuit 13 selects coefficients at both ends in the frequency band, i.e. a coefficient at the low region side and a coefficient at the high region side, as nodal points of the spline interpolation (step S43). The selecting circuit 13 further selects a coefficient of the maximum spectrum and a coefficient of the minimum spectrum of coefficients in the frequency band as nodal points of the spline interpolation (step S44). It should be noted that the number of nodal points becomes 2 to 4 since the coefficient of the maximum spectrum and the coefficient of the minimum spectrum may be respectively coefficients at both ends in the frequency band.
The computing circuit 14 computes the coefficients aj, bj, cj and dj of the spline function based on coefficients selected in the steps S43 and S44 expressed by the expression (2) (step S45). The computing circuit 14 determines whether the quantization bit rate of a coefficient which is not selected in the steps S43 and S44 is equal to or smaller than a predetermined value or not (step S46). When determining that the quantization bit rate of a coefficient which is not selected is equal to or smaller than a predetermined value (YES in the step S46), the computing circuit 14 computes an interpolation coefficient from the obtained coefficients aj, bj, cj and dj and the expression (2) (step S47). On the other hand, when determining that the quantization bit rate of a coefficient which is not selected is not equal to nor smaller than a predetermined value (NO in the step S46), the computing circuit 14 does not perform the interpolation process and skips the process at the step S47.
The computing circuit 14 determines whether the process of the step S46 for all the coefficients which are not selected in the steps S43 and S44 has been finished or not (step S48). When determining that the process has not been finished (NO in the step S48), the computing circuit 14 proceeds to the step S46 so as to obtain an interpolation coefficient for another coefficient which is not selected. On the other hand, when determining that the process for all the coefficients which are not selected has been finished (YES in the step S48), the computing circuit 14 terminates a sequence of processes. As a result of executing the above process for all frequency bands and applying the spline interpolation for coefficients having a low quantization bit rate so as to obtain the most suitable spectrum as an interpolation coefficient, the resolution of a quantized coefficient can be enhanced and reproduction without dissatisfaction or uncomfortable feeling can be achieved. It should be noted that the selecting method of a coefficient to be a nodal point and the value of the quantization bit rate described above are absolutely an example and the present invention is not limited to them.
It should be noted that the selecting circuit 13 may select a coefficient of the maximum spectrum and a coefficient of the minimum spectrum from coefficients of a frequency band in the step S44 only when the following condition is satisfied. That is, the coefficient of the maximum spectrum and the coefficient of the minimum spectrum are selected when the quantization bit rate of the coefficient of the maximum spectrum and the coefficient of the minimum spectrum is equal to or larger than a predetermined value in the step S46, e.g., 4 bit.
As shown in
Embodiment 2 relates to a form for correcting an interpolation coefficient.
Here, in a case of I(1)=0 as shown in the figure, the original sound M(1) having a quantization bit rate of 2 exists theoretically in a range from −0.5SF to +0.5SF. When I(2)=SF is satisfied, the original sound M(2) theoretically exists in a range from a lower limit 0.5SF to an upper limit SF. An effective range is a theoretical range wherein the original sound decided by the scale factor and the quantization bit rate exists for the coefficient I(m). Here, assuming that the effective range of the coefficient I(m) is P(m), the quantization bit rate is W and the scale factor is SF, the effective range P(m) is defined by the following expression (23).
Here, when I(m)=SF is satisfied, the effective range P(m) is defined by the expression (24).
When I(m)=−SF is satisfied, the effective range P(m) is defined by the expression (25).
The definition of the effective ranges is absolutely an example, and the present invention is not limited to this as long as decision is made based on the quantization bit rate and the scale factor for a coefficient, such as definition of an effective range P(m) using the absolute value of a coefficient I(m).
In
When determining that an interpolation coefficient exists in an effective range, the correcting circuit 16 outputs the interpolation coefficient to the frequency-time transforming circuit 24 without correcting the same. On the other hand, when determining that an interpolation coefficient does not exist in the effective range, the correcting circuit 16 corrects the interpolation coefficient to be in the effective range. Said correction process is performed as described below, for example. When an interpolation coefficient is beyond an upper limit of an effective range defined by the expressions (23) to (25), for example, the interpolation coefficient is corrected to be the upper limit. In the meantime, when an interpolation coefficient is below a lower limit defined by the expressions (23) to (25), the interpolation coefficient is corrected to be the lower limit.
In addition, the interpolation coefficient may be multiplied by a predetermined gain g. Said gain g is the ratio of the interpolation coefficient S(m) to the upper limit (or lower limit) of the effective range P(m). Other interpolation coefficients (for example, contiguous S(m−2), S(m−1), S(m+1) and S(m+2)) are multiplied by said gain g and whether other interpolation coefficients are within the respective effective ranges (P(m−2), P(m−1), P(m+1) and P(m+2)) or not is determined. When determining that the interpolation coefficients are within the effective ranges, the correcting circuit 16 multiplies the interpolation coefficient S(m) by said gain g and outputs the value to the frequency-time transforming circuit 24.
On the other hand, when determining that other interpolation coefficients are not within the respective effective ranges, the correcting circuit 16 changes the value of the gain g by a predetermined value (e.g., 1.5g, 1.4g, 1.3g, . . . , 0.5g) and repeatedly changes the value until other interpolation coefficients come within the respective effective ranges. When other interpolation coefficients do not come within the respective effective ranges even after the above process is performed, only said interpolation coefficient S(m) is corrected to be the upper limit (or lower limit) as described above. In such a manner, it becomes possible to correct an interpolation coefficient to come within a theoretically possible range of quantization of the original sound and stabilize the signal process at the time of decoding even when an interpolation error occurs due to some cause. It should be noted that the correction process described above is absolutely an example and the process may be performed in other forms as long as an interpolation coefficient is corrected to come within an effective range.
The correcting circuit 16 compares the interpolation coefficient with the effective range and determines whether the interpolation coefficient exists in the effective range or not (step S84). When determining that the interpolation coefficient exists in the effective range (YES in the step S84), the correcting circuit 16 outputs said interpolation coefficient to the frequency-time transforming circuit 24 without correcting the same (step S87). On the other hand, when determining that the interpolation coefficient does not exist in the effective range (NO in the step S84), the correcting circuit 16 corrects the interpolation coefficient to come within the effective range (step S85). When the interpolation coefficient is beyond the upper limit of the effective range defined by the expressions (23) to (25), the correcting circuit 16 corrects the interpolation coefficient to be the upper limit. In the meantime, when the interpolation coefficient is below the lower limit defined by the expressions (23) to (25), the correcting circuit 16 corrects the interpolation coefficient to be the lower limit. The correcting circuit 16 then outputs the corrected interpolation coefficient to the frequency-time transforming circuit 24 (step S86).
The correcting circuit 16 determines whether other interpolation coefficients multiplied by the gain g′ exist in effective ranges according to said other interpolation coefficients or not (step S93). When determining that all other interpolation coefficients multiplied by the gain g′ exist in effective ranges according to the respective interpolation coefficients (YES in the step S93), the correcting circuit 16 multiplies an interpolation coefficient S(m) by said gain g′ (step S94) and terminates the process. On the other hand, when determining that at least one of other interpolation coefficients multiplied by the gain g′ does not exist in an effective range according to said other interpolation coefficient (NO in the step S93), the correcting circuit 16 performs the following process so as to change the gain g′ in stages.
The correcting circuit 16 assigns n+1 to a variable n (step S95). It should be noted that the initial value of n is 0. The correcting circuit 16 subtracts (n/10)g from a value which is 1.5 times a gain g (gain of initial value g′) so as to compute a new gain g′ (step S96). That is, performed is a process for changing the gain g in stages of 10% within a range of ±50%. The range of the gain may be narrowed and the resolution of stages may be enhanced by subtracting (n/10)g from a value which is 1.5 times the gain g and subtracting (n/10)g from a value which is 1.25 times the gain g as the quantization bit rate increases from 2 to 3. The correcting circuit 16 determines whether the variable n is 10 or not (step S97). When determining that the variable n is not 10 (NO in the step S97), the correcting circuit 16 proceeds to the step S92 and multiplies another interpolation coefficient by a new gain g′. As described above, a process for incrementing the variable n so as to change the gain g in stages is repeatedly performed.
When determining that n is 10 (YES in the step S97), that is, when the gain g is equal to or larger than 1.5g or equal to or smaller than 0.5g, the correcting circuit 16 determines that correction using the gain g is difficult and corrects an interpolation coefficient to the upper limit (or lower limit) of the effective range (step S98). It should be noted that, though a process for multiplying g by 1.5 is performed in the step S96 in the present embodiment, this is absolutely an example and any suitable value may be used for multiplication.
Since the present Embodiment 2 has such a structure and other structures and functions are the same as those of Embodiment 1, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
A computer program for causing the personal computer 20 to operate can be provided in the form of a portable recording medium 1A such as a CD-ROM, an MO or a DVD-ROM as in the present Embodiment 3. Furthermore, it is also possible to download the computer program from a server computer, which is not illustrated, via the communication unit 66. The following description will explain the content thereof.
The portable recording medium 1A (CD-ROM, MO, DVD-ROM or the like) which records therein a computer program for causing a reader/writer, that is not illustrated, in the personal computer 20 shown in
Since the present Embodiment 3 has such a structure and other structures and functions are the same as those of Embodiments 1 and 2, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
Embodiment 4 relates to a form for determining whether a coefficient is to be interpolated or not depending on the tonality of an acoustic signal.
The index value computing circuit 27 computes a tonality index value indicative of the degree of tonality by subtracting a mean value from the maximum value of a scale factor of each frequency band. The computed tonality index value is outputted to the tonality judging circuit 28. A reference value is stored in a memory, which is not illustrated, in the tonality judging circuit 28, and the tonality judging circuit 28 compares the inputted tonality index value with the reference value so as to determine whether the tone is a pure tone or not. It should be noted that said reference value may be 70 dB when the maximum value of the scale factor is 120 dB, for example.
When the tonality index value is smaller than the reference value, the tonality judging circuit 28 determines that the tonality is low and outputs coefficients I(m) of all the frequency bands to the interpolation processor 1 so as to perform the interpolation process described above. On the other hand, when the tonality index value is larger than the reference value, the tonality judging circuit 28 determines that the tonality is high and outputs the coefficients I(m) of all the frequency bands directly to the frequency-time transforming circuit 24 without outputting the same to the interpolation processor 1. By executing or not executing an interpolation process depending on the characteristic of an acoustic signal as described above, a suitable interpolation process can be achieved and it becomes possible to speed up processing and reduce the power consumption.
The tonality judging circuit 28 reads out a reference value from a memory, which is not illustrated, provided therein (step S176). The tonality judging circuit 28 then compares the inputted tonality index value with the reference value and determines whether the tonality index value is smaller than the read-out reference value or not (step S177). When determining that the tonality index value is smaller than the reference value (YES in the step S177), the tonality judging circuit 28 determines that the tonality is low and outputs the coefficients I(m) of all the frequency bands to the interpolation processor 1 (step S178).
On the other hand, when determining that the tonality index value is larger than the reference value (NO in the step S177), the tonality judging circuit 28 determines that the tonality is high and outputs the coefficients I(m) of all the frequency bands directly to the frequency-time transforming circuit 24 without outputting the same to the interpolation processor 1 (step S179). It should be noted that whether the tone is a pure tone or not may be determined based on power of each frequency band, though whether the tone is a pure tone or not is determined in the present Embodiment 4 based on the scale factor. In this case, the index value computing circuit 27 subtracts the mean value from the maximum value of power of coefficients I(m) of each frequency band and outputs the result as a tonality index value to the tonality judging circuit 28. In the tonality judging circuit 28, 40 dB is prestored as the reference value, for example. When the tonality index value is smaller than said reference value, the tonality judging circuit 28 determines that the tonality is low and outputs the coefficients I(m) of all the frequency bands to the interpolation processor 1. On the other hand, when the tonality index value is larger than the reference value, the tonality judging circuit 28 determines that the tonality is high and outputs the coefficients I(m) of all the frequency bands to the frequency-time transforming circuit 24 without sending the same through the interpolation processor 1. It should be noted that a technique disclosed in Japanese Patent Application Laid-Open No. 2002-351500 or Japanese Patent Application Laid-Open No. 2005-195983 may be applied to the determination of tonality described above.
Since the present Embodiment 4 has such a structure and other structures and functions are the same as those of Embodiments 1 to 3, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
The process according to Embodiment 4 may be realized as a software process using a personal computer shown in
The portable recording medium 1A (CD-ROM, MO, DVD-ROM or the like), which records therein a computer program for causing a reader/writer, that is not illustrated, in the personal computer 20 shown in
Since the present Embodiment 5 has such a structure and other structures and functions are the same as those of Embodiments 1 to 4, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
Embodiment 6 relates to a form for determining whether an interpolation process is to be executed or not depending on a bit rate.
The sampling frequency obtaining circuit 211 obtains a sampling frequency described in a header attached to an acoustic signal. In the MP3 method, any one of 32 kHz, 44.1 kHz and 48 kHz is obtained as a sampling frequency. The sampling frequency obtaining circuit 211 outputs the obtained sampling frequency to the bit rate comparing circuit 212.
Moreover, for 44.1 kHz, 192 kbps is stored as the reference bit rate so that determination of tonality and an interpolation process described above are performed when the bit rate is smaller than 192 kbps as shown in
The bit rate comparing circuit 212 reads out a reference bit rate from the table 213 based on the sampling frequency outputted from the sampling frequency obtaining circuit 211. The bit rate comparing circuit 212 then determines whether the bit rate outputted from the bit rate obtaining circuit 210 is smaller than the reference bit rate or not. When determining that the bit rate outputted from the bit rate obtaining circuit 210 is smaller than the reference bit rate, the bit rate comparing circuit 212 outputs coefficients I(m) of all the frequency bands to the interpolation processor 1. For example, when the obtained sampling frequency is 32 kHz and the obtained bit rate is 32 kbps, 64 kbps, 96 kbps or 128 kbps, the coefficients I(m) of all the frequency bands become subject to an interpolation process.
On the other hand, when determining that the bit rate outputted from the bit rate obtaining circuit 210 is not smaller than the reference bit rate, the bit rate comparing circuit 212 outputs coefficients I(m) of all the frequency bands directly to the frequency-time transforming circuit 24 without sending the same through the interpolation processor 1. For example, when the obtained sampling frequency is 32 kHz and the obtained bit rate is 160 kbps, 192 kbps, 224 kbps, 256 kbps, 288 kbps, 320 kbps, 352 kbps, 384 kbps, 416 kbps or 448 kbps, coefficients I(m) of each frequency band do not become subject to an interpolation process. Since the present invention is constructed to execute or not to execute an interpolation process depending on the sampling frequency and the bit rate as described above, the most suitable interpolation process matching the state of the acoustic signal can be achieved and it becomes possible to speed up processing and reduce the power consumption.
The bit rate comparing circuit 212 reads out, from the table 213, a reference bit rate corresponding to the sampling frequency outputted from the sampling frequency obtaining circuit 211 (step S215). The bit rate comparing circuit 212 then determines whether the bit rate obtained by the bit rate obtaining circuit 210 is smaller than the read-out reference bit rate or not (step S216). When determining that the obtained bit rate is smaller than the reference bit rate (YES in the step S216), the bit rate obtaining circuit 210 outputs coefficients I(m) of all the frequency bands to the interpolation processor 1 (step S217).
On the other hand, when determining that the obtained bit rate is not smaller than the reference bit rate (NO in the step S216), the bit rate obtaining circuit 210 outputs coefficients I(m) of all the frequency bands directly to the frequency-time transforming circuit 24 without sending the same through the interpolation processor 1 (step S218).
Since the present Embodiment 6 has such a structure and other structures and functions are the same as those of Embodiments 1 to 5, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
The process according to Embodiment 6 may be realized as a software process using the personal computer shown in
The portable recording medium 1A (CD-ROM, MO, DVD-ROM or the like) which records therein a computer program for causing a reader/writer, that is not illustrated, in the personal computer 20 shown in
Since the present Embodiment 7 has such a structure and other structures and functions are the same as those of Embodiments 1 to 6, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
An interpolation coefficient, which is obtained by interpolating a coefficient according to an absolute value by spline interpolation or the like, and a coefficient according to an absolute value, which is not interpolated, are outputted from the computing circuit 14 to the modifying circuit 18. The modifying circuit 18 determines whether the sign of an interpolation coefficient interpolated by the computing circuit 14 is positive or negative. When the sign of the interpolation coefficient is negative, the modifying circuit 18 then determines that an error due to Runge's phenomenon, overshoot or the like has occurred and modifies said interpolation coefficient to 0.
The modifying circuit 18 outputs the modified coefficient 0, an interpolation coefficient having a positive sign and a coefficient according to an absolute value which is not interpolated to the adding circuit 19. The adding circuit 19 adds a sign to an interpolation coefficient having a positive sign and a coefficient according to an absolute value which is not interpolated based on the output from the sign extracting circuit 123. An original coefficient I(m) to which an absolute value process is not applied is inputted into the sign extracting circuit 123 and the correlation degree computing circuit 122. The sign extracting circuit 123 extracts the sign of the coefficient I(m) and outputs the sign to the adding circuit 19. The adding circuit 19 adds a sign of the same zone outputted from the sign extracting circuit 123 to an interpolation coefficient having a positive sign and a coefficient which is not interpolated. In this manner, a sign changed by the absolute value computing circuit 17 is restored.
When the coefficient I(m) is 0, that is, when determining that the information of a sign of the coefficient I(m) is lost by a quantization error, the sign extracting circuit 123 requires output of a sign of the correlation degree computing circuit 122. When the coefficient I(m) is 0, the correlation degree computing circuit 122 refers to the coefficient storage 121 and decides the sign.
When a coefficient I(m) is 0, the correlation degree computing circuit 122 extracts adjacent coefficients, e.g., contiguous I(m−3), I(m−2), I(m−1), I(m+1), I(m+2) and I(m+3). The correlation degree computing circuit 122 then extracts a predetermined number of MDCT coefficients, e.g. M(m−3), M(m−2), M(m−1), M(m+1), M(m+2), M(m+3), from the coefficient storage 121 and computes the degree of correlation with contiguous coefficients I(m−3), I(m−2), I(m−1), I(m+1), I(m+2) and I(m+3). The correlation degree computing circuit 122 then changes m of an MDCT coefficient M(m) while reading out the sign of Mr(m) of MDCT coefficients Mr(m−3), Mr(m−2), Mr(m−1), Mr(m+1), Mr(m+2) and Mr(m+3) having the highest degree of correlation, i.e. having the largest correlation value based on a correlation function, and outputs the same to the sign extracting circuit 123. For example, when it is determined that a degree of correlation of M(2), M(3), M(4), M(6), M(7) and M(8) of a frame Fr002 is the highest, the sign “negative” of M(5)=−0.083181 at the center is extracted. It should be noted that the adjacent coefficients are not limited to three contiguous coefficients described above, and may be two contiguous coefficients, a plurality of every other contiguous coefficients, or the like.
The sign extracting circuit 123 outputs the extracted sign “negative” to the adding circuit 19. The adding circuit 19 adds the sign to an interpolation coefficient. The adding circuit 19 outputs all the coefficients, to which a sign is added as described above, to the frequency-time transforming circuit 24. Music is composed of a set of sine waves, and computation of a degree of correlation is performed under a narrow band (which uses six MDCT coefficients, for example), that is, under the premises that a spectrum strong enough to have an impact does not exist, so as to decide the most likely sign. Since the sign is decided in view of the regularity of a sine MDCT coefficient as described above, it also becomes possible to accurately reproduce the information of the sign lost by the quantization error. Here, the reason of computing and interpolating the absolute value of I(m) will be described.
The following description will explain the sign deciding process described above using a specific example.
As shown in
Next, the adding circuit 19 adds a sign for the interpolation coefficients S(2)-S(7). The sign extracting circuit 123 extracts the signs of the coefficients I(2)-I(7) (positive, positive, no sign, negative, negative, negative; see
At last, the adding circuit 19 adds the sign of the interpolation coefficient S(4). Since the sign of the coefficient I(4) does not exist, the correlation degree computing circuit 122 reads out contiguous coefficients I(2), I(3), I(5) and 1(6), refers to the coefficient storage 121 and reads out a plurality of (four in the present example) MDCT coefficients. The correlation degree computing circuit 122 then computes the correlation value, sequentially changes an MDCT coefficient to be read out and decides the sign of an MDCT coefficient at the center of MDCT coefficients having the highest correlation value as the sign of the coefficient I(4). Here, it is assumed that a negative sign is obtained. After extracting a negative sign, the sign extracting circuit 123 outputs said sign to the adding circuit 19, and the adding circuit 19 obtains I′(4) to which a negative sign is added. The adding circuit 19 outputs coefficients I′(1)-I′(10) obtained as described above to the frequency-time transforming circuit 24.
On the other hand, when determining that the interpolation coefficient is not negative (NO in the step S23), the adding circuit 19 determines whether the interpolation coefficient and the coefficient which is not interpolated are 0 or not (step S25). When determining that the interpolation coefficient and the coefficient which is not interpolated are 0 (YES in the step S25), the adding circuit 19 determines that it is unnecessary to add a sign and terminates the process for said interpolation coefficient and the coefficient which is not interpolated. On the other hand, when determining that the interpolation coefficient and the coefficient which is not interpolated are not 0 (NO in the step S25), the adding circuit 19 determines whether a coefficient corresponding to an interpolation coefficient is 0 or not (step S26).
When the adding circuit 19 determines that the coefficient corresponding to the interpolation coefficient is not 0 (NO in the step S26), the sign extracting circuit 123 extracts the sign of the coefficient (step S27) and adds the extracted sign to the interpolation coefficient and the coefficient which is not interpolated (step S28). When the adding circuit 19 determines in the step S26 that the coefficient corresponding to the interpolation coefficient is 0 (YES in the step S26), the sign extracting circuit 123 reads out a plurality of coefficients adjacent to said coefficient (step S210). The correlation degree computing circuit 122 reads out a plurality of MDCT coefficients from the coefficient storage 121 (step S211).
The correlation degree computing circuit 122 computes a degree of correlation between the plurality of read-out adjacent coefficients and a plurality of MDCT coefficients (step S212). The correlation degree computing circuit 122 refers to the coefficient storage 121, changes the MDCT coefficient as needed and decides a plurality of MDCT coefficients having the highest degree of correlation (step S213). The sign extracting circuit 123 causes the correlation degree computing circuit 122 to refer to the coefficient storage 121 and extracts the sign of an MDCT coefficient at the center of a plurality of decided MDCT coefficients (step S214). The sign extracting circuit 123 outputs the extracted sign to the adding circuit 19 (step S215). The adding circuit 19 then adds a sign corresponding to the MDCT coefficient to the interpolation coefficient (step S216). It should be noted that, though the sign of an interpolation coefficient is obtained in the present embodiment by computing a degree of correlation between adjacent interpolated coefficients and a plurality of MDCT coefficients read out from the coefficient storage, the sign can be obtained by preliminarily classifying MDCT coefficients in the coefficient storage into approximately 8 levels and putting an MDCT coefficient into any one of eight classes having high correlation based on the slope of an envelope of contiguous coefficients. Furthermore, as a more simple method, putting an MDCT coefficient into any one of some classes having high correlation based only on the signs of the adjacent coefficients can partly substitute the above technique.
Since the present Embodiment 8 has such a structure and other structures and functions are the same as those of Embodiments 1 to 7, like codes are used to refer to like parts and detailed explanation thereof will be omitted. It should be noted that, though the present example is explained using an example wherein an MDCT is used as the orthogonal transform method, the present invention is not limited to this and an orthogonal transform having a sign, such as DCT, can be applied.
The process according to Embodiment 8 may be realized as a software process using a personal computer shown in
The portable recording medium 1A (CD-ROM, MO, DVD-ROM or the like), which records therein a computer program for causing a reader/writer, that is not illustrated, in the personal computer 20 shown in
Since the present Embodiment 9 has such a structure and other structures and functions are the same as those of Embodiments 1 to 8, like codes are used to refer to like parts and detailed explanation thereof will be omitted.
As this invention may be embodied in several forms without departing from the spirit of essential characteristics thereof, the present embodiments are therefore illustrative and not restrictive, since the scope of the invention is defined by the appended claims rather than by the description preceding them, and all changes that fall within metes and bounds of the claims, or equivalence of such metes and bounds thereof are therefore intended to be embraced by the claims.
Number | Date | Country | Kind |
---|---|---|---|
2006-169263 | Jun 2006 | JP | national |
2006-169264 | Jun 2006 | JP | national |