how to calculate bit depth of signal from its sample?
4 views (last 30 days)
Show older comments
I have used some compression method to my audio signal. in order for me to calculate the compression ratio, I need to get the bit size of the original and compressed signal? i got the bit depth of original signal by applying the command info.BitsPerSample. but I can't know the bit depth of the compressed signal
0 Comments
Answers (1)
Guillaume
on 6 Jan 2017
Hum, usually the compression ratio is the size of the data before compression divided by the size of the data after compression, and has nothing to do with bits per sample of the data. While on most computers, you could reduce the size of the data if you went from for example 16 bits per sample to 8 bits per sample, this is not called compression but just downsampling.
2 Comments
Guillaume
on 6 Jan 2017
Yes, so by that definition:
compression ratio = size before compression in bits / size after compression in bits
The bits per sample of the compressed signal is entirely dependent on the compression algorithm. It's possible it's exactly the same as the original signal.
See Also
Categories
Find more on Multirate Signal Processing 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!