From 186344816a4ca54379820ad5d7dcc2bb42122ee1 Mon Sep 17 00:00:00 2001 From: beralt Date: Mon, 25 Nov 2013 11:59:16 +0100 Subject: [PATCH] linuxdvb: convert snr units to dB --- src/input/mpegts/linuxdvb/linuxdvb_frontend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c index f49c9889..0e3aef10 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c @@ -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 */