Azzera filtri
Azzera filtri

how to calculate bit depth of signal from its sample?

3 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Guillaume
Guillaume il 6 Gen 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 Commenti
saf asalah
saf asalah il 6 Gen 2017
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 il 6 Gen 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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by