version 1.6.0
See http://forums.radioreference.com/digital-voice-decoding-software/256111- dsd-1-6-closed-fork-open-source.html#post1884783
This commit is contained in:
parent
46b9b01baf
commit
fa73feded2
18
CHANGELOG
18
CHANGELOG
|
|
@ -1,7 +1,21 @@
|
|||
1.6.0
|
||||
New features:
|
||||
Auto mutes P25 encrypted signals by default.
|
||||
Raised cosine filters.
|
||||
|
||||
Fixed bugs:
|
||||
Changed the crazy dibit buffer which filled for ever until it
|
||||
ran out of allocated memory then caused a segmentation error. The
|
||||
buffer is now allowed to fill to 90% before being returned to the
|
||||
initial pointer value where it over writes the old samples, it
|
||||
seems to work ok and no segmentation errors now.
|
||||
Input level is now calculated differently, before when it reported 50%
|
||||
the soundcard would be fully overloaded. With the new method aim for 30% inlvl.
|
||||
|
||||
1.4.1
|
||||
New features:
|
||||
Several new sync types for existing formats now recognized:
|
||||
Decodes voice from NXDN 4800 (6.25kHz) signals
|
||||
Several new sync types for existing formats now recognized:
|
||||
Decodes voice from NXDN 4800 (6.25kHz) signals
|
||||
Decodes voice from NXDN 9600 (12.5kHz) repeater output
|
||||
Decodes voice from DMR/MotoTRBO simplex/repeater input
|
||||
Decodes voice from X2-TDMA simplex/repeater input
|
||||
|
|
|
|||
4
README
4
README
|
|
@ -1,4 +1,4 @@
|
|||
Digital Speech Decoder 1.4
|
||||
Digital Speech Decoder 1.6.0
|
||||
Copyright (C) 2010 DSD Author
|
||||
GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
synthesis requires mbelib, which is a separate package. DSD 1.4.1
|
||||
requires mbelib 1.1 or later.
|
||||
|
||||
Supported formats in version 1.4.1:
|
||||
Supported formats in version 1.6.0:
|
||||
|
||||
P25 Phase 1 Widely deployed radio standard used in public safety
|
||||
and amateur radio.
|
||||
|
|
|
|||
1
dsd.h
1
dsd.h
|
|
@ -159,6 +159,7 @@ typedef struct
|
|||
mbe_parms *cur_mp;
|
||||
mbe_parms *prev_mp;
|
||||
mbe_parms *prev_mp_enhanced;
|
||||
int p25kid;
|
||||
} dsd_state;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -177,6 +177,11 @@ getDibit (dsd_opts * opts, dsd_state * state)
|
|||
state->sidx++;
|
||||
}
|
||||
|
||||
if (state->dibit_buf_p > state->dibit_buf + 900000)
|
||||
{
|
||||
state->dibit_buf_p = state->dibit_buf + 200;
|
||||
}
|
||||
|
||||
// determine dibit state
|
||||
if ((state->synctype == 6) || (state->synctype == 14))
|
||||
{
|
||||
|
|
|
|||
12
dsd_frame.c
12
dsd_frame.c
|
|
@ -23,7 +23,7 @@ printFrameInfo (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
int level;
|
||||
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
|
|
@ -73,7 +73,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +118,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
}
|
||||
}
|
||||
|
|
@ -194,7 +194,7 @@ processFrame (dsd_opts * opts, dsd_state * state)
|
|||
{
|
||||
if (opts->verbose > 0)
|
||||
{
|
||||
level = (int) (((float) state->max / (float) 32768) * (float) 100);
|
||||
level = (int) state->max / 164;
|
||||
printf ("inlvl: %2i%% ", level);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,11 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
|
|||
lastt++;
|
||||
}
|
||||
|
||||
if (state->dibit_buf_p > state->dibit_buf + 900000)
|
||||
{
|
||||
state->dibit_buf_p = state->dibit_buf + 200;
|
||||
}
|
||||
|
||||
//determine dibit state
|
||||
if (symbol > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -216,6 +216,7 @@ initState (dsd_state * state)
|
|||
state->prev_mp = malloc (sizeof (mbe_parms));
|
||||
state->prev_mp_enhanced = malloc (sizeof (mbe_parms));
|
||||
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
|
||||
state->p25kid = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -334,7 +335,7 @@ main (int argc, char **argv)
|
|||
char versionstr[25];
|
||||
mbe_printVersion (versionstr);
|
||||
|
||||
printf ("Digital Speech Decoder 1.4.1\n");
|
||||
printf ("Digital Speech Decoder 1.6.0\n");
|
||||
printf ("mbelib version %s\n", versionstr);
|
||||
|
||||
initOpts (&opts);
|
||||
|
|
|
|||
38
dsd_symbol.c
38
dsd_symbol.c
|
|
@ -80,6 +80,44 @@ getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
|
|||
}
|
||||
|
||||
result = read (opts->audio_in_fd, &sample, 2);
|
||||
{
|
||||
#define NZEROS 60
|
||||
#define GAIN 7.423339364e+00
|
||||
|
||||
static float xv[NZEROS+1];
|
||||
|
||||
static float xcoeffs[] =
|
||||
{ -0.0083649323, -0.0265444850, -0.0428141462, -0.0537571943,
|
||||
-0.0564141052, -0.0489161045, -0.0310068662, -0.0043393881,
|
||||
+0.0275375106, +0.0595423283, +0.0857543325, +0.1003565948,
|
||||
+0.0986944931, +0.0782804830, +0.0395670487, -0.0136691535,
|
||||
-0.0744390415, -0.1331834575, -0.1788967208, -0.2005995448,
|
||||
-0.1889627181, -0.1378439993, -0.0454976231, +0.0847488694,
|
||||
+0.2444859269, +0.4209222342, +0.5982295474, +0.7593684540,
|
||||
+0.8881539892, +0.9712773915, +0.9999999166, +0.9712773915,
|
||||
+0.8881539892, +0.7593684540, +0.5982295474, +0.4209222342,
|
||||
+0.2444859269, +0.0847488694, -0.0454976231, -0.1378439993,
|
||||
-0.1889627181, -0.2005995448, -0.1788967208, -0.1331834575,
|
||||
-0.0744390415, -0.0136691535, +0.0395670487, +0.0782804830,
|
||||
+0.0986944931, +0.1003565948, +0.0857543325, +0.0595423283,
|
||||
+0.0275375106, -0.0043393881, -0.0310068662, -0.0489161045,
|
||||
-0.0564141052, -0.0537571943, -0.0428141462, -0.0265444850,
|
||||
-0.0083649323,
|
||||
};
|
||||
|
||||
float sum; int i;
|
||||
|
||||
for (i = 0; i < NZEROS; i++)
|
||||
xv[i] = xv[i+1];
|
||||
|
||||
xv[NZEROS] = sample; // unfiltered sample in
|
||||
sum = 0.0;
|
||||
|
||||
for (i = 0; i <= NZEROS; i++)
|
||||
sum += (xcoeffs[i] * xv[i]);
|
||||
|
||||
sample = sum / GAIN; // filtered sample out
|
||||
}
|
||||
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0))
|
||||
{
|
||||
sample = state->max;
|
||||
|
|
|
|||
|
|
@ -258,6 +258,8 @@ processHDU (dsd_opts * opts, dsd_state * state)
|
|||
|
||||
skipDibit (opts, state, 160);
|
||||
|
||||
state->p25kid = strtol(kid, NULL, 2);
|
||||
|
||||
if (opts->p25enc == 1)
|
||||
{
|
||||
algidhex = strtol (algid, NULL, 2);
|
||||
|
|
|
|||
|
|
@ -77,7 +77,10 @@ processLDU1 (dsd_opts * opts, dsd_state * state)
|
|||
y++;
|
||||
z++;
|
||||
}
|
||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||
if (state->p25kid == 0)
|
||||
{
|
||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||
}
|
||||
|
||||
// skip over non imbe data sometimes between frames
|
||||
if ((i < 4) || (i == 8))
|
||||
|
|
|
|||
|
|
@ -80,7 +80,10 @@ processLDU2 (dsd_opts * opts, dsd_state * state)
|
|||
y++;
|
||||
z++;
|
||||
}
|
||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||
if (state->p25kid == 0)
|
||||
{
|
||||
processMbeFrame (opts, state, imbe_fr, NULL, NULL);
|
||||
}
|
||||
|
||||
// skip over non imbe data sometimes between frames
|
||||
if ((i < 5) || (i == 8))
|
||||
|
|
|
|||
Loading…
Reference in New Issue