Re: [Proposal] Meaningful reporting of SNR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 11 April 2006 09:25 pm, Rusty Scott wrote:
> It seems that a good number of digital receiver chips are
> capable of reporting a meaningful SNR number, but the
> current drivers don't have a standard for providing this
> meaningful data.  The current concept is a bigger value
> is better than a smaller value, but the values have no
> meaning and can't be used to compare performance between
> cards. To this end, I think that the SNR reporting as it
> currently stands generates more confusion that it solves.

I agree with you on the confusion factor.

>  I would like to propose the following:
>
> 1)  That it be encouraged to report SNR in dB whenever
> possible. 

Yes!

> 2)  That the format of the report be an integer  
> value representing the SNR

SNR is not in the "Video for Linux Two API Specification 
Draft 0.13".

> to two significant digits. 
> i.e. 32.15dB would be reported as 3215.

I assume that "integer" means signed integer as the dB value 
reported by some cards can have a negative value for SNR 
when the signal is less than the noise.

Is it really important to compute SNR to 0.01 precision? 
This makes the logarithm lookup table much larger. Floating 
point calculations are not permitted in kernel code so you 
must use some sort of lookup.

> 3)  For cards  that don't provide signal strength directly 
> (read from a register), the strength be calculated from 
> the SNR by mapping 30dB SNR to full scale signal.

I am confused by this part of the proposal. Is the value 
signal strength in dB x 100 or is it a percentage of full 
scale? How do you tell the application that the signal 
strength is in dB or percentage? It can vary by driver 
according to this proposal.

If it is a percentage of full scale is returned, what is the 
range of the returned value for a range of 0% to 100%? 0 to 
100? 0 to 10,000? 0 to 0x7FFF? something else?

>
> I have seen several frontends make attempts at this:
> lgdt330x has some #if 0 code that attepts the SNR
> calculation or51211 and or51132 have some "broken" code
> that attempts this as well.
>
> If it is agreed upon, I would like to do the following:

0) Update the v4l2 API to spell out exactly what value will 
be returned in the struct v4l2_tuner for the signal 
variable.

Add new capability flags:
  V4L2_TUNER_CAP_SS_DB driver returns signal strength in dB.
  V4L2_TUNER_CAP_SS_PCT driver returns signal strength as a 
percent of full scale.

I did not find any reference to SNR in the "Video for Linux 
Two API Specification Draft 0.13". Is this ever returned?

> 1) Move the integer log functions from the or51* modules
> into a module called ilog10
> 2) Fix the functions to work properly
> 3) Change the lgdt330x, or51211, and or51132 modules to
> report SNR in this manner
> 4) Change the above modules to report signal level based
> on the SNR with 30dB SNR = full scale in the report.

Full scale is not a fixed number here. It depends upon the 
maximum value of SNR that the chip can return. This value 
is also a function of the decoding mode (VSB or QAM) for 
the lgdt330x family, The driver author can determine the 
maximum SNR value and then normalize the result to full 
scale.

>
> Comments?
>
> Rusty

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux