DSD demod: this is the end of it. f..k off!

pull/6/head
f4exb 2016-04-08 18:14:50 +02:00
rodzic 93b0b91f79
commit 405fa042f9
37 zmienionych plików z 1546 dodań i 838 usunięć

Wyświetl plik

@ -1,10 +1,12 @@
project(dsd) project(dsd)
set(dsd_SOURCES set(dsd_SOURCES
dmr_const.c
dmr_data.c dmr_data.c
dmr_voice.c dmr_voice.c
dsd_audio.c dsd_audio.c
dsd_cleanupexit.c dsd_cleanupexit.c
dsd_comp.c
dsd_dibit.c dsd_dibit.c
# dsd_file.c # dsd_file.c
dsd_filters.c dsd_filters.c
@ -16,17 +18,23 @@ set(dsd_SOURCES
dsd_opts.c dsd_opts.c
dsd_symbol.c dsd_symbol.c
dsd_upsample.c dsd_upsample.c
dstar_const.c
dstar_header.c dstar_header.c
dstar.c dstar.c
nxdn_const.c
nxdn_data.c nxdn_data.c
nxdn_voice.c nxdn_voice.c
nxdn96.c nxdn96.c
nxdn96_const.c
p25_lcw.c p25_lcw.c
p25p1_const.c
p25p1_hdu.c p25p1_hdu.c
p25p1_ldu1.c p25p1_ldu1.c
p25p1_ldu2.c p25p1_ldu2.c
p25p1_tdulc.c p25p1_tdulc.c
provoice.c provoice.c
provoice_const.c
x2tdma_const.c
x2tdma_data.c x2tdma_data.c
x2tdma_voice.c x2tdma_voice.c
) )
@ -36,6 +44,7 @@ set(dsd_HEADERS
descramble.h descramble.h
dmr_const.h dmr_const.h
dsd_cleanupexit.h dsd_cleanupexit.h
dsd_comp.h
dsd_livescanner.h dsd_livescanner.h
dsd_nocarrier.h dsd_nocarrier.h
dsd_opts.h dsd_opts.h
@ -68,4 +77,6 @@ add_library(dsd SHARED
target_link_libraries(dsd ${LIBS}) target_link_libraries(dsd ${LIBS})
install(TARGETS dsd DESTINATION lib) install(TARGETS dsd DESTINATION lib)

57
dsd/dmr_const.c 100644
Wyświetl plik

@ -0,0 +1,57 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include "dmr_const.h"
/*
* DMR AMBE interleave schedule
*/
const int rW[36] = {
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int rX[36] = {
23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int rY[36] = {
0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int rZ[36] = {
5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};

Wyświetl plik

@ -15,50 +15,50 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int rW[36]; extern const int rW[36];
extern const int rX[36]; extern const int rX[36];
extern const int rY[36]; extern const int rY[36];
extern const int rZ[36]; extern const int rZ[36];
#else //#else
/* ///*
* DMR AMBE interleave schedule // * DMR AMBE interleave schedule
*/ // */
const int rW[36] = { //const int rW[36] = {
0, 1, 0, 1, 0, 1, // 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, // 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, // 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2, // 0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2, // 0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2 // 0, 2, 0, 2, 0, 2
}; //};
//
//const int rX[36] = {
// 23, 10, 22, 9, 21, 8,
// 20, 7, 19, 6, 18, 5,
// 17, 4, 16, 3, 15, 2,
// 14, 1, 13, 0, 12, 10,
// 11, 9, 10, 8, 9, 7,
// 8, 6, 7, 5, 6, 4
//};
//
//const int rY[36] = {
// 0, 2, 0, 2, 0, 2,
// 0, 2, 0, 3, 0, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3
//};
//
//const int rZ[36] = {
// 5, 3, 4, 2, 3, 1,
// 2, 0, 1, 13, 0, 12,
// 22, 11, 21, 10, 20, 9,
// 19, 8, 18, 7, 17, 6,
// 16, 5, 15, 4, 14, 3,
// 13, 2, 12, 1, 11, 0
//};
const int rX[36] = { //#endif
23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int rY[36] = {
0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int rZ[36] = {
5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};
#endif

Wyświetl plik

@ -22,7 +22,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <signal.h> #include <signal.h>
#include <string.h> #include <string.h>
#define __USE_XOPEN
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
@ -38,8 +37,12 @@
#endif #endif
#include <math.h> #include <math.h>
#include <mbelib.h> #include <mbelib.h>
#ifdef USE_LIBSNDFILE
#include <sndfile.h> #include <sndfile.h>
#endif
#include "dsd_opts.h"
#include "dsd_state.h"
#include "p25p1_heuristics.h" #include "p25p1_heuristics.h"
@ -61,11 +64,7 @@
/* /*
* global variables * global variables
*/ */
int exitflag; //int exitflag; // You just can't have a global here within SDRangel -> moved to state
#include "dsd_opts.h"
#include "dsd_state.h"
#include "dsd_livescanner.h"
/* /*
* Frame sync patterns * Frame sync patterns
@ -105,6 +104,11 @@ int exitflag;
/* /*
* function prototypes * function prototypes
*/ */
#ifdef __cplusplus
extern "C" {
#endif
void processDMRdata (dsd_opts * opts, dsd_state * state); void processDMRdata (dsd_opts * opts, dsd_state * state);
void processDMRvoice (dsd_opts * opts, dsd_state * state); void processDMRvoice (dsd_opts * opts, dsd_state * state);
void processAudio (dsd_opts * opts, dsd_state * state); void processAudio (dsd_opts * opts, dsd_state * state);
@ -130,10 +134,6 @@ void printFrameInfo (dsd_opts * opts, dsd_state * state);
void processFrame (dsd_opts * opts, dsd_state * state); void processFrame (dsd_opts * opts, dsd_state * state);
void printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation); void printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation);
int getFrameSync (dsd_opts * opts, dsd_state * state); int getFrameSync (dsd_opts * opts, dsd_state * state);
int comp (const void *a, const void *b);
void usage ();
void sigfun (int sig);
int main (int argc, char **argv);
void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv); void playMbeFiles (dsd_opts * opts, dsd_state * state, int argc, char **argv);
void processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char ambe_fr[4][24], char imbe7100_fr[7][24]); void processMbeFrame (dsd_opts * opts, dsd_state * state, char imbe_fr[8][23], char ambe_fr[4][24], char imbe7100_fr[7][24]);
void openSerial (dsd_opts * opts, dsd_state * state); void openSerial (dsd_opts * opts, dsd_state * state);
@ -156,4 +156,8 @@ void processDSTAR_HD (dsd_opts * opts, dsd_state * state);
short dmr_filter(short sample); short dmr_filter(short sample);
short nxdn_filter(short sample); short nxdn_filter(short sample);
#ifdef __cplusplus
}
#endif
#endif // DSD_H #endif // DSD_H

Wyświetl plik

@ -30,7 +30,7 @@ cleanupAndExit (dsd_opts * opts, dsd_state * state)
} }
#endif #endif
printf ("Exiting.\n"); printf ("Exiting.\n");
exit (0); //exit (0); // You just can't do that within SDRangel
} }

19
dsd/dsd_comp.c 100644
Wyświetl plik

@ -0,0 +1,19 @@
/*
* dsd_comp.c
*
* Created on: Apr 8, 2016
* Author: f4exb
*/
#include "dsd_comp.h"
int comp(const void *a, const void *b)
{
if (*((const int *) a) == *((const int *) b))
return 0;
else if (*((const int *) a) < *((const int *) b))
return -1;
else
return 1;
}

13
dsd/dsd_comp.h 100644
Wyświetl plik

@ -0,0 +1,13 @@
/*
* dsd_comp.h
*
* Created on: Apr 8, 2016
* Author: f4exb
*/
#ifndef DSD_DSD_COMP_H_
#define DSD_DSD_COMP_H_
int comp(const void *a, const void *b);
#endif /* DSD_DSD_COMP_H_ */

Wyświetl plik

@ -16,6 +16,7 @@
*/ */
#include "dsd.h" #include "dsd.h"
#include "dsd_comp.h"
int int
getDibit (dsd_opts * opts, dsd_state * state) getDibit (dsd_opts * opts, dsd_state * state)

Wyświetl plik

@ -18,6 +18,7 @@
#include "dsd.h" #include "dsd.h"
#include "dsd_cleanupexit.h" #include "dsd_cleanupexit.h"
#include "dsd_nocarrier.h" #include "dsd_nocarrier.h"
#include "dsd_comp.h"
void void
printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation) printFrameSync (dsd_opts * opts, dsd_state * state, char *frametype, int offset, char *modulation)
@ -794,7 +795,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state)
} }
} }
if (exitflag == 1) if (state->exitflag == 1) // was moved to state for inclusion in SDRangel. Should not be used anyway (always 0)
{ {
cleanupAndExit (opts, state); cleanupAndExit (opts, state);
} }

