2017-02-06 14:09:08 +01:00
|
|
|
#
|
|
|
|
/*
|
2019-11-10 15:46:23 +01:00
|
|
|
* Copyright (C) 2014 .. 2019
|
2017-02-06 14:09:08 +01:00
|
|
|
* Jan van Katwijk (J.vanKatwijk@gmail.com)
|
2017-07-17 08:33:17 +02:00
|
|
|
* Lazy Chair Computing
|
2017-02-06 14:09:08 +01:00
|
|
|
*
|
2017-05-01 10:57:55 +02:00
|
|
|
* This file is part of the Qt-DAB program
|
|
|
|
* Qt-DAB is free software; you can redistribute it and/or modify
|
2017-02-06 14:09:08 +01:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2017-05-01 10:57:55 +02:00
|
|
|
* Qt-DAB is distributed in the hope that it will be useful,
|
2017-02-06 14:09:08 +01:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2017-05-01 10:57:55 +02:00
|
|
|
* along with Qt-DAB; if not, write to the Free Software
|
2017-02-06 14:09:08 +01:00
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
2018-09-24 19:38:07 +02:00
|
|
|
#include "backend-deconvolver.h"
|
|
|
|
#include "eep-protection.h"
|
|
|
|
#include "uep-protection.h"
|
|
|
|
|
2017-02-06 14:09:08 +01:00
|
|
|
|
2018-09-24 19:38:07 +02:00
|
|
|
backendDeconvolver::backendDeconvolver (descriptorType *d) {
|
|
|
|
if (d -> shortForm)
|
|
|
|
protectionHandler = new uep_protection (d -> bitRate,
|
|
|
|
d -> protLevel);
|
|
|
|
else
|
|
|
|
protectionHandler = new eep_protection (d -> bitRate,
|
|
|
|
d -> protLevel);
|
|
|
|
}
|
2017-02-06 14:09:08 +01:00
|
|
|
|
2019-07-08 23:30:45 +02:00
|
|
|
backendDeconvolver::~backendDeconvolver() {
|
2018-09-24 19:38:07 +02:00
|
|
|
delete protectionHandler;
|
|
|
|
}
|
2017-02-06 14:09:08 +01:00
|
|
|
|
2018-09-24 19:38:07 +02:00
|
|
|
void backendDeconvolver::deconvolve (int16_t *rawBits_in,
|
2019-11-10 15:46:23 +01:00
|
|
|
int32_t length,
|
|
|
|
uint8_t *outData) {
|
2018-09-24 19:38:07 +02:00
|
|
|
protectionHandler -> deconvolve (rawBits_in,
|
|
|
|
length,
|
|
|
|
outData);
|
|
|
|
}
|
2017-02-06 14:09:08 +01:00
|
|
|
|