All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* General Question regarding SNR
@ 2010-12-19 23:35 Jean-Michel Bruenn
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Michel Bruenn @ 2010-12-19 23:35 UTC (permalink / raw
  To: linux-media

Hello,

i hope it's okay to ask here. I'm wondering how the SNR is calculated,
and how someone can calculate the "real" snr in db. This caused me a
lot of nerves and i don't seem to be able to calculate the correct snr.
For that some examples. I'm using DVB-T and a Hauppauge WinTV-HVR1200
(Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 02))

dvbsnoop reports 
cycle: 1  d_time: 0.001 s  Sig: 63993  SNR: 185  BER: 9999839
UBLK: 11  Stat: 0x00 []
cycle: 2  d_time: 0.003 s  Sig: 64507 SNR: 185  BER: 9999839  UBLK: 18
Stat: 0x00 []
cycle: 3 d_time: 0.003 s  Sig: 63993  SNR: 168 BER: 9999839  UBLK: 28
Stat: 0x00 []

WITHOUT a antenna connected, WITHOUT a sender tuned. I guess it's quite
unlikely that i have 185 db snr, without anything connected nor tuned.
Alright. With a 42 db amplified antenna connected, i get SNRs between
143 and 178 (calculated with bash and tzap.. e.g.: 

((snr_in_db=16#$snr_from_tzap))
->
	((var=16#0092))
	echo $var
	146 (should be db)

Doing so, reports also db values of 215 which should be quite unlikely
even when using cable (correct me if i'm wrong). So let's assume that
the value which is reported needs to be subtracted from the above
value. Then we would have:

	215 - 185 = 30 db (sounds resonable)
	146 - 185 = -39 db (errm... ok.. so this can't be)

AAaaaanother try, some guy reported to calculate the snr (reported snr
= 0f1f1 (though seems to be for dvb-s, and i'm dealing with dvb-t) like
this:
	0xf1 / 8 = 30.125 db (sounds reasonable)

But why did he removed the last two parts? (0xf1 = 0f1f1 ???) ok.. so
let's try agaaaaain:

	0092 .. =>  146. 146 / 8 = 18. So 18 db, sounds reasonable,
though remember dvbsnoop reports 185 snr without anything connected,
if i take this as "noise" and want to remove it to get the real value
i'd have: 185 = 23 and 18 db - 23 db = -5 db.

So.. errm. WTF?

Who can enlighten me?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: General Question regarding SNR
@ 2010-12-20 17:54 Jean-Michel Bruenn
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Michel Bruenn @ 2010-12-20 17:54 UTC (permalink / raw
  To: linux-media

Hello,

"crope" on #linuxtv irc helped me to understand the stuff in my
previous mail. So for other people who might want to understand that
also:

dvbsnoop reports snr without lock/antenna:

	If there is no Lock, unc, ber and snr _aren't_ valid. So check
	first whether you have a lock, if yes okay, if no ignore those
	values.

215 db SNR makes no sense:

	<crope> wdp: but most newer drivers report SNR as dB x 10

	0144 -> 324 -> 32,4 dB

... :-)
Jean

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-20 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-19 23:35 General Question regarding SNR Jean-Michel Bruenn
  -- strict thread matches above, loose matches on Subject: below --
2010-12-20 17:54 Jean-Michel Bruenn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.