Wyświetl plik

@ -21,51 +21,33 @@
void liveScanner(dsd_opts * opts, dsd_state * state) void liveScanner(dsd_opts * opts, dsd_state * state)
{ {
#ifdef USE_PORTAUDIO if (opts->audio_in_fd == -1)
if(opts->audio_in_type == 2)
{ {
PaError err = Pa_StartStream( opts->audio_in_pa_stream ); if (pthread_mutex_lock(&state->input_mutex))
if( err != paNoError )
{ {
fprintf( stderr, "An error occured while starting the portaudio input stream\n" ); printf("liveScanner -> Unable to lock mutex\n");
fprintf( stderr, "Error number: %d\n", err );
fprintf( stderr, "Error message: %s\n", Pa_GetErrorText( err ) );
return;
} }
} }
#endif
while (1) while (state->dsd_running)
{ {
noCarrier(opts, state); noCarrier(opts, state);
state->synctype = getFrameSync(opts, state); state->synctype = getFrameSync(opts, state);
// recalibrate center/umid/lmid // recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2; state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center; state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center; state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
while (state->synctype != -1)
while ((state->synctype != -1) && (state->dsd_running))
{ {
processFrame(opts, state); processFrame(opts, state);
#ifdef TRACE_DSD
state->debug_prefix = 'S';
#endif
state->synctype = getFrameSync(opts, state); state->synctype = getFrameSync(opts, state);
#ifdef TRACE_DSD
state->debug_prefix = '\0';
#endif
// recalibrate center/umid/lmid // recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2; state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
+ state->center; state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8)
+ state->center;
} }
} }
} }

Wyświetl plik

@ -25,202 +25,12 @@
#include "dmr_const.h" #include "dmr_const.h"
#include "provoice_const.h" #include "provoice_const.h"
#include "git_ver.h" #include "git_ver.h"
#include "dsd_nocarrier.h"
#include "dsd_comp.h"
int static void usage ();
comp (const void *a, const void *b) static void sigfun (int sig);
{ static int main (int argc, char **argv);
if (*((const int *) a) == *((const int *) b))
return 0;
else if (*((const int *) a) < *((const int *) b))
return -1;
else
return 1;
}
void
noCarrier (dsd_opts * opts, dsd_state * state)
{
state->dibit_buf_p = state->dibit_buf + 200;
memset (state->dibit_buf, 0, sizeof (int) * 200);
if (opts->mbe_out_f != NULL)
{
closeMbeOutFile (opts, state);
}
state->jitter = -1;
state->lastsynctype = -1;
state->carrier = 0;
state->max = 15000;
state->min = -15000;
state->center = 0;
state->err_str[0] = 0;
sprintf (state->fsubtype, " ");
sprintf (state->ftype, " ");
state->errs = 0;
state->errs2 = 0;
state->lasttg = 0;
state->lastsrc = 0;
state->lastp25type = 0;
state->repeat = 0;
state->nac = 0;
state->numtdulc = 0;
sprintf (state->slot0light, " slot0 ");
sprintf (state->slot1light, " slot1 ");
state->firstframe = 0;
if (opts->audio_gain == (float) 0)
{
state->aout_gain = 25;
}
memset (state->aout_max_buf, 0, sizeof (float) * 200);
state->aout_max_buf_p = state->aout_max_buf;
state->aout_max_buf_idx = 0;
sprintf (state->algid, "________");
sprintf (state->keyid, "________________");
mbe_initMbeParms (state->cur_mp, state->prev_mp, state->prev_mp_enhanced);
}
void
initOpts (dsd_opts * opts)
{
opts->onesymbol = 10;
opts->mbe_in_file[0] = 0;
opts->mbe_in_f = NULL;
opts->errorbars = 1;
opts->datascope = 0;
opts->symboltiming = 0;
opts->verbose = 2;
opts->p25enc = 0;
opts->p25lc = 0;
opts->p25status = 0;
opts->p25tg = 0;
opts->scoperate = 15;
sprintf (opts->audio_in_dev, "/dev/audio");
opts->audio_in_fd = -1;
sprintf (opts->audio_out_dev, "/dev/audio");
opts->audio_out_fd = -1;
opts->split = 0;
opts->playoffset = 0;
opts->mbe_out_dir[0] = 0;
opts->mbe_out_file[0] = 0;
opts->mbe_out_f = NULL;
opts->audio_gain = 0;
opts->audio_out = 1;
opts->wav_out_file[0] = 0;
opts->wav_out_f = NULL;
//opts->wav_out_fd = -1;
opts->serial_baud = 115200;
sprintf (opts->serial_dev, "/dev/ttyUSB0");
opts->resume = 0;
opts->frame_dstar = 0;
opts->frame_x2tdma = 1;
opts->frame_p25p1 = 1;
opts->frame_nxdn48 = 0;
opts->frame_nxdn96 = 1;
opts->frame_dmr = 1;
opts->frame_provoice = 0;
opts->mod_c4fm = 1;
opts->mod_qpsk = 1;
opts->mod_gfsk = 1;
opts->uvquality = 3;
opts->inverted_x2tdma = 1; // most transmitter + scanner + sound card combinations show inverted signals for this
opts->inverted_dmr = 0; // most transmitter + scanner + sound card combinations show non-inverted signals for this
opts->mod_threshold = 26;
opts->ssize = 36;
opts->msize = 15;
opts->playfiles = 0;
opts->delay = 0;
opts->use_cosine_filter = 1;
opts->unmute_encrypted_p25 = 0;
}
void
initState (dsd_state * state)
{
int i, j;
state->dibit_buf = malloc (sizeof (int) * 1000000);
state->dibit_buf_p = state->dibit_buf + 200;
memset (state->dibit_buf, 0, sizeof (int) * 200);
state->repeat = 0;
state->audio_out_buf = malloc (sizeof (short) * 1000000);
memset (state->audio_out_buf, 0, 100 * sizeof (short));
state->audio_out_buf_p = state->audio_out_buf + 100;
state->audio_out_float_buf = malloc (sizeof (float) * 1000000);
memset (state->audio_out_float_buf, 0, 100 * sizeof (float));
state->audio_out_float_buf_p = state->audio_out_float_buf + 100;
state->audio_out_idx = 0;
state->audio_out_idx2 = 0;
state->audio_out_temp_buf_p = state->audio_out_temp_buf;
//state->wav_out_bytes = 0;
state->center = 0;
state->jitter = -1;
state->synctype = -1;
state->min = -15000;
state->max = 15000;
state->lmid = 0;
state->umid = 0;
state->minref = -12000;
state->maxref = 12000;
state->lastsample = 0;
for (i = 0; i < 128; i++)
{
state->sbuf[i] = 0;
}
state->sidx = 0;
for (i = 0; i < 1024; i++)
{
state->maxbuf[i] = 15000;
}
for (i = 0; i < 1024; i++)
{
state->minbuf[i] = -15000;
}
state->midx = 0;
state->err_str[0] = 0;
sprintf (state->fsubtype, " ");
sprintf (state->ftype, " ");
state->symbolcnt = 0;
state->rf_mod = 0;
state->numflips = 0;
state->lastsynctype = -1;
state->lastp25type = 0;
state->offset = 0;
state->carrier = 0;
for (i = 0; i < 25; i++)
{
for (j = 0; j < 16; j++)
{
state->tg[i][j] = 48;
}
}
state->tgcount = 0;
state->lasttg = 0;
state->lastsrc = 0;
state->nac = 0;
state->errs = 0;
state->errs2 = 0;
state->mbe_file_type = -1;
state->optind = 0;
state->numtdulc = 0;
state->firstframe = 0;
sprintf (state->slot0light, " slot0 ");
sprintf (state->slot1light, " slot1 ");
state->aout_gain = 25;
memset (state->aout_max_buf, 0, sizeof (float) * 200);
state->aout_max_buf_p = state->aout_max_buf;
state->aout_max_buf_idx = 0;
state->samplesPerSymbol = 10;
state->symbolCenter = 4;
sprintf (state->algid, "________");
sprintf (state->keyid, "________________");
state->currentslot = 0;
state->cur_mp = malloc (sizeof (mbe_parms));
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 void
usage () usage ()
@ -287,48 +97,6 @@ usage ()
exit (0); exit (0);
} }
void
liveScanner (dsd_opts * opts, dsd_state * state)
{
if (opts->audio_in_fd == -1)
{
if (pthread_mutex_lock(&state->input_mutex))
{
printf("liveScanner -> Unable to lock mutex\n");
}
}
while (1)
{
noCarrier (opts, state);
state->synctype = getFrameSync (opts, state);
// recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
while (state->synctype != -1)
{
processFrame (opts, state);
state->synctype = getFrameSync (opts, state);
// recalibrate center/umid/lmid
state->center = ((state->max) + (state->min)) / 2;
state->umid = (((state->max) - state->center) * 5 / 8) + state->center;
state->lmid = (((state->min) - state->center) * 5 / 8) + state->center;
}
}
}
void
cleanupAndExit (dsd_opts * opts, dsd_state * state)
{
noCarrier (opts, state);
if (opts->wav_out_f != NULL)
{
closeWavOutFile (opts, state);
}
printf ("Exiting.\n");
exit (0);
}
void void
sigfun (int sig) sigfun (int sig)
{ {

Wyświetl plik

@ -102,6 +102,14 @@ typedef struct
int unmute_encrypted_p25; int unmute_encrypted_p25;
} dsd_opts; } dsd_opts;
#ifdef __cplusplus
extern "C" {
#endif
void initOpts (dsd_opts * opts); void initOpts (dsd_opts * opts);
#ifdef __cplusplus
}
#endif
#endif /* INCLUDE_DSD_OPTS_H_ */ #endif /* INCLUDE_DSD_OPTS_H_ */

