mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-12 16:57:23 -05:00
new options to control filters and P25 encrypted signals
I have added the -l and -pu options.
This commit is contained in:
4
README
4
README
@@ -1,4 +1,4 @@
|
|||||||
Digital Speech Decoder 1.6.0
|
Digital Speech Decoder 1.6.0 with P25 & DMR Filter
|
||||||
Copyright (C) 2010 DSD Author
|
Copyright (C) 2010 DSD Author
|
||||||
GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
|
GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
|
||||||
|
|
||||||
@@ -455,10 +455,12 @@ Decoder options
|
|||||||
-fp Decode only ProVoice*
|
-fp Decode only ProVoice*
|
||||||
-fr Decode only DMR/MOTOTRBO
|
-fr Decode only DMR/MOTOTRBO
|
||||||
-fx Decode only X2-TDMA
|
-fx Decode only X2-TDMA
|
||||||
|
-l Disable Filters (not recommended)
|
||||||
-ma Auto-select modulation optimizations (default)
|
-ma Auto-select modulation optimizations (default)
|
||||||
-mc Use only C4FM modulation optimizations
|
-mc Use only C4FM modulation optimizations
|
||||||
-mg Use only GFSK modulation optimizations
|
-mg Use only GFSK modulation optimizations
|
||||||
-mq Use only QPSK modulation optimizations
|
-mq Use only QPSK modulation optimizations
|
||||||
|
-pu Unmute Encrypted P25
|
||||||
-u <num> Unvoiced speech quality (default=3)
|
-u <num> Unvoiced speech quality (default=3)
|
||||||
-xx Expect non-inverted X2-TDMA signal
|
-xx Expect non-inverted X2-TDMA signal
|
||||||
-xr Expect inverted DMR/MOTOTRBO signal
|
-xr Expect inverted DMR/MOTOTRBO signal
|
||||||
|
|||||||
2
dsd.h
2
dsd.h
@@ -93,6 +93,8 @@ typedef struct
|
|||||||
int msize;
|
int msize;
|
||||||
int playfiles;
|
int playfiles;
|
||||||
int delay;
|
int delay;
|
||||||
|
int disable_filters;
|
||||||
|
int unmute_encrypted_p25;
|
||||||
} dsd_opts;
|
} dsd_opts;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|||||||
16
dsd_main.c
16
dsd_main.c
@@ -128,6 +128,8 @@ initOpts (dsd_opts * opts)
|
|||||||
opts->msize = 15;
|
opts->msize = 15;
|
||||||
opts->playfiles = 0;
|
opts->playfiles = 0;
|
||||||
opts->delay = 0;
|
opts->delay = 0;
|
||||||
|
opts->disable_filters = 0;
|
||||||
|
opts->unmute_encrypted_p25 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -262,10 +264,12 @@ usage ()
|
|||||||
printf (" -fp Decode only ProVoice*\n");
|
printf (" -fp Decode only ProVoice*\n");
|
||||||
printf (" -fr Decode only DMR/MOTOTRBO\n");
|
printf (" -fr Decode only DMR/MOTOTRBO\n");
|
||||||
printf (" -fx Decode only X2-TDMA\n");
|
printf (" -fx Decode only X2-TDMA\n");
|
||||||
|
printf (" -l Disable Filters (not recommended)\n");
|
||||||
printf (" -ma Auto-select modulation optimizations (default)\n");
|
printf (" -ma Auto-select modulation optimizations (default)\n");
|
||||||
printf (" -mc Use only C4FM modulation optimizations\n");
|
printf (" -mc Use only C4FM modulation optimizations\n");
|
||||||
printf (" -mg Use only GFSK modulation optimizations\n");
|
printf (" -mg Use only GFSK modulation optimizations\n");
|
||||||
printf (" -mq Use only QPSK modulation optimizations\n");
|
printf (" -mq Use only QPSK modulation optimizations\n");
|
||||||
|
printf (" -pu Unmute Encrypted P25\n");
|
||||||
printf (" -u <num> Unvoiced speech quality (default=3)\n");
|
printf (" -u <num> Unvoiced speech quality (default=3)\n");
|
||||||
printf (" -xx Expect non-inverted X2-TDMA signal\n");
|
printf (" -xx Expect non-inverted X2-TDMA signal\n");
|
||||||
printf (" -xr Expect inverted DMR/MOTOTRBO signal\n");
|
printf (" -xr Expect inverted DMR/MOTOTRBO signal\n");
|
||||||
@@ -335,7 +339,7 @@ main (int argc, char **argv)
|
|||||||
char versionstr[25];
|
char versionstr[25];
|
||||||
mbe_printVersion (versionstr);
|
mbe_printVersion (versionstr);
|
||||||
|
|
||||||
printf ("Digital Speech Decoder 1.6.0\n");
|
printf ("Digital Speech Decoder 1.6.0 with P25 & DMR Filter\n");
|
||||||
printf ("mbelib version %s\n", versionstr);
|
printf ("mbelib version %s\n", versionstr);
|
||||||
|
|
||||||
initOpts (&opts);
|
initOpts (&opts);
|
||||||
@@ -344,7 +348,7 @@ main (int argc, char **argv)
|
|||||||
exitflag = 0;
|
exitflag = 0;
|
||||||
signal (SIGINT, sigfun);
|
signal (SIGINT, sigfun);
|
||||||
|
|
||||||
while ((c = getopt (argc, argv, "hep:qstv:z:i:o:d:g:nw:B:C:R:f:m:u:x:A:S:M:r")) != -1)
|
while ((c = getopt (argc, argv, "hep:qstv:z:i:o:d:g:nw:B:C:R:f:m:u:x:A:S:M:r:l")) != -1)
|
||||||
{
|
{
|
||||||
opterr = 0;
|
opterr = 0;
|
||||||
switch (c)
|
switch (c)
|
||||||
@@ -373,6 +377,10 @@ main (int argc, char **argv)
|
|||||||
{
|
{
|
||||||
opts.p25tg = 1;
|
opts.p25tg = 1;
|
||||||
}
|
}
|
||||||
|
else if (optarg[0] == 'u')
|
||||||
|
{
|
||||||
|
opts.unmute_encrypted_p25 = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
opts.errorbars = 0;
|
opts.errorbars = 0;
|
||||||
@@ -649,6 +657,10 @@ main (int argc, char **argv)
|
|||||||
opts.datascope = 0;
|
opts.datascope = 0;
|
||||||
state.optind = optind;
|
state.optind = optind;
|
||||||
break;
|
break;
|
||||||
|
case 'l':
|
||||||
|
opts.disable_filters = 1;
|
||||||
|
printf ("DMR & P25 Filter Disabled\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage ();
|
usage ();
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = read (opts->audio_in_fd, &sample, 2);
|
result = read (opts->audio_in_fd, &sample, 2);
|
||||||
{
|
|
||||||
|
if (opts->disable_filters == 0)
|
||||||
|
{
|
||||||
#define NZEROS 60
|
#define NZEROS 60
|
||||||
#define GAIN 7.423339364e+00
|
#define GAIN 7.423339364e+00
|
||||||
|
|
||||||
@@ -117,7 +119,8 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||||||
sum += (xcoeffs[i] * xv[i]);
|
sum += (xcoeffs[i] * xv[i]);
|
||||||
|
|
||||||
sample = sum / GAIN; // filtered sample out
|
sample = sum / GAIN; // filtered sample out
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0))
|
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0))
|
||||||
{
|
{
|
||||||
sample = state->max;
|
sample = state->max;
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
|||||||
y++;
|
y++;
|
||||||
z++;
|
z++;
|
||||||
}
|
}
|
||||||
if (state->p25kid == 0)
|
if (state->p25kid == 0 || opts->unmute_encrypted_p25 == 1)
|
||||||
{
|
{
|
||||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
|||||||
y++;
|
y++;
|
||||||
z++;
|
z++;
|
||||||
}
|
}
|
||||||
if (state->p25kid == 0)
|
if (state->p25kid == 0 || opts->unmute_encrypted_p25 == 1)
|
||||||
{
|
{
|
||||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user