]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: convert snr units to dB 307/head
authorberalt <beralt@beralt.nl>
Mon, 25 Nov 2013 10:59:16 +0000 (11:59 +0100)
committerberalt <beralt@beralt.nl>
Mon, 25 Nov 2013 10:59:16 +0000 (11:59 +0100)
src/input/mpegts/linuxdvb/linuxdvb_frontend.c

index f49c988916bc91f9ca50c27575119f9ff61c564c..0e3aef10fd3c0160e9cda30b760780c6d7d17ee2 100644 (file)
@@ -568,10 +568,9 @@ linuxdvb_frontend_monitor ( void *aux )
       }
     }
     if(fe_properties[3].u.st.len > 0) {
-      /* note that decibel scale means 0.0001 dB units */
-      /* TODO: snr is not unsigned, but signed! */
+      /* note that decibel scale means 1 = 0.0001 dB units here */
       if(fe_properties[3].u.st.stat[0].scale == FE_SCALE_DECIBEL)
-        mmi->mmi_stats.snr = fe_properties[3].u.st.stat[0].uvalue;
+        mmi->mmi_stats.snr = fe_properties[3].u.st.stat[0].svalue * 0.0001;
       /* TODO: handle other scales */
     }
     /* Calculate PER from PRE_ERROR and TOTAL_BIT_COUNT */