Wyświetl plik

@ -111,6 +111,8 @@ void initState(dsd_state * state)
state->debug_header_errors = 0; state->debug_header_errors = 0;
state->debug_header_critical_errors = 0; state->debug_header_critical_errors = 0;
state->exitflag = 0;
#ifdef TRACE_DSD #ifdef TRACE_DSD
state->debug_sample_index = 0; state->debug_sample_index = 0;
state->debug_label_file = NULL; state->debug_label_file = NULL;

Wyświetl plik

@ -88,22 +88,48 @@ typedef struct
mbe_parms *prev_mp_enhanced; mbe_parms *prev_mp_enhanced;
int p25kid; int p25kid;
pthread_mutex_t input_mutex; unsigned int debug_audio_errors;
pthread_cond_t input_ready; unsigned int debug_header_errors;
const float *input_samples; unsigned int debug_header_critical_errors;
int input_length;
int input_offset;
pthread_mutex_t output_mutex; // Last dibit read
pthread_cond_t output_ready; int last_dibit;
short *output_buffer;
int output_offset; // Heuristics state data for +P5 signals
float *output_samples; P25Heuristics p25_heuristics;
int output_num_samples;
int output_length; // Heuristics state data for -P5 signals
int output_finished; P25Heuristics inv_p25_heuristics;
int exitflag; // the former global that cannot be a global within SDRangel and is not of much use with it anyway
// New from original DSD for in-memory processing support with SDRangel:
pthread_mutex_t input_mutex; //!< mutex to communicate with input thread
pthread_cond_t input_ready; //!< signals that input demodulator samples are available for processing
const short *input_samples; //!< demodulator samples
int input_length; //!< 0: data not ready, >0: data ready for this amount of demodulator samples
int input_offset; //!< consumer pointer
pthread_mutex_t output_mutex; //!< mutex to communicate with output (audio) thread
pthread_cond_t output_ready; //!< signals that output audio samples are ready
short *output_buffer; //!< Output of decoder single S16LE
int output_offset; //!< producer pointer
short *output_samples; //!< L+R channels S16LE ready for writing to audio FIFO
int output_num_samples; //!< Number of L+R samples available in the above buffer
int output_length; //!< L+R buffer size (fixed)
int output_finished; //!< 0: not ready, 1: ready
int dsd_running; //!< True while DSD thread is running
} dsd_state; } dsd_state;
#ifdef __cplusplus
extern "C" {
#endif
void initState (dsd_state * state); void initState (dsd_state * state);
#ifdef __cplusplus
}
#endif
#endif /* INCLUDE_DSD_STATE_H_ */ #endif /* INCLUDE_DSD_STATE_H_ */

Wyświetl plik

