[vlc-commits] dvb: iterate modulations 256..16 instead 16..256
Ilkka Ollakka
git at videolan.org
Thu Mar 17 14:24:29 CET 2011
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Mar 17 14:10:09 2011 +0200| [feec3fca4a080d53166905d2372a95cd46fce096] | committer: Ilkka Ollakka
dvb: iterate modulations 256..16 instead 16..256
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=feec3fca4a080d53166905d2372a95cd46fce096
---
modules/access/dvb/scan.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index 230e113..515cce1 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -410,7 +410,7 @@ static int ScanDvbCNextFast( scan_t *p_scan, scan_configuration_t *p_cfg, double
p_cfg->i_frequency = 10000 * ( frequencies[ p_scan->i_index ] );
*pf_pos = (double)(p_scan->i_index * 1000 +
p_scan->parameter.i_symbolrate * 100 +
- (p_scan->parameter.i_modulation >> 4) )
+ (256 - (p_scan->parameter.i_modulation >> 4)) )
/ (num_frequencies * 1000 + 900 + 16);
return VLC_SUCCESS;
}
@@ -518,11 +518,11 @@ static int ScanDvbCNext( scan_t *p_scan, scan_configuration_t *p_cfg, double *pf
bool b_rotate=true;
if( !p_scan->parameter.b_modulation_set )
{
- p_scan->parameter.i_modulation = (p_scan->parameter.i_modulation << 1 ) % 512;
+ p_scan->parameter.i_modulation = (p_scan->parameter.i_modulation >> 1 );
/* if we iterated all modulations, move on */
- if( !p_scan->parameter.i_modulation )
+ if( p_scan->parameter.i_modulation < 16)
{
- p_scan->parameter.i_modulation = 16;
+ p_scan->parameter.i_modulation = 256;
} else {
b_rotate=false;
}
More information about the vlc-commits
mailing list