How is the quality of audio file when PSNR is more than 48?
8 views (last 30 days)
Show older comments
I decoded an mp3 file and save as wav file. Then I compared the two audio files (mp3 & wav) by using PSNR matlab (coding shown below). The results obtained are shown in the table.
Signal1 = audio.mp3;
Signal2= audio.wav;
[R C]=size(Signal1);
err = sum((Signal1 -Signal2).^2)/(R*C);
MSE=sqrt(err);
MAXVAL=255;
PSNR = 20*log10(MAXVAL/MSE);
How can I comment on the result?
According to the post here, it says ‘If the reconstructed audio signal is exactly same as original signal then MSE =0. And if Max pixel value is 255 (8-bit representation), then the value of PSNR = 20*log(255) = 48dB.’
Since the PSNR of the songs are more than 48, can I conclude that the decoded song (wav) has the same quality as the mp3 file?
0 Comments
Accepted Answer
Raunak Gupta
on 1 May 2020
Hi,
In the code you have mentioned that
PSNR = 20*log10(MAXVAL/MSE);
This means
PSNR = 20*log10(MAXVAL) - 20*log10(MSE);
Since for value of 1>MSE>0 the second term would become negative and hence add to the PSNR Value making it greater than 48dB. So, in conclusion the PSNR can go up to infinity for very low value of MSE. But for measurement of quality of decoding, higher the PSNR better it is.
For your case the PSNR values are on higher level so you may conclude the quality of decoding is good.
0 Comments
More Answers (0)
See Also
Categories
Find more on Audio Processing Algorithm Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!