diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-22 05:37:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-22 08:46:45 -0400 |
commit | 48f72a1a4caaaac6cc22b6c4b6471286955a590d (patch) | |
tree | bd2fcff2352cc51a87292dfde0f3ed5a9028cd9e | |
parent | f35d09db0e61009679e41cc5afa2d205b99c3816 (diff) |
[media] drxk: fix CNR calculus
Changeset 8f3741e accidentally broke the CNR estimation. It should
be calculated as "a + b - c". However, previously, the subtraction
by c only occurred if SNR would be positive, due to a bad binding
to DVBv3 API.
This also fixes the following warning:
drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb-frontends/drxk_hard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index fc93bd396cf4..55a4c22ac2d4 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c | |||
@@ -2628,7 +2628,7 @@ static int GetDVBTSignalToNoise(struct drxk_state *state, | |||
2628 | /* log(x) x = (16bits + 16bits) << 15 ->32 bits */ | 2628 | /* log(x) x = (16bits + 16bits) << 15 ->32 bits */ |
2629 | c = Log10Times100(SqrErrIQ); | 2629 | c = Log10Times100(SqrErrIQ); |
2630 | 2630 | ||
2631 | iMER = a + b; | 2631 | iMER = a + b - c; |
2632 | } | 2632 | } |
2633 | *pSignalToNoise = iMER; | 2633 | *pSignalToNoise = iMER; |
2634 | 2634 | ||