@ -18,262 +18,299 @@
#include "dsd.h" #include "dsd.h"
#include "dsd_cleanupexit.h" #include "dsd_cleanupexit.h"
int int getSymbol(dsd_opts * opts, dsd_state * state, int have_sync)
getSymbol (dsd_opts * opts, dsd_state * state, int have_sync)
{ {
short sample; short sample;
int i, sum, symbol, count; int i, sum, symbol, count;
ssize_t result; ssize_t result;
sum = 0; sum = 0;
count = 0; count = 0;
for (i = 0; i < state->samplesPerSymbol; i++)
for (i = 0; i < state->samplesPerSymbol; i++)
{ {
// timing control // timing control
if ((i == 0) && (have_sync == 0)) if ((i == 0) && (have_sync == 0))
{ {
if (state->samplesPerSymbol == 20) if (state->samplesPerSymbol == 20)
{ {
if ((state->jitter >= 7) && (state->jitter <= 10)) if ((state->jitter >= 7) && (state->jitter <= 10))
{ {
i--; i--;
} }
else if ((state->jitter >= 11) && (state->jitter <= 14)) else if ((state->jitter >= 11) && (state->jitter <= 14))
{ {
i++; i++;
} }
} }
else if (state->rf_mod == 1) else if (state->rf_mod == 1)
{ {
if ((state->jitter >= 0) && (state->jitter < state->symbolCenter)) if ((state->jitter >= 0) && (state->jitter < state->symbolCenter))
{ {
i++; // fall back i++; // fall back
} }
else if ((state->jitter > state->symbolCenter) && (state->jitter < 10)) else if ((state->jitter > state->symbolCenter) && (state->jitter < 10))
{ {
i--; // catch up i--; // catch up
} }
} }
else if (state->rf_mod == 2) else if (state->rf_mod == 2)
{ {
if ((state->jitter >= state->symbolCenter - 1) && (state->jitter <= state->symbolCenter)) if ((state->jitter >= state->symbolCenter - 1) && (state->jitter <= state->symbolCenter))
{ {
i--; i--;
} }
else if ((state->jitter >= state->symbolCenter + 1) && (state->jitter <= state->symbolCenter + 2)) else if ((state->jitter >= state->symbolCenter + 1) && (state->jitter <= state->symbolCenter + 2))
{ {
i++; i++;
} }
} }
else if (state->rf_mod == 0) else if (state->rf_mod == 0)
{ {
if ((state->jitter > 0) && (state->jitter <= state->symbolCenter)) if ((state->jitter > 0) && (state->jitter <= state->symbolCenter))
{ {
i--; // catch up i--; // catch up
} }
else if ((state->jitter > state->symbolCenter) && (state->jitter < state->samplesPerSymbol)) else if ((state->jitter > state->symbolCenter) && (state->jitter < state->samplesPerSymbol))
{ {
i++; // fall back i++; // fall back
} }
} }
state->jitter = -1;
state->jitter = -1;
} }
if(opts->audio_in_type == 0) {
if (opts->audio_in_fd == -1) // get sample in and push samples out
if (opts->audio_in_type == 0)
{
if (opts->audio_in_fd == -1)
{ {
while (state->input_length == 0) while (state->input_length == 0)
{ {
// If the buffer is empty, wait for more samples to arrive. // If the buffer is empty, wait for more samples to arrive.
if (pthread_cond_wait(&state->input_ready, &state->input_mutex)) if (pthread_cond_wait(&state->input_ready, &state->input_mutex))
{ {
printf("getSymbol -> Error waiting for condition\n"); printf("getSymbol -> Error waiting for input condition\n");
} }
} }
// Get the next sample from the buffer, converting from float to short. // Get the next sample from the buffer
sample = (short) (state->input_samples[state->input_offset++] * 32768); sample = state->input_samples[state->input_offset++];
if (state->input_offset == state->input_length)
if (state->input_offset == state->input_length) // all available samples have been read
{ {
int i; int i;
// We've reached the end of the buffer. Wait for more next time. // We've reached the end of the buffer. Wait for more next time.
state->input_length = 0; state->input_length = 0;
if (pthread_mutex_lock(&state->output_mutex)) // make output samples availabele
if (pthread_mutex_lock(&state->output_mutex))
{ {
printf("Unable to lock mutex\n"); printf("Unable to lock output mutex\n");
} }
state->output_num_samples = state->output_offset; state->output_num_samples = state->output_offset;
if (state->output_num_samples > state->output_length) {
state->output_num_samples = state->output_length;
}
for (i = 0; i < state->output_length - state->output_num_samples; i++)
{
state->output_samples[i] = 0;
}
for (; i < state->output_length; i++)
{
state->output_samples[i] = state->output_buffer[i - (state->output_length - state->output_num_samples)] / 32768.0;
}
state->output_offset -= state->output_num_samples;
for (i = 0; i < state->output_offset; i++)
{
state->output_buffer[i] = state->output_buffer[i + state->output_num_samples];
}
state->output_finished = 1;
// Wake up general_work // GNUradio drivel
if (pthread_cond_signal(&state->output_ready)) // if (state->output_num_samples > state->output_length)
// {
// state->output_num_samples = state->output_length;
// }
//
// for (i = 0; i < state->output_length - state->output_num_samples; i++)
// {
// state->output_samples[i] = 0;
// }
//
// for (; i < state->output_length; i++)
// {
// state->output_samples[i] = state->output_buffer[i - (state->output_length - state->output_num_samples)] / 32768.0;
// }
//
// state->output_offset -= state->output_num_samples;
//
// for (i = 0; i < state->output_offset; i++)
// {
// state->output_buffer[i] = state->output_buffer[i + state->output_num_samples];
// }
if (state->output_num_samples > state->output_length)
{ {
printf("Unable to signal\n"); fprintf(stderr, "WARNING: audio buffer over-run! Truncating output");
state->output_num_samples = state->output_length;
} }
if (pthread_mutex_unlock(&state->output_mutex)) for (i = 0; i < state->output_num_samples; i++)
{ {
printf("Unable to unlock mutex\n"); state->output_samples[2*i] = state->output_buffer[i]; // L channel
state->output_samples[2*i+1] = state->output_buffer[i]; // R channel
}
state->output_finished = 1;
// Wake up audio out thread
if (pthread_cond_signal(&state->output_ready))
{
printf("Unable to signal output ready\n");
}
if (pthread_mutex_unlock(&state->output_mutex))
{
printf("Unable to unlock output mutex\n");
} }
} }
} }
else else
{ {
result = read (opts->audio_in_fd, &sample, 2); result = read(opts->audio_in_fd, &sample, 2);
} }
} }
#ifdef USE_LIBSNDFILE #ifdef USE_LIBSNDFILE
else { else
result = sf_read_short(opts->audio_in_file, &sample, 1); {
if(result == 0) { result = sf_read_short(opts->audio_in_file, &sample, 1);
cleanupAndExit (opts, state); if(result == 0)
} {
} cleanupAndExit (opts, state);
}
}
#endif #endif
// printf("res: %zd\n, offset: %lld", result, sf_seek(opts->audio_in_file, 0, SEEK_CUR)); // printf("res: %zd\n, offset: %lld", result, sf_seek(opts->audio_in_file, 0, SEEK_CUR));
if (opts->use_cosine_filter)
{
if (state->lastsynctype >= 10 && state->lastsynctype <= 13)
sample = dmr_filter(sample);
else if (state->lastsynctype == 8 || state->lastsynctype == 9 ||
state->lastsynctype == 16 || state->lastsynctype == 17)
sample = nxdn_filter(sample);
}
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0)) // process sample
if (opts->use_cosine_filter)
{ {
sample = state->max; if (state->lastsynctype >= 10 && state->lastsynctype <= 13)
}
else if ((sample < state->min) && (have_sync == 1) && (state->rf_mod == 0))
{
sample = state->min;
}
if (sample > state->center)
{
if (state->lastsample < state->center)
{ {
state->numflips += 1; sample = dmr_filter(sample);
} }
if (sample > (state->maxref * 1.25)) else if (state->lastsynctype == 8 || state->lastsynctype == 9
|| state->lastsynctype == 16 || state->lastsynctype == 17)
{ {
if (state->lastsample < (state->maxref * 1.25)) sample = nxdn_filter(sample);
}
}
if ((sample > state->max) && (have_sync == 1) && (state->rf_mod == 0))
{
sample = state->max;
}
else if ((sample < state->min) && (have_sync == 1) && (state->rf_mod == 0))
{
sample = state->min;
}
if (sample > state->center)
{
if (state->lastsample < state->center)
{
state->numflips += 1;
}
if (sample > (state->maxref * 1.25))
{
if (state->lastsample < (state->maxref * 1.25))
{ {
state->numflips += 1; state->numflips += 1;
} }
if ((state->jitter < 0) && (state->rf_mod == 1)) if ((state->jitter < 0) && (state->rf_mod == 1))
{ // first spike out of place { // first spike out of place
state->jitter = i; state->jitter = i;
} }
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1)) if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{ {
printf ("O"); printf("O");
} }
} }
else else
{ {
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1)) if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{ {
printf ("+"); printf("+");
} }
if ((state->jitter < 0) && (state->lastsample < state->center) && (state->rf_mod != 1)) if ((state->jitter < 0) && (state->lastsample < state->center) && (state->rf_mod != 1))
{ // first transition edge { // first transition edge
state->jitter = i; state->jitter = i;
} }
} }
} }
else else
{ // sample < 0 { // sample < 0
if (state->lastsample > state->center) if (state->lastsample > state->center)
{ {
state->numflips += 1; state->numflips += 1;
} }
if (sample < (state->minref * 1.25)) if (sample < (state->minref * 1.25))
{ {
if (state->lastsample > (state->minref * 1.25)) if (state->lastsample > (state->minref * 1.25))
{ {
state->numflips += 1; state->numflips += 1;
} }
if ((state->jitter < 0) && (state->rf_mod == 1)) if ((state->jitter < 0) && (state->rf_mod == 1))
{ // first spike out of place { // first spike out of place
state->jitter = i; state->jitter = i;
} }
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1)) if ((opts->symboltiming == 1) && (have_sync == 0)
&& (state->lastsynctype != -1))
{ {
printf ("X"); printf("X");
} }
} }
else else
{ {
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1)) if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{ {
printf ("-"); printf("-");
} }
if ((state->jitter < 0) && (state->lastsample > state->center) && (state->rf_mod != 1)) if ((state->jitter < 0) && (state->lastsample > state->center) && (state->rf_mod != 1))
{ // first transition edge { // first transition edge
state->jitter = i; state->jitter = i;
} }
} }
} }
if (state->samplesPerSymbol == 20) if (state->samplesPerSymbol == 20)
{ {
if ((i >= 9) && (i <= 11)) if ((i >= 9) && (i <= 11))
{ {
sum += sample; sum += sample;
count++; count++;
} }
} }
if (state->samplesPerSymbol == 5) if (state->samplesPerSymbol == 5)
{ {
if (i == 2) if (i == 2)
{ {
sum += sample; sum += sample;
count++; count++;
} }
} }
else else
{ {
if (((i >= state->symbolCenter - 1) && (i <= state->symbolCenter + 2) && (state->rf_mod == 0)) || (((i == state->symbolCenter) || (i == state->symbolCenter + 1)) && (state->rf_mod != 0))) if (((i >= state->symbolCenter - 1) && (i <= state->symbolCenter + 2) && (state->rf_mod == 0)) || (((i == state->symbolCenter) || (i == state->symbolCenter + 1)) && (state->rf_mod != 0)))
{ {
sum += sample; sum += sample;
count++; count++;
} }
} }
state->lastsample = sample;
}
symbol = (sum / count);
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1)) state->lastsample = sample;
} // for (i = 0; i < state->samplesPerSymbol; i++)
symbol = (sum / count);
if ((opts->symboltiming == 1) && (have_sync == 0) && (state->lastsynctype != -1))
{ {
if (state->jitter >= 0) if (state->jitter >= 0)
{ {
printf (" %i\n", state->jitter); printf(" %i\n", state->jitter);
} }
else else
{ {
printf ("\n"); printf("\n");
} }
} }
state->symbolcnt++; state->symbolcnt++;
return (symbol); return (symbol);
} }

123
dsd/dstar_const.c 100644
Wyświetl plik

@ -0,0 +1,123 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* dstar interleave experiments
*/
#include "dstar_const.h"
const int dW[72] = {
// 0-11
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 12-23
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 24-35
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 36-47
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 48-59
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 60-71
3, 2,
1, 1,
3, 3,
2, 1,
0, 0,
3, 3,
};
const int dX[72] = {
// 0-11
10, 22,
11, 9,
10, 22,
11, 23,
8, 20,
9, 21,
// 12-23
10, 8,
9, 21,
8, 6,
7, 19,
8, 20,
9, 7,
// 24-35
6, 18,
7, 5,
6, 18,
7, 19,
4, 16,
5, 17,
// 36-47
6, 4,
5, 17,
4, 2,
3, 15,
4, 16,
5, 3,
// 48-59
2, 14,
3, 1,
2, 14,
3, 15,
0, 12,
1, 13,
// 60-71
2, 0,
1, 13,
0, 12,
10, 11,
0, 12,
1, 13,
};

Wyświetl plik

