how to calculate bit depth of signal from its sample?

3 次查看(过去 30 天)
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

回答(1 个)

Guillaume
Guillaume 2017-1-6
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 个评论
saf asalah
saf asalah 2017-1-6
thanks guillaume for your reply i'm beginner in this field but what did you mean with size of data is it size(signal) command which means the number of sample? I asked one lecturer about compression ratio and he answered is the bit size before compression divided by the bit size after compression. and he said 'bit size= bits per sample * number of samples'
Guillaume
Guillaume 2017-1-6
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by