@ -16,114 +16,114 @@
*/ */
/* /*
* dstar interleave experiments * dstar interleave experiments
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int dW[72]; extern const int dW[72];
extern const int dX[72]; extern const int dX[72];
#else //#else
const int dW[72] = { //const int dW[72] = {
//
// // 0-11
// 0, 0,
// 3, 2,
// 1, 1,
// 0, 0,
// 1, 1,
// 0, 0,
//
// // 12-23
// 3, 2,
// 1, 1,
// 3, 2,
// 1, 1,
// 0, 0,
// 3, 2,
//
// // 24-35
// 0, 0,
// 3, 2,
// 1, 1,
// 0, 0,
// 1, 1,
// 0, 0,
//
// // 36-47
// 3, 2,
// 1, 1,
// 3, 2,
// 1, 1,
// 0, 0,
// 3, 2,
//
// // 48-59
// 0, 0,
// 3, 2,
// 1, 1,
// 0, 0,
// 1, 1,
// 0, 0,
//
// // 60-71
// 3, 2,
// 1, 1,
// 3, 3,
// 2, 1,
// 0, 0,
// 3, 3,
//};
//const int dX[72] = {
//
// // 0-11
// 10, 22,
// 11, 9,
// 10, 22,
// 11, 23,
// 8, 20,
// 9, 21,
//
// // 12-23
// 10, 8,
// 9, 21,
// 8, 6,
// 7, 19,
// 8, 20,
// 9, 7,
//
// // 24-35
// 6, 18,
// 7, 5,
// 6, 18,
// 7, 19,
// 4, 16,
// 5, 17,
//
// // 36-47
// 6, 4,
// 5, 17,
// 4, 2,
// 3, 15,
// 4, 16,
// 5, 3,
//
// // 48-59
// 2, 14,
// 3, 1,
// 2, 14,
// 3, 15,
// 0, 12,
// 1, 13,
//
// // 60-71
// 2, 0,
// 1, 13,
// 0, 12,
// 10, 11,
// 0, 12,
// 1, 13,
//};
// 0-11 //#endif
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 12-23
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 24-35
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 36-47
3, 2,
1, 1,
3, 2,
1, 1,
0, 0,
3, 2,
// 48-59
0, 0,
3, 2,
1, 1,
0, 0,
1, 1,
0, 0,
// 60-71
3, 2,
1, 1,
3, 3,
2, 1,
0, 0,
3, 3,
};
const int dX[72] = {
// 0-11
10, 22,
11, 9,
10, 22,
11, 23,
8, 20,
9, 21,
// 12-23
10, 8,
9, 21,
8, 6,
7, 19,
8, 20,
9, 7,
// 24-35
6, 18,
7, 5,
6, 18,
7, 19,
4, 16,
5, 17,
// 36-47
6, 4,
5, 17,
4, 2,
3, 15,
4, 16,
5, 3,
// 48-59
2, 14,
3, 1,
2, 14,
3, 15,
0, 12,
1, 13,
// 60-71
2, 0,
1, 13,
0, 12,
10, 11,
0, 12,
1, 13,
};
#endif

Wyświetl plik

@ -35,10 +35,10 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{ {
for (j = 0; j < 4; j++) for (j = 0; j < 4; j++)
{ {
w = nW; w = n96W;
x = nX; x = n96X;
y = nY; y = n96Y;
z = nZ; z = n96Z;
for (i = 0; i < 36; i++) for (i = 0; i < 36; i++)
{ {
dibit = getDibit (opts, state); dibit = getDibit (opts, state);
@ -62,10 +62,10 @@ processNXDN96 (dsd_opts * opts, dsd_state * state)
{ {
for (j = 0; j < 3; j++) // we skip the last voice frame until frame sync can work with < 24 symbols for (j = 0; j < 3; j++) // we skip the last voice frame until frame sync can work with < 24 symbols
{ {
w = nW; w = n96W;
x = nX; x = n96X;
y = nY; y = n96Y;
z = nZ; z = n96Z;
for (i = 0; i < 36; i++) for (i = 0; i < 36; i++)
{ {
dibit = getDibit (opts, state); dibit = getDibit (opts, state);

55
dsd/nxdn96_const.c 100644
Wyświetl plik

@ -0,0 +1,55 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* NXDN AMBE interleave schedule
*/
#include "nxdn96_const.h"
const int n96W[36] = { 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int n96X[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int n96Y[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int n96Z[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};

Wyświetl plik

@ -19,44 +19,44 @@
* NXDN AMBE interleave schedule * NXDN AMBE interleave schedule
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int nW[36]; extern const int n96W[36];
extern const int nX[36]; extern const int n96X[36];
extern const int nY[36]; extern const int n96Y[36];
extern const int nZ[36]; extern const int n96Z[36];
#else //#else
//
//const int nW[36] = { 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 2,
// 0, 2, 0, 2, 0, 2,
// 0, 2, 0, 2, 0, 2
//};
//
//const int nX[36] = { 23, 10, 22, 9, 21, 8,
// 20, 7, 19, 6, 18, 5,
// 17, 4, 16, 3, 15, 2,
// 14, 1, 13, 0, 12, 10,
// 11, 9, 10, 8, 9, 7,
// 8, 6, 7, 5, 6, 4
//};
//
//const int nY[36] = { 0, 2, 0, 2, 0, 2,
// 0, 2, 0, 3, 0, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3
//};
//
//const int nZ[36] = { 5, 3, 4, 2, 3, 1,
// 2, 0, 1, 13, 0, 12,
// 22, 11, 21, 10, 20, 9,
// 19, 8, 18, 7, 17, 6,
// 16, 5, 15, 4, 14, 3,
// 13, 2, 12, 1, 11, 0
//};
const int nW[36] = { 0, 1, 0, 1, 0, 1, //#endif
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int nX[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int nY[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int nZ[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};
#endif

58
dsd/nxdn_const.c 100644
Wyświetl plik

@ -0,0 +1,58 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include "nxdn_const.h"
/*
* pseudorandom bit sequence
*/
const char nxdnpr[145] = { 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1 };
/*
* NXDN AMBE interleave schedule
*/
const int nW[36] = { 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int nX[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int nY[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int nZ[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};

Wyświetl plik

@ -15,52 +15,52 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int nW[36]; extern const int nW[36];
extern const int nX[36]; extern const int nX[36];
extern const int nY[36]; extern const int nY[36];
extern const int nZ[36]; extern const int nZ[36];
extern const char nxdnpr[145]; extern const char nxdnpr[145];
#else //#else
/* ///*
* pseudorandom bit sequence // * pseudorandom bit sequence
*/ // */
const char nxdnpr[145] = { 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1 }; //const char nxdnpr[145] = { 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1 };
//
///*
// * NXDN AMBE interleave schedule
// */
//const int nW[36] = { 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 1,
// 0, 1, 0, 1, 0, 2,
// 0, 2, 0, 2, 0, 2,
// 0, 2, 0, 2, 0, 2
//};
//
//const int nX[36] = { 23, 10, 22, 9, 21, 8,
// 20, 7, 19, 6, 18, 5,
// 17, 4, 16, 3, 15, 2,
// 14, 1, 13, 0, 12, 10,
// 11, 9, 10, 8, 9, 7,
// 8, 6, 7, 5, 6, 4
//};
//
//const int nY[36] = { 0, 2, 0, 2, 0, 2,
// 0, 2, 0, 3, 0, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3,
// 1, 3, 1, 3, 1, 3
//};
//
//const int nZ[36] = { 5, 3, 4, 2, 3, 1,
// 2, 0, 1, 13, 0, 12,
// 22, 11, 21, 10, 20, 9,
// 19, 8, 18, 7, 17, 6,
// 16, 5, 15, 4, 14, 3,
// 13, 2, 12, 1, 11, 0
//};
/* //#endif
* NXDN AMBE interleave schedule
*/
const int nW[36] = { 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int nX[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int nY[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int nZ[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};
#endif

82
dsd/p25p1_const.c 100644
Wyświetl plik

@ -0,0 +1,82 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include "p25p1_const.h"
/*
* P25 Phase1 IMBE interleave schedule
*/
const int iW[72] = {
0, 2, 4, 1, 3, 5,
0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6,
0, 2, 5, 1, 3, 6,
0, 2, 5, 1, 3, 6,
0, 2, 5, 1, 3, 7,
0, 2, 5, 1, 3, 7,
0, 2, 5, 1, 4, 7,
0, 3, 5, 2, 4, 7
};
const int iX[72] = {
22, 20, 10, 20, 18, 0,
20, 18, 8, 18, 16, 13,
18, 16, 6, 16, 14, 11,
16, 14, 4, 14, 12, 9,
14, 12, 2, 12, 10, 7,
12, 10, 0, 10, 8, 5,
10, 8, 13, 8, 6, 3,
8, 6, 11, 6, 4, 1,
6, 4, 9, 4, 2, 6,
4, 2, 7, 2, 0, 4,
2, 0, 5, 0, 13, 2,
0, 21, 3, 21, 11, 0
};
const int iY[72] = {
1, 3, 5, 0, 2, 4,
1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5,
1, 3, 7, 0, 2, 5,
1, 4, 7, 0, 3, 5,
2, 4, 7, 1, 3, 5
};
const int iZ[72] = {
21, 19, 1, 21, 19, 9,
19, 17, 14, 19, 17, 7,
17, 15, 12, 17, 15, 5,
15, 13, 10, 15, 13, 3,
13, 11, 8, 13, 11, 1,
11, 9, 6, 11, 9, 14,
9, 7, 4, 9, 7, 12,
7, 5, 2, 7, 5, 10,
5, 3, 0, 5, 3, 8,
3, 1, 5, 3, 1, 6,
1, 14, 3, 1, 22, 4,
22, 12, 1, 22, 20, 2
};

Wyświetl plik

@ -15,75 +15,75 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int iW[72]; extern const int iW[72];
extern const int iX[72]; extern const int iX[72];
extern const int iY[72]; extern const int iY[72];
extern const int iZ[72]; extern const int iZ[72];
#else //#else
/* ///*
* P25 Phase1 IMBE interleave schedule // * P25 Phase1 IMBE interleave schedule
*/ // */
//
const int iW[72] = { //const int iW[72] = {
0, 2, 4, 1, 3, 5, // 0, 2, 4, 1, 3, 5,
0, 2, 4, 1, 3, 6, // 0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6, // 0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6, // 0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6, // 0, 2, 4, 1, 3, 6,
0, 2, 4, 1, 3, 6, // 0, 2, 4, 1, 3, 6,
0, 2, 5, 1, 3, 6, // 0, 2, 5, 1, 3, 6,
0, 2, 5, 1, 3, 6, // 0, 2, 5, 1, 3, 6,
0, 2, 5, 1, 3, 7, // 0, 2, 5, 1, 3, 7,
0, 2, 5, 1, 3, 7, // 0, 2, 5, 1, 3, 7,
0, 2, 5, 1, 4, 7, // 0, 2, 5, 1, 4, 7,
0, 3, 5, 2, 4, 7 // 0, 3, 5, 2, 4, 7
}; //};
//
const int iX[72] = { //const int iX[72] = {
22, 20, 10, 20, 18, 0, // 22, 20, 10, 20, 18, 0,
20, 18, 8, 18, 16, 13, // 20, 18, 8, 18, 16, 13,
18, 16, 6, 16, 14, 11, // 18, 16, 6, 16, 14, 11,
16, 14, 4, 14, 12, 9, // 16, 14, 4, 14, 12, 9,
14, 12, 2, 12, 10, 7, // 14, 12, 2, 12, 10, 7,
12, 10, 0, 10, 8, 5, // 12, 10, 0, 10, 8, 5,
10, 8, 13, 8, 6, 3, // 10, 8, 13, 8, 6, 3,
8, 6, 11, 6, 4, 1, // 8, 6, 11, 6, 4, 1,
6, 4, 9, 4, 2, 6, // 6, 4, 9, 4, 2, 6,
4, 2, 7, 2, 0, 4, // 4, 2, 7, 2, 0, 4,
2, 0, 5, 0, 13, 2, // 2, 0, 5, 0, 13, 2,
0, 21, 3, 21, 11, 0 // 0, 21, 3, 21, 11, 0
}; //};
//
const int iY[72] = { //const int iY[72] = {
1, 3, 5, 0, 2, 4, // 1, 3, 5, 0, 2, 4,
1, 3, 6, 0, 2, 4, // 1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4, // 1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4, // 1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 4, // 1, 3, 6, 0, 2, 4,
1, 3, 6, 0, 2, 5, // 1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5, // 1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5, // 1, 3, 6, 0, 2, 5,
1, 3, 6, 0, 2, 5, // 1, 3, 6, 0, 2, 5,
1, 3, 7, 0, 2, 5, // 1, 3, 7, 0, 2, 5,
1, 4, 7, 0, 3, 5, // 1, 4, 7, 0, 3, 5,
2, 4, 7, 1, 3, 5 // 2, 4, 7, 1, 3, 5
}; //};
//
const int iZ[72] = { //const int iZ[72] = {
21, 19, 1, 21, 19, 9, // 21, 19, 1, 21, 19, 9,
19, 17, 14, 19, 17, 7, // 19, 17, 14, 19, 17, 7,
17, 15, 12, 17, 15, 5, // 17, 15, 12, 17, 15, 5,
15, 13, 10, 15, 13, 3, // 15, 13, 10, 15, 13, 3,
13, 11, 8, 13, 11, 1, // 13, 11, 8, 13, 11, 1,
11, 9, 6, 11, 9, 14, // 11, 9, 6, 11, 9, 14,
9, 7, 4, 9, 7, 12, // 9, 7, 4, 9, 7, 12,
7, 5, 2, 7, 5, 10, // 7, 5, 2, 7, 5, 10,
5, 3, 0, 5, 3, 8, // 5, 3, 0, 5, 3, 8,
3, 1, 5, 3, 1, 6, // 3, 1, 5, 3, 1, 6,
1, 14, 3, 1, 22, 4, // 1, 14, 3, 1, 22, 4,
22, 12, 1, 22, 20, 2 // 22, 12, 1, 22, 20, 2
}; //};
#endif //#endif

Wyświetl plik

@ -0,0 +1,76 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#include "provoice_const.h"
/*
* ProVoice IMBE interleave schedule
*/
const int pW[142] = {
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
0, 1, 3, 4, 5, 6,
1, 2, 3, 4, 5, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
1, 2, 3, 4, 5, 6,
1, 2, 3, 4, 5,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6,
0, 1, 2, 4, 5, 6,
1, 2, 3, 4, 5, 6,
1, 2, 3, 4, 6
};
const int pX[142] = {
18, 18, 17, 16, 7, 21,
15, 15, 14, 13, 4, 18,
12, 12, 11, 10, 1, 15,
9, 9, 8, 7, 13, 12,
6, 6, 5, 4, 10, 9,
3, 3, 2, 1, 7, 6,
0, 0, 22, 13, 4, 3,
21, 20, 19, 10, 1, 0,
17, 17, 16, 15, 6, 20,
14, 14, 13, 12, 3, 17,
11, 11, 10, 9, 0, 14,
8, 8, 7, 6, 12, 11,
5, 5, 4, 3, 9, 8,
2, 2, 1, 0, 6, 5,
23, 22, 21, 12, 3, 2,
20, 19, 18, 9, 0,
16, 16, 15, 14, 5, 19,
13, 13, 12, 11, 2, 16,
10, 10, 9, 8, 14, 13,
7, 7, 6, 5, 11, 10,
4, 4, 3, 2, 8, 7,
1, 1, 0, 14, 5, 4,
22, 21, 20, 11, 2, 1,
19, 18, 17, 8, 22
};

Wyświetl plik

@ -15,67 +15,67 @@
* PERFORMANCE OF THIS SOFTWARE. * PERFORMANCE OF THIS SOFTWARE.
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int pW[142]; extern const int pW[142];
extern const int pX[142]; extern const int pX[142];
#else //#else
/* ///*
* ProVoice IMBE interleave schedule // * ProVoice IMBE interleave schedule
*/ // */
//
const int pW[142] = { //const int pW[142] = {
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 3, 4, 5, 6, // 0, 1, 3, 4, 5, 6,
1, 2, 3, 4, 5, 6, // 1, 2, 3, 4, 5, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
1, 2, 3, 4, 5, 6, // 1, 2, 3, 4, 5, 6,
1, 2, 3, 4, 5, // 1, 2, 3, 4, 5,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 4, 6, // 0, 1, 2, 3, 4, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 3, 5, 6, // 0, 1, 2, 3, 5, 6,
0, 1, 2, 4, 5, 6, // 0, 1, 2, 4, 5, 6,
1, 2, 3, 4, 5, 6, // 1, 2, 3, 4, 5, 6,
1, 2, 3, 4, 6 // 1, 2, 3, 4, 6
}; //};
//
const int pX[142] = { //const int pX[142] = {
18, 18, 17, 16, 7, 21, // 18, 18, 17, 16, 7, 21,
15, 15, 14, 13, 4, 18, // 15, 15, 14, 13, 4, 18,
12, 12, 11, 10, 1, 15, // 12, 12, 11, 10, 1, 15,
9, 9, 8, 7, 13, 12, // 9, 9, 8, 7, 13, 12,
6, 6, 5, 4, 10, 9, // 6, 6, 5, 4, 10, 9,
3, 3, 2, 1, 7, 6, // 3, 3, 2, 1, 7, 6,
0, 0, 22, 13, 4, 3, // 0, 0, 22, 13, 4, 3,
21, 20, 19, 10, 1, 0, // 21, 20, 19, 10, 1, 0,
17, 17, 16, 15, 6, 20, // 17, 17, 16, 15, 6, 20,
14, 14, 13, 12, 3, 17, // 14, 14, 13, 12, 3, 17,
11, 11, 10, 9, 0, 14, // 11, 11, 10, 9, 0, 14,
8, 8, 7, 6, 12, 11, // 8, 8, 7, 6, 12, 11,
5, 5, 4, 3, 9, 8, // 5, 5, 4, 3, 9, 8,
2, 2, 1, 0, 6, 5, // 2, 2, 1, 0, 6, 5,
23, 22, 21, 12, 3, 2, // 23, 22, 21, 12, 3, 2,
20, 19, 18, 9, 0, // 20, 19, 18, 9, 0,
16, 16, 15, 14, 5, 19, // 16, 16, 15, 14, 5, 19,
13, 13, 12, 11, 2, 16, // 13, 13, 12, 11, 2, 16,
10, 10, 9, 8, 14, 13, // 10, 10, 9, 8, 14, 13,
7, 7, 6, 5, 11, 10, // 7, 7, 6, 5, 11, 10,
4, 4, 3, 2, 8, 7, // 4, 4, 3, 2, 8, 7,
1, 1, 0, 14, 5, 4, // 1, 1, 0, 14, 5, 4,
22, 21, 20, 11, 2, 1, // 22, 21, 20, 11, 2, 1,
19, 18, 17, 8, 22 // 19, 18, 17, 8, 22
}; //};
#endif //#endif

54
dsd/x2tdma_const.c 100644
Wyświetl plik

@ -0,0 +1,54 @@
/*
* Copyright (C) 2010 DSD Author
* GPG Key ID: 0x3F1D7FD0 (74EF 430D F7F2 0A48 FCE6 F630 FAA2 635D 3F1D 7FD0)
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/*
* X2TDMA AMBE interleave schedule
*/
#include "x2tdma_const.h"
const int aW[36] = { 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2
};
const int aX[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4
};
const int aY[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3
};
const int aZ[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0
};

Wyświetl plik

@ -19,44 +19,44 @@
* X2TDMA AMBE interleave schedule * X2TDMA AMBE interleave schedule
*/ */
#ifndef _MAIN //#ifndef _MAIN
extern const int aW[36]; extern const int aW[36];
extern const int aX[36]; extern const int aX[36];
extern const int aY[36]; extern const int aY[36];
extern const int aZ[36]; extern const int aZ[36];
#else //#else
//
const int aW[36] = { 0, 1, 0, 1, 0, 1, //const int aW[36] = { 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, // 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 1, // 0, 1, 0, 1, 0, 1,
0, 1, 0, 1, 0, 2, // 0, 1, 0, 1, 0, 2,
0, 2, 0, 2, 0, 2, // 0, 2, 0, 2, 0, 2,
0, 2, 0, 2, 0, 2 // 0, 2, 0, 2, 0, 2
}; //};
//
const int aX[36] = { 23, 10, 22, 9, 21, 8, //const int aX[36] = { 23, 10, 22, 9, 21, 8,
20, 7, 19, 6, 18, 5, // 20, 7, 19, 6, 18, 5,
17, 4, 16, 3, 15, 2, // 17, 4, 16, 3, 15, 2,
14, 1, 13, 0, 12, 10, // 14, 1, 13, 0, 12, 10,
11, 9, 10, 8, 9, 7, // 11, 9, 10, 8, 9, 7,
8, 6, 7, 5, 6, 4 // 8, 6, 7, 5, 6, 4
}; //};
//
const int aY[36] = { 0, 2, 0, 2, 0, 2, //const int aY[36] = { 0, 2, 0, 2, 0, 2,
0, 2, 0, 3, 0, 3, // 0, 2, 0, 3, 0, 3,
1, 3, 1, 3, 1, 3, // 1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3, // 1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3, // 1, 3, 1, 3, 1, 3,
1, 3, 1, 3, 1, 3 // 1, 3, 1, 3, 1, 3
}; //};
//
const int aZ[36] = { 5, 3, 4, 2, 3, 1, //const int aZ[36] = { 5, 3, 4, 2, 3, 1,
2, 0, 1, 13, 0, 12, // 2, 0, 1, 13, 0, 12,
22, 11, 21, 10, 20, 9, // 22, 11, 21, 10, 20, 9,
19, 8, 18, 7, 17, 6, // 19, 8, 18, 7, 17, 6,
16, 5, 15, 4, 14, 3, // 16, 5, 15, 4, 14, 3,
13, 2, 12, 1, 11, 0 // 13, 2, 12, 1, 11, 0
}; //};
//
#endif //#endif

Wyświetl plik

@ -4,12 +4,14 @@ set(dsddemod_SOURCES
dsddemod.cpp dsddemod.cpp
dsddemodgui.cpp dsddemodgui.cpp
dsddemodplugin.cpp dsddemodplugin.cpp
dsddecoder.cpp
) )
set(dsddemod_HEADERS set(dsddemod_HEADERS
dsddemod.h dsddemod.h
dsddemodgui.h dsddemodgui.h
dsddemodplugin.h dsddemodplugin.h
dsddecoder.h
) )
set(dsddemod_FORMS set(dsddemod_FORMS
@ -18,7 +20,9 @@ set(dsddemod_FORMS
include_directories( include_directories(
. .
../../../dsd
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${LIBMBE_INCLUDE_DIR}
) )
#include(${QT_USE_FILE}) #include(${QT_USE_FILE})
@ -37,6 +41,8 @@ add_library(demoddsd SHARED
target_link_libraries(demoddsd target_link_libraries(demoddsd
${QT_LIBRARIES} ${QT_LIBRARIES}
sdrbase sdrbase
dsd
${LIBMBE_LIBRARY}
) )
qt5_use_modules(demoddsd Core Widgets OpenGL Multimedia) qt5_use_modules(demoddsd Core Widgets OpenGL Multimedia)

Wyświetl plik

@ -0,0 +1,169 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QtGlobal>
#include "dsddecoder.h"
#include "dsd_livescanner.h"
DSDDecoder::DSDDecoder()
{
initOpts(&m_dsdParams.opts);
initState(&m_dsdParams.state);
m_dsdParams.opts.split = 1;
m_dsdParams.opts.playoffset = 0;
m_dsdParams.opts.delay = 0;
m_dsdParams.opts.audio_in_type = 0;
m_dsdParams.opts.audio_out_type = 0;
// Initialize with auto-detect:
m_dsdParams.opts.frame_dstar = 1;
m_dsdParams.opts.frame_x2tdma = 1;
m_dsdParams.opts.frame_p25p1 = 1;
m_dsdParams.opts.frame_nxdn48 = 0;
m_dsdParams.opts.frame_nxdn96 = 1;
m_dsdParams.opts.frame_dmr = 1;
m_dsdParams.opts.frame_provoice = 0;
m_dsdParams.opts.uvquality = 3; // This is gr-dsd default
m_dsdParams.opts.verbose = 2; // This is gr-dsd default
m_dsdParams.opts.errorbars = 1; // This is gr-dsd default
// Initialize with auto detection of modulation optimization:
m_dsdParams.opts.mod_c4fm = 1;
m_dsdParams.opts.mod_qpsk = 1;
m_dsdParams.opts.mod_gfsk = 1;
m_dsdParams.state.rf_mod = 0;
// Initialize the conditions
if(pthread_cond_init(&m_dsdParams.state.input_ready, NULL))
{
qCritical("DSDDecoder::DSDDecoder: Unable to initialize input condition");
}
if(pthread_cond_init(&m_dsdParams.state.output_ready, NULL))
{
qCritical("DSDDecoder::DSDDecoder: Unable to initialize output condition");
}
m_dsdParams.state.input_length = 0;
m_dsdParams.state.input_offset = 0;
// Lock output mutex
if (pthread_mutex_lock(&m_dsdParams.state.output_mutex))
{
qCritical("DSDDecoder::DSDDecoder: Unable to lock output mutex");
}
m_dsdParams.state.output_buffer = (short *) malloc(1<<18); // Raw output buffer with single S16LE samples @ 8k (max: 128 kS)
m_dsdParams.state.output_offset = 0;
if (m_dsdParams.state.output_buffer == NULL)
{
qCritical("DSDDecoder::DSDDecoder: Unable to allocate output raw buffer.");
}
m_dsdParams.state.output_samples = (short *) malloc(1<<19); // Audio output buffer with L+R S16LE samples (max: 128 kS)
m_dsdParams.state.output_length = 1<<19; // the buffer size fixed
if (m_dsdParams.state.output_samples == NULL)
{
qCritical("DSDDecoder::DSDDecoder: Unable to allocate audio L+R buffer.");
}
m_dsdThread = pthread_self(); // dummy initialization
m_dsdParams.state.dsd_running = 0; // wait for start()
}
DSDDecoder::~DSDDecoder()
{
stop();
// Unlock output mutex
if (pthread_mutex_unlock(&m_dsdParams.state.output_mutex))
{
qCritical("DSDDecoder::~DSDDecoder: Unable to unlock output mutex");
}
free(m_dsdParams.state.output_samples);
free(m_dsdParams.state.output_buffer);
}
void DSDDecoder::setInBuffer(const short *inBuffer)
{
m_dsdParams.state.input_samples = inBuffer;
}
void DSDDecoder::pushSamples(int nbSamples)
{
if (pthread_mutex_lock(&m_dsdParams.state.input_mutex))
{
qCritical("DSDDecoder::pushSamples: Unable to lock input mutex");
}
m_dsdParams.state.input_length = nbSamples;
m_dsdParams.state.input_offset = 0;
if (pthread_cond_signal(&m_dsdParams.state.input_ready))
{
qCritical("DSDDecoder::pushSamples: Unable to signal input ready");
}
if (pthread_mutex_unlock(&m_dsdParams.state.input_mutex))
{
qCritical("DSDDecoder::pushSamples: Unable to unlock input mutex");
}
}
void DSDDecoder::start()
{
if (m_dsdParams.state.dsd_running == 1)
{
m_dsdParams.state.dsd_running = 0;
if (pthread_join(m_dsdThread, NULL)) {
qCritical("DSDDecoder::start: error joining DSD thread. Not starting");
return;
}
}
m_dsdParams.state.dsd_running = 1;
if (pthread_create(&m_dsdThread, NULL, &run_dsd, &m_dsdParams))
{
qCritical("DSDDecoder::start: Unable to spawn DSD thread");
}
}
void DSDDecoder::stop()
{
if (m_dsdParams.state.dsd_running == 1)
{
m_dsdParams.state.dsd_running = 0;
if (pthread_join(m_dsdThread, NULL)) {
qCritical("DSDDecoder::stop: error joining DSD thread. Not starting");
}
}
}
void* DSDDecoder::run_dsd (void *arg)
{
dsd_params *params = (dsd_params *) arg;
liveScanner(&params->opts, &params->state);
return NULL;
}

Wyświetl plik

@ -0,0 +1,53 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef PLUGINS_CHANNEL_DEMODDSD_DSDDECODER_H_
#define PLUGINS_CHANNEL_DEMODDSD_DSDDECODER_H_
#include "dsd.h"
class DSDDecoder
{
public:
DSDDecoder();
~DSDDecoder();
void setInBuffer(const short *inBuffer);
void pushSamples(int nbSamples); // Push this amount of samples to the DSD decoder thread
void start();
void stop();
static void* run_dsd (void *arg);
private:
typedef struct
{
dsd_opts opts;
dsd_state state;
} dsd_params;
dsd_params m_dsdParams;
// dsd_opts m_dsdOpts;
// dsd_state m_dsdState;
pthread_t m_dsdThread;
};
#endif /* PLUGINS_CHANNEL_DEMODDSD_DSDDECODER_H_ */

Wyświetl plik

@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // // Copyright (C) 2015 F4EXB //
// written by Christian Daniel // // written by Edouard Griffiths //
// // // //
// This program is free software; you can redistribute it and/or modify // // This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by // // it under the terms of the GNU General Public License as published by //
@ -41,10 +41,14 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
m_fmExcursion(24), m_fmExcursion(24),
m_settingsMutex(QMutex::Recursive), m_settingsMutex(QMutex::Recursive),
m_scope(sampleSink), m_scope(sampleSink),
m_scopeEnabled(true) m_scopeEnabled(true),
m_dsdDecoder()
{ {
setObjectName("DSDDemod"); setObjectName("DSDDemod");
m_dsdInBuffer = new qint16[1<<18]; // 128 k Samples is the maximum size of all input devices sample buffers (Airspy or HackRF) = 2^(17+1) for 2 byte samples
m_dsdDecoder.setInBuffer(m_dsdInBuffer);
m_config.m_inputSampleRate = 96000; m_config.m_inputSampleRate = 96000;
m_config.m_inputFrequencyOffset = 0; m_config.m_inputFrequencyOffset = 0;
m_config.m_rfBandwidth = 100; m_config.m_rfBandwidth = 100;
@ -72,6 +76,7 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
DSDDemod::~DSDDemod() DSDDemod::~DSDDemod()
{ {
DSPEngine::instance()->removeAudioSink(&m_audioFifo); DSPEngine::instance()->removeAudioSink(&m_audioFifo);
delete[] m_dsdInBuffer;
} }
void DSDDemod::configure(MessageQueue* messageQueue, void DSDDemod::configure(MessageQueue* messageQueue,
@ -98,6 +103,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
Complex ci; Complex ci;
m_settingsMutex.lock(); m_settingsMutex.lock();
m_dsdInCount = 0;
m_scopeSampleBuffer.clear(); m_scopeSampleBuffer.clear();
for (SampleVector::const_iterator it = begin; it != end; ++it) for (SampleVector::const_iterator it = begin; it != end; ++it)
@ -141,8 +147,9 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
sample = 0; sample = 0;
} }
Sample s(demod, 0.0); Sample s(sample, 0.0);
m_scopeSampleBuffer.push_back(s); m_scopeSampleBuffer.push_back(s);
m_dsdInBuffer[m_dsdInCount++] = sample;
m_audioBuffer[m_audioBufferFill].l = sample; m_audioBuffer[m_audioBufferFill].l = sample;
m_audioBuffer[m_audioBufferFill].r = sample; m_audioBuffer[m_audioBufferFill].r = sample;
@ -177,6 +184,11 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
m_audioBufferFill = 0; m_audioBufferFill = 0;
} }
if (m_dsdInCount > 0)
{
m_dsdDecoder.pushSamples(m_dsdInCount);
}
if((m_scope != 0) && (m_scopeEnabled)) if((m_scope != 0) && (m_scopeEnabled))
{ {
m_scope->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), true); // true = real samples for what it's worth m_scope->feed(m_scopeSampleBuffer.begin(), m_scopeSampleBuffer.end(), true); // true = real samples for what it's worth
@ -189,10 +201,12 @@ void DSDDemod::start()
{ {
m_audioFifo.clear(); m_audioFifo.clear();
m_phaseDiscri.reset(); m_phaseDiscri.reset();
m_dsdDecoder.start();
} }
void DSDDemod::stop() void DSDDemod::stop()
{ {
m_dsdDecoder.stop();
} }
bool DSDDemod::handleMessage(const Message& cmd) bool DSDDemod::handleMessage(const Message& cmd)

Wyświetl plik

@ -1,3 +1,20 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_DSDDEMOD_H #ifndef INCLUDE_DSDDEMOD_H
#define INCLUDE_DSDDEMOD_H #define INCLUDE_DSDDEMOD_H
@ -14,6 +31,7 @@
#include "dsp/afsquelch.h" #include "dsp/afsquelch.h"
#include "audio/audiofifo.h" #include "audio/audiofifo.h"
#include "util/message.h" #include "util/message.h"
#include "dsddecoder.h"
class DSDDemodGUI; class DSDDemodGUI;
@ -154,6 +172,8 @@ private:
Real m_fmExcursion; Real m_fmExcursion;
qint16 *m_dsdInBuffer; //!< Input buffer for DSD decoder process
int m_dsdInCount;
SampleVector m_scopeSampleBuffer; SampleVector m_scopeSampleBuffer;
AudioVector m_audioBuffer; AudioVector m_audioBuffer;
uint m_audioBufferFill; uint m_audioBufferFill;
@ -162,6 +182,7 @@ private:
SampleSink* m_scope; SampleSink* m_scope;
bool m_scopeEnabled; bool m_scopeEnabled;
DSDDecoder m_dsdDecoder;
DSDDemodGUI *m_dsdDemodGUI; DSDDemodGUI *m_dsdDemodGUI;
QMutex m_settingsMutex; QMutex m_settingsMutex;

Wyświetl plik

@ -1,3 +1,20 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QDebug> #include <QDebug>

Wyświetl plik

@ -1,3 +1,20 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_DSDDEMODGUI_H #ifndef INCLUDE_DSDDEMODGUI_H
#define INCLUDE_DSDDEMODGUI_H #define INCLUDE_DSDDEMODGUI_H

Wyświetl plik

@ -1,3 +1,20 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QtPlugin> #include <QtPlugin>
#include <QAction> #include <QAction>
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"

Wyświetl plik

@ -1,3 +1,20 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2015 F4EXB //
// written by Edouard Griffiths //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_DSDDEMODLUGIN_H #ifndef INCLUDE_DSDDEMODLUGIN_H
#define INCLUDE_DSDDEMODLUGIN_H #define INCLUDE_DSDDEMODLUGIN_H